Author: | A. Baranov | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 256 Mb | |
Output file: | Standard output |
Let's consider a configuration of n lines on a plane. The task is to count the maximum number of triangle cells formed as a result of subdivison plane by these lines.
The input begins with a natural number n, followed by exactly n lines. Each line is defined by a pair of distinct points: (Axi, Ayi), (Bxi, Byi).
The output should contain the number of triangles obtained.
It is guaranteed that no two lines coincide.
All input values are integers.
− 104 ≤ (Axi, Ayi, Bxi, Byi) ≤ 104, 3 ≤ n ≤ 300
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|