← All problemsSign in

Chef needs to return some videotapes

CodeChefRating 3244Open on judge ↗

A mysterious investment banker has employed Chef to maintain his collection of videotapes. There are $N$ videotapes, arranged in a sequential manner from left to right. The $i$-th video tape from the left has two values associated with it - its length $L_i$ and its type, $C_i$. Chef's job entails performing $Q$ tasks, which are told to him by the banker in a sequential manner. Each task is of

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