Quarantine Shelter
CodeChefOpen on judge ↗
Due to rapid spread of corona virus Ramanujam Hostel of IET Lucknow is supposed to be made quarantine shelter. There are $N$ rooms in a row and exactly $k$ rooms have to be acquired. But for maintaining social distancing among people, any two adjacent rooms cannot be acquired (i.e. if $i-th$ room is acquired, then $(i+1)-th$ room and $(i-1)-th$ room must be free). You are the best math
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