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
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.
Input Specification
Line 1 contains an integer
The following
Output Specification
The output should consist of a single integer — the number of distinct trap shapes that can be made with all
Sample Input
5
1 2
2 2
3 3
2 1
2 5
Sample Output
4
Explanation of Sample
The four ways that Flash can build the tachyon trap is as follows:
Comments
Can the polygon be self-intersecting?
Looks like the answer is no.
Yup, that's right.