結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
hayaD
|
| 提出日時 | 2016-08-13 19:32:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 5,000 ms |
| コード長 | 622 bytes |
| コンパイル時間 | 905 ms |
| コンパイル使用メモリ | 79,472 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 08:01:43 |
| 合計ジャッジ時間 | 1,932 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define FORIT(i,c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define ISEQ(c) (c).begin(), (c).end()
int main(){
int count[6] ={};
int N;
cin >> N;
FOR(i,0,N){
int p;
cin >> p;
count[p-1]++;
}
int maxc = -1;
int ans = -1;
FOR(i,0,6){
if (maxc <= count[i]){
maxc = count[i];
ans = i+1;
}
}
cout << ans << endl;
}
hayaD