← All problemsSign in

A Not-so-easy Task

Milo is assigned a not-so-easy task of creating an array of $A$ of size $N$ where only the first element $A_0$ of the array is known. Milo knows the following constraints for calculating the other unknown elements of the array ($A_1$ to $A_{N-1}$): - $A_i \geq 2*A_{i-1} + A_{i-2}, \, A_i\ \%\ 4\ =\ 0$ if $i$ is even - $A_i \geq 3*A_{i-1}, \, A_i\ \%\ 5\ =\ 0$ if $i$ is odd - The difference be

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start