Submit solution
Points:
7 (partial)
Time limit:
2.5s
Java
4.0s
PyPy 2
4.0s
PyPy 3
4.0s
Memory limit:
256M
Author:
Problem types
Rain loves triangles, especially equilateral ones. Thus, Rain has
The Euclidean distance between points
Constraints
The points are pairwise-distinct.
Subtask 1 [80%]
Subtask 2 [20%]
No additional constraints.
Input Specification
The first line contains two integers
The next
Output Specification
Output the number of equilateral triangles where each vertex is a given point.
Sample Input
Copy
4 3
0 0 1
1 0 0
0 1 0
0 1 1
Sample Output
Copy
1
Explanation for Sample
Only the first
Comments