Author: | A. Baranov | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 512 Mb | |
Output file: | Standard output |
Let there be a set of triangles represented by 3-dimensional vertex coordinates.
You must determine all maximal subsets of triangles such that triangles of each set belong to a single plane.
Input contains integer N, followed by 9×N integers, representing vertex coordinates:
(X1i,Y1i,Z1i), (X2i,Y2i,Z2i), (X3i,Y3i,Z3i), where i=0,1,…,(N−1).
Output must contain the number of subsets M, followed by M records of the following structure.
The number of triangles present in the set, followed by their indices in input (indexing starts at 0).
Both sets and triangles may be output in arbitrary order.
It is guaranteed that there are no degenerate (zero area) triangles in input.
−1000≤(Xki,Yki,Zki)≤1000,
2≤N≤105.
No. | Standard input | Standard output |
---|---|---|
1 |
|
|