|
|
back to boardNo subject Posted by hhh 12 Mar 2009 19:29 #include <iostream> using namespace std; int n,i, j=0,s=0; int*x,*y,*a; int main() { cin>>n; x=new int[n]; y=new int[n]; a=new int[n]; for(i=0; i<n; i++) a[i]=0; for(i=0; i<n; i++) cin>>x[i]>>y[i]; while(j<n) { s=0; for(i=0; i<j; i++) { if(x[i]<=x[j]) s++; } a[s]++; j++; } for(i=0; i<n; i++) cout<<a[i]<<endl; delete []x; delete []y; delete []a; return 0; } tl#13 Re: No subject bgg. use tree =) Re: No subject Posted by hhh 2 Apr 2009 21:42 i dont know tree, pls tell me about that |
|
|