Maximum Occupancy
CodeChefOpen on judge ↗
There is an hotel with infinite rooms. For the next n days, the hotel has received m bookings. Each booking is represented by 3 integers a, b and k meaning that k rooms have been booked from ath day to bth day inclusive. Find the maximum number of rooms occupied in the hotel on a day for the next n days. ### Input The first line contains two space-separated integers n and m, the size of the array
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start