#P3775. [CTSC2017] 投影

    ID: 1482 远端评测题 1000~5000ms 125MiB 尝试: 0 已通过: 0 难度: 9 上传者: 标签>2017WC/CTSC/集训队Special JudgeO2优化

[CTSC2017] 投影

Output Format

For each test case in the file, output one number on a single line (its length should not exceed 30), representing the result.

Your answer will be considered correct if its relative error does not exceed 10710^{-7} compared to the reference answer.

You will receive points for a test file only if all test cases in that file are answered correctly.

2 1
0 0 0
1 1 0
0 1 0
1 0 0
-1 -1
0.70710678118655
4 2
0 0 0
0 1 1
1 0 1
1 1 0
0 0 1
0 1 0
1 0 0
1 1 1
-1 -1
0.73883404559321

Hint

  • For 30% of the testdata, k=1k = 1, n1000n \le 1000, and all points have z=0z = 0. At most one test case appears in a file.
  • For another 40% of the testdata, k=1k = 1, n1000n \le 1000, and all point coordinates are independently and uniformly generated in [1,1][-1, 1]. At most ten test cases appear in a file.
  • For the remaining 30% of the testdata, k=2k = 2, n20n \le 20, and all point coordinates are independently and uniformly generated in [1,1][-1, 1]. At most ten test cases appear in a file.
  • For 100% of the testdata, all coordinates lie in [1,1][-1, 1], and the answer is at least 0.010.01.

Translated by ChatGPT 5