| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155504 | 邓弘锐 | 19选班长II | C++ | Accepted | 1 MS | 272 KB | 498 | 2026-06-07 14:08:32 |
#include<bits/stdc++.h> using namespace std; int main() { int x,a=0,b=0,c=0,tot=0; while(1){ cin>>x; if(x==-1) break; if(x==1) a++; else if(x==2) b++; else if(x==3) c++; tot++; } cout<<"A="<<a<<endl; cout<<"B="<<b<<endl; cout<<"C="<<c<<endl; cout<<"Tot="<<tot<<endl; if(a>tot/2){ cout<<"A-yes"<<endl; } else if(b>tot/2){ cout<<"B-yes"<<endl; } else if(c>tot/2){ cout<<"C-yes"<<endl; } else{ cout<<"all-NO"<<endl; } return 0; }