C++ 代码
#include <iostream>
#include <map>
using namespace std;
int main() {
map<string, int> toNum{{"Hunter", 0},
{"Bear", 1},
{"Gun", 2}};
unsigned n;
cin >> n;
string a, b;
while (n--) {
cin >> a >> b;
if (a == b) puts("Tie");
else if ((toNum.at(a) + 1) % 3 == toNum.at(b))
puts("Player2");
else puts("Player1");
}
return 0;
}