#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define debug(x) cerr << '[' << (#x) << "] = " << x << '\n';
template<class T> using ordered_set = tree<T, null_type , less<T> , rb_tree_tag , tree_order_statistics_node_update> ;
void PlayGround() {
int n; cin >> n;
map<int,int>a, b;
int mx = 0, mx2 = 0;
for(int i=0; i<n; ++i) {
int x; cin >> x;
a[x]++;
mx = max(mx, a[x]);
}
for(int i=0; i<n; ++i) {
int x; cin >> x;
b[x]++;
mx2 = max(mx2, b[x]);
}
cout << min(mx, mx2) << '\n';
#ifndef ONLINE_JUDGE
cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//#ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// #endif
PlayGround();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Output isn't correct |
2 |
Incorrect |
21 ms |
204 KB |
Output isn't correct |
3 |
Incorrect |
21 ms |
308 KB |
Output isn't correct |
4 |
Incorrect |
21 ms |
312 KB |
Output isn't correct |
5 |
Incorrect |
144 ms |
9192 KB |
Output isn't correct |
6 |
Incorrect |
113 ms |
9284 KB |
Output isn't correct |
7 |
Incorrect |
152 ms |
9296 KB |
Output isn't correct |
8 |
Incorrect |
149 ms |
9328 KB |
Output isn't correct |
9 |
Incorrect |
148 ms |
9284 KB |
Output isn't correct |
10 |
Incorrect |
157 ms |
9252 KB |
Output isn't correct |