結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
|
提出日時 | 2024-03-28 00:46:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 18 ms / 5,000 ms |
コード長 | 484 bytes |
コンパイル時間 | 1,832 ms |
コンパイル使用メモリ | 191,616 KB |
最終ジャッジ日時 | 2025-02-20 14:08:28 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef int64_t lint; int main() { lint n;cin>>n; lint lv[7]; for(auto &i:lv){ i=0; } lint m=0; for(int i=0;i<n;i++){ lint l; cin>>l; lv[l]++; } for(lint i=1;i<=6;i++){ m=max(m,lv[i]); } for(lint i=6;i!=0;i--){ if(m==lv[i]){ cout<<i<<endl; // system("pause"); return 0; } } // system("pause"); }