|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|5 초||512 MB||87||31||24||50.000%|
You are holding a party. In preparation, you are making a drink by mixing together three different types of fruit juice: Apple, Banana, and Carrot. Let's name the juices A, B and C.
You want to decide what fraction of the drink should be made from each type of juice, in such a way that the maximum possible number of people attending the party like it.
Each person has a minimum fraction of each of the 3 juices they would like to have in the drink. They will only like the drink if the fraction of each of the 3 juices in the drink is greater or equal to their minimum fraction for that juice.
Determine the maximum number of people that you can satisfy.
For each test case, there will be:
3 3 10000 0 0 0 10000 0 0 0 10000 3 5000 0 0 0 2000 0 0 0 4000 5 0 1250 0 3000 0 3000 1000 1000 1000 2000 1000 2000 1000 3000 2000
Case #1: 1 Case #2: 2 Case #3: 5
In the first case, for each juice, we have one person that wants the drink to be made entirely out of that juice! Clearly we can only satisfy one of them.
In the second case, we can satisfy any two of the three preferences.
In the third case, all five people will like the drink if we make it using equal thirds of each juice.