Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
36296 | 奚晨瑞 | 石头剪子布 | C++ | Wrong Answer | 1 MS | 244 KB | 439 | 2024-01-12 19:14:48 |
#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"; } else if(a[1] == 1) { cout<<"Player2"; } else { cout<<"Player1"; } cout<<endl; } return 0; }