| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 10 초 | 1024 MB | 7 | 1 | 1 | 16.667% |
Our polygon-shaped bush needs a trim. We would like to cut it down to size so that the remaining leaves of the bush form a new shape of our choosing, with its centre sitting on the top of the stem -- represented as the origin $(0, 0)$ in both shapes.
Figure H.1: Bushes cut into beautiful shapes, as given in sample inputs 1, 2, & 3.
The original shape of the bush is a little unusual so it is not obvious how large we can make the new shape without leaving some gaps in the design.
Find out the largest scaling factor that you can apply to the new shape to make it fit into the old shape--meaning that there is no point contained by the re-scaled new shape that was not contained by the old shape as well.
The old and new shapes are not always convex. However, the origin point is strictly inside (not on the bounds of) both shapes and neither of the shapes self-touch, self-intersect, or repeat any vertices.
Output the maximum amount by which we can scale the first given shape around the origin $(0, 0),ドル such that it is fully contained by the bounds of the second given shape. This amount may be any number greater than 0ドル,ドル meaning the shape may also need to become smaller.
The output must be accurate to an absolute or relative error of at most 10ドル^{-6}$.
4 -1 -1 -1 1 1 1 1 -1 4 -5 0 0 -5 5 0 0 5
2.5
8 -9 1 -9 6 -15 0 -9 -6 9 -6 15 0 9 6 9 1 6 6 -4 6 5 2 1 -2 1 -6 5 -6 -4
0.4
4 2 1 -2 1 -1 -1 2 -1 5 -5 3 -3 -4 6 -5 4 1 6 3
2
ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2024 H번