| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 | 
|---|---|---|---|---|---|---|---|---|
| 118381 | 马珺宇 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 289 | 2025-04-28 19:05:01 | 
#include<iostream> using namespace std; int main(){ int a[10001]={},p,max=-11111,n; cin>>n; for(int i=1;i<=n;i++){ cin>>p; a[p}++; } for(int i=1;i<=n;i++){ if(a[i]>max;){ max=1; } } cout<<max; return 0; }
Main.cc: In function 'int main()':
Main.cc:8:12: error: expected ']' before '}' token
         a[p}++;
            ^
Main.cc:8:12: error: expected ';' before '}' token
Main.cc:8:12: warning: statement has no effect [-Wunused-value]
Main.cc:8:15: error: expected primary-expression before ';' token
         a[p}++;
               ^
Main.cc:4:23: warning: unused variable 'max' [-Wunused-variable]
     int a[10001]={},p,max=-11111,n;
                       ^
Main.cc: At global scope:
Main.cc:10:2: error: expected unqualified-id before 'for'
  for(int i=1;i<=n;i++){
  ^
Main.cc:10:14: error: 'i' does not name a type
  for(int i=1;i<=n;i++){
              ^
Main.cc:10:19: error: 'i' does not name a type
  for(int i=1;i<=n;i++){
                   ^
Main.cc:15:1: error: 'cout' does not name a type
 cout<