結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2017-12-05 17:18:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 5,000 ms |
コード長 | 563 bytes |
コンパイル時間 | 857 ms |
コンパイル使用メモリ | 89,168 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 08:21:53 |
合計ジャッジ時間 | 1,844 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <iomanip> #include <cmath> #include <functional> using namespace std; #define diff(x,y) ((x > y) ? (x - y) : (y - x)) #define us(x) (x > 0) ? x : x * -1 #define lli long long int const int MAX = 10000001; int main() { int n, x; cin >> n; vector <pair<int, int>> rank(6); for (int i = 0; i < 6; i++) rank[i].second = i + 1; for (int i = 0; i < n; i++) { cin >> x; rank[x - 1].first++; } sort(rank.begin(), rank.end()); cout << rank[5].second << endl; return 0; }