시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 0 | 0 | 0 | 0.000% |
You and your friends have invented an interesting game called “Trivial Points”. It’s played between 2 players and involves placing points in a 3D space in a special way respecting a certain set of rules. Being very excited about this game, you, together with your friends, have decided to create a computer version in which one of the players is a human and the other is computer.
For the purposes of the development of this game you are responsible to write a program that receives a set of points in a 3D space and computes how many different lines are there so that each contains at least 3 of the given points.
Input contains on the first line a single integer number n, which is the number of given points. Then n lines follow, each containing the 3 integer coordinates of a point, more specifically the i-th of these n lines contains the integer coordinates xi, yi, zi, separated by single spaces, of the i-th point.
Output will contain on the first line a single integer number that is the number of lines asked in problem’s statement.
7 1 0 -1 3 4 5 2 2 2 3 3 3 -5 -5 -5 1 1 1 -3 4 0
2
The first line contains points (-5; -5; -5), (1; 1; 1), (2; 2; 2), and (3; 3; 3), and the second line contains points (1; 0; -1), (2; 2; 2), (3; 4; 5).