아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Friendship Circles

시간 제한2초메모리 제한512 MB

요약
n개의 점이 주어질 때, p0와 q를 내부에 포함하고 나머지 점은 모두 외부에 두는 원이 존재하는 q의 목록을 구해 정렬해 출력한다.
난이도

보통10점 중 7점

유형
기하, 정렬
정답자
아직 제출이 없습니다

문제

Let p_0,p_1,…,p_n−1p\_0, p\_1, \dots, p\_{n-1} be nn 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 n−2n-2 points in its exterior. Print the indices of the points that are friends with p_0p\_0.

It is guaranteed that there is no circumference containing p_0p\_0 and three or more other points. It is also guaranteed that there is no line containing p_0p\_0 and two or more other points.

입력

The first line contains an integer tt, the number of test cases (1≤t≤1041 \leq t \leq 10^4).

Each test case starts with a line containing an integer nn (2≤n≤1052 \leq n \leq 10^5), the number of points. It is followed by nn lines, each one containing two integers x_ix\_i and y_iy\_i (−109≤x_i,y_i≤109-10^{9} \leq x\_i, y\_i \leq 10^{9}): the coordinates of the ii-th point.

The tests are not explicitly targeting precision issues. In particular, it is guaranteed that, if we moved p_0p\_0 by a distance of at most 10−610^{-6} units in any direction, the answer would remain the same.

The total number of points in all test cases does not exceed 10510^5.

출력

For each test case, print a line containing one integer mm, the number of friends of p_0p\_0, followed by mm integers: the indices of the friends of p_0p\_0 in lexicographical order.

예제1

  1. 예제 1

    입력
    2
    4
    1 0
    3 1
    3 -2
    7 0
    5
    0 0
    -2 -1
    2 2
    -2 10
    -1 11
    
    예상 출력
    2 1 2
    3 1 2 3