Not Not Easy
CodeChefOpen on judge ↗
You are given an array $A$ (having the values of all elements in range $[0,2000]$) of length $N.$ Each index $i \in [1,N]$ has an initial weight of $W_i$ units. You have to perform $Q$ queries. The queries can be of $2$ types: - **Type 1:** 1 X - **Type 2:** 2 V L R **Type 1** queries ask you to increase the weight of all indices by $X$ units. **Type 2** queries ask you to calculate the total w
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