結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2020-02-24 12:39:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 8 ms / 5,000 ms |
コード長 | 417 bytes |
コンパイル時間 | 1,505 ms |
コンパイル使用メモリ | 169,008 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 00:18:47 |
合計ジャッジ時間 | 2,486 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using longlong=long long; int main(){ std::cin.tie(nullptr);std::cin.sync_with_stdio(false); int n;std::cin>>n; std::vector<int>a(7); for(int i=0;i<n;i++){ int x;std::cin>>x; a.at(x)++; } int ans=-1,max=0; for(int i=0;i<=6;i++){ if(max<=a.at(i)){ max=a.at(i); ans=i; } } std::cout<<ans<<std::endl; }