Important Messages
Time limit1sMemory limit1024 MB
Count how many message sender addresses appear in a given contact list of email addresses.
Problem
Juku receives hundreds of email messages a day. Nobody can read so many of them, so Juku wants to highlight the messages whose senders are in his contact list.
Write a program that reads Juku's contact list and the sender addresses of his messages, then counts how many of those messages should be highlighted.
Input
The first line contains (), the number of entries in the contact list. Each of the following lines contains one email address of 1 to 50 characters.
The next line contains (), the number of messages. Each of the following lines contains the sender address of one message, also 1 to 50 characters.
An email address consists of lower-case letters (az), digits (09), dots (.), and at-signs (@).
Output
Print one integer: the number of messages to be highlighted.