Interesting homework
CodeChefOpen on judge ↗
Interesting homework from school. One day Nobita got homework from his school. In homework he has given a 2D matrix A of N x M and an integer X. The task for Nobita is to calculate the number of pair of blocks of matrix A such that the sum of the values in pair of blocks is equal to X i.e Ai1 , j1 + Ai2 , j2 = X and both the value should be different i.e Ai1 , j1 ≠ Ai2 , j2. The task is diffic
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