#P6237. [CEOI 2012] Printed Circuit Board
[CEOI 2012] Printed Circuit Board
Description
You are given a simple polygon with vertices. For each vertex, if the line segment connecting it to the origin intersects the polygon only at this vertex, then this vertex is considered valid. Your task is to output the indices of all valid vertices.

Input Format
The first line contains a positive integer .
The next lines each contain two positive integers not exceeding , giving the coordinates of each vertex in order. The vertices are numbered in the input order, and they are guaranteed to be given in either clockwise or counterclockwise order.
Output Format
The first line contains a positive integer , the number of valid vertices.
The second line contains positive integers, in increasing order, giving the indices of the valid vertices.
11
7 6
4 4
3 2
1 3
9 9
13 4
8 1
6 4
9 5
8 3
11 5
3
3 4 7
Hint
Constraints: for of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号