Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139311 李林叡 19选班长 C++ Compile Error 0 MS 0 KB 396 2025-12-06 14:27:20

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:6: error: expected primary-expression before 'int'
  fou(int i=1;i<=n;i++){
      ^
Main.cc:9:14: error: 'i' was not declared in this scope
  fou(int i=1;i<=n;i++){
              ^
Main.cc:8:6: warning: unused variable 'a' [-Wunused-variable]
  int a,b,c;
      ^
Main.cc:8:8: warning: unused variable 'b' [-Wunused-variable]
  int a,b,c;
        ^
Main.cc:8:10: warning: unused variable 'c' [-Wunused-variable]
  int a,b,c;
          ^