#C9727. Scheduled Activity Query
Scheduled Activity Query
Scheduled Activity Query
Given a list of scheduled activities with their start and end times, determine which activities are ongoing at a given query time.
Each activity is represented by its start time, end time (both in the HH:MM 24-hour format), and a description. An activity is considered ongoing if the query time is greater than or equal to its start time and strictly less than its end time. If multiple activities are active at the same time, output them in their original input order. If no activity is active, output "No activity".
All input is taken from stdin and the output is printed to stdout.
inputFormat
The input is read from stdin and has the following format:
- An integer N representing the number of scheduled activities.
- N lines follow, each line containing three values separated by spaces: the start time, the end time (in HH:MM format), and the activity description (a single word).
- A final line containing the query time in HH:MM format.
outputFormat
Output the descriptions of all activities that are ongoing at the query time. If multiple activities are active, print each description on a separate line in the same order as they were provided. If there is no activity at the query time, output "No activity".
## sample3
09:00 10:00 Meeting
10:30 11:30 Coding
11:00 12:00 Lunch
10:45
Coding