AcWing 763. 循环相克令
原题链接
简单
作者:
SayYong
,
2024-10-08 21:47:17
,
所有人可见
,
阅读 1
#include <iostream>
#include <string>
using namespace std;
int main(void)
{
string str1, str2;
int m;
cin >> m;
while (m--) {
cin >> str1 >> str2;
if (str1 == str2) {
puts("Tie");
} else {
if (str1 == "Hunter") {
if (str2 == "Bear") puts("Player2");
else if (str2 == "Gun") puts("Player1");
} else if (str1 == "Bear") {
if (str2 == "Gun") puts("Player2");
else if (str2 == "Hunter") puts("Player1");
} else if (str1 == "Gun") {
if (str2 == "Hunter") puts("Player2");
else if (str2 == "Bear") puts("Player1");
}
}
}
return 0;
}