| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61006 | 刘济玮 | 19买画笔 | C++ | Wrong Answer | 1 MS | 268 KB | 463 | 2023-11-25 16:41:19 |
#include<iostream> #include<cstdio> using namespace std; int a[100001]; int b[1001]={0}; int main(){ int n,max=0 ; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; b[a[i]]++; if(a[i]>max){ max = a[i]; } } int m=0; int zs=0; for(int i=1;i<=max;i++){ if(b[i]>m){ m = b[i]; zs = i; } } cout<<zs; return 0; }
------Input------
9 1 1 9 11 3 3 11 5 9
------Answer-----
5
------Your output-----
1