Query On Arrays
CodeChefOpen on judge ↗
Harsh loves numbers and has a huge ordered collection of numbers of size n . One day Aniket saw his collection and came up with a challenge. Aniket does 2 kinds of operations on Harsh's collection. - Update: He changes the value of xth number to y . - Query: He asks if there exist any suffix in his ordered collection such that its sum is exactly z . Can you help Harsh to do these operations and
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