| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 139967 | 刘梓含 | 数组输出 | C++ | Runtime Error | 0 MS | 316 KB | 298 | 2025-12-13 13:55:17 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a[10001]={0},b; cin >> n; for(int i = 1;i <= n*3;i++) { cin >> b; a[b]++; } int max = 0,x; for(int i = 1;i <= n;i++) { if(a[i] > max) { max = a[i]; x = i; } } cout << x; return 0; }
Runtime Error:Segmentation fault