#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef pair PI; #define REP(i,n) for (int i=0; i=0; i--) #define FOREACH(it,a) for (__typeof(a.begin()) it=a.begin(); it!=a.end(); it++) map M; void inse(string a,string b,int c){ M[a+string(1,'#')+b]=c; } int win(int a,int b){ if(a==0 && b==1) return 1; if(a==1 && b==2) return 1; if(a==2 && b==0) return 1; return 0; } int main() { inse("cs","Nuzky",0); inse("cs","Papir",1); inse("cs","Kamen",2); inse("en","Scissors",0); inse("en","Paper",1); inse("en","Rock",2); inse("fr","Cisseaux",0); inse("fr","Feuille",1); inse("fr","Pierre",2); inse("de","Schere",0); inse("de","Papier",1); inse("de","Stein",2); inse("hu","Ollo",0); inse("hu","Olloo",0); inse("hu","Papir",1); inse("hu","Ko",2); inse("hu","Koe",2); inse("it","Forbice",0); inse("it","Carta",1); inse("it","Rete",1); inse("it","Sasso",2); inse("it","Roccia",2); inse("jp","Choki",0); inse("jp","Paa",1); inse("jp","Guu",2); inse("pl","Nozyce",0); inse("pl","Papier",1); inse("pl","Kamien",2); inse("es","Tijera",0); inse("es","Papel",1); inse("es","Piedra",2); int game=0; while(1) { game++; string name[2]; int scores[2]={0,0}; string langs[2]; REP(i,2) { char p[10000],x[1111],y[1111]; gets(p); sscanf(p,"%s %s",x,y); langs[i]=x; langs[i]+='#'; name[i]=y; } while(1) { char p[10000],x[1111],y[1111]; gets(p); if(p[0]=='-' || p[0]=='.') { printf("Game #%d:\n",game); REP(i,2) { printf("%s: %d point",name[i].c_str(),scores[i]); printf(scores[i]==1?"\n":"s\n"); } if(scores[0]==scores[1]) printf("TIED GAME\n\n"); else printf("WINNER: %s\n\n",name[scores[0]