結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー saytakaPC
提出日時 2015-10-26 22:41:07
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 651 bytes
コンパイル時間 1,294 ms
コンパイル使用メモリ 159,464 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-26 07:44:43
合計ジャッジ時間 2,282 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define REP(i,n) for (int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(),(a).end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
const int INF=1e9;
int main(){
      int n,l,cnt[6];
      memset(cnt,0,sizeof(cnt));
      cin>>n;
      REP(i,n){
            cin>>l;l--;
            cnt[l]++;
      }
      int ma=0;
      REP(i,6)ma=max(ma,cnt[i]);
      for(int i=5;i>=0;i--){
            if(cnt[i]==ma){
                  cout<<i+1<<endl;
                  return 0;
            }
      }
}
0