{"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\"\u003eA murder happened in the hotel. As the best detective in the town, you should examine all the N rooms of the hotel immediately. However, all the doors of the rooms are locked, and the keys are just locked in the rooms, what a trap! You know that there is exactly one key in each room, and all the possible distributions are of equal possibility. For example, if N \u003d 3, there are 6 possible distributions, the possibility of each is 1/6. For convenience, we number the rooms from 1 to N, and the key for Room 1 is numbered Key 1, the key for Room 2 is Key 2, etc.\u003cbr\u003eTo examine all the rooms, you have to destroy some doors by force. But you don’t want to destroy too many, so you take the following strategy: At first, you have no keys in hand, so you randomly destroy a locked door, get into the room, examine it and fetch the key in it. Then maybe you can open another room with the new key, examine it and get the second key. Repeat this until you can’t open any new rooms. If there are still rooms un-examined, you have to randomly pick another unopened door to destroy by force, then repeat the procedure above, until all the rooms are examined.\u003cbr\u003eNow you are only allowed to destroy at most K doors by force. What’s more, there lives a Very Important Person in Room 1. You are not allowed to destroy the doors of Room 1, that is, the only way to examine Room 1 is opening it with the corresponding key. You want to know what is the possibility of that you can examine all the rooms finally.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of the input contains an integer T (T ≤ 200), indicating the number of test cases. Then T cases follow. Each case contains a line with two numbers N and K. (1 \u0026lt; N ≤ 20, 1 ≤ K \u0026lt; N)"}},{"title":"Output","value":{"format":"HTML","content":"Output one line for each case, indicating the corresponding possibility. Four digits after decimal point are preserved by rounding."}},{"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\u003e3\r\n3 1\r\n3 2\r\n4 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0.3333\r\n0.6667\r\n0.6250\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cbr\u003eSample Explanation\u003cbr\u003e\u003cbr\u003eWhen N \u003d 3, there are 6 possible distributions of keys:\u003cbr\u003e\u003cbr\u003e\u0026nbsp;\u0026nbsp;Room 1\u0026nbsp;\u0026nbsp;Room 2\u0026nbsp;\u0026nbsp;Room 3\u0026nbsp;\u0026nbsp;Destroy Times\u003cbr\u003e#1\u0026nbsp;\u0026nbsp;Key 1\u0026nbsp;\u0026nbsp;Key 2\u0026nbsp;\u0026nbsp;Key 3\u0026nbsp;\u0026nbsp;Impossible\u003cbr\u003e#2\u0026nbsp;\u0026nbsp;Key 1\u0026nbsp;\u0026nbsp;Key 3\u0026nbsp;\u0026nbsp;Key 2\u0026nbsp;\u0026nbsp;Impossible\u003cbr\u003e#3\u0026nbsp;\u0026nbsp;Key 2\u0026nbsp;\u0026nbsp;Key 1\u0026nbsp;\u0026nbsp;Key 3\u0026nbsp;\u0026nbsp;Two\u003cbr\u003e#4\u0026nbsp;\u0026nbsp;Key 3\u0026nbsp;\u0026nbsp;Key 2\u0026nbsp;\u0026nbsp;Key 1\u0026nbsp;\u0026nbsp;Two\u003cbr\u003e#5\u0026nbsp;\u0026nbsp;Key 2\u0026nbsp;\u0026nbsp;Key 3\u0026nbsp;\u0026nbsp;Key 1\u0026nbsp;\u0026nbsp;One\u003cbr\u003e#6\u0026nbsp;\u0026nbsp;Key 3\u0026nbsp;\u0026nbsp;Key 1\u0026nbsp;\u0026nbsp;Key 2\u0026nbsp;\u0026nbsp;One\u003cbr\u003e\u003cbr\u003eIn the first two distributions, because Key 1 is locked in Room 1 itself and you can’t destroy Room 1, it is impossible to open Room 1. \u003cbr\u003eIn the third and forth distributions, you have to destroy Room 2 and 3 both. In the last two distributions, you only need to destroy one of Room 2 or Room \u003cbr\u003e"}}]}