AcWing 763. 循环相克令
原题链接
简单
作者:
只要是你呀ღ
,
2020-03-23 11:58:14
,
所有人可见
,
阅读 519
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
int N;
cin>>N;
while(N--)
{
char A[6],B[6];
scanf("%s %s",&A,&B);
if(A[0]=='H')
{
if(B[0]=='H')
cout<<"Tie"<<endl;
else if(B[0]=='B')
cout<<"Player2"<<endl;
else
cout<<"Player1"<<endl;
}
else if(A[0]=='B')
{
if(B[0]=='H')
cout<<"Player1"<<endl;
else if(B[0]=='B')
cout<<"Tie"<<endl;
else
cout<<"Player2"<<endl;
}
else
{
if(B[0]=='H')
cout<<"Player2"<<endl;
else if(B[0]=='B')
cout<<"Player1"<<endl;
else
cout<<"Tie"<<endl;
}
}
return 0;
}