QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 32 MB مجموع النقاط: 10

#11186. 钻石 [B]

الإحصائيات

Jack 是一名珠宝商。一颗体型巨大的精美钻石被运到了他的店里。有两位顾客都想买下它,因此 Jack 决定将这颗钻石切割成两块(质量不一定相等),并将每一块分别卖给其中一位顾客。

钻石非常坚硬,只能用带有金刚石刀片的锯子切割。切割过程既昂贵又缓慢,切割两毫米大约需要一个小时。Jack 只能负担得起沿单一平面进行一次切割。他得到的两块钻石都将卖给这两位顾客。

Jack 希望尽可能让他的顾客满意。由于两块钻石的总质量显然等于整颗钻石的质量,Jack 决定最大化这两块钻石的面数之和。他不知道该如何切割钻石,所以他向你寻求帮助。

输入格式

标准输入的第一行包含一个整数 $n$ ($4 \le n \le 80$),表示钻石的顶点数。接下来的 $n$ 行,每行包含三个整数 $x_{i}, y_{i}, z_{i}$ ($-360 \le x_{i}, y_{i}, z_{i} \le 360$),由空格分隔,表示钻石第 $i$ 个顶点的坐标。该钻石是包含所有给定顶点的最小凸多面体。这些点中没有点位于钻石内部,且没有四个顶点位于同一个平面上。

输出格式

标准输出仅包含一行,即通过一次切割得到的两块钻石的面数之和的最大值。

样例

输入 1

5
0 0 0
5 0 0
0 5 0
0 0 5
2 2 2

输出 1

14

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.