Pro.ID21839 Titlessworld VS DDD Title链接http://10.20.2.8/oj/exercise/problem?problem_id=21839 AC0 Submit0 Ratio- 时间&空间限制描述One day, sssworld and DDD play games together, but there are some special rules in this games. They both have their own HP. Each round they dice respectively and get the points P1 and P2 ( 1 ≤ P1, P2 ≤ 6 ). Small number who, whose HP to reduce 1, the same points will remain unchanged. If one of them becomes 0 HP, he loses. As a result of technical differences between the two, each person has different probability of throwing 1, 2, 3, 4, 5, 6. So we couldn't predict who the final winner. 输入There are multiple test cases. For each case, the first line are two integer HP1, HP2 ( 1 ≤ HP1, HP2 ≤ 2000 ), said the first player sssworld's HP and the second player DDD's HP. The next two lines each have six floating-point numbers per line. The j-th number on the i-th line means the the probability of the i-th player gets point j. The input data ensures that the game always has an end. 输出Description One day, sssworld and DDD play games together, but there are some special rules in this games. They both have their own HP. Each round they dice respectively and get the points P1 and P2 ( 1 ≤ P1, P2 ≤ 6 ). Small number who, whose HP to reduce 1, the same points will remain unchanged. If one of them becomes 0 HP, he loses. As a result of technical differences between the two, each person has different probability of throwing 1, 2, 3, 4, 5, 6. So we couldn't predict who the final winner. Input There are multiple test cases. For each case, the first line are two integer HP1, HP2 ( 1 ≤ HP1, HP2 ≤ 2000 ), said the first player sssworld's HP and the second player DDD's HP. The next two lines each have six floating-point numbers per line. The j-th number on the i-th line means the the probability of the i-th player gets point j. The input data ensures that the game always has an end. Output One float with six digits after point, indicate the probability sssworld won the game. Sample Input 5 5 Sample Output 0.000000 Source 样例输入5 5 样例输出0.000000 作者 |