Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153965 岑思烁 19选班长 C++ Compile Error 0 MS 0 KB 309 2026-05-24 11:47:48

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:12: error: 'i' was not declared in this scope
  int max=x[i],s=1;
            ^
Main.cc:15:6: error: 's' was not declared in this scope
   if(s