| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152516 | 卢语宸 | 19选班长II | C++ | Wrong Answer | 1 MS | 264 KB | 437 | 2026-04-26 14:54:57 |
#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; } } 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; }
------Input------
4 3 4 2 1 3 1 4 1 4 1 2 1 3 3 1 3 4 3 1 4 4 4 4 4 4 4 4 1 1 4 4 1 2 4 3 4 2 1 2 1 3 3 3 -1
------Answer-----
A=12 B=5 C=10 Tot=44 all-NO
------Your output-----
A=12 B=5 C=10 Tot=45 all-NO