-
Notifications
You must be signed in to change notification settings - Fork 2
bookingaroom
bradendubois edited this page Sep 9, 2021
·
7 revisions
ID: bookingaroom
Difficulty: 1.8
CPU Time: 1 second
Memory: 1024 MB
Take in the n booked rooms, and find some way to mark their occupancy, and after this, one can simply iterate from 1 to r and check if this room is booked; if not, output it and exit early. If all the rooms have been checked and are taken, output "too late".
If n = r, one can simply output "too late" without checking anything.