| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 | 2048 MB | 7 | 1 | 1 | 100.000% |
After reading the paper Steiner minimal trees on sets of four points, one has decided to make things a bit harder. Why not five points instead?
You are given 5ドル$ points with integer coordinates on the plane. The distance between two points is defined by the Euclidean distance.
Please find the sum of distances of the minimum weight$^\dagger$ steiner tree$^\ddagger$ of the given points.
$^\dagger$ The weight of a tree is defined by the sum of distances between all pairs of points connected by edges.
$^\ddagger$ A steiner tree is defined as a tree spanning the given points, possibly containing some arbitrary number of points added to the point set. The added points need not have integer coordinates.
Each test contains multiple test cases. The first line contains the number of test cases $t$ (1ドル \le t \le 10$). The description of the test cases follows.
Each test case consists of five lines, containing the following input.
For each test case, print the sum of distances of the minimum steiner tree of the given points on one line.
Your output will be accepted if the absolute or relative error does not exceed 10ドル^{-5}$.
2 -2 -1 -1 1 0 -1 1 1 2 -1 0 2 3 1 -3 1 -1 -2 1 -2
7.464101 11.332503
Camp > Osijek Competitive Programming Camp > Summer 2024 > Day 5: OCPC Potluck Contest 2 F번