結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
hiyori
|
| 提出日時 | 2017-06-08 16:07:08 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 17 ms / 5,000 ms |
| コード長 | 636 bytes |
| コンパイル時間 | 672 ms |
| コンパイル使用メモリ | 66,560 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 08:13:37 |
| 合計ジャッジ時間 | 1,420 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <iostream>
#include <vector>
#define LEVEL_SIZE 6
int most_sloved_problem (int array[6])
{
int num=0,max=array[0];
for(int i=0; i<LEVEL_SIZE-1; i++) {
if(max <= array[i+1]) {
max=array[i+1];
num = i+1;
}
else { continue; }
}
return num+1;
}
int main()
{
using std::cin;
using std::cout;
using std::endl;
int level[LEVEL_SIZE] = {0};
int N,L;
cin >> N;
for(int i=0; i<N; i++) {
cin >> L;
level[L-1]++;
}
int most = most_sloved_problem(level);
cout << most << endl;
return 0;
}
hiyori