Friendship Circles
시간 제한2초메모리 제한512 MB
n개의 점이 주어질 때, p0와 q를 내부에 포함하고 나머지 점은 모두 외부에 두는 원이 존재하는 q의 목록을 구해 정렬해 출력한다.
문제
Let be points in the plane. We say that two points are friends if one can draw a circle that contains both points in its interior and all the other points in its exterior. Print the indices of the points that are friends with .
It is guaranteed that there is no circumference containing and three or more other points. It is also guaranteed that there is no line containing and two or more other points.
입력
The first line contains an integer , the number of test cases ().
Each test case starts with a line containing an integer (), the number of points. It is followed by lines, each one containing two integers and (): the coordinates of the -th point.
The tests are not explicitly targeting precision issues. In particular, it is guaranteed that, if we moved by a distance of at most units in any direction, the answer would remain the same.
The total number of points in all test cases does not exceed .
출력
For each test case, print a line containing one integer , the number of friends of , followed by integers: the indices of the friends of in lexicographical order.