In one of the Squid Game challenges, players are tasked with positioning themselves within a circular arena. The challenge is to find the number of groups of four players that can stand on the same perfect circle within the arena, such that all four points lie on the circumference of the circle. The players are scattered randomly in the arena, and your task is to calculate how many such quadrilaterals can be formed.
You are given $$$n$$$ points in a 2D plane. Each point is represented by its coordinates ($$$x_{i},y_{i}$$$) for $$$1 \leq i \leq n$$$. You are tasked with finding the number of sets of four points that lie on the same circle.
A single integer $$$n$$$ ($$$4 \leq n \leq 300$$$) representing the number of points in the plane.
The next $$$n$$$ lines contain two integers $$$x$$$ and $$$y$$$ representing the coordinates of each point($$$-1000 \leq x,y \leq 1000$$$).
A single integer, the number of distinct quadrilaterals formed by four points that lie on the same circle.
80 10 21 02 03 13 21 32 3
70
50 01 10 2-1 10 1
1
50 01 1-1 -11 -2-2 1
0
In the first test, every point is included in the same circle, so the answer is choose $$$4$$$ out of $$$8$$$, which is $$$70$$$.
test $$$1$$$. In the second test, only one quadruple of points is in the same circle, so the answer is $$$1$$$.
test $$$2$$$.