結果

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

ソースコード

diff #

#include<stdio.h>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <string>
#include <stdio.h>

using namespace std;

int main() {

	int N, L[6] = {};
	cin >> N;
	for (int i = 0; i < N; i++) {
		int t;
		cin >> t;
		L[t - 1]++;
	}

	int m = 0, num = -1;
	for (int i = 5; i >= 0; i--) {
		if (L[i] > m) m = L[i], num = i;
	}

	cout << num+1 << endl;

	return 0;
}
0