
这是一个水模拟,但是因为图片看不清,手打比较烧脑,我们错了好多次才过
#include<stdio.h>
#include<iostream>
#include<string.h>
#include<queue>
#include<algorithm>
using namespace std;
///0 Pock 1 Dcissors 2 Paper
int Judge(char *a,char *b)
{
if(!strcmp(a,"cs"))
{
if(!strcmp(b,"Kamen")) return ;
if(!strcmp(b,"Nuzky")) return ;
if(!strcmp(b,"Papir")) return ;
}
if(!strcmp(a,"en"))
{
if(!strcmp(b,"Rock")) return ;
if(!strcmp(b,"Scissors")) return ;
if(!strcmp(b,"Paper")) return ;
}
if(!strcmp(a,"fr"))
{
if(!strcmp(b,"Pierre")) return ;
if(!strcmp(b,"Ciseaux")) return ;
if(!strcmp(b,"Feuille")) return ;
}
if(!strcmp(a,"de"))
{
if(!strcmp(b,"Stein")) return ;
if(!strcmp(b,"Schere")) return ;
if(!strcmp(b,"Papier")) return ;
}
if(!strcmp(a,"hu"))
{
if(!strcmp(b,"Ko") || !strcmp(b,"Koe")) return ;
if(!strcmp(b,"Ollo") || !strcmp(b,"Olloo")) return ;
if(!strcmp(b,"Papir")) return ;
}
if(!strcmp(a,"it"))
{
if(!strcmp(b,"Sasso") || !strcmp(b,"Roccia")) return ;
if(!strcmp(b,"Forbice")) return ;
if(!strcmp(b,"Carta") || !strcmp(b,"Rete")) return ;
}
if(!strcmp(a,"jp"))
{
if(!strcmp(b,"Guu")) return ;
if(!strcmp(b,"Choki")) return ;
if(!strcmp(b,"Paa")) return ;
}
if(!strcmp(a,"pl"))
{
if(!strcmp(b,"Kamien")) return ;
if(!strcmp(b,"Nozyce")) return ;
if(!strcmp(b,"Papier")) return ;
}
if(!strcmp(a,"es"))
{
if(!strcmp(b,"Piedra")) return ;
if(!strcmp(b,"Tijera")) return ;
if(!strcmp(b,"Papel")) return ;
}
}
int main()
{
char cou1[],cou2[],p1[],p2[];
bool flag = true;
int ca = ;
while(~scanf("%s%s%s%s",cou1,p1,cou2,p2))
{
char op1[],op2[];
int tot1 = ,tot2 = ;
while(~scanf("%s",op1))
{
if(op1[] == '-' || op1[] == '.')
{
printf("Game #%d:\n",++ca);
if(tot1 == )
printf("%s: %d point\n",p1,tot1);
else printf("%s: %d points\n",p1,tot1);
if(tot2 == )
printf("%s: %d point\n",p2,tot2);
else printf("%s: %d points\n",p2,tot2);
if(tot1 > tot2) printf("WINNER: %s\n",p1);
else if(tot1 < tot2) printf("WINNER: %s\n",p2);
else puts("TIED GAME");
puts("");
if(op1[] == '.')flag = false;
break;
}
scanf("%s",op2);
int re1 = Judge(cou1,op1);
int re2 = Judge(cou2,op2);
/// cout<<"re1 = "<<re1<<endl;
/// cout<<"re2 = "<<re2<<endl;
if(re1 == re2) continue;
if(re1 == && re2 == ) tot1++;
else if(re1 == && re2 == ) tot1++;
else if(re1 == && re2 == ) tot1++;
else tot2++;
}
if(!flag) break;
}
return ;
}