Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <algorithm>
- #include <vector>
- #include <string>
- #include <set>
- #include <map>
- using namespace std;
- int main () {
- map <string, int> f1, f2;
- int n;
- cin >> n;
- for (int i = 0; i < n; i++) {
- string s;
- cin >> s;
- f1[s]++;
- }
- for (int i = 0; i < n; i++) {
- string s;
- cin >> s;
- f2[s]++;
- }
- long long ans = n;
- for (auto it : f1) {
- ans -= min (it.second, f2[it.first]);
- }
- cout << ans << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement