方法一:字符串比较(关系运算符–字典序)
#include<bits/stdc++.h>
using namespace std;
int main()
{
string s1="Hunter";
string s3="Bear";
string s2="Gun";
string a,b;
int n;
cin>>n;
while(n--)
{
cin>>a>>b;
if((a==s1&&b==s2)||(a==s2&&b==s3)||(a==s3&&b==s1))
cout<<"Player1"<<endl;
else if((b==s1&&a==s2)||(b==s2&&a==s3)||(b==s3&&a==s1))
cout<<"Player2"<<endl;
else if(a==b)
cout<<"Tie"<<endl;
}
return 0;
}