← All problemsSign in

Removing Cards

Alice and Bob are playing with cards .They have $N$ cards each having a number $x[i]$ written on it. Bob's task is to remove the card from the pack at given positions $p[i]$, and write the number of the removed cards in a paper. After the removal of the card all the cards behind it shifts one position ahead.Help Bob to complete his task. ### Input: - The first input line has an integer N: the i

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