atcoder#RELAY2E. White and Blue
White and Blue
Score : points
Problem Statement
Ringo Kingdom Congress is voting on a bill.
members are present, and the -th member has white ballots and blue ballots. Each member will put all the white ballots into the box if he/she is in favor of the bill, and put all the blue ballots into the box if he/she is not in favor of the bill. No other action is allowed. For example, a member must not forfeit voting, or put only a part of his/her white ballots or a part of his/her blue ballots into the box.
After all the members vote, if at least percent of the ballots in the box is white, the bill is passed; if less than percent of the ballots is white, the bill is rejected.
In order for the bill to pass, at least how many members must be in favor of it?
Constraints
- All input values are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum number of members in favor of the bill required for passage.
4 75
1 1
1 1
1 1
1 1
3
This is a "normal" vote, where each of the four members has one white ballot and one blue ballot. For the bill to pass, at least percent of the four, that is, at least three must be in favor of it.
4 75
1 1
1 1
1 1
100 1
1
The "yes" vote of the member with white ballots alone is enough to pass the bill.
5 60
6 3
5 9
3 4
7 8
4 7
3