Diwali Lights
CodeChefOpen on judge ↗
Problem Description It's Diwali time and Deep has bought a special light. The light consists of a rectangular grid of N rows (R1 to RN) and M columns (C1 to CM). Each cell of the grid has a bulb. All the bulbs in the same column C[i] (1 Deep wants to save electricity, so he decides to glow only one bulb from each row. His superstitious roommate Sandip suggests that he should light bulbs in suc
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