{"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\"\u003eThere is a dice with n sides, which are numbered from 1,2,...,n and have the equal possibility to show up when one rolls a dice. Each side has an integer ai on it. Now here is a game that you can roll this dice once, if the i-th side is up, you will get ai yuan. What\u0027s more, some sids of this dice are colored with a special different color. If you turn this side up, you will get once more chance to roll the dice. When you roll the dice for the second time, you still have the opportunity to win money and rolling chance. Now you need to calculate the expectations of money that we get after playing the game once.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Input consists of multiple cases. Each case includes two lines.\u003cbr\u003eThe first line is an integer n (2\u0026lt;\u003dn\u0026lt;\u003d200), following with n integers a\u003csub\u003ei\u003c/sub\u003e(0\u0026lt;\u003da\u003csub\u003ei\u003c/sub\u003e\u0026lt;200)\u003cbr\u003eThe second line is an integer m (0\u0026lt;\u003dm\u0026lt;\u003dn), following with m integers b\u003csub\u003ei\u003c/sub\u003e(1\u0026lt;\u003db\u003csub\u003ei\u003c/sub\u003e\u0026lt;\u003dn), which are the numbers of the special sides to get another more chance."}},{"title":"Output","value":{"format":"HTML","content":"Just a real number which is the expectations of the money one can get, rounded to exact two digits. If you can get unlimited money, print inf.\u003cbr\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\u003e6 1 2 3 4 5 6\r\n0\r\n4 0 0 0 0\r\n1 3\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3.50\r\n0.00\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}