Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int n, c, m, *pc, *pm, i, j, cont;
- while(scanf("%d %d %d", &n, &c, &m) == 3)
- {
- cont = 0;
- pc = malloc(c*sizeof(int));
- pm = malloc(m*sizeof(int));
- for(i = 0; i < c; ++i)
- {
- scanf("%d ", &pc[i]);
- }
- for(i = 0; i < m; ++i)
- {
- scanf("%d ", &pm[i]);
- }
- for(i = 0; i < c; ++i)
- {
- for(j = 0; j < m; ++j)
- {
- if(pc[i] == pm[j])
- {
- cont++;
- break;
- }
- }
- }
- printf("%d\n", c - cont);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement