下面先附上我的水货代码,,,,一会附上,,,刘大婶给的代码///3ms
#include#include int main(){ int A,B,W=0,t,n,m,i,j,q,a[1111],b[1111],c[1111]; while(scanf("%d",&t),t) { W++; printf("Game %d:\n",W); for(A=B=i=0;i
下面附上刘大婶的代码...相对来说人家的 又简单,时间复杂度又低
#include#define maxn 1010int main(){ int A,B,i,n,d,a[maxn],b[maxn]; int kase=0; while(scanf("%d",&n),n) { printf("Game %d:\n",++kase); for(i=0;i