Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88055 | 倪士燊 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 357 | 2024-08-17 11:09:44 |
#include<bits/stdc++.h> using namespace std; int a[100]; int main(){ int n; cin >> n; int p1,p2,p3; for(int i=1;i<=n; i++){ cin >> p1 >> p2 >>p3; t[p1]++; t[p2]++; t[p3]++; } int bz = 1; for(int i=1;i<=n; i++){ if(t[i] > t[bz]){ bz = i; } } cout << bz; return 0; }
Main.cc: In function 'int main()': Main.cc:11:9: error: 't' was not declared in this scope t[p1]++; ^ Main.cc:17:9: error: 't' was not declared in this scope if(t[i] > t[bz]){ ^