#P4744. Tavas and Pashmaks

Tavas and Pashmaks

Tavas and Pashmaks

题面翻译

题目描述

现在有两个比赛项目:跑步和游泳.每一个人在这两个项目都有一个正整数的值,第i个人分别为ai,bia_i,b_i,表示他在这个项目上的速度. 我们假定游泳的距离为S1S_1,跑步的距离为S2S_2(都是正实数),知道每一个人的值,如果对于第i个人,存在这样子的S1S_1S2S_2使得S1/ai+S2/bi<=S1/aj+S2/bj(1<=j<=n)S_1/a_i+S_2/b_i<=S_1/a_j+S_2/b_j(1<=j<=n),那么就称这个人可以夺冠. 求出有多少个人可以夺冠.

输入输出格式

输入格式:

11行一个正整数nn,表示有nn个人. 第22~n+1n+1,每行有22个正整数分别表示每一个人在跑步和游泳上的速度.

输出格式:

一行,输出所有可以夺冠的人.

题目描述

Tavas is a cheerleader in the new sports competition named "Pashmaks".

This competition consists of two part: swimming and then running. People will immediately start running R R meters after they finished swimming exactly S S meters. A winner is a such person that nobody else finishes running before him/her (there may be more than one winner).

Before the match starts, Tavas knows that there are n n competitors registered for the match. Also, he knows that i i -th person's swimming speed is si s_{i} meters per second and his/her running speed is ri r_{i} meters per second. Unfortunately, he doesn't know the values of R R and S S , but he knows that they are real numbers greater than 0 0 .

As a cheerleader, Tavas wants to know who to cheer up. So, he wants to know all people that might win. We consider a competitor might win if and only if there are some values of R R and S S such that with these values, (s)he will be a winner.

Tavas isn't really familiar with programming, so he asked you to help him.

输入格式

The first line of input contains a single integer n n ( 1<=n<=2×105 1<=n<=2×10^{5} ).

The next n n lines contain the details of competitors. i i -th line contains two integers si s_{i} and ri r_{i} ( 1<=si,ri<=104 1<=s_{i},r_{i}<=10^{4} ).

输出格式

In the first and the only line of output, print a sequence of numbers of possible winners in increasing order.

样例 #1

样例输入 #1

3
1 3
2 2
3 1

样例输出 #1

1 2 3

样例 #2

样例输入 #2

3
1 2
1 1
2 1

样例输出 #2

1 3