AT_scpc2026_div1_e.I Wanna be The Prism

入门

通过率:0%

时间限制:1.00s

内存限制:1024MB

AC君温馨提醒

该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

You are given NN points in three-dimensional space. The coordinates of the ii-th point are (xi,yi,zi)(x_i, y_i, z_i).

A sungjae0506 is a triangular prism that contains all the given points on its boundary or in its interior, has bases perpendicular to the zz-axis, and has lateral faces perpendicular to the xyxy-plane.

Among all possible sungjae0506s, find the volume of the sungjae0506 that minimizes volumesurface area\frac{\text{volume}}{\text{surface area}}.

给你三维空间中的 NN 个点。第 ii 个点的坐标为 (xi,yi,zi)(x_i, y_i, z_i)。

一个 sungjae0506 是一个三棱柱,满足以下条件:

  • 包含所有给定点(在边界上或内部);
  • 两个底面垂直于 zz-轴;
  • 三个侧面垂直于 xyxy-平面。

在所有可能的 sungjae0506 中,求使比值 体积表面积\frac{\text{体积}}{\text{表面积}} 最小的那个 sungjae0506 的体积。

输入格式

The input is given from Standard Input in the following format:

NN
x1x_1 y1y_1 z1z_1
x2x_2 y2y_2 z2z_2
⋮\vdots
xNx_N yNy_N zNz_N

输入从标准输入中按以下格式给出:

NN
x1x_1 y1y_1 z1z_1
x2x_2 y2y_2 z2z_2
⋮\vdots
xNx_N yNy_N zNz_N

输出格式

Print the volume of the sungjae0506 that minimizes volumesurface area\frac{\text{volume}}{\text{surface area}} among all possible sungjae0506s. An absolute or relative error of at most 10−910^{-9} is accepted.

输出使 体积表面积\frac{\text{体积}}{\text{表面积}} 最小的所有 sungjae0506 中的体积。允许的绝对或相对误差不超过 10−910^{-9}。

输入输出样例

  • 输入#1

    6
    88 848 44
    -159 810 8
    45 522 -21
    163 793 -27
    -143 706 -106
    201 546 -71

    输出#1

    15570000.000000000000000

说明/提示

表示言語

/ /

Constraints

  • 3≤N≤100 0003 \leq N \leq 100\,000
  • −108≤xi,yi,zi≤108-10^8 \leq x_i, y_i, z_i \leq 10^8
  • All input values are integers.
  • Let DD be the distance between the farthest pair among the given NN points. Only cases are given in which, even if each given point is moved to an arbitrary position within distance 10−6D10^{-6}D from its original position, the sungjae0506 minimizing volumesurface area\frac{\text{volume}}{\text{surface area}} exists uniquely.

表示语言

/ /

约束条件

  • 3≤N≤100 0003 \leq N \leq 100\,000
  • −108≤xi,yi,zi≤108-10^8 \leq x_i, y_i, z_i \leq 10^8
  • 所有输入值均为整数。
  • 设 DD 为给定的 NN 个点中距离最远的一对点之间的距离。仅考虑如下情形:即使将每个给定点在其原始位置周围半径为 10−6D10^{-6}D 的范围内任意移动,使得 体积表面积\frac{\text{体积}}{\text{表面积}} 最小化的 sungjae0506 仍唯一存在。

输入解题思路,AI测评打分。不知道怎么写?

首页