{"trustable":false,"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":"\u003cstyle type\u003d\u0027text/css\u0027\u003e .input, .output {border: 1px solid #888888;} .output {margin-bottom:1em;position:relative;top:-1px;} .output pre,.input pre {background-color:#EFEFEF;line-height:1.25em;margin:0;padding:0.25em;} .title {background-color:#FFFFFF;border-bottom: 1px solid #888888;font-family:arial;font-weight:bold;padding:0.25em;} \u003c/style\u003e \u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\n\u003cp\u003eLittlefish\u0027s group resumed their adventure, and they were about to walk to the last room, where Littlefish understood that there would be endless treasures, which made him very excited. But the path was not smooth. They encountered a powerful gatekeeper before the last room, so powerful that it was impossible to be defeated. Fortunately, he did not want to fight with you, but chose to use a card game \"Straight Master\" to determine whether you have the strength to enter the room.\u003c/p\u003e\n\u003cp\u003eThe game uses a large deck of card that has \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e ranks from \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e to \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e. The rule of the game is simple: split the cards in Mr. Panda\u0027s hand into several straights of length from \u003cspan class\u003d\"tex-span\"\u003e3\u003c/span\u003e to \u003cspan class\u003d\"tex-span\"\u003e5\u003c/span\u003e.\u003c/p\u003e\n\u003cp\u003eA straight is a poker hand containing five cards of sequential rank, not necessarily to be the same suit. For example, a hand containing 7 club, 6 spade, 5 spade, 4 heart and 3 diamond forms a straight. In this problem, we extend the definition of a straight to allow \u003cspan class\u003d\"tex-span\"\u003e3\u003c/span\u003e to \u003cspan class\u003d\"tex-span\"\u003e5\u003c/span\u003e cards of sequential rank. Hence a hand containing K spade, Q club, and J heart is also a straight.\u003c/p\u003e\n\u003cp\u003eNow given a hand of cards, can you determine if it is possible to split the cards into straights?\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eThe first line of the input gives the number of test cases, \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eT\u003c/i\u003e\u003c/span\u003e. \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eT\u003c/i\u003e\u003c/span\u003e test cases follow.\u003c/p\u003e\n\u003cp\u003eEach test case contains two lines. The first line contains an integer \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e, indicating the number of ranks in the deck. The next line contains \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e integers \u003cspan class\u003d\"tex-span\"\u003e\u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e1\u003c/sub\u003e, \u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e2\u003c/sub\u003e, ..., \u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003eN\u003c/i\u003e\u003c/sub\u003e\u003c/span\u003e indicating the number of cards for each rank in Mr. Panda\u0027s hand.\u003c/p\u003e\n\u003cul\u003e \n \u003cli\u003e \u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003eT\u003c/i\u003e ≤ 100\u003c/span\u003e. \u003c/li\u003e\n \u003cli\u003e \u003cspan class\u003d\"tex-span\"\u003e1 ≤ \u003ci\u003eN\u003c/i\u003e ≤ 2 × 10\u003csup class\u003d\"upper-index\"\u003e5\u003c/sup\u003e\u003c/span\u003e. \u003c/li\u003e\n \u003cli\u003e \u003cspan class\u003d\"tex-span\"\u003e0 ≤ \u003ci\u003ea\u003c/i\u003e\u003csub class\u003d\"lower-index\"\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e ≤ 10\u003csup class\u003d\"upper-index\"\u003e9\u003c/sup\u003e\u003c/span\u003e. \u003c/li\u003e\n \u003cli\u003e \u003cimg align\u003d\"middle\" class\u003d\"tex-formula\" src\u003d\"CDN_BASE_URL/0074e1128840d8aae251bfd7eaa8289b?v\u003d1617327440\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e. \u003c/li\u003e\n\u003c/ul\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, output one line containing \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eCase #x: y\u003c/span\u003e\", where \u003cspan class\u003d\"tex-font-style-tt\"\u003ex\u003c/span\u003e is the test case number (starting from \u003cspan class\u003d\"tex-span\"\u003e1\u003c/span\u003e) and \u003cspan class\u003d\"tex-font-style-tt\"\u003ey\u003c/span\u003e is \u003cspan class\u003d\"tex-font-style-tt\"\u003eYes\u003c/span\u003e if Littlefish can split all his cards into straights of length from \u003cspan class\u003d\"tex-span\"\u003e3\u003c/span\u003e to \u003cspan class\u003d\"tex-span\"\u003e5\u003c/span\u003e, or \u003cspan class\u003d\"tex-font-style-tt\"\u003eNo\u003c/span\u003e otherwise.\u003c/p\u003e"}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e2\u003cbr\u003e13\u003cbr\u003e1 2 2 1 0 0 0 0 0 0 0 0 0\u003cbr\u003e13\u003cbr\u003e1 1 1 1 0 1 1 0 0 0 0 0 0\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003eCase #1: Yes\u003cbr\u003eCase #2: No\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first test case, Littlefish can split his cards into two straights: \u003cspan class\u003d\"tex-span\"\u003e[1, 2, 3]\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e[2, 3, 4]\u003c/span\u003e. In the second test case, there is no way to form a straight for card \u003cspan class\u003d\"tex-span\"\u003e6\u003c/span\u003e and \u003cspan class\u003d\"tex-span\"\u003e7\u003c/span\u003e.\u003c/p\u003e"}}]}