Points
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 discrete points in a 3D space and computes how many different lines are there so that each contains at least 3 of the given points.
InputThe first line contains a single integer number n (4<=n<=1000), 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 (-10000<=xi,yi,zi<=10000), separated by single spaces, of the i-th point.
OutputThe first line of the output will contain a single integer number that is the number of lines asked in problem’s statement.
Input:
Output:
7
1 0 -1
3 4 5
2 2 2
3 3 3
-5 -5 -5
1 1 1
-3 4 0Output:
2Comment: 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).
Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.