結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2018-03-01 12:20:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 481 bytes |
コンパイル時間 | 570 ms |
コンパイル使用メモリ | 68,524 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 08:23:40 |
合計ジャッジ時間 | 1,546 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
// No.79 過小評価ダメ・ゼッタイ // https://yukicoder.me/problems/no/79 // #include <iostream> #include <vector> using namespace std; int main() { unsigned int N; cin >> N; vector<int> ballots(6+1, 0); for (auto i = 0; i < N; ++i) { int tmp; cin >> tmp; ballots[tmp]++; } int ans = 6; for (auto i = 5; i >= 1; --i) { if (ballots[i] > ballots[ans]) ans = i; } cout << ans << endl; }