#include #include #define true (1) #define false (0) #define bool int #define ROCK 0 #define SCIS 2 #define PAPER 1 #define ERROR 3 int conv(char* lang, char* str) { if (!strcmp(lang, "cs")) { if (!strcmp(str, "Kamen")) return ROCK; else if (!strcmp(str, "Nuzky")) return SCIS; else if (!strcmp(str, "Papir")) return PAPER; } if (!strcmp(lang, "en")) { if (!strcmp(str, "Rock")) return ROCK; else if (!strcmp(str, "Scissors")) return SCIS; else if (!strcmp(str, "Paper")) return PAPER; } if (!strcmp(lang, "fr")) { if (!strcmp(str, "Pierre")) return ROCK; else if (!strcmp(str, "Ciseaux")) return SCIS; else if (!strcmp(str, "Feuille")) return PAPER; } if (!strcmp(lang, "de")) { if (!strcmp(str, "Stein")) return ROCK; else if (!strcmp(str, "Schere")) return SCIS; else if (!strcmp(str, "Papier")) return PAPER; } if (!strcmp(lang, "hu")) { if (!strcmp(str, "Ko") || !strcmp(str, "Koe")) return ROCK; else if (!strcmp(str, "Ollo") || !strcmp(str, "Olloo")) return SCIS; else if (!strcmp(str, "Papir")) return PAPER; } if (!strcmp(lang, "it")) { if (!strcmp(str, "Sasso") || !strcmp(str, "Roccia")) return ROCK; else if (!strcmp(str, "Forbice")) return SCIS; else if (!strcmp(str, "Carta") || !strcmp(str, "Rete")) return PAPER; } if (!strcmp(lang, "jp")) { if (!strcmp(str, "Guu")) return ROCK; else if (!strcmp(str, "Choki")) return SCIS; else if (!strcmp(str, "Paa")) return PAPER; } if (!strcmp(lang, "pl")) { if (!strcmp(str, "Kamien")) return ROCK; else if (!strcmp(str, "Nozyce")) return SCIS; else if (!strcmp(str, "Papier")) return PAPER; } if (!strcmp(lang, "es")) { if (!strcmp(str, "Piedra")) return ROCK; else if (!strcmp(str, "Tijera")) return SCIS; else if (!strcmp(str, "Papel")) return PAPER; } return ERROR; } int main() { int g=0; bool brk = false; while (!brk) { char c1[20]; char c2[20]; char n1[200]; char n2[200]; scanf("%s", c1); if (!strcmp(c1, ".")) break; scanf("%s %s %s", n1, c2, n2); /*printf("DBG> %s/%s %s/%s\n", c1, n1, c2, n2);*/ int w1 = 0; int w2 = 0; g++; while (true) { char a1[50]; char a2[50]; scanf("%s", a1); /*printf("DBG> %s\n", a1);*/ if (!strcmp(a1, "-")) break; if (!strcmp(a1, ".")) { brk = true; break; } scanf("%s", a2); int x1 = conv(c1, a1); int x2 = conv(c2, a2); if (x1==x2) { /*draw*/ } else if ((x1+1)%3 == (x2)) { /*wins 2*/ w2++; } else { /*wins 1*/ w1++; } } printf("Game #%i:\n", g); if (w1==1) printf("%s: %i point\n", n1, w1); else printf("%s: %i points\n", n1, w1); if (w2==1) printf("%s: %i point\n", n2, w2); else printf("%s: %i points\n", n2, w2); if (w1==w2) printf("TIED GAME\n\n"); else printf("WINNER: %s\n", (w1>w2)?n1:n2); } return 0; }