Editorial for CPC '21 Contest 1 P3 - AQT and Circles
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Subtask 1
For this subtask, it can be observed that the circles and will coincide, meaning that the set of possible positions for circle is equal to the set of its valid positions. This results in the answer always being .
Subtask 2
For this subtask, the only case for valid positions that needs to be considered is the case where circle is located inside of circle since the probability that circle lies outside of circle 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 and the area of the set of possible positions is . It can also be observed that 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 cases to consider:
- is located completely inside of circle
- Condition:
- Area:
- is located completely inside of circle
- Condition:
- Area:
- is located completely outside of circle
- Condition:
- Area:
Comments