0
已解决
褚福磊
新手光能
新手光能
#include<iostream> using namespace std; int main() { void input(){ int j=1,k=1; cin>>n>>nt>>nq; for(int i=1;i<=nt;i++) cin>>a[i]; for(int i=1;i<=nq;i++) cin>>b[i]; for(int i=1;i<=n;i++){ c[i]=a[j++]; d[i]=b[k++]; if(j==nt+1) j=1; if(k==nq+1) k=1; } } void work(){ for(int i=1;i<=n;i++){ if(c[i]=='1'&&d[i]=='2'||c[i]=='1'&&d[i]=='3'||c[i]=='2'&&d[i]=='3') sut++; if(c[i]=='2'&&d[i]=='1'||c[i]=='3'&&d[i]=='1'||c[i]=='3'&&d[i]=='2') suq++; } if(sut>suq) cout<<"T"<<endl; else if(sut<suq) cout<<"Q"<<endl; else cout<<"P"<<endl; } }