提交时间:2024-01-12 20:38:17
运行 ID: 36302
#include<iostream> #include<cstring> using namespace std; int a[101]; int main() { int N; cin>>N; for(int i=0;i<N;i++){ char s1[20],s2[20]; cin>>s1>>s2; if(strcmp(s1,s2)==0){ a[i]=0; } else{ a[i]=(3-strcmp(s1,s2))/2; } } for(int i=0;i<N;i++){ if(a[i]==0){ cout<<"Tie"<<endl; } else if(a[1] == 1) { cout<<"Player2"<<endl; } else { cout<<"Player1"<<endl; } } return 0; }