結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
r2en_
|
| 提出日時 | 2017-03-19 17:13:43 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 5,000 ms |
| コード長 | 574 bytes |
| コンパイル時間 | 546 ms |
| コンパイル使用メモリ | 63,744 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 08:10:24 |
| 合計ジャッジ時間 | 1,501 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int m = 0;
int ans = 0;
int N = 0;
int cnt[6] = {};
int L[100000] = {};
cin >> N;
for(int i = 0; i < N; ++i){
cin >> L[i];
if(L[i]==1){cnt[0]++;}
if(L[i]==2){cnt[1]++;}
if(L[i]==3){cnt[2]++;}
if(L[i]==4){cnt[3]++;}
if(L[i]==5){cnt[4]++;}
if(L[i]==6){cnt[5]++;}
}
for(int i = 0; i < 6; ++i){
if(m<=cnt[i]){
m = max(cnt[i],m);
ans = i;
}
}
cout << ans+1 << "\n";
return 0;
}
r2en_