Logo
(追記) (追記ここまで)

29934번 - Important Messages 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB17113811281.159%

문제

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.

제한

예제 입력 1

3
kati@eesti.ee
lauri@arvuti.net
mati@eesti.ee
4
unknown@somewhere.com
robot@spam.com
kati@eesti.ee
mati@xxx.org

예제 출력 1

1

Among the 4 messages, only 1 was sent from an address in Juku's contact list.

힌트

출처

Olympiad > Estonian Informatics Olympiad > 2018-19 > Open Competition 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /