Submission #00106
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include <bits/stdc++.h> using namespace std; int main(){ int n,i,a; map< int , int > l; vector<pair< int , int >> s; cin>>n; for (i=0;i<n;i++){ cin>>a; l[a]++; } for (auto iter=l.begin();iter!=l.end();iter++) { s.push_back(make_pair(-(iter->second),iter->first)); } sort(s.begin(),s.end()); for (i=0;i<s.size();i++){ if (s[0].first==s[i].first){ cout<<s[i].second<< "\n" ; } } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0011 - 強欲な壺 |
ユーザー名 | ei2229 |
投稿日時 | 2023-11-13 21:38:25 |
言語 | C++17 |
状態 | Accepted |
得点 | 50 |
ソースコード長 | 498 Byte |
最大実行時間 | 84 ms |
最大メモリ使用量 | 6740 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 50 / 50 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in-01.txt | AC | 28 ms | 600 KB |
1
|
in-02.txt | AC | 31 ms | 572 KB |
1
|
in-03.txt | AC | 18 ms | 664 KB |
1
|
in-04.txt | AC | 27 ms | 636 KB |
1
|
in-05.txt | AC | 74 ms | 6356 KB |
1
|
in-06.txt | AC | 43 ms | 2520 KB |
1
|
in-07.txt | AC | 75 ms | 6568 KB |
1
|
in-08.txt | AC | 23 ms | 1420 KB |
1
|
in-09.txt | AC | 52 ms | 4484 KB |
1
|
in-10.txt | AC | 84 ms | 6740 KB |
1
|