为什么总是RE···求助···
http://acm.xidian.#include<stdio.h>
#include<string.h>
long s;
int n;
void mod(int a[],int k,int len)
{
long i,y,yu;
if(len!=0)
{
for(i=k;i<=n-2;++i)
{
yu=a[i]-a[i]/2*2;
a[i]=a[i]/2;
a[i+1]=yu*10+a[i+1];
}
s=s+a[n-1]%2;
a[n-1]=a[n-1]/2;
y=0;
for(i=0;i<=n-1;++i)
if(a[i]!=0) {len=n-i;y=i;break;}
if(!y) len=0;
mod(a,y,len);
}
}
main()
{
int a[1000],b[1000]; long w,z,c,i,j;
memset(a,0,sizeof(a));memset(b,0,sizeof(b));
while((c=getchar())!=EOF)
{
i=0;j=-1;
a[0]=c-'0';
while((c=getchar())!='\n')
{
++i;
a[i]=c-'0';
}
n=i+1;
s=0;mod(a,0,n);
w=s;
while((c=getchar())!='\n')
{
++j;
b[j]=c-'0';
}
n=j+1;
s=0;mod(b,0,n);
z=s;
if (w>z) printf("wm\n");
else if (w<z) printf("zyf\n");
else printf("neither\n");
}
}