Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153990 张宇泽 19选班长 C++ Compile Error 0 MS 0 KB 646 2026-05-24 11:55:07

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=x[1],s=1; for(int i=1;i<=n;i++){ if(max<x[i]){ max=x[i]; s=i; } } cout<<s; return 0; }#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=x[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:23:2: error: stray '#' in program
 }#include 
  ^
Main.cc:23:3: error: 'include' does not name a type
 }#include 
   ^
Main.cc: In function 'int main()':
Main.cc:25:5: error: redefinition of 'int main()'
 int main (){
     ^
Main.cc:3:5: note: 'int main()' previously defined here
 int main (){
     ^