Cod sursa(job #1030537)
| Utilizator | Data | 15 noiembrie 2013 16:31:19 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | FMI No Stress 4 | Marime | 0.45 kb |
#include <cstdio>
#include <unordered_map>
using namespace std;
int n, sum;
unordered_map <long long, bool> h;
int main() {
int i;
long long x;
freopen ("dtcsu.in", "r", stdin), freopen ("dtcsu.out", "w", stdout);
for (i = 0; i < 276997; i++) {
scanf ("%lld", &x);
h[x] = true;
}
scanf ("%d", &n);
for (i = 0; i < n; i++) {
scanf ("%lld", &x);
if (h[x] == 1)
sum += 1;
}
printf ("%d\n", sum);
return 0;
}
