#A0205. unrank
unrank
Title Description
Finally, we have reached the fifth Grammar Week competition. According to the rules of the Grammar Week competition, students who have previously received full marks under the IOI competition system will not participate in the ranking.
Now I will give you the full score list for the first four matches and the contestants for this match.
Please determine the number of participants in the ranking for this game.
Input format
The first line consists of two integers .
The second line consists of n strings, each representing a username from the previous full score list, ensuring that there are no duplicate usernames in this line.
The third line consists of m strings, each representing a username from the competition list, ensuring that there are no duplicate usernames in this line.
Output format
One integer per line represents how many people participated in the ranking of this game.
3 5
abb aab aaa
bab aab aba aaa bbb
3
Example explanation
bab (aab) aba (aaa) bbb
The parentheses indicate those who have received full marks and will not participate in the ranking.
Data scale and agreement
For data of , , ensure that all usernames are composed of no more than four lowercase English letters.
- Subtask 1 (30 points): Ensure and .
- Subtask 2 (30 points): Ensure
- Subtask 3 (40 points): No special restrictions.