| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:好心人看一下^^--Time limit咋办?In Reply To:好心人看一下^^--Time limit咋办? Posted by:zhaohuazhaoshi at 2005-03-21 16:57:30 > #include<iostream.h>
> void main()
> {
> int a[50000],b[50000],i,n,j,p,q;
> while(1)
> {
> p=0,q=0;
> cin>>n;
> if(n==0)
> break;
> for(i=0;i<n;i++)
> cin>>a[i]>>b[i];
> for(i=0;i<n;i++)
> {
> p=0;
> for(j=0;j<n;j++)
> if((a[j]>=a[i])&&(b[j]>=b[i]))
> p++;
>
> if(--p==0)
> q++;
> }
> cout<<q<<endl;
> }
> }
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator