結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2017-04-07 14:29:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 20 ms / 5,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 1,615 ms |
コンパイル使用メモリ | 168,992 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 08:10:37 |
合計ジャッジ時間 | 2,604 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include "bits/stdc++.h" #define MOD 1000000007 #define INF 11234567890 #define in std::cin #define out std::cout #define rep(i,N) for(LL i=0;i<N;++i) typedef long long int LL; int N, L[112345]; int max, ans; int main() { in >> N; rep(i, N) { in >> L[i]; } std::sort(L, L + N); for (int i = 1; i <= 6; ++i) { auto sum = (std::upper_bound(L, L + N, i) - std::lower_bound(L, L + N, i)); if (sum >= max) { max = sum, ans = i; } } out << ans << std::endl; return 0; }