| ||||||||||
| 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 | |||||||||
不知道错在哪啊?麻烦各位帮忙看一下,调试了n次了啊#include<stdio.h>
main()
{ int a[6],b[6],i,j,t,t1,t2;
for(i=0;i<6;i++)
{ scanf("%d%d",&a[i],&b[i]);
if(a[i]<b[i])
{ t=a[i];
a[i]=b[i];
b[i]=t;}
}
for(i=0;i<5;i++)
for(j=0;j<5-i;j++)
{ if(a[j]<a[j+1])
{ t1=a[j];
a[j]=a[j+1];
a[j+1]=t1;
t2=b[j];
b[j]=b[j+1];
b[j+1]=t2;}
}
i=0;
while(i<6)
{ if((a[i]!=a[i+1])||(b[i]!=b[i+1])) break;
else i+=2;
}
if(i==6)
{ if(a[0]==a[2])
{if((a[0]==a[2])||(a[0]==b[2])||(b[0]==a[2])||(b[0]==b[2]))
{if((a[2]==a[4])||(a[2]==b[4])||(b[2]==a[4])||(b[2]==b[4]))
{ if((a[0]==a[4])||(a[0]==b[4])||(b[0]==a[4])||(b[0]==b[4]))
printf("POSSIBLE\n");
else printf("IMPOSSIBLE\n");
}
else printf("IMPOSSIBLE\n");
}
else printf("IMPOSSIBLE\n");
}
else printf("IMPOSSIBLE\n");
}
else printf("IMPOSSIBLE\n");
getch();
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator