結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2020-02-27 23:58:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 16 ms / 5,000 ms |
コード長 | 383 bytes |
コンパイル時間 | 747 ms |
コンパイル使用メモリ | 70,868 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-13 16:07:06 |
合計ジャッジ時間 | 1,643 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#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(7); for (int i = 0; i < n; i++) cnt[in()]++; int ma = *max_element(begin(cnt), end(cnt)); int p = 6; while (cnt[p] != ma) p--; cout << p << endl; return 0; }