Cod sursa(job #3256475)

Utilizator tomavladnicolae@gmail.comTomavlad [email protected] Data 14 noiembrie 2024 17:48:33
Problema Dtcsu Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.43 kb
#include <bits/stdc++.h>
using namespace std;

/**

*/
ifstream fin("dtcsu.in");
ofstream fout("dtcsu.out");
unordered_map<long long,bool>M;
int n;
int main()
{
    int i,Q,cnt;
    long long x;
    n=276997;
    cnt=0;
    for(i=1;i<=n;i++)
    {
        fin>>x;
        M[x]=true;
    }
    fin>>Q;
    while(Q--)
    {
        fin>>x;
        if(M[x]==true)cnt++;
    }
    fout<<cnt<<'\n';
    return 0;
}