| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61298 | 许铭锐 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 333 | 2023-12-03 17:03:29 |
#include<iostream> #include<cstdio> using namespace std; int main() { int n; cin>>n; int x[n+1]= {0}; int p1,p2,p3; for(int i=1; i<=n; i++) { cin>>p1>>p2>>p3; xz[p1]++; xz[p2]++; xz[p3]++; } int bz=1; for(int i=1; i<=n; i++) { if(xz[i]>xz[bz]) { bz=i; } } cout<<bz<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:11:3: error: 'xz' was not declared in this scope
xz[p1]++;
^
Main.cc:17:6: error: 'xz' was not declared in this scope
if(xz[i]>xz[bz]) {
^
Main.cc:7:6: warning: unused variable 'x' [-Wunused-variable]
int x[n+1]= {0};
^