题目地址:
C++代码:
#include#include using namespace std;const int maxsize=2000;int main(){ int a[maxsize],b[maxsize],flag_a[maxsize],flag_b[maxsize]; int game; int n; game=1; while(cin>>n) { if(n==0)break; int i; cout<<"Game "< <<":"< >a[i]; while(true) { for(i=0;i >b[i]; if(b[0]==0)break; int A,B; A=B=0; memset(flag_a,0,maxsize*sizeof(int)); memset(flag_b,0,maxsize*sizeof(int)); int j; for(i=0;i