Police and Thieves
CodeChefOpen on judge ↗
There are $N$ police officers numbered $1$ through $N$ and $M$ thieves numbered $1$ through $M$. All people (police officers and thieves) are points in a Cartesian plane. Let's denote the coordinates of the $i$-th officer by $(Xp_i, Yp_i)$, and the coordinates of the $i$-th thief by $(Xt_i, Yt_i)$. A thief is *arrested* if there is a subset of police officers which form a convex polygon such that
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