| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 131779 | 王丞杰 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 290 | 2025-10-01 15:57:09 |
#include<bits/stdc++.h> using namespace std;a int a[15]; int main(){ int t,p1,p2,p3; cin>>t; for(int i=1;i<=t;i++){ cin>>p1>>p2>>p3; a[p1]++; a[p2]++; a[p3]++; } int max=0; int maxid; for(int i=1;i<=t;i++){ if(max<a[i]){ max=a[i]; maxid=i; } } cout<<maxid; }
Main.cc:2:21: error: 'a' does not name a type
using namespace std;a
^
Main.cc: In function 'int main()':
Main.cc:9:2: error: 'a' was not declared in this scope
a[p1]++;
^
Main.cc:17:9: error: 'a' was not declared in this scope
if(max