| ||||||||||
| 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 | |||||||||
哪位好人帮我看看,错到哪了?#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator