[BOJ 13211] Passport Checking

View as PDF

Submit solution

Points: 2
Time limit: 1.0s
Memory limit: 64M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

This task is inspired by the recent MH370 stolen passport incident.</p>

The Interpol database contains a list of N stolen passport numbers. We have another list of M passport numbers to check if they are stolen or not.

입력 형식

  • The first line of the input contains an integer N. (1 ≤ N ≤ 100,000)
  • The next N lines contains the list of N stolen passport numbers, one passport number per line.
  • The next line of the input contains an integer M. (1 ≤ M ≤ 100,000)
  • The next M lines contains the list of M passport numbers, one passport number per line.
  • </ul>

    Passport numbers are alphanumeric (combination of alphabetic and numeric characters) and are of length at most 15

    출력 형식

    Output the total number of stolen passports in the list of M passports.

    예제 입력

10
I220232074
D327045452
L261687170
H720628600
T181830847
I108428623
J316167657
M520837168
H364436380
J531555744
5
U133207838
D327045452
S374500074
U882158042
H364436380

예제 출력

2

힌트

Both D327045452 and H364436380 are stolen passports.


Comments

There are no comments at the moment.