2015 Mock CCC by Alex and Timothy
The Flash has just met his match at the hands of the Man in the Yellow Suit, a.k.a. the Reverse-Flash, and is chasing him fervently across Central City. Meanwhile, Cisco, Caitlin, and Dr. Wells are drawing up a plan back at S.T.A.R. Labs. They have concluded that Reverse-Flash uses a tachyonic device to corrupt the Speed Force which is responsible for the powers of the Flash and to generate his own negative Speed Force.
Team Flash has a plan to capture Reverse-Flash. They have identified ~N~ ~(3 \le N \le 10)~ two-dimensional points ~(x_1, y_1), (x_2, y_2), \dots, (x_N, y_N)~ in Central City where they believe the tachyonic field is weak. These points are numbered from ~1~ to ~N~ and the coordinates are all positive integers between ~1~ and ~10\,000~. In order to trap Reverse-Flash, Flash will have to run to all ~N~ points, one after the other in some order, and trace an anti-tachyonic barrier with a special device provided by Dr. Wells. In the end, the Flash's path should join the ~N~ points and form an ~N~-sided polygon to trap the Reverse-Flash inside, where his powers are rendered useless. Tachyon fields are very unstable relative to each other, so no three adjacent vertices in the tachyon trap will lie on the same line.
Because the Reverse-Flash is lightning fast and unpredictable, the Flash would like to know of as many ways to create the trap as possible in case Reverse-Flash changes course in their chase. Given the points in Central City where the tachyonic field is weak, S.T.A.R Labs needs your help in determining how many different traps that the Flash can set up to trap the Reverse-Flash.
Line 1 contains an integer ~N~, the number of points in Central City where the tachyonic field is weak.
The following ~N~ lines will each contain two space-separated integers ~x_i~ and ~y_i~, representing the vertices of the trap for ~i = 1 \dots N~.
The output should consist of a single integer — the number of distinct trap shapes that can be made with all ~N~ points.
5 1 2 2 2 3 3 2 1 2 5
Explanation of Sample
The four ways that Flash can build the tachyon trap is as follows: