Chef and Circles
There are $N$ circles in a plane. Circle $i$ and circle $j$ form a *good pair* if it is possible to choose a point $P_1$ on the perimeter of circle $i$ and a point $P_2$ on the perimeter of circle $j$ such that the Euclidean distance between $P_1$ and $P_2$ is exactly $K$. (Note that $P_1$ and $P_2$ do not need to have integer coordinates.) You should answer $Q$ queries. In each query, you are
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