Anuj Plus 5T
CodeChefOpen on judge ↗
Anuj has K samples of N tree saplings of initial height h[i](1 based indexing). He plants these K samples of N trees in a line to get N*K saplings. Eg. N=3,K=3 and heights are 1,2,3. The final sequence will be 1,2,3,1,2,3,1,2,3. Now at the end of i'th year, he waters the trees from index 1 to index i, after which height of each tree is multiplied by X. i starts from 1 and goes till N*K. Anuj
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