| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123214 | 刘子锐 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 326 | 2025-06-28 13:31:40 |
#include<bits/stdc++.h> using namespace std; int main( ) { int m; cin >> m; int a[m+1]; for (int i = 1; i <=m; i++) { b[i] = 0; } for (int i = 1; i < m*3; i++) { int x=b[i]; b[x]=b[x]+1; } int c = 1; for (int i = 2; i <=m; i++) { if (b[i] > b[c]) { c = i; } } cout<<c; return 0; }
Main.cc: In function 'int main()':
Main.cc:8:3: error: 'b' was not declared in this scope
b[i] = 0;
^
Main.cc:11:9: error: 'b' was not declared in this scope
int x=b[i];
^
Main.cc:16:7: error: 'b' was not declared in this scope
if (b[i] > b[c]) {
^
Main.cc:6:6: warning: unused variable 'a' [-Wunused-variable]
int a[m+1];
^