結果

問題 No.79 過小評価ダメ・ゼッタイ
コンテスト
ユーザー rakic Lynd
提出日時 2025-11-11 16:55:50
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 502 bytes
コンパイル時間 2,037 ms
コンパイル使用メモリ 194,872 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-11-11 16:55:54
合計ジャッジ時間 4,019 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
typedef long long ll;
typedef pair<ll, ll> P;
const ll M=1000000007;
//------------------------------------------//

int main(){
    int N;cin>>N;
    vector<int>A(6,0);
    int L;
    rep(i,N){
        cin>>L;
        A[L-1]++;
    }
    int ans=0;
    int check=A[0];
    for(int i=1;i<=5;i++){
        if(check<=A[i]){
            ans=i;
            check=A[i];
        }
    }
    cout<<ans+1<<endl;
}
0