Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153962 何兴驰 19选班长 C++ Compile Error 0 MS 0 KB 295 2026-05-24 11:47:19

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:13:11: error: invalid types 'int[int]' for array subscript
  int d=a[1],s=1;
           ^
Main.cc:15:6: error: 's' was not declared in this scope
   if(s