Editorial for CPC '21 Contest 1 P3 - AQT and Circles


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: kevinyang

Subtask 1

For this subtask, it can be observed that the circles C_2 and C_1 will coincide, meaning that the set of possible positions for circle C_3 is equal to the set of its valid positions. This results in the answer always being 1.

Subtask 2

For this subtask, the only case for valid positions that needs to be considered is the case where circle C_3 is located inside of circle C_1 since the probability that circle C_3 lies outside of circle C_1 is negligible. To calculate the probability, you need to calculate the ratio between the area of the set of valid positions and the area of the set of possible positions.
The area of the set of valid positions is \pi(R_1 - R_3)^2 and the area of the set of possible positions is \pi(R_2 - R_3)^2. It can also be observed that \pi can be cancelled out in the ratio.

Subtask 3

For the full solution, the area of the set of possible positions stays the same but the area of the set of valid positions is not necessarily the same. There are 3 cases to consider:

  • C_3 is located completely inside of circle C_1
    • Condition: R_3 < R_1
    • Area: \pi(R_1-R_3)^2
  • C_1 is located completely inside of circle C_3
    • Condition: R_3 > R_1
    • Area: \pi(min(R_3-R_1,R_2-R_3))^2
  • C_3 is located completely outside of circle C_1
    • Condition: R_2-R_1 > 2\cdot R_3
    • Area: \pi((R_2-R_3)^2 - (R_1+R_3)^2)

Comments

There are no comments at the moment.