-
-
Save fredbr/a5741fa1510fa5787412f5691a57d3f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
const int maxn = 110; | |
int compra[maxn]; | |
int car[maxn]; | |
int main() | |
{ | |
ios_base::sync_with_stdio(false); | |
cin.tie(0); | |
int n, c, m; | |
cin >> n >> c >> m; | |
for (int i = 0; i < c; i++) { | |
int a; | |
cin >> a; | |
car[a] = 1; | |
} | |
for (int i = 0; i < m; i++) { | |
int a; | |
cin >> a; | |
compra[a] = 1; | |
} | |
int ans = c; | |
for (int i = 1; i <= n; i++) { | |
if (car[i] and compra[i]) ans--; | |
} | |
cout << ans << "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment