Cod sursa(job #1031229)

Utilizator hellol30FMI Macovei Daniel hellol30 Data 15 noiembrie 2013 17:37:19
Problema Dtcsu Scor 0
Compilator cpp Status done
Runda FMI No Stress 4 Marime 0.38 kb
#include<cstdio>
#include<map>
using namespace std;
long long x,n,k=0,m;
map<long long, bool> a;
int main()
{
	freopen("dtcsu.in","rt",stdin);
	freopen("dtcsu.out","wt",stdout);
	for(register int i=1;i<=276997;i++)
	{
		scanf("%d",&x);
		a[x]=1;
	}
	scanf("%d",&m);
	for(register int i=1;i<=m;i++)
	{
		scanf("%d",&x);
		if(a[x]) k++;
	}
	printf("%d\n",k);
	return 0;
}