Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122043 韩潞琪 19选班长 C++ Compile Error 0 MS 0 KB 313 2025-06-14 10:02:28

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:16:7: error: overloaded function with no contextual type information
    max=a[i];
       ^