Hiding thieves
CodeChefOpen on judge ↗
In a city, which is a number line from -∞ to +∞, far far away there are N thieves, lead by gang leader Jainesh, at given position Ti for the ith thief. Inspector Pranjal is assigned the task to catch the thieves. But, gang leader Jainesh wants at-least K of his thieves to come back safe in their hiding places. The thieves have M hiding places at positions Hj for the jth hiding place. Each of these
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