結果
| 問題 | No.79 過小評価ダメ・ゼッタイ | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-03-14 14:03:54 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 8 ms / 5,000 ms | 
| コード長 | 516 bytes | 
| コンパイル時間 | 1,490 ms | 
| コンパイル使用メモリ | 167,392 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-11-06 03:46:27 | 
| 合計ジャッジ時間 | 2,931 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 22 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
template<class T> inline bool chmax(T&a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T&a,T b){if(a>b){a=b;return 1;}return 0;}
using ll = long long;
int n;
int main () {
    cin.tie(0); ios::sync_with_stdio(false); 
    cin >> n;
    vector<int> l(n), cnt(7);
    rep(i,n) cin >> l[i], cnt[l[i]]++;
    int ma=0, ans=0;
    rep(i,7)if(cnt[i]>=ma) ans=i, ma=cnt[i];
    cout << ans << '\n';
}
            
            
            
        