| ||||||||||
| 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 | |||||||||
为什么还是WA呢?#include<stdio.h>
int main()
{
int n,i,temp1,temp2,temp3;
struct dat
{
int a;int b;
}a;
while((scanf("%d",&n))!=EOF)
{
if(n==0){printf("*\n");return 1;}
temp1=0;temp2=0;temp3=0;
if(n==0){printf("*\n");return 1;}
for(i=0;i<n;i++)
{
scanf("%d%d",&a.a,&a.b);
if(a.a%2&&a.b%2)
{temp1++;continue;}
if(!(a.a%2)&&!(a.b%2))
{ temp2++;continue;}
else
temp3++;
}
if(temp1<temp2)temp1=temp2;
if(temp1<temp3)temp1=temp3;
printf("%d\n",temp1);
}
return 1;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator