763.循环相克令
作者:
不想考试
,
2024-11-23 12:28:09
,
所有人可见
,
阅读 2
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int t;
cin >> t;
while(t --)
{
string player1,player2;
cin >> player1 >> player2;
int x, y;
if(player1 == "Hunter") x = 0;
else if(player1 == "Bear") x = 1;
else x = 2;
if(player2 == "Hunter") y = 0;
else if(player2 == "Bear") y = 1;
else y = 2;
if(x == y) cout << "Tie" << endl;
else if(x == (y + 1) % 3) cout << "Player1" << endl;
else cout << "Player2" << endl;
}
return 0;
}