結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2018-10-07 22:27:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 329 bytes |
コンパイル時間 | 513 ms |
コンパイル使用メモリ | 61,084 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 14:19:13 |
合計ジャッジ時間 | 1,843 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ int N; cin>>N; std::vector<int>L(N); for(int i=0;i<N;i++) cin>>L[i]; int ans[7]={0}; for(int i=0;i<N;i++) ans[L[i]]++; int x=0,y=0; for(int i=0;i<7;i++){ if(x<=ans[i]){ x=ans[i]; y=i; } } cout<<y<<endl; return 0; }