Contest Duration: - (local time) (100 minutes) Back to Home

Submission #10137528

Source Code Expand

Copy
```#include <bits/stdc++.h>

#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define ford(i, a, b) for (int i = (int)(a); i >= (int)b; --i)
#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define rep(i, l, r) for (int i = (l); i <= (r); i++)
#define per(i, r, l) for (int i = (r); i >= (l); i--)
#define ms(x, y) memset(x, y, sizeof(x))

using namespace std;

typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef double ld;

template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }

int n;
string s;
map<string, int> cnt;

int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.precision(10);
cout << fixed;
#ifdef LOCAL_DEFINE
freopen("in", "r", stdin);
#endif

cin >> n;
int max_num = INT_MIN;
forn(i , n) {
cin >> s;
++cnt[s];
max_num = max(max_num, cnt[s]);
}
for (auto it : cnt) {
if (it.se == max_num) cout << it.fi << '\n';
}

#ifdef LOCAL_DEFINE
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
return 0;
}```

#### Submission Info

Submission Time 2020-02-16 21:07:50+0900 C - Poll maxzzy8 C++14 (GCC 5.4.1) 300 1599 Byte AC 379 ms 23808 KB

#### Judge Result

Score / Max Score 0 / 0 300 / 300
Status
 AC × 4
 AC × 28
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt
Subtask1 sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt, sub1_01.txt, sub1_02.txt, sub1_03.txt, sub1_04.txt, sub1_05.txt, sub1_06.txt, sub1_07.txt, sub1_08.txt, sub1_09.txt, sub1_10.txt, sub1_11.txt, sub1_12.txt, sub1_13.txt, sub1_14.txt, sub1_15.txt, sub1_16.txt, sub1_17.txt, sub1_18.txt, sub1_19.txt, sub1_20.txt, sub1_21.txt, sub1_22.txt, sub1_23.txt, sub1_24.txt
Case Name Status Exec Time Memory
sample_01.txt AC 1 ms 256 KB
sample_02.txt AC 1 ms 256 KB
sample_03.txt AC 1 ms 256 KB
sample_04.txt AC 1 ms 256 KB
sub1_01.txt AC 332 ms 21248 KB
sub1_02.txt AC 182 ms 13184 KB
sub1_03.txt AC 369 ms 23808 KB
sub1_04.txt AC 379 ms 23808 KB
sub1_05.txt AC 9 ms 1280 KB
sub1_06.txt AC 153 ms 13312 KB
sub1_07.txt AC 124 ms 11648 KB
sub1_08.txt AC 9 ms 256 KB
sub1_09.txt AC 2 ms 256 KB
sub1_10.txt AC 18 ms 256 KB
sub1_11.txt AC 78 ms 2432 KB
sub1_12.txt AC 22 ms 1536 KB
sub1_13.txt AC 275 ms 11648 KB
sub1_14.txt AC 190 ms 3968 KB
sub1_15.txt AC 21 ms 256 KB
sub1_16.txt AC 41 ms 256 KB
sub1_17.txt AC 27 ms 256 KB
sub1_18.txt AC 38 ms 256 KB
sub1_19.txt AC 14 ms 256 KB
sub1_20.txt AC 69 ms 256 KB
sub1_21.txt AC 79 ms 256 KB
sub1_22.txt AC 64 ms 256 KB
sub1_23.txt AC 300 ms 23808 KB
sub1_24.txt AC 308 ms 23808 KB