#include #include #include using namespace std; int PAP=0, SCI=1, ROC=2; inline int chk(int a, int b) { if (a==PAP && b==SCI) return 1; if (a==PAP && b==ROC) return -1; if (a==SCI && b==PAP) return -1; if (a==SCI && b==ROC) return 1; if (a==ROC && b==PAP) return 1; if (a==ROC && b==SCI) return -1; return 0; } int main() { char l1[30], l2[30], p1[255], p2[255], w1[30], w2[30]; string winner; int p1_cnt, p2_cnt, i=0, res=0; map trans; trans["Kamen"] = ROC; trans["Rock"] = ROC; trans["Pierre"] = ROC; trans["Stein"] = ROC; trans["Ko"] = ROC; trans["Koe"] = ROC; trans["Stein"] = ROC; trans["Sasso"] = ROC; trans["Roccia"] = ROC; trans["Guu"] = ROC; trans["Kamien"] = ROC; trans["Piedra"] = ROC; trans["Nuzky"] = SCI; trans["Scissors"] = SCI; trans["Ciseaux"] = SCI; trans["Schere"] = SCI; trans["Ollo"] = SCI; trans["Olloo"] = SCI; trans["Forbice"] = SCI; trans["Choki"] = SCI; trans["Nozyce"] = SCI; trans["Tijera"] = SCI; trans["Papir"] = PAP; trans["Paper"] = PAP; trans["Feuille"] = PAP; trans["Papier"] = PAP; trans["Papir"] = PAP; trans["Carta"] = PAP; trans["Rete"] = PAP; trans["Paa"] = PAP; trans["Papier"] = PAP; trans["Papel"] = PAP; while (++i) { p1_cnt = p2_cnt = 0; scanf("%s %s\n%s %s\n", l1, p1, l2, p2); scanf("%s", w1); while (strcmp(w1, "-") && strcmp(w1, ".")) { scanf("%s\n", w2); res = chk(trans[(string)w1], trans[(string)w2]); if (res==1) ++p2_cnt; else if (res==-1) ++p1_cnt; scanf("%s", w1); } if (p1_cnt>p2_cnt) winner = "WINNER: "+(string)p1; else if (p1_cnt