| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61690 | 邓昊源 | 19众数 | C++ | Runtime Error | 1 MS | 280 KB | 338 | 2023-12-10 14:31:34 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,i,t,z,c=0; cin >> n; int s[n+1]={0}; for(i=1;i<=n;i++){ cin >>t; s[t]++; } for(i=1;i<=n;i++){ if(s[i]>c){ z=i; c=s[i]; } } cout <<z <<endl; return 0; }
Runtime Error:Segmentation fault