AT_scpc2026_div1_e.I Wanna be The Prism
入门
通过率:0%
时间限制:1.00s
内存限制:1024MB
AC君温馨提醒
该题目为【atcoder】题库的题目,您提交的代码将被提交至atcoder进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given N points in three-dimensional space. The coordinates of the i-th point are (xi,yi,zi).
A sungjae0506 is a triangular prism that contains all the given points on its boundary or in its interior, has bases perpendicular to the z-axis, and has lateral faces perpendicular to the xy-plane.
Among all possible sungjae0506s, find the volume of the sungjae0506 that minimizes surface areavolume.
给你三维空间中的 N 个点。第 i 个点的坐标为 (xi,yi,zi)。
一个 sungjae0506 是一个三棱柱,满足以下条件:
- 包含所有给定点(在边界上或内部);
- 两个底面垂直于 z-轴;
- 三个侧面垂直于 xy-平面。
在所有可能的 sungjae0506 中,求使比值 表面积体积 最小的那个 sungjae0506 的体积。
输入格式
The input is given from Standard Input in the following format:
N
x1 y1 z1
x2 y2 z2
⋮
xN yN zN
输入从标准输入中按以下格式给出:
N
x1 y1 z1
x2 y2 z2
⋮
xN yN zN
输出格式
Print the volume of the sungjae0506 that minimizes surface areavolume among all possible sungjae0506s. An absolute or relative error of at most 10−9 is accepted.
输出使 表面积体积 最小的所有 sungjae0506 中的体积。允许的绝对或相对误差不超过 10−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≤100000
- −108≤xi,yi,zi≤108
- All input values are integers.
- Let D be the distance between the farthest pair among the given N points. Only cases are given in which, even if each given point is moved to an arbitrary position within distance 10−6D from its original position, the sungjae0506 minimizing surface areavolume exists uniquely.
表示语言
/ /
约束条件
- 3≤N≤100000
- −108≤xi,yi,zi≤108
- 所有输入值均为整数。
- 设 D 为给定的 N 个点中距离最远的一对点之间的距离。仅考虑如下情形:即使将每个给定点在其原始位置周围半径为 10−6D 的范围内任意移动,使得 表面积体积 最小化的 sungjae0506 仍唯一存在。
输入解题思路,AI测评打分。不知道怎么写?