|
||||||||
Time Limit: 4.0 second Memory Limit: 64 000 KB There were N people to take part in the competition for a flower-garden design. Each of them had proposed his design, the finite sequence of points in plane which are the suggested locations for flowers. To save the main jury from needless labor of considering identical designs, the pre-jury wants to find the designs which only differ in rearrangement of points and their affine transformation that doesn't change the orientation (that is, the radius-vector of each point is multiplied by a positively defined matrix and translated by a fixed vector). InputThe first line of input contains the single number N. The N designs follow. Each design is represented as the length of the sequence M, followed by coordinates of points (M pairs of integers whose absolute value doesn't exceed 1000, each pair on a line by itself). The sum of all sequences' lengths doesn't exceed 200000. OutputThe first line of output must contain the number of different design classes. The following lines must list the classes as one-based indices of designs in the input file, terminated with zero. Sample Input7 5 1 2 0 0 6 0 0 4 2 7 5 1 2 3 9 0 1 2 3 9 2 5 -43 -37 -73 -47 -3 3 -23 -7 -3 63 3 0 0 1 0 0 1 3 0 0 1 0 3 0 3 10 3 3 7 5 2 3 6 1 6 5 6 7 Sample Output4 4 6 0 5 7 0 1 3 0 2 0 Problem Author: Andrew Rumyantsev Problem Source: Petrozavodsk summer training camp, August 2005. Print Statistic Discuss Submit |
||||||||
|