結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー cureskol
提出日時 2020-03-21 15:38:17
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 255 bytes
コンパイル時間 1,666 ms
コンパイル使用メモリ 173,120 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-23 00:01:27
合計ジャッジ時間 3,127 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
    int n;cin>>n;
    map<int,int> m;
    while(n--){
        int l;cin>>l;m[l]++;
    }
    int ans=0,cnt=-1;
    for(auto p:m)if(p.second>=cnt)ans=p.first,cnt=p.second;
    cout<<ans<<endl;
}
0