| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 108740 | 陈铎文 | 19选班长II | C++ | Compile Error | 0 MS | 0 KB | 540 | 2025-01-21 15:51:37 |
{ int n; cin>>n; int a[10001],A=0,B=0,C=0,i=1,s=0; while(1){ cin>>a[i]; if(a[i]==-1) break; i++; s++; } for(int j=1;j<=s;j++){ if(a[j]==1) A++; else if(a[j]==2) B++; else if(a[j]==3) C++; } cout<<"A="<<A<<endl; cout<<"B="<<B<<endl; cout<<"C="<<C<<endl; cout<<"Tot="<<s<<endl; if(A > s/2){ cout<<"A-yes"<<endl; } else if(B > s/2){ cout<<"B-yes"<<endl; } else if(C > s/2){ cout<<"C-yes"<<endl; } else{ cout<<"all-NO"<<endl; } return 0; }
Main.cc:1:1: error: expected unqualified-id before '{' token
{
^