{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv\u003eYYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy\u0027s base. After overcoming a series difficulties, YYF is now at the start of enemy\u0027s famous \"mine road\". This is a very long road, on which there are numbers of mines. At first, YYF is at step one. For each step after that, YYF will walk one step with a probability of \u003ci\u003ep\u003c/i\u003e, or jump two step with a probality of 1-\u003ci\u003ep\u003c/i\u003e. Here is the task, given the place of each mine, please calculate the probality that YYF can go through the \"mine road\" safely. \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv\u003eThe input contains many test cases ended with \u003cb\u003eEOF\u003c/b\u003e.\u003cbr\u003eEach test case contains two lines.\u003cbr\u003eThe First line of each test case is \u003ci\u003eN\u003c/i\u003e (1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 10) and \u003ci\u003ep\u003c/i\u003e (0.25 ≤ \u003ci\u003ep\u003c/i\u003e ≤ 0.75) seperated by a single blank, standing for the number of mines and the probability to walk one step.\u003cbr\u003eThe Second line of each test case is N integer standing for the place of N mines. Each integer is in the range of [1, 100000000]. \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv\u003eFor each test case, output the probabilty in a single line with the precision to 7 digits after the decimal point. \u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1 0.5\r\n2\r\n2 0.5\r\n2 4\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0.5000000\r\n0.2500000\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}