結果

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

ソースコード

diff #

#include<cstdio>
#include <iostream>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<functional>
#include<cmath>
#include<map>
#include<stack>
#include<set>
#include<numeric>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pr;

int N;
int l[7];

int main()
{
	cin >> N;
	for (int i = 0; i < N; i++) {
		int L; cin >> L;
		l[L]++;
	}

	int mx = 0,mx_l = 0;
	for (int i = 6; i >= 1; i--) {
		if (mx < l[i]) {
			mx = l[i];
			mx_l = i;
		}
	}
	cout << mx_l << endl;
	return	0;
}
0