結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
Naoyk1212
|
| 提出日時 | 2017-06-08 18:31:40 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 5,000 ms |
| コード長 | 511 bytes |
| コンパイル時間 | 1,022 ms |
| コンパイル使用メモリ | 91,620 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-26 08:14:20 |
| 合計ジャッジ時間 | 2,354 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <stack>
#include <functional>
#include <complex>
#include <cmath>
#include <ccomplex>
using namespace std;
int main() {
int n;
cin >> n;
map<int, int> mp;
for (int i = 0; i < n; i++) {
int l;
cin >> l;
mp[l]++;
}
int mx = 0;
int ans = 0;
for (auto a : mp) {
if (mx <= a.second) {
ans = max(ans, a.first);
mx = a.second;
}
}
cout << ans << endl;
}
Naoyk1212