AcWing 763. 循环相克令
原题链接
简单
作者:
千禧
,
2019-12-14 16:14:32
,
所有人可见
,
阅读 930
C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main()
{
string a,b;
int t;
cin >> t;
while(t--)
{
cin >> a >> b;
if(a == "Hunter")
{
if(b == "Bear") cout<<"Player2"<<endl;
else if(b == "Gun") cout<<"Player1"<<endl;
else cout<<"Tie"<<endl;
}
else if(a == "Bear")
{
if(b == "Hunter") cout<<"Player1"<<endl;
else if(b == "Gun") cout<<"Player2"<<endl;
else cout<<"Tie"<<endl;
}
else if(a == "Gun")
{
if(b == "Hunter") cout<<"Player2"<<endl;
else if(b == "Bear") cout<<"Player1"<<endl;
else cout<<"Tie"<<endl;
}
}
return 0;
}