結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-15 22:35:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 5,000 ms |
| コード長 | 463 bytes |
| コンパイル時間 | 1,648 ms |
| コンパイル使用メモリ | 166,544 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 14:50:23 |
| 合計ジャッジ時間 | 3,042 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define rep(i, a, n) for (int i = a; i < n; ++i)
int main() {
int n;
cin >> n;
vector<int> l(6, 0);
rep(i, 0, n) {
int a;
cin >> a;
l[a - 1]++;
}
int ans = 0;
int max = 0;
rep(i, 0, 6) {
if (max <= l[i]) {
ans = i + 1;
max = l[i];
}
}
cout << ans << endl;
return 0;
}