| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 153947 | 王显端 | 19众数 | C++ | Compile Error | 0 MS | 0 KB | 230 | 2026-05-24 11:25:04 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[1001]={},b,n,max=0 cin>>n; for(int i=1;i<=n;i++){ cin>>b; a[b]++; } for(int i=1;i<=1000;i++) { if(a[i]>a[max])max=i } cout<<max<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:5:1: error: expected ',' or ';' before 'cin' cin>>n; ^ Main.cc:13:1: error: expected ';' before '}' token } ^