結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-10 18:33:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 5,000 ms |
| コード長 | 365 bytes |
| コンパイル時間 | 447 ms |
| コンパイル使用メモリ | 59,956 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-26 20:55:20 |
| 合計ジャッジ時間 | 1,363 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int n;
cin >> n;
vector <int> r(7, 0);
for (int i = 0; i < n; ++i)
{
int a;
cin >> a;
r[a]++;
}
int ans=6;
for (int i = 5; i >=1;--i)
{
if (r[ans] < r[i]) ans = i;
}
cout << ans<< endl;
fflush (stdin);
getchar ();
fflush (stdin);
getchar ();
return 0;
}