Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153404 孔声豪 19选班长 C++ Compile Error 0 MS 0 KB 295 2026-05-17 10:54:56

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n,a,t[1001]={},max=0,b=0; cin>>n; for(int i=1;i<=3*n;i++){ cin>>a; t[a]++; } for(int j=1;j<=n;j++){ if(t[j]>max){ max=t[j]; b=max; } } cout<<b<<endl; return 0; }


Run Info:

Main.cc:4:5: error: stray '\357' in program
     int n,a,t[1001]={},max=0,b=0;
     ^
Main.cc:4:5: error: stray '\274' in program
Main.cc:4:5: error: stray '\214' in program
Main.cc: In function 'int main()':
Main.cc:4:26: error: expected ',' or ';' before 'max'
     int n,a,t[1001]={},max=0,b=0;
                          ^
Main.cc:11:13: error: invalid operands of types 'int' and '' to binary 'operator>'
     if(t[j]>max){
             ^
Main.cc:12:5: error: overloaded function with no contextual type information
  max=t[j];
     ^
Main.cc:13:5: error: 'b' was not declared in this scope
     b=max;
     ^
Main.cc:16:11: error: 'b' was not declared in this scope
     cout<