| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 184 | 150 | 120 | 81.633% |
These days one may get hundreds of email messages a day. Of course, nobody can read so many of them. Thus Juku wants to highlight messages whose senders are in his contact list.
Write a program that gets Juku's contact list and the senders of his email messages and counts, how many of those messages should be highlighted.
The first line of input contains $N$, the number of entries in Juku's contact list ($1 \le N \le 1\,000$), and each of the following $N$ lines one email address of 1 to 50 characters.
The next line of the file contains $M$, the number of messages ($1 \le M \le 10\,000$), and each of the following $M$ lines the sender address of one message, again 1 to 50 characters.
The characters in an email address can be lower-case letters (a$\dots$z), digits (0$\dots$9), dots (.) and at-signs (@).
The only line of output should contain one integer: the number of messages to be highlighted.
3 kati@eesti.ee lauri@arvuti.net mati@eesti.ee 4 unknown@somewhere.com robot@spam.com kati@eesti.ee mati@xxx.org
1
Among the 4 messages, only 1 was sent from an address in Juku's contact list.