Illuminated boxes
CodeChefOpen on judge ↗
Arun placed a laser on a sheet making **45 Degree** with both the edges at the $top$ $left$ $corner$. The sheet is a rectangle with dimensions of length $n$ and width $m$. Then he divided the sheet into $n*m$ boxes of size $1*1$. He then put mirrors along all edges of the sheet facing inward so that the laser reflects accordingly. He considers the box illuminated if the laser passes through it.
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