| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122056 | 邹子涵 | 19选班长II | C++ | Compile Error | 0 MS | 0 KB | 490 | 2025-06-14 10:19:23 |
#include<bits/stdc++.h> using namespace std; int main() { int A=0,B=0,C=0,Tot=0,p; for(int i=1;i<=10000;i++) { cin>>p; if(p==-1) break; if(p==1) A++; if(p==1) B++; if(p==1) C++; Tot++; } for(int i=1;i<=n;i++) cout<<"A="<<A<<endl; cout<<"B="<<B<<endl; cout<<"C="<<C<<endl; if(A*2>Tot) cout<<"A-yes"<<endl; else if(B*2>Tot) cout<<"B-yes"<<endl; else if(C*2>Tot) cout<<"C-yes"<<endl; else cout<<"all-No"; return 0; }
Main.cc: In function 'int main()':
Main.cc:19:17: error: 'n' was not declared in this scope
for(int i=1;i<=n;i++)
^