| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 160884 | 王丞杰 | 19众数 | C++ | Wrong Answer | 1 MS | 276 KB | 276 | 2026-09-26 16:16:33 |
#include<bits/stdc++.h> using namespace std; int b[100005]; int main() { int n,p; cin>>n; for(int i=1;i<=n;i++){ cin>>p; b[p]++; } int max=0,maxid; for(int i=1;i<=n;i++){ if(b[i]>max){ max=b[i]; maxid=i; } } cout<<maxid; return 0; }
------Input------
5 888 888 999 999 3
------Answer-----
888
------Your output-----
3