| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140800 | 王培臻 | 19众数 | C++ | Wrong Answer | 1 MS | 1056 KB | 282 | 2025-12-20 13:30:04 |
#include <bits/stdc++.h> using namespace std; int main (){ long long s,a[100001]={0},d; cin>>s; for(int i=1;i<=s;i++){ cin>>d; a[d]++; } long long f=0,g; for(int i=1;i<=s;i++){ if(a[i]>f){ f=a[i]; g=i; } } cout<<g; return 0; }
------Input------
5 888 888 999 999 3
------Answer-----
888
------Your output-----
3