Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:好心人看一下^^--Time limit咋办?

Posted by zqykiki at 2006-08-09 15:30:34 on Problem 1828
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator