Submission #00024


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int a;
map<int, int> m;
int Max = 0;
for (int i = 0; i < n; i++) {
cin >> a;
m[a]++;
Max = max(Max, m[a]);
}
for (auto itr = m.begin(); itr != m.end(); itr++) {
if (Max == itr->second) {
cout << itr->first << "\n";
}
}
return(0);
}

ステータス

項目 データ
問題 0011 - 強欲な壺
ユーザー名 woody_1227
投稿日時 2023-11-13 08:50:48
言語 C++17
状態 Accepted
得点 50
ソースコード長 420 Byte
最大実行時間 82 ms
最大メモリ使用量 5460 KB

セット

セット 得点 Cases
1 ALL 50 / 50 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in-01.txt AC 14 ms 604 KB
1
in-02.txt AC 24 ms 700 KB
1
in-03.txt AC 18 ms 668 KB
1
in-04.txt AC 22 ms 508 KB
1
in-05.txt AC 82 ms 5216 KB
1
in-06.txt AC 43 ms 2164 KB
1
in-07.txt AC 77 ms 5416 KB
1
in-08.txt AC 33 ms 1296 KB
1
in-09.txt AC 57 ms 3852 KB
1
in-10.txt AC 82 ms 5460 KB
1