AcWing 763. 循环相克令
原题链接
简单
作者:
古娜拉黑暗之神
,
2021-02-18 16:12:13
,
所有人可见
,
阅读 293
#include<string>
#include<iostream>
using namespace std;
int main(){
int num;
cin >> num;
string s1,s2;
while(true){
if(num == 0){
break;
}
cin >> s1;
cin >> s2;
if(s1 == s2){
cout<<"Tie"<<endl;
}else if(s1 =="Hunter"&&s2 == "Gun" || s1=="Gun"&&s2=="Bear" || s1=="Bear"&&s2=="Hunter"){
cout<<"Player1"<<endl;
}else if(s1 == "Gun"&&s2 == "Hunter"|| s1 == "Bear"&&s2 == "Gun"||s1=="Hunter"&&s2 == "Bear"){
cout<<"Player2"<<endl;
}
num -- ;
}
return 0;
}