|
|||
Supervising the National ElectionsThe secret service of Landia has been empowered to supervise the national elections. The secret service uses its own database of electors, which is described as follows (standard input):
Following the end of this list, the standard input includes an unspecified number (≤ 200 000) of personal codes of those who want to vote. Beware: some persons are not registered (personal code not found in the first list), and some registered persons try to vote twice. We guarantee that: if a person is not registered, it appears only once in the second list; if a registered person wants to vote many times, it appears only twice in the second list. Every line of the second list includes an arbitrary number of codes, separated by white spaces. After the end of elections, the secret service publishes the following statistics (standard output):
The list of shame (fraudulent persons, ≤ 20) is also published, alphabetically ordered. Sample Input
Output for Sample Input
ExplanationThe codes 10 and 21 are not found in the first list (not registered). Four registered persons were present (20, 11, 32, 16). Two of them (20, 32) tried to vote twice (fraudulent). |
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |