| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70062 | 夏梓瑞 | 19选班长II | C++ | Compile Error | 0 MS | 0 KB | 1372 | 2024-04-13 15:29:52 |
# include<iostream> # include<cstring> # include<cmath> using namespace std; int main() { int tot=0,d[10000]={0},x; while(1){ cin>>x; if(x==-1){ break; } if(x==1){ d[x]++; tot++; } if(x==2){ d[x]++; tot++ } if(x==3){ d[x]++; tot++ } } cout<<"A="<<d[1]<<endl<<"B="<<d[2]<<endl<<"C="<<d[3]<<endl<<"Tot"<<tot<<endl; if(d[1]==tot/2){ cout<<"A-yes"; } else if(d[2]>=tot/2){ cout<<"B-yes";} else if(d[2]>=tot/2){ cout<<"C-yes";} else cout<<"all-NO"; return 0; }
Main.cc: In function 'int main()':
Main.cc:21:9: error: expected ';' before '}' token
}
^
Main.cc:26:5: error: expected ';' before '}' token
}
^