Trokuti
의견: 0
\(5^{th}\) round, February \(15^{th}\), 2014
Authors: Adrian Satja Kurdija, Marin Tomić
You are given N lines, their equations being A_{i} \(x + B_{i}\)\(y + C_{i}= 0\) in the coordinate plane. Calculate the
number of triangles whose sides lie on the given lines. Since the result can be very large, output the
number modulo 1 000 000 007.
Important note: No three lines will intersect at the same point.
In test cases worth 40% of total points, N will be lesser than 1000.
The first line of input contains the integer N (\(1 \le N \le 300\,000\)), the number of lines.
Each of the following N lines contains three integers: A_{i}, B_{i} and C_{i}, the numbers defining the i^{th} line.
All numbers will be lesser than \(10^{9}\).
The first and only line of output must consist of the required number from the task.
A possible position of lines.
\(5^{th}\) round, February \(15^{th}\), 2014
Authors: Adrian Satja Kurdija, Marin Tomić
6
0 1 0
-5 3 0
-5 -2 25
0 1 -3
0 1 -2
-4 -5 29105
-5 3 0
-5 -3 -30
0 1 0
3 7 35
1 -2 -110Clarification of the first example: The example corresponds to the image in the task.
평가 및 의견
Trokuti
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Trokuti