Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
122044 董予轩 19选班长 C++ Runtime Error 1 MS 272 KB 296 2025-06-14 10:02:31

Tests(2/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int a[10]={0},n,max=0,x,m; cin>>n; for(int i=1;i<=n;i++) { for(int j=1;j<=3;j++) { cin>>x; a[x]++; } } for(int i=1;i<=n;i++) if(a[i]>max) { max=a[i]; m=i; } cout<<m; return 0; }


Run Info:

*** stack smashing detected ***: ./Main terminated