Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- int main()
- {
- _test
- {
- int n;
- cin>>n;
- map<int, int> cnt;
- vector<int> a(n), b(n);
- for(auto &e: a) cin>>e;
- for(auto &e: b) cin>>e;
- for(auto e: a) cnt[e]++;
- for(auto e: b) cnt[e]++;
- int ans = 0;
- for(auto [x, y]: cnt)
- ans = max(ans, y);
- cout<<ans<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment