{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003clink href\u003d\"css/light_oj.css\" rel\u003d\"stylesheet\" type\u003d\"text/css\" /\u003e\r\n\u003cp class\u003d\"MsoNormal\"\u003e\r\n\tA rook is a piece used in the game of chess which is played on a board of square grids. A rook can only move vertically or horizontally from its current position and two rooks attack each other if one is on the path of the other. In the following figure, the dark squares represent the reachable locations for rook \u003cb\u003eR\u003csub\u003e1\u003c/sub\u003e\u003c/b\u003e from its current position. The figure also shows that the rook \u003cb\u003eR\u003csub\u003e1\u003c/sub\u003e\u003c/b\u003e and \u003cb\u003eR\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e are in attacking positions where \u003cb\u003eR\u003csub\u003e1\u003c/sub\u003e\u003c/b\u003e and \u003cb\u003eR\u003csub\u003e3\u003c/sub\u003e\u003c/b\u003e are not. \u003cb\u003eR\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e and \u003cb\u003eR\u003csub\u003e3\u003c/sub\u003e\u003c/b\u003e are also in non-attacking positions.\u003c/p\u003e\r\n\u003cp align\u003d\"center\" class\u003d\"MsoNormal\" style\u003d\"text-align:center\"\u003e\r\n\t\u003cimg src\u003d\"http://oi40.tinypic.com/r20rgy.jpg\" /\u003e\u003c/p\u003e\r\n\u003cp class\u003d\"MsoNormal\"\u003e\r\n\tNow, given two numbers \u003cb\u003en\u003c/b\u003e and \u003cb\u003ek\u003c/b\u003e, your job is to determine the number of ways one can put \u003cb\u003ek\u003c/b\u003e rooks on an \u003cb\u003en x n\u003c/b\u003e chessboard so that no two of them are in attacking positions.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp class\u003d\"MsoNormal\"\u003e\r\n\tInput starts with an integer \u003cb\u003eT (\u003c/b\u003e\u003cb\u003e\u0026le; 350)\u003c/b\u003e, denoting the number of test cases.\u003c/p\u003e\r\n\u003cp class\u003d\"MsoNormal\"\u003e\r\n\tEach case contains two integers \u003cb\u003en (1 \u0026le; n \u0026le; 30)\u003c/b\u003e and \u003cb\u003ek (0 \u0026le; k \u0026le; \u003cspan data-scayt_word\u003d\"n2\" data-scaytid\u003d\"2\"\u003en\u003csup\u003e2\u003c/sup\u003e\u003c/span\u003e)\u003c/b\u003e.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp class\u003d\"MsoNormal\"\u003e\r\n\tFor each case, print the case number and total number of ways one can put the given number of rooks on a chessboard of the given size so that no two of them are in attacking positions. You may safely assume that this number will be less than \u003cb\u003e10\u003csup\u003e17\u003c/sup\u003e\u003c/b\u003e.\u003c/p\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cp class\u003d\"MsoNoSpacing\"\u003e\r\n\t\u003cspan style\u003d\"font-size:12.0pt;font-family:\u0026quot;Courier New\u0026quot;\"\u003e8\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e1 1\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e2 1\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e3 1\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e4 1\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e4 2\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e4 3\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e4 4\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003e4 5\u003c/span\u003e\u003cbr /\u003e\r\n\t\u0026nbsp;\u003c/p\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cp class\u003d\"MsoNoSpacing\"\u003e\r\n\t\u003cspan style\u003d\"font-size:12.0pt;font-family:\u0026quot;Courier New\u0026quot;\"\u003eCase 1: 1\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 2: 4\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 3: 9\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 4: 16\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 5: 72\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 6: 96\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 7: 24\u003c/span\u003e\u003cbr /\u003e\r\n\t\u003cspan style\u003d\"font-family: \u0027Courier New\u0027; font-size: 12pt;\"\u003eCase 8: 0\u003c/span\u003e\u003c/p\u003e"}}]}