| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 122923 | 晏莞煜 | 19众数 | C++ | Accepted | 6 MS | 280 KB | 279 | 2025-06-22 09:44:46 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; long long a[1001]={0}; int w; for(int i=1;i<n+1;i++){ cin>>w; a[w]++; } int m=a[1],j=1; for(int i=2;i<1001;i++){ if(m<a[i]){ m=a[i]; j=i; } } cout<<j; return 0; }