Problem D
Booking a Room
In this problem, you should write a program to search for
available rooms in a given hotel. The hotel has
Input
The input consists of:
-
one line with two integers
and ( , ), the number of rooms in the hotel and the number of rooms that are already booked, respectively; -
lines, each with an integer between and (inclusive), a room number that is already booked;
All
Output
If there are available rooms, output the room number of any such room. Otherwise, output “too late”.
Sample Input 1 | Sample Output 1 |
---|---|
100 5 42 3 2 99 1 |
23 |
Sample Input 2 | Sample Output 2 |
---|---|
3 3 2 3 1 |
too late |