Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154049 王顺煜 19选班长 C++ Compile Error 0 MS 0 KB 382 2026-05-24 12:06:08

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:14:13: error: expected identifier before numeric constant
    int max=[1],s=1;
             ^
Main.cc: In lambda function:
Main.cc:14:15: error: expected '{' before ',' token
    int max=[1],s=1;
               ^
Main.cc: In function 'int main()':
Main.cc:14:15: error: invalid user-defined conversion from 'main()::' to 'int' [-fpermissive]
Main.cc:14:14: note: candidate is: main()::::operator void (*)()() const 
    int max=[1],s=1;
              ^
Main.cc:14:14: note:   no known conversion from 'void (*)()' to 'int'