| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155052 | 陈淮遇 | 19众数 | C++ | Accepted | 7 MS | 276 KB | 300 | 2026-05-31 12:49:50 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int b[1001] = {0}; for (int i = 1; i <= n; i++) { int x; cin >> x; b[x] = b[x] + 1; } int m = 1; for (int i = 2; i <= 1000; i++) { if (b[i] > b[m]) { m = i; } } cout<<m; return 0; }