結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー dddai1206_c
提出日時 2014-11-27 23:25:06
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 981 ms
コンパイル使用メモリ 62,072 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2025-01-03 09:24:27
合計ジャッジ時間 1,744 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 16 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<int> vec(7,0);
  for(int i =0 ;i < n;i++){
	int tmp;
	cin >> tmp;
	vec[tmp]++;
  }
  int ans = 0;
  int cnt = 0;
  for(int i = 0;i < 7;i++){
	if(cnt < vec[i]){
	  ans = i;
	  cnt = vec[i];
	}
  }
  cout << ans << endl;
  return 0;
}
0