結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー cww
提出日時 2016-06-15 04:45:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 471 bytes
コンパイル時間 1,748 ms
コンパイル使用メモリ 176,016 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-09 15:59:10
合計ジャッジ時間 2,667 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 17 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
using namespace std;
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N;
	cin >> N;
	int L;
	vector<int> vc(N);
	vector<pair<int,int>> p;
	REP( i, N )
	{
		cin >> L;
		vc[L]++;
		p.push_back( make_pair( vc[i], i ) );
	}
	sort( p.begin(), p.end() );
	cout << p[N-1].second << endl;
	return 0;
}
0