Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7083 | 詹梓涵 | 19选班长 | C++ | Compile Error | 0 MS | 0 KB | 381 | 2025-04-05 08:57:52 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[11]={} int n; cin>>n; for(int i=1;i<=n;i++){ int t=3;p; while(t--) cin>>p; a[p]++; } int _max=0,w; for(int i=1;i<=n;i++){ if(a[i]<_max){ _max=a[i]; } } w=_max; cout<<_max<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:5:5: error: expected ',' or ';' before 'int' int n; ^ Main.cc:6:10: error: 'n' was not declared in this scope cin>>n; ^ Main.cc:8:17: error: 'p' was not declared in this scope int t=3;p; ^