← All problemsSign in

H - Solve It Ashi

CodeChefRating 3055Open on judge ↗

Ashi had been given an array $A$ having $N$ element and you are asked $Q$ queries of $3$ types. $1$ $X$ :- If the array element at index $X$ is even, then move it to the beginning of the array, otherwise move it to the end of the array (if the element is moved to the beginning then all numbers behind the index $X$ will be shifted one position right to their initial positions and if it is moved

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