See You Next Month
Time limit1sMemory limit1024 MB
Given Q events where setters add problems to the forum and contests use problems, determine whether any contest finds too few unused problems.
- Level
Easy1 of 10
- Topics
- Simulation, Implementation
- Solved
- No attempts yet
Problem
The monthly contest is run by several problem setters and reviewers, who write and check problems on whatever days they are available.
A setter records an idea in the problem forum whenever it comes to mind. Before each contest, the organizers pick several problems from the problem forum to use. The picking usually happens right after the previous month's contest ends, and the picked problems go through review until the end of the month.
Now that you know how the monthly contest works, solve the simple problem below.
The input is events in chronological order. Each event has one of the following two forms.
1 x: Setters add problems to the problem forum.2 y: A contest is held and uses problems.
If a contest needs problems but fewer than unused problems are in the problem forum, the monthly contest immediately declares it is disbanding.
At the start, the problem forum has no problems. After all events end, find out whether the monthly contest could avoid disbanding.
Input
The first line contains the number of events . ()
The next lines describe the events. ()
Output
If the monthly contest declared it was disbanding during the events, print Adios. Otherwise, print See you next month.
Hint
The monthly contest is accepting Call For Tasks.