Cat and Mouse
CodeChefOpen on judge ↗
$N$ cats and $N$ mice are situated in a 2-D plane. Mota Chuha wants to choose $K$ number of animals in such a way that the distance between any pair of chosen cat and chosen mouse is minimized. Distance between the same type of chosen animals doesn't matter. In other words, suppose Chota Chuha chooses cats $C_1, C_2, \ldots, C_m$ and mice $M_1, M_2, \ldots, M_n$, then maximum of $Distance(C_i,M_j)
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