← All problemsSign in

Red and Blue containers

You are given $N$ red and $N$ blue containers, all of different shapes and sizes. All red containers hold different amounts of water, as do the blue ones. Moreover, for every red container, there is a blue container that holds the same amount of water, and vice versa. Your task is to find a grouping of the containers into pairs of red and blue containers that hold the same amount of water. To do s

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