This is a water simulation, but because the picture can not see clearly, the hand hit the burning brain, we have been wrong many times before
#include <stdio.h>#include<iostream>#include<string.h>#include<queue>#include<algorithm>using namespacestd;///0 pock 1 dcissors 2 PaperintJudge (Char*a,Char*b) { if(!STRCMP (A,"CS")) { if(!STRCMP (b,"Kamen"))return 0; if(!STRCMP (b,"Nuzky"))return 1; if(!STRCMP (b,"Papir"))return 2; } if(!STRCMP (A,"en")) { if(!STRCMP (b,"Rock"))return 0; if(!STRCMP (b,"Scissors"))return 1; if(!STRCMP (b,"Paper"))return 2; } if(!STRCMP (A,"FR")) { if(!STRCMP (b,"Pierre"))return 0; if(!STRCMP (b,"Ciseaux"))return 1; if(!STRCMP (b,"Feuille"))return 2; } if(!STRCMP (A,"de")) { if(!STRCMP (b,"Stein"))return 0; if(!STRCMP (b,"Schere"))return 1; if(!STRCMP (b,"Papier"))return 2; } if(!STRCMP (A,"Hu")) { if(!STRCMP (b,"Ko") || !STRCMP (b,"Koe"))return 0; if(!STRCMP (b,"Ollo") || !STRCMP (b,"Olloo"))return 1; if(!STRCMP (b,"Papir"))return 2; } if(!STRCMP (A,"it")) { if(!STRCMP (b,"Sasso") || !STRCMP (b,"Roccia"))return 0; if(!STRCMP (b,"Forbice"))return 1; if(!STRCMP (b,"Carta") || !STRCMP (b,"Rete"))return 2; } if(!STRCMP (A,"JP")) { if(!STRCMP (b,"Guu"))return 0; if(!STRCMP (b,"Choki"))return 1; if(!STRCMP (b,"Paa"))return 2; } if(!STRCMP (A,"PL")) { if(!STRCMP (b,"Kamien"))return 0; if(!STRCMP (b,"Nozyce"))return 1; if(!STRCMP (b,"Papier"))return 2; } if(!STRCMP (A,"es")) { if(!STRCMP (b,"Piedra"))return 0; if(!STRCMP (b,"Tijera"))return 1; if(!STRCMP (b,"Papel"))return 2; }}intMain () {Charcou1[ $],cou2[ $],p1[ $],p2[ $]; BOOLFlag =true; intCA =0; while(~SCANF ("%s%s%s%s", COU1,P1,COU2,P2)) { Charop1[ $],op2[ $]; intTOT1 =0, Tot2 =0; while(~SCANF ("%s", OP1)) { if(op1[0] =='-'|| op1[0] =='.') {printf ("Game #%d:\n",++CA); if(Tot1 = =1) printf ("%s:%d point\n", P1,TOT1); Elseprintf"%s:%d points\n", P1,TOT1); if(Tot2 = =1) printf ("%s:%d point\n", P2,tot2); Elseprintf"%s:%d points\n", P2,tot2); if(Tot1 > Tot2) printf ("WINNER:%s\n", p1); Else if(Tot1 < Tot2) printf ("WINNER:%s\n", p2); ElsePuts"TIED GAME"); Puts (""); if(op1[0] =='.') flag =false; Break; } scanf ("%s", OP2); intRe1 =Judge (COU1,OP1); intRe2 =Judge (COU2,OP2); ///cout<< "Re1 =" <<re1<<endl; ///cout<< "Re2 =" <<re2<<endl;if (Re1 = = Re2) continue; if(Re1 = =0&& Re2 = =1) tot1++; Else if(Re1 = =1&& Re2 = =2) tot1++; Else if(Re1 = =2&& Re2 = =0) tot1++; Elsetot2++; } if(!flag) Break; } return 0;}
A
Bnuoj 6038-reaux! sham! beaux! Problem Solving Report