Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5304 | 柯宇希 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 285 | 2024-11-09 15:04:52 |
using namespace std; int n,a[11]; int m; int main(){ cin>>n; for(int i=1;i<=n*3;i++){ cin>>m; a[m]++; } int maxn=0; int m; for(int i=1;i<=n;i++){ if(maxn<a[i]) maxn=a[i],no=i; } cout<<no<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:5:5: error: 'cin' was not declared in this scope cin>>n; ^ Main.cc:13:33: error: 'no' was not declared in this scope if(maxn<a[i]) maxn=a[i],no=i; ^ Main.cc:15:5: error: 'cout' was not declared in this scope cout<<no<<endl; ^ Main.cc:15:11: error: 'no' was not declared in this scope cout<<no<<endl; ^ Main.cc:15:15: error: 'endl' was not declared in this scope cout<<no<<endl; ^ Main.cc:11:9: warning: unused variable 'm' [-Wunused-variable] int m; ^