Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129249 付博苏逸 19选班长 C++ Compile Error 0 MS 0 KB 292 2025-08-23 11:34:45

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ int b,c,d; cin>>b>>c>>d; a[b]++; a[c]++; a[d]++; } int max=-1,max_i=-1; for(int i=0;i<=10;i++){ if(a[i]>max){ max=a[i]; max_i=i; } } cout<<max_i; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:2: error: 'a' was not declared in this scope
  a[b]++;
  ^
Main.cc:16:5: error: 'a' was not declared in this scope
  if(a[i]>max){
     ^