← All problemsSign in

Simple Queries

CodeChefRating 3202Open on judge ↗

Given an array A consisting of N positive integers, and Q queries on it. The queries can be of five types: - 1 l r - let S - sorted set of elements with indices between l and r. You need to find: - 2 x y - assign the value y to element at position x. - 3 x - delete element at position x from array. - 4 z y - insert y after element at position z. If z equal 0 then y should insert before the

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