結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2020-10-05 02:48:26 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 541 bytes |
コンパイル時間 | 1,726 ms |
コンパイル使用メモリ | 193,276 KB |
最終ジャッジ日時 | 2025-01-15 02:48:02 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 WA * 3 |
ソースコード
#include <bits/stdc++.h> #define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) #define precise(i) fixed << setprecision(i) #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { fastIO; int l; cin >> l; vector<int> antiquet(l, 0); rep(_, l) { int n; cin >> n; antiquet[n - 1]++; } int maxv = 0, idx = 0; for (size_t i = 0; i < antiquet.size(); ++i) { if (maxv <= antiquet[i]) { maxv = antiquet[i]; idx = i; } } cout << idx + 1 << '\n'; }