| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152528 | 杨金卓 | 19选班长II | C++ | Wrong Answer | 1 MS | 268 KB | 543 | 2026-04-26 15:07:50 |
#include<bits/stdc++.h> using namespace std; int a[10000]; int main(){ int b=1,c=2,d=3,tot=0,z,g; int x; for(int i=1;i<=100;i++){ tot++; cin>>x; if(x==b){ b++; }else if(x==c){ c++; }else if(x==d){ d++; } if(x==-1){ break; } } g=tot-1; printf("A=%d\n",b); printf("B=%d\n",c); printf("C=%d\n",d); cout<<g<<endl; z=g/2; if(b>g){ cout<<"A-yes"; }else if(c>g){ cout<<"B-yes"; }else if(d>g){ 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=5 B=5 C=5 44 all-NO