记录编号 44312 评测结果 AAAAAAAAAA
题目名称 [郑州101中学] 月考 最终得分 100
用户昵称 GravatarTruth.Cirno 是否通过 通过
代码语言 C++ 运行时间 0.595 s
提交时间 2012-10-18 09:12:25 内存使用 3.15 MiB
显示代码纯文本
#include <iostream>
#include <cstdio>
#include <cstring>
#include <map>
using namespace std;

map<string,bool> name;

int main(void)
{
	freopen("mtest.in","r",stdin);
	freopen("mtest.out","w",stdout);
	int i,n,total=0;
	string str;
	cin>>n;
	for (i=1;i<=n;i++)
	{
		cin>>str;
		name[str]=true;
	}
	cin>>n;
	for (i=1;i<=n;i++)
	{
		cin>>str;
		if (name[str])
			total++;
	}
	cout<<total<<endl;
	return(0);
}