Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2468 孙浚轩 19选班长 C++ Compile Error 0 MS 0 KB 422 2024-01-06 17:21:43

Tests(0/0):


Code:

#include<iostream> #include<iomanip> using namespace std; int main(){ int n; cin>>n; int a[n],b[n+1],mx=-1,s; memset(b,sizeof b,0); for(int i=0;i<n;i++){ for(int j=1;j<=3;j++){ cin>>a[i]; b[a[i]-1]++; } } for(int i=0;i<n;i++){ if(b[i]>mx){ mx=b[i]; s=i+1; } } cout<<s; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:24: error: 'memset' was not declared in this scope
     memset(b,sizeof b,0);
                        ^