The Spoiled Marathoner
InterviewTime limit1sMemory limit256 MB
Find the one entrant name that appears in the list of N entrants but is missing from the N-1 finishers.
- Level
Easy3 of 10
- Topics
- Hash map
- Solved
- No attempts yet
Problem
A marathon is held that every runner wants to enter, whatever their nationality or age. The race covers 42.195 km, and because the entry is so sought after, every entrant has finished it year after year. Every entrant but one!
Other runners would do anything for a place at the start line. Who is the spoiled entrant who took one and then failed to finish?
Input
The first line contains the number of entrants . ()
The next lines each contain the name of one entrant.
The following lines each contain the name of one runner who finished.
Each name is a string of lowercase letters with length between 1 and 20, inclusive.
Two entrants may share the same name.
Output
Print the name of the entrant who did not finish the marathon.