← All problemsSign in

Lock and Key

The beagle boys started working in a lock-and-key manufacturing factory. The factory uses a newly purchased robot to pack a batch of N locks and their keys. On a day, T batches of locks and keys are manufactured. The locks and keys are manufactured separately at two different wings of the factory. They then arrive at the packing section, where the robot packs them in pairs. Locks in a batch are nu

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