Fun with AGp
You are given an 1-based array A and its fixed parameters: R, p1, p2. You need to mantain this array, performing some operations. The operations are as follows: - 0 S D X Y Add an AGP with the start term of S, the common difference of D, common ratio of R from the X-th to the to Y-th element of A. In other words: add S , (S+D)*R , (S+2D)*R2 ,....., (S+(Y-X)*D)*RY-X respectively to A[X], A[X+1]
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