#include #include #include char C1[100]; char C2[100]; char N1[100]; char N2[100]; int numer(char* buff,char* co) { if(strcmp(co,"cs")==0) { if(strcmp(buff,"Kamen")==0) return 0; if(strcmp(buff,"Nuzky")==0) return 1; return 2; } if(strcmp(co,"en")==0) { if(strcmp(buff,"Rock")==0) return 0; if(strcmp(buff,"Scissors")==0) return 1; return 2; } if(strcmp(co,"fr")==0) { if(strcmp(buff,"Pierre")==0) return 0; if(strcmp(buff,"Ciseaux")==0) return 1; return 2; } if(strcmp(co,"de")==0) { if(strcmp(buff,"Stein")==0) return 0; if(strcmp(buff,"Schere")==0) return 1; return 2; } if(strcmp(co,"hu")==0) { if(strcmp(buff,"Ko")==0 || strcmp(buff,"Koe")==0) return 0; if(strcmp(buff,"Ollo")==0 || strcmp(buff,"Olloo")==0) return 1; return 2; } if(strcmp(co,"it")==0) { if(strcmp(buff,"Sasso")==0 || strcmp(buff,"Roccia")==0) return 0; if(strcmp(buff,"Forbice")==0) return 1; return 2; } if(strcmp(co,"jp")==0) { if(strcmp(buff,"Guu")==0) return 0; if(strcmp(buff,"Choki")==0) return 1; return 2; } if(strcmp(co,"pl")==0) { if(strcmp(buff,"Kamien")==0) return 0; if(strcmp(buff,"Nozyce")==0) return 1; return 2; } if(strcmp(co,"es")==0) { if(strcmp(buff,"Piedra")==0) return 0; if(strcmp(buff,"Tijera")==0) return 1; return 2; } return 0; } int main() { int gra=0; while(1) { gra++; scanf("%s",C1); if(C1[0]=='.') return 0; scanf("%s %s %s",N1,C2,N2); int p1=0; int p2=0; while(1) { char buff1[100]; scanf("%s",buff1); if(buff1[0]=='-' || buff1[0]=='.') { printf("Game #%d:\n",gra); printf("%s: %d %s\n",N1,p1,p1==1 ? "point" : "points"); printf("%s: %d %s\n",N2,p2,p2==1 ? "point" : "points"); if(p1==p2) printf("TIED GAME\n"); else if(p1>p2) printf("WINNER: %s\n",N1); else printf("WINNER: %s\n",N2); printf("\n"); if(buff1[0]=='.') return 0; break; } char buff2[100]; scanf("%s",buff2); int v1=numer(buff1,C1); int v2=numer(buff2,C2); //printf("%s %s %d\n",C1,buff1,v1); //printf("%s %s %d\n",C2,buff2,v2); int w1=0; if(v1!=v2) { if(v1==0 && v2==1) w1=1; if(v1==1 && v2==2) w1=1; if(v1==2 && v2==0) w1=1; if(w1) p1++; else p2++; } } } return 0; }