Cod sursa(job #1787664)
Utilizator | Data | 24 octombrie 2016 21:28:40 | |
---|---|---|---|
Problema | Dtcsu | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <iostream>
#include <tr1/unordered_map>
#include <fstream>
using namespace std;
using namespace tr1;
ifstream fin("dtcsu.in");
ofstream fout("dtcsu.out");
unordered_map <int,int> h;
int i,q;
int main()
{
for(i=1; i<=276997; ++i)
{
fin>>x;
h[x]=1;
}
fin>>q;
while(q--)
{
fin>>x;
if(h[x])
++ans;
}
fout<<ans;
}