Mock CCO '19 Contest 1 Problem 6 - A Geometry Problem

View as PDF

Submit solution

Points: 15 (partial)
Time limit: 0.6s
Memory limit: 162M

Problem type

N lines are drawn in the xy-plane. List the lines which have a segment of positive length that is visible from y=+.

Constraints

1N5104

5105Ai,Bi5105

In test data worth 30% of marks, you may assume N5000.

The data guarantee that there are no two identical lines.

Input Specification

The first line contains a single positive integer, N.

Each of the next N lines contains two space-separated integers Ai and Bi, indicating that a line of the form y=Aix+Bi is drawn. These lines have IDs from 1 to N in input order.

Output Specification

Output on a single line, in increasing order, the IDs of the lines which are visible. The list should be space-separated.

Sample Input

Copy
3
1 0
-1 0
0 0

Sample Output

Copy
1 2

Comments

There are no comments at the moment.