Fan and Electrician
CodeChefOpen on judge ↗
In a Building there are N rooms.There are 4 fans in each room. In each room the number of damaged fans is from 0-4. The electrician fixes fans of only one room in a day.He can choose any room randomly to repair fans in a day but can't choose another room until all the fans of that particular room already chosen are not repaired. For the 1st room he takes as many number of days to repair as number
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