AcWing 763. 循环相克令
原题链接
简单
作者:
深街酒徒
,
2024-11-24 09:24:02
,
所有人可见
,
阅读 1
#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
while(n --)
{
string s1, s2;
cin >> s1 >> s2;
char c1 = s1[0], c2 = s2[0];
if(c1 == c2) cout << "Tie" << endl;
else if(c1 == 'H' && c2 == 'G') cout << "Player1" << endl;
else if(c1 == 'H' && c2 == 'B') cout << "Player2" << endl;
else if(c1 == 'G' && c2 == 'H') cout << "Player2" << endl;
else if(c1 == 'G' && c2 == 'B') cout << "Player1" << endl;
else if(c1 == 'B' && c2 == 'H') cout << "Player1" << endl;
else if(c1 == 'B' && c2 == 'G') cout << "Player2" << endl;
}
return 0;
}