QOJ.ac

QOJ

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

#16587. 点

الإحصائيات

你和你的朋友们发明了一款名为 “Trivial Points” 的有趣游戏。该游戏由两名玩家进行,涉及按照特定规则在三维空间中以特殊方式放置点。由于对这款游戏非常兴奋,你和你的朋友们决定制作一个电脑版本,其中一名玩家是人类,另一名是电脑。

为了开发这款游戏,你需要编写一个程序,该程序接收三维空间中的一组点,并计算有多少条不同的直线,使得每条直线都至少包含给定的点中的 $3$ 个。

输入格式

第一行包含一个整数 $n$,表示给定的点数。

接下来的 $n$ 行,每行包含一个点的 $3$ 个整数坐标。具体来说,这 $n$ 行中的第 $i$ 行包含第 $i$ 个点的整数坐标 $x_i, y_i, z_i$,它们之间用单个空格分隔。

输出格式

输出一行,包含一个整数,表示满足题目要求的直线数量。

样例

输入样例 1

7
1 0 -1
3 4 5
2 2 2
3 3 3
-5 -5 -5
1 1 1
-3 4 0

输出样例 1

2

说明

第一条直线包含点 $(-5, -5, -5)$、$(1, 1, 1)$、$(2, 2, 2)$ 和 $(3, 3, 3)$;第二条直线包含点 $(1, 0, -1)$、$(2, 2, 2)$ 和 $(3, 4, 5)$。

数据范围

  • $4 \le n \le 1000$
  • 坐标 $x_i, y_i, z_i$ 为整数,且 $-10\,000 \le x_i, y_i, z_i \le 10\,000$(对于 $i = 1, 2, 3, \dots, n$)。

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.