結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー ninoinui
提出日時 2020-01-15 03:35:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 2,040 ms
コンパイル使用メモリ 172,556 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 18:31:46
合計ジャッジ時間 3,007 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
  int N;
  cin >> N;
  map<int, int> M;
  int vote = 0, ans = 0;
  for (int i = 0, L; i < N && cin >> L; i++) {
    M[L]++;
    if (M[L] >= vote) {
      vote = M[L];
      if (L > ans) ans = L;
    }
  }
  cout << ans << "\n";
}
0