0_0_13801072_2524.cpp:1:1060: fatal error: GCC4.9.2/lib/gcc/x86_64-w64-mingw32/4.9.2/include/stdio.h>voi: Invalid argument
#include<stdio.h>void main(){ int N,A,B,C; int i; int lele,yueyue; char a; int step[200]; int F1,F2; while(scanf("%d %d %d %d",&N,&A,&B,&C)!=EOF) { getchar(); i=0; while((a=getchar())!='\n') { if(a!=' ') { if(a=='N') {step[i]=i;i++;} else scanf("%d",&step[i++]); } } lele=0;yueyue=0; F2=C; while(1) { if(yueyue!=(N-1)) { F1=(A*F2+B)%6+1; //F0=(A*C+B)%6+1,F1=(A*F0+B)%6+1 lele=lele+F1; } else break; if(lele>N-1) lele=step[N-1-(lele-N+1)]; else lele=step[lele]; if(lele==0&&yueyue==0) {printf("Impossible\n");break;} if(lele==yueyue) yueyue=0; if(lele!=(N-1)) { F2=(A*F1+B)%6+1; yueyue=yueyue+F2; } else break; if(yueyue>N-1) yueyue=step[N-1-(yueyue-N+1)]; else yueyue=step[yueyue]; if(lele==0&&yueyue==0) {printf("Impossible\n");break;} if(yueyue==lele) lele=0; }if(lele==(N-1)) printf("Lele\n");else if(yueyue==(N-1)) printf("Yueyue\n");}}平局时认为,Lele和Yueyue都回到起点,重复比赛,因此平局,望大侠指点!!
^
compilation terminated.
|