Freight Conundrum
CodeChefOpen on judge ↗
R2D2 is playing with BB8 with the freight left after the practice matches. There are $N$ pieces of freight on the field and R2D2 associates to each one two values $Id$ and $W$ which represent the $id$ and the $weight$ of a piece of freight. Now BB8 prepared $Q$ queries for R2D2 which are of 3 types: Type 1 : BB8 gives R2D2 a number $pos$ and tells him to switch the freights on the positions $p
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