Logo
(追記) (追記ここまで)

32313번 - Weekend Gardening 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB2410743.750%

문제

Your roommate is planning some weekend projects to make your yard look better. The plan is to buy some plants. Your roommate wants to spend at least L dollars and at most H dollars. There are three different types of plants: cheap, normal, and expensive. Unfortunately, you cannot tell the difference by just looking at a plant. You know that each type has a different cost, and you know how many of each type your local nursery has in stock.

Now you are spending your time walking through the nursery aisles, picking out a plant, bringing it over to be rung up by the clerk, and praying that you stay within your desired total cost (your allotted budget). If you are not within your desired total cost (i.e., if your total cost is too low or too high), your roommate will get frustrated.

Given the cost and number of each plant type along with your desired budget range, determine the probability that you can buy plants one at a time and staying within your total cost range.

입력

The first input line contains two integers: L and H (1 ≤ L ≤ H ≤ 109), representing the low and high end of the budget, respectively.

The second input line contains three integers: C, N, and E (1 ≤ C < N < E ≤ 109), representing the cost of the cheap, normal, and expensive plants, respectively.

The third input line contains three integers: c, n, and e (1 ≤ c, n, e ≤ 100), representing the number of cheap, normal, and expensive plants, respectively.

출력

Print the probability that you will successfully complete the purchase within the desired budget by choosing plants one at a time. Your answer will be accepted if it is within 10-6 of the correct answer.

제한

예제 입력 1

30 60
5 15 70
3 1 1

예제 출력 1

0.2

예제 입력 2

40 60
5 15 70
3 1 1

예제 출력 2

0.0

힌트

출처

University > University of Central Florida > 2024 Local Programming Contest (Qualifying Round) 9번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /