Kick Start
InterviewTime limit1sMemory limit256 MB
Given a list of 2019 Kick Start dates and today's date, print the earliest scheduled date after today, or a message if none remain.
- Level
Easy3 of 10
- Topics
- Implementation, Sorting, Array, String
- Solved
- No attempts yet
Problem
Kick Start is a global online coding competition run by Google. Participants can compete in online rounds held throughout the year, and get a chance to develop their programming skills while getting a glimpse of the technical skills needed for a career at Google.
Mr. Panda is a Kick Start enthusiast who never misses a Kick Start round in any year. He is now reading the 2019 round schedule and wonders what the date of the next Kick Start round is (excluding today). Can you help Mr. Panda find that date?
Every date in this problem is given as a month abbreviation followed by a date ordinal number. The month abbreviations are 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', and 'Dec'; the ordinal numbers are '1st', '2nd', '3rd', '4th', '5th', and so on.
Input
The first line of the input gives the number of test cases, (). test cases follow.
For each test case, the first line contains an integer (), the number of scheduled Kick Start rounds for this year.
In the next lines, each line contains a date in the year 2019, in the format of a month abbreviation followed by a date ordinal number. The scheduled dates may not be arranged in chronological order, and all scheduled dates are distinct.
The last line contains the date of today, in the same format.
Output
For each test case, output one line containing "Case #x: y", where x is the test case number (starting from ), and y is the date of the next Kick Start round. If there is no following Kick Start round this year, output "See you next year".