{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eSo we got bored and decided to take our own guess at how would \"Inception\" production go if the budget for the film had been terribly low.\u003c/p\u003e\u003cp\u003eThe first scene we remembered was the one that features the whole city bending onto itself:\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/1da98ec87492790e67085d9294d34786?v\u003d1714609696\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/center\u003e\u003cp\u003eIt feels like it will require high CGI expenses, doesn\u0027t it? Luckily, we came up with a similar-looking scene which was a tiny bit cheaper to make.\u003c/p\u003e\u003cp\u003eFirstly, forget about 3D, that\u0027s hard and expensive! The city is now represented as a number line (\u003cspan class\u003d\"tex-font-style-it\"\u003einfinite to make it easier, of course\u003c/span\u003e).\u003c/p\u003e\u003cp\u003eSecondly, the city doesn\u0027t have to look natural at all. There are $$$n$$$ buildings on the line. Each building is a square $$$1 \\times 1$$$. \u003cspan class\u003d\"tex-font-style-bf\"\u003eBuildings are numbered from $$$1$$$ to $$$n$$$ in ascending order of their positions.\u003c/span\u003e Lower corners of building $$$i$$$ are at integer points $$$a_i$$$ and $$$a_i + 1$$$ of the number line. Also the distance between any two neighbouring buildings $$$i$$$ and $$$i + 1$$$ doesn\u0027t exceed $$$d$$$ (\u003cspan class\u003d\"tex-font-style-it\"\u003ereally, this condition is here just to make the city look not that sparse\u003c/span\u003e). Distance between some neighbouring buildings $$$i$$$ and $$$i + 1$$$ is calculated from the lower right corner of building $$$i$$$ to the lower left corner of building $$$i + 1$$$.\u003c/p\u003e\u003cp\u003eFinally, curvature of the bend is also really hard to simulate! Let the bend at some integer coordinate $$$x$$$ be performed with the following algorithm. Take the ray from $$$x$$$ to $$$+\\infty$$$ and all the buildings which are on this ray and start turning the ray and the buildings counter-clockwise around point $$$x$$$. At some angle some building will touch either another building or a part of the line. You have to stop bending there (\u003cspan class\u003d\"tex-font-style-it\"\u003eimplementing buildings crushing is also not worth its money\u003c/span\u003e). \u003c/p\u003e\u003cp\u003e\u003cspan class\u003d\"tex-font-style-bf\"\u003eLet\u0027s call the angle between two rays in the final state the terminal angle $$$\\alpha_x$$$.\u003c/span\u003e\u003c/p\u003e\u003cp\u003eThe only thing left is to decide what integer point $$$x$$$ is the best to start bending around. Fortunately, we\u0027ve already chosen $$$m$$$ candidates to perform the bending.\u003c/p\u003e\u003cp\u003eSo, can you please help us to calculate terminal angle $$$\\alpha_x$$$ for each bend $$$x$$$ from our list of candidates?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line contains two integer numbers $$$n$$$ and $$$d$$$ ($$$1 \\le n \\le 2 \\cdot 10^5$$$, $$$0 \\le d \\le 7000$$$) — the number of buildings and the maximum distance between any pair of neighbouring buildings, respectively.\u003c/p\u003e\u003cp\u003eThe second line contains $$$n$$$ integers $$$a_1, a_2, \\dots, a_n$$$ ($$$a_1 \u003d 0$$$, $$$0 \u0026lt; a_{i + 1} - a_i \\le d + 1$$$) — coordinates of left corners of corresponding buildings in ascending order.\u003c/p\u003e\u003cp\u003eThe third line contains single integer $$$m$$$ ($$$1 \\le m \\le 2 \\cdot 10^5$$$) — the number of candidates.\u003c/p\u003e\u003cp\u003eThe fourth line contains $$$m$$$ integers $$$x_1, x_2, \\dots, x_m$$$ ($$$0 \\le x_i \\le a_n + 1$$$, $$$x_i \u0026lt; x_{i + 1}$$$) — the coordinates of bends you need to calculate terminal angles for in ascending order.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003ePrint $$$m$$$ numbers. For each bend $$$x_i$$$ print terminal angle $$$\\alpha_{x_i}$$$ (in radians).\u003c/p\u003e\u003cp\u003eYour answer is considered correct if its absolute error does not exceed $$$10^{-9}$$$.\u003c/p\u003e\u003cp\u003eFormally, let your answer be $$$a$$$, and the jury\u0027s answer be $$$b$$$. Your answer is accepted if and only if $$$|a - b| \\le 10^{-9}$$$.\u003c/p\u003e"}},{"title":"Examples","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\u003e3 5\n0 5 7\n9\n0 1 2 3 4 5 6 7 8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.570796326794897\n1.570796326794897\n0.785398163397448\n0.927295218001612\n0.785398163397448\n1.570796326794897\n1.570796326794897\n1.570796326794897\n1.570796326794897\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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 7\n0 4\n3\n1 3 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.570796326794897\n0.927295218001612\n1.570796326794897\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","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\u003e5 0\n0 1 2 3 4\n6\n0 1 2 3 4 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1.570796326794897\n3.141592653589793\n3.141592653589793\n3.141592653589793\n3.141592653589793\n1.570796326794897\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eHere you can see the picture of the city for the first example and the bend at position $$$2$$$ for it. The angle you need to measure is marked blue. You can see that it\u0027s equal to $$$\\frac \\pi 4$$$.\u003c/p\u003e\u003cp\u003eYou can see that no pair of neighbouring buildings have distance more than $$$4$$$ between them. $$$d \u003d 4$$$ would also suffice for that test.\u003c/p\u003e\u003ccenter\u003e \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/2e042a5d41c69b9970fb1952e715eea3?v\u003d1714609696\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/center\u003e"}}]}