QOJ.ac

QOJ

حد الوقت: 1.0 s حد الذاكرة: 512 MB مجموع النقاط: 100 قابلة للهجوم ✓

#10889. 立方体

الإحصائيات

给定三维空间中的八个点,请判断它们是否能构成一个立方体。 立方体是一个正六面体,由六个正方形面围成,每个顶点处有三个面相交。

输入格式

第一行包含一个整数 $T$ ($1 \le T \le 100$),表示测试用例的数量。 对于每个测试用例,接下来的八行每行包含三个整数 $x, y, z$ ($-100 \le x, y, z \le 100$),分别表示这八个点的坐标。

输出格式

对于每个测试用例,如果这些点能构成一个立方体,则输出一行 “YES”,否则输出 “NO”。

样例

输入 1

3
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
-4 -6 -2
5 9 10
12 -11 11
-9 4 8
-2 -16 9
7 -1 21
-7 -6 19
10 -1 0
0 0 0
2 2 1
0 0 1
0 2 0
2 0 0
0 2 1
2 0 1
2 2 0

输出 1

NO
YES
NO

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.