Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
36303 | 奚晨瑞 | 石头剪子布 | C++ | Wrong Answer | 0 MS | 256 KB | 443 | 2024-01-12 20:44:46 |
#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[i] == 1) { cout<<"Player2"<<endl; } else { cout<<"Player1"<<endl; } } return 0; }