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

哪位好人帮我看看,错到哪了?

Posted by clearriver at 2006-10-28 00:42:31 on Problem 2726
#include<stdio.h>
void main()
{
	int a[10000][2];
	int s1,s2,c=0,m=0;
	int i,j,n,b,t;
	i=0;j=0;
	scanf("%d",&n);
	t=n;
	while(n>=1)
	{
	scanf("%d  %d",&a[i][0],&a[i][1]);
	i++;
	n--;
if(n==0)
scanf("%d",&b);
	}
for(i=0;i<t;i++)
{
	s1=a[i][0];
    s2=a[i][1];
    for(j=0;j<t;j++)
	{
		if(j!=i){if(a[j][0]>=s1&&a[j][1]>=s2)
			continue;
		else if(a[j][0]<s1&&a[j][1]>s2||a[j][0]>s1&&a[j][1]<s2)
				 continue;
			else {c=1;	break;}}
		
	}
		if (c==1)
			m++;
}
printf("%d",t-m);
}

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