Grid
CodeChefOpen on judge ↗
Raina was practicing Matrices and Determinants before his exam. He came across a question which required him to find out the number of adjacent squares for each of the squares in a grid and then sum them up. Raina tried to solve the problem but couldn’t come up with a solution. He asked his friend Sir Jadeja, who is a mathematics wizard to help him out. But even Sir Jadeja couldn’t arrive at a sol
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