C - Counting Self-Rotating Subsets
Languages: C, C++, Java, Pascal, Python, Tiger, JavaScript, Haskell, C#
Time & Memory limits:
(details)
A set of points in the plane is self-rotating if there is a point $P$, the center, and an angle $\alpha$, expressed in degrees, where $0 < \alpha < 360$, such that the rotation of the plane, with center $P$ and angle $\alpha$, maps every point in the set to some point also in the set.
You are given a set of $N$ distinct points, all having integer coordinates. Find the number of distinct subsets of size $1, 2, \ldots, N$ that are self-rotating. Two subsets are considered distinct if one contains a point that the other does not contain.
Output
Output a single line containing $N$ integers $S_1, S_2, \ldots, S_N$. For $i=1,2,\ldots,N$ the integer $S_i$ must be the number of subsets of $i$ points of the input set that are self-rotating. Since these numbers can be very big, output them modulo $10^9 + 7$.