結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2020-02-27 23:57:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 387 bytes |
コンパイル時間 | 647 ms |
コンパイル使用メモリ | 71,352 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-13 16:06:21 |
合計ジャッジ時間 | 1,653 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 3 |
ソースコード
#include <algorithm>#include <iostream>#include <vector>using namespace std;template <class T=int> inline T in() { T x; cin >> x; return x; }int main() {int n; cin >> n;vector<int> cnt(n + 1);for (int i = 0; i < n; i++) cnt[in()]++;int ma = *max_element(begin(cnt), end(cnt));int p = n;while (cnt[p] != ma) p--;cout << p << endl;return 0;}