#include <stdio.h>
int main ()
{
int n,t,count1,count2;
char a,b;
while (~scanf("%d",&n))
{
while (n--)
{
count1=count2=0;
scanf("%d",&t);
// getchar();
while (t--)
{
getchar ();
scanf("%c %c",&a,&b); //坑啊 开始中间没用空格隔开 导致一直看不出错误。
if(a=='R'&&a!=b)
{
if(b=='S')
count1++;
else
count2++;
}
if(a=='P'&&a!=b)
{
if(b=='R')
count1++;
else
count2++;
}
if(a=='S'&&a!=b)
{
if(b=='P')
count1++;
else
count2++;
}
}
if(count1==count2)
printf("TIE\n");
else if(count1>count2)
printf("Player 1\n");
else
printf("Player 2\n");
}
}
return 0;
}
hdu 2164
最新推荐文章于 2018-04-18 20:20:35 发布