Spec Ops
CodeChefOpen on judge ↗
You are given an array of length N.You are to perform certain operations on this array, these operations are of two types: - Update a range [x...y]: In which you must divide each number in the given range [x...y] by 2.This division is integer division i.e 7/2 = 3 - Query a range [x...y]: In which you must output the sum of all the numbers presently in range [x...y]. Note:The range [x...y] menti
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