#include #include #include char line1[1000]; char line2[1000]; int gget(char *l, char *v) { if (l[0] == 'c' && l[1] == 's') { if (!strcmp(v,"Kamen")) return 1; if (!strcmp(v,"Nuzky")) return 2; if (!strcmp(v,"Papir")) return 3; } if (l[0] == 'e' && l[1] == 'n') { if (!strcmp(v,"Rock")) return 1; if (!strcmp(v,"Scissors")) return 2; if (!strcmp(v,"Paper")) return 3; } if (l[0] == 'f' && l[1] == 'r') { if (!strcmp(v,"Pierre")) return 1; if (!strcmp(v,"Ciseaux")) return 2; if (!strcmp(v,"Feuille")) return 3; } if (l[0] == 'd' && l[1] == 'e') { if (!strcmp(v,"Stein")) return 1; if (!strcmp(v,"Schere")) return 2; if (!strcmp(v,"Papier")) return 3; } if (l[0] == 'h' && l[1] == 'u') { if (!strcmp(v,"Ko")) return 1; if (!strcmp(v,"Koe")) return 1; if (!strcmp(v,"Ollo")) return 2; if (!strcmp(v,"Olloo")) return 2; if (!strcmp(v,"Papir")) return 2; } if (l[0] == 'i' && l[1] == 't') { if (!strcmp(v,"Sasso")) return 1; if (!strcmp(v,"Rocia")) return 1; if (!strcmp(v,"Forbice")) return 2; if (!strcmp(v,"Carta")) return 3; if (!strcmp(v,"Rete")) return 3; } if (l[0] == 'j' && l[1] == 'p') { if (!strcmp(v,"Guu")) return 1; if (!strcmp(v,"Choki")) return 2; if (!strcmp(v,"Paa")) return 3; } if (l[0] == 'p' && l[1] == 'l') { if (!strcmp(v,"Kamien")) return 1; if (!strcmp(v,"Nozyce")) return 2; if (!strcmp(v,"Papier")) return 3; } if (l[0] == 'e' && l[1] == 's') { if (!strcmp(v,"Piedra")) return 1; if (!strcmp(v,"Tijera")) return 2; if (!strcmp(v,"Papel")) return 3; } return -1; } int score1 = 0; int score2 = 0; void pp(int p, char *name) { if (p == 1) printf("%s: 1 point\n", name); else printf("%s: %i points\n", name, p); } int game = 0; void result() { printf("Game #%i:\n", game); pp(score1,line1+3); pp(score2,line2+3); if (score1 == score2) printf("TIED GAME\n\n"); if (score1 < score2) printf("WINNER: %s\n\n", line2+3); if (score1 > score2) printf("WINNER: %s\n\n", line1+3); } int main() { for(;;) { game++; fgets(line1, 1000, stdin); fgets(line2, 1000, stdin); line1[strlen(line1)-1] = 0; line2[strlen(line2)-1] = 0; char round[10000]; score1 = 0; score2 = 0; for (;;) { if (fgets(round, 1000, stdin) == 0) break; if (round[0] == '-') { result(); break; } if (round[0] == '.') { result(); return 0; } int t; int len = strlen(round); round[len-1] = 0; for (t=0;t