| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 20297 | 张熠欣 | 哪种苹果最多 | C++ | Accepted | 100 | 0 MS | 252 KB | 284 | 2021-06-07 20:13:12 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,d[1001]={0},di,maxn=0,maxdi=0; cin>>n; for(int i=1;i<=n;i++){ cin>>di; d[di]++; } for(int i=1;i<=1000;i++){ if(d[i]>maxn){ maxn=d[i]; maxdi=i; } } cout<<maxdi<<" "<<maxn; return 0; }