結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー mikorice
提出日時 2018-03-04 11:48:57
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 458 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 57,452 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 08:23:41
合計ジャッジ時間 1,456 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
	int n;
	cin >> n;
	int ans = 0;
	int lv[6] = {0};
	int hyou = 0;
	REP(i,n){
		int tmp;
		cin >> tmp;
		lv[tmp-1] += 1;
	}
	REP(i,6){
		if(lv[i] >= hyou){
			ans = i + 1;
			hyou = lv[i];
		}
	}
	cout << ans << endl;
	return 0;
}
0