{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eTongjiang wanna go back to UESTC from Xipu. He had arrived Xipu bus station at $(T\u003d0)$.He would like take a bus or walk, for details, it takes $A$ minutes to take a bus while $B$ minutes to walk($A\u0026lt;B$ will be hold).There are $N$ bus lines all can take Tongjiang to UESTC, But as it was getting late,some bus lines may had already stopped running. Properly speaking, the bus line have a probability of $(1-\\frac{L_i}{M})$ that it had already stopped running and no more bus will come to Xipu station, and a probability of $(\\frac{L_i}{M}$) that there will be a bus come to Xipu station to take Tongjiang to UESTC. And in the second case the bus may arrive at bus station at any time $T$, which holds $(0 \\leq T \\leq Li)$, with equal probability. Tongjiang is a smart boy, he had $Q$ different strategy to wait bus. Under strategy $i$ He would set a latest time point $T_i$ first. Then he started waiting for bus and take the first bus come to station who can take him to school or when time come to $(T\u003dT_i)$ and still no bus come, he would start walk to school.$\\\\$\u003cbr\u003eNow, Tongjiang wonders under each strategy, what\u0027s the expect time he arrive at school.\u003cbr\u003e\u003cbr\u003eFor all bus line $i$, $( \\frac{1}{3} M \\leq L_i \\leq \\frac{2}{3} M )$\u003cbr\u003e\u003cbr\u003eFor all strategy $i$, $( Min(L_1,L_2...L_N) \\leq T_i \\leq Max(L_1,L_2...L_N) )$\u003cbr\u003e\u003cbr\u003e$(6 \\leq M \\leq 100000)$\u003cbr\u003e\u003cbr\u003e$(1 \\leq A,B\\leq 100000)$\u003cbr\u003e\u003cbr\u003e$(2 \\leq N \\leq 12)$\u003cbr\u003e\u003cbr\u003e$(1 \\leq Q \\leq 100000 )$\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"First line five positive integer $N,Q,M,A$ and $B$.\u003cbr\u003eSecond line N positive integer $(L_1,L_2...L_N)$\u003cbr\u003eThen $Q$ lines following,each line contains one integer means a latest time point $T_i$."}},{"title":"Output","value":{"format":"HTML","content":"For each strategy,print one line with you answer.\u003cbr\u003eYour answer will be considered to be right if\u003cbr\u003e$\\min{\\left\\{\\left|yourans-stdans\\right|, \\left|\\frac{yourans-stdans}{stdans}\\right|\\right\\}} \u0026lt; 10^{-4}$\u003cbr\u003e \u003cbr\u003e$(min(abs(yourans-stdans),abs(\\frac{yourans-stdans}{stdans})\u0026lt;1e-4)$."}},{"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\u003e2 2 6 1 2\r\n2 4\r\n2\r\n3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2.851852\r\n3.129630\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}