| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152518 | 卢语宸 | 19选班长II | C++ | Accepted | 2 MS | 268 KB | 446 | 2026-04-26 14:56:02 |
#include<bits/stdc++.h> using namespace std; long long a[100000],b[10],c,d,e,f; int main() { for(int i=1;; i++) { cin>>a[i]; b[a[i]]++; c++; if(a[i]==-1) { break; } } c=c-1; cout<<"A="<<b[1]<<endl<<"B="<<b[2]<<endl<<"C="<<b[3]<<endl<<"Tot="<<c<<endl; d=c/2.0; if(b[1]>d){ cout<<"A-yes"; } if(b[2]>d){ cout<<"B-yes"; } if(b[3]>d){ cout<<"C-yes"; }else{ cout<<"all-NO"; } return 0; }