| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122275 | 胡汪兵-小胡老师 | 19选班长II | C++ | Accepted | 1 MS | 272 KB | 473 | 2025-06-15 09:52:47 |
#include<bits/stdc++.h> using namespace std; int main(){ int A=0,B=0,C=0,Tot=0,bh; for(int i=1;i<=10000;i++) { cin>>bh; if(bh==-1) break; if(bh==1) A++; if(bh==2) B++; if(bh==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"; else if(B*2>=Tot) cout<<"B-yes"; else if(C*2>=Tot) cout<<"C-yes"; else cout<<"all-NO"; }