#include <bits/stdc++.h> using namespace std; int n; set <int> a; map <int,int> cnt; int main() { cin >> n; int ans = 0; for (int i = 1; i <= n; ++i) { int x; cin >> x; a.insert(x); ++cnt[x]; } for (int i = 1; i <= n; ++i) { int x; cin >> x; if(a.count(x) && cnt[x]) --cnt[x]; else ans++; } cout << ans << endl; return 0; }
原文地址:https://www.cnblogs.com/2aptx4869/p/12636603.html
时间: 2024-10-08 09:18:36