| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122072 | 蒋骏逸 | 19选班长II | C++ | Wrong Answer | 1 MS | 276 KB | 502 | 2025-06-14 10:24:39 |
#include<bits/stdc++.h> using namespace std; int main() { int A=0,B=0,C=0,m,Tot=0; for(int i=1;i<=10000;i++) { cin>>m; if(m==-1) break; if(m==1) A++; if(m==2) B++; if(m==3) C++; Tot++; } cout<<"A="<<A<<endl; cout<<"B="<<B<<endl; cout<<"C="<<C<<endl; cout<<"Tot="<<Tot<<endl; if(A*2>=Tot) cout<<"A-Yes"<<endl; else if(B*2>=Tot) cout<<"B-Yes"<<endl; else if(C*2>=Tot) cout<<"C-Yes"<<endl; else cout<<"all-NO"<<endl; return 0; }
------Input------
1 3 3 3 3 3 1 4 3 4 2 3 2 1 4 1 3 1 1 3 3 3 3 -1
------Answer-----
A=6 B=2 C=12 Tot=23 C-yes
------Your output-----
A=6 B=2 C=12 Tot=23 C-Yes