题目描述
相当于剪刀石头布
这里用了判断语句来做
样例
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
int T;
string s1="Hunter",s2="Gun",s3="Bear",a,b;
cin>>T;
while(cin>>a>>b)
{
if(a==b)cout<<"Tie"<<endl;
else if(a==s1){
if(b==s2)cout<<"Player1"<<endl;
if(b==s3)cout<<"Player2"<<endl;
}
else if(a==s2){
if(b==s1)cout<<"Player2"<<endl;
if(b==s3)cout<<"Player1"<<endl;
}
else if(a==s3){
if(b==s1)cout<<"Player1"<<endl;
if(b==s2)cout<<"Player2"<<endl;
}
}
return 0;
}