Cod sursa(job #3319158)
| Utilizator | Data | 30 octombrie 2025 19:46:26 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 100 |
| 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");
vector<long long> v;
int q;
long long x;
int cnt;
int main()
{
for (int i=1;i<=276997;i++)
{
fin>>x;
v.push_back(x);
}
sort(v.begin(),v.end());
fin>>q;
while (q--)
{
fin>>x;
if (binary_search(v.begin(),v.end(),x)) cnt++;
}
fout<<cnt;
return 0;
}
