| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84471 | 刘泽熙 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 269 | 2024-07-16 09:31:02 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,x,y,z; cin>>n; for(int i=1;i<=n;i++){ cin>>x>>y>>z; a[x]++; a[y]++; a[z]++; } int max =0,k; for(int i=1;i<=n;i++){ if(a[i]>max){ max=a[i]; k=i; } } cout<<k; }
Main.cc: In function 'int main()':
Main.cc:8:3: error: 'a' was not declared in this scope
a[x]++;
^
Main.cc:14:6: error: 'a' was not declared in this scope
if(a[i]>max){
^