| ||||||||||
| 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>
int main()
{
int m,n;
int a[10000],b[10000];
int i,j,k,l;
while (scanf("%d",&m)==1)
{
scanf("%d",&n);
if (n<m)
{
i=m;m=n;n=i;
}
a[0]=1;b[0]=2;
if (m==2)
{
printf("1\n");
continue;
}
if (m==1)
{
printf("%d\n",n==2?0:1);
continue;
}
if (m&&n==0)
{
printf("1\n");
continue;
}
{
l=0;i=1;j=0;k=1;
while (1)
{
k++;i++;
if (i==b[j])
{
i++;
j++;
}
a[++l]=i;
b[l]=i+k;
if (i==n)
{
printf("1\n");
break;
}
if (i==m)
{
printf("%d\n",i+k==n?0:1);
break;
}
}
}
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator