#include #include #include using namespace std; map What[100]; map Kraj; char b1[100],b2[100]; char b3[100],b4[100]; int a1,a2; int t; int main() { Kraj["cs"]=1; Kraj["en"]=2; Kraj["fr"]=3; Kraj["de"]=4; Kraj["hu"]=5; Kraj["it"]=6; Kraj["jp"]=7; Kraj["pl"]=8; Kraj["es"]=9; What[1]["Kamen"]=1; What[1]["Nuzky"]=2; What[1]["Papir"]=3; What[2]["Rock"]=1; What[2]["Scissors"]=2; What[2]["Paper"]=3; What[3]["Pierre"]=1; What[3]["Ciseaux"]=2; What[3]["Feuille"]=3; What[4]["Stein"]=1; What[4]["Schere"]=2; What[4]["Papier"]=3; What[5]["Ko"]=1; What[5]["Koe"]=1; What[5]["Ollo"]=2; What[5]["Olloo"]=2; What[5]["Papir"]=3; What[6]["Sasso"]=1; What[6]["Roccia"]=1; What[6]["Forbice"]=2; What[6]["Carta"]=3; What[6]["Rete"]=3; What[7]["Guu"]=1; What[7]["Choki"]=2; What[7]["Paa"]=3; What[8]["Kamien"]=1; What[8]["Nozyce"]=2; What[8]["Papier"]=3; What[9]["Piedra"]=1; What[9]["Tijera"]=2; What[9]["Papel"]=3; t=0; int kon=0; while(kon==0) { t++; a1=a2=0; scanf("%s ",b1); if(b1[0]=='.') break; scanf("%s",b2); scanf("%s %s",b3,b4); string a,b,c,d; a=string(b1); b=string(b2); c=string(b3); d=string(b4); while(1) { scanf("%s ",b1); string e,f; e=string(b1); if(b1[0]=='-') break; if(b1[0]=='.') {kon=1;break;} scanf("%s",b2); f=string(b2); // printf("%d_%d\n",What[Kraj[a]][e],What[Kraj[c]][f]); if(What[Kraj[a]][e]==1 && What[Kraj[c]][f]==2) a1++; if(What[Kraj[a]][e]==2 && What[Kraj[c]][f]==3) a1++; if(What[Kraj[a]][e]==3 && What[Kraj[c]][f]==1) a1++; if(What[Kraj[a]][e]==2 && What[Kraj[c]][f]==1) a2++; if(What[Kraj[a]][e]==3 && What[Kraj[c]][f]==2) a2++; if(What[Kraj[a]][e]==1 && What[Kraj[c]][f]==3) a2++; } printf("Game #%d:\n",t); if(a1==1) printf("%s : %d point\n",b.c_str(),a1); else printf("%s : %d points\n",b.c_str(),a1); if(a2==1) printf("%s : %d point\n",d.c_str(),a2); else printf("%s : %d points\n",d.c_str(),a2); if(a1==a2) printf("TIED GAME\n"); else if(a1>a2) printf("WINNER: %s\n",b.c_str()); else printf("WINNER: %s\n",d.c_str()); printf("\n"); } return 0; }