AcWing 763. 循环相克令-语法题-C++
原题链接
简单
作者:
码
,
2021-07-17 11:11:57
,
所有人可见
,
阅读 558
数据量少,模拟一遍即可
#include<iostream>
#include<string>
using namespace std;
int main()
{
int n;
cin>>n;
while (n -- ){
string a,b;
cin>>a>>b;
if(a==b) cout<<"Tie"<<endl;
else{
if(a=="Hunter"){
if(b=="Gun") cout<<"Player1"<<endl;
else cout<<"Player2"<<endl;
}
else if(a=="Bear"){
if(b=="Hunter") cout<<"Player1"<<endl;
else cout<<"Player2"<<endl;
}
else{
if(b=="Bear") cout<<"Player1"<<endl;
else cout<<"Player2"<<endl;
}
}
}
return 0;
}