結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー Y_S
提出日時 2020-08-06 06:08:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 564 bytes
コンパイル時間 744 ms
コンパイル使用メモリ 76,304 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-19 04:05:33
合計ジャッジ時間 1,754 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>	//cin, cout
#include <vector>	//vector
#include <algorithm> //sort,min,max
#include <string>	//string
#include <ios>		//fixed
#include <iomanip>	//setprecision
#include <utility> //swap
#include <cstdlib>	//abs(int)
#include <sstream>	//stringstream,getline

using namespace std;

int main() {

	int N;
	cin >> N;

	vector<int> L(7);

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

	int max = *std::max_element(L.begin(), L.end());

	int i = 6;
	while (L[i] != max) {
		i--;
	}

	cout << i << endl;

	return 0;

}
0