Cod sursa(job #1867876)

Utilizator moise_alexandruMoise Alexandru moise_alexandru Data 4 februarie 2017 13:30:38
Problema Dtcsu Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.56 kb
#include <unordered_set>
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("dtcsu.in");
ofstream out("dtcsu.out");
const int numnr = 276997;
unordered_set <long long> gasit;
int main()
{
    for(int i = 1; i <= numnr; i++)
    {
        long long x;
        in >> x;
        gasit.insert(x);
    }
    int q;
    in >> q;
    int nr = 0;
    for(int i = 1; i <= q; i++)
    {
        long long x;
        in >> x;
        if(gasit.find(x) == gasit.end())
            nr++;
    }
    out << nr << "\n";
    return 0;
}