Playing with grids
CodeChefOpen on judge ↗
The engineers at Google love to come up with different games which stretch the mind and make you think hard. The other day while playing chess, one of the engineers challenged his opponent to tell him the number of rectangles that are contained in the chessboard. Being Google, the chessboards they have here are not necessarily of the standard 8x8 size. Rather they can be of any arbitrary size M x
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