| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122073 | 董予轩 | 19选班长II | C++ | Accepted | 1 MS | 276 KB | 509 | 2025-06-14 10:24:49 |
#include<bits/stdc++.h> using namespace std; int main() { int A=0,B=0,C=0,Tot=0,num; for(int i=1;i<=10000;i++) { cin>>num; if(num==-1) break; if(num==1) A++; if(num==2) B++; if(num==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"; return 0; }