10分钟一次性AC。
#include<iostream>
using namespace std;
int main()
{
//freopen("xxx.in","r",stdin);
//freopen("yyy.out","w",stdout);
int t;
string s,ss;
cin >> t;
for(int i=0;i<t;i++)
{
cin >> s >> ss;
if(s=="Hunter" && ss=="Gun")
cout << "Player1" << endl;
else if(s=="Gun" && ss=="Hunter")
cout << "Player2" << endl;
else if(s=="Gun" && ss=="Bear")
cout << "Player1" << endl;
else if(s=="Bear" && ss=="Gun")
cout << "Player2" << endl;
else if(s=="Bear" && ss=="Hunter")
cout << "Player1" << endl;
else if(s=="Hunter" && ss=="Bear")
cout << "Player2" << endl;
else
cout << "Tie" << endl;
}
//fclose(stdin);
//fclose(stdout);
return 0;
}