SOLVE
LATER
Alice and Bob are playing a game on a set of points in the 2 dimensional plane.
Initially, there are N points.
In the beginning, 3 points are chosen as starting points to make the initial triangle of the game. These three points must not be collinear, and all points that lie on the boundary of the triangle or outside this triangle are erased.
Alice and Bob then play a game on this initial triangle and remaining points with Alice going first.
On a player's turn, the player first chooses a triangle(say \(\Delta ABC\)) which is still in the game and has at least one point strictly inside.
Then the player chooses any point P strictly inside the \(\Delta ABC\).
\(\Delta ABC\) is now removed from the game.
The move introduces 3 new smaller triangles \(\Delta ABP\), \(\Delta APC\) and \(\Delta PBC\) into the game.
The game continues on the remaining points and triangles.
The loser of the game is the one who is unable to move on their turn.
Given the set of points, compute the number of initial three points such that Alice wins if both players play optimally. Two initial sets of points are different if the unordered sets of the points are different.
The first line will contain the number of test cases T.
Each test case will be formatted as follows.
The first line will contain a single integer N.
The next N lines will describe two integers \(x_i, y_i\) denoting the coordinates of a point in the 2 dimensional plane.
Output T numbers, the number of initial configurations that lead to a win for Alice.
For all subtasks:
\(T ≤ 100\)
\(0 ≤ x_i,y_i ≤ 10^9\)
\(3 ≤ N\)
File 1 (60 pts)
\(N ≤ 7\)
File 2 (40 pts)
\(N ≤ 30\)
This is a picture of the first sample. The initial triangles that will lead to Alice's win are \(ABE\), \(ACE\), \(ADE\), \(AEG\), \(BCE\), \(CDE\), \(CEF\).
For the game that starts with the triangle \(ACE\), one possible game play looks like this:
The initial triangle is chosen, and invalid points are erased.
Alice chooses point D.
Bob chooses point F.
Alice chooses point G.
At this point, Bob has no available moves, so Bob loses.