좌석 관리
Time Limit: 5 SecMemory Limit: 1024 MiB
Example Input 1
1 3 10
Out 1
In 1
In 2
In 2
In 3
Out 2
In 3
Out 2
Out 1
In 1
Example Output 1
1 didn't eat lunch.
1 gets the seat (1, 1).
2 gets the seat (1, 3).
2 already seated.
There are no more seats.
2 leaves from the seat (1, 3).
3 gets the seat (1, 3).
2 already left seat.
1 leaves from the seat (1, 1).
1 already ate lunch.
Example Input 2
4 4 7
In 7
In 6
In 5
In 4
In 3
In 2
In 1
Example Output 2
7 gets the seat (1, 1).
6 gets the seat (4, 4).
5 gets the seat (1, 4).
4 gets the seat (4, 1).
3 gets the seat (2, 2).
2 gets the seat (3, 3).
There are no more seats.
Language-Specific Restrictions
© 2023-2025. All rights reserved.
Powered by @Rn
logo