Pratik and Magical Array
CodeChefOpen on judge ↗
Pratik's favourite hobby is to solve puzzles. His mathematics teacher K.R. Atal Sir has given him a unique problem to solve and for the first time Pratik needs help. The problem goes as follows. You are given a 2-D array of size N x M consisting of integers to which you can apply the following two operations with an associated cost :- 1. Choose an element from the array and increment its value b
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