MCOCIR - Cocircular Points
You probably know what a set of collinear points is: a set of points such that there exists a straight line that passes through all of them. A set of cocircular points is deﬁned in the same fashion, but instead of a straight line, we ask that there is a circle such that every point of the set lies over its perimeter.
The International Collinear Points Centre (ICPC) has assigned you the following task: given a set of points, calculate the size of the larger subset of cocircular points.
Each test case is given using several lines. The ﬁrst line contains an integer N representing the number of points in the set (1 ≤ N ≤ 100). Each of the next N lines contains two integers X and Y representing the coordinates of a point of the set (−10^4 ≤ X, Y ≤ 10^4 ). Within each test case, no two points have the same location.
The last test case is followed by a line containing one zero.
For each test case output a single line with a single integer representing the number of points in one of the largest subsets of the input that are cocircular.
Output for the sample input
My solution has time complexity O(n^3logn).
Can O(N^4) get AC?
Mahesh Chandra Sharma:
What is the time limit for C++?
Problem corrected fellows. :)
.:: Pratik ::.:
Fortune cookie is correct, can this be corrected?
It seems that the judge input terminates with n=0 or EOF (no zero).