100 atcoder#ABC189B. [ABC189B] Alcoholic
[ABC189B] Alcoholic
Score : points
Problem Statement
Takahashi had glasses of liquor.
The amount and alcohol percentage of the -th liquor were milliliters and percent by volume, respectively.
Takahashi gets drunk when his alcohol intake exceeds milliliters.
Which of the liquors was he drinking when he gets drunk? If he was not drunk even after drinking all the liquors, print -1
instead.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
If Takahashi got drunk when drinking the -th liquor, print . If he was not drunk even after drinking all the liquors, print -1
instead.
2 15
200 5
350 3
2
The -st liquor contains milliliters of alcohol.
The -nd liquor contains milliliters of alcohol.
His alcohol intake exceeds milliliters for the first time when drinking the -nd liquor.
2 10
200 5
350 3
2
When his alcohol intake is exactly milliliters, he is still not drunk.
3 1000000
1000 100
1000 100
1000 100
-1
He seems to be immune to alcohol.