{"question_id": 1, "task_id": "two-sum", "difficulty": "Easy", "problem_description": "You are given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.\n\nYou may assume that each input would have exactly one solution, and you may not use the same element twice.\n\nYou can return the answer in any order.\n\nExample 1:\n\nInput: nums = [2,7,11,15], target = 9\nOutput: [0,1]\nExplanation: Because nums[0] + nums[1] == 9, we return [0, 1].\n\nExample 2:\n\nInput: nums = [3,2,4], target = 6\nOutput: [1,2]\n\nExample 3:\n\nInput: nums = [3,3], target = 6\nOutput: [0,1]\n\nConstraints:\n\n- 2 <= nums.length <= 10^4\n- -10^9 <= nums[i] <= 10^9\n- -10^9 <= target <= 10^9\n- Only one valid answer exists.\n\nFollow-up: Can you come up with an algorithm that is less than O(n^2) time complexity?\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[3, 3], target=6), [0, 1])\n assert answers_match(candidate(nums=[-1, -2, -3, -4], target=-8), None)\n assert answers_match(candidate(nums=[1, 5, 7, 9], target=10), [0, 3])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=3), [0, 1])\n assert answers_match(candidate(nums=[0, 4, 3, 0], target=0), [0, 3])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 500000000, -500000000], target=0), [0, 1])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=17), [7, 8])\n assert answers_match(candidate(nums=[1, 5, 7, 8], target=15), [2, 3])\n assert answers_match(candidate(nums=[1000000000, -1000000000], target=0), [0, 1])\n assert answers_match(candidate(nums=[2, 7, 11, 15], target=9), [0, 1])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=19), [8, 9])\n assert answers_match(candidate(nums=[1, 5, 7, 11], target=16), [1, 3])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], target=10), [0, 1])\n assert answers_match(candidate(nums=[3, 2, 4], target=6), [1, 2])\n assert answers_match(candidate(nums=[15, 11, 7, 2], target=9), [2, 3])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000], target=4000), [18, 20])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99], target=100), [24, 25])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], target=199), [98, 99])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], target=0), [4, 6])\n assert answers_match(candidate(nums=[-10, -20, -30, -40, -50, -60, -70, -80, -90, -100], target=-150), [6, 7])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20], target=-39), [18, 19])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119], target=110), [26, 28])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=1100), [4, 5])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], target=70), [16, 18])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], target=3), [18, 19])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500], target=3000), [13, 15])\n assert answers_match(candidate(nums=[1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000], target=30000), [13, 15])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=39), [18, 19])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99], target=99), [49, 50])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500], target=900), [43, 45])\n assert answers_match(candidate(nums=[23, 8, 15, 37, 48, 5, 21, 7, 40, 6], target=33), None)\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200], target=390), [18, 19])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], target=1500), [6, 7])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=21), [9, 10])\n assert answers_match(candidate(nums=[2, 5, 1, 9, 3, 8, 7, 6, 4, 0], target=17), [3, 5])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 500000000, 500000000], target=0), [0, 1])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], target=29), [13, 14])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=38), [17, 19])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], target=78), None)\n assert answers_match(candidate(nums=[-1000000000, 1000000000, 500000000, -500000000], target=0), [0, 1])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200], target=300), [13, 15])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59], target=100), [24, 25])\n assert answers_match(candidate(nums=[5, 12, 7, 3, 9, 14, 10, 23, 1, 11], target=22), [1, 6])\n assert answers_match(candidate(nums=[-3, 4, 3, 90, -11, 23, -5, 67, 100, -45, 89], target=53), None)\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61, -62, -63, -64, -65, -66, -67, -68, -69, -70, -71, -72, -73, -74, -75, -76, -77, -78, -79, -80, -81, -82, -83, -84, -85, -86, -87, -88, -89, -90, -91, -92, -93, -94, -95, -96, -97, -98, -99, -100], target=-199), [98, 99])\n assert answers_match(candidate(nums=[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], target=1), [0, 1])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2], target=3), [23, 24])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000], target=1990), [98, 99])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], target=59), [29, 30])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], target=0), [0, 1])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], target=-11), [4, 5])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], target=-15), [6, 7])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 500000000, 500000000, -500000000, -500000000, 1, 2, 3, 4], target=0), [0, 1])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150], target=299), [148, 149])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], target=59), [28, 29])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20], target=-31), [14, 15])\n assert answers_match(candidate(nums=[1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000], target=60000), None)\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=39), [18, 19])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], target=99), [48, 49])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], target=49), [23, 24])\n assert answers_match(candidate(nums=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512], target=513), [0, 9])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], target=-18), [7, 9])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500], target=1300), [5, 6])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], target=-17), [7, 8])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], target=1900), [8, 9])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], target=0), [0, 1])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], target=79), None)\n assert answers_match(candidate(nums=[-3, -1, 0, 2, 5, 7, 8, 10], target=4), [1, 4])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], target=100), None)\n assert answers_match(candidate(nums=[29, 37, 10, 55, 44, 3, 67, 90, 11, 38, 2, 9, 100, 34, 65, 23, 89, 12, 33, 22], target=62), [0, 18])\n", "comparison": "unordered"}, "public_tests": ["[2,7,11,15]\n9", "[3,2,4]\n6", "[3,3]\n6"], "hints": ["A really brute force way would be to search for all possible pairs of numbers but that would be too slow. Again, it's best to try out brute force solutions just for completeness. It is from these brute force solutions that you can come up with optimizations.", "So, if we fix one of the numbers, say x, we have to scan the entire array to find the next number y which is value - x where value is the input parameter. Can we change our array somehow so that this search becomes faster?", "The second train of thought is, without changing the array, can we use additional space somehow? Like maybe a hash map to speed up the search?"], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().twoSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:26+00:00", "tests_total": 80, "tests_dropped": 10, "flags": ["any_order"], "topic_tags": ["array", "hash-table"]}, "language": "ruby", "interface": {"raw_signature": "def two_sum(nums, target)", "container": null, "callable": "two_sum", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 3, "task_id": "longest-substring-without-repeating-characters", "difficulty": "Medium", "problem_description": "Given a string s, find the length of the longest substring without duplicate characters.\n\nExample 1:\n\nInput: s = \"abcabcbb\"\nOutput: 3\nExplanation: The answer is \"abc\", with the length of 3. Note that \"bca\" and \"cab\" are also correct answers.\n\nExample 2:\n\nInput: s = \"bbbbb\"\nOutput: 1\nExplanation: The answer is \"b\", with the length of 1.\n\nExample 3:\n\nInput: s = \"pwwkew\"\nOutput: 3\nExplanation: The answer is \"wke\", with the length of 3.\nNotice that the answer must be a substring, \"pwke\" is a subsequence and not a substring.\n\nConstraints:\n\n- 0 <= s.length <= 10^5\n- s consists of English letters, digits, symbols and spaces.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcabcbb\") == 3\n assert candidate(s = \"bbbbb\") == 1\n assert candidate(s = \"pwwkew\") == 3\n assert candidate(s = \"abcdabcabcabcd\") == 4\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefg\") == 7\n assert candidate(s = \"aabbccddeeff\") == 2\n assert candidate(s = \"sldfjldskfjdslkfjsdkljflkjsdfljfsdlkflskdjflsdjflskdjflsdkjflsdfjlsd\") == 6\n assert candidate(s = \"racecar\") == 4\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == 26\n assert candidate(s = \"aabacbebebe\") == 4\n assert candidate(s = \"ekdvdfis\") == 5\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890abcdefghijklmnopqrstuvwxyz\") == 36\n assert candidate(s = \"abbaabbaabba\") == 2\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 2\n assert candidate(s = \"abcdefghihgfedcba\") == 9\n assert candidate(s = \"abcdeffedcba\") == 6\n assert candidate(s = \"aaaaaaaabbbbbbbccccccdddddeeeeeeffffffffggggggg\") == 2\n assert candidate(s = \"tmmzuxt\") == 5\n assert candidate(s = \"nfpdmpi\") == 5\n assert candidate(s = \"anviaj\") == 5\n assert candidate(s = \"abcdeabcde\") == 5\n assert candidate(s = \"abcdabcabcd\") == 4\n assert candidate(s = \"dvdf\") == 3\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(s = \"abcdabcdeabcdabcdeabcd\") == 5\n assert candidate(s = \"rjqzupkoz\") == 8\n assert candidate(s = \"ababababababababab\") == 2\n assert candidate(s = \"!@#$%^&*()_+!@#$%^&*()_+\") == 12\n assert candidate(s = \"cdddddddddddddd\") == 2\n assert candidate(s = \"wobgrovw\") == 6\n assert candidate(s = \"abba\") == 2\n assert candidate(s = \"abcbacabc\") == 3\n assert candidate(s = \"ohvhjdml\") == 6\n assert candidate(s = \"123456789012345678901234567890\") == 10\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890!@#$%^&*()_+\") == 23\n assert candidate(s = \"12345678901234567890\") == 10\n assert candidate(s = \"abcdabcabcabcd\") == 4\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefg\") == 7\n assert candidate(s = \"aabbccddeeff\") == 2\n assert candidate(s = \"sldfjldskfjdslkfjsdkljflkjsdfljfsdlkflskdjflsdjflskdjflsdkjflsdfjlsd\") == 6\n assert candidate(s = \"racecar\") == 4\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == 26\n assert candidate(s = \"aabacbebebe\") == 4\n assert candidate(s = \"ekdvdfis\") == 5\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890abcdefghijklmnopqrstuvwxyz\") == 36\n assert candidate(s = \"abbaabbaabba\") == 2\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 2\n assert candidate(s = \"abcdefghihgfedcba\") == 9\n assert candidate(s = \"abcdeffedcba\") == 6\n assert candidate(s = \"aaaaaaaabbbbbbbccccccdddddeeeeeeffffffffggggggg\") == 2\n assert candidate(s = \"tmmzuxt\") == 5\n assert candidate(s = \"nfpdmpi\") == 5\n assert candidate(s = \"anviaj\") == 5\n assert candidate(s = \"abcdeabcde\") == 5\n assert candidate(s = \"abcdabcabcd\") == 4\n assert candidate(s = \"dvdf\") == 3\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(s = \"abcdabcdeabcdabcdeabcd\") == 5\n assert candidate(s = \"rjqzupkoz\") == 8\n assert candidate(s = \"ababababababababab\") == 2\n assert candidate(s = \"!@#$%^&*()_+!@#$%^&*()_+\") == 12\n assert candidate(s = \"cdddddddddddddd\") == 2\n assert candidate(s = \"wobgrovw\") == 6\n assert candidate(s = \"abba\") == 2\n assert candidate(s = \"abcbacabc\") == 3\n assert candidate(s = \"ohvhjdml\") == 6\n assert candidate(s = \"123456789012345678901234567890\") == 10\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890!@#$%^&*()_+\") == 23\n assert candidate(s = \"12345678901234567890\") == 10\n", "comparison": "exact"}, "public_tests": ["\"abcabcbb\"", "\"bbbbb\"", "\"pwwkew\""], "hints": ["There are less than 100 unique characters. We can check all substrings with length at most 100 for example. This is a good enough approximation."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().lengthOfLongestSubstring", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:36+00:00", "tests_total": 69, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "string", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def length_of_longest_substring(s)", "container": null, "callable": "length_of_longest_substring", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 4, "task_id": "median-of-two-sorted-arrays", "difficulty": "Hard", "problem_description": "Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.\n\nThe overall run time complexity should be O(log (m+n)).\n\nExample 1:\n\nInput: nums1 = [1,3], nums2 = [2]\nOutput: 2.00000\nExplanation: merged array = [1,2,3] and median is 2.\n\nExample 2:\n\nInput: nums1 = [1,2], nums2 = [3,4]\nOutput: 2.50000\nExplanation: merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5.\n\nConstraints:\n\n- nums1.length == m\n- nums2.length == n\n- 0 <= m <= 1000\n- 0 <= n <= 1000\n- 1 <= m + n <= 2000\n- -10^6 <= nums1[i], nums2[i] <= 10^6\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"Decimal answers are accepted within 1e-5 (absolute or relative), as on LeetCode.\"\"\"\n import math\n if isinstance(result, list) and isinstance(expected, list):\n return len(result) == len(expected) and all(answers_match(r, e) for r, e in zip(result, expected))\n numbers = (int, float)\n if isinstance(result, numbers) and isinstance(expected, numbers) and not isinstance(result, bool):\n return math.isclose(result, expected, rel_tol=1e-5, abs_tol=1e-5)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums1=[100, 200, 300], nums2=[150, 250, 350]), 225.0)\n assert answers_match(candidate(nums1=[2], nums2=[]), 2.0)\n assert answers_match(candidate(nums1=[1, 3], nums2=[2]), 2.0)\n assert answers_match(candidate(nums1=[1], nums2=[2, 3, 4, 5, 6, 7, 8, 9, 10]), 5.5)\n assert answers_match(candidate(nums1=[1000000], nums2=[-1000000]), 0.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9], nums2=[10, 11, 12, 13, 14, 15, 16, 17, 18, 19]), 10.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7], nums2=[2, 4, 6, 8]), 4.5)\n assert answers_match(candidate(nums1=[10, 20, 30], nums2=[5, 15, 25, 35, 45]), 22.5)\n assert answers_match(candidate(nums1=[0, 0], nums2=[0, 0]), 0.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), 10.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10]), 5.5)\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[0, 4, 5, 6]), 3.0)\n assert answers_match(candidate(nums1=[5, 6], nums2=[1, 2, 3, 4, 7, 8]), 4.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7], nums2=[2, 4, 6, 8, 10]), 5.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6], nums2=[0]), 3.0)\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[4]), 2.5)\n assert answers_match(candidate(nums1=[1, 2], nums2=[3]), 2.0)\n assert answers_match(candidate(nums1=[1, 3, 5], nums2=[2, 4, 6]), 3.5)\n assert answers_match(candidate(nums1=[1], nums2=[2, 3, 4]), 2.5)\n assert answers_match(candidate(nums1=[1, 2], nums2=[3, 4]), 2.5)\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[5, 15, 25, 35, 45]), 27.5)\n assert answers_match(candidate(nums1=[], nums2=[1]), 1.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29], nums2=[2, 4, 6, 8, 10]), 10.5)\n assert answers_match(candidate(nums1=[5, 9, 11, 19], nums2=[1, 3, 4, 6, 7, 8, 10, 12, 13, 14, 15, 16, 17, 18]), 10.5)\n assert answers_match(candidate(nums1=[-5, -3, -1], nums2=[-6, -4, -2, 0]), -3.0)\n assert answers_match(candidate(nums1=[-10, -5, 0, 5, 10], nums2=[-7, -3, 2, 7, 12]), 1.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]), 15.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 4, 6, 8, 10]), 8.0)\n assert answers_match(candidate(nums1=[-1000000], nums2=[0, 1000000]), 0.0)\n assert answers_match(candidate(nums1=[1], nums2=[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), 10.5)\n assert answers_match(candidate(nums1=[-10, -9, -8, -7, -6], nums2=[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]), -2.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), 10.5)\n assert answers_match(candidate(nums1=[1], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]), 15.0)\n assert answers_match(candidate(nums1=[1, 5, 9, 13], nums2=[2, 6, 10, 14, 18]), 9.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), 8.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10, 11, 12, 13, 14, 15]), 8.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]), 0.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), 10.5)\n assert answers_match(candidate(nums1=[-5, -3, -1, 1, 3, 5], nums2=[-6, -4, -2, 0, 2, 4, 6]), 0.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10, 12, 14, 16]), 7.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), 10.5)\n assert answers_match(candidate(nums1=[1], nums2=[1000000]), 500000.5)\n assert answers_match(candidate(nums1=[5, 15, 25, 35, 45], nums2=[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]), 37.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], nums2=[26, 27, 28, 29, 30]), 15.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[16, 17, 18, 19, 20]), 10.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[21, 22, 23, 24, 25]), 13.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]), 25.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15], nums2=[2, 4, 6, 8, 10, 12, 14, 16]), 8.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]), 20.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[0, 2, 4, 6, 8]), 4.5)\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[5, 15, 25, 35, 45, 55]), 55.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], nums2=[31, 32, 33, 34, 35, 36, 37, 38, 39, 40]), 20.5)\n assert answers_match(candidate(nums1=[], nums2=[1, 3, 5, 7, 9]), 5.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]), 15.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]), 20.5)\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[50, 150, 250, 350, 450, 550]), 300.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[21, 22, 23, 24, 25, 26, 27, 28, 29, 30]), 15.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]), 20.5)\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[5, 15, 25, 35, 45, 55]), 30.0)\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 4.0)\n assert answers_match(candidate(nums1=[-1, -3, -5, -7, -9], nums2=[-2, -4, -6, -8, -10]), -5.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11], nums2=[2, 4, 6, 8, 10, 12]), 6.5)\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[50, 150, 250, 350, 450, 550, 650]), 325.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[21, 22, 23, 24, 25, 26, 27, 28, 29, 30]), 15.5)\n assert answers_match(candidate(nums1=[1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000], nums2=[500, 1500, 2500, 3500, 4500, 5500, 6500, 7500, 8500, 9500, 10500]), 5500.0)\n assert answers_match(candidate(nums1=[-10, -8, -6, -4, -2], nums2=[-9, -7, -5, -3, -1]), -5.5)\n assert answers_match(candidate(nums1=[1000000], nums2=[999999]), 999999.5)\n assert answers_match(candidate(nums1=[-5, -3, -1, 1, 3], nums2=[-10, -8, -6, -4, -2]), -3.5)\n assert answers_match(candidate(nums1=[], nums2=[1, 2, 3, 4, 5]), 3.0)\n assert answers_match(candidate(nums1=[1, 5, 9, 13, 17], nums2=[2, 6, 10, 14, 18]), 9.5)\n assert answers_match(candidate(nums1=[100000, 100001, 100002, 100003, 100004], nums2=[100005, 100006, 100007, 100008, 100009]), 100004.5)\n assert answers_match(candidate(nums1=[-5, -4, -3, -2, -1], nums2=[0, 1, 2, 3, 4, 5]), 0.0)\n assert answers_match(candidate(nums1=[100000], nums2=[-100000, -99999, -99998, -99997, -99996, -99995]), -99997.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[]), 5.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[]), 3.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], nums2=[2, 4, 6, 8, 10]), 15.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10]), 5.5)\n assert answers_match(candidate(nums1=[], nums2=[1, 2, 3, 4, 5]), 3.0)\n assert answers_match(candidate(nums1=[-5, -3, 0, 8], nums2=[-10, -4, 2, 6, 12]), 0.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[16, 17, 18, 19, 20, 21, 22, 23, 24, 25]), 13.0)\n assert answers_match(candidate(nums1=[-1, 3, 5, 7, 9], nums2=[-2, -4, -6, -8, -10]), -5.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50]), 25.5)\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 3], nums2=[2, 2, 3, 3, 4, 4, 5, 5]), 3.0)\n assert answers_match(candidate(nums1=[100, 200, 300], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9]), 6.5)\n assert answers_match(candidate(nums1=[], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), 10.5)\n assert answers_match(candidate(nums1=[], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), 5.5)\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[4, 5, 6, 7, 8, 9, 10]), 5.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], nums2=[]), 13.0)\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[50, 150, 250, 350, 450, 550]), 300.0)\n assert answers_match(candidate(nums1=[-5, 0, 3, 8, 12], nums2=[-10, -1, 2, 4, 9, 14]), 3.0)\n assert answers_match(candidate(nums1=[50, 60, 70, 80, 90], nums2=[10, 20, 30, 40]), 50.0)\n assert answers_match(candidate(nums1=[1, 3, 5], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]), 18.0)\n assert answers_match(candidate(nums1=[1, 5, 7, 9, 11, 13], nums2=[2, 4, 6, 8, 10, 12, 14]), 8.0)\n assert answers_match(candidate(nums1=[-10, -5, 0, 5, 10], nums2=[-20, -15, -1, 1, 6, 11, 15, 20]), 1.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10, 11, 12]), 6.5)\n assert answers_match(candidate(nums1=[-1, -2, -3, -4, -5], nums2=[-10, -9, -8, -7, -6]), -3.5)\n assert answers_match(candidate(nums1=[0, 0, 0, 0], nums2=[0, 0, 0, 0]), 0.0)\n assert answers_match(candidate(nums1=[5, 15, 25, 35, 45], nums2=[10, 20, 30, 40, 50, 60]), 30.0)\n assert answers_match(candidate(nums1=[100, 200, 300], nums2=[50, 150, 250, 350]), 200.0)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26]), 12.0)\n assert answers_match(candidate(nums1=[1], nums2=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), 1.0)\n assert answers_match(candidate(nums1=[-100000, -99999, -99998], nums2=[-99997, -99996, -99995, -99994, -99993, -99992]), -99996.0)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[]), 10.5)\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[]), 3.0)\n assert answers_match(candidate(nums1=[1], nums2=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53]), 19.0)\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 4], nums2=[2, 2, 3, 4, 5]), 2.5)\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10, 12, 14]), 6.5)\n assert answers_match(candidate(nums1=[100, 200, 300, 400], nums2=[50, 150, 250, 350, 450, 550]), 275.0)\n", "comparison": "float"}, "public_tests": ["[1,3]\n[2]", "[1,2]\n[3,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().findMedianSortedArrays", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:38+00:00", "tests_total": 112, "tests_dropped": 4, "flags": ["decimal_answer"], "topic_tags": ["array", "binary-search", "divide-and-conquer"]}, "language": "ruby", "interface": {"raw_signature": "def find_median_sorted_arrays(nums1, nums2)", "container": null, "callable": "find_median_sorted_arrays", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}], "return_type": "Float", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 5, "task_id": "longest-palindromic-substring", "difficulty": "Medium", "problem_description": "Given a string s, return the longest palindromic substring in s.\n\nExample 1:\n\nInput: s = \"babad\"\nOutput: \"bab\"\nExplanation: \"aba\" is also a valid answer.\n\nExample 2:\n\nInput: s = \"cbbd\"\nOutput: \"bb\"\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- s consist of only digits and English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abba\") == \"abba\"\n assert candidate(s = \"aaaa\") == \"aaaa\"\n assert candidate(s = \"abacdfgdcaba\") == \"aba\"\n assert candidate(s = \"ac\") == \"a\"\n assert candidate(s = \"babad\") == \"aba\"\n assert candidate(s = \"noon\") == \"noon\"\n assert candidate(s = \"cbbd\") == \"bb\"\n assert candidate(s = \"abcba\") == \"abcba\"\n assert candidate(s = \"bcbabcbabcba\") == \"bcbabcbabcb\"\n assert candidate(s = \"noonhighnoon\") == \"noon\"\n assert candidate(s = \"forgeeksskeegfor\") == \"geeksskeeg\"\n assert candidate(s = \"aaabaaaa\") == \"aaabaaa\"\n assert candidate(s = \"abcdedcba\") == \"abcdedcba\"\n assert candidate(s = \"aaa\") == \"aaa\"\n assert candidate(s = \"aaaaa\") == \"aaaaa\"\n assert candidate(s = \"racecar\") == \"racecar\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"abcdefg\") == \"a\"\n assert candidate(s = \"aabbccddeeeffgg\") == \"eee\"\n assert candidate(s = \"abcdedcba12321\") == \"abcdedcba\"\n assert candidate(s = \"xxyyyxyxyxyxyxyxxyyxyxyxyxyxyx\") == \"xyxyxyxyxyx\"\n assert candidate(s = \"thisisanexamplewithlongestpalindromeonyxdxyxdx\") == \"xdxyxdx\"\n assert candidate(s = \"12345678987654321\") == \"12345678987654321\"\n assert candidate(s = \"xyzaaazyxzyzyxyz\") == \"xyzaaazyx\"\n assert candidate(s = \"12321abcdcba45654\") == \"abcdcba\"\n assert candidate(s = \"012210\") == \"012210\"\n assert candidate(s = \"tattarrattat\") == \"tattarrattat\"\n assert candidate(s = \"aabbabbaa\") == \"aabbabbaa\"\n assert candidate(s = \"abacdfgdcaba12321\") == \"12321\"\n assert candidate(s = \"xyxxyxyxyxyxyxyx\") == \"xyxyxyxyxyxyx\"\n assert candidate(s = \"1234321abcdefghgfedcba\") == \"abcdefghgfedcba\"\n assert candidate(s = \"abababababababababababababababababababababababababababababababab\") == \"bababababababababababababababababababababababababababababababab\"\n assert candidate(s = \"abacdfgdcabaxxxabcdcba\") == \"abcdcba\"\n assert candidate(s = \"12321abccba45654\") == \"abccba\"\n assert candidate(s = \"12321abcdedcbavcvcv\") == \"abcdedcba\"\n assert candidate(s = \"abcbaekayakecivic\") == \"ekayake\"\n assert candidate(s = \"noonmoonnoon\") == \"oonnoo\"\n assert candidate(s = \"abcbaxxxxxabcdcba\") == \"cbaxxxxxabc\"\n assert candidate(s = \"noonhighnoonnoon\") == \"noonnoon\"\n assert candidate(s = \"noonmidnightnoon\") == \"noon\"\n assert candidate(s = \"abcba12321defedcba\") == \"defed\"\n assert candidate(s = \"aabbabaaaabbaaabaaabbbbbaaaaaabbbaaaabbbbaaabbaabbbaaaabbbaaabbbbaaabbaabbaabbab\") == \"bbaaabbbbaaabb\"\n assert candidate(s = \"ababababababababa\") == \"ababababababababa\"\n assert candidate(s = \"noonnoonnoonnoonnoonnoon\") == \"noonnoonnoonnoonnoonnoon\"\n assert candidate(s = \"abccbaabacdfgdcaba\") == \"abccba\"\n assert candidate(s = \"racecarxracecar\") == \"racecarxracecar\"\n assert candidate(s = \"madamracecarlevel\") == \"racecar\"\n assert candidate(s = \"babcbabcbabcba\") == \"abcbabcbabcba\"\n assert candidate(s = \"abacdfgdcabaabacdfgdcaba\") == \"dcabaabacd\"\n assert candidate(s = \"madamintanimadaminabba\") == \"animadamina\"\n assert candidate(s = \"noonracecarracecar\") == \"racecarracecar\"\n assert candidate(s = \"zzzzzzzzzzzz\") == \"zzzzzzzzzzzz\"\n assert candidate(s = \"racecar2racecar\") == \"racecar2racecar\"\n assert candidate(s = \"zxyabcddcbaabczyx\") == \"abcddcba\"\n assert candidate(s = \"deeee\") == \"eeee\"\n assert candidate(s = \"abacdfgdcabacdfgdcaba\") == \"dcabacd\"\n assert candidate(s = \"1234543216789876\") == \"123454321\"\n assert candidate(s = \"abcbaaabcba\") == \"abcbaaabcba\"\n assert candidate(s = \"abcdedcbaefghihgfexyzzyx\") == \"efghihgfe\"\n assert candidate(s = \"abcdefgfebac\") == \"efgfe\"\n assert candidate(s = \"levelhannahlevel\") == \"levelhannahlevel\"\n assert candidate(s = \"xxyyzzzyyxx\") == \"xxyyzzzyyxx\"\n assert candidate(s = \"abcddcbaabcddcbaxyzzyx\") == \"abcddcbaabcddcba\"\n assert candidate(s = \"racecar12321racecar\") == \"racecar12321racecar\"\n assert candidate(s = \"abcdeffedcba\") == \"abcdeffedcba\"\n assert candidate(s = \"civicracecar\") == \"racecar\"\n assert candidate(s = \"levelmadammadam\") == \"madammadam\"\n assert candidate(s = \"zxyaxzyaz\") == \"z\"\n assert candidate(s = \"abcdefedcba\") == \"abcdefedcba\"\n assert candidate(s = \"12321321321321321\") == \"12321\"\n assert candidate(s = \"xyzzyxcbaapqrqpabczyzyx\") == \"apqrqpa\"\n assert candidate(s = \"abacdfgdcaba123321\") == \"123321\"\n assert candidate(s = \"abacdfgdcabaxxxxxabcdcba\") == \"baxxxxxab\"\n assert candidate(s = \"aabcdcbadefedcbaa\") == \"abcdcba\"\n assert candidate(s = \"abcdefghijiklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == \"klmnopqrstuvwxyzzyxwvutsrqponmlk\"\n assert candidate(s = \"bananaananab\") == \"bananaananab\"\n assert candidate(s = \"aabbccddeedcba\") == \"deed\"\n assert candidate(s = \"noonhighnoonnoonhighnoon\") == \"hnoonnoonh\"\n assert candidate(s = \"babaddabba\") == \"baddab\"\n assert candidate(s = \"abababababababababababababababababababababababababababababababbababa\") == \"babababababababababababababababababababababababababababababab\"\n assert candidate(s = \"abcdeedcba1234321xyzzyx\") == \"abcdeedcba\"\n assert candidate(s = \"aabb\") == \"bb\"\n assert candidate(s = \"mamamamamamamamama\") == \"amamamamamamamama\"\n assert candidate(s = \"abcdefgfedcba\") == \"abcdefgfedcba\"\n assert candidate(s = \"abcbabcba\") == \"abcbabcba\"\n assert candidate(s = \"xyzzzzyxabcdefedcba\") == \"abcdefedcba\"\n assert candidate(s = \"banana\") == \"anana\"\n assert candidate(s = \"abcbcbcbcbcbcbcbcbcbcbcbcb\") == \"bcbcbcbcbcbcbcbcbcbcbcbcb\"\n assert candidate(s = \"anana\") == \"anana\"\n assert candidate(s = \"aabbccddeeeeddccbbbaa\") == \"bbccddeeeeddccbb\"\n assert candidate(s = \"12321abcdedcba45654\") == \"abcdedcba\"\n assert candidate(s = \"aabbccddeeffgg\") == \"gg\"\n assert candidate(s = \"levelracecardeifiedracecar\") == \"racecardeifiedracecar\"\n assert candidate(s = \"aaaaabbbbbaaaa\") == \"aaaabbbbbaaaa\"\n assert candidate(s = \"abccba\") == \"abccba\"\n assert candidate(s = \"abcdcba12321xyzzyx\") == \"abcdcba\"\n assert candidate(s = \"12321abcba21321\") == \"abcba\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"zz\"\n assert candidate(s = \"abcdcbaxxxabcdcbaabcdcbaxxxabcdcba\") == \"abcdcbaxxxabcdcbaabcdcbaxxxabcdcba\"\n assert candidate(s = \"xyzabcbaxyz\") == \"abcba\"\n assert candidate(s = \"racecarannakayak\") == \"racecar\"\n assert candidate(s = \"abacdfgdcab\") == \"aba\"\n assert candidate(s = \"abcdeedcbafedcbe\") == \"abcdeedcba\"\n assert candidate(s = \"a1b2c3d4c3b2a\") == \"a\"\n assert candidate(s = \"abccccba\") == \"abccccba\"\n assert candidate(s = \"noonnoonnoon\") == \"noonnoonnoon\"\n assert candidate(s = \"aabbccddeeeedddccbaa\") == \"ddeeeedd\"\n assert candidate(s = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz\") == \"A\"\n assert candidate(s = \"acbbac\") == \"bb\"\n assert candidate(s = \"noonlevelnoon\") == \"noonlevelnoon\"\n assert candidate(s = \"abbaabba\") == \"abbaabba\"\n assert candidate(s = \"rotor1234321rotor\") == \"rotor1234321rotor\"\n assert candidate(s = \"aaaaabaaa\") == \"aaabaaa\"\n assert candidate(s = \"abcdefghihgfedcba\") == \"abcdefghihgfedcba\"\n assert candidate(s = \"civicdeifiedrotorlevel\") == \"deified\"\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\") == \"a\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbaedcba\") == \"z\"\n assert candidate(s = \"aabcddeffedcba\") == \"deffed\"\n assert candidate(s = \"pppppppppppppppppppppppppppppppp\") == \"pppppppppppppppppppppppppppppppp\"\n assert candidate(s = \"aabbccddeeeedddccbbaa\") == \"ddeeeedd\"\n assert candidate(s = \"a1b2c3d4e5f6g7h8i9j0j9i8h7g6f5e4d3c2b1a\") == \"a1b2c3d4e5f6g7h8i9j0j9i8h7g6f5e4d3c2b1a\"\n assert candidate(s = \"mississippi\") == \"ississi\"\n assert candidate(s = \"zxcvbnmlkjhgfdsapoiuytrewqpoiuytrewqpoiuytrewqpoiuytrewq\") == \"z\"\n assert candidate(s = \"deifiedrotorlevel\") == \"deified\"\n", "comparison": "exact"}, "public_tests": ["\"babad\"", "\"cbbd\""], "hints": ["How can we reuse a previously computed palindrome to compute a larger palindrome?", "If “aba” is a palindrome, is “xabax” a palindrome? Similarly is “xabay” a palindrome?", "Complexity based hint: If we use brute-force and check whether for every start and end position a substring is a palindrome we have O(n^2) start - end pairs and O(n) palindromic checks. Can we reduce the time for palindromic checks to O(1) by reusing some previous computation."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:41+00:00", "tests_total": 124, "tests_dropped": 0, "flags": [], "topic_tags": ["two-pointers", "string", "dynamic-programming", "manacher"]}, "language": "ruby", "interface": {"raw_signature": "def longest_palindrome(s)", "container": null, "callable": "longest_palindrome", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 6, "task_id": "zigzag-conversion", "difficulty": "Medium", "problem_description": "The string \"PAYPALISHIRING\" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)\n\nP A H N\nA P L S I I G\nY I R\n\nAnd then read line by line: \"PAHNAPLSIIGYIR\"\n\nWrite the code that will take a string and make this conversion given a number of rows:\n\nstring convert(string s, int numRows);\n\nExample 1:\n\nInput: s = \"PAYPALISHIRING\", numRows = 3\nOutput: \"PAHNAPLSIIGYIR\"\n\nExample 2:\n\nInput: s = \"PAYPALISHIRING\", numRows = 4\nOutput: \"PINALSIGYAHRPI\"\nExplanation:\nP I N\nA L S I G\nY A H R\nP I\n\nExample 3:\n\nInput: s = \"A\", numRows = 1\nOutput: \"A\"\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- s consists of English letters (lower-case and upper-case), ',' and '.'.\n- 1 <= numRows <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"PAYPALISHIRING\",numRows = 4) == \"PINALSIGYAHRPI\"\n assert candidate(s = \"ABCDEFGHI\",numRows = 3) == \"AEIBDFHCG\"\n assert candidate(s = \"A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z\",numRows = 5) == \"AEIMQUY,,,,,,,,,,,,,BDFHJLNPRTVXZ,,,,,,,,,,,,CGKOSW\"\n assert candidate(s = \"PAYPALISHIRING\",numRows = 3) == \"PAHNAPLSIIGYIR\"\n assert candidate(s = \"A\",numRows = 1) == \"A\"\n assert candidate(s = \"HELLO\",numRows = 5) == \"HELLO\"\n assert candidate(s = \"ABCDEF\",numRows = 2) == \"ACEBDF\"\n assert candidate(s = \"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z\",numRows = 20) == \"atM,,,,,bsuLN,,,,,crvKO,,,,,dqwJP,,,,,epxIQ,,,,,foyHR,,,,,gnzGSZ,,,,,,hmAFTY,,,,,,ilBEUX,,,,,,jkCDVW,,,\"\n assert candidate(s = \"AB\",numRows = 1) == \"AB\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",numRows = 5) == \"AIQYBHJPRXZCGKOSWDFLNTVEMU\"\n assert candidate(s = \"ABCD\",numRows = 2) == \"ACBD\"\n assert candidate(s = \"ABCDEFGHIJKL\",numRows = 4) == \"AGBFHLCEIKDJ\"\n assert candidate(s = \"HELLO.WORLD.\",numRows = 3) == \"HOREL.OL.LWD\"\n assert candidate(s = \"ABC\",numRows = 2) == \"ACB\"\n assert candidate(s = \"ABCDEFG\",numRows = 1) == \"ABCDEFG\"\n assert candidate(s = \"A,B.C\",numRows = 3) == \"AC,.B\"\n assert candidate(s = \"A,B,C,D,E,F,G\",numRows = 3) == \"ACEG,,,,,,BDF\"\n assert candidate(s = \"ABCDEFGHIJKL\",numRows = 3) == \"AEIBDFHJLCGK\"\n assert candidate(s = \"COMPLEX.EXAMPLE\",numRows = 6) == \"CAOXMMEPP.LLXEE\"\n assert candidate(s = \"A,B,C.,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z.\",numRows = 7) == \"A,,,,,FGLMRSXYB,,,,,,,,,EHKNQTWZC,,,,,,,..DIJOPUV,,,,\"\n assert candidate(s = \"..............................\",numRows = 10) == \"..............................\"\n assert candidate(s = \"ZIGZAG\",numRows = 6) == \"ZIGZAG\"\n assert candidate(s = \"ThisIsATestOfTheEmergencyBroadcastSystem\",numRows = 10) == \"TeshmrytiEgSeseetmIhnssTcaAfycTOBdetraso\"\n assert candidate(s = \"Short\",numRows = 1) == \"Short\"\n assert candidate(s = \"Lorem.ipsum.dolor.sit.amet.consectetur.adipiscing.elit\",numRows = 12) == \"Laso.micrtepieitinms.dg..ca.iro.eponrlslsuiuoettmdce.t\"\n assert candidate(s = \"ABCD\",numRows = 1) == \"ABCD\"\n assert candidate(s = \"ZigzagPatternConversionIsCool.\",numRows = 7) == \"ZnsirCICgeonoztnooatvilgaes.Pr\"\n assert candidate(s = \"ZIGZAGCONVERSION\",numRows = 6) == \"ZEIVRGNSZOIACOGN\"\n assert candidate(s = \".,,..,.\",numRows = 3) == \"..,.,,.\"\n assert candidate(s = \"a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.\",numRows = 12) == \"alw.....bkmvx.....cjnuy.....diotz.....ehps....fgqr..\"\n assert candidate(s = \"HELLOALLOHELLOALLOHELLOALLO\",numRows = 2) == \"HLOLOELALHLOLOELALHLOLOELAL\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",numRows = 10) == \"asKbrtJLcquIMdpvHNZeowGOYfnxFPXgmyEQWhlzDRVikACSUjBT\"\n assert candidate(s = \"AnotherExampleWithALongerStringThatShouldBeChallengingToFormatCorrectly\",numRows = 8) == \"AWieFyneirnBCoololttgdhTrttphSTlagmchmArhulnaeeaLeaolitrrxogthegCrEnSno\"\n assert candidate(s = \"A\",numRows = 5) == \"A\"\n assert candidate(s = \"SHORT\",numRows = 25) == \"SHORT\"\n assert candidate(s = \"Zigzag.patters.are.pretty.cool.and.fascinating\",numRows = 10) == \"Z.aiepfsgrr.czaedia.tnngstaa.ry.tpe.liatcontog\"\n assert candidate(s = \"ZigZagConversion\",numRows = 6) == \"ZeivrgnsZoiaCogn\"\n assert candidate(s = \"PYTHONISAWESOMELANGUAGEFORTACKLINGCOMPLEXPROBLEMS\",numRows = 6) == \"PEALXYWSUGKIEPTAOGECNLRSHSMNFAGPOMOIEAOTCMBENLROL\"\n assert candidate(s = \"PYTHONPROGRAMMING\",numRows = 5) == \"POGYRGNTPRIHNAMOM\"\n assert candidate(s = \"BUTTERTOOMELON\",numRows = 3) == \"BEOOUTROMLNTTE\"\n assert candidate(s = \"ZIGZAGCONVERSION\",numRows = 8) == \"ZOIINGSZRAEGVCNO\"\n assert candidate(s = \"HELLOPYTHONHELLOPYTHONHELLOPYTHONHELLOPYTHON\",numRows = 8) == \"HLYOELOPTHNLEPOHTLHYLOYONTLNPPOHEHOYHOHELTNL\"\n assert candidate(s = \"A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.\",numRows = 5) == \"AEIMQUY.............BDFHJLNPRTVXZ.............CGKOSW\"\n assert candidate(s = \"ALGORITHMSANDDATASTRUCTURES\",numRows = 8) == \"AALDTGDASONSERATRISRUTMUTHC\"\n assert candidate(s = \"A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.\",numRows = 10) == \"AJS.....BIKRT......CHLQUZ......DGMPVY......EFNOWX...\"\n assert candidate(s = \"A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.\",numRows = 6) == \"AFKPUZ...........BEGJLOQTVY..........CDHIMNRSWX.....\"\n assert candidate(s = \"ToCodeOrNotToCode.\",numRows = 2) == \"TCdONtooeooeroTCd.\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",numRows = 11) == \"auObtvNPcswMQdrxLReqyKSfpzJTgoAIUhnBHVimCGWjlDFXZkEY\"\n assert candidate(s = \"HELLO.WORLD.THIS.IS.A.TEST\",numRows = 8) == \"HIEHSLT.L.ITODSS.L.EWRATO.\"\n assert candidate(s = \"Longer.string.for.testing.the.zigzag.conversion\",numRows = 2) == \"Lne.tigfrtsigtezga.ovrinogrsrn.o.etn.h.izgcneso\"\n assert candidate(s = \"THISISAMUCHLONGERSTRINGTHANTHEPREVIOUSONES\",numRows = 9) == \"TREHESRVIGTPISNREOIOIHUSLNTSAHGNOMCTANSUHE\"\n assert candidate(s = \"REPEATEREPEATEREPEATEREPEATEREPEAT\",numRows = 15) == \"RREEEPTPEAEAEATPTEERREEPTEAAETPEER\"\n assert candidate(s = \"HELLOWORLDTHISISATEST\",numRows = 7) == \"HIEHSLTILDSOLATWRTSOE\"\n assert candidate(s = \"AQuickBrownFoxJumpsOverTheLazyDog\",numRows = 11) == \"AvQOeusripTcmhkueBJLrxaoozgwFyonD\"\n assert candidate(s = \"........................................\",numRows = 4) == \"........................................\"\n assert candidate(s = \"ThisIsALongStringToTestTheFunctionalityOfTheZigZagConversion\",numRows = 7) == \"TthiahSrTeltZgnigitFaygCosnnsunOioiIogenofZnssLTTciTevrAothe\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",numRows = 8) == \"AOBNPCMQDLRZEKSYFJTXGIUWHV\"\n assert candidate(s = \"HELLO.,WORLD.,HELLO.,WORLD.,HELLO.,WORLD.\",numRows = 10) == \"HOOEL.WRLL,,LLEW.DOHOO..,RL,.LLWDDEOL.HR,\"\n assert candidate(s = \"Short.string\",numRows = 1) == \"Short.string\"\n assert candidate(s = \"THISISALONGSTRINGFORTHETESTCASE\",numRows = 7) == \"TTEHSRTSIGIETSNNHCIOGTASLFRSAOE\"\n assert candidate(s = \"ONETWO,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE,TEN\",numRows = 12) == \"O,TNES,EEVIENTIXNWF,IO,SN,RE,TUVTHOEHRFNGE,,IEE\"\n assert candidate(s = \"THEQUICK.BROWN.FOX.JUMPS.OVER.THE.LAZY.DOG.\",numRows = 5) == \"T.O.EOHKBFXSOH.DGECR..PVTL..QIONJME.AYUWURZ\"\n assert candidate(s = \"ALGORITHMSAREFUN\",numRows = 6) == \"AALSRGMEOHFRTUIN\"\n assert candidate(s = \"This.is.a.test.string\",numRows = 5) == \"Tath..srist.isietn.sg\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ\",numRows = 12) == \"AWSBVXRTCUYQUDTZPVESAOWFRBNXGQCMYHPDLZIOEKJNFJKMGILH\"\n assert candidate(s = \"AQUICKMOVEMENTOFTHEBROWNFOX\",numRows = 9) == \"ATQFHUOEITBCNRKEOMMWXOENOVF\"\n assert candidate(s = \"OneTwoThreeFourFiveSixSevenEightNineTenElevenTwelveThirteenFourteenFifteen\",numRows = 9) == \"OiNlenFvtievteerehnwernTuSgeTTuFwoiiTnhoioFxEeeiFfTeSnnvrntheeeEeteenrvlee\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",numRows = 13) == \"aybxzcwdveuftgshriqjpkolnm\"\n assert candidate(s = \"AVERYLONGSTRINGTHATWILLBETESTEDTOENSURETHECORRECTNESSOFTHETEST\",numRows = 20) == \"AEVRTEUHRSEYNCLEOOORNTRGDESECTTTRSNIEENTSGESTBOTHLFSALTETIHTWE\"\n assert candidate(s = \"Python.is.awesome.and.fun\",numRows = 9) == \"Peym.toahsnoednw..afi.usn\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\",numRows = 5) == \"AIQYBHJPRXZCGKOSW.DFLNTV,EMU\"\n assert candidate(s = \"PythonIsFun\",numRows = 5) == \"PFysutInhno\"\n assert candidate(s = \"COMPLEXTESTCASEWITHVARYINGCHARS,.,\",numRows = 9) == \"CI.OWT,,MEHSPSVRLAAAECRHXTYCTSIGEN\"\n assert candidate(s = \"Mississippi\",numRows = 2) == \"Msispiissip\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",numRows = 10) == \"ASBRTCQUDPVEOWFNXGMYHLZIKJ\"\n assert candidate(s = \"zigzagzigzagzigzagzigzagzigzagzigzagzigzag\",numRows = 4) == \"zzzzzzzigigigigigigiggagagagagagagazzzzzzz\"\n assert candidate(s = \"SOMETIMESGOODPROGRAMSMAKEYOUCRY\",numRows = 2) == \"SMTMSODRGASAEOCYOEIEGOPORMMKYUR\"\n assert candidate(s = \"REPEATEDCHARACTERSTESTCASEEEEEEEEEEEEEEEEEEEEEE\",numRows = 15) == \"REEEEPEEEEEASETAEECEDTECSEHEEATEERSEEAREECEEETE\"\n assert candidate(s = \"TheQuickBrownFoxJumpsOverTheLazyDog\",numRows = 6) == \"ToszhrwpOayeBnmvLDQkFueeoucoJrhgixT\"\n assert candidate(s = \"HELLO.,WORLD.,HELLO.,WORLD.\",numRows = 5) == \"HOLLEWRELRDL,LHOO.L.D,.WO.,\"\n assert candidate(s = \"AABBAABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ\",numRows = 12) == \"AJUAIJTUBIKTVBHKSVAHLSWAGLRWBGMRXBFMQXCFNQYCENPYDEOPZDOZ\"\n assert candidate(s = \"PYTHON.IS.A.GREAT.LANGUAGE.\",numRows = 4) == \"P.GLGYNI.R.AAETOSAETNU.H.AG\"\n assert candidate(s = \"MULTIPLELINESAREHERE.FIXEDFONTISNEAT.\",numRows = 15) == \"MNUOTLFITDSIENPXELIAEFTL..IENREESHAER\"\n assert candidate(s = \"PythonIsFunAndChallenging\",numRows = 5) == \"PFagysuhlntInClihnAdegonn\"\n assert candidate(s = \"S.P.E.C.I.A.L.,C.H.A.R.A.C.T.E.R.S.\",numRows = 9) == \"S...CHRSP,.....AEEL....RTCA....ACI.\"\n assert candidate(s = \"OneMoreExampleHere\",numRows = 10) == \"OneerMeoHreelEpxma\"\n", "comparison": "exact"}, "public_tests": ["\"PAYPALISHIRING\"\n3", "\"PAYPALISHIRING\"\n4", "\"A\"\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "numRows"], "leetcode_dataset_entry_point": "Solution().convert", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:43+00:00", "tests_total": 104, "tests_dropped": 18, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def convert(s, num_rows)", "container": null, "callable": "convert", "parameters": [{"name": "s", "type": "String"}, {"name": "num_rows", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 7, "task_id": "reverse-integer", "difficulty": "Medium", "problem_description": "Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.\n\nAssume the environment does not allow you to store 64-bit integers (signed or unsigned).\n\nExample 1:\n\nInput: x = 123\nOutput: 321\n\nExample 2:\n\nInput: x = -123\nOutput: -321\n\nExample 3:\n\nInput: x = 120\nOutput: 21\n\nConstraints:\n\n- -2^31 <= x <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(x = -2147483412) == -2143847412\n assert candidate(x = 2147483647) == 0\n assert candidate(x = 120) == 21\n assert candidate(x = -123) == -321\n assert candidate(x = 1534236469) == 0\n assert candidate(x = 0) == 0\n assert candidate(x = -2147483648) == 0\n assert candidate(x = -1534236469) == 0\n assert candidate(x = 123) == 321\n assert candidate(x = -10) == -1\n assert candidate(x = -100000) == -1\n assert candidate(x = 10) == 1\n assert candidate(x = -999999999) == -999999999\n assert candidate(x = 1) == 1\n assert candidate(x = 2147483646) == 0\n assert candidate(x = -123000) == -321\n assert candidate(x = -900000) == -9\n assert candidate(x = -100100100) == -1001001\n assert candidate(x = -2147483647) == 0\n assert candidate(x = -1010101010) == -101010101\n assert candidate(x = 1000000001) == 1000000001\n assert candidate(x = -1) == -1\n assert candidate(x = 123000) == 321\n assert candidate(x = -2000000002) == -2000000002\n assert candidate(x = 101010101) == 101010101\n assert candidate(x = 1111111111) == 1111111111\n assert candidate(x = 2147447412) == 2147447412\n assert candidate(x = -101010101) == -101010101\n assert candidate(x = 900000) == 9\n assert candidate(x = 987654321) == 123456789\n assert candidate(x = 999999999) == 999999999\n assert candidate(x = -1000000000) == -1\n assert candidate(x = 1001001001) == 1001001001\n assert candidate(x = -987654321) == -123456789\n assert candidate(x = -1000000001) == -1000000001\n assert candidate(x = 876543210) == 12345678\n assert candidate(x = 2147483640) == 463847412\n assert candidate(x = 100100100) == 1001001\n assert candidate(x = 100000) == 1\n assert candidate(x = 2000000002) == 2000000002\n assert candidate(x = -123456789) == -987654321\n assert candidate(x = -1000000003) == 0\n assert candidate(x = -876543210) == -12345678\n assert candidate(x = -1111111111) == -1111111111\n assert candidate(x = -1001001001) == -1001001001\n assert candidate(x = 1010101010) == 101010101\n assert candidate(x = 123456789) == 987654321\n assert candidate(x = -2147483640) == -463847412\n assert candidate(x = 1000000000) == 1\n assert candidate(x = 1000000003) == 0\n assert candidate(x = -214748364) == -463847412\n", "comparison": "exact"}, "public_tests": ["123", "-123", "120"], "hints": [], "metadata": {"canonical_parameter_names": ["x"], "leetcode_dataset_entry_point": "Solution().reverse", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:45+00:00", "tests_total": 61, "tests_dropped": 10, "flags": [], "topic_tags": ["math"]}, "language": "ruby", "interface": {"raw_signature": "def reverse(x)", "container": null, "callable": "reverse", "parameters": [{"name": "x", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 8, "task_id": "string-to-integer-atoi", "difficulty": "Medium", "problem_description": "Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer.\n\nThe algorithm for myAtoi(string s) is as follows:\n\n1. Whitespace: Ignore any leading whitespace (\" \").\n2. Signedness: Determine the sign by checking if the next character is '-' or '+', assuming positivity if neither present.\n3. Conversion: Read the integer by skipping leading zeros until a non-digit character is encountered or the end of the string is reached. If no digits were read, then the result is 0.\n4. Rounding: If the integer is out of the 32-bit signed integer range [-2^31, 2^31 - 1], then round the integer to remain in the range. Specifically, integers less than -2^31 should be rounded to -2^31, and integers greater than 2^31 - 1 should be rounded to 2^31 - 1.\n\nReturn the integer as the final result.\n\nNote: You must not use any built-in library function that converts a string to a number (for example, atoi, stoi, Integer.parseInt, int(), parseInt, Number()). Perform the conversion manually.\n\nExample 1:\n\nInput: s = \"42\"\nOutput: 42\nExplanation:\n\nThe underlined characters are what is read in and the caret is the current reader position.\nStep 1: \"42\" (no characters read because there is no leading whitespace)\n ^\nStep 2: \"42\" (no characters read because there is neither a '-' nor '+')\n ^\nStep 3: \"42\" (\"42\" is read in)\n ^\n\nExample 2:\n\nInput: s = \" -042\"\nOutput: -42\nExplanation:\n\nStep 1: \" -042\" (leading whitespace is read and ignored)\n ^\nStep 2: \" -042\" ('-' is read, so the result should be negative)\n ^\nStep 3: \" -042\" (\"042\" is read in, leading zeros ignored in the result)\n ^\n\nExample 3:\n\nInput: s = \"1337c0d3\"\nOutput: 1337\nExplanation:\n\nStep 1: \"1337c0d3\" (no characters read because there is no leading whitespace)\n ^\nStep 2: \"1337c0d3\" (no characters read because there is neither a '-' nor '+')\n ^\nStep 3: \"1337c0d3\" (\"1337\" is read in; reading stops because the next character is a non-digit)\n ^\n\nExample 4:\n\nInput: s = \"0-1\"\nOutput: 0\nExplanation:\n\nStep 1: \"0-1\" (no characters read because there is no leading whitespace)\n ^\nStep 2: \"0-1\" (no characters read because there is neither a '-' nor '+')\n ^\nStep 3: \"0-1\" (\"0\" is read in; reading stops because the next character is a non-digit)\n ^\n\nExample 5:\n\nInput: s = \"words and 987\"\nOutput: 0\nExplanation:\nReading stops at the first non-digit character 'w'.\n\nConstraints:\n\n- 0 <= s.length <= 200\n- s consists of English letters (lower-case and upper-case), digits (0 - 9), ' ', '+', '-', and '.'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"2147483647\") == 2147483647\n assert candidate(s = \"42 with words\") == 42\n assert candidate(s = \"20000000000000000000000000000000000000000\") == 2147483647\n assert candidate(s = \"-2147483649\") == -2147483648\n assert candidate(s = \"-21474836480\") == -2147483648\n assert candidate(s = \" 000000000000 \") == 0\n assert candidate(s = \"+1\") == 1\n assert candidate(s = \" - 42\") == 0\n assert candidate(s = \"words with 42\") == 0\n assert candidate(s = \" -042\") == -42\n assert candidate(s = \"0-1\") == 0\n assert candidate(s = \" 0\") == 0\n assert candidate(s = \"-5\") == -5\n assert candidate(s = \" -119197303367810844 \") == -2147483648\n assert candidate(s = \" -12345\") == -12345\n assert candidate(s = \" \") == 0\n assert candidate(s = \" -042\") == -42\n assert candidate(s = \" -88827 5655 U\") == -88827\n assert candidate(s = \"+-12\") == 0\n assert candidate(s = \" +0 123\") == 0\n assert candidate(s = \"+2\") == 2\n assert candidate(s = \" +0 91283472332\") == 0\n assert candidate(s = \" - 42\") == 0\n assert candidate(s = \"words and 987\") == 0\n assert candidate(s = \"3.14159\") == 3\n assert candidate(s = \" 20000000000000000000\") == 2147483647\n assert candidate(s = \"0000000000012345678\") == 12345678\n assert candidate(s = \".\") == 0\n assert candidate(s = \"2147483648\") == 2147483647\n assert candidate(s = \"\") == 0\n assert candidate(s = \" 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \"-\") == 0\n assert candidate(s = \"42\") == 42\n assert candidate(s = \"-91283472332\") == -2147483648\n assert candidate(s = \"4193 with words\") == 4193\n assert candidate(s = \" 3.14159\") == 3\n assert candidate(s = \" +0 123\") == 0\n assert candidate(s = \" +123\") == 123\n assert candidate(s = \" +42\") == 42\n assert candidate(s = \" +12345\") == 12345\n assert candidate(s = \" +42\") == 42\n assert candidate(s = \"0000000000000\") == 0\n assert candidate(s = \" \") == 0\n assert candidate(s = \"00000000000000\") == 0\n assert candidate(s = \" +42\") == 42\n assert candidate(s = \"1337c0d3\") == 1337\n assert candidate(s = \" +0 91283472332 456\") == 0\n assert candidate(s = \" 21474836460\") == 2147483647\n assert candidate(s = \"+\") == 0\n assert candidate(s = \" -00130\") == -130\n assert candidate(s = \"00000000000123456789\") == 123456789\n assert candidate(s = \" -0012a42\") == -12\n assert candidate(s = \" +3.14\") == 3\n assert candidate(s = \"21474836478\") == 2147483647\n assert candidate(s = \"-2147483648\") == -2147483648\n assert candidate(s = \"-21474836489\") == -2147483648\n assert candidate(s = \" + 413\") == 0\n assert candidate(s = \" -2147483649\") == -2147483648\n assert candidate(s = \" 21474836470000000000000000\") == 2147483647\n assert candidate(s = \" 9223372036854775808\") == 2147483647\n assert candidate(s = \" 2147483647abc\") == 2147483647\n assert candidate(s = \" -123 456\") == -123\n assert candidate(s = \" 0000123\") == 123\n assert candidate(s = \" 21474836470000000000000000000000\") == 2147483647\n assert candidate(s = \" 2147483647000000000000000\") == 2147483647\n assert candidate(s = \" 2147483647 -\") == 2147483647\n assert candidate(s = \" 214748364700000000000000000000\") == 2147483647\n assert candidate(s = \" abcdefghijklmnopqrstuvwxyz\") == 0\n assert candidate(s = \" 21474836470000000000000000000\") == 2147483647\n assert candidate(s = \" 000000000000000000000000000000000000000000000000000 -123\") == 0\n assert candidate(s = \" +2147483649\") == 2147483647\n assert candidate(s = \" +0\") == 0\n assert candidate(s = \" 2147483648\") == 2147483647\n assert candidate(s = \" 2147483647000000000000000000000\") == 2147483647\n assert candidate(s = \" -21474836480000\") == -2147483648\n assert candidate(s = \" -214748364800000000000000000\") == -2147483648\n assert candidate(s = \" 9223372036854775807\") == 2147483647\n assert candidate(s = \" -214748364800000\") == -2147483648\n assert candidate(s = \" -21474836480000000000000000000000\") == -2147483648\n assert candidate(s = \" -21474836480000000\") == -2147483648\n assert candidate(s = \" -12345678901234567890123456789012345678901234567890\") == -2147483648\n assert candidate(s = \" -214748364800\") == -2147483648\n assert candidate(s = \" 2147483647000000000000000000000000000\") == 2147483647\n assert candidate(s = \" 0000000000000 +123abc\") == 0\n assert candidate(s = \" -214748364800000000\") == -2147483648\n assert candidate(s = \" -21474836480000000000000000000000000000\") == -2147483648\n assert candidate(s = \" 21474836470000000\") == 2147483647\n assert candidate(s = \" +000000000000000000000000000000123\") == 123\n assert candidate(s = \" 2147483647000000000000000000000000\") == 2147483647\n assert candidate(s = \" -0000000000000000000000000000000000000000000000000000000000000001\") == -1\n assert candidate(s = \" 000000000000000000000000000000000000000000000000000 123\") == 0\n assert candidate(s = \" -21474836480\") == -2147483648\n assert candidate(s = \" -2147483648000000000000\") == -2147483648\n assert candidate(s = \" -2147483648 0\") == -2147483648\n assert candidate(s = \" -214748364800000000000000000000\") == -2147483648\n assert candidate(s = \" -214748364800000000000000000000000000\") == -2147483648\n assert candidate(s = \" -9223372036854775808\") == -2147483648\n assert candidate(s = \" -214748364800000000000000000000000000000\") == -2147483648\n assert candidate(s = \" 21474836470000000000000000000000000\") == 2147483647\n assert candidate(s = \" -2147483648000\") == -2147483648\n assert candidate(s = \" -2147483648\") == -2147483648\n assert candidate(s = \" -2147483648extra\") == -2147483648\n assert candidate(s = \" -2147483648000000000000000000000000\") == -2147483648\n assert candidate(s = \" 214748364700000000000\") == 2147483647\n assert candidate(s = \" +2147483647extra\") == 2147483647\n assert candidate(s = \" -2147483648abc\") == -2147483648\n assert candidate(s = \" -2147483648\") == -2147483648\n assert candidate(s = \" 214748364700000000000000000000000\") == 2147483647\n assert candidate(s = \" +000\") == 0\n assert candidate(s = \" -9223372036854775809\") == -2147483648\n assert candidate(s = \" 214748364700000000000000\") == 2147483647\n assert candidate(s = \" 0000000000000000000000000000000000000000000000000001\") == 1\n assert candidate(s = \" -0\") == 0\n assert candidate(s = \" +0000000000000000000000000000000000000000000000000000000000000001\") == 1\n assert candidate(s = \" 010\") == 10\n assert candidate(s = \" 2147483647000000\") == 2147483647\n assert candidate(s = \" -21474836480000000000000000000\") == -2147483648\n assert candidate(s = \"000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \" -2147483648000000000000000\") == -2147483648\n assert candidate(s = \"-0000000000000000000000000000000000000000000000000001\") == -1\n assert candidate(s = \" -2147483648000000000000000000\") == -2147483648\n assert candidate(s = \" 2147483646\") == 2147483646\n assert candidate(s = \" 214748364700000000000000000000000000000\") == 2147483647\n assert candidate(s = \" 2147483647000\") == 2147483647\n assert candidate(s = \" 12345678901234567890123456789012345678901234567890\") == 2147483647\n assert candidate(s = \" 0000-123\") == 0\n assert candidate(s = \" -2147483648 -\") == -2147483648\n assert candidate(s = \" 000000000000000000000000000000000000000000000000000 +123\") == 0\n assert candidate(s = \" 123 456\") == 123\n assert candidate(s = \" +2147483647 0\") == 2147483647\n assert candidate(s = \" 2147483648\") == 2147483647\n assert candidate(s = \" 2147483647extra\") == 2147483647\n assert candidate(s = \" 2147483647000000000000\") == 2147483647\n assert candidate(s = \" 214748364700000000000000000\") == 2147483647\n assert candidate(s = \" 21474836470000\") == 2147483647\n assert candidate(s = \" 0000000000000000000000000000000000000000000000000000000000000000+1\") == 0\n assert candidate(s = \" -214748364800000000000000\") == -2147483648\n assert candidate(s = \" -2147483648000000\") == -2147483648\n assert candidate(s = \" -2147483648000000000000000000000\") == -2147483648\n assert candidate(s = \" -000000000000000000000000000000123\") == -123\n assert candidate(s = \" +2147483648\") == 2147483647\n assert candidate(s = \" 214748364700\") == 2147483647\n assert candidate(s = \" +2147483647 +\") == 2147483647\n assert candidate(s = \" 00000000000000000000000000000000000000000000000000000000000000001\") == 1\n assert candidate(s = \" +1234567890123456789012345678901234567890\") == 2147483647\n assert candidate(s = \" -214748364800000000000000000000000\") == -2147483648\n assert candidate(s = \" -2147483648000000000\") == -2147483648\n assert candidate(s = \" 0000+123\") == 0\n assert candidate(s = \" -21474836480000000000\") == -2147483648\n assert candidate(s = \" -1234567890123456789012345678901234567890\") == -2147483648\n assert candidate(s = \" -2147483646\") == -2147483646\n assert candidate(s = \" -21474836480000000000000000000000000\") == -2147483648\n assert candidate(s = \" 2147483647\") == 2147483647\n assert candidate(s = \" 214748364700000000000000000000000000\") == 2147483647\n assert candidate(s = \" -214748364800000000000\") == -2147483648\n assert candidate(s = \" +2147483647abc\") == 2147483647\n assert candidate(s = \" 21474836470\") == 2147483647\n assert candidate(s = \" 0000000000000 123abc\") == 0\n assert candidate(s = \" 21474836470000000000\") == 2147483647\n assert candidate(s = \" +123 456\") == 123\n assert candidate(s = \" 2147483647000000000000000000\") == 2147483647\n assert candidate(s = \" 0000000000000000000000000000000000000000000000000000000000000000-1\") == 0\n assert candidate(s = \" ABCDEFGHIJKLMNOPQRSTUVWXYZ\") == 0\n assert candidate(s = \" -2147483648000000000000000000000000000\") == -2147483648\n assert candidate(s = \" -2147483649\") == -2147483648\n assert candidate(s = \"-+12\") == 0\n assert candidate(s = \" +2147483647\") == 2147483647\n assert candidate(s = \" 18446744073709551616\") == 2147483647\n assert candidate(s = \" +0000000000000000000000000000000000000000000123\") == 123\n assert candidate(s = \" 00000000000000000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \" 21474836470000000000000\") == 2147483647\n assert candidate(s = \" 214748364700000\") == 2147483647\n assert candidate(s = \" 2147483647000000000\") == 2147483647\n assert candidate(s = \" 0000000000000 -123abc\") == 0\n assert candidate(s = \" 0000000000000 -00001\") == 0\n assert candidate(s = \" -000\") == 0\n assert candidate(s = \" 214748364700000000\") == 2147483647\n assert candidate(s = \" -2147483647\") == -2147483647\n assert candidate(s = \" 21474836470000000000000000000000000000\") == 2147483647\n assert candidate(s = \" -21474836480000000000000\") == -2147483648\n assert candidate(s = \" -21474836480000000000000000\") == -2147483648\n assert candidate(s = \" -2147483648 +\") == -2147483648\n assert candidate(s = \" 0000000000000 +00001\") == 0\n assert candidate(s = \" 2147483647\") == 2147483647\n", "comparison": "exact"}, "public_tests": ["\"42\"", "\" -042\"", "\"1337c0d3\"", "\"0-1\"", "\"words and 987\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().myAtoi", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:47+00:00", "tests_total": 185, "tests_dropped": 1, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def my_atoi(s)", "container": null, "callable": "my_atoi", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 9, "task_id": "palindrome-number", "difficulty": "Easy", "problem_description": "Given an integer x, return true if x is a palindrome, and false otherwise.\n\nExample 1:\n\nInput: x = 121\nOutput: true\nExplanation: 121 reads as 121 from left to right and from right to left.\n\nExample 2:\n\nInput: x = -121\nOutput: false\nExplanation: From left to right, it reads -121. From right to left, it becomes 121-. Therefore it is not a palindrome.\n\nExample 3:\n\nInput: x = 10\nOutput: false\nExplanation: Reads 01 from right to left. Therefore it is not a palindrome.\n\nConstraints:\n\n- -2^31 <= x <= 2^31 - 1\n\nFollow up: Could you solve it without converting the integer to a string?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(x = 1221) == True\n assert candidate(x = 10) == False\n assert candidate(x = 123421) == False\n assert candidate(x = 1) == True\n assert candidate(x = -121) == False\n assert candidate(x = 123456) == False\n assert candidate(x = -2147483648) == False\n assert candidate(x = 1000000001) == True\n assert candidate(x = 1111111111) == True\n assert candidate(x = 0) == True\n assert candidate(x = 123321) == True\n assert candidate(x = 2147483647) == False\n assert candidate(x = 1000021) == False\n assert candidate(x = -1000021) == False\n assert candidate(x = 12321) == True\n assert candidate(x = 1234321) == True\n assert candidate(x = -12321) == False\n assert candidate(x = 121) == True\n assert candidate(x = -1221) == False\n assert candidate(x = 1100110011) == True\n assert candidate(x = 987656789) == True\n assert candidate(x = 101010101) == True\n assert candidate(x = 1001001) == True\n assert candidate(x = 12300321) == True\n assert candidate(x = 2147447412) == True\n assert candidate(x = 999999999) == True\n assert candidate(x = 987898789) == True\n assert candidate(x = -1000000001) == False\n assert candidate(x = 2121212121) == False\n assert candidate(x = 123321000) == False\n assert candidate(x = 1001) == True\n assert candidate(x = 1230321) == True\n assert candidate(x = 12211221) == True\n assert candidate(x = 1002001) == True\n assert candidate(x = 98789) == True\n assert candidate(x = 123454321) == True\n assert candidate(x = 1000000000) == False\n", "comparison": "exact"}, "public_tests": ["121", "-121", "10"], "hints": ["Beware of overflow when you reverse the integer."], "metadata": {"canonical_parameter_names": ["x"], "leetcode_dataset_entry_point": "Solution().isPalindrome", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:49+00:00", "tests_total": 61, "tests_dropped": 24, "flags": [], "topic_tags": ["math"]}, "language": "ruby", "interface": {"raw_signature": "def is_palindrome(x)", "container": null, "callable": "is_palindrome", "parameters": [{"name": "x", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 10, "task_id": "regular-expression-matching", "difficulty": "Hard", "problem_description": "Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where:\n\n- '.' Matches any single character.\n- '*' Matches zero or more of the preceding element.\n\nReturn a boolean indicating whether the matching covers the entire input string (not partial).\n\nExample 1:\n\nInput: s = \"aa\", p = \"a\"\nOutput: false\nExplanation: \"a\" does not match the entire string \"aa\".\n\nExample 2:\n\nInput: s = \"aa\", p = \"a*\"\nOutput: true\nExplanation: '*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes \"aa\".\n\nExample 3:\n\nInput: s = \"ab\", p = \".*\"\nOutput: true\nExplanation: \".*\" means \"zero or more (*) of any character (.)\".\n\nConstraints:\n\n- 1 <= s.length <= 20\n- 1 <= p.length <= 20\n- s contains only lowercase English letters.\n- p contains only lowercase English letters, '.', and '*'.\n- It is guaranteed for each appearance of the character '*', there will be a previous valid character to match.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"aa\",p = \"a*\") == True\n assert candidate(s = \"aab\",p = \"c*a*b\") == True\n assert candidate(s = \"ab\",p = \".*\") == True\n assert candidate(s = \"aa\",p = \"a\") == False\n assert candidate(s = \"mississippi\",p = \"mis*is*p*.\") == False\n assert candidate(s = \"aabbccddeeff\",p = \"a*b*c*d*e*f*f*\") == True\n assert candidate(s = \"abcde\",p = \"a*.*e\") == True\n assert candidate(s = \"ababcd\",p = \"a.*a.*d\") == True\n assert candidate(s = \"aabbbbc\",p = \"a*b*c\") == True\n assert candidate(s = \"aaaaaa\",p = \"a*a*a*a*a*a\") == True\n assert candidate(s = \"aabb\",p = \"ab*a*b*\") == True\n assert candidate(s = \"abcccccaaaa\",p = \"ab*c*a*.*\") == True\n assert candidate(s = \"abcdef\",p = \"abc.*f\") == True\n assert candidate(s = \"ab\",p = \"a*b*c*d*.*e*\") == True\n assert candidate(s = \"xaymz\",p = \"x.*z\") == True\n assert candidate(s = \"xaybz\",p = \"xa*y*b*z\") == True\n assert candidate(s = \"abcdefgh\",p = \"a*d*fh\") == False\n assert candidate(s = \"mississippi\",p = \"mi*ss*is*si*p*i*\") == True\n assert candidate(s = \"zzzz\",p = \"z*\") == True\n assert candidate(s = \"abcdefgh\",p = \"a.h\") == False\n assert candidate(s = \"abcdefgh\",p = \"a.*h\") == True\n assert candidate(s = \"mississippi\",p = \"mi.*is.*p*i\") == True\n assert candidate(s = \"abcdefgh\",p = \"abcdefgh\") == True\n assert candidate(s = \"abcdefg\",p = \"a*bc.d*efg\") == True\n assert candidate(s = \"abcdefgh\",p = \"a*b*c*d*e*f*g*h\") == True\n assert candidate(s = \"abcdefgh\",p = \"a*b*c*d*e*f*g*h*\") == True\n assert candidate(s = \"abcd\",p = \"a.b.c.d\") == False\n assert candidate(s = \"aabbcc\",p = \"a*b*c*c\") == True\n assert candidate(s = \"abc\",p = \"abc.\") == False\n assert candidate(s = \"mississippi\",p = \"m*is*i*s*i*p*i\") == True\n assert candidate(s = \"mississippi\",p = \"m*i*ss*i*p*i*\") == False\n assert candidate(s = \"abcde\",p = \"a.*de\") == True\n assert candidate(s = \"abcdeabcde\",p = \"abc*de*abc*de*\") == True\n assert candidate(s = \"abcd\",p = \"a*b*c*d*\") == True\n assert candidate(s = \"abcde\",p = \"a*.b*c*e*\") == False\n assert candidate(s = \"aabbbcccddd\",p = \"a*b*c*d*\") == True\n assert candidate(s = \"abc\",p = \"a.b.c\") == False\n assert candidate(s = \"hello\",p = \"he*llo*\") == True\n assert candidate(s = \"hello\",p = \"he.*o\") == True\n assert candidate(s = \"abcd\",p = \"d*\") == False\n assert candidate(s = \"abcde\",p = \"a..de\") == True\n assert candidate(s = \"abcdabcd\",p = \"abcd*\") == False\n assert candidate(s = \"aabb\",p = \"aab*b*\") == True\n assert candidate(s = \"xyzzy\",p = \"x*zy\") == False\n assert candidate(s = \"abcd\",p = \"a.*d\") == True\n assert candidate(s = \"xxyyzz\",p = \"x*y*z*\") == True\n assert candidate(s = \"abc\",p = \"a.c\") == True\n assert candidate(s = \"aabbbccc\",p = \"a*b*c*\") == True\n assert candidate(s = \"abcdef\",p = \"a*bcdef\") == True\n assert candidate(s = \"aaaab\",p = \"a*b*\") == True\n assert candidate(s = \"complex\",p = \"c*o*m*p*l*e*x*\") == True\n assert candidate(s = \"aaa\",p = \"a*a\") == True\n assert candidate(s = \"xyz\",p = \"x*y*z*\") == True\n assert candidate(s = \"abcdefgh\",p = \"a.*g\") == False\n assert candidate(s = \"abcde\",p = \"a*b.c*d*e*\") == True\n assert candidate(s = \"abcde\",p = \"a*b*c*d*e*\") == True\n assert candidate(s = \"aabbccddeeff\",p = \"a*b*c*d*e*f*\") == True\n assert candidate(s = \"hello\",p = \"he.*\") == True\n assert candidate(s = \"abcde\",p = \"a*b*c*d.e\") == False\n assert candidate(s = \"aaaaabbb\",p = \"a*b*.*\") == True\n assert candidate(s = \"aabbccddeeffgghh\",p = \"a*b*c*d*e*f*g*h*\") == True\n assert candidate(s = \"abbabb\",p = \"a*b*b*\") == False\n assert candidate(s = \"sequence\",p = \"s.e*q*u*e*n*c*e*\") == True\n assert candidate(s = \"abcdabcd\",p = \"a*b*c*d*\") == False\n assert candidate(s = \"abcdedef\",p = \"abcd*e*f*\") == False\n assert candidate(s = \"abcdefgh\",p = \"a.b.c.d.e.f.g.h\") == False\n assert candidate(s = \"mississippi\",p = \"mi.*.pi.*\") == True\n assert candidate(s = \"hello\",p = \"he*ll*o\") == True\n assert candidate(s = \"abcde\",p = \"a*bc.e*\") == True\n assert candidate(s = \"aaaab\",p = \"a*a*a*a\") == False\n assert candidate(s = \"abcde\",p = \"a.*e\") == True\n assert candidate(s = \"aabbb\",p = \"a*b*b\") == True\n assert candidate(s = \"regex\",p = \"r.e*g*e*x*\") == True\n assert candidate(s = \"abcdef\",p = \"a*b*c*d*e*f*\") == True\n assert candidate(s = \"aaaa\",p = \"a*a*a*a\") == True\n assert candidate(s = \"teststring\",p = \"te*t*st*ring\") == False\n assert candidate(s = \"abcde\",p = \"a*b*c*de\") == True\n assert candidate(s = \"bbbac\",p = \"ba*ac\") == False\n assert candidate(s = \"aabbccddeeffgg\",p = \"a*b*c*d*e*f*g*\") == True\n assert candidate(s = \"abcde\",p = \"a*bc*de\") == True\n assert candidate(s = \"a\",p = \"a*a*a*a*\") == True\n assert candidate(s = \"abababab\",p = \"a*b*a*b*a*b*a*b\") == True\n assert candidate(s = \"abbbba\",p = \"ab*ba\") == True\n assert candidate(s = \"teststring\",p = \"t.*st.*r.*ing\") == True\n assert candidate(s = \"abcabc\",p = \"abc*\") == False\n assert candidate(s = \"abcd\",p = \"a*b*c*d*.*\") == True\n assert candidate(s = \"zzzzzzzzzzzz\",p = \"z*\") == True\n assert candidate(s = \"mississippi\",p = \"m.*s*is*p*i*.*\") == True\n assert candidate(s = \"abcdefgh\",p = \".*\") == True\n assert candidate(s = \"abcdefg\",p = \".*f.*\") == True\n assert candidate(s = \"abccde\",p = \"abc*d*e\") == True\n assert candidate(s = \"aabbbccdd\",p = \"aa*bbb*cc*dd*\") == True\n assert candidate(s = \"foobar\",p = \"fo*oba*r\") == True\n assert candidate(s = \"abcde\",p = \"a.*f\") == False\n assert candidate(s = \"aabb\",p = \"a*b*b*a*\") == True\n assert candidate(s = \"zabczabcz\",p = \"z*abc*z*\") == False\n assert candidate(s = \"aaaabbbb\",p = \"a*b*b*\") == True\n assert candidate(s = \"aabbcc\",p = \"a*b*b*c*c*\") == True\n assert candidate(s = \"abc\",p = \"a*b*c*\") == True\n assert candidate(s = \"abcde\",p = \"a*c*e\") == False\n assert candidate(s = \"xyzzaz\",p = \"x*y*.*z*\") == True\n assert candidate(s = \"abcdef\",p = \"abc.def\") == False\n assert candidate(s = \"xyx\",p = \"x*y*x*\") == True\n assert candidate(s = \"aaaaaa\",p = \"a*a*a*a*\") == True\n assert candidate(s = \"abbb\",p = \"ab*\") == True\n assert candidate(s = \"a\",p = \".\") == True\n assert candidate(s = \"abcdexyz\",p = \"abc.*xyz\") == True\n assert candidate(s = \"aabbcc\",p = \"a*b*c*\") == True\n assert candidate(s = \"leetcode\",p = \"le.*e.*tcode\") == True\n assert candidate(s = \"aaa\",p = \"ab*a*c*a\") == True\n assert candidate(s = \"abcd\",p = \"a.d\") == False\n assert candidate(s = \"xylophone\",p = \"x.l*o.h.p*ne\") == True\n assert candidate(s = \"abcde\",p = \".*\") == True\n assert candidate(s = \"abxyzbcd\",p = \"ab.*bc*d\") == True\n assert candidate(s = \"zzzzz\",p = \"z*\") == True\n assert candidate(s = \"aaa\",p = \"a*a*\") == True\n assert candidate(s = \"aaaaaaab\",p = \"a*a*a*a*a*a*a*b\") == True\n assert candidate(s = \"hello\",p = \"h.l.o\") == True\n assert candidate(s = \"abcd\",p = \"a.b*c.d\") == False\n assert candidate(s = \"abcdefgh\",p = \"abcdefgh.\") == False\n assert candidate(s = \"a\",p = \"ab*a\") == False\n assert candidate(s = \"patternmatching\",p = \"pat*tern*m*atching*\") == True\n assert candidate(s = \"abcd\",p = \"a.c*d*\") == True\n assert candidate(s = \"a\",p = \".*\") == True\n assert candidate(s = \"abcdef\",p = \"abcd.e*f\") == True\n assert candidate(s = \"aabb\",p = \"a*bb\") == True\n assert candidate(s = \"abcdefgh\",p = \"abcdefgh*\") == True\n assert candidate(s = \"aaa\",p = \"a*a*a*a*a*a*\") == True\n assert candidate(s = \"aaaaaa\",p = \"a*a*a*a*a*a*\") == True\n assert candidate(s = \"mississippi\",p = \"mi*s*is*ip*pi*s*\") == True\n assert candidate(s = \"aaaaab\",p = \"a*ba*\") == True\n assert candidate(s = \"abc\",p = \".b.\") == True\n assert candidate(s = \"abcd\",p = \"a*b.c*d*\") == True\n", "comparison": "exact"}, "public_tests": ["\"aa\"\n\"a\"", "\"aa\"\n\"a*\"", "\"ab\"\n\".*\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "p"], "leetcode_dataset_entry_point": "Solution().isMatch", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:52+00:00", "tests_total": 151, "tests_dropped": 18, "flags": [], "topic_tags": ["string", "dynamic-programming", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def is_match(s, p)", "container": null, "callable": "is_match", "parameters": [{"name": "s", "type": "String"}, {"name": "p", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 11, "task_id": "container-with-most-water", "difficulty": "Medium", "problem_description": "You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the i^th line are (i, 0) and (i, height[i]).\n\nFind two lines that together with the x-axis form a container, such that the container contains the most water.\n\nReturn the maximum amount of water a container can store.\n\nNotice that you may not slant the container.\n\nExample 1:\n\nInput: height = [1,8,6,2,5,4,8,3,7]\nOutput: 49\nExplanation: The above vertical lines are represented by array [1,8,6,2,5,4,8,3,7]. In this case, the max area of water (blue section) the container can contain is 49.\n\nExample 2:\n\nInput: height = [1,1]\nOutput: 1\n\nConstraints:\n\n- n == height.length\n- 2 <= n <= 10^5\n- 0 <= height[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(height = [1, 1]) == 1\n assert candidate(height = [4, 3, 2, 1, 4]) == 16\n assert candidate(height = [8, 10, 14, 0, 13, 10, 9, 9, 8, 9]) == 72\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7]) == 49\n assert candidate(height = [2, 3, 4, 5, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 81\n assert candidate(height = [2, 3, 10, 5, 7, 8, 9]) == 36\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(height = [1, 2, 4, 3]) == 4\n assert candidate(height = [1, 2, 3, 4, 5]) == 6\n assert candidate(height = [1, 3, 2, 5, 25, 24, 5]) == 24\n assert candidate(height = [1, 2, 1]) == 2\n assert candidate(height = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 25\n assert candidate(height = [1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1]) == 220000\n assert candidate(height = [5, 8, 6, 2, 5, 4, 8, 3, 7, 9, 10, 11, 10, 9, 7, 3, 8, 4, 5, 2, 6, 8, 5, 3, 7, 9, 1, 4, 6, 8]) == 224\n assert candidate(height = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 160\n assert candidate(height = [10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1]) == 180\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 120\n assert candidate(height = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 200\n assert candidate(height = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 56\n assert candidate(height = [5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == 50\n assert candidate(height = [5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5, 8, 5]) == 128\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 10000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 19\n assert candidate(height = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000]) == 300000\n assert candidate(height = [1, 3, 2, 5, 25, 24, 5, 2, 3, 1]) == 24\n assert candidate(height = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 190\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 50\n assert candidate(height = [5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 5000]) == 45000\n assert candidate(height = [2, 1, 5, 6, 2, 3, 1, 4, 5, 1, 5, 6, 2, 3, 1, 4, 5, 1]) == 70\n assert candidate(height = [10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000]) == 25000\n assert candidate(height = [10000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 25\n assert candidate(height = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 90\n assert candidate(height = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 180\n assert candidate(height = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 120\n assert candidate(height = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10]) == 66\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 100\n assert candidate(height = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 2000\n assert candidate(height = [1000, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 29\n assert candidate(height = [2, 3, 10, 5, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 240\n assert candidate(height = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 90\n assert candidate(height = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986]) == 139804\n assert candidate(height = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]) == 19000\n assert candidate(height = [10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(height = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 19000\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 400\n assert candidate(height = [50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60]) == 950\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 12, 4, 3, 2, 1, 4, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 176\n assert candidate(height = [3, 9, 3, 4, 7, 2, 12, 6, 5, 10, 1, 8]) == 80\n assert candidate(height = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 180\n assert candidate(height = [5, 10, 8, 3, 7, 6, 10, 4, 1, 9]) == 72\n assert candidate(height = [100, 200, 300, 400, 300, 200, 100, 200, 300, 400, 300, 200, 100]) == 2400\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 10, 12, 11]) == 80\n assert candidate(height = [1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7]) == 36\n assert candidate(height = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 18, 16, 14, 12, 10]) == 100\n assert candidate(height = [1, 2, 3, 4, 5, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 56\n assert candidate(height = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(height = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 500\n assert candidate(height = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]) == 24000\n assert candidate(height = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 1539\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000]) == 29\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 50\n assert candidate(height = [9985, 9984, 9983, 9982, 9981, 9980, 9979, 9978, 9977, 9976, 9975, 9974, 9973, 9972, 9971]) == 139594\n assert candidate(height = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 70\n assert candidate(height = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 250\n assert candidate(height = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 56\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 450\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 25, 7]) == 49\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 136\n assert candidate(height = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 80\n assert candidate(height = [10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000, 1, 10000]) == 240000\n assert candidate(height = [100, 200, 150, 300, 250, 400, 350, 500, 450, 600, 550, 700, 650, 800, 750, 900, 850, 1000]) == 5000\n assert candidate(height = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000]) == 50000\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 180\n assert candidate(height = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 95\n assert candidate(height = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1]) == 120\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10000]) == 25\n assert candidate(height = [1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 1, 5, 4, 3, 2, 1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 1]) == 75\n assert candidate(height = [2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(height = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 16\n assert candidate(height = [1, 1, 1, 1, 100, 1, 1, 1, 1, 1, 100, 1, 1, 1, 1, 1, 100, 1, 1, 1]) == 1200\n assert candidate(height = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2]) == 48\n assert candidate(height = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 190\n assert candidate(height = [10, 9, 8, 10, 9, 8, 10, 9, 8, 10, 9, 8, 10, 9, 8, 10, 9, 8, 10]) == 180\n assert candidate(height = [1, 2, 3, 4, 5, 15, 5, 4, 3, 2, 1, 15, 1, 2, 3, 4, 5, 15, 5, 4, 3, 2, 1]) == 180\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 50\n assert candidate(height = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 36\n assert candidate(height = [5, 3, 8, 4, 2, 7, 9, 6, 1]) == 35\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 112\n assert candidate(height = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 120\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 100\n assert candidate(height = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 45\n assert candidate(height = [10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1]) == 140\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 100\n assert candidate(height = [12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 36\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 14\n assert candidate(height = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 6, 5, 7, 4, 8, 3, 9, 2, 10, 1]) == 170\n assert candidate(height = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2]) == 48\n assert candidate(height = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 90\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 200\n assert candidate(height = [8, 10, 12, 10, 6, 5, 4, 3, 2, 1]) == 25\n assert candidate(height = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 55\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 10, 2, 15, 1, 5, 3]) == 80\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 180\n assert candidate(height = [100, 20, 300, 40, 500, 60, 700, 80, 900, 1000, 100, 900, 80, 700, 60, 500, 40, 300, 20, 100]) == 5500\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 44\n assert candidate(height = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 800\n assert candidate(height = [39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 190\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 200\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 9, 10, 11, 12, 13, 14]) == 104\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 29\n assert candidate(height = [1, 3, 5, 7, 9, 11, 13, 15, 13, 11, 9, 7, 5, 3, 1]) == 56\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 56\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 10, 11, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 144\n assert candidate(height = [1, 2, 3, 100, 2, 3, 100, 2, 3, 100, 2, 3, 100, 2, 3, 100, 2, 3, 100]) == 1500\n assert candidate(height = [100, 50, 30, 60, 100, 40, 20, 80, 70, 90, 10]) == 810\n assert candidate(height = [8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7]) == 98\n assert candidate(height = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 36\n", "comparison": "exact"}, "public_tests": ["[1,8,6,2,5,4,8,3,7]", "[1,1]"], "hints": ["If you simulate the problem, it will be O(n^2) which is not efficient.", "Try to use two-pointers. Set one pointer to the left and one to the right of the array. Always move the pointer that points to the lower line.", "How can you calculate the amount of water at each step?"], "metadata": {"canonical_parameter_names": ["height"], "leetcode_dataset_entry_point": "Solution().maxArea", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:54+00:00", "tests_total": 116, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "two-pointers", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def max_area(height)", "container": null, "callable": "max_area", "parameters": [{"name": "height", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 12, "task_id": "integer-to-roman", "difficulty": "Medium", "problem_description": "Seven different symbols represent Roman numerals with the following values:\n\nSymbol | Value\nI | 1\nV | 5\nX | 10\nL | 50\nC | 100\nD | 500\nM | 1000\n\nRoman numerals are formed by appending the conversions of decimal place values from highest to lowest. Converting a decimal place value into a Roman numeral has the following rules:\n\n- If the value does not start with 4 or 9, select the symbol of the maximal value that can be subtracted from the input, append that symbol to the result, subtract its value, and convert the remainder to a Roman numeral.\n- If the value starts with 4 or 9 use the subtractive form representing one symbol subtracted from the following symbol, for example, 4 is 1 (I) less than 5 (V): IV and 9 is 1 (I) less than 10 (X): IX. Only the following subtractive forms are used: 4 (IV), 9 (IX), 40 (XL), 90 (XC), 400 (CD) and 900 (CM).\n- Only powers of 10 (I, X, C, M) can be appended consecutively at most 3 times to represent multiples of 10. You cannot append 5 (V), 50 (L), or 500 (D) multiple times. If you need to append a symbol 4 times use the subtractive form.\n\nGiven an integer, convert it to a Roman numeral.\n\nExample 1:\n\nInput: num = 3749\nOutput: \"MMMDCCXLIX\"\nExplanation:\n\n3000 = MMM as 1000 (M) + 1000 (M) + 1000 (M)\n 700 = DCC as 500 (D) + 100 (C) + 100 (C)\n 40 = XL as 10 (X) less of 50 (L)\n 9 = IX as 1 (I) less of 10 (X)\nNote: 49 is not 1 (I) less of 50 (L) because the conversion is based on decimal places\n\nExample 2:\n\nInput: num = 58\nOutput: \"LVIII\"\nExplanation:\n\n50 = L\n 8 = VIII\n\nExample 3:\n\nInput: num = 1994\nOutput: \"MCMXCIV\"\nExplanation:\n\n1000 = M\n 900 = CM\n 90 = XC\n 4 = IV\n\nConstraints:\n\n- 1 <= num <= 3999\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 44) == \"XLIV\"\n assert candidate(num = 9) == \"IX\"\n assert candidate(num = 4) == \"IV\"\n assert candidate(num = 2023) == \"MMXXIII\"\n assert candidate(num = 589) == \"DLXXXIX\"\n assert candidate(num = 444) == \"CDXLIV\"\n assert candidate(num = 1000) == \"M\"\n assert candidate(num = 789) == \"DCCLXXXIX\"\n assert candidate(num = 58) == \"LVIII\"\n assert candidate(num = 3999) == \"MMMCMXCIX\"\n assert candidate(num = 399) == \"CCCXCIX\"\n assert candidate(num = 3749) == \"MMMDCCXLIX\"\n assert candidate(num = 1994) == \"MCMXCIV\"\n assert candidate(num = 1) == \"I\"\n assert candidate(num = 3549) == \"MMMDXLIX\"\n assert candidate(num = 944) == \"CMXLIV\"\n assert candidate(num = 199) == \"CXCIX\"\n assert candidate(num = 60) == \"LX\"\n assert candidate(num = 621) == \"DCXXI\"\n assert candidate(num = 3000) == \"MMM\"\n assert candidate(num = 1499) == \"MCDXCIX\"\n assert candidate(num = 1602) == \"MDCII\"\n assert candidate(num = 999) == \"CMXCIX\"\n assert candidate(num = 207) == \"CCVII\"\n assert candidate(num = 2078) == \"MMLXXVIII\"\n assert candidate(num = 894) == \"DCCCXCIV\"\n assert candidate(num = 2421) == \"MMCDXXI\"\n assert candidate(num = 2999) == \"MMCMXCIX\"\n assert candidate(num = 149) == \"CXLIX\"\n assert candidate(num = 3949) == \"MMMCMXLIX\"\n assert candidate(num = 99) == \"XCIX\"\n assert candidate(num = 1492) == \"MCDXCII\"\n assert candidate(num = 1234) == \"MCCXXXIV\"\n assert candidate(num = 647) == \"DCXLVII\"\n assert candidate(num = 844) == \"DCCCXLIV\"\n assert candidate(num = 798) == \"DCCXCVIII\"\n assert candidate(num = 1043) == \"MXLIII\"\n assert candidate(num = 3001) == \"MMMI\"\n assert candidate(num = 2345) == \"MMCCCXLV\"\n assert candidate(num = 500) == \"D\"\n assert candidate(num = 746) == \"DCCXLVI\"\n assert candidate(num = 2944) == \"MMCMXLIV\"\n assert candidate(num = 1500) == \"MD\"\n assert candidate(num = 3357) == \"MMMCCCLVII\"\n assert candidate(num = 3388) == \"MMMCCCLXXXVIII\"\n assert candidate(num = 1597) == \"MDXCVII\"\n assert candidate(num = 2737) == \"MMDCCXXXVII\"\n assert candidate(num = 40) == \"XL\"\n assert candidate(num = 2708) == \"MMDCCVIII\"\n assert candidate(num = 349) == \"CCCXLIX\"\n assert candidate(num = 799) == \"DCCXCIX\"\n assert candidate(num = 1001) == \"MI\"\n assert candidate(num = 583) == \"DLXXXIII\"\n assert candidate(num = 2422) == \"MMCDXXII\"\n assert candidate(num = 891) == \"DCCCXCI\"\n assert candidate(num = 39) == \"XXXIX\"\n assert candidate(num = 1444) == \"MCDXLIV\"\n assert candidate(num = 1094) == \"MXCIV\"\n assert candidate(num = 2751) == \"MMDCCLI\"\n assert candidate(num = 3888) == \"MMMDCCCLXXXVIII\"\n assert candidate(num = 2994) == \"MMCMXCIV\"\n assert candidate(num = 876) == \"DCCCLXXVI\"\n assert candidate(num = 1009) == \"MIX\"\n assert candidate(num = 1648) == \"MDCXLVIII\"\n assert candidate(num = 1066) == \"MLXVI\"\n assert candidate(num = 2349) == \"MMCCCXLIX\"\n assert candidate(num = 2763) == \"MMDCCLXIII\"\n assert candidate(num = 1646) == \"MDCXLVI\"\n assert candidate(num = 3499) == \"MMMCDXCIX\"\n assert candidate(num = 1529) == \"MDXXIX\"\n assert candidate(num = 1453) == \"MCDLIII\"\n assert candidate(num = 1099) == \"MXCIX\"\n assert candidate(num = 299) == \"CCXCIX\"\n assert candidate(num = 89) == \"LXXXIX\"\n assert candidate(num = 2074) == \"MMLXXIV\"\n assert candidate(num = 2549) == \"MMDXLIX\"\n assert candidate(num = 1423) == \"MCDXXIII\"\n", "comparison": "exact"}, "public_tests": ["3749", "58", "1994"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().intToRoman", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:56+00:00", "tests_total": 77, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def int_to_roman(num)", "container": null, "callable": "int_to_roman", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 13, "task_id": "roman-to-integer", "difficulty": "Easy", "problem_description": "Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.\n\nSymbol Value\nI 1\nV 5\nX 10\nL 50\nC 100\nD 500\nM 1000\n\nFor example, 2 is written as II in Roman numeral, just two ones added together. 12 is written as XII, which is simply X + II. The number 27 is written as XXVII, which is XX + V + II.\n\nRoman numerals are usually written largest to smallest from left to right. However, the numeral for four is not IIII. Instead, the number four is written as IV. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as IX. There are six instances where subtraction is used:\n\n- I can be placed before V (5) and X (10) to make 4 and 9.\n- X can be placed before L (50) and C (100) to make 40 and 90.\n- C can be placed before D (500) and M (1000) to make 400 and 900.\n\nGiven a roman numeral, convert it to an integer.\n\nExample 1:\n\nInput: s = \"III\"\nOutput: 3\nExplanation: III = 3.\n\nExample 2:\n\nInput: s = \"LVIII\"\nOutput: 58\nExplanation: L = 50, V= 5, III = 3.\n\nExample 3:\n\nInput: s = \"MCMXCIV\"\nOutput: 1994\nExplanation: M = 1000, CM = 900, XC = 90 and IV = 4.\n\nConstraints:\n\n- 1 <= s.length <= 15\n- s contains only the characters ('I', 'V', 'X', 'L', 'C', 'D', 'M').\n- It is guaranteed that s is a valid roman numeral in the range [1, 3999].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"XCIX\") == 99\n assert candidate(s = \"MMCMXCIX\") == 2999\n assert candidate(s = \"MMMCMXCIX\") == 3999\n assert candidate(s = \"DCXXI\") == 621\n assert candidate(s = \"XC\") == 90\n assert candidate(s = \"VIII\") == 8\n assert candidate(s = \"XV\") == 15\n assert candidate(s = \"XXVII\") == 27\n assert candidate(s = \"IX\") == 9\n assert candidate(s = \"DCCLXXIX\") == 779\n assert candidate(s = \"XX\") == 20\n assert candidate(s = \"CDXLIV\") == 444\n assert candidate(s = \"LVIII\") == 58\n assert candidate(s = \"CM\") == 900\n assert candidate(s = \"D\") == 500\n assert candidate(s = \"X\") == 10\n assert candidate(s = \"IV\") == 4\n assert candidate(s = \"XXV\") == 25\n assert candidate(s = \"XXX\") == 30\n assert candidate(s = \"XL\") == 40\n assert candidate(s = \"MMMDCCCLXXXVIII\") == 3888\n assert candidate(s = \"XXXIX\") == 39\n assert candidate(s = \"XLIV\") == 44\n assert candidate(s = \"CCCXCIX\") == 399\n assert candidate(s = \"CD\") == 400\n assert candidate(s = \"LXX\") == 70\n assert candidate(s = \"CCC\") == 300\n assert candidate(s = \"MMM\") == 3000\n assert candidate(s = \"MCMXCIV\") == 1994\n assert candidate(s = \"III\") == 3\n assert candidate(s = \"MDCCCLXXIV\") == 1874\n assert candidate(s = \"CMXCIX\") == 999\n assert candidate(s = \"MMCDXCIX\") == 2499\n assert candidate(s = \"M\") == 1000\n assert candidate(s = \"CCXLVI\") == 246\n assert candidate(s = \"CC\") == 200\n assert candidate(s = \"DCCLXXIV\") == 774\n assert candidate(s = \"MCCCLXXXIX\") == 1389\n assert candidate(s = \"CMLXXXVII\") == 987\n assert candidate(s = \"XCIV\") == 94\n assert candidate(s = \"MDCCLXXVI\") == 1776\n assert candidate(s = \"DCCLXXVI\") == 776\n assert candidate(s = \"CMXLVII\") == 947\n assert candidate(s = \"MMMCMLXXIV\") == 3974\n assert candidate(s = \"MDCCCLXXI\") == 1871\n assert candidate(s = \"MMMDCCCLXXVII\") == 3877\n assert candidate(s = \"MMMCMXCXCIX\") == 4089\n assert candidate(s = \"MMMLXXVIII\") == 3078\n assert candidate(s = \"CCCLXXIV\") == 374\n assert candidate(s = \"MCMXLIV\") == 1944\n assert candidate(s = \"MMCDLXXI\") == 2471\n assert candidate(s = \"DCCCLXXXVIII\") == 888\n assert candidate(s = \"MMDCCCLXXIV\") == 2874\n assert candidate(s = \"MMCDXLIV\") == 2444\n assert candidate(s = \"MMDCCCLXXVII\") == 2877\n assert candidate(s = \"MMMDCCCXCIX\") == 3899\n assert candidate(s = \"LXXXIX\") == 89\n assert candidate(s = \"DCCCLXXVIII\") == 878\n assert candidate(s = \"MMXXIII\") == 2023\n assert candidate(s = \"LXXXVII\") == 87\n assert candidate(s = \"MMMCMXCXC\") == 4080\n assert candidate(s = \"DCCCXC\") == 890\n assert candidate(s = \"MMCMCCXCIX\") == 3199\n assert candidate(s = \"MMMDCCCLXXX\") == 3880\n assert candidate(s = \"MDCCCCLXXV\") == 1975\n assert candidate(s = \"MCMXCMLXXIX\") == 2869\n assert candidate(s = \"MMMDCCCLXXIX\") == 3879\n assert candidate(s = \"CDXC\") == 490\n assert candidate(s = \"MCMLXXI\") == 1971\n assert candidate(s = \"MCMLIV\") == 1954\n assert candidate(s = \"MMDCCCXCIX\") == 2899\n assert candidate(s = \"CCXCIX\") == 299\n assert candidate(s = \"MMMCMXCCLXXVIII\") == 4168\n assert candidate(s = \"CDXCIX\") == 499\n assert candidate(s = \"MMMCMLXXIX\") == 3979\n assert candidate(s = \"DCCLXXVIII\") == 778\n assert candidate(s = \"MDCCCLXXVIII\") == 1878\n assert candidate(s = \"MMDCCCLXXXVIII\") == 2888\n assert candidate(s = \"MCMXLVII\") == 1947\n assert candidate(s = \"DCXXVIII\") == 628\n assert candidate(s = \"CCXLVIII\") == 248\n assert candidate(s = \"MMMCDXLIV\") == 3444\n assert candidate(s = \"DCCCXCIX\") == 899\n assert candidate(s = \"DCCCXCIV\") == 894\n assert candidate(s = \"DCCCLXXIV\") == 874\n assert candidate(s = \"MCMLXXIII\") == 1973\n assert candidate(s = \"MMMCDXCIX\") == 3499\n assert candidate(s = \"MMCDLXXVIII\") == 2478\n assert candidate(s = \"LVIV\") == 59\n assert candidate(s = \"MMCDXXI\") == 2421\n assert candidate(s = \"MDCCCLXXVII\") == 1877\n assert candidate(s = \"LXXXIV\") == 84\n assert candidate(s = \"CMXLIV\") == 944\n assert candidate(s = \"MCMLXXXIV\") == 1984\n", "comparison": "exact"}, "public_tests": ["\"III\"", "\"LVIII\"", "\"MCMXCIV\""], "hints": ["Problem is simpler to solve by working the string from back to front and using a map."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().romanToInt", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:35:58+00:00", "tests_total": 94, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def roman_to_int(s)", "container": null, "callable": "roman_to_int", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 14, "task_id": "longest-common-prefix", "difficulty": "Easy", "problem_description": "Write a function to find the longest common prefix string amongst an array of strings.\n\nIf there is no common prefix, return an empty string \"\".\n\nExample 1:\n\nInput: strs = [\"flower\",\"flow\",\"flight\"]\nOutput: \"fl\"\n\nExample 2:\n\nInput: strs = [\"dog\",\"racecar\",\"car\"]\nOutput: \"\"\nExplanation: There is no common prefix among the input strings.\n\nConstraints:\n\n- 1 <= strs.length <= 200\n- 0 <= strs[i].length <= 200\n- strs[i] consists of only lowercase English letters if it is non-empty.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(strs = ['hello', 'helium', 'helper']) == \"hel\"\n assert candidate(strs = ['a']) == \"a\"\n assert candidate(strs = ['', '', '', '']) == \"\"\n assert candidate(strs = ['apple', 'app', 'apricot']) == \"ap\"\n assert candidate(strs = ['abcd', 'abce', 'abcf']) == \"abc\"\n assert candidate(strs = ['apple', 'app', 'application']) == \"app\"\n assert candidate(strs = ['interview', 'interrupt', 'inter']) == \"inter\"\n assert candidate(strs = ['test', 'testing', 'tester']) == \"test\"\n assert candidate(strs = ['hello', 'hell', 'hella']) == \"hell\"\n assert candidate(strs = ['flower', 'flow', 'flight']) == \"fl\"\n assert candidate(strs = ['same', 'same', 'same']) == \"same\"\n assert candidate(strs = ['single']) == \"single\"\n assert candidate(strs = ['ab', 'abc', 'abcd']) == \"ab\"\n assert candidate(strs = ['abc', 'abc', 'abc']) == \"abc\"\n assert candidate(strs = ['abcd', 'dcba', 'abdc']) == \"\"\n assert candidate(strs = ['', 'b', 'abc']) == \"\"\n assert candidate(strs = ['a', 'ab', 'abc']) == \"a\"\n assert candidate(strs = ['dog', 'racecar', 'car']) == \"\"\n assert candidate(strs = ['a', 'a', 'a', 'a']) == \"a\"\n assert candidate(strs = ['', '', 'abc']) == \"\"\n assert candidate(strs = ['abc', 'abcd', 'abcde']) == \"abc\"\n assert candidate(strs = ['abcd', 'abc', 'ab', 'a']) == \"a\"\n assert candidate(strs = ['banana', 'bandana', 'banner']) == \"ban\"\n assert candidate(strs = ['aaaa', 'aaab', 'aaac']) == \"aaa\"\n assert candidate(strs = ['mississippi', 'mississauga', 'mission', 'missed']) == \"miss\"\n assert candidate(strs = ['commonality', 'commonwealth', 'common', 'commons']) == \"common\"\n assert candidate(strs = ['different', 'prefixes', 'here']) == \"\"\n assert candidate(strs = ['repetition', 'repetitive', 'repeat', 'repel', 'repeal', 'repetend']) == \"repe\"\n assert candidate(strs = ['million', 'millionaire', 'millionth', 'millionfold']) == \"million\"\n assert candidate(strs = ['algorithm', 'algorithmic', 'algebra', 'alignment']) == \"al\"\n assert candidate(strs = ['difficult', 'difficulty', 'differ']) == \"diff\"\n assert candidate(strs = ['environment', 'environmental', 'envision', 'enzyme']) == \"en\"\n assert candidate(strs = ['a', 'aa', 'aaa', 'aaaa']) == \"a\"\n assert candidate(strs = ['xylophone', 'xylotomy', 'xylography', 'xylograph']) == \"xylo\"\n assert candidate(strs = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa']) == \"a\"\n assert candidate(strs = ['abcde', 'abc', 'ab', 'a', 'abcde']) == \"a\"\n assert candidate(strs = ['unique', 'unit', 'universe', 'unity', 'un']) == \"un\"\n assert candidate(strs = ['same', 'same', 'same', 'same']) == \"same\"\n assert candidate(strs = ['abcdef', 'abcde', 'abcd', 'abc', 'ab', 'a']) == \"a\"\n assert candidate(strs = ['short', 'small', 'shallow', 'shrink']) == \"s\"\n assert candidate(strs = ['zebra', 'zoo', 'zenith', 'zest', 'zone', 'zephyr']) == \"z\"\n assert candidate(strs = ['multidimensional', 'multidimensionalities', 'multidimensionally', 'multidimensionalization']) == \"multidimensional\"\n assert candidate(strs = ['computation', 'compute', 'computer', 'comedy']) == \"com\"\n assert candidate(strs = ['abcd', 'ab', 'a', 'abcde']) == \"a\"\n assert candidate(strs = ['abcde', 'abcdf', 'abcde', 'abcda', 'abcde', 'abcdf']) == \"abcd\"\n assert candidate(strs = ['zebra', 'zoo', 'zealot']) == \"z\"\n assert candidate(strs = ['abcd', 'abcde', 'ab', 'a']) == \"a\"\n assert candidate(strs = ['microphone', 'microwave', 'microscope', 'microbial']) == \"micro\"\n assert candidate(strs = ['longest', 'long', 'lonely']) == \"lon\"\n assert candidate(strs = ['prefix', 'preprocessor', 'prevent']) == \"pre\"\n assert candidate(strs = ['algorithm', 'algorithmically', '', 'algorithmic']) == \"\"\n assert candidate(strs = ['algorithm', 'alert', 'alibaba', 'allied']) == \"al\"\n assert candidate(strs = ['unbelievable', 'unbeliever', 'unbelievably', 'unbelievability']) == \"unbeliev\"\n assert candidate(strs = ['prefix', 'preposition', 'prevent', 'premier']) == \"pre\"\n assert candidate(strs = ['prefix', 'prefixes', 'prefixation', 'prefixed']) == \"prefix\"\n assert candidate(strs = ['a', 'b', 'c', 'd']) == \"\"\n assert candidate(strs = ['', 'same', 'same', 'same', 'same']) == \"\"\n assert candidate(strs = ['same', 'same', 'same', 'same', 'same']) == \"same\"\n assert candidate(strs = ['optimization', 'optimization', 'optimized', 'optimizer']) == \"optimiz\"\n assert candidate(strs = ['communication', 'communicate', 'commune', 'communist']) == \"commun\"\n assert candidate(strs = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef']) == \"a\"\n assert candidate(strs = ['algorithm', 'algorithmically', 'algebra', 'allegro']) == \"al\"\n assert candidate(strs = ['common', 'commotion', 'communicate', 'community']) == \"comm\"\n assert candidate(strs = ['flower', 'flow', 'flight', 'flew', 'flying', 'flowing']) == \"fl\"\n assert candidate(strs = ['single', 'singlehandedly', 'singlemindedness', 'singlehanded']) == \"single\"\n assert candidate(strs = ['algorithm', 'algebra', 'alaska']) == \"al\"\n assert candidate(strs = ['congratulations', 'congruity', 'congruent']) == \"congr\"\n assert candidate(strs = ['a', 'ab', 'abc', 'abcd']) == \"a\"\n assert candidate(strs = ['algorithm', 'algorithmic', 'algorithmically', 'algorithmically']) == \"algorithm\"\n assert candidate(strs = ['preference', 'prefix', 'prevent', 'prey']) == \"pre\"\n assert candidate(strs = ['abracadabra', 'abracadabras', 'abracadabaster', 'abracadabration']) == \"abracadab\"\n assert candidate(strs = ['supercalifragilisticexpialidocious', 'super', 'supersonic']) == \"super\"\n assert candidate(strs = ['unanimity', 'unanimous', 'unanimously', 'unanimated']) == \"unanim\"\n assert candidate(strs = ['orthogonal', 'orthodox', 'orthopedic', 'orthography']) == \"ortho\"\n assert candidate(strs = ['abcd', 'abcde', 'abcdef', 'abcdefg']) == \"abcd\"\n assert candidate(strs = ['programming', 'programmer', 'programmatic', 'program']) == \"program\"\n assert candidate(strs = ['sequential', 'sequence', 'sequent', 'sequel']) == \"seque\"\n assert candidate(strs = ['abracadabra', 'abr', 'abracadabrador', 'abrac']) == \"abr\"\n assert candidate(strs = ['consistent', 'consistency', 'consistently', 'consist']) == \"consist\"\n assert candidate(strs = ['common', 'community', 'comma', 'communist']) == \"comm\"\n assert candidate(strs = ['zebra', 'zoo', 'zealot', 'zest']) == \"z\"\n assert candidate(strs = ['a', 'a', 'a', 'a', 'a']) == \"a\"\n assert candidate(strs = ['algorithm', 'algebra', 'altitude', 'altimeter']) == \"al\"\n assert candidate(strs = ['supercalifragilisticexpialidocious', 'super', 'supercal']) == \"super\"\n assert candidate(strs = ['maximum', 'maximize', 'maximal']) == \"maxim\"\n assert candidate(strs = ['complex', 'complicated', 'complect', 'complete']) == \"compl\"\n assert candidate(strs = ['prefix', 'pre', 'preface', 'prefer', 'preference', 'prefixing']) == \"pre\"\n assert candidate(strs = ['abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi']) == \"abcd\"\n assert candidate(strs = ['abcdefghij', 'abcdefgh', 'abcdefg', 'abcdef', 'abcde', 'abcd', 'abc', 'ab', 'a']) == \"a\"\n assert candidate(strs = ['abcde', 'abcde', 'abcde', 'abcde']) == \"abcde\"\n assert candidate(strs = ['algorithm', 'algorhythm', 'algae']) == \"alg\"\n assert candidate(strs = ['', '', '', '', 'a']) == \"\"\n assert candidate(strs = ['xylophone', 'xylography', 'xylogen', 'xylophonist']) == \"xylo\"\n assert candidate(strs = ['onomatopoeia', 'onomatopoetic', 'onomatope', 'onomatologist']) == \"onomato\"\n assert candidate(strs = ['rehabilitation', 'rehabilitate', 'rehabilitative', 'rehabilitated']) == \"rehabilitat\"\n assert candidate(strs = ['mississippi', 'missile', 'mission', 'missive']) == \"missi\"\n assert candidate(strs = ['longest', 'longevity', 'longitudinal']) == \"long\"\n assert candidate(strs = ['psychological', 'psychologist', 'psychology', 'psychic']) == \"psych\"\n assert candidate(strs = ['environment', 'envelope', 'envoy', 'evening']) == \"e\"\n assert candidate(strs = ['short', 'shorthand', 'shortfall']) == \"short\"\n assert candidate(strs = ['parallel', 'parallelogram', 'parallactic', 'paralactic']) == \"paral\"\n assert candidate(strs = ['cryptography', 'cryptographic', 'cryptanalysis', 'cryptanalytic']) == \"crypt\"\n assert candidate(strs = ['zebra', 'zoo', 'zero', 'zapper']) == \"z\"\n assert candidate(strs = ['singleword', 'single', 'singleton']) == \"single\"\n assert candidate(strs = ['anthropomorphic', 'anthropologist', 'anthropology', 'anthropocentric']) == \"anthropo\"\n assert candidate(strs = ['', '', '', 'a']) == \"\"\n assert candidate(strs = ['a', 'ab', 'abc', 'abcd', 'abcde']) == \"a\"\n assert candidate(strs = ['common', 'commune', 'command', 'community']) == \"comm\"\n assert candidate(strs = ['same', 'samsung', 'sample', 'sand', 'satellite', 'saturn']) == \"sa\"\n assert candidate(strs = ['algorithm', 'algebra', 'altitude']) == \"al\"\n assert candidate(strs = ['implementation', 'implement', 'implementing', 'implementor']) == \"implement\"\n assert candidate(strs = ['abracadabra', 'abracadabra', 'abracadabra']) == \"abracadabra\"\n assert candidate(strs = ['reorganization', 'reorganize', 'reorganized', 'reorganizing']) == \"reorganiz\"\n assert candidate(strs = ['university', 'universe', 'unique', 'unicorn']) == \"uni\"\n assert candidate(strs = ['', 'longest', 'longevity', 'logistics']) == \"\"\n assert candidate(strs = ['', '', '', 'abc']) == \"\"\n assert candidate(strs = ['environment', 'envy', 'envelop', 'enviable']) == \"env\"\n assert candidate(strs = ['unique', 'unicorn', 'unify', 'unity']) == \"uni\"\n assert candidate(strs = ['aabbcc', 'aabbc', 'aabb', 'aab', 'aa']) == \"aa\"\n assert candidate(strs = ['zebra', 'zoo', 'zeal', 'zither']) == \"z\"\n assert candidate(strs = ['', 'a', 'ab', 'abc', 'abcd']) == \"\"\n assert candidate(strs = ['aardvark', 'aardwolf', 'aardvark', 'aard']) == \"aard\"\n assert candidate(strs = ['zzzzzzzz', 'zzzzz', 'zzzz', 'zzz', 'zz', 'z']) == \"z\"\n assert candidate(strs = ['separation', 'separately', 'separated', 'separating']) == \"separat\"\n assert candidate(strs = ['mississippi', 'missile', 'mission', 'miss']) == \"miss\"\n assert candidate(strs = ['algorithm', 'algebra', 'alien', 'alert']) == \"al\"\n assert candidate(strs = ['commonality', 'common', 'commune', 'community', 'communicate', 'commemorative']) == \"comm\"\n assert candidate(strs = ['supercalifragilisticexpialidocious', 'supercalifragilistic', 'supercalifragili', 'super']) == \"super\"\n assert candidate(strs = ['parallel', 'parallelepiped', 'paralleled', 'paralegal']) == \"paral\"\n assert candidate(strs = ['prefix', 'preference', 'presentation']) == \"pre\"\n assert candidate(strs = ['unified', 'uniform', 'universe', 'unique']) == \"uni\"\n assert candidate(strs = ['anagram', 'anagrams', 'anagrammatic', 'anagrammatical']) == \"anagram\"\n assert candidate(strs = ['environment', 'environmental', 'environments', 'environmentally']) == \"environment\"\n assert candidate(strs = ['xylophone', 'xylography', 'xylophonist', 'xylophonics']) == \"xylo\"\n assert candidate(strs = ['prefix', '', 'prefix', 'prefix']) == \"\"\n assert candidate(strs = ['algorithm', 'algebra', 'altimeter']) == \"al\"\n assert candidate(strs = ['recognition', 'recognizable', 'recognize', 'recognizably']) == \"recogni\"\n assert candidate(strs = ['prefix', 'preposition', 'presentation']) == \"pre\"\n assert candidate(strs = ['challenges', 'challenging', 'challenge', 'challengingly']) == \"challeng\"\n assert candidate(strs = ['universally', 'universe', 'universal', 'universality', 'universes', 'universally']) == \"univers\"\n assert candidate(strs = ['mississippi', 'missile', 'missionary', 'misspell']) == \"miss\"\n assert candidate(strs = ['photosynthesis', 'photosynthetic', 'photosynthesize', 'photosynthetically']) == \"photosynthe\"\n assert candidate(strs = ['apple', 'apply', 'appetite', 'apparatus']) == \"app\"\n assert candidate(strs = ['prefix', 'pretext', 'prevent']) == \"pre\"\n assert candidate(strs = ['development', 'develop', 'developer', 'developmental', 'developing', 'devel']) == \"devel\"\n assert candidate(strs = ['prefix', 'preference', 'presentation', 'president', 'pressure', 'premier']) == \"pre\"\n assert candidate(strs = ['', 'unique', 'unanimous', 'unicorn', 'unicycle', 'unify']) == \"\"\n assert candidate(strs = ['complex', 'complicated', 'completion']) == \"compl\"\n", "comparison": "exact"}, "public_tests": ["[\"flower\",\"flow\",\"flight\"]", "[\"dog\",\"racecar\",\"car\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["strs"], "leetcode_dataset_entry_point": "Solution().longestCommonPrefix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:00+00:00", "tests_total": 148, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "string", "trie"]}, "language": "ruby", "interface": {"raw_signature": "def longest_common_prefix(strs)", "container": null, "callable": "longest_common_prefix", "parameters": [{"name": "strs", "type": "String[]"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 15, "task_id": "3sum", "difficulty": "Medium", "problem_description": "Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.\n\nNotice that the solution set must not contain duplicate triplets.\n\nExample 1:\n\nInput: nums = [-1,0,1,2,-1,-4]\nOutput: [[-1,-1,2],[-1,0,1]]\nExplanation:\nnums[0] + nums[1] + nums[2] = (-1) + 0 + 1 = 0.\nnums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0.\nnums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0.\nThe distinct triplets are [-1,0,1] and [-1,-1,2].\nNotice that the order of the output and the order of the triplets does not matter.\n\nExample 2:\n\nInput: nums = [0,1,1]\nOutput: []\nExplanation: The only possible triplet does not sum up to 0.\n\nExample 3:\n\nInput: nums = [0,0,0]\nOutput: [[0,0,0]]\nExplanation: The only possible triplet sums up to 0.\n\nConstraints:\n\n- 3 <= nums.length <= 3000\n- -10^5 <= nums[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-2, 0, 0, 2, 2]) == [[-2, 0, 2]]\n assert candidate(nums = [0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [-1, 0, 1, 2, -1, -4]) == [[-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-2, 0, 1, 1, 2]) == [[-2, 0, 2], [-2, 1, 1]]\n assert candidate(nums = [1, 2, -2, -1]) == []\n assert candidate(nums = [-1, 0, 0, 0, 1, 1, 2]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [1, -1, -1, 0]) == [[-1, 0, 1]]\n assert candidate(nums = [3, -2, 1, 0, -1, -2, 1, -2, 1, -2]) == [[-2, -1, 3], [-2, 1, 1], [-1, 0, 1]]\n assert candidate(nums = [-1, 0, 1, 0]) == [[-1, 0, 1]]\n assert candidate(nums = [-4, -2, -2, -2, 0, 1, 2, 2, 2, 3, 3, 4, 4, 6, 6]) == [[-4, -2, 6], [-4, 0, 4], [-4, 1, 3], [-4, 2, 2], [-2, -2, 4], [-2, 0, 2]]\n assert candidate(nums = [-1, 1, 0]) == [[-1, 0, 1]]\n assert candidate(nums = [0, 1, 1]) == []\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [-1, 0, 1, -1, 0, 1, -1, 0, 1]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-3, -3, -3, -3, 1, 2, 2, 3, 3, 3]) == [[-3, 1, 2]]\n assert candidate(nums = [-1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-3, -2, -1, 0, 0, 0, 1, 2, 3]) == [[-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-5, -3, -2, 0, 1, 2, 3, 5, 7]) == [[-5, -2, 7], [-5, 0, 5], [-5, 2, 3], [-3, -2, 5], [-3, 0, 3], [-3, 1, 2], [-2, 0, 2]]\n assert candidate(nums = [-1, -1, 0, 0, 0, 1, 1, 1, 2, 2]) == [[-1, -1, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-4, -3, -2, -1, 0, 1, 2, 3, 4]) == [[-4, 0, 4], [-4, 1, 3], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [-1, -1, 0, 0, 1, 1, 2, -2, 3]) == [[-2, -1, 3], [-2, 0, 2], [-2, 1, 1], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, -1, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4]) == [[-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, -1, 0, 1, 1, 2, 2, 3]) == [[-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-5, 2, 3, 0, -4, -6, 5, -7, 9, -3, -8, -1, 1, -7, -3, 1, -8, 5, -5, -7, 6, -3, 0, 6, -4, -8, -9, 7, 7, -4, -9, 1, -2, 6, 5, -3, -9, -1, 5, 4, -1, -2, -5, -2, -8, 8, 6, -7, -1, -2, 3, -3, 9, -4, 2, -3, 3, 2, 6, -9, -5, -3, 5, -8, 1, 8, -2, 5, -3, -8, 1, 8, -7, -4, 5, 5, -1, 6, 2, 2, -6, -1, -3, 2, -5, -7, -9, -7, 6, 2, 2, 1, 6, 5, -5, 0, -5, 8, -5, -7, 6, -2, -9, -1, -2, 7, 1, -7, 5, -3, -9, 2, -7, -8, -3, -7, -9, 0, 4, -1, 3, 8, -2, -7, 9, -9, -6, -7, 4, 3, 3, -9, -9, -9, 9, 0, 5, -2, -9, -9, -6, -1, 0, 1, 9, -8, -3, -2, -1, 6, 0, 8, 8, -7, -6, -2, -1, -2, -8, -4, 8, -6, -9, 7, -6, -4, 0, 7, 8, -9, 9, -9, -8, -3, -5, -7, -3, 9, 1, 6, -9, -2, -4, -4, -3, -1, 5, -4, -9, -9, 8, -2, -8, 1, 0, 3, 6, -1, 6, -8, -7, -2, -8, 1, 9, -3, -5, -1, -7, 8, -5, -6, -1, 8, 0, -2, -1, 1, 8, -4, 1, -4, 4, -3, -1, -4, 5, 9, 4, -9, -8, 2, -2, -7, -7, -8, -7, -3, 7, -5, -8, 2, -6, -1, -2, -4, -4, -6, -8, 5, -4, 7, 8, -4, 5, 0, -7, -8, -4, -6, -1, -3, 1, 3, -2, -1, -9, 0, 1, 2, -8, 5, 8, 7, -3, -1, -7, -9, -2, -4, -1, -5, -2, -5, -5, -9, -8, -6, 6, -2, -9, -7, -5, -9, 2, -3, 7, 0, -9, 7, -4, 3, -3, -4, -8, 1, -4, -6, -4, 3, 5, 0, 4, -5, -8, -5, -3, -7, -1, 0, -3, -8, 2, -4, -3, 6, -7, -6, -3, -1, -5, -8, -4, -3, -7, -9, -6, -6, 3, -9, -5, 7, -1, -5, -7, 4, 8, -5, -5, 2, -9, -3, -8, -3, 4, -6, 2, -8, -8, -1, -8, -8, -9, 7, -9, 1, -3, -4, -1, -3, -1, -8, 9, -6, -1, 3, 3, -9, -9, 7, -5, -1, -7, -4, -8, 2, 0, 5, -8, 8, -3, -6, -2, -8, -3, -3, -1, -7, 4, -4, 6, 3, -6, -1, -2, -8, -3, 2, -8, -2, 8, -4, -7, -8, -9, -6, -8, -9, 7, 1, -4, 1, -8, 2, -2, 4, -1, 9, -3, -5, -1, -6, -2, -8, 2, -2, -8, -4, -3, -7, -3, 0, -9, -2, -1, -7, -1, -9, -1, 7, -6, -5, -4, -8, -4, -2, -7, 5, -6, -5, -5, -5, -5, -3, 4, -9, -3, -2, -8, -1, -9, -4, -2, 5, -3, 1, -4, -1, 1, -3, -1, -3, 1, -3, -5, 7, -3, -7, -9, 9, -2, -9, 7, -7, -1, -4, -2, -5, -3, 8, -6, -2, 2, -7, -8, 6, 9, -9, -7, -3, -9, -8, -2, -7, -6, -9, -9, -1, -9, -9, -7, -1, -8, -7, -8, -6, -4, -2, -3, -2, -2, -6, -9, -8, -5, -3, -1, -1, -3, 3, -5, -1, -2, -5, -9, 0, -7, -1, -4, -3, -9, -7, -3, -7, -8, -7, -6, 0, 1, -2, 0, -4, -5, -5, -3, -9, 5, -1, -2, 8, -8, -1, -9, -7, -8, -9, -9, 0, -1, -3, -4, -3, -2, -4, -6, -2, 6, -4, -4, -3, 8, -9, -5, -9, -4, -9, -8, -7, -3, -1, -6, -9, 0, -7, -8, 2, -5, -4, -5, -3, -6, -7, -4, -7, 3, -3, -4, -2, -3, 8, -9, -5, -2, -6, -3, -8, -1, -3, -7, -1, -8, -5, -5, -1, -3, -7, -3, -5, -5, 2, -4, -9, -3, -6, -3, -8, -6, -9, -3, -1, -8, -8, -8, -8, -7, -7, -7, -7, -7, -6, -6, -6, -6, -5, -5, -5, -5, -4, -4, -4, -4, -3, -3, -3, -3, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, 0]) == [[-9, 0, 9], [-9, 1, 8], [-9, 2, 7], [-9, 3, 6], [-9, 4, 5], [-8, -1, 9], [-8, 0, 8], [-8, 1, 7], [-8, 2, 6], [-8, 3, 5], [-8, 4, 4], [-7, -2, 9], [-7, -1, 8], [-7, 0, 7], [-7, 1, 6], [-7, 2, 5], [-7, 3, 4], [-6, -3, 9], [-6, -2, 8], [-6, -1, 7], [-6, 0, 6], [-6, 1, 5], [-6, 2, 4], [-6, 3, 3], [-5, -4, 9], [-5, -3, 8], [-5, -2, 7], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -4, 8], [-4, -3, 7], [-4, -2, 6], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-4, 2, 2], [-3, -3, 6], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -2, 4], [-2, -1, 3], [-2, 0, 2], [-2, 1, 1], [-1, -1, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-10, -10, -10, -1, 0, 0, 1, 10, 10, 10]) == [[-10, 0, 10], [-1, 0, 1]]\n assert candidate(nums = [-1, 0, 1, 2, -1, -4, 3, 4, 5, -5]) == [[-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3, 4, 5]) == [[-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [1, 2, -2, -1, -1, -3, 3, 3, 2, -2]) == [[-3, 1, 2], [-2, -1, 3], [-1, -1, 2]]\n assert candidate(nums = [-1, -1, -1, 0, 0, 1, 1, 1]) == [[-1, 0, 1]]\n assert candidate(nums = [-5, 2, 5, -1, 1, 0, -2, 2, -3, 3]) == [[-5, 0, 5], [-5, 2, 3], [-3, -2, 5], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3]) == [[-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == [[-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, 0, 1, 2, -1, -4, -3, 3, 0, 1, 2, -1, -4]) == [[-4, 1, 3], [-4, 2, 2], [-3, 0, 3], [-3, 1, 2], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, 1, 2, -2, 3, -3, 4, -4]) == [[-4, 1, 3], [-3, -1, 4], [-3, 1, 2], [-2, -1, 3]]\n assert candidate(nums = [-10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [[-10, 0, 10], [-10, 1, 9], [-10, 2, 8], [-10, 3, 7], [-10, 4, 6], [-5, -3, 8], [-5, -2, 7], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [1, 2, -2, -1, 0, 0, 0]) == [[-2, 0, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-4, -2, -2, -2, 0, 1, 2, 2, 2, 3, 3, 4, 4]) == [[-4, 0, 4], [-4, 1, 3], [-4, 2, 2], [-2, -2, 4], [-2, 0, 2]]\n assert candidate(nums = [1, -1, -1, 1, 0, 0, 0]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-1, -2, -3, 4, 1, 3, 0]) == [[-3, -1, 4], [-3, 0, 3], [-2, -1, 3], [-1, 0, 1]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [1, 2, -2, -1, -1, -1, 0, 0, 0, 0]) == [[-2, 0, 2], [-1, -1, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-10, -9, -8, -7, 7, 8, 9, 10]) == []\n assert candidate(nums = [-10, 0, 10, 5, -5, 3, -3, 2, -2, 1, -1]) == [[-10, 0, 10], [-5, 0, 5], [-5, 2, 3], [-3, -2, 5], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [3, 0, -2, -1, 1, -2, 1, 0, -2, 1, 2]) == [[-2, -1, 3], [-2, 0, 2], [-2, 1, 1], [-1, 0, 1]]\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20]) == [[-10, -5, 15], [-10, 0, 10], [-5, 0, 5]]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 0, 0, 0]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-10, 0, 10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60, 70, -70, 80, -80, 90, -90]) == [[-90, 0, 90], [-90, 10, 80], [-90, 20, 70], [-90, 30, 60], [-90, 40, 50], [-80, -10, 90], [-80, 0, 80], [-80, 10, 70], [-80, 20, 60], [-80, 30, 50], [-70, -20, 90], [-70, -10, 80], [-70, 0, 70], [-70, 10, 60], [-70, 20, 50], [-70, 30, 40], [-60, -30, 90], [-60, -20, 80], [-60, -10, 70], [-60, 0, 60], [-60, 10, 50], [-60, 20, 40], [-50, -40, 90], [-50, -30, 80], [-50, -20, 70], [-50, -10, 60], [-50, 0, 50], [-50, 10, 40], [-50, 20, 30], [-40, -30, 70], [-40, -20, 60], [-40, -10, 50], [-40, 0, 40], [-40, 10, 30], [-30, -20, 50], [-30, -10, 40], [-30, 0, 30], [-30, 10, 20], [-20, -10, 30], [-20, 0, 20], [-10, 0, 10]]\n assert candidate(nums = [-1, 0, 1, 0, -1, 1, -1, 0, 1]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-4, -2, -1, 0, 1, 2, 3, 5]) == [[-4, -1, 5], [-4, 1, 3], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, -1, -1, 0, 0, 1, 1, 2, 3]) == [[-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-3, -3, -3, 1, 2, 3, 4, 4, 4]) == [[-3, 1, 2]]\n assert candidate(nums = [-2, -3, 4, 3, 2, 1, 0, -1, -2, -3, 3, 2, 1]) == [[-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -2, 4], [-2, -1, 3], [-2, 0, 2], [-2, 1, 1], [-1, 0, 1]]\n assert candidate(nums = [-4, -2, -2, -2, 0, 1, 2, 2, 2, 3, 3, 4]) == [[-4, 0, 4], [-4, 1, 3], [-4, 2, 2], [-2, -2, 4], [-2, 0, 2]]\n assert candidate(nums = [-4, -1, -1, 0, 1, 2]) == [[-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, -2, -3, -4, -5, 5, 4, 3, 2, 1]) == [[-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 1, 2], [-2, -1, 3]]\n assert candidate(nums = [-1, 0, 1, 2, -1, -4, 3, -2, 2]) == [[-4, 1, 3], [-4, 2, 2], [-2, -1, 3], [-2, 0, 2], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3]) == [[-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-5, -4, -3, -2, -1, 1, 2, 3, 4, 5]) == [[-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 1, 2], [-2, -1, 3]]\n assert candidate(nums = [-1, -2, -3, 0, 1, 2, 3]) == [[-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [100000, -100000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[-100000, 0, 100000], [0, 0, 0]]\n assert candidate(nums = [3, -3, 4, -4, 5, -5, 6, -6, 0]) == [[-6, 0, 6], [-5, 0, 5], [-4, 0, 4], [-3, 0, 3]]\n assert candidate(nums = [0, 1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == [[-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-6, -6, -4, -2, 0, 2, 4, 6, 6]) == [[-6, 0, 6], [-6, 2, 4], [-4, -2, 6], [-4, 0, 4], [-2, 0, 2]]\n assert candidate(nums = [1, 2, 3, -6, 4, -1, -3, 2, 0]) == [[-6, 2, 4], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-1, 0, 1]]\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [[-5, -4, 9], [-5, -3, 8], [-5, -2, 7], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -3, 7], [-4, -2, 6], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [2, 2, 2, 2, 2, -2, -2, -2, -2, -2]) == []\n assert candidate(nums = [-1, -1, -1, 0, 0, 1, 1, 2, 3]) == [[-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-5, -3, -1, 0, 0, 0, 0, 0, 1, 2, 3, 5]) == [[-5, 0, 5], [-5, 2, 3], [-3, 0, 3], [-3, 1, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == [[-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [[-10, 0, 10], [-10, 1, 9], [-10, 2, 8], [-10, 3, 7], [-10, 4, 6], [-9, -1, 10], [-9, 0, 9], [-9, 1, 8], [-9, 2, 7], [-9, 3, 6], [-9, 4, 5], [-8, -2, 10], [-8, -1, 9], [-8, 0, 8], [-8, 1, 7], [-8, 2, 6], [-8, 3, 5], [-7, -3, 10], [-7, -2, 9], [-7, -1, 8], [-7, 0, 7], [-7, 1, 6], [-7, 2, 5], [-7, 3, 4], [-6, -4, 10], [-6, -3, 9], [-6, -2, 8], [-6, -1, 7], [-6, 0, 6], [-6, 1, 5], [-6, 2, 4], [-5, -4, 9], [-5, -3, 8], [-5, -2, 7], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -3, 7], [-4, -2, 6], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, -1, -2, -3, -4, -5, -6]) == [[-6, 1, 5], [-6, 2, 4], [-5, -1, 6], [-5, 1, 4], [-5, 2, 3], [-4, -2, 6], [-4, -1, 5], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 1, 2], [-2, -1, 3]]\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6]) == [[-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-10, -5, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 6, 7, 8]) == [[-10, 2, 8], [-10, 3, 7], [-10, 4, 6], [-10, 5, 5], [-5, -3, 8], [-5, -2, 7], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [1, 2, -3, 4, -1, -2, 3, -4, 0, 0, 0, 0]) == [[-4, 0, 4], [-4, 1, 3], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-5, 2, 1, -2, 3, -1, 2, -3, 0, 0, 0]) == [[-5, 2, 3], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -4, -5, -6, -7, -8, -9]) == [[-9, 0, 9], [-9, 1, 8], [-9, 2, 7], [-9, 3, 6], [-9, 4, 5], [-8, -1, 9], [-8, 0, 8], [-8, 1, 7], [-8, 2, 6], [-8, 3, 5], [-7, -2, 9], [-7, -1, 8], [-7, 0, 7], [-7, 1, 6], [-7, 2, 5], [-7, 3, 4], [-6, -3, 9], [-6, -2, 8], [-6, -1, 7], [-6, 0, 6], [-6, 1, 5], [-6, 2, 4], [-5, -4, 9], [-5, -3, 8], [-5, -2, 7], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -3, 7], [-4, -2, 6], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-2, 0, 1, 1, 2, 3, 4, 5, -3, -4, -5, 6, 7, 8, 9, -6, -7, -8, -9]) == [[-9, 0, 9], [-9, 1, 8], [-9, 2, 7], [-9, 3, 6], [-9, 4, 5], [-8, 0, 8], [-8, 1, 7], [-8, 2, 6], [-8, 3, 5], [-7, -2, 9], [-7, 0, 7], [-7, 1, 6], [-7, 2, 5], [-7, 3, 4], [-6, -3, 9], [-6, -2, 8], [-6, 0, 6], [-6, 1, 5], [-6, 2, 4], [-5, -4, 9], [-5, -3, 8], [-5, -2, 7], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -3, 7], [-4, -2, 6], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, 0, 3], [-3, 1, 2], [-2, 0, 2], [-2, 1, 1]]\n assert candidate(nums = [3, -1, -3, 0, 1, 2, 4, -2, -4, 5, -5, 6, -6]) == [[-6, 0, 6], [-6, 1, 5], [-6, 2, 4], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -2, 6], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [1, 1, 1, 1, -1, -1, -1, -1, 0, 0, 0, 0]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-5, -3, -1, 0, 0, 0, 1, 3, 5]) == [[-5, 0, 5], [-3, 0, 3], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [1, 2, -2, -1, 0, -1, 2]) == [[-2, 0, 2], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-7, -5, -5, -1, 0, 1, 1, 5, 7]) == [[-7, 0, 7], [-5, 0, 5], [-1, 0, 1]]\n assert candidate(nums = [-1, 0, 1, 0, 1, 0, -1, -1, -1, 0]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [1, 2, -2, -1, 0, 3, -3]) == [[-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 1, 1, 1]) == [[-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [1, 2, 3, 4, 5, -5, -4, -3, -2, -1]) == [[-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 1, 2], [-2, -1, 3]]\n assert candidate(nums = [-100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [[-100000, 0, 100000], [0, 0, 0]]\n assert candidate(nums = [100000, -100000, 0, -50000, 50000, -25000, 25000]) == [[-100000, 0, 100000], [-50000, 0, 50000], [-25000, 0, 25000]]\n assert candidate(nums = [-2, 0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == [[-2, 0, 2], [-2, 1, 1], [0, 0, 0]]\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == [[-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 1, 2], [-2, -1, 3]]\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == [[0, 0, 0]]\n assert candidate(nums = [-4, -2, -2, -1, 0, 1, 2, 2, 4]) == [[-4, 0, 4], [-4, 2, 2], [-2, -2, 4], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == []\n assert candidate(nums = [-1, 0, 1, 2, -1, -4, 3, 4, -3, 2, -2, -5, 5]) == [[-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-4, 2, 2], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1]) == []\n assert candidate(nums = [-6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6]) == [[-6, 0, 6], [-6, 1, 5], [-6, 2, 4], [-5, -1, 6], [-5, 0, 5], [-5, 1, 4], [-5, 2, 3], [-4, -2, 6], [-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-3, -2, 5], [-3, -1, 4], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n assert candidate(nums = [-4, -2, 1, -5, -4, -4, 4, -2, 0, 4, 0, -2, 3, 1, -5, 0]) == [[-5, 1, 4], [-4, 0, 4], [-4, 1, 3], [-2, -2, 4], [-2, 1, 1], [0, 0, 0]]\n assert candidate(nums = [-1, 2, 1, -4, 3, 0, -2, 1, 1, -1, 0, 0, 0, 0, 0]) == [[-4, 1, 3], [-2, -1, 3], [-2, 0, 2], [-2, 1, 1], [-1, -1, 2], [-1, 0, 1], [0, 0, 0]]\n assert candidate(nums = [-1, 2, 1, -4, 3, 0, -2, 2, 1, -1, -3, 3]) == [[-4, 1, 3], [-4, 2, 2], [-3, 0, 3], [-3, 1, 2], [-2, -1, 3], [-2, 0, 2], [-2, 1, 1], [-1, -1, 2], [-1, 0, 1]]\n assert candidate(nums = [-5, -3, -1, 0, 2, 4, 6]) == [[-5, -1, 6], [-3, -1, 4]]\n assert candidate(nums = [1, 2, -2, -1, 0, -4, 3, 4, 5]) == [[-4, -1, 5], [-4, 0, 4], [-4, 1, 3], [-2, -1, 3], [-2, 0, 2], [-1, 0, 1]]\n", "comparison": "exact"}, "public_tests": ["[-1,0,1,2,-1,-4]", "[0,1,1]", "[0,0,0]"], "hints": ["So, we essentially need to find three numbers x, y, and z such that they add up to the given value. If we fix one of the numbers say x, we are left with the two-sum problem at hand!", "For the two-sum problem, if we fix one of the numbers, say x, we have to scan the entire array to find the next number y, which is value - x where value is the input parameter. Can we change our array somehow so that this search becomes faster?", "The second train of thought for two-sum is, without changing the array, can we use additional space somehow? Like maybe a hash map to speed up the search?"], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().threeSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:03+00:00", "tests_total": 104, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "two-pointers", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def three_sum(nums)", "container": null, "callable": "three_sum", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 16, "task_id": "3sum-closest", "difficulty": "Medium", "problem_description": "You are given an integer array nums of length n and an integer target.\n\nFind three integers at distinct indices in nums such that the sum is closest to target.\n\nReturn the sum of the three integers.\n\nYou may assume that each input would have exactly one solution.\n\nExample 1:\n\nInput: nums = [-1,2,1,-4], target = 1\nOutput: 2\nExplanation: The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).\n\nExample 2:\n\nInput: nums = [0,0,0], target = 1\nOutput: 0\nExplanation: The sum that is closest to the target is 0. (0 + 0 + 0 = 0).\n\nConstraints:\n\n- 3 <= nums.length <= 500\n- -1000 <= nums[i] <= 1000\n- -10^4 <= target <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128],target = 82) == 82\n assert candidate(nums = [1, 1, 1, 0],target = -100) == 2\n assert candidate(nums = [-10, -2, -5, -1],target = -12) == -13\n assert candidate(nums = [-5, -4, -3, -2, -1],target = -10) == -10\n assert candidate(nums = [0, 0, 0],target = 1) == 0\n assert candidate(nums = [1, 1, 1, 1],target = 3) == 3\n assert candidate(nums = [5, 5, 5, 5],target = 15) == 15\n assert candidate(nums = [-1, -2, -3, -4, -5],target = -10) == -10\n assert candidate(nums = [-1, 0, 1, 2, -1, -4],target = 1) == 1\n assert candidate(nums = [-1, 2, 1, -4],target = 1) == 2\n assert candidate(nums = [5, 1, 3, 4, 2],target = 7) == 7\n assert candidate(nums = [1, 1, 1, 1],target = 0) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],target = 15) == 15\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == 10\n assert candidate(nums = [-5, -4, -4, -3, -2, -1, 0, 0, 1, 2, 3, 4, 4, 5],target = 0) == 0\n assert candidate(nums = [999, -999, 888, -888, 777, -777, 666, -666, 555, -555, 444, -444, 333, -333, 222, -222, 111, -111],target = 0) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 25) == 25\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 45) == 42\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 1500) == 1500\n assert candidate(nums = [5, 7, 7, 8, 8, 10, 12, 13, 15, 17, 19, 21, 23, 25, 27],target = 30) == 30\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 50) == 49\n assert candidate(nums = [-100, -200, -300, -400, -500, 100, 200, 300, 400, 500],target = 0) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 45) == 45\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == 0\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],target = -100) == -57\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],target = -30) == -27\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100],target = 150) == 150\n assert candidate(nums = [-10, -20, -30, -40, -50, 1, 2, 3, 4, 5],target = -150) == -120\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 50) == 42\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 25) == 25\n assert candidate(nums = [3, 5, -4, 8, 11, 1, -1, 6],target = 10) == 10\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125],target = 100) == 125\n assert candidate(nums = [-3, -1, 0, 2, 4, 6, 9, 12],target = 14) == 14\n assert candidate(nums = [-1, 0, 1, 2, -1, -4, 3, 4, 5, 6, 7, 8, 9, 10],target = 15) == 15\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100, -110, -120],target = -300) == -300\n assert candidate(nums = [-10, -20, -30, -40, -50, 50, 40, 30, 20, 10],target = 0) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 100) == 57\n assert candidate(nums = [-5, -2, -1, 0, 1, 2, 5],target = 0) == 0\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = -5) == -5\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],target = -150) == -150\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],target = -25) == -25\n assert candidate(nums = [3, 5, 8, 9, 15, 1, 7, 6, 4, 10],target = 28) == 28\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 0, 1, -1],target = 100) == 1\n assert candidate(nums = [33, 55, 77, 99, 111, 133, 155, 177, 199, 221, 243, 265, 287, 309, 331, 353, 375, 397, 419, 441],target = 1200) == 1191\n assert candidate(nums = [100, 50, 25, 20, 10, 5, 1],target = 120) == 121\n assert candidate(nums = [-1, 0, 1, 0, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6],target = 0) == 0\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 15) == 15\n assert candidate(nums = [-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90],target = 100) == 100\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],target = 20) == 20\n assert candidate(nums = [999, 1000, -1000, 999, -999, 1, -1, 2, -2],target = 3000) == 2998\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15],target = -45) == -42\n assert candidate(nums = [-1, 2, -8, 4, 5, -10, 7, 0, 1],target = 0) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120],target = 300) == 300\n assert candidate(nums = [-1000, 1000, -500, 500, -250, 250, 0, 1, -1, 2, -2],target = 1001) == 1001\n assert candidate(nums = [-100, -200, -300, 400, 500, 600, 700],target = -150) == -100\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0],target = 1) == 0\n assert candidate(nums = [-1000, -999, -998, -997, 0, 997, 998, 999, 1000],target = 500) == 995\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 50) == 50\n assert candidate(nums = [-1, 0, 1, 0, -1, 0],target = 0) == 0\n assert candidate(nums = [-5, -3, -1, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31],target = 0) == 0\n assert candidate(nums = [-15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 1) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50],target = 100) == 100\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10],target = 0) == 0\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60, 70, -70, 80],target = 0) == 0\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125],target = 50) == 125\n assert candidate(nums = [100, -100, 200, -200, 300, -300, 400, -400, 500, -500, 600, -600],target = 1000) == 1000\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],target = 9) == 9\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 1000) == 570\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],target = 50) == 50\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 15) == 15\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],target = -250) == -250\n assert candidate(nums = [-100, 100, -50, 50, -25, 25, 0],target = 0) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],target = 1) == 1\n assert candidate(nums = [100, 200, 300, 400, 500, -100, -200, -300, -400, -500],target = 0) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 30) == 30\n assert candidate(nums = [-999, -998, -997, -996, -995, -994, -993, -992, -991, -990, -989, -988, -987, -986, -985, -984, -983, -982, -981, -980],target = -3000) == -2994\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 30) == 30\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 0) == 0\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 10) == 15\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900],target = 1500) == 1500\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],target = 15) == 9\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],target = -25) == -25\n assert candidate(nums = [-1, -3, -5, -7, -9, -11, -13, -15, -17, -19, -21, -23, -25, -27, -29],target = -45) == -45\n assert candidate(nums = [-2, 0, 1, 1, 2],target = 0) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 250) == 250\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],target = 20) == 20\n assert candidate(nums = [-50, -30, -10, 0, 10, 30, 50],target = 40) == 40\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8],target = 0) == 0\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],target = -250) == -250\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125],target = 0) == -125\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 40) == 40\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 3) == 3\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 15) == 15\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3],target = 0) == 0\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 15) == 15\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128],target = 100) == 100\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],target = 15) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 150) == 87\n", "comparison": "exact"}, "public_tests": ["[-1,2,1,-4]\n1", "[0,0,0]\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().threeSumClosest", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:05+00:00", "tests_total": 99, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "two-pointers", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def three_sum_closest(nums, target)", "container": null, "callable": "three_sum_closest", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 17, "task_id": "letter-combinations-of-a-phone-number", "difficulty": "Medium", "problem_description": "Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order.\n\nA mapping of digits to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.\n\nExample 1:\n\nInput: digits = \"23\"\nOutput: [\"ad\",\"ae\",\"af\",\"bd\",\"be\",\"bf\",\"cd\",\"ce\",\"cf\"]\n\nExample 2:\n\nInput: digits = \"2\"\nOutput: [\"a\",\"b\",\"c\"]\n\nConstraints:\n\n- 1 <= digits.length <= 4\n- digits[i] is a digit in the range ['2', '9'].\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(digits='5678'), ['jmpt', 'jmpu', 'jmpv', 'jmqt', 'jmqu', 'jmqv', 'jmrt', 'jmru', 'jmrv', 'jmst', 'jmsu', 'jmsv', 'jnpt', 'jnpu', 'jnpv', 'jnqt', 'jnqu', 'jnqv', 'jnrt', 'jnru', 'jnrv', 'jnst', 'jnsu', 'jnsv', 'jopt', 'jopu', 'jopv', 'joqt', 'joqu', 'joqv', 'jort', 'joru', 'jorv', 'jost', 'josu', 'josv', 'kmpt', 'kmpu', 'kmpv', 'kmqt', 'kmqu', 'kmqv', 'kmrt', 'kmru', 'kmrv', 'kmst', 'kmsu', 'kmsv', 'knpt', 'knpu', 'knpv', 'knqt', 'knqu', 'knqv', 'knrt', 'knru', 'knrv', 'knst', 'knsu', 'knsv', 'kopt', 'kopu', 'kopv', 'koqt', 'koqu', 'koqv', 'kort', 'koru', 'korv', 'kost', 'kosu', 'kosv', 'lmpt', 'lmpu', 'lmpv', 'lmqt', 'lmqu', 'lmqv', 'lmrt', 'lmru', 'lmrv', 'lmst', 'lmsu', 'lmsv', 'lnpt', 'lnpu', 'lnpv', 'lnqt', 'lnqu', 'lnqv', 'lnrt', 'lnru', 'lnrv', 'lnst', 'lnsu', 'lnsv', 'lopt', 'lopu', 'lopv', 'loqt', 'loqu', 'loqv', 'lort', 'loru', 'lorv', 'lost', 'losu', 'losv'])\n assert answers_match(candidate(digits='2'), ['a', 'b', 'c'])\n assert answers_match(candidate(digits='3'), ['d', 'e', 'f'])\n assert answers_match(candidate(digits='9'), ['w', 'x', 'y', 'z'])\n assert answers_match(candidate(digits='47'), ['gp', 'gq', 'gr', 'gs', 'hp', 'hq', 'hr', 'hs', 'ip', 'iq', 'ir', 'is'])\n assert answers_match(candidate(digits='99'), ['ww', 'wx', 'wy', 'wz', 'xw', 'xx', 'xy', 'xz', 'yw', 'yx', 'yy', 'yz', 'zw', 'zx', 'zy', 'zz'])\n assert answers_match(candidate(digits='234'), ['adg', 'adh', 'adi', 'aeg', 'aeh', 'aei', 'afg', 'afh', 'afi', 'bdg', 'bdh', 'bdi', 'beg', 'beh', 'bei', 'bfg', 'bfh', 'bfi', 'cdg', 'cdh', 'cdi', 'ceg', 'ceh', 'cei', 'cfg', 'cfh', 'cfi'])\n assert answers_match(candidate(digits='299'), ['aww', 'awx', 'awy', 'awz', 'axw', 'axx', 'axy', 'axz', 'ayw', 'ayx', 'ayy', 'ayz', 'azw', 'azx', 'azy', 'azz', 'bww', 'bwx', 'bwy', 'bwz', 'bxw', 'bxx', 'bxy', 'bxz', 'byw', 'byx', 'byy', 'byz', 'bzw', 'bzx', 'bzy', 'bzz', 'cww', 'cwx', 'cwy', 'cwz', 'cxw', 'cxx', 'cxy', 'cxz', 'cyw', 'cyx', 'cyy', 'cyz', 'czw', 'czx', 'czy', 'czz'])\n assert answers_match(candidate(digits='79'), ['pw', 'px', 'py', 'pz', 'qw', 'qx', 'qy', 'qz', 'rw', 'rx', 'ry', 'rz', 'sw', 'sx', 'sy', 'sz'])\n assert answers_match(candidate(digits='23'), ['ad', 'ae', 'af', 'bd', 'be', 'bf', 'cd', 'ce', 'cf'])\n assert answers_match(candidate(digits='89'), ['tw', 'tx', 'ty', 'tz', 'uw', 'ux', 'uy', 'uz', 'vw', 'vx', 'vy', 'vz'])\n assert answers_match(candidate(digits='456'), ['gjm', 'gjn', 'gjo', 'gkm', 'gkn', 'gko', 'glm', 'gln', 'glo', 'hjm', 'hjn', 'hjo', 'hkm', 'hkn', 'hko', 'hlm', 'hln', 'hlo', 'ijm', 'ijn', 'ijo', 'ikm', 'ikn', 'iko', 'ilm', 'iln', 'ilo'])\n assert answers_match(candidate(digits='34'), ['dg', 'dh', 'di', 'eg', 'eh', 'ei', 'fg', 'fh', 'fi'])\n assert answers_match(candidate(digits='3456'), ['dgjm', 'dgjn', 'dgjo', 'dgkm', 'dgkn', 'dgko', 'dglm', 'dgln', 'dglo', 'dhjm', 'dhjn', 'dhjo', 'dhkm', 'dhkn', 'dhko', 'dhlm', 'dhln', 'dhlo', 'dijm', 'dijn', 'dijo', 'dikm', 'dikn', 'diko', 'dilm', 'diln', 'dilo', 'egjm', 'egjn', 'egjo', 'egkm', 'egkn', 'egko', 'eglm', 'egln', 'eglo', 'ehjm', 'ehjn', 'ehjo', 'ehkm', 'ehkn', 'ehko', 'ehlm', 'ehln', 'ehlo', 'eijm', 'eijn', 'eijo', 'eikm', 'eikn', 'eiko', 'eilm', 'eiln', 'eilo', 'fgjm', 'fgjn', 'fgjo', 'fgkm', 'fgkn', 'fgko', 'fglm', 'fgln', 'fglo', 'fhjm', 'fhjn', 'fhjo', 'fhkm', 'fhkn', 'fhko', 'fhlm', 'fhln', 'fhlo', 'fijm', 'fijn', 'fijo', 'fikm', 'fikn', 'fiko', 'film', 'filn', 'filo'])\n assert answers_match(candidate(digits='62'), ['ma', 'mb', 'mc', 'na', 'nb', 'nc', 'oa', 'ob', 'oc'])\n assert answers_match(candidate(digits='4444'), ['gggg', 'gggh', 'gggi', 'gghg', 'gghh', 'gghi', 'ggig', 'ggih', 'ggii', 'ghgg', 'ghgh', 'ghgi', 'ghhg', 'ghhh', 'ghhi', 'ghig', 'ghih', 'ghii', 'gigg', 'gigh', 'gigi', 'gihg', 'gihh', 'gihi', 'giig', 'giih', 'giii', 'hggg', 'hggh', 'hggi', 'hghg', 'hghh', 'hghi', 'hgig', 'hgih', 'hgii', 'hhgg', 'hhgh', 'hhgi', 'hhhg', 'hhhh', 'hhhi', 'hhig', 'hhih', 'hhii', 'higg', 'high', 'higi', 'hihg', 'hihh', 'hihi', 'hiig', 'hiih', 'hiii', 'iggg', 'iggh', 'iggi', 'ighg', 'ighh', 'ighi', 'igig', 'igih', 'igii', 'ihgg', 'ihgh', 'ihgi', 'ihhg', 'ihhh', 'ihhi', 'ihig', 'ihih', 'ihii', 'iigg', 'iigh', 'iigi', 'iihg', 'iihh', 'iihi', 'iiig', 'iiih', 'iiii'])\n assert answers_match(candidate(digits='223'), ['aad', 'aae', 'aaf', 'abd', 'abe', 'abf', 'acd', 'ace', 'acf', 'bad', 'bae', 'baf', 'bbd', 'bbe', 'bbf', 'bcd', 'bce', 'bcf', 'cad', 'cae', 'caf', 'cbd', 'cbe', 'cbf', 'ccd', 'cce', 'ccf'])\n assert answers_match(candidate(digits='9753'), ['wpjd', 'wpje', 'wpjf', 'wpkd', 'wpke', 'wpkf', 'wpld', 'wple', 'wplf', 'wqjd', 'wqje', 'wqjf', 'wqkd', 'wqke', 'wqkf', 'wqld', 'wqle', 'wqlf', 'wrjd', 'wrje', 'wrjf', 'wrkd', 'wrke', 'wrkf', 'wrld', 'wrle', 'wrlf', 'wsjd', 'wsje', 'wsjf', 'wskd', 'wske', 'wskf', 'wsld', 'wsle', 'wslf', 'xpjd', 'xpje', 'xpjf', 'xpkd', 'xpke', 'xpkf', 'xpld', 'xple', 'xplf', 'xqjd', 'xqje', 'xqjf', 'xqkd', 'xqke', 'xqkf', 'xqld', 'xqle', 'xqlf', 'xrjd', 'xrje', 'xrjf', 'xrkd', 'xrke', 'xrkf', 'xrld', 'xrle', 'xrlf', 'xsjd', 'xsje', 'xsjf', 'xskd', 'xske', 'xskf', 'xsld', 'xsle', 'xslf', 'ypjd', 'ypje', 'ypjf', 'ypkd', 'ypke', 'ypkf', 'ypld', 'yple', 'yplf', 'yqjd', 'yqje', 'yqjf', 'yqkd', 'yqke', 'yqkf', 'yqld', 'yqle', 'yqlf', 'yrjd', 'yrje', 'yrjf', 'yrkd', 'yrke', 'yrkf', 'yrld', 'yrle', 'yrlf', 'ysjd', 'ysje', 'ysjf', 'yskd', 'yske', 'yskf', 'ysld', 'ysle', 'yslf', 'zpjd', 'zpje', 'zpjf', 'zpkd', 'zpke', 'zpkf', 'zpld', 'zple', 'zplf', 'zqjd', 'zqje', 'zqjf', 'zqkd', 'zqke', 'zqkf', 'zqld', 'zqle', 'zqlf', 'zrjd', 'zrje', 'zrjf', 'zrkd', 'zrke', 'zrkf', 'zrld', 'zrle', 'zrlf', 'zsjd', 'zsje', 'zsjf', 'zskd', 'zske', 'zskf', 'zsld', 'zsle', 'zslf'])\n assert answers_match(candidate(digits='425'), ['gaj', 'gak', 'gal', 'gbj', 'gbk', 'gbl', 'gcj', 'gck', 'gcl', 'haj', 'hak', 'hal', 'hbj', 'hbk', 'hbl', 'hcj', 'hck', 'hcl', 'iaj', 'iak', 'ial', 'ibj', 'ibk', 'ibl', 'icj', 'ick', 'icl'])\n assert answers_match(candidate(digits='8'), ['t', 'u', 'v'])\n assert answers_match(candidate(digits='256'), ['ajm', 'ajn', 'ajo', 'akm', 'akn', 'ako', 'alm', 'aln', 'alo', 'bjm', 'bjn', 'bjo', 'bkm', 'bkn', 'bko', 'blm', 'bln', 'blo', 'cjm', 'cjn', 'cjo', 'ckm', 'ckn', 'cko', 'clm', 'cln', 'clo'])\n assert answers_match(candidate(digits='8888'), ['tttt', 'tttu', 'tttv', 'ttut', 'ttuu', 'ttuv', 'ttvt', 'ttvu', 'ttvv', 'tutt', 'tutu', 'tutv', 'tuut', 'tuuu', 'tuuv', 'tuvt', 'tuvu', 'tuvv', 'tvtt', 'tvtu', 'tvtv', 'tvut', 'tvuu', 'tvuv', 'tvvt', 'tvvu', 'tvvv', 'uttt', 'uttu', 'uttv', 'utut', 'utuu', 'utuv', 'utvt', 'utvu', 'utvv', 'uutt', 'uutu', 'uutv', 'uuut', 'uuuu', 'uuuv', 'uuvt', 'uuvu', 'uuvv', 'uvtt', 'uvtu', 'uvtv', 'uvut', 'uvuu', 'uvuv', 'uvvt', 'uvvu', 'uvvv', 'vttt', 'vttu', 'vttv', 'vtut', 'vtuu', 'vtuv', 'vtvt', 'vtvu', 'vtvv', 'vutt', 'vutu', 'vutv', 'vuut', 'vuuu', 'vuuv', 'vuvt', 'vuvu', 'vuvv', 'vvtt', 'vvtu', 'vvtv', 'vvut', 'vvuu', 'vvuv', 'vvvt', 'vvvu', 'vvvv'])\n assert answers_match(candidate(digits='38'), ['dt', 'du', 'dv', 'et', 'eu', 'ev', 'ft', 'fu', 'fv'])\n assert answers_match(candidate(digits='5555'), ['jjjj', 'jjjk', 'jjjl', 'jjkj', 'jjkk', 'jjkl', 'jjlj', 'jjlk', 'jjll', 'jkjj', 'jkjk', 'jkjl', 'jkkj', 'jkkk', 'jkkl', 'jklj', 'jklk', 'jkll', 'jljj', 'jljk', 'jljl', 'jlkj', 'jlkk', 'jlkl', 'jllj', 'jllk', 'jlll', 'kjjj', 'kjjk', 'kjjl', 'kjkj', 'kjkk', 'kjkl', 'kjlj', 'kjlk', 'kjll', 'kkjj', 'kkjk', 'kkjl', 'kkkj', 'kkkk', 'kkkl', 'kklj', 'kklk', 'kkll', 'kljj', 'kljk', 'kljl', 'klkj', 'klkk', 'klkl', 'kllj', 'kllk', 'klll', 'ljjj', 'ljjk', 'ljjl', 'ljkj', 'ljkk', 'ljkl', 'ljlj', 'ljlk', 'ljll', 'lkjj', 'lkjk', 'lkjl', 'lkkj', 'lkkk', 'lkkl', 'lklj', 'lklk', 'lkll', 'lljj', 'lljk', 'lljl', 'llkj', 'llkk', 'llkl', 'lllj', 'lllk', 'llll'])\n assert answers_match(candidate(digits='293'), ['awd', 'awe', 'awf', 'axd', 'axe', 'axf', 'ayd', 'aye', 'ayf', 'azd', 'aze', 'azf', 'bwd', 'bwe', 'bwf', 'bxd', 'bxe', 'bxf', 'byd', 'bye', 'byf', 'bzd', 'bze', 'bzf', 'cwd', 'cwe', 'cwf', 'cxd', 'cxe', 'cxf', 'cyd', 'cye', 'cyf', 'czd', 'cze', 'czf'])\n assert answers_match(candidate(digits='273'), ['apd', 'ape', 'apf', 'aqd', 'aqe', 'aqf', 'ard', 'are', 'arf', 'asd', 'ase', 'asf', 'bpd', 'bpe', 'bpf', 'bqd', 'bqe', 'bqf', 'brd', 'bre', 'brf', 'bsd', 'bse', 'bsf', 'cpd', 'cpe', 'cpf', 'cqd', 'cqe', 'cqf', 'crd', 'cre', 'crf', 'csd', 'cse', 'csf'])\n assert answers_match(candidate(digits='9999'), ['wwww', 'wwwx', 'wwwy', 'wwwz', 'wwxw', 'wwxx', 'wwxy', 'wwxz', 'wwyw', 'wwyx', 'wwyy', 'wwyz', 'wwzw', 'wwzx', 'wwzy', 'wwzz', 'wxww', 'wxwx', 'wxwy', 'wxwz', 'wxxw', 'wxxx', 'wxxy', 'wxxz', 'wxyw', 'wxyx', 'wxyy', 'wxyz', 'wxzw', 'wxzx', 'wxzy', 'wxzz', 'wyww', 'wywx', 'wywy', 'wywz', 'wyxw', 'wyxx', 'wyxy', 'wyxz', 'wyyw', 'wyyx', 'wyyy', 'wyyz', 'wyzw', 'wyzx', 'wyzy', 'wyzz', 'wzww', 'wzwx', 'wzwy', 'wzwz', 'wzxw', 'wzxx', 'wzxy', 'wzxz', 'wzyw', 'wzyx', 'wzyy', 'wzyz', 'wzzw', 'wzzx', 'wzzy', 'wzzz', 'xwww', 'xwwx', 'xwwy', 'xwwz', 'xwxw', 'xwxx', 'xwxy', 'xwxz', 'xwyw', 'xwyx', 'xwyy', 'xwyz', 'xwzw', 'xwzx', 'xwzy', 'xwzz', 'xxww', 'xxwx', 'xxwy', 'xxwz', 'xxxw', 'xxxx', 'xxxy', 'xxxz', 'xxyw', 'xxyx', 'xxyy', 'xxyz', 'xxzw', 'xxzx', 'xxzy', 'xxzz', 'xyww', 'xywx', 'xywy', 'xywz', 'xyxw', 'xyxx', 'xyxy', 'xyxz', 'xyyw', 'xyyx', 'xyyy', 'xyyz', 'xyzw', 'xyzx', 'xyzy', 'xyzz', 'xzww', 'xzwx', 'xzwy', 'xzwz', 'xzxw', 'xzxx', 'xzxy', 'xzxz', 'xzyw', 'xzyx', 'xzyy', 'xzyz', 'xzzw', 'xzzx', 'xzzy', 'xzzz', 'ywww', 'ywwx', 'ywwy', 'ywwz', 'ywxw', 'ywxx', 'ywxy', 'ywxz', 'ywyw', 'ywyx', 'ywyy', 'ywyz', 'ywzw', 'ywzx', 'ywzy', 'ywzz', 'yxww', 'yxwx', 'yxwy', 'yxwz', 'yxxw', 'yxxx', 'yxxy', 'yxxz', 'yxyw', 'yxyx', 'yxyy', 'yxyz', 'yxzw', 'yxzx', 'yxzy', 'yxzz', 'yyww', 'yywx', 'yywy', 'yywz', 'yyxw', 'yyxx', 'yyxy', 'yyxz', 'yyyw', 'yyyx', 'yyyy', 'yyyz', 'yyzw', 'yyzx', 'yyzy', 'yyzz', 'yzww', 'yzwx', 'yzwy', 'yzwz', 'yzxw', 'yzxx', 'yzxy', 'yzxz', 'yzyw', 'yzyx', 'yzyy', 'yzyz', 'yzzw', 'yzzx', 'yzzy', 'yzzz', 'zwww', 'zwwx', 'zwwy', 'zwwz', 'zwxw', 'zwxx', 'zwxy', 'zwxz', 'zwyw', 'zwyx', 'zwyy', 'zwyz', 'zwzw', 'zwzx', 'zwzy', 'zwzz', 'zxww', 'zxwx', 'zxwy', 'zxwz', 'zxxw', 'zxxx', 'zxxy', 'zxxz', 'zxyw', 'zxyx', 'zxyy', 'zxyz', 'zxzw', 'zxzx', 'zxzy', 'zxzz', 'zyww', 'zywx', 'zywy', 'zywz', 'zyxw', 'zyxx', 'zyxy', 'zyxz', 'zyyw', 'zyyx', 'zyyy', 'zyyz', 'zyzw', 'zyzx', 'zyzy', 'zyzz', 'zzww', 'zzwx', 'zzwy', 'zzwz', 'zzxw', 'zzxx', 'zzxy', 'zzxz', 'zzyw', 'zzyx', 'zzyy', 'zzyz', 'zzzw', 'zzzx', 'zzzy', 'zzzz'])\n assert answers_match(candidate(digits='999'), ['www', 'wwx', 'wwy', 'wwz', 'wxw', 'wxx', 'wxy', 'wxz', 'wyw', 'wyx', 'wyy', 'wyz', 'wzw', 'wzx', 'wzy', 'wzz', 'xww', 'xwx', 'xwy', 'xwz', 'xxw', 'xxx', 'xxy', 'xxz', 'xyw', 'xyx', 'xyy', 'xyz', 'xzw', 'xzx', 'xzy', 'xzz', 'yww', 'ywx', 'ywy', 'ywz', 'yxw', 'yxx', 'yxy', 'yxz', 'yyw', 'yyx', 'yyy', 'yyz', 'yzw', 'yzx', 'yzy', 'yzz', 'zww', 'zwx', 'zwy', 'zwz', 'zxw', 'zxx', 'zxy', 'zxz', 'zyw', 'zyx', 'zyy', 'zyz', 'zzw', 'zzx', 'zzy', 'zzz'])\n assert answers_match(candidate(digits='73'), ['pd', 'pe', 'pf', 'qd', 'qe', 'qf', 'rd', 're', 'rf', 'sd', 'se', 'sf'])\n assert answers_match(candidate(digits='673'), ['mpd', 'mpe', 'mpf', 'mqd', 'mqe', 'mqf', 'mrd', 'mre', 'mrf', 'msd', 'mse', 'msf', 'npd', 'npe', 'npf', 'nqd', 'nqe', 'nqf', 'nrd', 'nre', 'nrf', 'nsd', 'nse', 'nsf', 'opd', 'ope', 'opf', 'oqd', 'oqe', 'oqf', 'ord', 'ore', 'orf', 'osd', 'ose', 'osf'])\n assert answers_match(candidate(digits='9257'), ['wajp', 'wajq', 'wajr', 'wajs', 'wakp', 'wakq', 'wakr', 'waks', 'walp', 'walq', 'walr', 'wals', 'wbjp', 'wbjq', 'wbjr', 'wbjs', 'wbkp', 'wbkq', 'wbkr', 'wbks', 'wblp', 'wblq', 'wblr', 'wbls', 'wcjp', 'wcjq', 'wcjr', 'wcjs', 'wckp', 'wckq', 'wckr', 'wcks', 'wclp', 'wclq', 'wclr', 'wcls', 'xajp', 'xajq', 'xajr', 'xajs', 'xakp', 'xakq', 'xakr', 'xaks', 'xalp', 'xalq', 'xalr', 'xals', 'xbjp', 'xbjq', 'xbjr', 'xbjs', 'xbkp', 'xbkq', 'xbkr', 'xbks', 'xblp', 'xblq', 'xblr', 'xbls', 'xcjp', 'xcjq', 'xcjr', 'xcjs', 'xckp', 'xckq', 'xckr', 'xcks', 'xclp', 'xclq', 'xclr', 'xcls', 'yajp', 'yajq', 'yajr', 'yajs', 'yakp', 'yakq', 'yakr', 'yaks', 'yalp', 'yalq', 'yalr', 'yals', 'ybjp', 'ybjq', 'ybjr', 'ybjs', 'ybkp', 'ybkq', 'ybkr', 'ybks', 'yblp', 'yblq', 'yblr', 'ybls', 'ycjp', 'ycjq', 'ycjr', 'ycjs', 'yckp', 'yckq', 'yckr', 'ycks', 'yclp', 'yclq', 'yclr', 'ycls', 'zajp', 'zajq', 'zajr', 'zajs', 'zakp', 'zakq', 'zakr', 'zaks', 'zalp', 'zalq', 'zalr', 'zals', 'zbjp', 'zbjq', 'zbjr', 'zbjs', 'zbkp', 'zbkq', 'zbkr', 'zbks', 'zblp', 'zblq', 'zblr', 'zbls', 'zcjp', 'zcjq', 'zcjr', 'zcjs', 'zckp', 'zckq', 'zckr', 'zcks', 'zclp', 'zclq', 'zclr', 'zcls'])\n assert answers_match(candidate(digits='33'), ['dd', 'de', 'df', 'ed', 'ee', 'ef', 'fd', 'fe', 'ff'])\n assert answers_match(candidate(digits='555'), ['jjj', 'jjk', 'jjl', 'jkj', 'jkk', 'jkl', 'jlj', 'jlk', 'jll', 'kjj', 'kjk', 'kjl', 'kkj', 'kkk', 'kkl', 'klj', 'klk', 'kll', 'ljj', 'ljk', 'ljl', 'lkj', 'lkk', 'lkl', 'llj', 'llk', 'lll'])\n assert answers_match(candidate(digits='7777'), ['pppp', 'pppq', 'pppr', 'ppps', 'ppqp', 'ppqq', 'ppqr', 'ppqs', 'pprp', 'pprq', 'pprr', 'pprs', 'ppsp', 'ppsq', 'ppsr', 'ppss', 'pqpp', 'pqpq', 'pqpr', 'pqps', 'pqqp', 'pqqq', 'pqqr', 'pqqs', 'pqrp', 'pqrq', 'pqrr', 'pqrs', 'pqsp', 'pqsq', 'pqsr', 'pqss', 'prpp', 'prpq', 'prpr', 'prps', 'prqp', 'prqq', 'prqr', 'prqs', 'prrp', 'prrq', 'prrr', 'prrs', 'prsp', 'prsq', 'prsr', 'prss', 'pspp', 'pspq', 'pspr', 'psps', 'psqp', 'psqq', 'psqr', 'psqs', 'psrp', 'psrq', 'psrr', 'psrs', 'pssp', 'pssq', 'pssr', 'psss', 'qppp', 'qppq', 'qppr', 'qpps', 'qpqp', 'qpqq', 'qpqr', 'qpqs', 'qprp', 'qprq', 'qprr', 'qprs', 'qpsp', 'qpsq', 'qpsr', 'qpss', 'qqpp', 'qqpq', 'qqpr', 'qqps', 'qqqp', 'qqqq', 'qqqr', 'qqqs', 'qqrp', 'qqrq', 'qqrr', 'qqrs', 'qqsp', 'qqsq', 'qqsr', 'qqss', 'qrpp', 'qrpq', 'qrpr', 'qrps', 'qrqp', 'qrqq', 'qrqr', 'qrqs', 'qrrp', 'qrrq', 'qrrr', 'qrrs', 'qrsp', 'qrsq', 'qrsr', 'qrss', 'qspp', 'qspq', 'qspr', 'qsps', 'qsqp', 'qsqq', 'qsqr', 'qsqs', 'qsrp', 'qsrq', 'qsrr', 'qsrs', 'qssp', 'qssq', 'qssr', 'qsss', 'rppp', 'rppq', 'rppr', 'rpps', 'rpqp', 'rpqq', 'rpqr', 'rpqs', 'rprp', 'rprq', 'rprr', 'rprs', 'rpsp', 'rpsq', 'rpsr', 'rpss', 'rqpp', 'rqpq', 'rqpr', 'rqps', 'rqqp', 'rqqq', 'rqqr', 'rqqs', 'rqrp', 'rqrq', 'rqrr', 'rqrs', 'rqsp', 'rqsq', 'rqsr', 'rqss', 'rrpp', 'rrpq', 'rrpr', 'rrps', 'rrqp', 'rrqq', 'rrqr', 'rrqs', 'rrrp', 'rrrq', 'rrrr', 'rrrs', 'rrsp', 'rrsq', 'rrsr', 'rrss', 'rspp', 'rspq', 'rspr', 'rsps', 'rsqp', 'rsqq', 'rsqr', 'rsqs', 'rsrp', 'rsrq', 'rsrr', 'rsrs', 'rssp', 'rssq', 'rssr', 'rsss', 'sppp', 'sppq', 'sppr', 'spps', 'spqp', 'spqq', 'spqr', 'spqs', 'sprp', 'sprq', 'sprr', 'sprs', 'spsp', 'spsq', 'spsr', 'spss', 'sqpp', 'sqpq', 'sqpr', 'sqps', 'sqqp', 'sqqq', 'sqqr', 'sqqs', 'sqrp', 'sqrq', 'sqrr', 'sqrs', 'sqsp', 'sqsq', 'sqsr', 'sqss', 'srpp', 'srpq', 'srpr', 'srps', 'srqp', 'srqq', 'srqr', 'srqs', 'srrp', 'srrq', 'srrr', 'srrs', 'srsp', 'srsq', 'srsr', 'srss', 'sspp', 'sspq', 'sspr', 'ssps', 'ssqp', 'ssqq', 'ssqr', 'ssqs', 'ssrp', 'ssrq', 'ssrr', 'ssrs', 'sssp', 'sssq', 'sssr', 'ssss'])\n assert answers_match(candidate(digits='59'), ['jw', 'jx', 'jy', 'jz', 'kw', 'kx', 'ky', 'kz', 'lw', 'lx', 'ly', 'lz'])\n assert answers_match(candidate(digits='369'), ['dmw', 'dmx', 'dmy', 'dmz', 'dnw', 'dnx', 'dny', 'dnz', 'dow', 'dox', 'doy', 'doz', 'emw', 'emx', 'emy', 'emz', 'enw', 'enx', 'eny', 'enz', 'eow', 'eox', 'eoy', 'eoz', 'fmw', 'fmx', 'fmy', 'fmz', 'fnw', 'fnx', 'fny', 'fnz', 'fow', 'fox', 'foy', 'foz'])\n assert answers_match(candidate(digits='298'), ['awt', 'awu', 'awv', 'axt', 'axu', 'axv', 'ayt', 'ayu', 'ayv', 'azt', 'azu', 'azv', 'bwt', 'bwu', 'bwv', 'bxt', 'bxu', 'bxv', 'byt', 'byu', 'byv', 'bzt', 'bzu', 'bzv', 'cwt', 'cwu', 'cwv', 'cxt', 'cxu', 'cxv', 'cyt', 'cyu', 'cyv', 'czt', 'czu', 'czv'])\n assert answers_match(candidate(digits='88'), ['tt', 'tu', 'tv', 'ut', 'uu', 'uv', 'vt', 'vu', 'vv'])\n assert answers_match(candidate(digits='2222'), ['aaaa', 'aaab', 'aaac', 'aaba', 'aabb', 'aabc', 'aaca', 'aacb', 'aacc', 'abaa', 'abab', 'abac', 'abba', 'abbb', 'abbc', 'abca', 'abcb', 'abcc', 'acaa', 'acab', 'acac', 'acba', 'acbb', 'acbc', 'acca', 'accb', 'accc', 'baaa', 'baab', 'baac', 'baba', 'babb', 'babc', 'baca', 'bacb', 'bacc', 'bbaa', 'bbab', 'bbac', 'bbba', 'bbbb', 'bbbc', 'bbca', 'bbcb', 'bbcc', 'bcaa', 'bcab', 'bcac', 'bcba', 'bcbb', 'bcbc', 'bcca', 'bccb', 'bccc', 'caaa', 'caab', 'caac', 'caba', 'cabb', 'cabc', 'caca', 'cacb', 'cacc', 'cbaa', 'cbab', 'cbac', 'cbba', 'cbbb', 'cbbc', 'cbca', 'cbcb', 'cbcc', 'ccaa', 'ccab', 'ccac', 'ccba', 'ccbb', 'ccbc', 'ccca', 'cccb', 'cccc'])\n assert answers_match(candidate(digits='2357'), ['adjp', 'adjq', 'adjr', 'adjs', 'adkp', 'adkq', 'adkr', 'adks', 'adlp', 'adlq', 'adlr', 'adls', 'aejp', 'aejq', 'aejr', 'aejs', 'aekp', 'aekq', 'aekr', 'aeks', 'aelp', 'aelq', 'aelr', 'aels', 'afjp', 'afjq', 'afjr', 'afjs', 'afkp', 'afkq', 'afkr', 'afks', 'aflp', 'aflq', 'aflr', 'afls', 'bdjp', 'bdjq', 'bdjr', 'bdjs', 'bdkp', 'bdkq', 'bdkr', 'bdks', 'bdlp', 'bdlq', 'bdlr', 'bdls', 'bejp', 'bejq', 'bejr', 'bejs', 'bekp', 'bekq', 'bekr', 'beks', 'belp', 'belq', 'belr', 'bels', 'bfjp', 'bfjq', 'bfjr', 'bfjs', 'bfkp', 'bfkq', 'bfkr', 'bfks', 'bflp', 'bflq', 'bflr', 'bfls', 'cdjp', 'cdjq', 'cdjr', 'cdjs', 'cdkp', 'cdkq', 'cdkr', 'cdks', 'cdlp', 'cdlq', 'cdlr', 'cdls', 'cejp', 'cejq', 'cejr', 'cejs', 'cekp', 'cekq', 'cekr', 'ceks', 'celp', 'celq', 'celr', 'cels', 'cfjp', 'cfjq', 'cfjr', 'cfjs', 'cfkp', 'cfkq', 'cfkr', 'cfks', 'cflp', 'cflq', 'cflr', 'cfls'])\n assert answers_match(candidate(digits='29'), ['aw', 'ax', 'ay', 'az', 'bw', 'bx', 'by', 'bz', 'cw', 'cx', 'cy', 'cz'])\n assert answers_match(candidate(digits='357'), ['djp', 'djq', 'djr', 'djs', 'dkp', 'dkq', 'dkr', 'dks', 'dlp', 'dlq', 'dlr', 'dls', 'ejp', 'ejq', 'ejr', 'ejs', 'ekp', 'ekq', 'ekr', 'eks', 'elp', 'elq', 'elr', 'els', 'fjp', 'fjq', 'fjr', 'fjs', 'fkp', 'fkq', 'fkr', 'fks', 'flp', 'flq', 'flr', 'fls'])\n assert answers_match(candidate(digits='44'), ['gg', 'gh', 'gi', 'hg', 'hh', 'hi', 'ig', 'ih', 'ii'])\n assert answers_match(candidate(digits='294'), ['awg', 'awh', 'awi', 'axg', 'axh', 'axi', 'ayg', 'ayh', 'ayi', 'azg', 'azh', 'azi', 'bwg', 'bwh', 'bwi', 'bxg', 'bxh', 'bxi', 'byg', 'byh', 'byi', 'bzg', 'bzh', 'bzi', 'cwg', 'cwh', 'cwi', 'cxg', 'cxh', 'cxi', 'cyg', 'cyh', 'cyi', 'czg', 'czh', 'czi'])\n assert answers_match(candidate(digits='235'), ['adj', 'adk', 'adl', 'aej', 'aek', 'ael', 'afj', 'afk', 'afl', 'bdj', 'bdk', 'bdl', 'bej', 'bek', 'bel', 'bfj', 'bfk', 'bfl', 'cdj', 'cdk', 'cdl', 'cej', 'cek', 'cel', 'cfj', 'cfk', 'cfl'])\n assert answers_match(candidate(digits='6789'), ['mptw', 'mptx', 'mpty', 'mptz', 'mpuw', 'mpux', 'mpuy', 'mpuz', 'mpvw', 'mpvx', 'mpvy', 'mpvz', 'mqtw', 'mqtx', 'mqty', 'mqtz', 'mquw', 'mqux', 'mquy', 'mquz', 'mqvw', 'mqvx', 'mqvy', 'mqvz', 'mrtw', 'mrtx', 'mrty', 'mrtz', 'mruw', 'mrux', 'mruy', 'mruz', 'mrvw', 'mrvx', 'mrvy', 'mrvz', 'mstw', 'mstx', 'msty', 'mstz', 'msuw', 'msux', 'msuy', 'msuz', 'msvw', 'msvx', 'msvy', 'msvz', 'nptw', 'nptx', 'npty', 'nptz', 'npuw', 'npux', 'npuy', 'npuz', 'npvw', 'npvx', 'npvy', 'npvz', 'nqtw', 'nqtx', 'nqty', 'nqtz', 'nquw', 'nqux', 'nquy', 'nquz', 'nqvw', 'nqvx', 'nqvy', 'nqvz', 'nrtw', 'nrtx', 'nrty', 'nrtz', 'nruw', 'nrux', 'nruy', 'nruz', 'nrvw', 'nrvx', 'nrvy', 'nrvz', 'nstw', 'nstx', 'nsty', 'nstz', 'nsuw', 'nsux', 'nsuy', 'nsuz', 'nsvw', 'nsvx', 'nsvy', 'nsvz', 'optw', 'optx', 'opty', 'optz', 'opuw', 'opux', 'opuy', 'opuz', 'opvw', 'opvx', 'opvy', 'opvz', 'oqtw', 'oqtx', 'oqty', 'oqtz', 'oquw', 'oqux', 'oquy', 'oquz', 'oqvw', 'oqvx', 'oqvy', 'oqvz', 'ortw', 'ortx', 'orty', 'ortz', 'oruw', 'orux', 'oruy', 'oruz', 'orvw', 'orvx', 'orvy', 'orvz', 'ostw', 'ostx', 'osty', 'ostz', 'osuw', 'osux', 'osuy', 'osuz', 'osvw', 'osvx', 'osvy', 'osvz'])\n assert answers_match(candidate(digits='697'), ['mwp', 'mwq', 'mwr', 'mws', 'mxp', 'mxq', 'mxr', 'mxs', 'myp', 'myq', 'myr', 'mys', 'mzp', 'mzq', 'mzr', 'mzs', 'nwp', 'nwq', 'nwr', 'nws', 'nxp', 'nxq', 'nxr', 'nxs', 'nyp', 'nyq', 'nyr', 'nys', 'nzp', 'nzq', 'nzr', 'nzs', 'owp', 'owq', 'owr', 'ows', 'oxp', 'oxq', 'oxr', 'oxs', 'oyp', 'oyq', 'oyr', 'oys', 'ozp', 'ozq', 'ozr', 'ozs'])\n assert answers_match(candidate(digits='57'), ['jp', 'jq', 'jr', 'js', 'kp', 'kq', 'kr', 'ks', 'lp', 'lq', 'lr', 'ls'])\n assert answers_match(candidate(digits='237'), ['adp', 'adq', 'adr', 'ads', 'aep', 'aeq', 'aer', 'aes', 'afp', 'afq', 'afr', 'afs', 'bdp', 'bdq', 'bdr', 'bds', 'bep', 'beq', 'ber', 'bes', 'bfp', 'bfq', 'bfr', 'bfs', 'cdp', 'cdq', 'cdr', 'cds', 'cep', 'ceq', 'cer', 'ces', 'cfp', 'cfq', 'cfr', 'cfs'])\n assert answers_match(candidate(digits='7'), ['p', 'q', 'r', 's'])\n assert answers_match(candidate(digits='789'), ['ptw', 'ptx', 'pty', 'ptz', 'puw', 'pux', 'puy', 'puz', 'pvw', 'pvx', 'pvy', 'pvz', 'qtw', 'qtx', 'qty', 'qtz', 'quw', 'qux', 'quy', 'quz', 'qvw', 'qvx', 'qvy', 'qvz', 'rtw', 'rtx', 'rty', 'rtz', 'ruw', 'rux', 'ruy', 'ruz', 'rvw', 'rvx', 'rvy', 'rvz', 'stw', 'stx', 'sty', 'stz', 'suw', 'sux', 'suy', 'suz', 'svw', 'svx', 'svy', 'svz'])\n assert answers_match(candidate(digits='777'), ['ppp', 'ppq', 'ppr', 'pps', 'pqp', 'pqq', 'pqr', 'pqs', 'prp', 'prq', 'prr', 'prs', 'psp', 'psq', 'psr', 'pss', 'qpp', 'qpq', 'qpr', 'qps', 'qqp', 'qqq', 'qqr', 'qqs', 'qrp', 'qrq', 'qrr', 'qrs', 'qsp', 'qsq', 'qsr', 'qss', 'rpp', 'rpq', 'rpr', 'rps', 'rqp', 'rqq', 'rqr', 'rqs', 'rrp', 'rrq', 'rrr', 'rrs', 'rsp', 'rsq', 'rsr', 'rss', 'spp', 'spq', 'spr', 'sps', 'sqp', 'sqq', 'sqr', 'sqs', 'srp', 'srq', 'srr', 'srs', 'ssp', 'ssq', 'ssr', 'sss'])\n assert answers_match(candidate(digits='222'), ['aaa', 'aab', 'aac', 'aba', 'abb', 'abc', 'aca', 'acb', 'acc', 'baa', 'bab', 'bac', 'bba', 'bbb', 'bbc', 'bca', 'bcb', 'bcc', 'caa', 'cab', 'cac', 'cba', 'cbb', 'cbc', 'cca', 'ccb', 'ccc'])\n assert answers_match(candidate(digits='94'), ['wg', 'wh', 'wi', 'xg', 'xh', 'xi', 'yg', 'yh', 'yi', 'zg', 'zh', 'zi'])\n assert answers_match(candidate(digits='377'), ['dpp', 'dpq', 'dpr', 'dps', 'dqp', 'dqq', 'dqr', 'dqs', 'drp', 'drq', 'drr', 'drs', 'dsp', 'dsq', 'dsr', 'dss', 'epp', 'epq', 'epr', 'eps', 'eqp', 'eqq', 'eqr', 'eqs', 'erp', 'erq', 'err', 'ers', 'esp', 'esq', 'esr', 'ess', 'fpp', 'fpq', 'fpr', 'fps', 'fqp', 'fqq', 'fqr', 'fqs', 'frp', 'frq', 'frr', 'frs', 'fsp', 'fsq', 'fsr', 'fss'])\n assert answers_match(candidate(digits='923'), ['wad', 'wae', 'waf', 'wbd', 'wbe', 'wbf', 'wcd', 'wce', 'wcf', 'xad', 'xae', 'xaf', 'xbd', 'xbe', 'xbf', 'xcd', 'xce', 'xcf', 'yad', 'yae', 'yaf', 'ybd', 'ybe', 'ybf', 'ycd', 'yce', 'ycf', 'zad', 'zae', 'zaf', 'zbd', 'zbe', 'zbf', 'zcd', 'zce', 'zcf'])\n assert answers_match(candidate(digits='333'), ['ddd', 'dde', 'ddf', 'ded', 'dee', 'def', 'dfd', 'dfe', 'dff', 'edd', 'ede', 'edf', 'eed', 'eee', 'eef', 'efd', 'efe', 'eff', 'fdd', 'fde', 'fdf', 'fed', 'fee', 'fef', 'ffd', 'ffe', 'fff'])\n assert answers_match(candidate(digits='888'), ['ttt', 'ttu', 'ttv', 'tut', 'tuu', 'tuv', 'tvt', 'tvu', 'tvv', 'utt', 'utu', 'utv', 'uut', 'uuu', 'uuv', 'uvt', 'uvu', 'uvv', 'vtt', 'vtu', 'vtv', 'vut', 'vuu', 'vuv', 'vvt', 'vvu', 'vvv'])\n assert answers_match(candidate(digits='4826'), ['gtam', 'gtan', 'gtao', 'gtbm', 'gtbn', 'gtbo', 'gtcm', 'gtcn', 'gtco', 'guam', 'guan', 'guao', 'gubm', 'gubn', 'gubo', 'gucm', 'gucn', 'guco', 'gvam', 'gvan', 'gvao', 'gvbm', 'gvbn', 'gvbo', 'gvcm', 'gvcn', 'gvco', 'htam', 'htan', 'htao', 'htbm', 'htbn', 'htbo', 'htcm', 'htcn', 'htco', 'huam', 'huan', 'huao', 'hubm', 'hubn', 'hubo', 'hucm', 'hucn', 'huco', 'hvam', 'hvan', 'hvao', 'hvbm', 'hvbn', 'hvbo', 'hvcm', 'hvcn', 'hvco', 'itam', 'itan', 'itao', 'itbm', 'itbn', 'itbo', 'itcm', 'itcn', 'itco', 'iuam', 'iuan', 'iuao', 'iubm', 'iubn', 'iubo', 'iucm', 'iucn', 'iuco', 'ivam', 'ivan', 'ivao', 'ivbm', 'ivbn', 'ivbo', 'ivcm', 'ivcn', 'ivco'])\n assert answers_match(candidate(digits='724'), ['pag', 'pah', 'pai', 'pbg', 'pbh', 'pbi', 'pcg', 'pch', 'pci', 'qag', 'qah', 'qai', 'qbg', 'qbh', 'qbi', 'qcg', 'qch', 'qci', 'rag', 'rah', 'rai', 'rbg', 'rbh', 'rbi', 'rcg', 'rch', 'rci', 'sag', 'sah', 'sai', 'sbg', 'sbh', 'sbi', 'scg', 'sch', 'sci'])\n assert answers_match(candidate(digits='2793'), ['apwd', 'apwe', 'apwf', 'apxd', 'apxe', 'apxf', 'apyd', 'apye', 'apyf', 'apzd', 'apze', 'apzf', 'aqwd', 'aqwe', 'aqwf', 'aqxd', 'aqxe', 'aqxf', 'aqyd', 'aqye', 'aqyf', 'aqzd', 'aqze', 'aqzf', 'arwd', 'arwe', 'arwf', 'arxd', 'arxe', 'arxf', 'aryd', 'arye', 'aryf', 'arzd', 'arze', 'arzf', 'aswd', 'aswe', 'aswf', 'asxd', 'asxe', 'asxf', 'asyd', 'asye', 'asyf', 'aszd', 'asze', 'aszf', 'bpwd', 'bpwe', 'bpwf', 'bpxd', 'bpxe', 'bpxf', 'bpyd', 'bpye', 'bpyf', 'bpzd', 'bpze', 'bpzf', 'bqwd', 'bqwe', 'bqwf', 'bqxd', 'bqxe', 'bqxf', 'bqyd', 'bqye', 'bqyf', 'bqzd', 'bqze', 'bqzf', 'brwd', 'brwe', 'brwf', 'brxd', 'brxe', 'brxf', 'bryd', 'brye', 'bryf', 'brzd', 'brze', 'brzf', 'bswd', 'bswe', 'bswf', 'bsxd', 'bsxe', 'bsxf', 'bsyd', 'bsye', 'bsyf', 'bszd', 'bsze', 'bszf', 'cpwd', 'cpwe', 'cpwf', 'cpxd', 'cpxe', 'cpxf', 'cpyd', 'cpye', 'cpyf', 'cpzd', 'cpze', 'cpzf', 'cqwd', 'cqwe', 'cqwf', 'cqxd', 'cqxe', 'cqxf', 'cqyd', 'cqye', 'cqyf', 'cqzd', 'cqze', 'cqzf', 'crwd', 'crwe', 'crwf', 'crxd', 'crxe', 'crxf', 'cryd', 'crye', 'cryf', 'crzd', 'crze', 'crzf', 'cswd', 'cswe', 'cswf', 'csxd', 'csxe', 'csxf', 'csyd', 'csye', 'csyf', 'cszd', 'csze', 'cszf'])\n assert answers_match(candidate(digits='8947'), ['twgp', 'twgq', 'twgr', 'twgs', 'twhp', 'twhq', 'twhr', 'twhs', 'twip', 'twiq', 'twir', 'twis', 'txgp', 'txgq', 'txgr', 'txgs', 'txhp', 'txhq', 'txhr', 'txhs', 'txip', 'txiq', 'txir', 'txis', 'tygp', 'tygq', 'tygr', 'tygs', 'tyhp', 'tyhq', 'tyhr', 'tyhs', 'tyip', 'tyiq', 'tyir', 'tyis', 'tzgp', 'tzgq', 'tzgr', 'tzgs', 'tzhp', 'tzhq', 'tzhr', 'tzhs', 'tzip', 'tziq', 'tzir', 'tzis', 'uwgp', 'uwgq', 'uwgr', 'uwgs', 'uwhp', 'uwhq', 'uwhr', 'uwhs', 'uwip', 'uwiq', 'uwir', 'uwis', 'uxgp', 'uxgq', 'uxgr', 'uxgs', 'uxhp', 'uxhq', 'uxhr', 'uxhs', 'uxip', 'uxiq', 'uxir', 'uxis', 'uygp', 'uygq', 'uygr', 'uygs', 'uyhp', 'uyhq', 'uyhr', 'uyhs', 'uyip', 'uyiq', 'uyir', 'uyis', 'uzgp', 'uzgq', 'uzgr', 'uzgs', 'uzhp', 'uzhq', 'uzhr', 'uzhs', 'uzip', 'uziq', 'uzir', 'uzis', 'vwgp', 'vwgq', 'vwgr', 'vwgs', 'vwhp', 'vwhq', 'vwhr', 'vwhs', 'vwip', 'vwiq', 'vwir', 'vwis', 'vxgp', 'vxgq', 'vxgr', 'vxgs', 'vxhp', 'vxhq', 'vxhr', 'vxhs', 'vxip', 'vxiq', 'vxir', 'vxis', 'vygp', 'vygq', 'vygr', 'vygs', 'vyhp', 'vyhq', 'vyhr', 'vyhs', 'vyip', 'vyiq', 'vyir', 'vyis', 'vzgp', 'vzgq', 'vzgr', 'vzgs', 'vzhp', 'vzhq', 'vzhr', 'vzhs', 'vzip', 'vziq', 'vzir', 'vzis'])\n assert answers_match(candidate(digits='444'), ['ggg', 'ggh', 'ggi', 'ghg', 'ghh', 'ghi', 'gig', 'gih', 'gii', 'hgg', 'hgh', 'hgi', 'hhg', 'hhh', 'hhi', 'hig', 'hih', 'hii', 'igg', 'igh', 'igi', 'ihg', 'ihh', 'ihi', 'iig', 'iih', 'iii'])\n assert answers_match(candidate(digits='397'), ['dwp', 'dwq', 'dwr', 'dws', 'dxp', 'dxq', 'dxr', 'dxs', 'dyp', 'dyq', 'dyr', 'dys', 'dzp', 'dzq', 'dzr', 'dzs', 'ewp', 'ewq', 'ewr', 'ews', 'exp', 'exq', 'exr', 'exs', 'eyp', 'eyq', 'eyr', 'eys', 'ezp', 'ezq', 'ezr', 'ezs', 'fwp', 'fwq', 'fwr', 'fws', 'fxp', 'fxq', 'fxr', 'fxs', 'fyp', 'fyq', 'fyr', 'fys', 'fzp', 'fzq', 'fzr', 'fzs'])\n assert answers_match(candidate(digits='6'), ['m', 'n', 'o'])\n assert answers_match(candidate(digits='58'), ['jt', 'ju', 'jv', 'kt', 'ku', 'kv', 'lt', 'lu', 'lv'])\n assert answers_match(candidate(digits='77'), ['pp', 'pq', 'pr', 'ps', 'qp', 'qq', 'qr', 'qs', 'rp', 'rq', 'rr', 'rs', 'sp', 'sq', 'sr', 'ss'])\n assert answers_match(candidate(digits='56'), ['jm', 'jn', 'jo', 'km', 'kn', 'ko', 'lm', 'ln', 'lo'])\n assert answers_match(candidate(digits='85'), ['tj', 'tk', 'tl', 'uj', 'uk', 'ul', 'vj', 'vk', 'vl'])\n assert answers_match(candidate(digits='2345'), ['adgj', 'adgk', 'adgl', 'adhj', 'adhk', 'adhl', 'adij', 'adik', 'adil', 'aegj', 'aegk', 'aegl', 'aehj', 'aehk', 'aehl', 'aeij', 'aeik', 'aeil', 'afgj', 'afgk', 'afgl', 'afhj', 'afhk', 'afhl', 'afij', 'afik', 'afil', 'bdgj', 'bdgk', 'bdgl', 'bdhj', 'bdhk', 'bdhl', 'bdij', 'bdik', 'bdil', 'begj', 'begk', 'begl', 'behj', 'behk', 'behl', 'beij', 'beik', 'beil', 'bfgj', 'bfgk', 'bfgl', 'bfhj', 'bfhk', 'bfhl', 'bfij', 'bfik', 'bfil', 'cdgj', 'cdgk', 'cdgl', 'cdhj', 'cdhk', 'cdhl', 'cdij', 'cdik', 'cdil', 'cegj', 'cegk', 'cegl', 'cehj', 'cehk', 'cehl', 'ceij', 'ceik', 'ceil', 'cfgj', 'cfgk', 'cfgl', 'cfhj', 'cfhk', 'cfhl', 'cfij', 'cfik', 'cfil'])\n assert answers_match(candidate(digits='9876'), ['wtpm', 'wtpn', 'wtpo', 'wtqm', 'wtqn', 'wtqo', 'wtrm', 'wtrn', 'wtro', 'wtsm', 'wtsn', 'wtso', 'wupm', 'wupn', 'wupo', 'wuqm', 'wuqn', 'wuqo', 'wurm', 'wurn', 'wuro', 'wusm', 'wusn', 'wuso', 'wvpm', 'wvpn', 'wvpo', 'wvqm', 'wvqn', 'wvqo', 'wvrm', 'wvrn', 'wvro', 'wvsm', 'wvsn', 'wvso', 'xtpm', 'xtpn', 'xtpo', 'xtqm', 'xtqn', 'xtqo', 'xtrm', 'xtrn', 'xtro', 'xtsm', 'xtsn', 'xtso', 'xupm', 'xupn', 'xupo', 'xuqm', 'xuqn', 'xuqo', 'xurm', 'xurn', 'xuro', 'xusm', 'xusn', 'xuso', 'xvpm', 'xvpn', 'xvpo', 'xvqm', 'xvqn', 'xvqo', 'xvrm', 'xvrn', 'xvro', 'xvsm', 'xvsn', 'xvso', 'ytpm', 'ytpn', 'ytpo', 'ytqm', 'ytqn', 'ytqo', 'ytrm', 'ytrn', 'ytro', 'ytsm', 'ytsn', 'ytso', 'yupm', 'yupn', 'yupo', 'yuqm', 'yuqn', 'yuqo', 'yurm', 'yurn', 'yuro', 'yusm', 'yusn', 'yuso', 'yvpm', 'yvpn', 'yvpo', 'yvqm', 'yvqn', 'yvqo', 'yvrm', 'yvrn', 'yvro', 'yvsm', 'yvsn', 'yvso', 'ztpm', 'ztpn', 'ztpo', 'ztqm', 'ztqn', 'ztqo', 'ztrm', 'ztrn', 'ztro', 'ztsm', 'ztsn', 'ztso', 'zupm', 'zupn', 'zupo', 'zuqm', 'zuqn', 'zuqo', 'zurm', 'zurn', 'zuro', 'zusm', 'zusn', 'zuso', 'zvpm', 'zvpn', 'zvpo', 'zvqm', 'zvqn', 'zvqo', 'zvrm', 'zvrn', 'zvro', 'zvsm', 'zvsn', 'zvso'])\n assert answers_match(candidate(digits='666'), ['mmm', 'mmn', 'mmo', 'mnm', 'mnn', 'mno', 'mom', 'mon', 'moo', 'nmm', 'nmn', 'nmo', 'nnm', 'nnn', 'nno', 'nom', 'non', 'noo', 'omm', 'omn', 'omo', 'onm', 'onn', 'ono', 'oom', 'oon', 'ooo'])\n assert answers_match(candidate(digits='4567'), ['gjmp', 'gjmq', 'gjmr', 'gjms', 'gjnp', 'gjnq', 'gjnr', 'gjns', 'gjop', 'gjoq', 'gjor', 'gjos', 'gkmp', 'gkmq', 'gkmr', 'gkms', 'gknp', 'gknq', 'gknr', 'gkns', 'gkop', 'gkoq', 'gkor', 'gkos', 'glmp', 'glmq', 'glmr', 'glms', 'glnp', 'glnq', 'glnr', 'glns', 'glop', 'gloq', 'glor', 'glos', 'hjmp', 'hjmq', 'hjmr', 'hjms', 'hjnp', 'hjnq', 'hjnr', 'hjns', 'hjop', 'hjoq', 'hjor', 'hjos', 'hkmp', 'hkmq', 'hkmr', 'hkms', 'hknp', 'hknq', 'hknr', 'hkns', 'hkop', 'hkoq', 'hkor', 'hkos', 'hlmp', 'hlmq', 'hlmr', 'hlms', 'hlnp', 'hlnq', 'hlnr', 'hlns', 'hlop', 'hloq', 'hlor', 'hlos', 'ijmp', 'ijmq', 'ijmr', 'ijms', 'ijnp', 'ijnq', 'ijnr', 'ijns', 'ijop', 'ijoq', 'ijor', 'ijos', 'ikmp', 'ikmq', 'ikmr', 'ikms', 'iknp', 'iknq', 'iknr', 'ikns', 'ikop', 'ikoq', 'ikor', 'ikos', 'ilmp', 'ilmq', 'ilmr', 'ilms', 'ilnp', 'ilnq', 'ilnr', 'ilns', 'ilop', 'iloq', 'ilor', 'ilos'])\n assert answers_match(candidate(digits='5'), ['j', 'k', 'l'])\n assert answers_match(candidate(digits='567'), ['jmp', 'jmq', 'jmr', 'jms', 'jnp', 'jnq', 'jnr', 'jns', 'jop', 'joq', 'jor', 'jos', 'kmp', 'kmq', 'kmr', 'kms', 'knp', 'knq', 'knr', 'kns', 'kop', 'koq', 'kor', 'kos', 'lmp', 'lmq', 'lmr', 'lms', 'lnp', 'lnq', 'lnr', 'lns', 'lop', 'loq', 'lor', 'los'])\n", "comparison": "unordered"}, "public_tests": ["\"23\"", "\"2\""], "hints": [], "metadata": {"canonical_parameter_names": ["digits"], "leetcode_dataset_entry_point": "Solution().letterCombinations", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:07+00:00", "tests_total": 79, "tests_dropped": 4, "flags": ["any_order", "has_images"], "topic_tags": ["hash-table", "string", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def letter_combinations(digits)", "container": null, "callable": "letter_combinations", "parameters": [{"name": "digits", "type": "String"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 18, "task_id": "4sum", "difficulty": "Medium", "problem_description": "Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:\n\n- 0 <= a, b, c, d < n\n- a, b, c, and d are distinct.\n- nums[a] + nums[b] + nums[c] + nums[d] == target\n\nYou may return the answer in any order.\n\nExample 1:\n\nInput: nums = [1,0,-1,0,-2,2], target = 0\nOutput: [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]\n\nExample 2:\n\nInput: nums = [2,2,2,2,2], target = 8\nOutput: [[2,2,2,2]]\n\nConstraints:\n\n- 1 <= nums.length <= 200\n- -10^9 <= nums[i] <= 10^9\n- -10^9 <= target <= 10^9\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2], target=0), [[-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[-3, -1, 0, 2, 4, 5], target=0), [[-3, -1, 0, 4]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5], target=-14), [[-5, -4, -3, -2]])\n assert answers_match(candidate(nums=[0, 0, 0, 0], target=0), [[0, 0, 0, 0]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], target=-20), [[-10, -7, -2, -1], [-10, -6, -3, -1], [-10, -5, -4, -1], [-10, -5, -3, -2], [-9, -8, -2, -1], [-9, -7, -3, -1], [-9, -6, -4, -1], [-9, -6, -3, -2], [-9, -5, -4, -2], [-8, -7, -4, -1], [-8, -7, -3, -2], [-8, -6, -5, -1], [-8, -6, -4, -2], [-8, -5, -4, -3], [-7, -6, -5, -2], [-7, -6, -4, -3]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5], target=-10), [[-4, -3, -2, -1]])\n assert answers_match(candidate(nums=[2, 2, 2, 2, 2], target=8), [[2, 2, 2, 2]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=20), [[1, 2, 7, 10], [1, 2, 8, 9], [1, 3, 6, 10], [1, 3, 7, 9], [1, 4, 5, 10], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 6, 8], [2, 3, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 5, 9], [2, 4, 6, 8], [2, 5, 6, 7], [3, 4, 5, 8], [3, 4, 6, 7]])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], target=0), [[-5, -4, 4, 5], [-5, -3, 3, 5], [-5, -2, 2, 5], [-5, -2, 3, 4], [-5, -1, 1, 5], [-5, -1, 2, 4], [-5, 0, 1, 4], [-5, 0, 2, 3], [-4, -3, 2, 5], [-4, -3, 3, 4], [-4, -2, 1, 5], [-4, -2, 2, 4], [-4, -1, 0, 5], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 1, 3], [-3, -2, 0, 5], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=30), [[3, 8, 9, 10], [4, 7, 9, 10], [5, 6, 9, 10], [5, 7, 8, 10], [6, 7, 8, 9]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8], target=20), [[1, 4, 7, 8], [1, 5, 6, 8], [2, 3, 7, 8], [2, 4, 6, 8], [2, 5, 6, 7], [3, 4, 5, 8], [3, 4, 6, 7]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, -1, -4], target=-1), [[-4, 0, 1, 2], [-1, -1, 0, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8], target=10), [[1, 2, 3, 4]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5], target=10), [[1, 2, 3, 4]])\n assert answers_match(candidate(nums=[-3, -2, -1, 0, 0, 1, 2, 3, 4], target=0), [[-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2, -1, 1], target=0), [[-2, -1, 1, 2], [-2, 0, 0, 2], [-2, 0, 1, 1], [-1, -1, 0, 2], [-1, -1, 1, 1], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], target=0), [[-5, -4, 4, 5], [-5, -3, 3, 5], [-5, -2, 2, 5], [-5, -2, 3, 4], [-5, -1, 1, 5], [-5, -1, 2, 4], [-5, 0, 1, 4], [-5, 0, 2, 3], [-4, -3, 2, 5], [-4, -3, 3, 4], [-4, -2, 1, 5], [-4, -2, 2, 4], [-4, -1, 0, 5], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 1, 3], [-3, -2, 0, 5], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], target=4), [[1, 1, 1, 1]])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], target=300), [[30, 80, 90, 100], [40, 70, 90, 100], [50, 60, 90, 100], [50, 70, 80, 100], [60, 70, 80, 90]])\n assert answers_match(candidate(nums=[-10, -5, 0, 5, 10, 15, 20, 25, 30], target=30), [[-10, -5, 15, 30], [-10, -5, 20, 25], [-10, 0, 10, 30], [-10, 0, 15, 25], [-10, 5, 10, 25], [-10, 5, 15, 20], [-5, 0, 5, 30], [-5, 0, 10, 25], [-5, 0, 15, 20], [-5, 5, 10, 20], [0, 5, 10, 15]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], target=20), [[5, 5, 5, 5]])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], target=12), [[1, 1, 5, 5], [1, 2, 4, 5], [1, 3, 3, 5], [1, 3, 4, 4], [2, 2, 3, 5], [2, 2, 4, 4], [2, 3, 3, 4]])\n assert answers_match(candidate(nums=[-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1], target=0), [[-1, -1, 1, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=35), [])\n assert answers_match(candidate(nums=[-1, 2, 2, -5, 0, -1, 4], target=3), [[-5, 2, 2, 4], [-1, 0, 2, 2]])\n assert answers_match(candidate(nums=[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], target=-20), [[-10, -7, -2, -1], [-10, -6, -3, -1], [-10, -5, -4, -1], [-10, -5, -3, -2], [-9, -8, -2, -1], [-9, -7, -3, -1], [-9, -6, -4, -1], [-9, -6, -3, -2], [-9, -5, -4, -2], [-8, -7, -4, -1], [-8, -7, -3, -2], [-8, -6, -5, -1], [-8, -6, -4, -2], [-8, -5, -4, -3], [-7, -6, -5, -2], [-7, -6, -4, -3]])\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2, 1, 0, -1, 0, -2, 2, 1, 0, -1, 0, -2, 2], target=0), [[-2, -2, 2, 2], [-2, -1, 1, 2], [-2, 0, 0, 2], [-2, 0, 1, 1], [-1, -1, 0, 2], [-1, -1, 1, 1], [-1, 0, 0, 1], [0, 0, 0, 0]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=1), [])\n assert answers_match(candidate(nums=[1, -2, -5, -4, -3, 3, 3, 5], target=-11), [[-5, -4, -3, 1]])\n assert answers_match(candidate(nums=[-1, -1, -1, 0, 0, 0, 1, 1, 1], target=0), [[-1, -1, 1, 1], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], target=0), [[0, 0, 0, 0]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, -1, -4, -2, -3, 3, 0, 4], target=0), [[-4, -3, 3, 4], [-4, -2, 2, 4], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 0, 4], [-4, 0, 1, 3], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -1, -1, 4], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, -1, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], target=30), [[1, 2, 12, 15], [1, 2, 13, 14], [1, 3, 11, 15], [1, 3, 12, 14], [1, 4, 10, 15], [1, 4, 11, 14], [1, 4, 12, 13], [1, 5, 9, 15], [1, 5, 10, 14], [1, 5, 11, 13], [1, 6, 8, 15], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 8, 9, 12], [1, 8, 10, 11], [2, 3, 10, 15], [2, 3, 11, 14], [2, 3, 12, 13], [2, 4, 9, 15], [2, 4, 10, 14], [2, 4, 11, 13], [2, 5, 8, 15], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 6, 7, 15], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 8, 9, 11], [3, 4, 8, 15], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 5, 7, 15], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 7, 8, 12], [3, 7, 9, 11], [3, 8, 9, 10], [4, 5, 6, 15], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 7, 8, 11], [4, 7, 9, 10], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 7, 8, 10], [6, 7, 8, 9]])\n assert answers_match(candidate(nums=[-3, -1, 0, 1, 2, 3, 5, 6, -6, -5], target=0), [[-6, -5, 5, 6], [-6, -3, 3, 6], [-6, -1, 1, 6], [-6, -1, 2, 5], [-6, 0, 1, 5], [-6, 1, 2, 3], [-5, -3, 2, 6], [-5, -3, 3, 5], [-5, -1, 0, 6], [-5, -1, 1, 5], [-5, 0, 2, 3], [-3, -1, 1, 3], [-3, 0, 1, 2]])\n assert answers_match(candidate(nums=[1, -2, 3, -4, 5, -6, 7, -8, 9, -10], target=0), [[-10, -6, 7, 9], [-10, -4, 5, 9], [-10, -2, 3, 9], [-10, -2, 5, 7], [-8, -6, 5, 9], [-8, -4, 3, 9], [-8, -4, 5, 7], [-8, -2, 1, 9], [-8, -2, 3, 7], [-6, -4, 1, 9], [-6, -4, 3, 7], [-6, -2, 1, 7], [-6, -2, 3, 5], [-4, -2, 1, 5]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20], target=-70), [[-20, -19, -18, -13], [-20, -19, -17, -14], [-20, -19, -16, -15], [-20, -18, -17, -15], [-19, -18, -17, -16]])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200], target=600), [[30, 180, 190, 200], [40, 170, 190, 200], [50, 160, 190, 200], [50, 170, 180, 200], [60, 150, 190, 200], [60, 160, 180, 200], [60, 170, 180, 190], [70, 140, 190, 200], [70, 150, 180, 200], [70, 160, 170, 200], [70, 160, 180, 190], [80, 130, 190, 200], [80, 140, 180, 200], [80, 150, 170, 200], [80, 150, 180, 190], [80, 160, 170, 190], [90, 120, 190, 200], [90, 130, 180, 200], [90, 140, 170, 200], [90, 140, 180, 190], [90, 150, 160, 200], [90, 150, 170, 190], [90, 160, 170, 180], [100, 110, 190, 200], [100, 120, 180, 200], [100, 130, 170, 200], [100, 130, 180, 190], [100, 140, 160, 200], [100, 140, 170, 190], [100, 150, 160, 190], [100, 150, 170, 180], [110, 120, 170, 200], [110, 120, 180, 190], [110, 130, 160, 200], [110, 130, 170, 190], [110, 140, 150, 200], [110, 140, 160, 190], [110, 140, 170, 180], [110, 150, 160, 180], [120, 130, 150, 200], [120, 130, 160, 190], [120, 130, 170, 180], [120, 140, 150, 190], [120, 140, 160, 180], [120, 150, 160, 170], [130, 140, 150, 180], [130, 140, 160, 170]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, -1, -4, -2, 2], target=0), [[-4, 0, 2, 2], [-2, -1, 1, 2], [-1, -1, 0, 2]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=90), [])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1], target=10), [[-10, 1, 9, 10], [-10, 2, 8, 10], [-10, 3, 7, 10], [-10, 3, 8, 9], [-10, 4, 6, 10], [-10, 4, 7, 9], [-10, 5, 6, 9], [-10, 5, 7, 8], [-9, 1, 8, 10], [-9, 2, 7, 10], [-9, 2, 8, 9], [-9, 3, 6, 10], [-9, 3, 7, 9], [-9, 4, 5, 10], [-9, 4, 6, 9], [-9, 4, 7, 8], [-9, 5, 6, 8], [-8, -1, 9, 10], [-8, 1, 7, 10], [-8, 1, 8, 9], [-8, 2, 6, 10], [-8, 2, 7, 9], [-8, 3, 5, 10], [-8, 3, 6, 9], [-8, 3, 7, 8], [-8, 4, 5, 9], [-8, 4, 6, 8], [-8, 5, 6, 7], [-7, -2, 9, 10], [-7, -1, 8, 10], [-7, 1, 6, 10], [-7, 1, 7, 9], [-7, 2, 5, 10], [-7, 2, 6, 9], [-7, 2, 7, 8], [-7, 3, 4, 10], [-7, 3, 5, 9], [-7, 3, 6, 8], [-7, 4, 5, 8], [-7, 4, 6, 7], [-6, -3, 9, 10], [-6, -2, 8, 10], [-6, -1, 7, 10], [-6, -1, 8, 9], [-6, 1, 5, 10], [-6, 1, 6, 9], [-6, 1, 7, 8], [-6, 2, 4, 10], [-6, 2, 5, 9], [-6, 2, 6, 8], [-6, 3, 4, 9], [-6, 3, 5, 8], [-6, 3, 6, 7], [-6, 4, 5, 7], [-5, -4, 9, 10], [-5, -3, 8, 10], [-5, -2, 7, 10], [-5, -2, 8, 9], [-5, -1, 6, 10], [-5, -1, 7, 9], [-5, 1, 4, 10], [-5, 1, 5, 9], [-5, 1, 6, 8], [-5, 2, 3, 10], [-5, 2, 4, 9], [-5, 2, 5, 8], [-5, 2, 6, 7], [-5, 3, 4, 8], [-5, 3, 5, 7], [-5, 4, 5, 6], [-4, -3, 7, 10], [-4, -3, 8, 9], [-4, -2, 6, 10], [-4, -2, 7, 9], [-4, -1, 5, 10], [-4, -1, 6, 9], [-4, -1, 7, 8], [-4, 1, 3, 10], [-4, 1, 4, 9], [-4, 1, 5, 8], [-4, 1, 6, 7], [-4, 2, 3, 9], [-4, 2, 4, 8], [-4, 2, 5, 7], [-4, 3, 4, 7], [-4, 3, 5, 6], [-3, -2, 5, 10], [-3, -2, 6, 9], [-3, -2, 7, 8], [-3, -1, 4, 10], [-3, -1, 5, 9], [-3, -1, 6, 8], [-3, 1, 2, 10], [-3, 1, 3, 9], [-3, 1, 4, 8], [-3, 1, 5, 7], [-3, 2, 3, 8], [-3, 2, 4, 7], [-3, 2, 5, 6], [-3, 3, 4, 6], [-2, -1, 3, 10], [-2, -1, 4, 9], [-2, -1, 5, 8], [-2, -1, 6, 7], [-2, 1, 2, 9], [-2, 1, 3, 8], [-2, 1, 4, 7], [-2, 1, 5, 6], [-2, 2, 3, 7], [-2, 2, 4, 6], [-2, 3, 4, 5], [-1, 1, 2, 8], [-1, 1, 3, 7], [-1, 1, 4, 6], [-1, 2, 3, 6], [-1, 2, 4, 5], [1, 2, 3, 4]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=70), [[13, 18, 19, 20], [14, 17, 19, 20], [15, 16, 19, 20], [15, 17, 18, 20], [16, 17, 18, 19]])\n assert answers_match(candidate(nums=[-1000000000, -1000000000, 1000000000, 1000000000, -1000000000, 1000000000, 0, 0], target=0), [[-1000000000, -1000000000, 1000000000, 1000000000], [-1000000000, 0, 0, 1000000000]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], target=4), [[1, 1, 1, 1]])\n assert answers_match(candidate(nums=[-1, -1, 2, 2, 3, 3, -3, -3, -2, -2, 1, 1, 0, 0, 0, 0], target=0), [[-3, -3, 3, 3], [-3, -2, 2, 3], [-3, -1, 1, 3], [-3, -1, 2, 2], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -2, 1, 3], [-2, -2, 2, 2], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-2, 0, 1, 1], [-1, -1, 0, 2], [-1, -1, 1, 1], [-1, 0, 0, 1], [0, 0, 0, 0]])\n assert answers_match(candidate(nums=[1000000000, 1000000000, -1000000000, -1000000000, 500000000, -500000000], target=0), [[-1000000000, -1000000000, 1000000000, 1000000000], [-1000000000, -500000000, 500000000, 1000000000]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], target=0), [[0, 0, 0, 0]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, -1, -4, -2, -2], target=-1), [[-4, 0, 1, 2], [-2, -2, 1, 2], [-2, -1, 0, 2], [-1, -1, 0, 1]])\n assert answers_match(candidate(nums=[2, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], target=5), [[1, 1, 1, 2]])\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2, 3, 4, -3, -4, 5, -5], target=1), [[-5, -3, 4, 5], [-5, -2, 3, 5], [-5, -1, 2, 5], [-5, -1, 3, 4], [-5, 0, 1, 5], [-5, 0, 2, 4], [-5, 1, 2, 3], [-4, -3, 3, 5], [-4, -2, 2, 5], [-4, -2, 3, 4], [-4, -1, 1, 5], [-4, -1, 2, 4], [-4, 0, 0, 5], [-4, 0, 1, 4], [-4, 0, 2, 3], [-3, -2, 1, 5], [-3, -2, 2, 4], [-3, -1, 0, 5], [-3, -1, 1, 4], [-3, -1, 2, 3], [-3, 0, 0, 4], [-3, 0, 1, 3], [-2, -1, 0, 4], [-2, -1, 1, 3], [-2, 0, 0, 3], [-2, 0, 1, 2], [-1, 0, 0, 2]])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], target=30), [[-5, 8, 13, 14], [-5, 9, 12, 14], [-5, 10, 11, 14], [-5, 10, 12, 13], [-4, 7, 13, 14], [-4, 8, 12, 14], [-4, 9, 11, 14], [-4, 9, 12, 13], [-4, 10, 11, 13], [-3, 6, 13, 14], [-3, 7, 12, 14], [-3, 8, 11, 14], [-3, 8, 12, 13], [-3, 9, 10, 14], [-3, 9, 11, 13], [-3, 10, 11, 12], [-2, 5, 13, 14], [-2, 6, 12, 14], [-2, 7, 11, 14], [-2, 7, 12, 13], [-2, 8, 10, 14], [-2, 8, 11, 13], [-2, 9, 10, 13], [-2, 9, 11, 12], [-1, 4, 13, 14], [-1, 5, 12, 14], [-1, 6, 11, 14], [-1, 6, 12, 13], [-1, 7, 10, 14], [-1, 7, 11, 13], [-1, 8, 9, 14], [-1, 8, 10, 13], [-1, 8, 11, 12], [-1, 9, 10, 12], [0, 3, 13, 14], [0, 4, 12, 14], [0, 5, 11, 14], [0, 5, 12, 13], [0, 6, 10, 14], [0, 6, 11, 13], [0, 7, 9, 14], [0, 7, 10, 13], [0, 7, 11, 12], [0, 8, 9, 13], [0, 8, 10, 12], [0, 9, 10, 11], [1, 2, 13, 14], [1, 3, 12, 14], [1, 4, 11, 14], [1, 4, 12, 13], [1, 5, 10, 14], [1, 5, 11, 13], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 8, 9, 12], [1, 8, 10, 11], [2, 3, 11, 14], [2, 3, 12, 13], [2, 4, 10, 14], [2, 4, 11, 13], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 8, 9, 11], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 7, 8, 12], [3, 7, 9, 11], [3, 8, 9, 10], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 7, 8, 11], [4, 7, 9, 10], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 7, 8, 10], [6, 7, 8, 9]])\n assert answers_match(candidate(nums=[5, 5, 3, 3, 2, 2, 1, 1, -1, -1, -2, -2, -3, -3, -5, -5], target=0), [[-5, -5, 5, 5], [-5, -3, 3, 5], [-5, -2, 2, 5], [-5, -1, 1, 5], [-5, -1, 3, 3], [-5, 1, 1, 3], [-5, 1, 2, 2], [-3, -3, 1, 5], [-3, -3, 3, 3], [-3, -2, 2, 3], [-3, -1, -1, 5], [-3, -1, 1, 3], [-3, -1, 2, 2], [-2, -2, -1, 5], [-2, -2, 1, 3], [-2, -2, 2, 2], [-2, -1, 1, 2], [-1, -1, 1, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=30), [[3, 8, 9, 10], [4, 7, 9, 10], [5, 6, 9, 10], [5, 7, 8, 10], [6, 7, 8, 9]])\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2, 3, -3, 4, -4], target=0), [[-4, -3, 3, 4], [-4, -2, 2, 4], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 0, 4], [-4, 0, 1, 3], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[-3, -2, -1, 0, 0, 1, 2, 3], target=0), [[-3, -2, 2, 3], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[-1, 0, 0, 1, 0, -1, 0, -1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0], target=0), [[-1, -1, 1, 1], [-1, 0, 0, 1], [0, 0, 0, 0]])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200], target=600), [[30, 180, 190, 200], [40, 170, 190, 200], [50, 160, 190, 200], [50, 170, 180, 200], [60, 150, 190, 200], [60, 160, 180, 200], [60, 170, 180, 190], [70, 140, 190, 200], [70, 150, 180, 200], [70, 160, 170, 200], [70, 160, 180, 190], [80, 130, 190, 200], [80, 140, 180, 200], [80, 150, 170, 200], [80, 150, 180, 190], [80, 160, 170, 190], [90, 120, 190, 200], [90, 130, 180, 200], [90, 140, 170, 200], [90, 140, 180, 190], [90, 150, 160, 200], [90, 150, 170, 190], [90, 160, 170, 180], [100, 110, 190, 200], [100, 120, 180, 200], [100, 130, 170, 200], [100, 130, 180, 190], [100, 140, 160, 200], [100, 140, 170, 190], [100, 150, 160, 190], [100, 150, 170, 180], [110, 120, 170, 200], [110, 120, 180, 190], [110, 130, 160, 200], [110, 130, 170, 190], [110, 140, 150, 200], [110, 140, 160, 190], [110, 140, 170, 180], [110, 150, 160, 180], [120, 130, 150, 200], [120, 130, 160, 190], [120, 130, 170, 180], [120, 140, 150, 190], [120, 140, 160, 180], [120, 150, 160, 170], [130, 140, 150, 180], [130, 140, 160, 170]])\n assert answers_match(candidate(nums=[-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90], target=0), [[-100, -70, 80, 90], [-100, -60, 70, 90], [-100, -50, 60, 90], [-100, -50, 70, 80], [-100, -40, 50, 90], [-100, -40, 60, 80], [-100, -30, 40, 90], [-100, -30, 50, 80], [-100, -30, 60, 70], [-100, -20, 30, 90], [-100, -20, 40, 80], [-100, -20, 50, 70], [-100, -10, 20, 90], [-100, -10, 30, 80], [-100, -10, 40, 70], [-100, -10, 50, 60], [-100, 0, 10, 90], [-100, 0, 20, 80], [-100, 0, 30, 70], [-100, 0, 40, 60], [-100, 10, 20, 70], [-100, 10, 30, 60], [-100, 10, 40, 50], [-100, 20, 30, 50], [-90, -80, 80, 90], [-90, -70, 70, 90], [-90, -60, 60, 90], [-90, -60, 70, 80], [-90, -50, 50, 90], [-90, -50, 60, 80], [-90, -40, 40, 90], [-90, -40, 50, 80], [-90, -40, 60, 70], [-90, -30, 30, 90], [-90, -30, 40, 80], [-90, -30, 50, 70], [-90, -20, 20, 90], [-90, -20, 30, 80], [-90, -20, 40, 70], [-90, -20, 50, 60], [-90, -10, 10, 90], [-90, -10, 20, 80], [-90, -10, 30, 70], [-90, -10, 40, 60], [-90, 0, 10, 80], [-90, 0, 20, 70], [-90, 0, 30, 60], [-90, 0, 40, 50], [-90, 10, 20, 60], [-90, 10, 30, 50], [-90, 20, 30, 40], [-80, -70, 60, 90], [-80, -70, 70, 80], [-80, -60, 50, 90], [-80, -60, 60, 80], [-80, -50, 40, 90], [-80, -50, 50, 80], [-80, -50, 60, 70], [-80, -40, 30, 90], [-80, -40, 40, 80], [-80, -40, 50, 70], [-80, -30, 20, 90], [-80, -30, 30, 80], [-80, -30, 40, 70], [-80, -30, 50, 60], [-80, -20, 10, 90], [-80, -20, 20, 80], [-80, -20, 30, 70], [-80, -20, 40, 60], [-80, -10, 0, 90], [-80, -10, 10, 80], [-80, -10, 20, 70], [-80, -10, 30, 60], [-80, -10, 40, 50], [-80, 0, 10, 70], [-80, 0, 20, 60], [-80, 0, 30, 50], [-80, 10, 20, 50], [-80, 10, 30, 40], [-70, -60, 40, 90], [-70, -60, 50, 80], [-70, -60, 60, 70], [-70, -50, 30, 90], [-70, -50, 40, 80], [-70, -50, 50, 70], [-70, -40, 20, 90], [-70, -40, 30, 80], [-70, -40, 40, 70], [-70, -40, 50, 60], [-70, -30, 10, 90], [-70, -30, 20, 80], [-70, -30, 30, 70], [-70, -30, 40, 60], [-70, -20, 0, 90], [-70, -20, 10, 80], [-70, -20, 20, 70], [-70, -20, 30, 60], [-70, -20, 40, 50], [-70, -10, 0, 80], [-70, -10, 10, 70], [-70, -10, 20, 60], [-70, -10, 30, 50], [-70, 0, 10, 60], [-70, 0, 20, 50], [-70, 0, 30, 40], [-70, 10, 20, 40], [-60, -50, 20, 90], [-60, -50, 30, 80], [-60, -50, 40, 70], [-60, -50, 50, 60], [-60, -40, 10, 90], [-60, -40, 20, 80], [-60, -40, 30, 70], [-60, -40, 40, 60], [-60, -30, 0, 90], [-60, -30, 10, 80], [-60, -30, 20, 70], [-60, -30, 30, 60], [-60, -30, 40, 50], [-60, -20, -10, 90], [-60, -20, 0, 80], [-60, -20, 10, 70], [-60, -20, 20, 60], [-60, -20, 30, 50], [-60, -10, 0, 70], [-60, -10, 10, 60], [-60, -10, 20, 50], [-60, -10, 30, 40], [-60, 0, 10, 50], [-60, 0, 20, 40], [-60, 10, 20, 30], [-50, -40, 0, 90], [-50, -40, 10, 80], [-50, -40, 20, 70], [-50, -40, 30, 60], [-50, -40, 40, 50], [-50, -30, -10, 90], [-50, -30, 0, 80], [-50, -30, 10, 70], [-50, -30, 20, 60], [-50, -30, 30, 50], [-50, -20, -10, 80], [-50, -20, 0, 70], [-50, -20, 10, 60], [-50, -20, 20, 50], [-50, -20, 30, 40], [-50, -10, 0, 60], [-50, -10, 10, 50], [-50, -10, 20, 40], [-50, 0, 10, 40], [-50, 0, 20, 30], [-40, -30, -20, 90], [-40, -30, -10, 80], [-40, -30, 0, 70], [-40, -30, 10, 60], [-40, -30, 20, 50], [-40, -30, 30, 40], [-40, -20, -10, 70], [-40, -20, 0, 60], [-40, -20, 10, 50], [-40, -20, 20, 40], [-40, -10, 0, 50], [-40, -10, 10, 40], [-40, -10, 20, 30], [-40, 0, 10, 30], [-30, -20, -10, 60], [-30, -20, 0, 50], [-30, -20, 10, 40], [-30, -20, 20, 30], [-30, -10, 0, 40], [-30, -10, 10, 30], [-30, 0, 10, 20], [-20, -10, 0, 30], [-20, -10, 10, 20]])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], target=10), [[-2, 3, 4, 5], [-1, 2, 4, 5], [0, 1, 4, 5], [0, 2, 3, 5], [1, 2, 3, 4]])\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2, 3, 4, -3, -4], target=0), [[-4, -3, 3, 4], [-4, -2, 2, 4], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 0, 4], [-4, 0, 1, 3], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[-1, 2, 2, -5, 0, 2, 4], target=3), [[-5, 2, 2, 4], [-1, 0, 2, 2]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=20), [[1, 2, 7, 10], [1, 2, 8, 9], [1, 3, 6, 10], [1, 3, 7, 9], [1, 4, 5, 10], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 6, 8], [2, 3, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 5, 9], [2, 4, 6, 8], [2, 5, 6, 7], [3, 4, 5, 8], [3, 4, 6, 7]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], target=0), [[0, 0, 0, 0]])\n assert answers_match(candidate(nums=[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], target=8), [[2, 2, 2, 2]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], target=-30), [[-10, -9, -8, -3], [-10, -9, -7, -4], [-10, -9, -6, -5], [-10, -8, -7, -5], [-9, -8, -7, -6]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3], target=8), [[1, 1, 3, 3], [1, 2, 2, 3], [2, 2, 2, 2]])\n assert answers_match(candidate(nums=[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], target=0), [[-10, -9, 9, 10], [-10, -8, 8, 10], [-10, -7, 7, 10], [-10, -7, 8, 9], [-10, -6, 6, 10], [-10, -6, 7, 9], [-10, -5, 5, 10], [-10, -5, 6, 9], [-10, -5, 7, 8], [-10, -4, 4, 10], [-10, -4, 5, 9], [-10, -4, 6, 8], [-10, -3, 3, 10], [-10, -3, 4, 9], [-10, -3, 5, 8], [-10, -3, 6, 7], [-10, -2, 2, 10], [-10, -2, 3, 9], [-10, -2, 4, 8], [-10, -2, 5, 7], [-10, -1, 1, 10], [-10, -1, 2, 9], [-10, -1, 3, 8], [-10, -1, 4, 7], [-10, -1, 5, 6], [-10, 0, 1, 9], [-10, 0, 2, 8], [-10, 0, 3, 7], [-10, 0, 4, 6], [-10, 1, 2, 7], [-10, 1, 3, 6], [-10, 1, 4, 5], [-10, 2, 3, 5], [-9, -8, 7, 10], [-9, -8, 8, 9], [-9, -7, 6, 10], [-9, -7, 7, 9], [-9, -6, 5, 10], [-9, -6, 6, 9], [-9, -6, 7, 8], [-9, -5, 4, 10], [-9, -5, 5, 9], [-9, -5, 6, 8], [-9, -4, 3, 10], [-9, -4, 4, 9], [-9, -4, 5, 8], [-9, -4, 6, 7], [-9, -3, 2, 10], [-9, -3, 3, 9], [-9, -3, 4, 8], [-9, -3, 5, 7], [-9, -2, 1, 10], [-9, -2, 2, 9], [-9, -2, 3, 8], [-9, -2, 4, 7], [-9, -2, 5, 6], [-9, -1, 0, 10], [-9, -1, 1, 9], [-9, -1, 2, 8], [-9, -1, 3, 7], [-9, -1, 4, 6], [-9, 0, 1, 8], [-9, 0, 2, 7], [-9, 0, 3, 6], [-9, 0, 4, 5], [-9, 1, 2, 6], [-9, 1, 3, 5], [-9, 2, 3, 4], [-8, -7, 5, 10], [-8, -7, 6, 9], [-8, -7, 7, 8], [-8, -6, 4, 10], [-8, -6, 5, 9], [-8, -6, 6, 8], [-8, -5, 3, 10], [-8, -5, 4, 9], [-8, -5, 5, 8], [-8, -5, 6, 7], [-8, -4, 2, 10], [-8, -4, 3, 9], [-8, -4, 4, 8], [-8, -4, 5, 7], [-8, -3, 1, 10], [-8, -3, 2, 9], [-8, -3, 3, 8], [-8, -3, 4, 7], [-8, -3, 5, 6], [-8, -2, 0, 10], [-8, -2, 1, 9], [-8, -2, 2, 8], [-8, -2, 3, 7], [-8, -2, 4, 6], [-8, -1, 0, 9], [-8, -1, 1, 8], [-8, -1, 2, 7], [-8, -1, 3, 6], [-8, -1, 4, 5], [-8, 0, 1, 7], [-8, 0, 2, 6], [-8, 0, 3, 5], [-8, 1, 2, 5], [-8, 1, 3, 4], [-7, -6, 3, 10], [-7, -6, 4, 9], [-7, -6, 5, 8], [-7, -6, 6, 7], [-7, -5, 2, 10], [-7, -5, 3, 9], [-7, -5, 4, 8], [-7, -5, 5, 7], [-7, -4, 1, 10], [-7, -4, 2, 9], [-7, -4, 3, 8], [-7, -4, 4, 7], [-7, -4, 5, 6], [-7, -3, 0, 10], [-7, -3, 1, 9], [-7, -3, 2, 8], [-7, -3, 3, 7], [-7, -3, 4, 6], [-7, -2, -1, 10], [-7, -2, 0, 9], [-7, -2, 1, 8], [-7, -2, 2, 7], [-7, -2, 3, 6], [-7, -2, 4, 5], [-7, -1, 0, 8], [-7, -1, 1, 7], [-7, -1, 2, 6], [-7, -1, 3, 5], [-7, 0, 1, 6], [-7, 0, 2, 5], [-7, 0, 3, 4], [-7, 1, 2, 4], [-6, -5, 1, 10], [-6, -5, 2, 9], [-6, -5, 3, 8], [-6, -5, 4, 7], [-6, -5, 5, 6], [-6, -4, 0, 10], [-6, -4, 1, 9], [-6, -4, 2, 8], [-6, -4, 3, 7], [-6, -4, 4, 6], [-6, -3, -1, 10], [-6, -3, 0, 9], [-6, -3, 1, 8], [-6, -3, 2, 7], [-6, -3, 3, 6], [-6, -3, 4, 5], [-6, -2, -1, 9], [-6, -2, 0, 8], [-6, -2, 1, 7], [-6, -2, 2, 6], [-6, -2, 3, 5], [-6, -1, 0, 7], [-6, -1, 1, 6], [-6, -1, 2, 5], [-6, -1, 3, 4], [-6, 0, 1, 5], [-6, 0, 2, 4], [-6, 1, 2, 3], [-5, -4, -1, 10], [-5, -4, 0, 9], [-5, -4, 1, 8], [-5, -4, 2, 7], [-5, -4, 3, 6], [-5, -4, 4, 5], [-5, -3, -2, 10], [-5, -3, -1, 9], [-5, -3, 0, 8], [-5, -3, 1, 7], [-5, -3, 2, 6], [-5, -3, 3, 5], [-5, -2, -1, 8], [-5, -2, 0, 7], [-5, -2, 1, 6], [-5, -2, 2, 5], [-5, -2, 3, 4], [-5, -1, 0, 6], [-5, -1, 1, 5], [-5, -1, 2, 4], [-5, 0, 1, 4], [-5, 0, 2, 3], [-4, -3, -2, 9], [-4, -3, -1, 8], [-4, -3, 0, 7], [-4, -3, 1, 6], [-4, -3, 2, 5], [-4, -3, 3, 4], [-4, -2, -1, 7], [-4, -2, 0, 6], [-4, -2, 1, 5], [-4, -2, 2, 4], [-4, -1, 0, 5], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 1, 3], [-3, -2, -1, 6], [-3, -2, 0, 5], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2]])\n assert answers_match(candidate(nums=[1, 0, -1, 0, -2, 2, 3, 4, 5, 6, 7, 8, 9, -9, -8, -7, -6, -5, -4, -3, -2, -1], target=0), [[-9, -8, 8, 9], [-9, -7, 7, 9], [-9, -6, 6, 9], [-9, -6, 7, 8], [-9, -5, 5, 9], [-9, -5, 6, 8], [-9, -4, 4, 9], [-9, -4, 5, 8], [-9, -4, 6, 7], [-9, -3, 3, 9], [-9, -3, 4, 8], [-9, -3, 5, 7], [-9, -2, 2, 9], [-9, -2, 3, 8], [-9, -2, 4, 7], [-9, -2, 5, 6], [-9, -1, 1, 9], [-9, -1, 2, 8], [-9, -1, 3, 7], [-9, -1, 4, 6], [-9, 0, 0, 9], [-9, 0, 1, 8], [-9, 0, 2, 7], [-9, 0, 3, 6], [-9, 0, 4, 5], [-9, 1, 2, 6], [-9, 1, 3, 5], [-9, 2, 3, 4], [-8, -7, 6, 9], [-8, -7, 7, 8], [-8, -6, 5, 9], [-8, -6, 6, 8], [-8, -5, 4, 9], [-8, -5, 5, 8], [-8, -5, 6, 7], [-8, -4, 3, 9], [-8, -4, 4, 8], [-8, -4, 5, 7], [-8, -3, 2, 9], [-8, -3, 3, 8], [-8, -3, 4, 7], [-8, -3, 5, 6], [-8, -2, 1, 9], [-8, -2, 2, 8], [-8, -2, 3, 7], [-8, -2, 4, 6], [-8, -1, 0, 9], [-8, -1, 1, 8], [-8, -1, 2, 7], [-8, -1, 3, 6], [-8, -1, 4, 5], [-8, 0, 0, 8], [-8, 0, 1, 7], [-8, 0, 2, 6], [-8, 0, 3, 5], [-8, 1, 2, 5], [-8, 1, 3, 4], [-7, -6, 4, 9], [-7, -6, 5, 8], [-7, -6, 6, 7], [-7, -5, 3, 9], [-7, -5, 4, 8], [-7, -5, 5, 7], [-7, -4, 2, 9], [-7, -4, 3, 8], [-7, -4, 4, 7], [-7, -4, 5, 6], [-7, -3, 1, 9], [-7, -3, 2, 8], [-7, -3, 3, 7], [-7, -3, 4, 6], [-7, -2, 0, 9], [-7, -2, 1, 8], [-7, -2, 2, 7], [-7, -2, 3, 6], [-7, -2, 4, 5], [-7, -1, -1, 9], [-7, -1, 0, 8], [-7, -1, 1, 7], [-7, -1, 2, 6], [-7, -1, 3, 5], [-7, 0, 0, 7], [-7, 0, 1, 6], [-7, 0, 2, 5], [-7, 0, 3, 4], [-7, 1, 2, 4], [-6, -5, 2, 9], [-6, -5, 3, 8], [-6, -5, 4, 7], [-6, -5, 5, 6], [-6, -4, 1, 9], [-6, -4, 2, 8], [-6, -4, 3, 7], [-6, -4, 4, 6], [-6, -3, 0, 9], [-6, -3, 1, 8], [-6, -3, 2, 7], [-6, -3, 3, 6], [-6, -3, 4, 5], [-6, -2, -1, 9], [-6, -2, 0, 8], [-6, -2, 1, 7], [-6, -2, 2, 6], [-6, -2, 3, 5], [-6, -1, -1, 8], [-6, -1, 0, 7], [-6, -1, 1, 6], [-6, -1, 2, 5], [-6, -1, 3, 4], [-6, 0, 0, 6], [-6, 0, 1, 5], [-6, 0, 2, 4], [-6, 1, 2, 3], [-5, -4, 0, 9], [-5, -4, 1, 8], [-5, -4, 2, 7], [-5, -4, 3, 6], [-5, -4, 4, 5], [-5, -3, -1, 9], [-5, -3, 0, 8], [-5, -3, 1, 7], [-5, -3, 2, 6], [-5, -3, 3, 5], [-5, -2, -2, 9], [-5, -2, -1, 8], [-5, -2, 0, 7], [-5, -2, 1, 6], [-5, -2, 2, 5], [-5, -2, 3, 4], [-5, -1, -1, 7], [-5, -1, 0, 6], [-5, -1, 1, 5], [-5, -1, 2, 4], [-5, 0, 0, 5], [-5, 0, 1, 4], [-5, 0, 2, 3], [-4, -3, -2, 9], [-4, -3, -1, 8], [-4, -3, 0, 7], [-4, -3, 1, 6], [-4, -3, 2, 5], [-4, -3, 3, 4], [-4, -2, -2, 8], [-4, -2, -1, 7], [-4, -2, 0, 6], [-4, -2, 1, 5], [-4, -2, 2, 4], [-4, -1, -1, 6], [-4, -1, 0, 5], [-4, -1, 1, 4], [-4, -1, 2, 3], [-4, 0, 0, 4], [-4, 0, 1, 3], [-3, -2, -2, 7], [-3, -2, -1, 6], [-3, -2, 0, 5], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, -1, 5], [-3, -1, 0, 4], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -2, -1, 5], [-2, -2, 0, 4], [-2, -2, 1, 3], [-2, -1, -1, 4], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, -1, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=50), [[1, 10, 19, 20], [1, 11, 18, 20], [1, 12, 17, 20], [1, 12, 18, 19], [1, 13, 16, 20], [1, 13, 17, 19], [1, 14, 15, 20], [1, 14, 16, 19], [1, 14, 17, 18], [1, 15, 16, 18], [2, 9, 19, 20], [2, 10, 18, 20], [2, 11, 17, 20], [2, 11, 18, 19], [2, 12, 16, 20], [2, 12, 17, 19], [2, 13, 15, 20], [2, 13, 16, 19], [2, 13, 17, 18], [2, 14, 15, 19], [2, 14, 16, 18], [2, 15, 16, 17], [3, 8, 19, 20], [3, 9, 18, 20], [3, 10, 17, 20], [3, 10, 18, 19], [3, 11, 16, 20], [3, 11, 17, 19], [3, 12, 15, 20], [3, 12, 16, 19], [3, 12, 17, 18], [3, 13, 14, 20], [3, 13, 15, 19], [3, 13, 16, 18], [3, 14, 15, 18], [3, 14, 16, 17], [4, 7, 19, 20], [4, 8, 18, 20], [4, 9, 17, 20], [4, 9, 18, 19], [4, 10, 16, 20], [4, 10, 17, 19], [4, 11, 15, 20], [4, 11, 16, 19], [4, 11, 17, 18], [4, 12, 14, 20], [4, 12, 15, 19], [4, 12, 16, 18], [4, 13, 14, 19], [4, 13, 15, 18], [4, 13, 16, 17], [4, 14, 15, 17], [5, 6, 19, 20], [5, 7, 18, 20], [5, 8, 17, 20], [5, 8, 18, 19], [5, 9, 16, 20], [5, 9, 17, 19], [5, 10, 15, 20], [5, 10, 16, 19], [5, 10, 17, 18], [5, 11, 14, 20], [5, 11, 15, 19], [5, 11, 16, 18], [5, 12, 13, 20], [5, 12, 14, 19], [5, 12, 15, 18], [5, 12, 16, 17], [5, 13, 14, 18], [5, 13, 15, 17], [5, 14, 15, 16], [6, 7, 17, 20], [6, 7, 18, 19], [6, 8, 16, 20], [6, 8, 17, 19], [6, 9, 15, 20], [6, 9, 16, 19], [6, 9, 17, 18], [6, 10, 14, 20], [6, 10, 15, 19], [6, 10, 16, 18], [6, 11, 13, 20], [6, 11, 14, 19], [6, 11, 15, 18], [6, 11, 16, 17], [6, 12, 13, 19], [6, 12, 14, 18], [6, 12, 15, 17], [6, 13, 14, 17], [6, 13, 15, 16], [7, 8, 15, 20], [7, 8, 16, 19], [7, 8, 17, 18], [7, 9, 14, 20], [7, 9, 15, 19], [7, 9, 16, 18], [7, 10, 13, 20], [7, 10, 14, 19], [7, 10, 15, 18], [7, 10, 16, 17], [7, 11, 12, 20], [7, 11, 13, 19], [7, 11, 14, 18], [7, 11, 15, 17], [7, 12, 13, 18], [7, 12, 14, 17], [7, 12, 15, 16], [7, 13, 14, 16], [8, 9, 13, 20], [8, 9, 14, 19], [8, 9, 15, 18], [8, 9, 16, 17], [8, 10, 12, 20], [8, 10, 13, 19], [8, 10, 14, 18], [8, 10, 15, 17], [8, 11, 12, 19], [8, 11, 13, 18], [8, 11, 14, 17], [8, 11, 15, 16], [8, 12, 13, 17], [8, 12, 14, 16], [8, 13, 14, 15], [9, 10, 11, 20], [9, 10, 12, 19], [9, 10, 13, 18], [9, 10, 14, 17], [9, 10, 15, 16], [9, 11, 12, 18], [9, 11, 13, 17], [9, 11, 14, 16], [9, 12, 13, 16], [9, 12, 14, 15], [10, 11, 12, 17], [10, 11, 13, 16], [10, 11, 14, 15], [10, 12, 13, 15], [11, 12, 13, 14]])\n assert answers_match(candidate(nums=[5, 5, 3, 5, 3, 3, 9, 0, 123, 1, 10, 10, 10, 10, 10], target=30), [[0, 10, 10, 10], [1, 9, 10, 10], [5, 5, 10, 10]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=50), [[1, 10, 19, 20], [1, 11, 18, 20], [1, 12, 17, 20], [1, 12, 18, 19], [1, 13, 16, 20], [1, 13, 17, 19], [1, 14, 15, 20], [1, 14, 16, 19], [1, 14, 17, 18], [1, 15, 16, 18], [2, 9, 19, 20], [2, 10, 18, 20], [2, 11, 17, 20], [2, 11, 18, 19], [2, 12, 16, 20], [2, 12, 17, 19], [2, 13, 15, 20], [2, 13, 16, 19], [2, 13, 17, 18], [2, 14, 15, 19], [2, 14, 16, 18], [2, 15, 16, 17], [3, 8, 19, 20], [3, 9, 18, 20], [3, 10, 17, 20], [3, 10, 18, 19], [3, 11, 16, 20], [3, 11, 17, 19], [3, 12, 15, 20], [3, 12, 16, 19], [3, 12, 17, 18], [3, 13, 14, 20], [3, 13, 15, 19], [3, 13, 16, 18], [3, 14, 15, 18], [3, 14, 16, 17], [4, 7, 19, 20], [4, 8, 18, 20], [4, 9, 17, 20], [4, 9, 18, 19], [4, 10, 16, 20], [4, 10, 17, 19], [4, 11, 15, 20], [4, 11, 16, 19], [4, 11, 17, 18], [4, 12, 14, 20], [4, 12, 15, 19], [4, 12, 16, 18], [4, 13, 14, 19], [4, 13, 15, 18], [4, 13, 16, 17], [4, 14, 15, 17], [5, 6, 19, 20], [5, 7, 18, 20], [5, 8, 17, 20], [5, 8, 18, 19], [5, 9, 16, 20], [5, 9, 17, 19], [5, 10, 15, 20], [5, 10, 16, 19], [5, 10, 17, 18], [5, 11, 14, 20], [5, 11, 15, 19], [5, 11, 16, 18], [5, 12, 13, 20], [5, 12, 14, 19], [5, 12, 15, 18], [5, 12, 16, 17], [5, 13, 14, 18], [5, 13, 15, 17], [5, 14, 15, 16], [6, 7, 17, 20], [6, 7, 18, 19], [6, 8, 16, 20], [6, 8, 17, 19], [6, 9, 15, 20], [6, 9, 16, 19], [6, 9, 17, 18], [6, 10, 14, 20], [6, 10, 15, 19], [6, 10, 16, 18], [6, 11, 13, 20], [6, 11, 14, 19], [6, 11, 15, 18], [6, 11, 16, 17], [6, 12, 13, 19], [6, 12, 14, 18], [6, 12, 15, 17], [6, 13, 14, 17], [6, 13, 15, 16], [7, 8, 15, 20], [7, 8, 16, 19], [7, 8, 17, 18], [7, 9, 14, 20], [7, 9, 15, 19], [7, 9, 16, 18], [7, 10, 13, 20], [7, 10, 14, 19], [7, 10, 15, 18], [7, 10, 16, 17], [7, 11, 12, 20], [7, 11, 13, 19], [7, 11, 14, 18], [7, 11, 15, 17], [7, 12, 13, 18], [7, 12, 14, 17], [7, 12, 15, 16], [7, 13, 14, 16], [8, 9, 13, 20], [8, 9, 14, 19], [8, 9, 15, 18], [8, 9, 16, 17], [8, 10, 12, 20], [8, 10, 13, 19], [8, 10, 14, 18], [8, 10, 15, 17], [8, 11, 12, 19], [8, 11, 13, 18], [8, 11, 14, 17], [8, 11, 15, 16], [8, 12, 13, 17], [8, 12, 14, 16], [8, 13, 14, 15], [9, 10, 11, 20], [9, 10, 12, 19], [9, 10, 13, 18], [9, 10, 14, 17], [9, 10, 15, 16], [9, 11, 12, 18], [9, 11, 13, 17], [9, 11, 14, 16], [9, 12, 13, 16], [9, 12, 14, 15], [10, 11, 12, 17], [10, 11, 13, 16], [10, 11, 14, 15], [10, 12, 13, 15], [11, 12, 13, 14]])\n assert answers_match(candidate(nums=[-3, -1, 0, 2, 4, 5, 6, 7], target=10), [[-3, 0, 6, 7], [-3, 2, 4, 7], [-3, 2, 5, 6], [-1, 0, 4, 7], [-1, 0, 5, 6], [-1, 2, 4, 5]])\n assert answers_match(candidate(nums=[5, 5, 3, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], target=20), [[5, 5, 5, 5]])\n assert answers_match(candidate(nums=[-10, -29, -2, -47, -82, 30, 3, 2, -8, -7, -33, 21, 45, 67, 90, 23, 4, 5, 6, 7], target=20), [[-82, -33, 45, 90], [-82, -10, 45, 67], [-82, 5, 7, 90], [-82, 5, 30, 67], [-47, -29, 6, 90], [-47, -8, 30, 45], [-47, -7, 7, 67], [-47, -2, 2, 67], [-33, -29, -8, 90], [-33, 2, 6, 45], [-33, 2, 21, 30], [-33, 3, 5, 45], [-29, -10, -8, 67], [-29, -2, 6, 45], [-29, -2, 21, 30], [-29, 5, 21, 23], [-10, -8, -7, 45], [-10, -7, 7, 30], [-10, -2, 2, 30], [-10, 2, 5, 23], [-10, 2, 7, 21], [-10, 3, 4, 23], [-10, 3, 6, 21], [-10, 4, 5, 21], [-8, -7, 5, 30], [-8, -2, 7, 23], [-8, 2, 3, 23], [-8, 2, 5, 21], [-8, 3, 4, 21], [-7, -2, 6, 23], [-7, 2, 4, 21], [2, 5, 6, 7], [3, 4, 6, 7]])\n assert answers_match(candidate(nums=[-3, -2, -1, 0, 0, 1, 2, 3], target=0), [[-3, -2, 2, 3], [-3, -1, 1, 3], [-3, 0, 0, 3], [-3, 0, 1, 2], [-2, -1, 0, 3], [-2, -1, 1, 2], [-2, 0, 0, 2], [-1, 0, 0, 1]])\n assert answers_match(candidate(nums=[-1, 0, 1, 0, -2, 2, -1, -4], target=-1), [[-4, 0, 1, 2], [-2, -1, 0, 2], [-2, 0, 0, 1], [-1, -1, 0, 1]])\n assert answers_match(candidate(nums=[1, 2, 2, 2, 2, 2, 2, 2, 2, 2], target=8), [[2, 2, 2, 2]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, -1, -4, 2, 3], target=0), [[-4, -1, 2, 3], [-4, 0, 1, 3], [-4, 0, 2, 2], [-1, -1, 0, 2]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0], target=0), [[0, 0, 0, 0]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], target=0), [[0, 0, 0, 0]])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10], target=20), [[1, 1, 8, 10], [1, 1, 9, 9], [1, 2, 7, 10], [1, 2, 8, 9], [1, 3, 6, 10], [1, 3, 7, 9], [1, 3, 8, 8], [1, 4, 5, 10], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 5, 9], [1, 5, 6, 8], [1, 5, 7, 7], [1, 6, 6, 7], [2, 2, 6, 10], [2, 2, 7, 9], [2, 2, 8, 8], [2, 3, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 4, 10], [2, 4, 5, 9], [2, 4, 6, 8], [2, 4, 7, 7], [2, 5, 5, 8], [2, 5, 6, 7], [3, 3, 4, 10], [3, 3, 5, 9], [3, 3, 6, 8], [3, 3, 7, 7], [3, 4, 4, 9], [3, 4, 5, 8], [3, 4, 6, 7], [3, 5, 5, 7], [3, 5, 6, 6], [4, 4, 5, 7], [4, 4, 6, 6], [4, 5, 5, 6]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], target=0), [])\n assert answers_match(candidate(nums=[-1, -1, -1, -1, 1, 1, 1, 1], target=0), [[-1, -1, 1, 1]])\n assert answers_match(candidate(nums=[2, 3, 1, 0, -4, -1, -2, -3, 4, 5, 6], target=10), [[-4, 3, 5, 6], [-3, 2, 5, 6], [-3, 3, 4, 6], [-2, 1, 5, 6], [-2, 2, 4, 6], [-2, 3, 4, 5], [-1, 0, 5, 6], [-1, 1, 4, 6], [-1, 2, 3, 6], [-1, 2, 4, 5], [0, 1, 3, 6], [0, 1, 4, 5], [0, 2, 3, 5], [1, 2, 3, 4]])\n assert answers_match(candidate(nums=[1, 2, -1, -2, 3, 4, -3, -4], target=0), [[-4, -3, 3, 4], [-4, -2, 2, 4], [-4, -1, 1, 4], [-4, -1, 2, 3], [-3, -2, 1, 4], [-3, -2, 2, 3], [-3, -1, 1, 3], [-2, -1, 1, 2]])\n", "comparison": "unordered"}, "public_tests": ["[1,0,-1,0,-2,2]\n0", "[2,2,2,2,2]\n8"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().fourSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:09+00:00", "tests_total": 90, "tests_dropped": 6, "flags": ["any_order"], "topic_tags": ["array", "two-pointers", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def four_sum(nums, target)", "container": null, "callable": "four_sum", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 20, "task_id": "valid-parentheses", "difficulty": "Easy", "problem_description": "Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.\n\nAn input string is valid if:\n\n1. Open brackets must be closed by the same type of brackets.\n2. Open brackets must be closed in the correct order.\n3. Every close bracket has a corresponding open bracket of the same type.\n\nExample 1:\n\nInput: s = \"()\"\nOutput: true\n\nExample 2:\n\nInput: s = \"()[]{}\"\nOutput: true\n\nExample 3:\n\nInput: s = \"(]\"\nOutput: false\n\nExample 4:\n\nInput: s = \"([])\"\nOutput: true\n\nExample 5:\n\nInput: s = \"([)]\"\nOutput: false\n\nConstraints:\n\n- 1 <= s.length <= 10^4\n- s consists of parentheses only '()[]{}'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"((((((()))))))\") == True\n assert candidate(s = \"{[()]}\") == True\n assert candidate(s = \"[[[[[[{{{{}}}}]]]]]]\") == True\n assert candidate(s = \"({[(])})\") == False\n assert candidate(s = \"([)]\") == False\n assert candidate(s = \")()()(\") == False\n assert candidate(s = \"({[({})]})\") == True\n assert candidate(s = \"(]\") == False\n assert candidate(s = \"{{{{{{}}}}}}\") == True\n assert candidate(s = \"{[(])}\") == False\n assert candidate(s = \"[[[[[[]]]]]]\") == True\n assert candidate(s = \"[({})]\") == True\n assert candidate(s = \"()[]{}\") == True\n assert candidate(s = \"([{}])\") == True\n assert candidate(s = \"()\") == True\n assert candidate(s = \"((({{[[]]}})))\") == True\n assert candidate(s = \"((()))\") == True\n assert candidate(s = \"([])\") == True\n assert candidate(s = \"({[{}]}){([{}])}\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()({})[({})]({})()()[({})]\") == True\n assert candidate(s = \"[[[[[[[[]]]]]]]]\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()\") == True\n assert candidate(s = \"({[()]})({[()]})({[()]})({[()]})({[()]})\") == True\n assert candidate(s = \"[[[[]]]]\") == True\n assert candidate(s = \"([{}])({[()]})\") == True\n assert candidate(s = \"({[([{([{}])()]})]})\") == False\n assert candidate(s = \"([])({})[]{}\") == True\n assert candidate(s = \"({[([{}])()]})\") == True\n assert candidate(s = \"({[({[({[({[({})]})]})]})]})\") == True\n assert candidate(s = \"({[([{([{}])()]})]})()[]{}\") == False\n assert candidate(s = \"({{{{{}}}}})\") == True\n assert candidate(s = \"(((((())))))\") == True\n assert candidate(s = \"([({})])\") == True\n assert candidate(s = \"({[()]})[({[()]})]\") == True\n assert candidate(s = \"({[({})]})({[{}]})\") == True\n assert candidate(s = \"[({[({[({[]})]})]})]({[({[]})]})\") == True\n assert candidate(s = \"({[()({[()]})]})\") == True\n assert candidate(s = \"((((((((((((())))))))))))\") == False\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})()\") == True\n assert candidate(s = \"({[([{}])()]}){([])}\") == True\n assert candidate(s = \"({[([{}])()]})()\") == True\n assert candidate(s = \"({[({[({[({[({[({})]})]})]})]})]})\") == True\n assert candidate(s = \"{}{}{}{}{}\") == True\n assert candidate(s = \"([({[({[()]})]})])\") == True\n assert candidate(s = \"{((({[({})]})()))}\") == True\n assert candidate(s = \"[{()}]\") == True\n assert candidate(s = \"(((((((({[({[({})]})]})()))))))\") == False\n assert candidate(s = \"([({[({[({[({[]})]})]})]})])\") == True\n assert candidate(s = \"({[({})]})({[({})]})({[({})]})({[({})]})\") == True\n assert candidate(s = \"({[({[({[({[]})]})]})]})\") == True\n assert candidate(s = \"{{{{{{{{}}}}}}}}}\") == False\n assert candidate(s = \"((((((((()))))))))\") == True\n assert candidate(s = \"{((((((((({[({[({[({[({})]})]})]})]))))))}\") == False\n assert candidate(s = \"{[({[({[({[]})]})]})]})({[({[({[({[]})]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})\") == False\n assert candidate(s = \"({[()({})({})({})({})]})\") == True\n assert candidate(s = \"((({{{[[[()]]]}}})))\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()({})[({})]({})()()\") == True\n assert candidate(s = \"({[({})]})({[({})]})({[({})]})({[({})]})({[({})]})({[({})]})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()({})\") == True\n assert candidate(s = \"{([({[({[({[]})]})]})]})({[({[({[({[]})]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})\") == False\n assert candidate(s = \"{(((((((({[({[({})]})]})()))))))}\") == False\n assert candidate(s = \"({[({[({[({[()]})]})]})]})\") == True\n assert candidate(s = \"({[({})({})({})({})({})({})({})({})({})({})({})({})({})({})({})({})({})({})({})({})]})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()({})[({})]({})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]\") == True\n assert candidate(s = \"({[({[({[({})]})]})]})\") == True\n assert candidate(s = \"[({}){()}]\") == True\n assert candidate(s = \"([{}])({[]})\") == True\n assert candidate(s = \"[({})](())\") == True\n assert candidate(s = \"{[({})]}[({})]\") == True\n assert candidate(s = \"[[{{}}]]\") == True\n assert candidate(s = \"({[({})]})({[({})]})\") == True\n assert candidate(s = \"({[({[({[()]}())]}())}())\") == False\n assert candidate(s = \"({[([{}])()]}){}\") == True\n assert candidate(s = \"({[({})]})({[({})]})({[({})]})\") == True\n assert candidate(s = \"{[(())[()]}\") == False\n assert candidate(s = \"({[({})({})({})({})({})({})({})({})]})\") == True\n assert candidate(s = \"((()))[({})]\") == True\n assert candidate(s = \"({[({})]({})})\") == True\n assert candidate(s = \"([])({[]}){([])}\") == True\n assert candidate(s = \"()()()()()()()()()()\") == True\n assert candidate(s = \"((((((())))))){}[]\") == True\n assert candidate(s = \"{[()]}{[()]}\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})()[]\") == True\n assert candidate(s = \"{({[({})]})}\") == True\n assert candidate(s = \"((({{{[[[]]]}}})))\") == True\n assert candidate(s = \"({[([{([{}])()]})]})()[]{}{([])[()]}\") == False\n assert candidate(s = \"((({[({})]})({[({})]}))({[({})]})({[({})]})({[({})]})\") == False\n assert candidate(s = \"({[({[({[()]}])}])})\") == False\n assert candidate(s = \"{{{{{{{{}}}}}}}}\") == True\n assert candidate(s = \"()()()()()()()\") == True\n assert candidate(s = \"({[()]})({[()]})({[()]})\") == True\n assert candidate(s = \"{[()]({[()]})}\") == True\n assert candidate(s = \"({[({[({[({[]}]})]})]})\") == False\n assert candidate(s = \"({[({[({})]})]})\") == True\n assert candidate(s = \"({[()]})\") == True\n assert candidate(s = \"({[(())]})\") == True\n assert candidate(s = \"({[()]}{[()]})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}\") == True\n assert candidate(s = \"([{}])((()))[{}]\") == True\n assert candidate(s = \"{([({[({[({[]})]})]})]})({[({[({[]})]})]})\") == False\n assert candidate(s = \"((({[({})]})()))\") == True\n assert candidate(s = \"[({})]({[()]})\") == True\n assert candidate(s = \"({[{({})}]})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()\") == True\n assert candidate(s = \"(((())))\") == True\n assert candidate(s = \"({[([{([{}])()]})]})()[]{}{([])[()]}{({})}\") == False\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()({})[({})]({})()\") == True\n assert candidate(s = \"(((((((())))))\") == False\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]\") == True\n assert candidate(s = \"()({})({[()]})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}\") == True\n assert candidate(s = \"{{[[(())]]}}\") == True\n assert candidate(s = \"{[({[({[({[]})]})]})]})({[({[({[({[]})]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})\") == False\n assert candidate(s = \"({[({})]})({})\") == True\n assert candidate(s = \"[({})]([])\") == True\n assert candidate(s = \"({[([{}])()]}){([])[()]}\") == True\n assert candidate(s = \"({[([{}])()]})[]\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()\") == True\n assert candidate(s = \"({[({[({[({[]})]})]})]})({[({[({[]})]})]})({[({[({[]})]})]})\") == True\n assert candidate(s = \"([({})({})])\") == True\n assert candidate(s = \"((((({{{[[[]]]}}}))))))\") == False\n assert candidate(s = \"[({[({})]})]\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})\") == True\n assert candidate(s = \"[[[({})]]]\") == True\n assert candidate(s = \"({[]})({})({[]})({})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})(){}[]()({})[({})]({})()[]{}()({})[({})]\") == True\n assert candidate(s = \"((()))[{}]\") == True\n assert candidate(s = \"(((((({[({[({})]})]})())))))\") == True\n assert candidate(s = \"[[[[[[[]]]]]]]\") == True\n assert candidate(s = \"({[({})]})({[({})]})({[({})]})({[({})]})({[({})]})\") == True\n assert candidate(s = \"((((({[({})]})()))))\") == True\n assert candidate(s = \"{[()]}{[()]}{[()]}\") == True\n assert candidate(s = \"(){}[]{}[]{}\") == True\n assert candidate(s = \"([{}])({[{}]})({[{}]})\") == True\n assert candidate(s = \"{{{{}}}}\") == True\n assert candidate(s = \"[{()}]{[()]}\") == True\n assert candidate(s = \"({[()()]})\") == True\n assert candidate(s = \"()[]{}()[]{}\") == True\n assert candidate(s = \"({[()]})({[()]})\") == True\n assert candidate(s = \"({[({[({[({[({[]})]})]})]})]})\") == True\n assert candidate(s = \"{[()]}({[()]}({[()]}))\") == True\n assert candidate(s = \"((({{[[(())]]}})))\") == True\n assert candidate(s = \"{(((((({[({[({})]})]})())))))}\") == True\n assert candidate(s = \"[[{{(())}}]]\") == True\n", "comparison": "exact"}, "public_tests": ["\"()\"", "\"()[]{}\"", "\"(]\"", "\"([])\"", "\"([)]\""], "hints": ["Use a stack of characters.", "When you encounter an opening bracket, push it to the top of the stack.", "When you encounter a closing bracket, check if the top of the stack was the opening for it. If yes, pop it from the stack. Otherwise, return false."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().isValid", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:13+00:00", "tests_total": 148, "tests_dropped": 1, "flags": [], "topic_tags": ["string", "stack", "bracket-sequences"]}, "language": "ruby", "interface": {"raw_signature": "def is_valid(s)", "container": null, "callable": "is_valid", "parameters": [{"name": "s", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 28, "task_id": "find-the-index-of-the-first-occurrence-in-a-string", "difficulty": "Easy", "problem_description": "Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.\n\nExample 1:\n\nInput: haystack = \"sadbutsad\", needle = \"sad\"\nOutput: 0\nExplanation: \"sad\" occurs at index 0 and 6.\nThe first occurrence is at index 0, so we return 0.\n\nExample 2:\n\nInput: haystack = \"leetcode\", needle = \"leeto\"\nOutput: -1\nExplanation: \"leeto\" did not occur in \"leetcode\", so we return -1.\n\nConstraints:\n\n- 1 <= haystack.length, needle.length <= 10^4\n- haystack and needle consist of only lowercase English characters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(haystack = \"ababcabcabababd\",needle = \"ababd\") == 10\n assert candidate(haystack = \"abcde\",needle = \"f\") == -1\n assert candidate(haystack = \"mississippi\",needle = \"issi\") == 1\n assert candidate(haystack = \"sadbutsad\",needle = \"sad\") == 0\n assert candidate(haystack = \"abababa\",needle = \"aba\") == 0\n assert candidate(haystack = \"abcdefgh\",needle = \"efg\") == 4\n assert candidate(haystack = \"abc\",needle = \"c\") == 2\n assert candidate(haystack = \"aaaaa\",needle = \"bba\") == -1\n assert candidate(haystack = \"mississippi\",needle = \"issip\") == 4\n assert candidate(haystack = \"abc\",needle = \"d\") == -1\n assert candidate(haystack = \"a\",needle = \"a\") == 0\n assert candidate(haystack = \"hello\",needle = \"ll\") == 2\n assert candidate(haystack = \"leetcode\",needle = \"leeto\") == -1\n assert candidate(haystack = \"ababababab\",needle = \"aba\") == 0\n assert candidate(haystack = \"randomrandomrandom\",needle = \"random\") == 0\n assert candidate(haystack = \"abcdefgabcdefgabcdefg\",needle = \"efg\") == 4\n assert candidate(haystack = \"abracadabra\",needle = \"cad\") == 4\n assert candidate(haystack = \"aaaaaaabc\",needle = \"aaaaaab\") == 1\n assert candidate(haystack = \"level\",needle = \"eve\") == 1\n assert candidate(haystack = \"aaaaaa\",needle = \"aaa\") == 0\n assert candidate(haystack = \"abababab\",needle = \"aba\") == 0\n assert candidate(haystack = \"xylophone\",needle = \"phone\") == 4\n assert candidate(haystack = \"abcdeabcdeabcde\",needle = \"deabc\") == 3\n assert candidate(haystack = \"quickbrownfox\",needle = \"quick\") == 0\n assert candidate(haystack = \"repeatedstringrepeatedstring\",needle = \"string\") == 8\n assert candidate(haystack = \"abcde\",needle = \"abcde\") == 0\n assert candidate(haystack = \"noinneedlehere\",needle = \"needle\") == 4\n assert candidate(haystack = \"banana\",needle = \"ana\") == 1\n assert candidate(haystack = \"abcdefghijklmnopqrstuvwxyz\",needle = \"mnop\") == 12\n assert candidate(haystack = \"abcabcabcabcabcabc\",needle = \"abcabc\") == 0\n assert candidate(haystack = \"boundarycase\",needle = \"boundarycase\") == 0\n assert candidate(haystack = \"abcabcabcabc\",needle = \"bcabc\") == 1\n assert candidate(haystack = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",needle = \"mnopqrstuv\") == -1\n assert candidate(haystack = \"sequence\",needle = \"qu\") == 2\n assert candidate(haystack = \"bananananana\",needle = \"nan\") == 2\n assert candidate(haystack = \"aaaaaaaaaaaaaaaaaa\",needle = \"aaaaaaaaaa\") == 0\n assert candidate(haystack = \"abcdefghij\",needle = \"jihgfedcba\") == -1\n assert candidate(haystack = \"abcdefghij\",needle = \"abcdefghij\") == 0\n assert candidate(haystack = \"thisisaverylongstringwithsomecharacters\",needle = \"characters\") == 29\n assert candidate(haystack = \"thisisaverylongstringwithsomerepeatingpatterns\",needle = \"patterns\") == 38\n assert candidate(haystack = \"thesamethesame\",needle = \"thesame\") == 0\n assert candidate(haystack = \"noon\",needle = \"noon\") == 0\n assert candidate(haystack = \"hellohellohellohellohello\",needle = \"hellohello\") == 0\n assert candidate(haystack = \"nnnnnnnnnn\",needle = \"nnnn\") == 0\n assert candidate(haystack = \"abcabcabcabcabc\",needle = \"cab\") == 2\n assert candidate(haystack = \"thisisaverylonghaystack\",needle = \"averylong\") == 6\n assert candidate(haystack = \"hellohellohello\",needle = \"hellohello\") == 0\n assert candidate(haystack = \"singleletter\",needle = \"a\") == -1\n assert candidate(haystack = \"oneonetwoonethreeonethreeone\",needle = \"three\") == 12\n assert candidate(haystack = \"abcabcabcabcabcabc\",needle = \"cab\") == 2\n assert candidate(haystack = \"pythonprogrammingpython\",needle = \"thonpro\") == 2\n assert candidate(haystack = \"repeatedcharactersequenceeeeeeeeeeeeeee\",needle = \"eeeeeeee\") == 24\n assert candidate(haystack = \"abcdabcyabcdabc\",needle = \"abcdabc\") == 0\n assert candidate(haystack = \"mississippi\",needle = \"issipp\") == 4\n assert candidate(haystack = \"aaaaabaaaabaaaaabaaaabaaaaabaaaabaaaaabaaaab\",needle = \"baaab\") == -1\n assert candidate(haystack = \"aaaaaa\",needle = \"aaaaaaa\") == -1\n assert candidate(haystack = \"abcdefghijklmnopqrstuvwxyz\",needle = \"xyz\") == 23\n assert candidate(haystack = \"overlaplaplaplaplap\",needle = \"lap\") == 4\n assert candidate(haystack = \"aaaaabaaaaaa\",needle = \"aaaaab\") == 0\n assert candidate(haystack = \"helloworldhelloworld\",needle = \"worldhello\") == 5\n assert candidate(haystack = \"abracadabra\",needle = \"abra\") == 0\n assert candidate(haystack = \"abababababababababab\",needle = \"ababab\") == 0\n assert candidate(haystack = \"aabbccddeeffgghhiijjkk\",needle = \"eeffgg\") == 8\n assert candidate(haystack = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",needle = \"mnop\") == -1\n assert candidate(haystack = \"mississippiissippi\",needle = \"issip\") == 4\n assert candidate(haystack = \"aquickbrownfoxjumpsoverthelazydog\",needle = \"dog\") == 30\n assert candidate(haystack = \"abababababababab\",needle = \"ababab\") == 0\n assert candidate(haystack = \"almostsameprefixalmost\",needle = \"almost\") == 0\n assert candidate(haystack = \"qwertyuiopasdfghjklzxcvbnm\",needle = \"qwertyuiop\") == 0\n assert candidate(haystack = \"ananananananan\",needle = \"anana\") == 0\n assert candidate(haystack = \"averylongstringwithrepeatedcharactersaaaaaaaaa\",needle = \"aaaaaaaa\") == 37\n assert candidate(haystack = \"findinganoccurrenceinanarray\",needle = \"anoccurrence\") == 7\n assert candidate(haystack = \"repeatedrepeatedrepeated\",needle = \"repeated\") == 0\n assert candidate(haystack = \"pythonprogramming\",needle = \"programming\") == 6\n assert candidate(haystack = \"palindrome\",needle = \"alin\") == 1\n assert candidate(haystack = \"singleletter\",needle = \"s\") == 0\n assert candidate(haystack = \"aaaaaabaaaaaab\",needle = \"aaaaaab\") == 0\n assert candidate(haystack = \"thisisaverylongstringthatwilltestouralgorithm\",needle = \"longstring\") == 11\n assert candidate(haystack = \"aaaaabaaaabaaaaabaaaab\",needle = \"aaaab\") == 1\n assert candidate(haystack = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",needle = \"zzzzzzzzzz\") == 0\n assert candidate(haystack = \"repeatedrepeatedrepeated\",needle = \"repeatedre\") == 0\n assert candidate(haystack = \"thelastwordisneedle\",needle = \"needle\") == 13\n assert candidate(haystack = \"hellohellohello\",needle = \"lohe\") == 3\n assert candidate(haystack = \"abababababab\",needle = \"ababab\") == 0\n assert candidate(haystack = \"abababababab\",needle = \"bababa\") == 1\n assert candidate(haystack = \"thisisaverylongstringforatest\",needle = \"avery\") == 6\n assert candidate(haystack = \"overlappingoverlap\",needle = \"lapping\") == 4\n assert candidate(haystack = \"findthehiddenpattern\",needle = \"hidden\") == 7\n assert candidate(haystack = \"ababababab\",needle = \"abab\") == 0\n assert candidate(haystack = \"asubstringrightattheend\",needle = \"end\") == 20\n assert candidate(haystack = \"longstringthatcontainsavarietyofcharacters\",needle = \"characters\") == 32\n assert candidate(haystack = \"bananaanabanana\",needle = \"anaban\") == 6\n assert candidate(haystack = \"racecar\",needle = \"race\") == 0\n assert candidate(haystack = \"longstringwithnokeyword\",needle = \"keyword\") == 16\n assert candidate(haystack = \"abcdefghij\",needle = \"gh\") == 6\n assert candidate(haystack = \"mississippi\",needle = \"pi\") == 9\n assert candidate(haystack = \"verylonghaystackwithrepeatingcharactersaaaaaaaaaaa\",needle = \"aaaaa\") == 39\n assert candidate(haystack = \"hellohellohello\",needle = \"hello\") == 0\n assert candidate(haystack = \"aaaaaaaaaaa\",needle = \"aaaaaa\") == 0\n assert candidate(haystack = \"thisisaverylongstringthatcontainsmultiplesubstrings\",needle = \"substring\") == 41\n assert candidate(haystack = \"uniquecharacters\",needle = \"characters\") == 6\n assert candidate(haystack = \"aaaaaaab\",needle = \"aaaab\") == 3\n assert candidate(haystack = \"almosttherealmost\",needle = \"almostthere\") == 0\n assert candidate(haystack = \"aaaaaaaaaab\",needle = \"aaaaaab\") == 4\n assert candidate(haystack = \"aaaaabaaaaabaaaaab\",needle = \"aaaaab\") == 0\n assert candidate(haystack = \"thisisaverylongstringwithrepeatedpatterns\",needle = \"repeated\") == 25\n assert candidate(haystack = \"thisisaverylonghaystackthatcontainsavariablesubstring\",needle = \"substring\") == 44\n assert candidate(haystack = \"xxyyzzxxyyzzxxyyzz\",needle = \"xxyyzz\") == 0\n assert candidate(haystack = \"aaaaa\",needle = \"aa\") == 0\n assert candidate(haystack = \"ababababababababa\",needle = \"abab\") == 0\n assert candidate(haystack = \"needleinthestack\",needle = \"needle\") == 0\n assert candidate(haystack = \"aaaaaaaaaaaaaaaaaaaa\",needle = \"aaaaaaaaa\") == 0\n assert candidate(haystack = \"aaaaaaab\",needle = \"aaaaaab\") == 1\n assert candidate(haystack = \"aaaa\",needle = \"aaaaa\") == -1\n assert candidate(haystack = \"substring\",needle = \"string\") == 3\n assert candidate(haystack = \"xyzxyzxyzxyz\",needle = \"zyx\") == -1\n assert candidate(haystack = \"abababababababababab\",needle = \"abab\") == 0\n assert candidate(haystack = \"oneonetwoonetwothree\",needle = \"twone\") == -1\n assert candidate(haystack = \"bananananana\",needle = \"anan\") == 1\n assert candidate(haystack = \"xyxxyxyxyxyxyxyx\",needle = \"xyxyx\") == 3\n assert candidate(haystack = \"aaaaabaaaa\",needle = \"aaab\") == 2\n assert candidate(haystack = \"abcdefghij\",needle = \"efgh\") == 4\n assert candidate(haystack = \"overlaplaplaplap\",needle = \"laplap\") == 4\n assert candidate(haystack = \"thisisaverylongstringforsearching\",needle = \"searching\") == 24\n assert candidate(haystack = \"bananabananabanana\",needle = \"nan\") == 2\n assert candidate(haystack = \"longhaystackwithaveryspecificsubstring\",needle = \"averyspecific\") == 16\n assert candidate(haystack = \"aaaaaaa\",needle = \"aaaaaa\") == 0\n assert candidate(haystack = \"abcdefabcdefabcdefabcdef\",needle = \"cdef\") == 2\n assert candidate(haystack = \"aaaaabaaaaabaaaaabaaaaab\",needle = \"aaaab\") == 1\n assert candidate(haystack = \"hellohellohello\",needle = \"lohel\") == 3\n assert candidate(haystack = \"abcdabcdabcd\",needle = \"cdab\") == 2\n assert candidate(haystack = \"banana\",needle = \"na\") == 2\n", "comparison": "exact"}, "public_tests": ["\"sadbutsad\"\n\"sad\"", "\"leetcode\"\n\"leeto\""], "hints": [], "metadata": {"canonical_parameter_names": ["haystack", "needle"], "leetcode_dataset_entry_point": "Solution().strStr", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:31+00:00", "tests_total": 144, "tests_dropped": 12, "flags": [], "topic_tags": ["two-pointers", "string", "string-matching", "z-algorithm", "knuth-morris-pratt-algorithm", "boyer-moore-string-search-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def str_str(haystack, needle)", "container": null, "callable": "str_str", "parameters": [{"name": "haystack", "type": "String"}, {"name": "needle", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 29, "task_id": "divide-two-integers", "difficulty": "Medium", "problem_description": "Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator.\n\nThe integer division should truncate toward zero, which means losing its fractional part. For example, 8.345 would be truncated to 8, and -2.7335 would be truncated to -2.\n\nReturn the quotient after dividing dividend by divisor.\n\nNote: Assume we are dealing with an environment that could only store integers within the 32-bit signed integer range: [-2^31, 2^31 - 1]. For this problem, if the quotient is strictly greater than 2^31 - 1, then return 2^31 - 1, and if the quotient is strictly less than -2^31, then return -2^31.\n\nExample 1:\n\nInput: dividend = 10, divisor = 3\nOutput: 3\nExplanation: 10/3 = 3.33333.. which is truncated to 3.\n\nExample 2:\n\nInput: dividend = 7, divisor = -3\nOutput: -2\nExplanation: 7/-3 = -2.33333.. which is truncated to -2.\n\nConstraints:\n\n- -2^31 <= dividend, divisor <= 2^31 - 1\n- divisor != 0\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(dividend = 10,divisor = 3) == 3\n assert candidate(dividend = -2147483648,divisor = 2) == -1073741824\n assert candidate(dividend = -2147483648,divisor = -1) == 2147483647\n assert candidate(dividend = -1,divisor = -1) == 1\n assert candidate(dividend = 2147483647,divisor = 1) == 2147483647\n assert candidate(dividend = 1,divisor = 1) == 1\n assert candidate(dividend = 1000000000,divisor = 3) == 333333333\n assert candidate(dividend = 7,divisor = -3) == -2\n assert candidate(dividend = -2147483648,divisor = 1) == -2147483648\n assert candidate(dividend = 100,divisor = 7) == 14\n assert candidate(dividend = -5,divisor = 2) == -2\n assert candidate(dividend = 1,divisor = -1) == -1\n assert candidate(dividend = 2147483647,divisor = 2) == 1073741823\n assert candidate(dividend = 0,divisor = 1) == 0\n assert candidate(dividend = 1,divisor = 2) == 0\n assert candidate(dividend = -1,divisor = 1) == -1\n assert candidate(dividend = -7,divisor = 3) == -2\n assert candidate(dividend = -1000000000,divisor = 1000000000) == -1\n assert candidate(dividend = 15,divisor = 6) == 2\n assert candidate(dividend = 1,divisor = -2147483648) == 0\n assert candidate(dividend = -15,divisor = -5) == 3\n assert candidate(dividend = 1000000000,divisor = 500000000) == 2\n assert candidate(dividend = 2147483647,divisor = -1) == -2147483647\n assert candidate(dividend = 123456789,divisor = 987654321) == 0\n assert candidate(dividend = 1,divisor = 999999998) == 0\n assert candidate(dividend = -15,divisor = -6) == 2\n assert candidate(dividend = -1024,divisor = -2) == 512\n assert candidate(dividend = -15,divisor = 3) == -5\n assert candidate(dividend = -5,divisor = -2) == 2\n assert candidate(dividend = 1024,divisor = 10) == 102\n assert candidate(dividend = -1000000000,divisor = -1000000000) == 1\n assert candidate(dividend = -1000000000,divisor = -987654321) == 1\n assert candidate(dividend = -1500000000,divisor = -4) == 375000000\n assert candidate(dividend = -1023,divisor = 10) == -102\n assert candidate(dividend = -1000000000,divisor = 3) == -333333333\n assert candidate(dividend = 15,divisor = -5) == -3\n assert candidate(dividend = -1000000000,divisor = -3) == 333333333\n assert candidate(dividend = 1023,divisor = 10) == 102\n assert candidate(dividend = -10,divisor = 1) == -10\n assert candidate(dividend = 1000000000,divisor = 123456789) == 8\n assert candidate(dividend = -1024,divisor = 1024) == -1\n assert candidate(dividend = -15,divisor = 5) == -3\n assert candidate(dividend = -1000000000,divisor = 987654321) == -1\n assert candidate(dividend = 1024,divisor = -10) == -102\n assert candidate(dividend = 15,divisor = -4) == -3\n assert candidate(dividend = 15,divisor = -6) == -2\n assert candidate(dividend = 5,divisor = -2) == -2\n assert candidate(dividend = -15,divisor = 4) == -3\n assert candidate(dividend = -15,divisor = -4) == 3\n assert candidate(dividend = -15,divisor = -3) == 5\n assert candidate(dividend = -123456789,divisor = 987654321) == 0\n assert candidate(dividend = 100,divisor = -7) == -14\n assert candidate(dividend = 999999999,divisor = 1) == 999999999\n assert candidate(dividend = -1024,divisor = -10) == 102\n assert candidate(dividend = 10,divisor = -1) == -10\n assert candidate(dividend = 1000000000,divisor = 25) == 40000000\n assert candidate(dividend = 123456789,divisor = -987654321) == 0\n assert candidate(dividend = 1500000000,divisor = 3) == 500000000\n assert candidate(dividend = 15,divisor = 4) == 3\n assert candidate(dividend = -2147483648,divisor = 3) == -715827882\n assert candidate(dividend = -1024,divisor = 10) == -102\n assert candidate(dividend = 1,divisor = 999999999) == 0\n assert candidate(dividend = -100,divisor = 7) == -14\n assert candidate(dividend = 1024,divisor = 2) == 512\n assert candidate(dividend = 1024,divisor = 1024) == 1\n assert candidate(dividend = 15,divisor = 5) == 3\n assert candidate(dividend = 1025,divisor = 3) == 341\n assert candidate(dividend = -123456789,divisor = -987654321) == 0\n assert candidate(dividend = -1025,divisor = -3) == 341\n assert candidate(dividend = -1,divisor = 999999999) == 0\n assert candidate(dividend = 1000000000,divisor = -1000000000) == -1\n assert candidate(dividend = -1000000000,divisor = -25) == 40000000\n assert candidate(dividend = 2147483647,divisor = -2147483648) == 0\n assert candidate(dividend = 150,divisor = 3) == 50\n assert candidate(dividend = 100,divisor = 1) == 100\n assert candidate(dividend = 1023,divisor = -10) == -102\n assert candidate(dividend = -1000000000,divisor = 25) == -40000000\n assert candidate(dividend = -1023,divisor = -2) == 511\n assert candidate(dividend = -1,divisor = 999999998) == 0\n assert candidate(dividend = -999999999,divisor = 999999999) == -1\n assert candidate(dividend = -1,divisor = 2147483647) == 0\n assert candidate(dividend = 15,divisor = 3) == 5\n assert candidate(dividend = 1000000000,divisor = 1000000000) == 1\n assert candidate(dividend = 1000000000,divisor = -25) == -40000000\n assert candidate(dividend = -1023,divisor = -10) == 102\n assert candidate(dividend = -2147483648,divisor = -2147483648) == 1\n assert candidate(dividend = 2147483647,divisor = 2147483647) == 1\n assert candidate(dividend = 100,divisor = -1) == -100\n assert candidate(dividend = 2147483647,divisor = 3) == 715827882\n assert candidate(dividend = -2147483648,divisor = -3) == 715827882\n assert candidate(dividend = 999999999,divisor = 999999999) == 1\n assert candidate(dividend = 15,divisor = -3) == -5\n assert candidate(dividend = -2147483648,divisor = 2147483647) == -1\n assert candidate(dividend = 1000000000,divisor = -3) == -333333333\n assert candidate(dividend = -1000000000,divisor = -500000000) == 2\n assert candidate(dividend = 1,divisor = 100) == 0\n assert candidate(dividend = -15,divisor = 6) == -2\n assert candidate(dividend = -999999999,divisor = 1) == -999999999\n assert candidate(dividend = 1023,divisor = 2) == 511\n assert candidate(dividend = -100,divisor = -7) == 14\n assert candidate(dividend = 5,divisor = 2) == 2\n assert candidate(dividend = 10,divisor = -3) == -3\n assert candidate(dividend = -50,divisor = -10) == 5\n assert candidate(dividend = 100,divisor = 10) == 10\n assert candidate(dividend = -1000,divisor = 5) == -200\n assert candidate(dividend = -1000,divisor = -5) == 200\n assert candidate(dividend = 100,divisor = -2) == -50\n assert candidate(dividend = 56,divisor = 7) == 8\n assert candidate(dividend = -50,divisor = 10) == -5\n assert candidate(dividend = -50,divisor = 5) == -10\n assert candidate(dividend = 15,divisor = 2) == 7\n assert candidate(dividend = -1,divisor = -2147483648) == 0\n assert candidate(dividend = -10,divisor = 3) == -3\n assert candidate(dividend = 100,divisor = 33) == 3\n assert candidate(dividend = 150,divisor = 6) == 25\n assert candidate(dividend = 1,divisor = 2147483647) == 0\n assert candidate(dividend = -100,divisor = -5) == 20\n assert candidate(dividend = -7,divisor = -3) == 2\n assert candidate(dividend = -100,divisor = 10) == -10\n assert candidate(dividend = 100,divisor = -10) == -10\n assert candidate(dividend = -2147483647,divisor = 2) == -1073741823\n assert candidate(dividend = -56,divisor = -7) == 8\n assert candidate(dividend = 100,divisor = 2) == 50\n assert candidate(dividend = -100,divisor = -2) == 50\n assert candidate(dividend = 100,divisor = -5) == -20\n assert candidate(dividend = 100,divisor = 5) == 20\n assert candidate(dividend = 0,divisor = 5) == 0\n assert candidate(dividend = -100,divisor = -10) == 10\n assert candidate(dividend = -100,divisor = 2) == -50\n assert candidate(dividend = -100,divisor = 5) == -20\n assert candidate(dividend = 0,divisor = -1) == 0\n assert candidate(dividend = 1000,divisor = 5) == 200\n assert candidate(dividend = 1000,divisor = -5) == -200\n assert candidate(dividend = 1000,divisor = 3) == 333\n", "comparison": "exact"}, "public_tests": ["10\n3", "7\n-3"], "hints": [], "metadata": {"canonical_parameter_names": ["dividend", "divisor"], "leetcode_dataset_entry_point": "Solution().divide", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:33+00:00", "tests_total": 135, "tests_dropped": 1, "flags": [], "topic_tags": ["math", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def divide(dividend, divisor)", "container": null, "callable": "divide", "parameters": [{"name": "dividend", "type": "Integer"}, {"name": "divisor", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 30, "task_id": "substring-with-concatenation-of-all-words", "difficulty": "Hard", "problem_description": "You are given a string s and an array of strings words. All the strings of words are of the same length.\n\nA concatenated string is a string that exactly contains all the strings of any permutation of words concatenated.\n\n- For example, if words = [\"ab\",\"cd\",\"ef\"], then \"abcdef\", \"abefcd\", \"cdabef\", \"cdefab\", \"efabcd\", and \"efcdab\" are all concatenated strings. \"acdbef\" is not a concatenated string because it is not the concatenation of any permutation of words.\n\nReturn an array of the starting indices of all the concatenated substrings in s. You can return the answer in any order.\n\nExample 1:\n\nInput: s = \"barfoothefoobarman\", words = [\"foo\",\"bar\"]\nOutput: [0,9]\nExplanation:\nThe substring starting at 0 is \"barfoo\". It is the concatenation of [\"bar\",\"foo\"] which is a permutation of words.\nThe substring starting at 9 is \"foobar\". It is the concatenation of [\"foo\",\"bar\"] which is a permutation of words.\n\nExample 2:\n\nInput: s = \"wordgoodgoodgoodbestword\", words = [\"word\",\"good\",\"best\",\"word\"]\nOutput: []\nExplanation:\nThere is no concatenated substring.\n\nExample 3:\n\nInput: s = \"barfoofoobarthefoobarman\", words = [\"bar\",\"foo\",\"the\"]\nOutput: [6,9,12]\nExplanation:\nThe substring starting at 6 is \"foobarthe\". It is the concatenation of [\"foo\",\"bar\",\"the\"].\nThe substring starting at 9 is \"barthefoo\". It is the concatenation of [\"bar\",\"the\",\"foo\"].\nThe substring starting at 12 is \"thefoobar\". It is the concatenation of [\"the\",\"foo\",\"bar\"].\n\nConstraints:\n\n- 1 <= s.length <= 10^4\n- 1 <= words.length <= 5000\n- 1 <= words[i].length <= 30\n- s and words[i] consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(s='wordgoodgoodgoodbestword', words=['word', 'good', 'best', 'word']), [])\n assert answers_match(candidate(s='a', words=['a', 'a', 'a']), [])\n assert answers_match(candidate(s='abababab', words=['a', 'b', 'a', 'b']), [0, 1, 2, 3, 4])\n assert answers_match(candidate(s='lingmindraboofooowingdingbarrwingmonkeypoundcake', words=['fooo', 'barr', 'wing', 'ding', 'wing']), [13])\n assert answers_match(candidate(s='barfoothefoobarman', words=['foo', 'bar']), [0, 9])\n assert answers_match(candidate(s='barfoofoobarthefoobarman', words=['bar', 'foo', 'the']), [6, 9, 12])\n assert answers_match(candidate(s='aaa', words=['a', 'a']), [0, 1])\n assert answers_match(candidate(s='thisisjustafancysentencewithallthesewordsin', words=['this', 'is', 'a', 'just', 'fancy', 'sentence', 'with', 'all', 'these', 'words', 'in']), [])\n assert answers_match(candidate(s='overlaplaplaplaplaplaplaplaplaplap', words=['lap', 'laplap', 'laplap', 'laplap', 'laplap', 'laplap', 'laplap', 'laplap']), [])\n assert answers_match(candidate(s='abcdefabcdefabcdefabcdefabcdef', words=['abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef']), [0])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', words=['aabb', 'ccdd', 'eefg', 'ghhi', 'jklk', 'llmm', 'nnoo', 'pqqr', 'rstt', 'uuvv', 'wwxx', 'yyzz']), [])\n assert answers_match(candidate(s='oneonetwoonethreetwothreeonetwothreeone', words=['one', 'two', 'three']), [])\n assert answers_match(candidate(s='abcdefgabcdefgabcdefg', words=['abc', 'def', 'gab', 'cde', 'fgh']), [])\n assert answers_match(candidate(s='zazbzczdzazbzczdzaz', words=['zaz', 'bz', 'cz', 'dz', 'az', 'bz', 'cz', 'dz']), [])\n assert answers_match(candidate(s='onetwothreefourfivesixseveneightnine', words=['onetwo', 'threefour', 'fivesix', 'seveneight', 'ninetwo', 'threefour', 'fivesix']), [])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzzzz', words=['zzz', 'zzz', 'zzz', 'zzz']), [0, 3, 6, 1, 4, 2, 5])\n assert answers_match(candidate(s='abcdefghijabcdefghijabcdefghij', words=['abc', 'def', 'ghi', 'jkl', 'abc', 'def', 'ghi', 'jkl', 'abc', 'def']), [])\n assert answers_match(candidate(s='abcdabcdabcdabcd', words=['abcd', 'dcba', 'abdc', 'bacd']), [])\n assert answers_match(candidate(s='testtesttesttest', words=['test', 'test', 'test']), [0, 4])\n assert answers_match(candidate(s='alibabacloudisfastgrowing', words=['ali', 'ba', 'ba', 'cloud', 'is', 'fast', 'grow', 'ing']), [])\n assert answers_match(candidate(s='mississippiissippi', words=['mis', 'iss', 'ssi', 'ipp', 'ppi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi', 'ippi']), [])\n assert answers_match(candidate(s='thisisaverylongstringthatcontainsmanywordsandwordstogether', words=['this', 'is', 'avery', 'long', 'string', 'that', 'contains', 'many', 'words', 'and', 'words', 'together']), [])\n assert answers_match(candidate(s='catdogcatdogcatdogcat', words=['cat', 'dog', 'cat', 'dog', 'cat']), [0, 6])\n assert answers_match(candidate(s='abcdefghabcdefghabcdefgh', words=['abcdef', 'ghabcd', 'efghab', 'cdefgh', 'defghi', 'efghab', 'fghabc']), [])\n assert answers_match(candidate(s='repeatedrepeatedrepeated', words=['repeated', 'repe', 'atedre', 'peated']), [])\n assert answers_match(candidate(s='xylophoneclarinetxylophoneclarinet', words=['xylo', 'phone', 'clar', 'inet']), [])\n assert answers_match(candidate(s='aquickbrownfoxjumpsoverthelazydog', words=['quick', 'brown', 'fox', 'jump', 'over', 'the', 'lazy', 'dog']), [])\n assert answers_match(candidate(s='repeatedrepeatedrepeatedword', words=['repeated', 'repeated', 'repeated', 'word']), [])\n assert answers_match(candidate(s='aquickbrownfoxjumpsoverthelazydog', words=['quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']), [])\n assert answers_match(candidate(s='onetwothreefour', words=['one', 'two', 'three', 'four']), [])\n assert answers_match(candidate(s='loremipsumdolorsitamet', words=['lorem', 'ipsum', 'dolor', 'sit', 'amet']), [])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', words=['aabb', 'ccdd', 'eefg', 'ghhi', 'ijjk', 'kllm', 'mnnm', 'nnoo', 'ppqq', 'rrss', 'ttuu', 'vvww', 'xxyy', 'zzaa']), [])\n assert answers_match(candidate(s='ababababababababababababababababab', words=['aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab']), [])\n assert answers_match(candidate(s='onetwothreefourfivesixseveneightnine', words=['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']), [])\n assert answers_match(candidate(s='aaaabbbbccccddddeeeeffffgggghhhhiiii', words=['aabb', 'bbcc', 'ccdd', 'ddeeff', 'ffgg', 'gghh', 'hhiiaa']), [])\n assert answers_match(candidate(s='aabbccddeeffgghhiijj', words=['aabb', 'ccdd', 'eeff', 'gghh', 'iijj']), [0])\n assert answers_match(candidate(s='mississippi', words=['issi', 'ippi']), [])\n assert answers_match(candidate(s='aaaaaaaaaaaabbbbbbbbbbbcccccccccccddddddddddd', words=['aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'aaaaa', 'bbbbb']), [])\n assert answers_match(candidate(s='complexcomplexcomplexcomplex', words=['com', 'ple', 'xco', 'mple', 'com', 'ple', 'xco', 'mple']), [])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', words=['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz', 'zz']), [])\n assert answers_match(candidate(s='pythonprogramminglanguage', words=['py', 'thon', 'pro', 'gram', 'ming', 'lan', 'guag', 'e']), [])\n assert answers_match(candidate(s='exampleexampleexampleexample', words=['example', 'example', 'example', 'example']), [0])\n assert answers_match(candidate(s='abcdefghabcdefgh', words=['abcd', 'efgh', 'efgh', 'abcd']), [0])\n assert answers_match(candidate(s='hellohellohellohellohello', words=['hello', 'hello', 'hello', 'hello', 'hello']), [0])\n assert answers_match(candidate(s='xxyyyzzzzzyyyxx', words=['xx', 'yy', 'zz', 'yy', 'xx']), [])\n assert answers_match(candidate(s='abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', words=['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz']), [])\n assert answers_match(candidate(s='hellohellohellohellohellohellohello', words=['hello', 'hello']), [0, 5, 10, 15, 20, 25])\n assert answers_match(candidate(s='concatenationconcatenationconcatenation', words=['concat', 'enationc', 'ationc', 'tenation', 'enationc', 'oncatena']), [])\n assert answers_match(candidate(s='overlapoverlappingoverlapping', words=['over', 'lap', 'over', 'lapping']), [])\n assert answers_match(candidate(s='xxyyzzxxyyzzxxyyzzxxyyzz', words=['xxyy', 'yyzz', 'xxyy', 'yyzz', 'xxyy', 'yyzz']), [])\n assert answers_match(candidate(s='abcdefgabcdefgabcdefg', words=['abc', 'def', 'gab']), [0, 7])\n assert answers_match(candidate(s='aabbccddeeff', words=['abc', 'def', 'abb']), [])\n assert answers_match(candidate(s='mississippiissississippi', words=['issi', 'ssis', 'siss', 'issi', 'ssis', 'siss', 'issi', 'ssis', 'siss']), [])\n assert answers_match(candidate(s='abcdefghijklmno', words=['abc', 'def', 'ghi', 'jkl', 'mno']), [0])\n assert answers_match(candidate(s='xyzxyzxyzxyzxyz', words=['xyz', 'zyx', 'yzx', 'xzy', 'zxy']), [])\n assert answers_match(candidate(s='abcdefabcdefabcdefabcdefabcdefabcdef', words=['abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef']), [0])\n assert answers_match(candidate(s='thisisatargetstringwithtargetstring', words=['this', 'is', 'a', 'target', 'string']), [])\n assert answers_match(candidate(s='thisisanexamplethisisanexamplethisisanexample', words=['this', 'isan', 'example', 'isan', 'example']), [])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz', words=['zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz', 'zzzz']), [0, 4, 1, 5, 2, 6, 3])\n assert answers_match(candidate(s='abcdabcdabcdabcdabcdabcd', words=['abcd', 'dcba', 'abdc', 'bacd', 'cdab']), [])\n assert answers_match(candidate(s='abcdefghijabcdefghijabcdefghij', words=['abc', 'def', 'ghi', 'jabc', 'def', 'ghij', 'abc', 'def', 'ghi', 'j']), [])\n assert answers_match(candidate(s='abcdefghiabcdefghiabcdefghi', words=['abc', 'def', 'ghi', 'abc', 'def', 'ghi', 'abc', 'def', 'ghi']), [0])\n assert answers_match(candidate(s='abcdefghijabcdefghijabcdefghijabcdefghij', words=['abc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'j']), [])\n assert answers_match(candidate(s='aaaaaaaaaaaaaaaaaab', words=['aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'aaaa', 'a']), [])\n assert answers_match(candidate(s='onetwothreefourfivesix', words=['one', 'two', 'three', 'four', 'five', 'six']), [])\n assert answers_match(candidate(s='ababababababababababababababab', words=['aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab', 'aba', 'bab']), [0])\n assert answers_match(candidate(s='abracadabra', words=['bra', 'cad']), [1])\n assert answers_match(candidate(s='amazinganduniquestring', words=['amazing', 'and', 'unique', 'string']), [])\n assert answers_match(candidate(s='mississippiississi', words=['issi', 'ssis', 'siss', 'issi']), [])\n assert answers_match(candidate(s='abcdefabcdefabcdef', words=['abc', 'def', 'cba', 'fed']), [])\n assert answers_match(candidate(s='abcdefghij', words=['abc', 'def', 'ghi', 'j']), [])\n assert answers_match(candidate(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', words=['aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa']), [])\n assert answers_match(candidate(s='mnopqrstuvmnopqrstuv', words=['mnop', 'qrst', 'uv', 'mnop', 'qrst', 'uv']), [])\n assert answers_match(candidate(s='lmnopqrlmnopqrlmnopqr', words=['lmnop', 'qr', 'lmnop', 'qr', 'lmnop', 'qr']), [])\n assert answers_match(candidate(s='xyzzxyzzxyzzxyzzxyzzxyzzxyzz', words=['xyz', 'zxy', 'zzx', 'xyz', 'zxy', 'zzx', 'xyz', 'zxy', 'zzx', 'xyz', 'zxy', 'zzx']), [])\n assert answers_match(candidate(s='abcdefghijabcdefghijabcdefghij', words=['abcdefghij', 'abcdefghij', 'abcdefghij']), [0])\n assert answers_match(candidate(s='anananananananananananananananananan', words=['ana', 'nan', 'ana']), [0, 6, 12, 18, 24, 4, 10, 16, 22, 2, 8, 14, 20, 26])\n assert answers_match(candidate(s='hellohellohellohello', words=['hello', 'hello', 'hello']), [0, 5])\n assert answers_match(candidate(s='abcdefabcdefabcdefabcdefabcdef', words=['abc', 'def']), [0, 3, 6, 9, 12, 15, 18, 21, 24])\n assert answers_match(candidate(s='qwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwertyqwerty', words=['qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty', 'qwe', 'rty']), [0, 3, 6, 9, 12])\n assert answers_match(candidate(s='aaaabbbbccccaaaabbbbcccc', words=['aaaa', 'bbbb', 'cccc', 'aaaa', 'bbbb', 'cccc']), [0])\n assert answers_match(candidate(s='concatenatedsubstringthatappearsmultipleconcatenatedsubstring', words=['concatenated', 'substring', 'that', 'appears', 'multiple']), [])\n assert answers_match(candidate(s='abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc', words=['abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc']), [])\n assert answers_match(candidate(s='mississippiissimissing', words=['issi', 'ssis', 'ippi', 'ssip']), [])\n assert answers_match(candidate(s='abcdefghijklmnopqrstuvwxyz', words=['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz']), [])\n assert answers_match(candidate(s='longstringwithmanywordsoflengthfive', words=['fivel', 'ength', 'withm', 'nword', 'stringw', 'ongst', 'rings', 'words', 'thefa']), [])\n assert answers_match(candidate(s='xxyzxyzyxzyzyzxzy', words=['xyz', 'zyx', 'zyz', 'zxy']), [])\n assert answers_match(candidate(s='abcabcabcabcabcabcabcabcabcabc', words=['abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc', 'abc']), [0])\n assert answers_match(candidate(s='qwertyuiopqwertyuiopqwertyuiop', words=['qwerty', 'uiop', 'qwerty', 'uiop', 'qwerty', 'uiop']), [])\n assert answers_match(candidate(s='mississippiississippi', words=['miss', 'issi', 'ssip', 'ippi']), [])\n assert answers_match(candidate(s='abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij', words=['abc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'jabc', 'def', 'ghi', 'j']), [])\n assert answers_match(candidate(s='aaaaaabbbbccccdddd', words=['aaaa', 'bbbb', 'cccc', 'dddd']), [2])\n assert answers_match(candidate(s='xyzxyzxyzxyz', words=['xyz', 'xyz', 'xyz', 'xyz']), [0])\n assert answers_match(candidate(s='mississippiissimissing', words=['issi', 'ssis', 'ippi', 'ssim']), [])\n", "comparison": "unordered"}, "public_tests": ["\"barfoothefoobarman\"\n[\"foo\",\"bar\"]", "\"wordgoodgoodgoodbestword\"\n[\"word\",\"good\",\"best\",\"word\"]", "\"barfoofoobarthefoobarman\"\n[\"bar\",\"foo\",\"the\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "words"], "leetcode_dataset_entry_point": "Solution().findSubstring", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:36+00:00", "tests_total": 94, "tests_dropped": 0, "flags": ["any_order"], "topic_tags": ["hash-table", "string", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def find_substring(s, words)", "container": null, "callable": "find_substring", "parameters": [{"name": "s", "type": "String"}, {"name": "words", "type": "String[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 32, "task_id": "longest-valid-parentheses", "difficulty": "Hard", "problem_description": "Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.\n\nExample 1:\n\nInput: s = \"(()\"\nOutput: 2\nExplanation: The longest valid parentheses substring is \"()\".\n\nExample 2:\n\nInput: s = \")()())\"\nOutput: 4\nExplanation: The longest valid parentheses substring is \"()()\".\n\nExample 3:\n\nInput: s = \"\"\nOutput: 0\n\nConstraints:\n\n- 0 <= s.length <= 3 * 10^4\n- s[i] is '(', or ')'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"(()())\") == 6\n assert candidate(s = \"())\") == 2\n assert candidate(s = \"())(()\") == 2\n assert candidate(s = \"((((((()))))))\") == 14\n assert candidate(s = \"((())()())()\") == 12\n assert candidate(s = \")()(()(()))\") == 10\n assert candidate(s = \"(()(()(()(()))))\") == 16\n assert candidate(s = \")()())\") == 4\n assert candidate(s = \"()()()()()()()()\") == 16\n assert candidate(s = \"()(()(()))\") == 10\n assert candidate(s = \"()()(())\") == 8\n assert candidate(s = \"\") == 0\n assert candidate(s = \"(()))()\") == 4\n assert candidate(s = \"(()))(()))\") == 4\n assert candidate(s = \"(()))\") == 4\n assert candidate(s = \"(()(()))\") == 8\n assert candidate(s = \"((()))(())()()\") == 14\n assert candidate(s = \"((())()())\") == 10\n assert candidate(s = \"(()(())())()()\") == 14\n assert candidate(s = \"()(()(()(()(()(()))))\") == 18\n assert candidate(s = \"((((((((((()))))))))))\") == 22\n assert candidate(s = \"())()(()\") == 2\n assert candidate(s = \"()(()\") == 2\n assert candidate(s = \"(()\") == 2\n assert candidate(s = \"()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\") == 72\n assert candidate(s = \"(((())))()()()\") == 14\n assert candidate(s = \"(()((())()())())\") == 16\n assert candidate(s = \"()()()()()()()()()\") == 18\n assert candidate(s = \"((())((()))\") == 10\n assert candidate(s = \"((()))\") == 6\n assert candidate(s = \"(()))(()())\") == 6\n assert candidate(s = \"()()\") == 4\n assert candidate(s = \"()()()()\") == 8\n assert candidate(s = \"()()()()()()()()()()()()()()()()()()\") == 36\n assert candidate(s = \"()()()()()()()()()()()()()()()()()\") == 34\n assert candidate(s = \"()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\") == 80\n assert candidate(s = \"(()(()(()(()(())))))\") == 20\n assert candidate(s = \"()(()(()))()()\") == 14\n assert candidate(s = \"(()((())()()))\") == 14\n assert candidate(s = \"()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\") == 60\n assert candidate(s = \"((((()))))((((()))))((((()))))\") == 30\n assert candidate(s = \"(()((((())))))\") == 14\n assert candidate(s = \"(((((((((((((())))))))))()))))))))))))))))))()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\") == 60\n assert candidate(s = \"((())()(()))\") == 12\n assert candidate(s = \"(((((())))))\") == 12\n assert candidate(s = \"(()((())())())\") == 14\n assert candidate(s = \"()((((((()))))))()\") == 18\n assert candidate(s = \"(((()(()(()(()(()(()()))))))))\") == 30\n assert candidate(s = \"((((()))))(((())))\") == 18\n assert candidate(s = \"(((())))(((())))(((())))(((())))\") == 32\n assert candidate(s = \"((((((((((())))))))))))\") == 22\n assert candidate(s = \"()(()(((()))()))\") == 16\n assert candidate(s = \"(((((())))))(((((())))))\") == 24\n assert candidate(s = \"()()(()(()))(()(()))()()\") == 24\n assert candidate(s = \"(()(()(()(()(()))))())\") == 22\n assert candidate(s = \"(()())(()())(()())\") == 18\n assert candidate(s = \"()()()(()(()(()(()(()()))))\") == 20\n assert candidate(s = \"(()(()))(()(()))(()(()))(()(()))\") == 32\n assert candidate(s = \"((((((((()))))))))\") == 18\n assert candidate(s = \"((()()()()()()))((()()()()()()))\") == 32\n assert candidate(s = \"()((()))()(()(()))()\") == 20\n assert candidate(s = \"(((((()(()(()(()(()(()()))))))))))()()()\") == 40\n assert candidate(s = \"(()(()(()(()(()(()(()(())))))))()()\") == 34\n assert candidate(s = \"(()(()(()(()))()))\") == 18\n assert candidate(s = \"()(()())(()(()))\") == 16\n assert candidate(s = \"(()(()(()(()(()(()(()(())))))))))\") == 32\n assert candidate(s = \"()(()(()(()(()(()(()(()(()))()))))))()()\") == 40\n assert candidate(s = \"()(()(()))()()()\") == 16\n assert candidate(s = \"(()(()(()(()(()(()(()(()(()(()(()))))))))))))))\") == 44\n assert candidate(s = \"((()))((()))\") == 12\n assert candidate(s = \"((()()(()())))()()\") == 18\n assert candidate(s = \"()(()(()(()(()(()(()(()))))))))))))()(()(()(()))()()()()()()()()\") == 30\n assert candidate(s = \"(()((())((()))(((())))))\") == 24\n assert candidate(s = \"()()()()()()()()()()\") == 20\n assert candidate(s = \"((((((((()))))))(()(()(()(()(()(()(()))))))))()()\") == 48\n assert candidate(s = \"(()(()(()(()(()(()(()(()(()(()(())))))()))))))))\") == 46\n assert candidate(s = \"(()(()(()(()(()(()()))))))\") == 26\n assert candidate(s = \"(()(()(()(()(()(()))))))\") == 24\n assert candidate(s = \"(()(()(()(()(()(()(()(()(()(()(()()))))))))))()())\") == 50\n assert candidate(s = \"()(()(()(()(()(())))))\") == 22\n assert candidate(s = \"(((()(()))(()(()))))\") == 20\n assert candidate(s = \"()((((()))))()(()(()))\") == 22\n assert candidate(s = \"(()((((()))))))()()\") == 14\n assert candidate(s = \"((((()))))(()(()))\") == 18\n assert candidate(s = \"(()(()(()(()(()(()))))())()()\") == 28\n assert candidate(s = \"(()(()(()(()(()(()(()(()(()(()(()(()(()))()))))))))))))))))))\") == 54\n assert candidate(s = \"(()(()(()(()(()(()(()))))))))))))()(()(()(()))\") == 28\n assert candidate(s = \"(()(()(()))(()(())))\") == 20\n assert candidate(s = \"(()(()))(()(()))\") == 16\n assert candidate(s = \"(((()()(()())()(()(())))))()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()\") == 126\n assert candidate(s = \"(()(()(()(()(()(()(()(()(())))))))))\") == 36\n assert candidate(s = \"(()(()))()(()())\") == 16\n assert candidate(s = \"()((((((((())))))))))()()\") == 20\n assert candidate(s = \"()(()(()(()(()(()(())))))()()()\") == 28\n assert candidate(s = \"(()(()(()(()(()(()(()()))))))))\") == 30\n assert candidate(s = \"((())())(()(()(()())))\") == 22\n assert candidate(s = \"((()))((()))((()))((()))\") == 24\n assert candidate(s = \"((()))()((()))()((()))\") == 22\n assert candidate(s = \"(()(()(()(()(()(()(()))))))))))))()\") == 28\n assert candidate(s = \"(()(())((())))\") == 14\n assert candidate(s = \"((((((((()))))))))))))))\") == 18\n assert candidate(s = \"(()(()(()(()(()(()(())))))))\") == 28\n assert candidate(s = \"(()(()(()(()(()(()(()))))))())\") == 30\n assert candidate(s = \"()()(()(()(()(()()))))\") == 22\n assert candidate(s = \"()(()))(()(()))\") == 8\n assert candidate(s = \"(()(()(()(()(()(()(()(())))))())))\") == 34\n assert candidate(s = \"(()(()(()(()(()(()(()(()(()))))))))))))()(()(()(()))()()()()()()()()(()(()(())))\") == 38\n assert candidate(s = \"()(()(()(()(()(()(()(())))))))\") == 30\n assert candidate(s = \"(()()(()))((())())\") == 18\n assert candidate(s = \"(((((())))))(((()(()))(()))(()(()))(()(()))(()(()))(()(())))\") == 60\n assert candidate(s = \"(()(()(()(()(()(()(())))))())()()()\") == 34\n assert candidate(s = \"()(()(()(()(()(())))))()()\") == 26\n assert candidate(s = \"((()))(()(()))\") == 14\n assert candidate(s = \"())(()())(()(()()(())))\") == 20\n assert candidate(s = \"((())())(()(()(()(()))))\") == 24\n assert candidate(s = \"(((()))(()))(()())\") == 18\n assert candidate(s = \"((())())(()(()))\") == 16\n assert candidate(s = \"(()(()))(()(()))(()(()))\") == 24\n assert candidate(s = \"(()(()(())))()()()(()(()))\") == 26\n assert candidate(s = \"()()()()()()()()()()()()\") == 24\n assert candidate(s = \"(((((()(()))(()(())))))())\") == 26\n assert candidate(s = \"()(()(()(()(()(()(()(()))))))))\") == 30\n assert candidate(s = \"((())((()))(()(()))(()))\") == 24\n assert candidate(s = \"()(()()(()(()())))\") == 18\n assert candidate(s = \"((()(()())))()((()(())))\") == 24\n assert candidate(s = \"((((()))()()()(()))\") == 18\n assert candidate(s = \"((((((()))))))(()(()(())))\") == 26\n assert candidate(s = \"(((()(()(()(()())))))()())\") == 26\n assert candidate(s = \"()(()(()(()(()(()(())))))\") == 22\n assert candidate(s = \"()()()()()()()()()()()()()()()()()()()()\") == 40\n assert candidate(s = \"()()()()()()()()()()()()()()()\") == 30\n assert candidate(s = \"((((((()))))))(()(()(()(()))))\") == 30\n assert candidate(s = \"(()())(())(()(()(()(())))())\") == 28\n", "comparison": "exact"}, "public_tests": ["\"(()\"", "\")()())\"", "\"\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestValidParentheses", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:40+00:00", "tests_total": 133, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming", "stack", "bracket-sequences"]}, "language": "ruby", "interface": {"raw_signature": "def longest_valid_parentheses(s)", "container": null, "callable": "longest_valid_parentheses", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 33, "task_id": "search-in-rotated-sorted-array", "difficulty": "Medium", "problem_description": "There is an integer array nums sorted in ascending order (with distinct values).\n\nPrior to being passed to your function, nums is possibly left rotated at an unknown index k (1 <= k < nums.length) such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] (0-indexed). For example, [0,1,2,4,5,6,7] might be left rotated by 3 indices and become [4,5,6,7,0,1,2].\n\nGiven the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums.\n\nYou must write an algorithm with O(log n) runtime complexity.\n\nExample 1:\n\nInput: nums = [4,5,6,7,0,1,2], target = 0\nOutput: 4\n\nExample 2:\n\nInput: nums = [4,5,6,7,0,1,2], target = 3\nOutput: -1\n\nExample 3:\n\nInput: nums = [1], target = 0\nOutput: -1\n\nConstraints:\n\n- 1 <= nums.length <= 5000\n- -10^4 <= nums[i] <= 10^4\n- All values of nums are unique.\n- nums is an ascending array that is possibly rotated.\n- -10^4 <= target <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3],target = 3) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 10) == 9\n assert candidate(nums = [5, 1, 3],target = 1) == 1\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2],target = 3) == -1\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2],target = 0) == 4\n assert candidate(nums = [6, 7, 8, 9, 1, 2, 3, 4, 5],target = 6) == 0\n assert candidate(nums = [2, 5, 6, 0, 1, 3, 4],target = 1) == -1\n assert candidate(nums = [3, 5, 1],target = 3) == 0\n assert candidate(nums = [11, 13, 15, 17],target = 11) == 0\n assert candidate(nums = [15, 1, 3, 5, 7, 9, 11, 13],target = 7) == 4\n assert candidate(nums = [5, 1, 2, 3, 4],target = 1) == 1\n assert candidate(nums = [5, 1, 2, 3, 4],target = 6) == -1\n assert candidate(nums = [3, 1],target = 1) == 1\n assert candidate(nums = [15, 17, 11, 13],target = 11) == 2\n assert candidate(nums = [5, 1, 3],target = 3) == 2\n assert candidate(nums = [11, 13, 15, 17],target = 10) == -1\n assert candidate(nums = [4, 5, 6, 7, 8, 1, 2, 3],target = 8) == 4\n assert candidate(nums = [2, 1],target = 1) == 1\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 0, 1],target = 5) == 3\n assert candidate(nums = [3, 5, 1],target = 1) == 2\n assert candidate(nums = [7, 0, 1, 2, 3, 4, 5, 6],target = 5) == 6\n assert candidate(nums = [11, 13, 15, 17],target = 13) == 1\n assert candidate(nums = [11, 13, 15, 17],target = 18) == -1\n assert candidate(nums = [5, 1, 3],target = 5) == 0\n assert candidate(nums = [1, 3, 5],target = 1) == 0\n assert candidate(nums = [1],target = 0) == -1\n assert candidate(nums = [6, 7, 8, 9, 1, 2, 3, 4, 5],target = 5) == 8\n assert candidate(nums = [1, 3, 5],target = 5) == 2\n assert candidate(nums = [11, 13, 15, 17],target = 17) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7],target = 3) == 2\n assert candidate(nums = [99, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98],target = 50) == 50\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 65) == -1\n assert candidate(nums = [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 1019) == 19\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0, 1, 2, 3, 4],target = 49) == 44\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 90) == 75\n assert candidate(nums = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 3) == 15\n assert candidate(nums = [999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 1095) == 96\n assert candidate(nums = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 29) == 19\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 29) == 14\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 145) == 45\n assert candidate(nums = [45, 46, 47, 48, 49, 50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44],target = 47) == 2\n assert candidate(nums = [6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5],target = 0) == 5\n assert candidate(nums = [20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 19) == 19\n assert candidate(nums = [47, 48, 49, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46],target = 45) == 48\n assert candidate(nums = [3, 5, 7, 9, 11, 13, 15, 17, 19, 1, 2],target = 2) == 10\n assert candidate(nums = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7],target = 29) == 21\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0],target = 0) == 99\n assert candidate(nums = [15, 16, 18, 19, 20, 21, 22, 23, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 20) == 4\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4],target = 1) == 26\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 0],target = 15) == 13\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3],target = 1) == 11\n assert candidate(nums = [6, 7, 8, 9, 10, 1, 2, 3, 4, 5],target = 10) == 4\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3],target = 10) == 6\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2],target = 11) == -1\n assert candidate(nums = [11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 1, 3, 5, 7, 9],target = 25) == 7\n assert candidate(nums = [11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 20) == -1\n assert candidate(nums = [11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 1, 3, 5, 7, 9],target = 29) == 9\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 29) == 14\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 18) == -1\n assert candidate(nums = [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44],target = 43) == 78\n assert candidate(nums = [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44],target = 70) == 25\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39],target = 0) == 0\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3],target = 11) == -1\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],target = 100) == -1\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2],target = 15) == 12\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3],target = 0) == 16\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 198) == 98\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2],target = 19) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 15) == 14\n assert candidate(nums = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 16) == 7\n assert candidate(nums = [47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46],target = 97) == 50\n assert candidate(nums = [11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 15) == 4\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3],target = 3) == 30\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98],target = 99) == 49\n assert candidate(nums = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 0) == 11\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28],target = 25) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 31) == -1\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 1, 2],target = 10) == -1\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3],target = 19) == 15\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 20) == 5\n assert candidate(nums = [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 1014) == 14\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1],target = 0) == 18\n assert candidate(nums = [30, 40, 50, 60, 70, 80, 90, 10, 20],target = 50) == 2\n assert candidate(nums = [15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 19) == 4\n assert candidate(nums = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 1, 2, 3, 4, 5],target = 0) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 10) == 9\n assert candidate(nums = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 9) == 19\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 4, 6, 8, 10],target = 19) == 4\n assert candidate(nums = [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 49) == 15\n assert candidate(nums = [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 50) == -1\n assert candidate(nums = [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 0) == 11\n assert candidate(nums = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 25) == -1\n assert candidate(nums = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 35) == 15\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150],target = 75) == 75\n assert candidate(nums = [29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28],target = 14) == 15\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],target = 50) == 50\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 0) == 51\n assert candidate(nums = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 2) == 13\n assert candidate(nums = [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5, 6, 7],target = 30) == 22\n assert candidate(nums = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6],target = 1) == 25\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3],target = 10) == 6\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 105) == 5\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 1, 2],target = 0) == 15\n assert candidate(nums = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 0, 1, 2, 3, 4, 5],target = 18) == -1\n assert candidate(nums = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49],target = 35) == 85\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 2, 4, 6, 8],target = 97) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0],target = 0) == 50\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3],target = 7) == 3\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 151) == -1\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 1) == 77\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 1) == -1\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1, 2, 3],target = 99) == 95\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 3, 5, 7],target = 15) == 2\n assert candidate(nums = [15, 16, 19, 20, 25, 1, 3, 4, 5, 7, 10, 14],target = 5) == 8\n assert candidate(nums = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 37) == 17\n assert candidate(nums = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 0) == 31\n assert candidate(nums = [33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31],target = 61) == 14\n assert candidate(nums = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8],target = 5) == 16\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 5, 7, 9],target = 17) == 3\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 4, 6, 8],target = 7) == -1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38],target = 39) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 0],target = 50) == 49\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2],target = 2) == 29\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 1, 2],target = 0) == -1\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 1, 2],target = 30) == 27\n assert candidate(nums = [45, 46, 47, 48, 49, 50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44],target = 0) == 6\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49],target = 25) == 25\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2],target = 21) == -1\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 110) == 10\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99],target = 999) == -1\n", "comparison": "exact"}, "public_tests": ["[4,5,6,7,0,1,2]\n0", "[4,5,6,7,0,1,2]\n3", "[1]\n0"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().search", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:42+00:00", "tests_total": 131, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def search(nums, target)", "container": null, "callable": "search", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 34, "task_id": "find-first-and-last-position-of-element-in-sorted-array", "difficulty": "Medium", "problem_description": "Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value.\n\nIf target is not found in the array, return [-1, -1].\n\nYou must write an algorithm with O(log n) runtime complexity.\n\nExample 1:\n\nInput: nums = [5,7,7,8,8,10], target = 8\nOutput: [3,4]\n\nExample 2:\n\nInput: nums = [5,7,7,8,8,10], target = 6\nOutput: [-1,-1]\n\nExample 3:\n\nInput: nums = [], target = 0\nOutput: [-1,-1]\n\nConstraints:\n\n- 0 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n- nums is a non-decreasing array.\n- -10^9 <= target <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 6]\n assert candidate(nums = [2, 2, 2, 2, 3, 3, 4, 4, 4, 4],target = 2) == [0, 3]\n assert candidate(nums = [1, 2, 3, 4, 5],target = 5) == [4, 4]\n assert candidate(nums = [5, 7, 7, 8, 8, 10],target = 8) == [3, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7],target = 1) == [0, 0]\n assert candidate(nums = [-10, -5, -3, 0, 3, 5, 9, 10],target = 3) == [4, 4]\n assert candidate(nums = [1, 3, 5, 7, 9],target = 0) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 5],target = 2) == [1, 3]\n assert candidate(nums = [1],target = 1) == [0, 0]\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 4, 5, 6],target = 4) == [4, 6]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7],target = 7) == [6, 6]\n assert candidate(nums = [5, 7, 7, 8, 8, 10],target = 6) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 1) == [0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7],target = 5) == [4, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5) == [4, 4]\n assert candidate(nums = [1, 1, 1, 1, 1],target = 1) == [0, 4]\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 4, 5],target = 2) == [1, 4]\n assert candidate(nums = [1, 3, 5, 7, 9],target = 2) == [-1, -1]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 9]\n assert candidate(nums = [],target = 0) == [-1, -1]\n assert candidate(nums = [1],target = 0) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5],target = 1) == [0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9],target = 10) == [-1, -1]\n assert candidate(nums = [1],target = 2) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 11) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 20) == [19, 19]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],target = 4) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 6) == [5, 5]\n assert candidate(nums = [-10, -8, -5, -3, -1, 0, 1, 3, 5, 7, 9, 11, 13],target = 15) == [-1, -1]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6],target = 5) == [9, 11]\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 4, 4, 5],target = 2) == [1, 3]\n assert candidate(nums = [-10, -5, -5, -5, 0, 3, 5, 5, 5, 9],target = 5) == [6, 8]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 0) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 7) == [11, 12]\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8, 9, 9, 10],target = 5) == [6, 9]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 0) == [-1, -1]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],target = 4) == [-1, -1]\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10],target = 4) == [15, 19]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [0, 9]\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5],target = 3) == [4, 7]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2],target = 2) == [0, 7]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 3) == [3, 4]\n assert candidate(nums = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90],target = -100) == [0, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 19]\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9],target = 4) == [4, 9]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 0) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 21) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 16) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 6, 7],target = 5) == [7, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 1) == [0, 0]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6],target = 2) == [2, 4]\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 5, 5, 5, 5, 6, 7, 8, 9, 10],target = 3) == [2, 5]\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 4, 5],target = 2) == [1, 4]\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 5, 6],target = 2) == [1, 1]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 4) == [5, 6]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10],target = 10) == [22, 22]\n assert candidate(nums = [-10, -5, -5, -5, 0, 3, 5, 5, 5, 9],target = -6) == [-1, -1]\n assert candidate(nums = [1, 3, 3, 3, 3, 5, 7, 9],target = 3) == [1, 4]\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 10],target = 5) == [7, 9]\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 22) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 4, 5, 6, 6, 7],target = 4) == [4, 6]\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20],target = -1) == [-1, -1]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 15) == [7, 7]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 2) == [1, 1]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10],target = 7) == [18, 19]\n assert candidate(nums = [-10, -5, -5, -5, 0, 3, 5, 5, 5, 9],target = -5) == [1, 3]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 10) == [9, 9]\n assert candidate(nums = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90],target = -90) == [10, 10]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10],target = 1) == [0, 1]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10],target = 0) == [-1, -1]\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20],target = 20) == [6, 6]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 1) == [0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 13) == [6, 6]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 2) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 2) == [1, 2]\n assert candidate(nums = [-10, -5, -5, -1, 0, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = -5) == [1, 2]\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 7, 8],target = 5) == [8, 11]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 5) == [7, 8]\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 10, 10],target = 10) == [12, 15]\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 2) == [1, 20]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],target = 10) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 8) == [13, 14]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 10) == [9, 9]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],target = 1) == [0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 10) == [9, 9]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 19]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 2) == [0, 31]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 2) == [-1, -1]\n assert candidate(nums = [-10, -5, -5, -5, 0, 3, 5, 5, 5, 9],target = 0) == [4, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 15) == [14, 14]\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 2) == [1, 12]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 1) == [0, 0]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 10) == [17, 18]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 6) == [9, 10]\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20],target = -10) == [0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 7) == [6, 6]\n assert candidate(nums = [-10, -8, -5, -3, -1, 0, 1, 3, 5, 7, 9, 11, 13],target = -3) == [3, 3]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 29) == [14, 14]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 5) == [4, 4]\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20],target = 0) == [2, 2]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],target = 21) == [10, 10]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10],target = 2) == [1, 2]\n assert candidate(nums = [1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5],target = 3) == [1, 21]\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4],target = 3) == [6, 8]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 14]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 0) == [-1, -1]\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20],target = 25) == [-1, -1]\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 9],target = 5) == [7, 10]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],target = 25) == [12, 12]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 7) == [6, 6]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 6]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 9) == [8, 8]\n assert candidate(nums = [1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 5, 6, 7, 8, 8, 8, 8, 9],target = 8) == [13, 16]\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],target = 10) == [0, 14]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 10],target = 5) == [8, 12]\n assert candidate(nums = [-10, -5, -5, -5, 0, 0, 0, 1, 2, 3, 3, 3, 3, 4, 5, 6],target = -5) == [1, 3]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6],target = 0) == [-1, -1]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 2) == [0, 9]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10],target = 5) == [12, 16]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 1) == [0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 21) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 5, 6],target = 3) == [2, 5]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 6) == [10, 11]\n assert candidate(nums = [-10, -5, -5, -5, 0, 3, 5, 5, 5, 9],target = 9) == [9, 9]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 29]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 0) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 25) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 10) == [9, 9]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 11) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 11) == [10, 10]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 3) == [-1, -1]\n assert candidate(nums = [-10, -5, -5, -5, 0, 3, 5, 5, 5, 9],target = -10) == [0, 0]\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 0) == [0, 4]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 3, 3, 3, 4, 5],target = 3) == [3, 8]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6],target = 7) == [-1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5) == [4, 4]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 1) == [0, 10]\n", "comparison": "exact"}, "public_tests": ["[5,7,7,8,8,10]\n8", "[5,7,7,8,8,10]\n6", "[]\n0"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().searchRange", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:44+00:00", "tests_total": 137, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def search_range(nums, target)", "container": null, "callable": "search_range", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 35, "task_id": "search-insert-position", "difficulty": "Easy", "problem_description": "Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.\n\nYou must write an algorithm with O(log n) runtime complexity.\n\nExample 1:\n\nInput: nums = [1,3,5,6], target = 5\nOutput: 2\n\nExample 2:\n\nInput: nums = [1,3,5,6], target = 2\nOutput: 1\n\nExample 3:\n\nInput: nums = [1,3,5,6], target = 7\nOutput: 4\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -10^4 <= nums[i] <= 10^4\n- nums contains distinct values sorted in ascending order.\n- -10^4 <= target <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-10, 0, 5, 10],target = 0) == 1\n assert candidate(nums = [1, 2, 4, 6, 7, 9],target = 3) == 2\n assert candidate(nums = [1, 3, 5],target = 4) == 2\n assert candidate(nums = [1, 3, 5, 6],target = 2) == 1\n assert candidate(nums = [-10, -5, -3, 2, 3, 4, 5],target = -4) == 2\n assert candidate(nums = [-10, 0, 10, 20, 30, 40, 50],target = -5) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 0) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11],target = 10) == 5\n assert candidate(nums = [1],target = 1) == 0\n assert candidate(nums = [-10, 0, 10, 20, 30, 40, 50],target = 25) == 4\n assert candidate(nums = [1, 3],target = 2) == 1\n assert candidate(nums = [-10, 0, 5, 10],target = 15) == 4\n assert candidate(nums = [1, 3, 5, 6],target = 7) == 4\n assert candidate(nums = [1, 3, 5, 6],target = 5) == 2\n assert candidate(nums = [1, 3],target = 4) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5) == 4\n assert candidate(nums = [1, 3, 4, 5, 6, 8, 9, 11, 13, 15],target = 7) == 5\n assert candidate(nums = [1, 2, 4, 6, 8, 10],target = 5) == 3\n assert candidate(nums = [1],target = 0) == 0\n assert candidate(nums = [1],target = 2) == 1\n assert candidate(nums = [-10, -5, -3, 2, 3, 4, 5],target = 3) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 11) == 10\n assert candidate(nums = [1, 3, 5, 6],target = 0) == 0\n assert candidate(nums = [-10, 0, 5, 10],target = -5) == 1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],target = 256) == 8\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 5) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25],target = 14) == 7\n assert candidate(nums = [10000],target = 9999) == 0\n assert candidate(nums = [-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100],target = -550) == 5\n assert candidate(nums = [1, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 15) == 7\n assert candidate(nums = [-100, -90, -80, -70, -60, -50, -40, -30, -20, -10],target = -85) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 12) == 11\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 20) == 10\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 29) == 29\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 155) == 15\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 15) == 7\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],target = 27) == 5\n assert candidate(nums = [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41],target = 39) == 13\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5.5) == 5\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30],target = 27) == 8\n assert candidate(nums = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024],target = 200) == 14\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],target = 33) == 6\n assert candidate(nums = [-10000, 10000],target = 10000) == 1\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24],target = 11) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 19) == 18\n assert candidate(nums = [-10000, 10000],target = 0) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 10) == 5\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 0) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],target = 20) == 10\n assert candidate(nums = [-10, -5, -3, -1, 0, 2, 4, 6, 8, 10],target = -6) == 1\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28],target = 26) == 9\n assert candidate(nums = [50, 60, 70, 80, 90, 100, 110, 120, 130, 140],target = 145) == 10\n assert candidate(nums = [-10, -5, -3, 0, 4, 8, 12],target = 3) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25],target = 12) == 6\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],target = 512) == 9\n assert candidate(nums = [-10, -5, 0, 3, 9, 12, 15],target = 1) == 3\n assert candidate(nums = [-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500],target = -350) == 2\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256],target = 64) == 6\n assert candidate(nums = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100],target = 50) == 7\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80],target = 67) == 13\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],target = 10) == 5\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58],target = 59) == 20\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 1) == 0\n assert candidate(nums = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],target = 100) == 10\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 500) == 4\n assert candidate(nums = [-500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500],target = -250) == 3\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5.5) == 6\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20, 25, 30],target = 12) == 5\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000],target = 5500) == 5\n assert candidate(nums = [-1000, -500, -250, -100, -50, -25, -10, -5, -2, -1, 0, 1, 2, 5, 10, 25, 50, 100, 250, 500, 1000],target = -750) == 1\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20],target = -3) == 2\n assert candidate(nums = [1, 3, 5, 7, 9],target = 6) == 3\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 100) == 0\n assert candidate(nums = [1, 10, 100, 1000, 10000],target = 500) == 3\n assert candidate(nums = [-50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50],target = -35) == 2\n assert candidate(nums = [2, 5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59],target = 3) == 1\n assert candidate(nums = [-10, -5, 0, 5, 10],target = -7) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 8) == 7\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000],target = 1500) == 1\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19],target = 18) == 6\n assert candidate(nums = [-10000, 10000],target = -10000) == 0\n assert candidate(nums = [-999, -998, -997, -996, -995, -994, -993, -992, -991, -990],target = -993) == 6\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],target = 20) == 10\n assert candidate(nums = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024],target = 1024) == 32\n assert candidate(nums = [-1000, -500, -250, -125, -62, -31, -15, -7, -3, -1],target = -10) == 7\n assert candidate(nums = [-10000, -9000, -8000, -7000, -6000, -5000, -4000, -3000, -2000, -1000],target = -7500) == 3\n assert candidate(nums = [2, 4, 6, 8, 10],target = 5) == 2\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 11) == 11\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30],target = 29) == 9\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],target = 93) == 18\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = 550) == 5\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 20) == 10\n assert candidate(nums = [1, 10, 100, 1000, 10000],target = 5000) == 4\n assert candidate(nums = [-10000, -9000, -8000, -7000, -6000, -5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000],target = 5000) == 15\n assert candidate(nums = [-10, -5, -3, -1, 0, 2, 4, 6, 8, 10],target = -4) == 2\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 14) == 7\n assert candidate(nums = [-5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000],target = -2500) == 3\n assert candidate(nums = [-10, -5, 0, 2, 5, 9, 11, 20],target = 3) == 4\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58],target = 26) == 9\n assert candidate(nums = [-500, -250, -100, -50, -25, -10, -5, -2, -1, 0, 1, 2, 5, 10, 25, 50, 100, 250, 500],target = -75) == 3\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],target = 31) == 15\n assert candidate(nums = [-100, -90, -80, -70, -60, -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = -45) == 6\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59],target = 44) == 22\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25],target = 15) == 5\n assert candidate(nums = [1, 3, 7, 15, 31, 63, 127, 255, 511, 1023],target = 1024) == 10\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],target = 1150) == 11\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28],target = 15) == 5\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],target = 100) == 6\n assert candidate(nums = [100, 200, 300, 400, 500],target = 250) == 2\n assert candidate(nums = [-100, -50, 0, 50, 100],target = -75) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 15) == 14\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 19) == 9\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],target = 257) == 9\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90],target = 5) == 0\n assert candidate(nums = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024],target = -1) == 0\n", "comparison": "exact"}, "public_tests": ["[1,3,5,6]\n5", "[1,3,5,6]\n2", "[1,3,5,6]\n7"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().searchInsert", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:47+00:00", "tests_total": 119, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def search_insert(nums, target)", "container": null, "callable": "search_insert", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 36, "task_id": "valid-sudoku", "difficulty": "Medium", "problem_description": "Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules:\n\n1. Each row must contain the digits 1-9 without repetition.\n2. Each column must contain the digits 1-9 without repetition.\n3. Each of the nine 3 x 3 sub-boxes of the grid must contain the digits 1-9 without repetition.\n\nNote:\n\n- A Sudoku board (partially filled) could be valid but is not necessarily solvable.\n- Only the filled cells need to be validated according to the mentioned rules.\n\nExample 1:\n\nInput: board =\n[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\nOutput: true\n\nExample 2:\n\nInput: board =\n[[\"8\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"]\n,[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"]\n,[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"]\n,[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"]\n,[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"]\n,[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"]\n,[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"]\n,[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"]\n,[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]\nOutput: false\nExplanation: Same as Example 1, except with the 5 in the top left corner being modified to 8. Since there are two 8's in the top left 3x3 sub-box, it is invalid.\n\nConstraints:\n\n- board.length == 9\n- board[i].length == 9\n- board[i][j] is a digit 1-9 or '.'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [['8', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '9']]) == False\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '9']]) == True\n assert candidate(board = [['.', '.', '.', '.', '.', '.', '5', '1', '9'], ['.', '9', '.', '.', '5', '.', '.', '.', '.'], ['.', '.', '.', '2', '.', '4', '.', '.', '.'], ['4', '.', '.', '.', '.', '.', '1', '.', '.'], ['.', '.', '.', '.', '.', '.', '7', '.', '3'], ['.', '.', '2', '.', '.', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '.', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '9']]) == False\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '5', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '9']]) == True\n assert candidate(board = [['1', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '2', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '3', '.', '.', '.', '.', '.', '.'], ['4', '.', '.', '5', '.', '.', '.', '.', '.'], ['.', '5', '.', '.', '6', '.', '.', '.', '.'], ['.', '.', '6', '.', '.', '7', '.', '.', '.'], ['7', '.', '.', '.', '.', '.', '8', '.', '.'], ['.', '8', '.', '.', '.', '.', '.', '9', '.'], ['.', '.', '9', '.', '.', '.', '.', '.', '1']]) == True\n assert candidate(board = [['.', '.', '.', '.', '5', '.', '.', '1', '.'], ['.', '4', '.', '3', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '3', '.', '.', '1'], ['8', '.', '.', '.', '.', '.', '.', '2', '.'], ['.', '.', '2', '.', '7', '.', '4', '.', '.'], ['.', '1', '.', '.', '.', '.', '.', '.', '8'], ['9', '.', '.', '1', '.', '.', '.', '.', '.'], ['.', '.', '8', '.', '.', '8', '.', '7', '.'], ['.', '5', '.', '.', '9', '.', '.', '.', '.']]) == False\n assert candidate(board = [['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['4', '5', '6', '7', '8', '9', '1', '2', '3'], ['7', '8', '9', '1', '2', '3', '4', '5', '6'], ['2', '3', '4', '5', '6', '7', '8', '9', '1'], ['5', '6', '7', '8', '9', '1', '2', '3', '4'], ['8', '9', '1', '2', '3', '4', '5', '6', '7'], ['3', '4', '5', '6', '7', '8', '9', '1', '2'], ['6', '7', '8', '9', '1', '2', '3', '4', '5'], ['9', '1', '2', '3', '4', '5', '6', '7', '8']]) == True\n assert candidate(board = [['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['9', '8', '7', '6', '5', '4', '3', '2', '1'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.']]) == False\n assert candidate(board = [['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['2', '3', '4', '5', '6', '7', '8', '9', '1'], ['3', '4', '5', '6', '7', '8', '9', '1', '2'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.']]) == False\n assert candidate(board = [['.', '.', '9', '7', '4', '8', '.', '.', '.'], ['7', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '2', '.', '1', '.', '9', '.', '.', '.'], ['.', '.', '7', '.', '.', '.', '2', '4', '.'], ['.', '6', '4', '.', '1', '.', '5', '9', '.'], ['.', '9', '8', '.', '.', '.', '3', '.', '.'], ['.', '.', '.', '8', '.', '3', '.', '2', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '6'], ['.', '.', '.', '2', '7', '5', '9', '.', '.']]) == True\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '5']]) == False\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '9', '.', '8', '.', '.', '7', '9']]) == False\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '4', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '9']]) == True\n assert candidate(board = [['5', '3', '4', '6', '7', '8', '9', '1', '2'], ['6', '7', '2', '1', '9', '5', '3', '4', '8'], ['1', '9', '8', '3', '4', '2', '5', '6', '7'], ['8', '5', '9', '7', '6', '1', '4', '2', '3'], ['4', '2', '6', '8', '5', '3', '7', '9', '1'], ['7', '1', '3', '9', '2', '4', '8', '5', '6'], ['9', '6', '1', '5', '3', '7', '2', '8', '4'], ['2', '8', '7', '4', '1', '9', '6', '3', '5'], ['3', '4', '5', '2', '8', '6', '1', '7', '9']]) == True\n assert candidate(board = [['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.']]) == True\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '9'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '.', '7', '9']]) == False\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['2', '.', '.', '.', '8', '.', '.', '7', '9']]) == True\n assert candidate(board = [['5', '3', '.', '.', '7', '.', '.', '.', '.'], ['6', '.', '.', '1', '9', '5', '.', '.', '.'], ['.', '9', '8', '.', '.', '.', '.', '6', '.'], ['8', '.', '.', '.', '6', '.', '.', '.', '3'], ['4', '.', '.', '8', '.', '3', '.', '.', '1'], ['7', '.', '.', '.', '2', '.', '.', '.', '6'], ['.', '6', '.', '.', '.', '.', '2', '8', '.'], ['.', '.', '.', '4', '1', '9', '.', '.', '5'], ['.', '.', '.', '.', '8', '.', '5', '7', '9']]) == False\n assert candidate(board = [['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9'], ['1', '2', '3', '4', '5', '6', '7', '8', '9']]) == False\n", "comparison": "exact"}, "public_tests": ["[[\"5\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"],[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"],[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"],[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"],[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"],[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"],[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"],[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"],[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]", "[[\"8\",\"3\",\".\",\".\",\"7\",\".\",\".\",\".\",\".\"],[\"6\",\".\",\".\",\"1\",\"9\",\"5\",\".\",\".\",\".\"],[\".\",\"9\",\"8\",\".\",\".\",\".\",\".\",\"6\",\".\"],[\"8\",\".\",\".\",\".\",\"6\",\".\",\".\",\".\",\"3\"],[\"4\",\".\",\".\",\"8\",\".\",\"3\",\".\",\".\",\"1\"],[\"7\",\".\",\".\",\".\",\"2\",\".\",\".\",\".\",\"6\"],[\".\",\"6\",\".\",\".\",\".\",\".\",\"2\",\"8\",\".\"],[\".\",\".\",\".\",\"4\",\"1\",\"9\",\".\",\".\",\"5\"],[\".\",\".\",\".\",\".\",\"8\",\".\",\".\",\"7\",\"9\"]]"], "hints": [], "metadata": {"canonical_parameter_names": ["board"], "leetcode_dataset_entry_point": "Solution().isValidSudoku", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:49+00:00", "tests_total": 19, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "hash-table", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def is_valid_sudoku(board)", "container": null, "callable": "is_valid_sudoku", "parameters": [{"name": "board", "type": "Character[][]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 38, "task_id": "count-and-say", "difficulty": "Medium", "problem_description": "The count-and-say sequence is a sequence of digit strings defined by the recursive formula:\n\n- countAndSay(1) = \"1\"\n- countAndSay(n) is the run-length encoding of countAndSay(n - 1).\n\nRun-length encoding (RLE) is a string compression method that works by replacing each maximal group of consecutive identical characters with the concatenation of the length of the group followed by the character itself. For example, to compress the string \"3322251\" we replace \"33\" with \"23\", replace \"222\" with \"32\", replace \"5\" with \"15\", and replace \"1\" with \"11\". Thus the compressed string becomes \"23321511\".\n\nGiven a positive integer n, return the n^th element of the count-and-say sequence.\n\nExample 1:\n\nInput: n = 4\nOutput: \"1211\"\nExplanation:\n\ncountAndSay(1) = \"1\"\ncountAndSay(2) = RLE of \"1\" = \"11\"\ncountAndSay(3) = RLE of \"11\" = \"21\"\ncountAndSay(4) = RLE of \"21\" = \"1211\"\n\nExample 2:\n\nInput: n = 1\nOutput: \"1\"\nExplanation:\nThis is the base case.\n\nConstraints:\n\n- 1 <= n <= 30\n\nFollow up: Could you solve it iteratively?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == \"1113213211\"\n assert candidate(n = 3) == \"21\"\n assert candidate(n = 30) == \"3113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112311311222113111231133211121321321122111312211312111322211213211321322123211211131211121332211231131122211311123113321112131221123113111231121123222112111331121113112221121113122113111231133221121113122113121113221112131221123113111231121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321132132211322132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321223112111311222112132113213221133122211311221122111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321132132211322132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331222113321112131122211332113221122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112112322211322311311222113111231133211121312211231131112311211232221121113122113121113222123211211131221132211131221121321131211132221123113112211121312211231131122113221122112133221121321132132211331121321231231121113121113122122311311222113111231133221121113122113121113221112131221123113111231121123222112132113213221133112132123123112111312211322311211133112111312211213211311123113223112111321322123122113222122211211232221121113122113121113222123211211131211121311121321123113213221121113122123211211131221121311121312211213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121113222112131112131221121321131211132221121321132132211331121321232221123113112221131112311322311211131122211213211331121321122112133221121113122113121113222123112221221321132132211231131122211331121321232221121113122113121113222123211211131211121332211213111213122112132113121113222112132113213221232112111312111213322112132113213221133112132123123112111311222112132113311213211221121332211231131122211311123113321112131221123113112221132231131122211211131221131112311332211213211321223112111311222112132113212221132221222112112322211211131221131211132221232112111312111213111213211231131112311311221122132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121311121312211213211312111322211213211321322123211211131211121332211213211321322113311213211322132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113111231133221121321132122311211131122211213211321222113222122211211232221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213213211221113122113121113222112132113213221232112111312111213322112132113213221133112132123123112111312211322311211133112111312212221121123222112132113213221133112132123222113223113112221131112311332111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112211322212322211231131122211322111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211\"\n assert candidate(n = 15) == \"311311222113111231131112132112311321322112111312211312111322212311322113212221\"\n assert candidate(n = 4) == \"1211\"\n assert candidate(n = 9) == \"31131211131221\"\n assert candidate(n = 6) == \"312211\"\n assert candidate(n = 20) == \"11131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113121113123112112322111213211322211312113211\"\n assert candidate(n = 2) == \"11\"\n assert candidate(n = 25) == \"132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113212231121113112221121321132132211231232112311321322112311311222113111231133221121113122113121113221112131221123113111231121123222112132113213221133112132123123112111312111312212231131122211311123113322112111312211312111322111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312212221121123222112132113213221133112132123123112111311222112132113213221132213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121132211332113221122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321231231121113112221121321132122311211131122211211131221131211322113322112111312211322132113213221123113112221131112311311121321122112132231121113122113322113111221131221\"\n assert candidate(n = 1) == \"1\"\n assert candidate(n = 7) == \"13112221\"\n assert candidate(n = 10) == \"13211311123113112211\"\n assert candidate(n = 5) == \"111221\"\n assert candidate(n = 29) == \"11131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211132221121311121312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221231122212213211321322112311311222113311213212322211211131221131211132221232112111312111213322112131112131221121321131211132221121321132132212321121113121112133221121321132132211331121321231231121113112221121321133112132112211213322112311311222113111231133211121312211231131122211322311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122111213122112311311222113111221131221221321132132211331121321231231121113112221121321133112132112211213322112311311222113111231133211121312211231131122211322311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122111213122112311311222112111331121113112221121113122113121113222112132113213221232112111312111213322112311311222113111221221113122112132113121113222112311311222113111221132221231221132221222112112322211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312111322212321121113121112133221132211131221131211132221232112111312111213322112132113213221133112132113221321123113213221121113122123211211131221222112112322211231131122211311123113321112132132112211131221131211132221121321132132212321121113121112133221123113112221131112311332111213211322111213111213211231131211132211121311222113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131211131221223113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331121321231231121113112221121321133112132112211213322112312321123113213221123113112221133112132123222112311311222113111231132231121113112221121321133112132112211213322112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122111213122112311311221132211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312111322212311222122132113213221123113112221133112132123222112311311222113111231133211121321132211121311121321122112133221123113112221131112311332211322111312211312111322212321121113121112133221121321132132211331121321231231121113112221121321132122311211131122211211131221131211322113322112111312211322132113213221123113112221131112311311121321122112132231121113122113322113111221131221\"\n assert candidate(n = 11) == \"11131221133112132113212221\"\n assert candidate(n = 22) == \"132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113213221133122112231131122211211131221131112311332211211131221131211132221232112111312111213322112132113213221133112132113221321123113213221121113122123211211131221222112112322211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211\"\n assert candidate(n = 12) == \"3113112221232112111312211312113211\"\n assert candidate(n = 27) == \"31131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122211211133112111311222112111312211312111322211213211321322123211211131211121332211231131122211311122122111312211213211312111322211231131122211311123113322112111331121113112221121113122113111231133221121113122113121113222123211211131211121332211213211321322113311213211322132112311321322112111312212321121113122122211211232221123113112221131112311332111213122112311311123112111331121113122112132113311213211321222122111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112132113213221133112132123123112111311222112132113311213211231232112311311222112111312211311123113322112132113212231121113112221121321132122211322212221121123222112311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311123113322113223113112221131112311332211211131221131211132211121312211231131112311211232221121321132132211331221122311311222112111312211311123113322112132113213221133122211332111213112221133211322112211213322112111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122211331121321232221121113122113121122132112311321322112111312211312111322211213111213122112132113121113222112132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212311222122132113213221123113112221133112132123222112111312211312111322212321121113121112133221121311121312211213211312111322211213211321322123211211131211121332211213211321322113311213212312311211131122211213211331121321122112133221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311222113111221221113122112132113121113222112132113213221133122211332111213322112132113213221132231131122211311123113322112111312211312111322212321121113122123211231131122113221123113221113122112132113213211121332212311322113212221\"\n assert candidate(n = 26) == \"1113122113121113222123211211131211121311121321123113213221121113122123211211131221121311121312211213211321322112311311222113311213212322211211131221131211221321123113213221121113122113121113222112131112131221121321131211132221121321132132211331121321232221123113112221131112311322311211131122211213211331121321122112133221121113122113121113222123211211131211121311121321123113111231131122112213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211231131122211311123113321112131221123113111231121113311211131221121321131211132221123113112211121312211231131122113221122112133221121113122113121113222123211211131211121311121321123113213221121113122113121113222113221113122113121113222112132113213221232112111312111213322112311311222113111221221113122112132113121113222112311311222113111221132221231221132221222112112322211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312111213111213211231132132211211131221131211221321123113213221123113112221131112211322212322211231131122211322111312211312111322211213211321322113311213211331121113122122211211132213211231131122212322211331222113112211\"\n assert candidate(n = 14) == \"11131221131211131231121113112221121321132132211331222113112211\"\n assert candidate(n = 21) == \"311311222113111231133211121312211231131112311211133112111312211213211312111322211231131122211311122122111312211213211312111322211213211321322113311213212322211231131122211311123113223112111311222112132113311213211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221131112311311121321122112132231121113122113322113111221131221\"\n assert candidate(n = 17) == \"11131221131211132221232112111312212321123113112221121113122113111231133221121321132132211331121321231231121113122113322113111221131221\"\n assert candidate(n = 18) == \"31131122211311123113321112131221123113112211121312211213211321322112311311222113311213212322211211131221131211132221232112111312111213111213211231131122212322211331222113112211\"\n assert candidate(n = 13) == \"1321132132111213122112311311222113111221131221\"\n assert candidate(n = 23) == \"111312211312111322212321121113121112131112132112311321322112111312212321121113122112131112131221121321132132211231131122211331121321232221121113122113121113222123112221221321132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322212321121113122123211231131122113221123113221113122112132113213211121332212311322113212221\"\n assert candidate(n = 19) == \"1321132132211331121321231231121113112221121321132122311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112311332111213122112311311123112111331121113122112132113213211121332212311322113212221\"\n assert candidate(n = 28) == \"13211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321223112111311222112132113213221123123211231132132211231131122211311123113322112111312211312111322111213122112311311123112112322211213211321322113312211223113112221121113122113111231133221121321132132211331121321232221123123211231132132211231131122211331121321232221123113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221232112111312211312113211223113112221131112311332111213122112311311123112112322211211131221131211132221232112111312211322111312211213211312111322211231131122111213122112311311221132211221121332211211131221131211132221232112111312111213111213211231132132211211131221232112111312211213111213122112132113213221123113112221133112132123222112111312211312112213211231132132211211131221131211322113321132211221121332211213211321322113311213212312311211131122211213211331121321123123211231131122211211131221131112311332211213211321322113311213212322211322132113213221133112132123222112311311222113111231132231121113112221121321133112132112211213322112111312211312111322212311222122132113213221123113112221133112132123222112111312211312111322212311322123123112111321322123122113222122211211232221123113112221131112311332111213122112311311123112111331121113122112132113121113222112311311221112131221123113112221121113311211131122211211131221131211132221121321132132212321121113121112133221123113112221131112212211131221121321131211132221123113112221131112311332211211133112111311222112111312211311123113322112111312211312111322212321121113121112133221121321132132211331121321132213211231132132211211131221232112111312212221121123222112311311222113111231133211121321321122111312211312111322211213211321322123211211131211121332211231131122211311123113321112131221123113111231121123222112111331121113112221121113122113111231133221121113122113121113221112131221123113111231121123222112111312211312111322212321121113121112131112132112311321322112111312212321121113122122211211232221121321132132211331121321231231121113112221121321133112132112312321123113112221121113122113111231133221121321132132211331221122311311222112111312211311123113322112111312211312111322212311322123123112112322211211131221131211132221132213211321322113311213212322211231131122211311123113321112131221123113112211121312211213211321222113222112132113223113112221121113122113121113123112112322111213211322211312113211\"\n", "comparison": "exact"}, "public_tests": ["1", "4"], "hints": ["Create a helper function that maps an integer to pairs of its digits and their frequencies. For example, if you call this function with \"223314444411\", then it maps it to an array of pairs [[2,2], [3,2], [1,1], [4,5], [1, 2]].", "Create another helper function that takes the array of pairs and creates a new integer. For example, if you call this function with [[2,2], [3,2], [1,1], [4,5], [1, 2]], it should create \"22\"+\"23\"+\"11\"+\"54\"+\"21\" = \"2223115421\".", "Now, with the two helper functions, you can start with \"1\" and call the two functions alternatively n-1 times. The answer is the last integer you will obtain."], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countAndSay", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:53+00:00", "tests_total": 28, "tests_dropped": 0, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def count_and_say(n)", "container": null, "callable": "count_and_say", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 39, "task_id": "combination-sum", "difficulty": "Medium", "problem_description": "Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations in any order.\n\nThe same number may be chosen from candidates an unlimited number of times. Two combinations are unique if the frequency of at least one of the chosen numbers is different.\n\nThe test cases are generated such that the number of unique combinations that sum up to target is less than 150 combinations for the given input.\n\nExample 1:\n\nInput: candidates = [2,3,6,7], target = 7\nOutput: [[2,2,3],[7]]\nExplanation:\n2 and 3 are candidates, and 2 + 2 + 3 = 7. Note that 2 can be used multiple times.\n7 is a candidate, and 7 = 7.\nThese are the only two combinations.\n\nExample 2:\n\nInput: candidates = [2,3,5], target = 8\nOutput: [[2,2,2,2],[2,3,3],[3,5]]\n\nExample 3:\n\nInput: candidates = [2], target = 1\nOutput: []\n\nConstraints:\n\n- 1 <= candidates.length <= 30\n- 2 <= candidates[i] <= 40\n- All elements of candidates are distinct.\n- 1 <= target <= 40\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(candidates=[8, 7, 4, 3], target=11), [[3, 4, 4], [3, 8], [4, 7]])\n assert answers_match(candidate(candidates=[2, 5, 10], target=10), [[2, 2, 2, 2, 2], [5, 5], [10]])\n assert answers_match(candidate(candidates=[2, 5, 10], target=15), [[2, 2, 2, 2, 2, 5], [5, 5, 5], [5, 10]])\n assert answers_match(candidate(candidates=[3, 5, 7], target=10), [[3, 7], [5, 5]])\n assert answers_match(candidate(candidates=[2, 3, 5], target=8), [[2, 2, 2, 2], [2, 3, 3], [3, 5]])\n assert answers_match(candidate(candidates=[8, 2, 3], target=11), [[2, 2, 2, 2, 3], [2, 3, 3, 3], [3, 8]])\n assert answers_match(candidate(candidates=[3, 5, 8], target=11), [[3, 3, 5], [3, 8]])\n assert answers_match(candidate(candidates=[3, 5, 7, 8, 9], target=15), [[3, 3, 3, 3, 3], [3, 3, 9], [3, 5, 7], [5, 5, 5], [7, 8]])\n assert answers_match(candidate(candidates=[10, 20, 30], target=20), [[10, 10], [20]])\n assert answers_match(candidate(candidates=[3, 12, 9, 11, 6, 7, 8, 5, 4], target=15), [[3, 3, 3, 3, 3], [3, 3, 3, 6], [3, 3, 4, 5], [3, 3, 9], [3, 4, 4, 4], [3, 4, 8], [3, 5, 7], [3, 6, 6], [3, 12], [4, 4, 7], [4, 5, 6], [4, 11], [5, 5, 5], [6, 9], [7, 8]])\n assert answers_match(candidate(candidates=[7, 6, 5], target=17), [[5, 5, 7], [5, 6, 6]])\n assert answers_match(candidate(candidates=[10, 15, 3, 7], target=25), [[3, 3, 3, 3, 3, 3, 7], [3, 3, 3, 3, 3, 10], [3, 7, 15], [10, 15]])\n assert answers_match(candidate(candidates=[7, 14], target=30), [])\n assert answers_match(candidate(candidates=[4, 6, 8], target=12), [[4, 4, 4], [4, 8], [6, 6]])\n assert answers_match(candidate(candidates=[2], target=1), [])\n assert answers_match(candidate(candidates=[3, 5, 7], target=11), [[3, 3, 5]])\n assert answers_match(candidate(candidates=[2, 3, 6, 7], target=7), [[2, 2, 3], [7]])\n assert answers_match(candidate(candidates=[2, 5, 10, 15, 20, 25], target=40), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 15], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 20], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 5, 5, 5, 5, 10], [2, 2, 2, 2, 2, 5, 5, 5, 15], [2, 2, 2, 2, 2, 5, 5, 10, 10], [2, 2, 2, 2, 2, 5, 5, 20], [2, 2, 2, 2, 2, 5, 10, 15], [2, 2, 2, 2, 2, 5, 25], [2, 2, 2, 2, 2, 10, 10, 10], [2, 2, 2, 2, 2, 10, 20], [2, 2, 2, 2, 2, 15, 15], [5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 10], [5, 5, 5, 5, 5, 15], [5, 5, 5, 5, 10, 10], [5, 5, 5, 5, 20], [5, 5, 5, 10, 15], [5, 5, 5, 25], [5, 5, 10, 10, 10], [5, 5, 10, 20], [5, 5, 15, 15], [5, 10, 10, 15], [5, 10, 25], [5, 15, 20], [10, 10, 10, 10], [10, 10, 20], [10, 15, 15], [15, 25], [20, 20]])\n assert answers_match(candidate(candidates=[2, 5, 10, 15], target=20), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 2, 10], [5, 5, 5, 5], [5, 5, 10], [5, 15], [10, 10]])\n assert answers_match(candidate(candidates=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29], target=40), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 13], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 19], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 17], [2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 13], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 5, 5, 7, 7], [2, 2, 2, 2, 2, 2, 2, 2, 5, 19], [2, 2, 2, 2, 2, 2, 2, 2, 7, 17], [2, 2, 2, 2, 2, 2, 2, 2, 11, 13], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 11], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 17], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 3, 7, 13], [2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 13], [2, 2, 2, 2, 2, 2, 2, 3, 5, 7, 11], [2, 2, 2, 2, 2, 2, 2, 3, 23], [2, 2, 2, 2, 2, 2, 2, 5, 5, 5, 11], [2, 2, 2, 2, 2, 2, 2, 5, 7, 7, 7], [2, 2, 2, 2, 2, 2, 2, 7, 19], [2, 2, 2, 2, 2, 2, 2, 13, 13], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 13], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 5, 7, 7], [2, 2, 2, 2, 2, 2, 3, 3, 3, 19], [2, 2, 2, 2, 2, 2, 3, 3, 5, 5, 5, 7], [2, 2, 2, 2, 2, 2, 3, 3, 5, 17], [2, 2, 2, 2, 2, 2, 3, 3, 11, 11], [2, 2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 2, 3, 5, 7, 13], [2, 2, 2, 2, 2, 2, 3, 7, 7, 11], [2, 2, 2, 2, 2, 2, 5, 5, 5, 13], [2, 2, 2, 2, 2, 2, 5, 5, 7, 11], [2, 2, 2, 2, 2, 2, 5, 23], [2, 2, 2, 2, 2, 2, 7, 7, 7, 7], [2, 2, 2, 2, 2, 2, 11, 17], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 7], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5], [2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 13], [2, 2, 2, 2, 2, 3, 3, 3, 3, 7, 11], [2, 2, 2, 2, 2, 3, 3, 3, 5, 5, 11], [2, 2, 2, 2, 2, 3, 3, 3, 7, 7, 7], [2, 2, 2, 2, 2, 3, 3, 5, 5, 7, 7], [2, 2, 2, 2, 2, 3, 3, 5, 19], [2, 2, 2, 2, 2, 3, 3, 7, 17], [2, 2, 2, 2, 2, 3, 3, 11, 13], [2, 2, 2, 2, 2, 3, 5, 5, 5, 5, 7], [2, 2, 2, 2, 2, 3, 5, 5, 17], [2, 2, 2, 2, 2, 3, 5, 11, 11], [2, 2, 2, 2, 2, 3, 7, 7, 13], [2, 2, 2, 2, 2, 5, 5, 5, 5, 5, 5], [2, 2, 2, 2, 2, 5, 5, 7, 13], [2, 2, 2, 2, 2, 5, 7, 7, 11], [2, 2, 2, 2, 2, 7, 23], [2, 2, 2, 2, 2, 11, 19], [2, 2, 2, 2, 2, 13, 17], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 11], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 7, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 17], [2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5], [2, 2, 2, 2, 3, 3, 3, 3, 7, 13], [2, 2, 2, 2, 3, 3, 3, 5, 5, 13], [2, 2, 2, 2, 3, 3, 3, 5, 7, 11], [2, 2, 2, 2, 3, 3, 3, 23], [2, 2, 2, 2, 3, 3, 5, 5, 5, 11], [2, 2, 2, 2, 3, 3, 5, 7, 7, 7], [2, 2, 2, 2, 3, 3, 7, 19], [2, 2, 2, 2, 3, 3, 13, 13], [2, 2, 2, 2, 3, 5, 5, 5, 7, 7], [2, 2, 2, 2, 3, 5, 5, 19], [2, 2, 2, 2, 3, 5, 7, 17], [2, 2, 2, 2, 3, 5, 11, 13], [2, 2, 2, 2, 3, 7, 11, 11], [2, 2, 2, 2, 3, 29], [2, 2, 2, 2, 5, 5, 5, 5, 5, 7], [2, 2, 2, 2, 5, 5, 5, 17], [2, 2, 2, 2, 5, 5, 11, 11], [2, 2, 2, 2, 5, 7, 7, 13], [2, 2, 2, 2, 7, 7, 7, 11], [2, 2, 2, 2, 13, 19], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 13], [2, 2, 2, 3, 3, 3, 3, 3, 3, 5, 11], [2, 2, 2, 3, 3, 3, 3, 3, 5, 7, 7], [2, 2, 2, 3, 3, 3, 3, 3, 19], [2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 7], [2, 2, 2, 3, 3, 3, 3, 5, 17], [2, 2, 2, 3, 3, 3, 3, 11, 11], [2, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5], [2, 2, 2, 3, 3, 3, 5, 7, 13], [2, 2, 2, 3, 3, 3, 7, 7, 11], [2, 2, 2, 3, 3, 5, 5, 5, 13], [2, 2, 2, 3, 3, 5, 5, 7, 11], [2, 2, 2, 3, 3, 5, 23], [2, 2, 2, 3, 3, 7, 7, 7, 7], [2, 2, 2, 3, 3, 11, 17], [2, 2, 2, 3, 5, 5, 5, 5, 11], [2, 2, 2, 3, 5, 5, 7, 7, 7], [2, 2, 2, 3, 5, 7, 19], [2, 2, 2, 3, 5, 13, 13], [2, 2, 2, 3, 7, 7, 17], [2, 2, 2, 3, 7, 11, 13], [2, 2, 2, 5, 5, 5, 5, 7, 7], [2, 2, 2, 5, 5, 5, 19], [2, 2, 2, 5, 5, 7, 17], [2, 2, 2, 5, 5, 11, 13], [2, 2, 2, 5, 7, 11, 11], [2, 2, 2, 5, 29], [2, 2, 2, 7, 7, 7, 13], [2, 2, 2, 11, 23], [2, 2, 2, 17, 17], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 7], [2, 2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5], [2, 2, 3, 3, 3, 3, 3, 3, 5, 13], [2, 2, 3, 3, 3, 3, 3, 3, 7, 11], [2, 2, 3, 3, 3, 3, 3, 5, 5, 11], [2, 2, 3, 3, 3, 3, 3, 7, 7, 7], [2, 2, 3, 3, 3, 3, 5, 5, 7, 7], [2, 2, 3, 3, 3, 3, 5, 19], [2, 2, 3, 3, 3, 3, 7, 17], [2, 2, 3, 3, 3, 3, 11, 13], [2, 2, 3, 3, 3, 5, 5, 5, 5, 7], [2, 2, 3, 3, 3, 5, 5, 17], [2, 2, 3, 3, 3, 5, 11, 11], [2, 2, 3, 3, 3, 7, 7, 13], [2, 2, 3, 3, 5, 5, 5, 5, 5, 5], [2, 2, 3, 3, 5, 5, 7, 13], [2, 2, 3, 3, 5, 7, 7, 11], [2, 2, 3, 3, 7, 23], [2, 2, 3, 3, 11, 19], [2, 2, 3, 3, 13, 17], [2, 2, 3, 5, 5, 5, 5, 13], [2, 2, 3, 5, 5, 5, 7, 11], [2, 2, 3, 5, 5, 23], [2, 2, 3, 5, 7, 7, 7, 7], [2, 2, 3, 5, 11, 17], [2, 2, 3, 7, 7, 19], [2, 2, 3, 7, 13, 13], [2, 2, 3, 11, 11, 11], [2, 2, 5, 5, 5, 5, 5, 11], [2, 2, 5, 5, 5, 7, 7, 7], [2, 2, 5, 5, 7, 19], [2, 2, 5, 5, 13, 13], [2, 2, 5, 7, 7, 17], [2, 2, 5, 7, 11, 13], [2, 2, 7, 7, 11, 11], [2, 2, 7, 29], [2, 2, 13, 23], [2, 2, 17, 19], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11], [2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 7], [2, 3, 3, 3, 3, 3, 3, 3, 5, 5, 7], [2, 3, 3, 3, 3, 3, 3, 3, 17], [2, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5], [2, 3, 3, 3, 3, 3, 3, 7, 13], [2, 3, 3, 3, 3, 3, 5, 5, 13], [2, 3, 3, 3, 3, 3, 5, 7, 11], [2, 3, 3, 3, 3, 3, 23], [2, 3, 3, 3, 3, 5, 5, 5, 11], [2, 3, 3, 3, 3, 5, 7, 7, 7], [2, 3, 3, 3, 3, 7, 19], [2, 3, 3, 3, 3, 13, 13], [2, 3, 3, 3, 5, 5, 5, 7, 7], [2, 3, 3, 3, 5, 5, 19], [2, 3, 3, 3, 5, 7, 17], [2, 3, 3, 3, 5, 11, 13], [2, 3, 3, 3, 7, 11, 11], [2, 3, 3, 3, 29], [2, 3, 3, 5, 5, 5, 5, 5, 7], [2, 3, 3, 5, 5, 5, 17], [2, 3, 3, 5, 5, 11, 11], [2, 3, 3, 5, 7, 7, 13], [2, 3, 3, 7, 7, 7, 11], [2, 3, 3, 13, 19], [2, 3, 5, 5, 5, 5, 5, 5, 5], [2, 3, 5, 5, 5, 7, 13], [2, 3, 5, 5, 7, 7, 11], [2, 3, 5, 7, 23], [2, 3, 5, 11, 19], [2, 3, 5, 13, 17], [2, 3, 7, 7, 7, 7, 7], [2, 3, 7, 11, 17], [2, 3, 11, 11, 13], [2, 5, 5, 5, 5, 5, 13], [2, 5, 5, 5, 5, 7, 11], [2, 5, 5, 5, 23], [2, 5, 5, 7, 7, 7, 7], [2, 5, 5, 11, 17], [2, 5, 7, 7, 19], [2, 5, 7, 13, 13], [2, 5, 11, 11, 11], [2, 7, 7, 7, 17], [2, 7, 7, 11, 13], [2, 19, 19], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 7], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 3, 3, 3, 3, 13], [3, 3, 3, 3, 3, 3, 3, 3, 5, 11], [3, 3, 3, 3, 3, 3, 3, 5, 7, 7], [3, 3, 3, 3, 3, 3, 3, 19], [3, 3, 3, 3, 3, 3, 5, 5, 5, 7], [3, 3, 3, 3, 3, 3, 5, 17], [3, 3, 3, 3, 3, 3, 11, 11], [3, 3, 3, 3, 3, 5, 5, 5, 5, 5], [3, 3, 3, 3, 3, 5, 7, 13], [3, 3, 3, 3, 3, 7, 7, 11], [3, 3, 3, 3, 5, 5, 5, 13], [3, 3, 3, 3, 5, 5, 7, 11], [3, 3, 3, 3, 5, 23], [3, 3, 3, 3, 7, 7, 7, 7], [3, 3, 3, 3, 11, 17], [3, 3, 3, 5, 5, 5, 5, 11], [3, 3, 3, 5, 5, 7, 7, 7], [3, 3, 3, 5, 7, 19], [3, 3, 3, 5, 13, 13], [3, 3, 3, 7, 7, 17], [3, 3, 3, 7, 11, 13], [3, 3, 5, 5, 5, 5, 7, 7], [3, 3, 5, 5, 5, 19], [3, 3, 5, 5, 7, 17], [3, 3, 5, 5, 11, 13], [3, 3, 5, 7, 11, 11], [3, 3, 5, 29], [3, 3, 7, 7, 7, 13], [3, 3, 11, 23], [3, 3, 17, 17], [3, 5, 5, 5, 5, 5, 5, 7], [3, 5, 5, 5, 5, 17], [3, 5, 5, 5, 11, 11], [3, 5, 5, 7, 7, 13], [3, 5, 7, 7, 7, 11], [3, 5, 13, 19], [3, 7, 7, 23], [3, 7, 11, 19], [3, 7, 13, 17], [3, 11, 13, 13], [5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 7, 13], [5, 5, 5, 7, 7, 11], [5, 5, 7, 23], [5, 5, 11, 19], [5, 5, 13, 17], [5, 7, 7, 7, 7, 7], [5, 7, 11, 17], [5, 11, 11, 13], [7, 7, 7, 19], [7, 7, 13, 13], [7, 11, 11, 11], [11, 29], [17, 23]])\n assert answers_match(candidate(candidates=[2, 4, 6, 8, 10, 12, 14], target=32), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12], [2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 8], [2, 2, 2, 2, 2, 2, 2, 2, 2, 14], [2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4], [2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 8], [2, 2, 2, 2, 2, 2, 2, 2, 4, 6, 6], [2, 2, 2, 2, 2, 2, 2, 2, 4, 12], [2, 2, 2, 2, 2, 2, 2, 2, 6, 10], [2, 2, 2, 2, 2, 2, 2, 2, 8, 8], [2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 6], [2, 2, 2, 2, 2, 2, 2, 4, 4, 10], [2, 2, 2, 2, 2, 2, 2, 4, 6, 8], [2, 2, 2, 2, 2, 2, 2, 4, 14], [2, 2, 2, 2, 2, 2, 2, 6, 6, 6], [2, 2, 2, 2, 2, 2, 2, 6, 12], [2, 2, 2, 2, 2, 2, 2, 8, 10], [2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4], [2, 2, 2, 2, 2, 2, 4, 4, 4, 8], [2, 2, 2, 2, 2, 2, 4, 4, 6, 6], [2, 2, 2, 2, 2, 2, 4, 4, 12], [2, 2, 2, 2, 2, 2, 4, 6, 10], [2, 2, 2, 2, 2, 2, 4, 8, 8], [2, 2, 2, 2, 2, 2, 6, 6, 8], [2, 2, 2, 2, 2, 2, 6, 14], [2, 2, 2, 2, 2, 2, 8, 12], [2, 2, 2, 2, 2, 2, 10, 10], [2, 2, 2, 2, 2, 4, 4, 4, 4, 6], [2, 2, 2, 2, 2, 4, 4, 4, 10], [2, 2, 2, 2, 2, 4, 4, 6, 8], [2, 2, 2, 2, 2, 4, 4, 14], [2, 2, 2, 2, 2, 4, 6, 6, 6], [2, 2, 2, 2, 2, 4, 6, 12], [2, 2, 2, 2, 2, 4, 8, 10], [2, 2, 2, 2, 2, 6, 6, 10], [2, 2, 2, 2, 2, 6, 8, 8], [2, 2, 2, 2, 2, 8, 14], [2, 2, 2, 2, 2, 10, 12], [2, 2, 2, 2, 4, 4, 4, 4, 4, 4], [2, 2, 2, 2, 4, 4, 4, 4, 8], [2, 2, 2, 2, 4, 4, 4, 6, 6], [2, 2, 2, 2, 4, 4, 4, 12], [2, 2, 2, 2, 4, 4, 6, 10], [2, 2, 2, 2, 4, 4, 8, 8], [2, 2, 2, 2, 4, 6, 6, 8], [2, 2, 2, 2, 4, 6, 14], [2, 2, 2, 2, 4, 8, 12], [2, 2, 2, 2, 4, 10, 10], [2, 2, 2, 2, 6, 6, 6, 6], [2, 2, 2, 2, 6, 6, 12], [2, 2, 2, 2, 6, 8, 10], [2, 2, 2, 2, 8, 8, 8], [2, 2, 2, 2, 10, 14], [2, 2, 2, 2, 12, 12], [2, 2, 2, 4, 4, 4, 4, 4, 6], [2, 2, 2, 4, 4, 4, 4, 10], [2, 2, 2, 4, 4, 4, 6, 8], [2, 2, 2, 4, 4, 4, 14], [2, 2, 2, 4, 4, 6, 6, 6], [2, 2, 2, 4, 4, 6, 12], [2, 2, 2, 4, 4, 8, 10], [2, 2, 2, 4, 6, 6, 10], [2, 2, 2, 4, 6, 8, 8], [2, 2, 2, 4, 8, 14], [2, 2, 2, 4, 10, 12], [2, 2, 2, 6, 6, 6, 8], [2, 2, 2, 6, 6, 14], [2, 2, 2, 6, 8, 12], [2, 2, 2, 6, 10, 10], [2, 2, 2, 8, 8, 10], [2, 2, 2, 12, 14], [2, 2, 4, 4, 4, 4, 4, 4, 4], [2, 2, 4, 4, 4, 4, 4, 8], [2, 2, 4, 4, 4, 4, 6, 6], [2, 2, 4, 4, 4, 4, 12], [2, 2, 4, 4, 4, 6, 10], [2, 2, 4, 4, 4, 8, 8], [2, 2, 4, 4, 6, 6, 8], [2, 2, 4, 4, 6, 14], [2, 2, 4, 4, 8, 12], [2, 2, 4, 4, 10, 10], [2, 2, 4, 6, 6, 6, 6], [2, 2, 4, 6, 6, 12], [2, 2, 4, 6, 8, 10], [2, 2, 4, 8, 8, 8], [2, 2, 4, 10, 14], [2, 2, 4, 12, 12], [2, 2, 6, 6, 6, 10], [2, 2, 6, 6, 8, 8], [2, 2, 6, 8, 14], [2, 2, 6, 10, 12], [2, 2, 8, 8, 12], [2, 2, 8, 10, 10], [2, 2, 14, 14], [2, 4, 4, 4, 4, 4, 4, 6], [2, 4, 4, 4, 4, 4, 10], [2, 4, 4, 4, 4, 6, 8], [2, 4, 4, 4, 4, 14], [2, 4, 4, 4, 6, 6, 6], [2, 4, 4, 4, 6, 12], [2, 4, 4, 4, 8, 10], [2, 4, 4, 6, 6, 10], [2, 4, 4, 6, 8, 8], [2, 4, 4, 8, 14], [2, 4, 4, 10, 12], [2, 4, 6, 6, 6, 8], [2, 4, 6, 6, 14], [2, 4, 6, 8, 12], [2, 4, 6, 10, 10], [2, 4, 8, 8, 10], [2, 4, 12, 14], [2, 6, 6, 6, 6, 6], [2, 6, 6, 6, 12], [2, 6, 6, 8, 10], [2, 6, 8, 8, 8], [2, 6, 10, 14], [2, 6, 12, 12], [2, 8, 8, 14], [2, 8, 10, 12], [2, 10, 10, 10], [4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 8], [4, 4, 4, 4, 4, 6, 6], [4, 4, 4, 4, 4, 12], [4, 4, 4, 4, 6, 10], [4, 4, 4, 4, 8, 8], [4, 4, 4, 6, 6, 8], [4, 4, 4, 6, 14], [4, 4, 4, 8, 12], [4, 4, 4, 10, 10], [4, 4, 6, 6, 6, 6], [4, 4, 6, 6, 12], [4, 4, 6, 8, 10], [4, 4, 8, 8, 8], [4, 4, 10, 14], [4, 4, 12, 12], [4, 6, 6, 6, 10], [4, 6, 6, 8, 8], [4, 6, 8, 14], [4, 6, 10, 12], [4, 8, 8, 12], [4, 8, 10, 10], [4, 14, 14], [6, 6, 6, 6, 8], [6, 6, 6, 14], [6, 6, 8, 12], [6, 6, 10, 10], [6, 8, 8, 10], [6, 12, 14], [8, 8, 8, 8], [8, 10, 14], [8, 12, 12], [10, 10, 12]])\n assert answers_match(candidate(candidates=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29], target=30), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 7, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 13], [2, 2, 2, 2, 2, 2, 2, 5, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 5, 13], [2, 2, 2, 2, 2, 2, 7, 11], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 3, 3, 3, 11], [2, 2, 2, 2, 2, 3, 3, 7, 7], [2, 2, 2, 2, 2, 3, 5, 5, 7], [2, 2, 2, 2, 2, 3, 17], [2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 7, 13], [2, 2, 2, 2, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 3, 3, 3, 13], [2, 2, 2, 2, 3, 3, 5, 11], [2, 2, 2, 2, 3, 5, 7, 7], [2, 2, 2, 2, 3, 19], [2, 2, 2, 2, 5, 5, 5, 7], [2, 2, 2, 2, 5, 17], [2, 2, 2, 2, 11, 11], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3, 3, 5, 7], [2, 2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 2, 3, 3, 5, 13], [2, 2, 2, 3, 3, 7, 11], [2, 2, 2, 3, 5, 5, 11], [2, 2, 2, 3, 7, 7, 7], [2, 2, 2, 5, 5, 7, 7], [2, 2, 2, 5, 19], [2, 2, 2, 7, 17], [2, 2, 2, 11, 13], [2, 2, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 3, 3, 3, 3, 3, 11], [2, 2, 3, 3, 3, 3, 7, 7], [2, 2, 3, 3, 3, 5, 5, 7], [2, 2, 3, 3, 3, 17], [2, 2, 3, 3, 5, 5, 5, 5], [2, 2, 3, 3, 7, 13], [2, 2, 3, 5, 5, 13], [2, 2, 3, 5, 7, 11], [2, 2, 3, 23], [2, 2, 5, 5, 5, 11], [2, 2, 5, 7, 7, 7], [2, 2, 7, 19], [2, 2, 13, 13], [2, 3, 3, 3, 3, 3, 3, 3, 7], [2, 3, 3, 3, 3, 3, 3, 5, 5], [2, 3, 3, 3, 3, 3, 13], [2, 3, 3, 3, 3, 5, 11], [2, 3, 3, 3, 5, 7, 7], [2, 3, 3, 3, 19], [2, 3, 3, 5, 5, 5, 7], [2, 3, 3, 5, 17], [2, 3, 3, 11, 11], [2, 3, 5, 5, 5, 5, 5], [2, 3, 5, 7, 13], [2, 3, 7, 7, 11], [2, 5, 5, 5, 13], [2, 5, 5, 7, 11], [2, 5, 23], [2, 7, 7, 7, 7], [2, 11, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 5, 7], [3, 3, 3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 5, 13], [3, 3, 3, 3, 7, 11], [3, 3, 3, 5, 5, 11], [3, 3, 3, 7, 7, 7], [3, 3, 5, 5, 7, 7], [3, 3, 5, 19], [3, 3, 7, 17], [3, 3, 11, 13], [3, 5, 5, 5, 5, 7], [3, 5, 5, 17], [3, 5, 11, 11], [3, 7, 7, 13], [5, 5, 5, 5, 5, 5], [5, 5, 7, 13], [5, 7, 7, 11], [7, 23], [11, 19], [13, 17]])\n assert answers_match(candidate(candidates=[5, 10, 15, 20], target=30), [[5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 10], [5, 5, 5, 15], [5, 5, 10, 10], [5, 5, 20], [5, 10, 15], [10, 10, 10], [10, 20], [15, 15]])\n assert answers_match(candidate(candidates=[2, 3, 5, 7, 11, 13, 17], target=30), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 3, 11], [2, 2, 2, 2, 2, 2, 2, 2, 7, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 13], [2, 2, 2, 2, 2, 2, 2, 5, 11], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 3, 3, 5, 7], [2, 2, 2, 2, 2, 2, 3, 5, 5, 5], [2, 2, 2, 2, 2, 2, 5, 13], [2, 2, 2, 2, 2, 2, 7, 11], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 3, 3, 3, 11], [2, 2, 2, 2, 2, 3, 3, 7, 7], [2, 2, 2, 2, 2, 3, 5, 5, 7], [2, 2, 2, 2, 2, 3, 17], [2, 2, 2, 2, 2, 5, 5, 5, 5], [2, 2, 2, 2, 2, 7, 13], [2, 2, 2, 2, 3, 3, 3, 3, 3, 7], [2, 2, 2, 2, 3, 3, 3, 3, 5, 5], [2, 2, 2, 2, 3, 3, 3, 13], [2, 2, 2, 2, 3, 3, 5, 11], [2, 2, 2, 2, 3, 5, 7, 7], [2, 2, 2, 2, 5, 5, 5, 7], [2, 2, 2, 2, 5, 17], [2, 2, 2, 2, 11, 11], [2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3, 3, 5, 7], [2, 2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 2, 3, 3, 5, 13], [2, 2, 2, 3, 3, 7, 11], [2, 2, 2, 3, 5, 5, 11], [2, 2, 2, 3, 7, 7, 7], [2, 2, 2, 5, 5, 7, 7], [2, 2, 2, 7, 17], [2, 2, 2, 11, 13], [2, 2, 3, 3, 3, 3, 3, 3, 3, 5], [2, 2, 3, 3, 3, 3, 3, 11], [2, 2, 3, 3, 3, 3, 7, 7], [2, 2, 3, 3, 3, 5, 5, 7], [2, 2, 3, 3, 3, 17], [2, 2, 3, 3, 5, 5, 5, 5], [2, 2, 3, 3, 7, 13], [2, 2, 3, 5, 5, 13], [2, 2, 3, 5, 7, 11], [2, 2, 5, 5, 5, 11], [2, 2, 5, 7, 7, 7], [2, 2, 13, 13], [2, 3, 3, 3, 3, 3, 3, 3, 7], [2, 3, 3, 3, 3, 3, 3, 5, 5], [2, 3, 3, 3, 3, 3, 13], [2, 3, 3, 3, 3, 5, 11], [2, 3, 3, 3, 5, 7, 7], [2, 3, 3, 5, 5, 5, 7], [2, 3, 3, 5, 17], [2, 3, 3, 11, 11], [2, 3, 5, 5, 5, 5, 5], [2, 3, 5, 7, 13], [2, 3, 7, 7, 11], [2, 5, 5, 5, 13], [2, 5, 5, 7, 11], [2, 7, 7, 7, 7], [2, 11, 17], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 5, 7], [3, 3, 3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 5, 13], [3, 3, 3, 3, 7, 11], [3, 3, 3, 5, 5, 11], [3, 3, 3, 7, 7, 7], [3, 3, 5, 5, 7, 7], [3, 3, 7, 17], [3, 3, 11, 13], [3, 5, 5, 5, 5, 7], [3, 5, 5, 17], [3, 5, 11, 11], [3, 7, 7, 13], [5, 5, 5, 5, 5, 5], [5, 5, 7, 13], [5, 7, 7, 11], [13, 17]])\n assert answers_match(candidate(candidates=[2, 6, 10, 14, 18, 22], target=40), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 6], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 14], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 10], [2, 2, 2, 2, 2, 2, 2, 2, 2, 22], [2, 2, 2, 2, 2, 2, 2, 2, 6, 6, 6, 6], [2, 2, 2, 2, 2, 2, 2, 2, 6, 18], [2, 2, 2, 2, 2, 2, 2, 2, 10, 14], [2, 2, 2, 2, 2, 2, 2, 6, 6, 14], [2, 2, 2, 2, 2, 2, 2, 6, 10, 10], [2, 2, 2, 2, 2, 2, 6, 6, 6, 10], [2, 2, 2, 2, 2, 2, 6, 22], [2, 2, 2, 2, 2, 2, 10, 18], [2, 2, 2, 2, 2, 2, 14, 14], [2, 2, 2, 2, 2, 6, 6, 6, 6, 6], [2, 2, 2, 2, 2, 6, 6, 18], [2, 2, 2, 2, 2, 6, 10, 14], [2, 2, 2, 2, 2, 10, 10, 10], [2, 2, 2, 2, 6, 6, 6, 14], [2, 2, 2, 2, 6, 6, 10, 10], [2, 2, 2, 2, 10, 22], [2, 2, 2, 2, 14, 18], [2, 2, 2, 6, 6, 6, 6, 10], [2, 2, 2, 6, 6, 22], [2, 2, 2, 6, 10, 18], [2, 2, 2, 6, 14, 14], [2, 2, 2, 10, 10, 14], [2, 2, 6, 6, 6, 6, 6, 6], [2, 2, 6, 6, 6, 18], [2, 2, 6, 6, 10, 14], [2, 2, 6, 10, 10, 10], [2, 2, 14, 22], [2, 2, 18, 18], [2, 6, 6, 6, 6, 14], [2, 6, 6, 6, 10, 10], [2, 6, 10, 22], [2, 6, 14, 18], [2, 10, 10, 18], [2, 10, 14, 14], [6, 6, 6, 6, 6, 10], [6, 6, 6, 22], [6, 6, 10, 18], [6, 6, 14, 14], [6, 10, 10, 14], [10, 10, 10, 10], [18, 22]])\n assert answers_match(candidate(candidates=[2, 3, 5, 7, 11], target=29), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 11], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 3, 5, 7], [2, 2, 2, 2, 2, 2, 2, 5, 5, 5], [2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 5], [2, 2, 2, 2, 2, 2, 3, 3, 11], [2, 2, 2, 2, 2, 2, 3, 7, 7], [2, 2, 2, 2, 2, 2, 5, 5, 7], [2, 2, 2, 2, 2, 3, 3, 3, 3, 7], [2, 2, 2, 2, 2, 3, 3, 3, 5, 5], [2, 2, 2, 2, 2, 3, 5, 11], [2, 2, 2, 2, 2, 5, 7, 7], [2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3, 5, 7], [2, 2, 2, 2, 3, 3, 5, 5, 5], [2, 2, 2, 2, 3, 7, 11], [2, 2, 2, 2, 5, 5, 11], [2, 2, 2, 2, 7, 7, 7], [2, 2, 2, 3, 3, 3, 3, 3, 3, 5], [2, 2, 2, 3, 3, 3, 3, 11], [2, 2, 2, 3, 3, 3, 7, 7], [2, 2, 2, 3, 3, 5, 5, 7], [2, 2, 2, 3, 5, 5, 5, 5], [2, 2, 2, 5, 7, 11], [2, 2, 3, 3, 3, 3, 3, 3, 7], [2, 2, 3, 3, 3, 3, 3, 5, 5], [2, 2, 3, 3, 3, 5, 11], [2, 2, 3, 3, 5, 7, 7], [2, 2, 3, 5, 5, 5, 7], [2, 2, 3, 11, 11], [2, 2, 5, 5, 5, 5, 5], [2, 2, 7, 7, 11], [2, 3, 3, 3, 3, 3, 3, 3, 3, 3], [2, 3, 3, 3, 3, 3, 5, 7], [2, 3, 3, 3, 3, 5, 5, 5], [2, 3, 3, 3, 7, 11], [2, 3, 3, 5, 5, 11], [2, 3, 3, 7, 7, 7], [2, 3, 5, 5, 7, 7], [2, 5, 5, 5, 5, 7], [2, 5, 11, 11], [3, 3, 3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3, 11], [3, 3, 3, 3, 3, 7, 7], [3, 3, 3, 3, 5, 5, 7], [3, 3, 3, 5, 5, 5, 5], [3, 3, 5, 7, 11], [3, 5, 5, 5, 11], [3, 5, 7, 7, 7], [5, 5, 5, 7, 7], [7, 11, 11]])\n assert answers_match(candidate(candidates=[3, 5, 7, 11, 13, 17, 19], target=30), [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 5, 7], [3, 3, 3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 5, 13], [3, 3, 3, 3, 7, 11], [3, 3, 3, 5, 5, 11], [3, 3, 3, 7, 7, 7], [3, 3, 5, 5, 7, 7], [3, 3, 5, 19], [3, 3, 7, 17], [3, 3, 11, 13], [3, 5, 5, 5, 5, 7], [3, 5, 5, 17], [3, 5, 11, 11], [3, 7, 7, 13], [5, 5, 5, 5, 5, 5], [5, 5, 7, 13], [5, 7, 7, 11], [11, 19], [13, 17]])\n assert answers_match(candidate(candidates=[3, 5, 7, 8, 10], target=25), [[3, 3, 3, 3, 3, 3, 7], [3, 3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 10], [3, 3, 3, 3, 5, 8], [3, 3, 3, 8, 8], [3, 3, 5, 7, 7], [3, 5, 5, 5, 7], [3, 5, 7, 10], [3, 7, 7, 8], [5, 5, 5, 5, 5], [5, 5, 5, 10], [5, 5, 7, 8], [5, 10, 10], [7, 8, 10]])\n assert answers_match(candidate(candidates=[3, 5, 7, 11, 13, 17], target=30), [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 5, 7], [3, 3, 3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 5, 13], [3, 3, 3, 3, 7, 11], [3, 3, 3, 5, 5, 11], [3, 3, 3, 7, 7, 7], [3, 3, 5, 5, 7, 7], [3, 3, 7, 17], [3, 3, 11, 13], [3, 5, 5, 5, 5, 7], [3, 5, 5, 17], [3, 5, 11, 11], [3, 7, 7, 13], [5, 5, 5, 5, 5, 5], [5, 5, 7, 13], [5, 7, 7, 11], [13, 17]])\n assert answers_match(candidate(candidates=[13, 11, 7, 5, 3, 2], target=25), [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5], [2, 2, 2, 2, 2, 2, 2, 2, 2, 7], [2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 2, 2, 2, 3, 3, 5], [2, 2, 2, 2, 2, 2, 2, 11], [2, 2, 2, 2, 2, 2, 3, 3, 7], [2, 2, 2, 2, 2, 2, 3, 5, 5], [2, 2, 2, 2, 2, 2, 13], [2, 2, 2, 2, 2, 3, 3, 3, 3, 3], [2, 2, 2, 2, 2, 3, 5, 7], [2, 2, 2, 2, 2, 5, 5, 5], [2, 2, 2, 2, 3, 3, 3, 3, 5], [2, 2, 2, 2, 3, 3, 11], [2, 2, 2, 2, 3, 7, 7], [2, 2, 2, 2, 5, 5, 7], [2, 2, 2, 3, 3, 3, 3, 7], [2, 2, 2, 3, 3, 3, 5, 5], [2, 2, 2, 3, 3, 13], [2, 2, 2, 3, 5, 11], [2, 2, 2, 5, 7, 7], [2, 2, 3, 3, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 5, 7], [2, 2, 3, 3, 5, 5, 5], [2, 2, 3, 5, 13], [2, 2, 3, 7, 11], [2, 2, 5, 5, 11], [2, 2, 7, 7, 7], [2, 3, 3, 3, 3, 3, 3, 5], [2, 3, 3, 3, 3, 11], [2, 3, 3, 3, 7, 7], [2, 3, 3, 5, 5, 7], [2, 3, 5, 5, 5, 5], [2, 3, 7, 13], [2, 5, 5, 13], [2, 5, 7, 11], [3, 3, 3, 3, 3, 3, 7], [3, 3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 13], [3, 3, 3, 5, 11], [3, 3, 5, 7, 7], [3, 5, 5, 5, 7], [3, 11, 11], [5, 5, 5, 5, 5], [5, 7, 13], [7, 7, 11]])\n", "comparison": "unordered"}, "public_tests": ["[2,3,6,7]\n7", "[2,3,5]\n8", "[2]\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["candidates", "target"], "leetcode_dataset_entry_point": "Solution().combinationSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:55+00:00", "tests_total": 93, "tests_dropped": 63, "flags": ["any_order"], "topic_tags": ["array", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def combination_sum(candidates, target)", "container": null, "callable": "combination_sum", "parameters": [{"name": "candidates", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 40, "task_id": "combination-sum-ii", "difficulty": "Medium", "problem_description": "Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target.\n\nEach number in candidates may only be used once in the combination.\n\nNote: The solution set must not contain duplicate combinations.\n\nExample 1:\n\nInput: candidates = [10,1,2,7,6,1,5], target = 8\nOutput:\n[\n[1,1,6],\n[1,2,5],\n[1,7],\n[2,6]\n]\n\nExample 2:\n\nInput: candidates = [2,5,2,1,2], target = 5\nOutput:\n[\n[1,2,2],\n[5]\n]\n\nConstraints:\n\n- 1 <= candidates.length <= 100\n- 1 <= candidates[i] <= 50\n- 1 <= target <= 30\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(candidates = [1, 1, 1, 1, 1],target = 3) == [[1, 1, 1]]\n assert candidate(candidates = [2, 5, 2, 1, 2],target = 5) == [[1, 2, 2], [5]]\n assert candidate(candidates = [4, 4, 2, 1, 4, 2, 2, 1, 3],target = 6) == [[1, 1, 2, 2], [1, 1, 4], [1, 2, 3], [2, 2, 2], [2, 4]]\n assert candidate(candidates = [1, 2],target = 4) == []\n assert candidate(candidates = [1, 2, 3, 4, 5],target = 5) == [[1, 4], [2, 3], [5]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5],target = 8) == [[1, 1, 6], [1, 2, 5], [1, 7], [2, 6]]\n assert candidate(candidates = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 25) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]\n assert candidate(candidates = [3, 1, 3, 5, 1, 1],target = 8) == [[1, 1, 1, 5], [1, 1, 3, 3], [3, 5]]\n assert candidate(candidates = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 5) == [[1, 1, 1, 1, 1]]\n assert candidate(candidates = [1],target = 1) == [[1]]\n assert candidate(candidates = [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8],target = 20) == [[1, 1, 2, 2, 2, 3, 3, 6], [1, 1, 2, 2, 2, 3, 4, 5], [1, 1, 2, 2, 2, 4, 4, 4], [1, 1, 2, 2, 2, 4, 8], [1, 1, 2, 2, 2, 5, 7], [1, 1, 2, 2, 2, 6, 6], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 8], [1, 1, 2, 2, 3, 4, 7], [1, 1, 2, 2, 3, 5, 6], [1, 1, 2, 2, 4, 4, 6], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 6, 8], [1, 1, 2, 2, 7, 7], [1, 1, 2, 3, 3, 4, 6], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 5, 8], [1, 1, 2, 3, 6, 7], [1, 1, 2, 4, 4, 4, 4], [1, 1, 2, 4, 4, 8], [1, 1, 2, 4, 5, 7], [1, 1, 2, 4, 6, 6], [1, 1, 2, 5, 5, 6], [1, 1, 2, 8, 8], [1, 1, 3, 3, 4, 4, 4], [1, 1, 3, 3, 4, 8], [1, 1, 3, 3, 5, 7], [1, 1, 3, 3, 6, 6], [1, 1, 3, 4, 4, 7], [1, 1, 3, 4, 5, 6], [1, 1, 3, 5, 5, 5], [1, 1, 3, 7, 8], [1, 1, 4, 4, 4, 6], [1, 1, 4, 4, 5, 5], [1, 1, 4, 6, 8], [1, 1, 4, 7, 7], [1, 1, 5, 5, 8], [1, 1, 5, 6, 7], [1, 1, 6, 6, 6], [1, 2, 2, 2, 3, 3, 7], [1, 2, 2, 2, 3, 4, 6], [1, 2, 2, 2, 3, 5, 5], [1, 2, 2, 2, 4, 4, 5], [1, 2, 2, 2, 5, 8], [1, 2, 2, 2, 6, 7], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 8], [1, 2, 2, 3, 5, 7], [1, 2, 2, 3, 6, 6], [1, 2, 2, 4, 4, 7], [1, 2, 2, 4, 5, 6], [1, 2, 2, 5, 5, 5], [1, 2, 2, 7, 8], [1, 2, 3, 3, 4, 7], [1, 2, 3, 3, 5, 6], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 6, 8], [1, 2, 3, 7, 7], [1, 2, 4, 4, 4, 5], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 2, 5, 5, 7], [1, 2, 5, 6, 6], [1, 3, 3, 4, 4, 5], [1, 3, 3, 5, 8], [1, 3, 3, 6, 7], [1, 3, 4, 4, 4, 4], [1, 3, 4, 4, 8], [1, 3, 4, 5, 7], [1, 3, 4, 6, 6], [1, 3, 5, 5, 6], [1, 3, 8, 8], [1, 4, 4, 4, 7], [1, 4, 4, 5, 6], [1, 4, 5, 5, 5], [1, 4, 7, 8], [1, 5, 6, 8], [1, 5, 7, 7], [1, 6, 6, 7], [2, 2, 2, 3, 3, 4, 4], [2, 2, 2, 3, 3, 8], [2, 2, 2, 3, 4, 7], [2, 2, 2, 3, 5, 6], [2, 2, 2, 4, 4, 6], [2, 2, 2, 4, 5, 5], [2, 2, 2, 6, 8], [2, 2, 2, 7, 7], [2, 2, 3, 3, 4, 6], [2, 2, 3, 3, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 5, 8], [2, 2, 3, 6, 7], [2, 2, 4, 4, 4, 4], [2, 2, 4, 4, 8], [2, 2, 4, 5, 7], [2, 2, 4, 6, 6], [2, 2, 5, 5, 6], [2, 2, 8, 8], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 8], [2, 3, 3, 5, 7], [2, 3, 3, 6, 6], [2, 3, 4, 4, 7], [2, 3, 4, 5, 6], [2, 3, 5, 5, 5], [2, 3, 7, 8], [2, 4, 4, 4, 6], [2, 4, 4, 5, 5], [2, 4, 6, 8], [2, 4, 7, 7], [2, 5, 5, 8], [2, 5, 6, 7], [2, 6, 6, 6], [3, 3, 4, 4, 6], [3, 3, 4, 5, 5], [3, 3, 6, 8], [3, 3, 7, 7], [3, 4, 4, 4, 5], [3, 4, 5, 8], [3, 4, 6, 7], [3, 5, 5, 7], [3, 5, 6, 6], [4, 4, 4, 8], [4, 4, 5, 7], [4, 4, 6, 6], [4, 5, 5, 6], [4, 8, 8], [5, 5, 5, 5], [5, 7, 8], [6, 6, 8], [6, 7, 7]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 1, 2],target = 10) == [[1, 1, 1, 2, 5], [1, 1, 1, 7], [1, 1, 2, 6], [1, 2, 2, 5], [1, 2, 7], [2, 2, 6], [10]]\n assert candidate(candidates = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 15) == [[1, 1, 2, 2, 3, 6], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 9], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 8], [1, 1, 2, 4, 7], [1, 1, 2, 5, 6], [1, 1, 3, 3, 7], [1, 1, 3, 4, 6], [1, 1, 3, 5, 5], [1, 1, 3, 10], [1, 1, 4, 4, 5], [1, 1, 4, 9], [1, 1, 5, 8], [1, 1, 6, 7], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 7], [1, 2, 2, 4, 6], [1, 2, 2, 5, 5], [1, 2, 2, 10], [1, 2, 3, 3, 6], [1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 2, 6, 6], [1, 3, 3, 4, 4], [1, 3, 3, 8], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 4, 6], [1, 4, 5, 5], [1, 4, 10], [1, 5, 9], [1, 6, 8], [1, 7, 7], [2, 2, 3, 3, 5], [2, 2, 3, 4, 4], [2, 2, 3, 8], [2, 2, 4, 7], [2, 2, 5, 6], [2, 3, 3, 7], [2, 3, 4, 6], [2, 3, 5, 5], [2, 3, 10], [2, 4, 4, 5], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 3, 4, 5], [3, 3, 9], [3, 4, 8], [3, 5, 7], [3, 6, 6], [4, 4, 7], [4, 5, 6], [5, 10], [6, 9], [7, 8]]\n assert candidate(candidates = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 10) == [[5, 5]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 25) == [[1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 15], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 14], [1, 2, 3, 6, 13], [1, 2, 3, 7, 12], [1, 2, 3, 8, 11], [1, 2, 3, 9, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 13], [1, 2, 4, 6, 12], [1, 2, 4, 7, 11], [1, 2, 4, 8, 10], [1, 2, 5, 6, 11], [1, 2, 5, 7, 10], [1, 2, 5, 8, 9], [1, 2, 6, 7, 9], [1, 2, 7, 15], [1, 2, 8, 14], [1, 2, 9, 13], [1, 2, 10, 12], [1, 3, 4, 5, 12], [1, 3, 4, 6, 11], [1, 3, 4, 7, 10], [1, 3, 4, 8, 9], [1, 3, 5, 6, 10], [1, 3, 5, 7, 9], [1, 3, 6, 7, 8], [1, 3, 6, 15], [1, 3, 7, 14], [1, 3, 8, 13], [1, 3, 9, 12], [1, 3, 10, 11], [1, 4, 5, 6, 9], [1, 4, 5, 7, 8], [1, 4, 5, 15], [1, 4, 6, 14], [1, 4, 7, 13], [1, 4, 8, 12], [1, 4, 9, 11], [1, 5, 6, 13], [1, 5, 7, 12], [1, 5, 8, 11], [1, 5, 9, 10], [1, 6, 7, 11], [1, 6, 8, 10], [1, 7, 8, 9], [1, 9, 15], [1, 10, 14], [1, 11, 13], [2, 3, 4, 5, 11], [2, 3, 4, 6, 10], [2, 3, 4, 7, 9], [2, 3, 5, 6, 9], [2, 3, 5, 7, 8], [2, 3, 5, 15], [2, 3, 6, 14], [2, 3, 7, 13], [2, 3, 8, 12], [2, 3, 9, 11], [2, 4, 5, 6, 8], [2, 4, 5, 14], [2, 4, 6, 13], [2, 4, 7, 12], [2, 4, 8, 11], [2, 4, 9, 10], [2, 5, 6, 12], [2, 5, 7, 11], [2, 5, 8, 10], [2, 6, 7, 10], [2, 6, 8, 9], [2, 8, 15], [2, 9, 14], [2, 10, 13], [2, 11, 12], [3, 4, 5, 6, 7], [3, 4, 5, 13], [3, 4, 6, 12], [3, 4, 7, 11], [3, 4, 8, 10], [3, 5, 6, 11], [3, 5, 7, 10], [3, 5, 8, 9], [3, 6, 7, 9], [3, 7, 15], [3, 8, 14], [3, 9, 13], [3, 10, 12], [4, 5, 6, 10], [4, 5, 7, 9], [4, 6, 7, 8], [4, 6, 15], [4, 7, 14], [4, 8, 13], [4, 9, 12], [4, 10, 11], [5, 6, 14], [5, 7, 13], [5, 8, 12], [5, 9, 11], [6, 7, 12], [6, 8, 11], [6, 9, 10], [7, 8, 10], [10, 15], [11, 14], [12, 13]]\n assert candidate(candidates = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 6) == [[2, 2, 2]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],target = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 15], [1, 2, 3, 4, 6, 14], [1, 2, 3, 4, 7, 13], [1, 2, 3, 4, 8, 12], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 20], [1, 2, 3, 5, 6, 13], [1, 2, 3, 5, 7, 12], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 19], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 18], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 17], [1, 2, 3, 8, 16], [1, 2, 3, 9, 15], [1, 2, 3, 10, 14], [1, 2, 3, 11, 13], [1, 2, 3, 24], [1, 2, 4, 5, 6, 12], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 18], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 17], [1, 2, 4, 7, 16], [1, 2, 4, 8, 15], [1, 2, 4, 9, 14], [1, 2, 4, 10, 13], [1, 2, 4, 11, 12], [1, 2, 4, 23], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 16], [1, 2, 5, 7, 15], [1, 2, 5, 8, 14], [1, 2, 5, 9, 13], [1, 2, 5, 10, 12], [1, 2, 5, 22], [1, 2, 6, 7, 14], [1, 2, 6, 8, 13], [1, 2, 6, 9, 12], [1, 2, 6, 10, 11], [1, 2, 6, 21], [1, 2, 7, 8, 12], [1, 2, 7, 9, 11], [1, 2, 7, 20], [1, 2, 8, 9, 10], [1, 2, 8, 19], [1, 2, 9, 18], [1, 2, 10, 17], [1, 2, 11, 16], [1, 2, 12, 15], [1, 2, 13, 14], [1, 2, 27], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 17], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 16], [1, 3, 4, 7, 15], [1, 3, 4, 8, 14], [1, 3, 4, 9, 13], [1, 3, 4, 10, 12], [1, 3, 4, 22], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 15], [1, 3, 5, 7, 14], [1, 3, 5, 8, 13], [1, 3, 5, 9, 12], [1, 3, 5, 10, 11], [1, 3, 5, 21], [1, 3, 6, 7, 13], [1, 3, 6, 8, 12], [1, 3, 6, 9, 11], [1, 3, 6, 20], [1, 3, 7, 8, 11], [1, 3, 7, 9, 10], [1, 3, 7, 19], [1, 3, 8, 18], [1, 3, 9, 17], [1, 3, 10, 16], [1, 3, 11, 15], [1, 3, 12, 14], [1, 3, 26], [1, 4, 5, 6, 14], [1, 4, 5, 7, 13], [1, 4, 5, 8, 12], [1, 4, 5, 9, 11], [1, 4, 5, 20], [1, 4, 6, 7, 12], [1, 4, 6, 8, 11], [1, 4, 6, 9, 10], [1, 4, 6, 19], [1, 4, 7, 8, 10], [1, 4, 7, 18], [1, 4, 8, 17], [1, 4, 9, 16], [1, 4, 10, 15], [1, 4, 11, 14], [1, 4, 12, 13], [1, 4, 25], [1, 5, 6, 7, 11], [1, 5, 6, 8, 10], [1, 5, 6, 18], [1, 5, 7, 8, 9], [1, 5, 7, 17], [1, 5, 8, 16], [1, 5, 9, 15], [1, 5, 10, 14], [1, 5, 11, 13], [1, 5, 24], [1, 6, 7, 16], [1, 6, 8, 15], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 6, 23], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 7, 22], [1, 8, 9, 12], [1, 8, 10, 11], [1, 8, 21], [1, 9, 20], [1, 10, 19], [1, 11, 18], [1, 12, 17], [1, 13, 16], [1, 14, 15], [1, 29], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 16], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 15], [2, 3, 4, 7, 14], [2, 3, 4, 8, 13], [2, 3, 4, 9, 12], [2, 3, 4, 10, 11], [2, 3, 4, 21], [2, 3, 5, 6, 14], [2, 3, 5, 7, 13], [2, 3, 5, 8, 12], [2, 3, 5, 9, 11], [2, 3, 5, 20], [2, 3, 6, 7, 12], [2, 3, 6, 8, 11], [2, 3, 6, 9, 10], [2, 3, 6, 19], [2, 3, 7, 8, 10], [2, 3, 7, 18], [2, 3, 8, 17], [2, 3, 9, 16], [2, 3, 10, 15], [2, 3, 11, 14], [2, 3, 12, 13], [2, 3, 25], [2, 4, 5, 6, 13], [2, 4, 5, 7, 12], [2, 4, 5, 8, 11], [2, 4, 5, 9, 10], [2, 4, 5, 19], [2, 4, 6, 7, 11], [2, 4, 6, 8, 10], [2, 4, 6, 18], [2, 4, 7, 8, 9], [2, 4, 7, 17], [2, 4, 8, 16], [2, 4, 9, 15], [2, 4, 10, 14], [2, 4, 11, 13], [2, 4, 24], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 6, 17], [2, 5, 7, 16], [2, 5, 8, 15], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 5, 23], [2, 6, 7, 15], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 6, 22], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 7, 21], [2, 8, 9, 11], [2, 8, 20], [2, 9, 19], [2, 10, 18], [2, 11, 17], [2, 12, 16], [2, 13, 15], [2, 28], [3, 4, 5, 6, 12], [3, 4, 5, 7, 11], [3, 4, 5, 8, 10], [3, 4, 5, 18], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 6, 17], [3, 4, 7, 16], [3, 4, 8, 15], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 4, 23], [3, 5, 6, 7, 9], [3, 5, 6, 16], [3, 5, 7, 15], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 5, 22], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 6, 21], [3, 7, 8, 12], [3, 7, 9, 11], [3, 7, 20], [3, 8, 9, 10], [3, 8, 19], [3, 9, 18], [3, 10, 17], [3, 11, 16], [3, 12, 15], [3, 13, 14], [3, 27], [4, 5, 6, 7, 8], [4, 5, 6, 15], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 5, 21], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 6, 20], [4, 7, 8, 11], [4, 7, 9, 10], [4, 7, 19], [4, 8, 18], [4, 9, 17], [4, 10, 16], [4, 11, 15], [4, 12, 14], [4, 26], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 6, 19], [5, 7, 8, 10], [5, 7, 18], [5, 8, 17], [5, 9, 16], [5, 10, 15], [5, 11, 14], [5, 12, 13], [5, 25], [6, 7, 8, 9], [6, 7, 17], [6, 8, 16], [6, 9, 15], [6, 10, 14], [6, 11, 13], [6, 24], [7, 8, 15], [7, 9, 14], [7, 10, 13], [7, 11, 12], [7, 23], [8, 9, 13], [8, 10, 12], [8, 22], [9, 10, 11], [9, 21], [10, 20], [11, 19], [12, 18], [13, 17], [14, 16], [30]]\n assert candidate(candidates = [2, 3, 6, 7, 8, 10, 12, 13, 15, 18, 20, 21, 22, 25, 27, 28, 30],target = 30) == [[2, 3, 6, 7, 12], [2, 3, 7, 8, 10], [2, 3, 7, 18], [2, 3, 10, 15], [2, 3, 12, 13], [2, 3, 25], [2, 6, 7, 15], [2, 6, 10, 12], [2, 6, 22], [2, 7, 8, 13], [2, 7, 21], [2, 8, 20], [2, 10, 18], [2, 13, 15], [2, 28], [3, 6, 8, 13], [3, 6, 21], [3, 7, 8, 12], [3, 7, 20], [3, 12, 15], [3, 27], [7, 8, 15], [7, 10, 13], [8, 10, 12], [8, 22], [10, 20], [12, 18], [30]]\n assert candidate(candidates = [20, 16, 12, 15, 25, 30, 10, 2, 5, 3, 1],target = 25) == [[1, 2, 10, 12], [1, 3, 5, 16], [2, 3, 5, 15], [2, 3, 20], [3, 10, 12], [5, 20], [10, 15], [25]]\n assert candidate(candidates = [20, 10, 5, 5, 2, 1, 1],target = 27) == [[1, 1, 5, 20], [2, 5, 20]]\n assert candidate(candidates = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 25) == [[5, 5, 5, 5, 5]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9],target = 15) == [[1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 5, 9], [1, 6, 8], [2, 3, 4, 6], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6], [6, 9], [7, 8]]\n assert candidate(candidates = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],target = 27) == [[3, 3, 3, 3, 3, 3, 3, 3, 3]]\n assert candidate(candidates = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 28) == [[1, 3, 5, 19], [1, 3, 7, 17], [1, 3, 9, 15], [1, 3, 11, 13], [1, 5, 7, 15], [1, 5, 9, 13], [1, 7, 9, 11], [3, 5, 7, 13], [3, 5, 9, 11], [9, 19], [11, 17], [13, 15]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 15) == [[1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 10], [1, 5, 9], [1, 6, 8], [2, 3, 4, 6], [2, 3, 10], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6], [5, 10], [6, 9], [7, 8]]\n assert candidate(candidates = [3, 3, 6, 3, 3, 3],target = 9) == [[3, 3, 3], [3, 6]]\n assert candidate(candidates = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4],target = 20) == [[4, 4, 4, 4, 4]]\n assert candidate(candidates = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 15) == [[5, 5, 5]]\n assert candidate(candidates = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 15) == [[5, 5, 5]]\n assert candidate(candidates = [4, 4, 4, 4, 2, 2, 3, 5],target = 10) == [[2, 3, 5], [2, 4, 4]]\n assert candidate(candidates = [9, 7, 3, 8, 1, 4, 2, 1, 5, 8, 7, 9, 4, 1, 2, 5],target = 15) == [[1, 1, 1, 2, 2, 3, 5], [1, 1, 1, 2, 2, 4, 4], [1, 1, 1, 2, 2, 8], [1, 1, 1, 2, 3, 7], [1, 1, 1, 2, 5, 5], [1, 1, 1, 3, 4, 5], [1, 1, 1, 3, 9], [1, 1, 1, 4, 8], [1, 1, 1, 5, 7], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 9], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 8], [1, 1, 2, 4, 7], [1, 1, 3, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 9], [1, 1, 5, 8], [1, 2, 2, 3, 7], [1, 2, 2, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 4, 5, 5], [1, 5, 9], [1, 7, 7], [2, 2, 3, 4, 4], [2, 2, 3, 8], [2, 2, 4, 7], [2, 3, 5, 5], [2, 4, 4, 5], [2, 4, 9], [2, 5, 8], [3, 4, 8], [3, 5, 7], [4, 4, 7], [7, 8]]\n assert candidate(candidates = [2, 3, 6, 7, 8, 10, 11, 13, 15],target = 21) == [[2, 3, 6, 10], [2, 6, 13], [2, 8, 11], [3, 7, 11], [3, 8, 10], [6, 7, 8], [6, 15], [8, 13], [10, 11]]\n assert candidate(candidates = [1, 3, 2, 5, 4, 7, 6, 9, 8, 10],target = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 6, 8, 10], [1, 2, 3, 7, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 5, 6, 7, 9], [1, 2, 8, 9, 10], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 6, 7, 9], [1, 3, 5, 6, 7, 8], [1, 3, 7, 9, 10], [1, 4, 6, 9, 10], [1, 4, 7, 8, 10], [1, 5, 6, 8, 10], [1, 5, 7, 8, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 6, 7, 8], [2, 3, 6, 9, 10], [2, 3, 7, 8, 10], [2, 4, 5, 9, 10], [2, 4, 6, 8, 10], [2, 4, 7, 8, 9], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [3, 4, 5, 8, 10], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 5, 6, 7, 9], [3, 8, 9, 10], [4, 5, 6, 7, 8], [4, 7, 9, 10], [5, 6, 9, 10], [5, 7, 8, 10], [6, 7, 8, 9]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 15], [1, 2, 3, 4, 6, 14], [1, 2, 3, 4, 7, 13], [1, 2, 3, 4, 8, 12], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 20], [1, 2, 3, 5, 6, 13], [1, 2, 3, 5, 7, 12], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 19], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 18], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 17], [1, 2, 3, 8, 16], [1, 2, 3, 9, 15], [1, 2, 3, 10, 14], [1, 2, 3, 11, 13], [1, 2, 4, 5, 6, 12], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 18], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 17], [1, 2, 4, 7, 16], [1, 2, 4, 8, 15], [1, 2, 4, 9, 14], [1, 2, 4, 10, 13], [1, 2, 4, 11, 12], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 16], [1, 2, 5, 7, 15], [1, 2, 5, 8, 14], [1, 2, 5, 9, 13], [1, 2, 5, 10, 12], [1, 2, 6, 7, 14], [1, 2, 6, 8, 13], [1, 2, 6, 9, 12], [1, 2, 6, 10, 11], [1, 2, 7, 8, 12], [1, 2, 7, 9, 11], [1, 2, 7, 20], [1, 2, 8, 9, 10], [1, 2, 8, 19], [1, 2, 9, 18], [1, 2, 10, 17], [1, 2, 11, 16], [1, 2, 12, 15], [1, 2, 13, 14], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 17], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 16], [1, 3, 4, 7, 15], [1, 3, 4, 8, 14], [1, 3, 4, 9, 13], [1, 3, 4, 10, 12], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 15], [1, 3, 5, 7, 14], [1, 3, 5, 8, 13], [1, 3, 5, 9, 12], [1, 3, 5, 10, 11], [1, 3, 6, 7, 13], [1, 3, 6, 8, 12], [1, 3, 6, 9, 11], [1, 3, 6, 20], [1, 3, 7, 8, 11], [1, 3, 7, 9, 10], [1, 3, 7, 19], [1, 3, 8, 18], [1, 3, 9, 17], [1, 3, 10, 16], [1, 3, 11, 15], [1, 3, 12, 14], [1, 4, 5, 6, 14], [1, 4, 5, 7, 13], [1, 4, 5, 8, 12], [1, 4, 5, 9, 11], [1, 4, 5, 20], [1, 4, 6, 7, 12], [1, 4, 6, 8, 11], [1, 4, 6, 9, 10], [1, 4, 6, 19], [1, 4, 7, 8, 10], [1, 4, 7, 18], [1, 4, 8, 17], [1, 4, 9, 16], [1, 4, 10, 15], [1, 4, 11, 14], [1, 4, 12, 13], [1, 5, 6, 7, 11], [1, 5, 6, 8, 10], [1, 5, 6, 18], [1, 5, 7, 8, 9], [1, 5, 7, 17], [1, 5, 8, 16], [1, 5, 9, 15], [1, 5, 10, 14], [1, 5, 11, 13], [1, 6, 7, 16], [1, 6, 8, 15], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 8, 9, 12], [1, 8, 10, 11], [1, 9, 20], [1, 10, 19], [1, 11, 18], [1, 12, 17], [1, 13, 16], [1, 14, 15], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 16], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 15], [2, 3, 4, 7, 14], [2, 3, 4, 8, 13], [2, 3, 4, 9, 12], [2, 3, 4, 10, 11], [2, 3, 5, 6, 14], [2, 3, 5, 7, 13], [2, 3, 5, 8, 12], [2, 3, 5, 9, 11], [2, 3, 5, 20], [2, 3, 6, 7, 12], [2, 3, 6, 8, 11], [2, 3, 6, 9, 10], [2, 3, 6, 19], [2, 3, 7, 8, 10], [2, 3, 7, 18], [2, 3, 8, 17], [2, 3, 9, 16], [2, 3, 10, 15], [2, 3, 11, 14], [2, 3, 12, 13], [2, 4, 5, 6, 13], [2, 4, 5, 7, 12], [2, 4, 5, 8, 11], [2, 4, 5, 9, 10], [2, 4, 5, 19], [2, 4, 6, 7, 11], [2, 4, 6, 8, 10], [2, 4, 6, 18], [2, 4, 7, 8, 9], [2, 4, 7, 17], [2, 4, 8, 16], [2, 4, 9, 15], [2, 4, 10, 14], [2, 4, 11, 13], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 6, 17], [2, 5, 7, 16], [2, 5, 8, 15], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 6, 7, 15], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 8, 9, 11], [2, 8, 20], [2, 9, 19], [2, 10, 18], [2, 11, 17], [2, 12, 16], [2, 13, 15], [3, 4, 5, 6, 12], [3, 4, 5, 7, 11], [3, 4, 5, 8, 10], [3, 4, 5, 18], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 6, 17], [3, 4, 7, 16], [3, 4, 8, 15], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 5, 6, 7, 9], [3, 5, 6, 16], [3, 5, 7, 15], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 7, 8, 12], [3, 7, 9, 11], [3, 7, 20], [3, 8, 9, 10], [3, 8, 19], [3, 9, 18], [3, 10, 17], [3, 11, 16], [3, 12, 15], [3, 13, 14], [4, 5, 6, 7, 8], [4, 5, 6, 15], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 6, 20], [4, 7, 8, 11], [4, 7, 9, 10], [4, 7, 19], [4, 8, 18], [4, 9, 17], [4, 10, 16], [4, 11, 15], [4, 12, 14], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 6, 19], [5, 7, 8, 10], [5, 7, 18], [5, 8, 17], [5, 9, 16], [5, 10, 15], [5, 11, 14], [5, 12, 13], [6, 7, 8, 9], [6, 7, 17], [6, 8, 16], [6, 9, 15], [6, 10, 14], [6, 11, 13], [7, 8, 15], [7, 9, 14], [7, 10, 13], [7, 11, 12], [8, 9, 13], [8, 10, 12], [9, 10, 11], [10, 20], [11, 19], [12, 18], [13, 17], [14, 16]]\n assert candidate(candidates = [2, 3, 6, 7, 1, 5, 8],target = 15) == [[1, 2, 5, 7], [1, 3, 5, 6], [1, 6, 8], [2, 5, 8], [2, 6, 7], [3, 5, 7], [7, 8]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 15) == [[1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 10], [1, 5, 9], [1, 6, 8], [2, 3, 4, 6], [2, 3, 10], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6], [5, 10], [6, 9], [7, 8]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 3, 4, 8, 2, 5, 10, 10],target = 12) == [[1, 1, 2, 2, 6], [1, 1, 2, 3, 5], [1, 1, 2, 8], [1, 1, 3, 7], [1, 1, 4, 6], [1, 1, 5, 5], [1, 1, 10], [1, 2, 2, 3, 4], [1, 2, 2, 7], [1, 2, 3, 6], [1, 2, 4, 5], [1, 3, 8], [1, 4, 7], [1, 5, 6], [2, 2, 3, 5], [2, 2, 8], [2, 3, 7], [2, 4, 6], [2, 5, 5], [2, 10], [3, 4, 5], [4, 8], [5, 7]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 17) == [[1, 2, 3, 4, 7], [1, 2, 3, 5, 6], [1, 2, 4, 10], [1, 2, 5, 9], [1, 2, 6, 8], [1, 3, 4, 9], [1, 3, 5, 8], [1, 3, 6, 7], [1, 4, 5, 7], [1, 6, 10], [1, 7, 9], [2, 3, 4, 8], [2, 3, 5, 7], [2, 4, 5, 6], [2, 5, 10], [2, 6, 9], [2, 7, 8], [3, 4, 10], [3, 5, 9], [3, 6, 8], [4, 5, 8], [4, 6, 7], [7, 10], [8, 9]]\n assert candidate(candidates = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15],target = 30) == [[1, 2, 2, 3, 3, 4, 4, 5, 6], [1, 2, 2, 3, 3, 4, 4, 11], [1, 2, 2, 3, 3, 4, 5, 10], [1, 2, 2, 3, 3, 4, 6, 9], [1, 2, 2, 3, 3, 4, 7, 8], [1, 2, 2, 3, 3, 4, 15], [1, 2, 2, 3, 3, 5, 5, 9], [1, 2, 2, 3, 3, 5, 6, 8], [1, 2, 2, 3, 3, 5, 7, 7], [1, 2, 2, 3, 3, 5, 14], [1, 2, 2, 3, 3, 6, 6, 7], [1, 2, 2, 3, 3, 6, 13], [1, 2, 2, 3, 3, 7, 12], [1, 2, 2, 3, 3, 8, 11], [1, 2, 2, 3, 3, 9, 10], [1, 2, 2, 3, 4, 4, 5, 9], [1, 2, 2, 3, 4, 4, 6, 8], [1, 2, 2, 3, 4, 4, 7, 7], [1, 2, 2, 3, 4, 4, 14], [1, 2, 2, 3, 4, 5, 5, 8], [1, 2, 2, 3, 4, 5, 6, 7], [1, 2, 2, 3, 4, 5, 13], [1, 2, 2, 3, 4, 6, 12], [1, 2, 2, 3, 4, 7, 11], [1, 2, 2, 3, 4, 8, 10], [1, 2, 2, 3, 4, 9, 9], [1, 2, 2, 3, 5, 5, 6, 6], [1, 2, 2, 3, 5, 5, 12], [1, 2, 2, 3, 5, 6, 11], [1, 2, 2, 3, 5, 7, 10], [1, 2, 2, 3, 5, 8, 9], [1, 2, 2, 3, 6, 6, 10], [1, 2, 2, 3, 6, 7, 9], [1, 2, 2, 3, 6, 8, 8], [1, 2, 2, 3, 7, 7, 8], [1, 2, 2, 3, 7, 15], [1, 2, 2, 3, 8, 14], [1, 2, 2, 3, 9, 13], [1, 2, 2, 3, 10, 12], [1, 2, 2, 3, 11, 11], [1, 2, 2, 4, 4, 5, 5, 7], [1, 2, 2, 4, 4, 5, 6, 6], [1, 2, 2, 4, 4, 5, 12], [1, 2, 2, 4, 4, 6, 11], [1, 2, 2, 4, 4, 7, 10], [1, 2, 2, 4, 4, 8, 9], [1, 2, 2, 4, 5, 5, 11], [1, 2, 2, 4, 5, 6, 10], [1, 2, 2, 4, 5, 7, 9], [1, 2, 2, 4, 5, 8, 8], [1, 2, 2, 4, 6, 6, 9], [1, 2, 2, 4, 6, 7, 8], [1, 2, 2, 4, 6, 15], [1, 2, 2, 4, 7, 14], [1, 2, 2, 4, 8, 13], [1, 2, 2, 4, 9, 12], [1, 2, 2, 4, 10, 11], [1, 2, 2, 5, 5, 6, 9], [1, 2, 2, 5, 5, 7, 8], [1, 2, 2, 5, 5, 15], [1, 2, 2, 5, 6, 6, 8], [1, 2, 2, 5, 6, 7, 7], [1, 2, 2, 5, 6, 14], [1, 2, 2, 5, 7, 13], [1, 2, 2, 5, 8, 12], [1, 2, 2, 5, 9, 11], [1, 2, 2, 5, 10, 10], [1, 2, 2, 6, 6, 13], [1, 2, 2, 6, 7, 12], [1, 2, 2, 6, 8, 11], [1, 2, 2, 6, 9, 10], [1, 2, 2, 7, 7, 11], [1, 2, 2, 7, 8, 10], [1, 2, 2, 7, 9, 9], [1, 2, 2, 8, 8, 9], [1, 2, 2, 10, 15], [1, 2, 2, 11, 14], [1, 2, 2, 12, 13], [1, 2, 3, 3, 4, 4, 5, 8], [1, 2, 3, 3, 4, 4, 6, 7], [1, 2, 3, 3, 4, 4, 13], [1, 2, 3, 3, 4, 5, 5, 7], [1, 2, 3, 3, 4, 5, 6, 6], [1, 2, 3, 3, 4, 5, 12], [1, 2, 3, 3, 4, 6, 11], [1, 2, 3, 3, 4, 7, 10], [1, 2, 3, 3, 4, 8, 9], [1, 2, 3, 3, 5, 5, 11], [1, 2, 3, 3, 5, 6, 10], [1, 2, 3, 3, 5, 7, 9], [1, 2, 3, 3, 5, 8, 8], [1, 2, 3, 3, 6, 6, 9], [1, 2, 3, 3, 6, 7, 8], [1, 2, 3, 3, 6, 15], [1, 2, 3, 3, 7, 14], [1, 2, 3, 3, 8, 13], [1, 2, 3, 3, 9, 12], [1, 2, 3, 3, 10, 11], [1, 2, 3, 4, 4, 5, 5, 6], [1, 2, 3, 4, 4, 5, 11], [1, 2, 3, 4, 4, 6, 10], [1, 2, 3, 4, 4, 7, 9], [1, 2, 3, 4, 4, 8, 8], [1, 2, 3, 4, 5, 5, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 15], [1, 2, 3, 4, 6, 6, 8], [1, 2, 3, 4, 6, 7, 7], [1, 2, 3, 4, 6, 14], [1, 2, 3, 4, 7, 13], [1, 2, 3, 4, 8, 12], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 10, 10], [1, 2, 3, 5, 5, 6, 8], [1, 2, 3, 5, 5, 7, 7], [1, 2, 3, 5, 5, 14], [1, 2, 3, 5, 6, 6, 7], [1, 2, 3, 5, 6, 13], [1, 2, 3, 5, 7, 12], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 9, 10], [1, 2, 3, 6, 6, 12], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 9, 9], [1, 2, 3, 7, 7, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 9, 15], [1, 2, 3, 10, 14], [1, 2, 3, 11, 13], [1, 2, 3, 12, 12], [1, 2, 4, 4, 5, 5, 9], [1, 2, 4, 4, 5, 6, 8], [1, 2, 4, 4, 5, 7, 7], [1, 2, 4, 4, 5, 14], [1, 2, 4, 4, 6, 6, 7], [1, 2, 4, 4, 6, 13], [1, 2, 4, 4, 7, 12], [1, 2, 4, 4, 8, 11], [1, 2, 4, 4, 9, 10], [1, 2, 4, 5, 5, 6, 7], [1, 2, 4, 5, 5, 13], [1, 2, 4, 5, 6, 12], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 9, 9], [1, 2, 4, 6, 6, 11], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 7, 7, 9], [1, 2, 4, 7, 8, 8], [1, 2, 4, 8, 15], [1, 2, 4, 9, 14], [1, 2, 4, 10, 13], [1, 2, 4, 11, 12], [1, 2, 5, 5, 6, 11], [1, 2, 5, 5, 7, 10], [1, 2, 5, 5, 8, 9], [1, 2, 5, 6, 6, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 8, 8], [1, 2, 5, 7, 7, 8], [1, 2, 5, 7, 15], [1, 2, 5, 8, 14], [1, 2, 5, 9, 13], [1, 2, 5, 10, 12], [1, 2, 5, 11, 11], [1, 2, 6, 6, 7, 8], [1, 2, 6, 6, 15], [1, 2, 6, 7, 14], [1, 2, 6, 8, 13], [1, 2, 6, 9, 12], [1, 2, 6, 10, 11], [1, 2, 7, 7, 13], [1, 2, 7, 8, 12], [1, 2, 7, 9, 11], [1, 2, 7, 10, 10], [1, 2, 8, 8, 11], [1, 2, 8, 9, 10], [1, 2, 12, 15], [1, 2, 13, 14], [1, 3, 3, 4, 4, 5, 10], [1, 3, 3, 4, 4, 6, 9], [1, 3, 3, 4, 4, 7, 8], [1, 3, 3, 4, 4, 15], [1, 3, 3, 4, 5, 5, 9], [1, 3, 3, 4, 5, 6, 8], [1, 3, 3, 4, 5, 7, 7], [1, 3, 3, 4, 5, 14], [1, 3, 3, 4, 6, 6, 7], [1, 3, 3, 4, 6, 13], [1, 3, 3, 4, 7, 12], [1, 3, 3, 4, 8, 11], [1, 3, 3, 4, 9, 10], [1, 3, 3, 5, 5, 6, 7], [1, 3, 3, 5, 5, 13], [1, 3, 3, 5, 6, 12], [1, 3, 3, 5, 7, 11], [1, 3, 3, 5, 8, 10], [1, 3, 3, 5, 9, 9], [1, 3, 3, 6, 6, 11], [1, 3, 3, 6, 7, 10], [1, 3, 3, 6, 8, 9], [1, 3, 3, 7, 7, 9], [1, 3, 3, 7, 8, 8], [1, 3, 3, 8, 15], [1, 3, 3, 9, 14], [1, 3, 3, 10, 13], [1, 3, 3, 11, 12], [1, 3, 4, 4, 5, 5, 8], [1, 3, 4, 4, 5, 6, 7], [1, 3, 4, 4, 5, 13], [1, 3, 4, 4, 6, 12], [1, 3, 4, 4, 7, 11], [1, 3, 4, 4, 8, 10], [1, 3, 4, 4, 9, 9], [1, 3, 4, 5, 5, 6, 6], [1, 3, 4, 5, 5, 12], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 6, 6, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 8, 8], [1, 3, 4, 7, 7, 8], [1, 3, 4, 7, 15], [1, 3, 4, 8, 14], [1, 3, 4, 9, 13], [1, 3, 4, 10, 12], [1, 3, 4, 11, 11], [1, 3, 5, 5, 6, 10], [1, 3, 5, 5, 7, 9], [1, 3, 5, 5, 8, 8], [1, 3, 5, 6, 6, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 15], [1, 3, 5, 7, 14], [1, 3, 5, 8, 13], [1, 3, 5, 9, 12], [1, 3, 5, 10, 11], [1, 3, 6, 6, 7, 7], [1, 3, 6, 6, 14], [1, 3, 6, 7, 13], [1, 3, 6, 8, 12], [1, 3, 6, 9, 11], [1, 3, 6, 10, 10], [1, 3, 7, 7, 12], [1, 3, 7, 8, 11], [1, 3, 7, 9, 10], [1, 3, 8, 8, 10], [1, 3, 8, 9, 9], [1, 3, 11, 15], [1, 3, 12, 14], [1, 3, 13, 13], [1, 4, 4, 5, 5, 11], [1, 4, 4, 5, 6, 10], [1, 4, 4, 5, 7, 9], [1, 4, 4, 5, 8, 8], [1, 4, 4, 6, 6, 9], [1, 4, 4, 6, 7, 8], [1, 4, 4, 6, 15], [1, 4, 4, 7, 14], [1, 4, 4, 8, 13], [1, 4, 4, 9, 12], [1, 4, 4, 10, 11], [1, 4, 5, 5, 6, 9], [1, 4, 5, 5, 7, 8], [1, 4, 5, 5, 15], [1, 4, 5, 6, 6, 8], [1, 4, 5, 6, 7, 7], [1, 4, 5, 6, 14], [1, 4, 5, 7, 13], [1, 4, 5, 8, 12], [1, 4, 5, 9, 11], [1, 4, 5, 10, 10], [1, 4, 6, 6, 13], [1, 4, 6, 7, 12], [1, 4, 6, 8, 11], [1, 4, 6, 9, 10], [1, 4, 7, 7, 11], [1, 4, 7, 8, 10], [1, 4, 7, 9, 9], [1, 4, 8, 8, 9], [1, 4, 10, 15], [1, 4, 11, 14], [1, 4, 12, 13], [1, 5, 5, 6, 6, 7], [1, 5, 5, 6, 13], [1, 5, 5, 7, 12], [1, 5, 5, 8, 11], [1, 5, 5, 9, 10], [1, 5, 6, 6, 12], [1, 5, 6, 7, 11], [1, 5, 6, 8, 10], [1, 5, 6, 9, 9], [1, 5, 7, 7, 10], [1, 5, 7, 8, 9], [1, 5, 9, 15], [1, 5, 10, 14], [1, 5, 11, 13], [1, 5, 12, 12], [1, 6, 6, 7, 10], [1, 6, 6, 8, 9], [1, 6, 7, 7, 9], [1, 6, 7, 8, 8], [1, 6, 8, 15], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 7, 7, 15], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 7, 11, 11], [1, 8, 8, 13], [1, 8, 9, 12], [1, 8, 10, 11], [1, 9, 9, 11], [1, 9, 10, 10], [1, 14, 15], [2, 2, 3, 3, 4, 4, 5, 7], [2, 2, 3, 3, 4, 4, 6, 6], [2, 2, 3, 3, 4, 4, 12], [2, 2, 3, 3, 4, 5, 5, 6], [2, 2, 3, 3, 4, 5, 11], [2, 2, 3, 3, 4, 6, 10], [2, 2, 3, 3, 4, 7, 9], [2, 2, 3, 3, 4, 8, 8], [2, 2, 3, 3, 5, 5, 10], [2, 2, 3, 3, 5, 6, 9], [2, 2, 3, 3, 5, 7, 8], [2, 2, 3, 3, 5, 15], [2, 2, 3, 3, 6, 6, 8], [2, 2, 3, 3, 6, 7, 7], [2, 2, 3, 3, 6, 14], [2, 2, 3, 3, 7, 13], [2, 2, 3, 3, 8, 12], [2, 2, 3, 3, 9, 11], [2, 2, 3, 3, 10, 10], [2, 2, 3, 4, 4, 5, 10], [2, 2, 3, 4, 4, 6, 9], [2, 2, 3, 4, 4, 7, 8], [2, 2, 3, 4, 4, 15], [2, 2, 3, 4, 5, 5, 9], [2, 2, 3, 4, 5, 6, 8], [2, 2, 3, 4, 5, 7, 7], [2, 2, 3, 4, 5, 14], [2, 2, 3, 4, 6, 6, 7], [2, 2, 3, 4, 6, 13], [2, 2, 3, 4, 7, 12], [2, 2, 3, 4, 8, 11], [2, 2, 3, 4, 9, 10], [2, 2, 3, 5, 5, 6, 7], [2, 2, 3, 5, 5, 13], [2, 2, 3, 5, 6, 12], [2, 2, 3, 5, 7, 11], [2, 2, 3, 5, 8, 10], [2, 2, 3, 5, 9, 9], [2, 2, 3, 6, 6, 11], [2, 2, 3, 6, 7, 10], [2, 2, 3, 6, 8, 9], [2, 2, 3, 7, 7, 9], [2, 2, 3, 7, 8, 8], [2, 2, 3, 8, 15], [2, 2, 3, 9, 14], [2, 2, 3, 10, 13], [2, 2, 3, 11, 12], [2, 2, 4, 4, 5, 5, 8], [2, 2, 4, 4, 5, 6, 7], [2, 2, 4, 4, 5, 13], [2, 2, 4, 4, 6, 12], [2, 2, 4, 4, 7, 11], [2, 2, 4, 4, 8, 10], [2, 2, 4, 4, 9, 9], [2, 2, 4, 5, 5, 6, 6], [2, 2, 4, 5, 5, 12], [2, 2, 4, 5, 6, 11], [2, 2, 4, 5, 7, 10], [2, 2, 4, 5, 8, 9], [2, 2, 4, 6, 6, 10], [2, 2, 4, 6, 7, 9], [2, 2, 4, 6, 8, 8], [2, 2, 4, 7, 7, 8], [2, 2, 4, 7, 15], [2, 2, 4, 8, 14], [2, 2, 4, 9, 13], [2, 2, 4, 10, 12], [2, 2, 4, 11, 11], [2, 2, 5, 5, 6, 10], [2, 2, 5, 5, 7, 9], [2, 2, 5, 5, 8, 8], [2, 2, 5, 6, 6, 9], [2, 2, 5, 6, 7, 8], [2, 2, 5, 6, 15], [2, 2, 5, 7, 14], [2, 2, 5, 8, 13], [2, 2, 5, 9, 12], [2, 2, 5, 10, 11], [2, 2, 6, 6, 7, 7], [2, 2, 6, 6, 14], [2, 2, 6, 7, 13], [2, 2, 6, 8, 12], [2, 2, 6, 9, 11], [2, 2, 6, 10, 10], [2, 2, 7, 7, 12], [2, 2, 7, 8, 11], [2, 2, 7, 9, 10], [2, 2, 8, 8, 10], [2, 2, 8, 9, 9], [2, 2, 11, 15], [2, 2, 12, 14], [2, 2, 13, 13], [2, 3, 3, 4, 4, 5, 9], [2, 3, 3, 4, 4, 6, 8], [2, 3, 3, 4, 4, 7, 7], [2, 3, 3, 4, 4, 14], [2, 3, 3, 4, 5, 5, 8], [2, 3, 3, 4, 5, 6, 7], [2, 3, 3, 4, 5, 13], [2, 3, 3, 4, 6, 12], [2, 3, 3, 4, 7, 11], [2, 3, 3, 4, 8, 10], [2, 3, 3, 4, 9, 9], [2, 3, 3, 5, 5, 6, 6], [2, 3, 3, 5, 5, 12], [2, 3, 3, 5, 6, 11], [2, 3, 3, 5, 7, 10], [2, 3, 3, 5, 8, 9], [2, 3, 3, 6, 6, 10], [2, 3, 3, 6, 7, 9], [2, 3, 3, 6, 8, 8], [2, 3, 3, 7, 7, 8], [2, 3, 3, 7, 15], [2, 3, 3, 8, 14], [2, 3, 3, 9, 13], [2, 3, 3, 10, 12], [2, 3, 3, 11, 11], [2, 3, 4, 4, 5, 5, 7], [2, 3, 4, 4, 5, 6, 6], [2, 3, 4, 4, 5, 12], [2, 3, 4, 4, 6, 11], [2, 3, 4, 4, 7, 10], [2, 3, 4, 4, 8, 9], [2, 3, 4, 5, 5, 11], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 8, 8], [2, 3, 4, 6, 6, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 15], [2, 3, 4, 7, 14], [2, 3, 4, 8, 13], [2, 3, 4, 9, 12], [2, 3, 4, 10, 11], [2, 3, 5, 5, 6, 9], [2, 3, 5, 5, 7, 8], [2, 3, 5, 5, 15], [2, 3, 5, 6, 6, 8], [2, 3, 5, 6, 7, 7], [2, 3, 5, 6, 14], [2, 3, 5, 7, 13], [2, 3, 5, 8, 12], [2, 3, 5, 9, 11], [2, 3, 5, 10, 10], [2, 3, 6, 6, 13], [2, 3, 6, 7, 12], [2, 3, 6, 8, 11], [2, 3, 6, 9, 10], [2, 3, 7, 7, 11], [2, 3, 7, 8, 10], [2, 3, 7, 9, 9], [2, 3, 8, 8, 9], [2, 3, 10, 15], [2, 3, 11, 14], [2, 3, 12, 13], [2, 4, 4, 5, 5, 10], [2, 4, 4, 5, 6, 9], [2, 4, 4, 5, 7, 8], [2, 4, 4, 5, 15], [2, 4, 4, 6, 6, 8], [2, 4, 4, 6, 7, 7], [2, 4, 4, 6, 14], [2, 4, 4, 7, 13], [2, 4, 4, 8, 12], [2, 4, 4, 9, 11], [2, 4, 4, 10, 10], [2, 4, 5, 5, 6, 8], [2, 4, 5, 5, 7, 7], [2, 4, 5, 5, 14], [2, 4, 5, 6, 6, 7], [2, 4, 5, 6, 13], [2, 4, 5, 7, 12], [2, 4, 5, 8, 11], [2, 4, 5, 9, 10], [2, 4, 6, 6, 12], [2, 4, 6, 7, 11], [2, 4, 6, 8, 10], [2, 4, 6, 9, 9], [2, 4, 7, 7, 10], [2, 4, 7, 8, 9], [2, 4, 9, 15], [2, 4, 10, 14], [2, 4, 11, 13], [2, 4, 12, 12], [2, 5, 5, 6, 12], [2, 5, 5, 7, 11], [2, 5, 5, 8, 10], [2, 5, 5, 9, 9], [2, 5, 6, 6, 11], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 7, 7, 9], [2, 5, 7, 8, 8], [2, 5, 8, 15], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 6, 6, 7, 9], [2, 6, 6, 8, 8], [2, 6, 7, 7, 8], [2, 6, 7, 15], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 6, 11, 11], [2, 7, 7, 14], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 8, 8, 12], [2, 8, 9, 11], [2, 8, 10, 10], [2, 9, 9, 10], [2, 13, 15], [2, 14, 14], [3, 3, 4, 4, 5, 5, 6], [3, 3, 4, 4, 5, 11], [3, 3, 4, 4, 6, 10], [3, 3, 4, 4, 7, 9], [3, 3, 4, 4, 8, 8], [3, 3, 4, 5, 5, 10], [3, 3, 4, 5, 6, 9], [3, 3, 4, 5, 7, 8], [3, 3, 4, 5, 15], [3, 3, 4, 6, 6, 8], [3, 3, 4, 6, 7, 7], [3, 3, 4, 6, 14], [3, 3, 4, 7, 13], [3, 3, 4, 8, 12], [3, 3, 4, 9, 11], [3, 3, 4, 10, 10], [3, 3, 5, 5, 6, 8], [3, 3, 5, 5, 7, 7], [3, 3, 5, 5, 14], [3, 3, 5, 6, 6, 7], [3, 3, 5, 6, 13], [3, 3, 5, 7, 12], [3, 3, 5, 8, 11], [3, 3, 5, 9, 10], [3, 3, 6, 6, 12], [3, 3, 6, 7, 11], [3, 3, 6, 8, 10], [3, 3, 6, 9, 9], [3, 3, 7, 7, 10], [3, 3, 7, 8, 9], [3, 3, 9, 15], [3, 3, 10, 14], [3, 3, 11, 13], [3, 3, 12, 12], [3, 4, 4, 5, 5, 9], [3, 4, 4, 5, 6, 8], [3, 4, 4, 5, 7, 7], [3, 4, 4, 5, 14], [3, 4, 4, 6, 6, 7], [3, 4, 4, 6, 13], [3, 4, 4, 7, 12], [3, 4, 4, 8, 11], [3, 4, 4, 9, 10], [3, 4, 5, 5, 6, 7], [3, 4, 5, 5, 13], [3, 4, 5, 6, 12], [3, 4, 5, 7, 11], [3, 4, 5, 8, 10], [3, 4, 5, 9, 9], [3, 4, 6, 6, 11], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 7, 7, 9], [3, 4, 7, 8, 8], [3, 4, 8, 15], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 5, 5, 6, 11], [3, 5, 5, 7, 10], [3, 5, 5, 8, 9], [3, 5, 6, 6, 10], [3, 5, 6, 7, 9], [3, 5, 6, 8, 8], [3, 5, 7, 7, 8], [3, 5, 7, 15], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 5, 11, 11], [3, 6, 6, 7, 8], [3, 6, 6, 15], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 7, 7, 13], [3, 7, 8, 12], [3, 7, 9, 11], [3, 7, 10, 10], [3, 8, 8, 11], [3, 8, 9, 10], [3, 12, 15], [3, 13, 14], [4, 4, 5, 5, 6, 6], [4, 4, 5, 5, 12], [4, 4, 5, 6, 11], [4, 4, 5, 7, 10], [4, 4, 5, 8, 9], [4, 4, 6, 6, 10], [4, 4, 6, 7, 9], [4, 4, 6, 8, 8], [4, 4, 7, 7, 8], [4, 4, 7, 15], [4, 4, 8, 14], [4, 4, 9, 13], [4, 4, 10, 12], [4, 4, 11, 11], [4, 5, 5, 6, 10], [4, 5, 5, 7, 9], [4, 5, 5, 8, 8], [4, 5, 6, 6, 9], [4, 5, 6, 7, 8], [4, 5, 6, 15], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 6, 6, 7, 7], [4, 6, 6, 14], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 6, 10, 10], [4, 7, 7, 12], [4, 7, 8, 11], [4, 7, 9, 10], [4, 8, 8, 10], [4, 8, 9, 9], [4, 11, 15], [4, 12, 14], [4, 13, 13], [5, 5, 6, 6, 8], [5, 5, 6, 7, 7], [5, 5, 6, 14], [5, 5, 7, 13], [5, 5, 8, 12], [5, 5, 9, 11], [5, 5, 10, 10], [5, 6, 6, 13], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 7, 7, 11], [5, 7, 8, 10], [5, 7, 9, 9], [5, 8, 8, 9], [5, 10, 15], [5, 11, 14], [5, 12, 13], [6, 6, 7, 11], [6, 6, 8, 10], [6, 6, 9, 9], [6, 7, 7, 10], [6, 7, 8, 9], [6, 9, 15], [6, 10, 14], [6, 11, 13], [6, 12, 12], [7, 7, 8, 8], [7, 8, 15], [7, 9, 14], [7, 10, 13], [7, 11, 12], [8, 8, 14], [8, 9, 13], [8, 10, 12], [8, 11, 11], [9, 9, 12], [9, 10, 11], [15, 15]]\n assert candidate(candidates = [10, 10, 10, 10, 5, 5, 5, 5, 1, 1, 1, 1],target = 25) == [[5, 5, 5, 10], [5, 10, 10]]\n assert candidate(candidates = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],target = 8) == [[4, 4]]\n assert candidate(candidates = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 10) == [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 3, 4, 8],target = 15) == [[1, 1, 2, 3, 8], [1, 1, 2, 4, 7], [1, 1, 2, 5, 6], [1, 1, 3, 4, 6], [1, 1, 3, 10], [1, 1, 5, 8], [1, 1, 6, 7], [1, 2, 3, 4, 5], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 10], [1, 6, 8], [2, 3, 4, 6], [2, 3, 10], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6], [5, 10], [7, 8]]\n assert candidate(candidates = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],target = 15) == [[1, 1, 2, 2, 3, 6], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 9], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 8], [1, 1, 2, 4, 7], [1, 1, 2, 5, 6], [1, 1, 3, 3, 7], [1, 1, 3, 4, 6], [1, 1, 3, 5, 5], [1, 1, 3, 10], [1, 1, 4, 4, 5], [1, 1, 4, 9], [1, 1, 5, 8], [1, 1, 6, 7], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 7], [1, 2, 2, 4, 6], [1, 2, 2, 5, 5], [1, 2, 2, 10], [1, 2, 3, 3, 6], [1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 2, 6, 6], [1, 3, 3, 4, 4], [1, 3, 3, 8], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 4, 6], [1, 4, 5, 5], [1, 4, 10], [1, 5, 9], [1, 6, 8], [1, 7, 7], [2, 2, 3, 3, 5], [2, 2, 3, 4, 4], [2, 2, 3, 8], [2, 2, 4, 7], [2, 2, 5, 6], [2, 3, 3, 7], [2, 3, 4, 6], [2, 3, 5, 5], [2, 3, 10], [2, 4, 4, 5], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 3, 4, 5], [3, 3, 9], [3, 4, 8], [3, 5, 7], [3, 6, 6], [4, 4, 7], [4, 5, 6], [5, 10], [6, 9], [7, 8]]\n assert candidate(candidates = [15, 10, 5, 7, 3, 2, 2, 1, 1],target = 18) == [[1, 1, 2, 2, 5, 7], [1, 2, 2, 3, 10], [1, 2, 3, 5, 7], [1, 2, 5, 10], [1, 2, 15], [1, 7, 10], [3, 5, 10], [3, 15]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 3, 8, 4, 9],target = 10) == [[1, 1, 2, 6], [1, 1, 3, 5], [1, 1, 8], [1, 2, 3, 4], [1, 2, 7], [1, 3, 6], [1, 4, 5], [1, 9], [2, 3, 5], [2, 8], [3, 7], [4, 6], [10]]\n assert candidate(candidates = [1, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9],target = 10) == [[1, 2, 2, 2, 3], [1, 2, 2, 5], [1, 2, 3, 4], [1, 2, 7], [1, 3, 6], [1, 4, 5], [1, 9], [2, 2, 2, 4], [2, 2, 6], [2, 3, 5], [2, 8], [3, 7], [4, 6]]\n assert candidate(candidates = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 25) == [[5, 5, 5, 5, 5]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 25) == [[1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 5, 6, 8], [1, 2, 3, 9, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 8, 10], [1, 2, 5, 7, 10], [1, 2, 5, 8, 9], [1, 2, 6, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 8, 9], [1, 3, 5, 6, 10], [1, 3, 5, 7, 9], [1, 3, 6, 7, 8], [1, 4, 5, 6, 9], [1, 4, 5, 7, 8], [1, 5, 9, 10], [1, 6, 8, 10], [1, 7, 8, 9], [2, 3, 4, 6, 10], [2, 3, 4, 7, 9], [2, 3, 5, 6, 9], [2, 3, 5, 7, 8], [2, 4, 5, 6, 8], [2, 4, 9, 10], [2, 5, 8, 10], [2, 6, 7, 10], [2, 6, 8, 9], [3, 4, 5, 6, 7], [3, 4, 8, 10], [3, 5, 7, 10], [3, 5, 8, 9], [3, 6, 7, 9], [4, 5, 6, 10], [4, 5, 7, 9], [4, 6, 7, 8], [6, 9, 10], [7, 8, 10]]\n assert candidate(candidates = [7, 6, 5, 4, 3, 2, 1],target = 15) == [[1, 2, 3, 4, 5], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [2, 3, 4, 6], [2, 6, 7], [3, 5, 7], [4, 5, 6]]\n assert candidate(candidates = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],target = 10) == [[1, 1, 2, 2, 4], [1, 1, 2, 3, 3], [1, 1, 3, 5], [1, 1, 4, 4], [1, 2, 2, 5], [1, 2, 3, 4], [1, 4, 5], [2, 2, 3, 3], [2, 3, 5], [2, 4, 4], [3, 3, 4], [5, 5]]\n assert candidate(candidates = [1, 3, 2, 5, 4, 2, 2],target = 10) == [[1, 2, 2, 2, 3], [1, 2, 2, 5], [1, 2, 3, 4], [1, 4, 5], [2, 2, 2, 4], [2, 3, 5]]\n assert candidate(candidates = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],target = 20) == [[4, 4, 4, 4, 4]]\n assert candidate(candidates = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 10, 10], [1, 2, 3, 5, 9, 10], [1, 2, 3, 6, 8, 10], [1, 2, 3, 7, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 5, 6, 7, 9], [1, 2, 7, 10, 10], [1, 2, 8, 9, 10], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 6, 7, 9], [1, 3, 5, 6, 7, 8], [1, 3, 6, 10, 10], [1, 3, 7, 9, 10], [1, 4, 5, 10, 10], [1, 4, 6, 9, 10], [1, 4, 7, 8, 10], [1, 5, 6, 8, 10], [1, 5, 7, 8, 9], [1, 9, 10, 10], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 6, 7, 8], [2, 3, 5, 10, 10], [2, 3, 6, 9, 10], [2, 3, 7, 8, 10], [2, 4, 5, 9, 10], [2, 4, 6, 8, 10], [2, 4, 7, 8, 9], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 8, 10, 10], [3, 4, 5, 8, 10], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 5, 6, 7, 9], [3, 7, 10, 10], [3, 8, 9, 10], [4, 5, 6, 7, 8], [4, 6, 10, 10], [4, 7, 9, 10], [5, 6, 9, 10], [5, 7, 8, 10], [6, 7, 8, 9], [10, 10, 10]]\n assert candidate(candidates = [2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5],target = 11) == [[2, 2, 2, 2, 3], [2, 2, 2, 5], [2, 2, 3, 4], [2, 3, 3, 3], [2, 4, 5], [3, 3, 5], [3, 4, 4]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 3, 4, 2, 3, 1, 5],target = 15) == [[1, 1, 1, 2, 2, 3, 5], [1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 2, 3, 7], [1, 1, 1, 2, 4, 6], [1, 1, 1, 2, 5, 5], [1, 1, 1, 2, 10], [1, 1, 1, 3, 3, 6], [1, 1, 1, 3, 4, 5], [1, 1, 1, 5, 7], [1, 1, 2, 2, 3, 6], [1, 1, 2, 2, 4, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 4, 7], [1, 1, 2, 5, 6], [1, 1, 3, 3, 7], [1, 1, 3, 4, 6], [1, 1, 3, 5, 5], [1, 1, 3, 10], [1, 1, 6, 7], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 7], [1, 2, 2, 4, 6], [1, 2, 2, 5, 5], [1, 2, 2, 10], [1, 2, 3, 3, 6], [1, 2, 3, 4, 5], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 5, 5], [1, 4, 10], [2, 2, 3, 3, 5], [2, 2, 4, 7], [2, 2, 5, 6], [2, 3, 3, 7], [2, 3, 4, 6], [2, 3, 5, 5], [2, 3, 10], [2, 6, 7], [3, 3, 4, 5], [3, 5, 7], [4, 5, 6], [5, 10]]\n assert candidate(candidates = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 28) == [[1, 3, 5, 19], [1, 3, 7, 17], [1, 3, 9, 15], [1, 3, 11, 13], [1, 5, 7, 15], [1, 5, 9, 13], [1, 7, 9, 11], [1, 27], [3, 5, 7, 13], [3, 5, 9, 11], [3, 25], [5, 23], [7, 21], [9, 19], [11, 17], [13, 15]]\n assert candidate(candidates = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5],target = 15) == [[1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 5, 5], [1, 2, 3, 4, 5], [1, 2, 4, 4, 4], [1, 3, 3, 3, 5], [1, 3, 3, 4, 4], [1, 4, 5, 5], [2, 2, 2, 3, 3, 3], [2, 2, 2, 4, 5], [2, 2, 3, 3, 5], [2, 2, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 5, 5], [2, 4, 4, 5], [3, 3, 4, 5], [3, 4, 4, 4], [5, 5, 5]]\n assert candidate(candidates = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],target = 20) == [[4, 4, 4, 4, 4]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 20) == [[1, 2, 3, 4, 10], [1, 2, 3, 5, 9], [1, 2, 3, 6, 8], [1, 2, 3, 14], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 2, 4, 13], [1, 2, 5, 12], [1, 2, 6, 11], [1, 2, 7, 10], [1, 2, 8, 9], [1, 3, 4, 5, 7], [1, 3, 4, 12], [1, 3, 5, 11], [1, 3, 6, 10], [1, 3, 7, 9], [1, 4, 5, 10], [1, 4, 6, 9], [1, 4, 7, 8], [1, 4, 15], [1, 5, 6, 8], [1, 5, 14], [1, 6, 13], [1, 7, 12], [1, 8, 11], [1, 9, 10], [2, 3, 4, 5, 6], [2, 3, 4, 11], [2, 3, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 3, 15], [2, 4, 5, 9], [2, 4, 6, 8], [2, 4, 14], [2, 5, 6, 7], [2, 5, 13], [2, 6, 12], [2, 7, 11], [2, 8, 10], [3, 4, 5, 8], [3, 4, 6, 7], [3, 4, 13], [3, 5, 12], [3, 6, 11], [3, 7, 10], [3, 8, 9], [4, 5, 11], [4, 6, 10], [4, 7, 9], [5, 6, 9], [5, 7, 8], [5, 15], [6, 14], [7, 13], [8, 12], [9, 11]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 3, 4, 8],target = 12) == [[1, 1, 2, 3, 5], [1, 1, 2, 8], [1, 1, 3, 7], [1, 1, 4, 6], [1, 1, 10], [1, 2, 3, 6], [1, 2, 4, 5], [1, 3, 8], [1, 4, 7], [1, 5, 6], [2, 3, 7], [2, 4, 6], [2, 10], [3, 4, 5], [4, 8], [5, 7]]\n assert candidate(candidates = [20, 15, 10, 5, 3, 7, 8, 12],target = 25) == [[3, 5, 7, 10], [3, 7, 15], [3, 10, 12], [5, 8, 12], [5, 20], [7, 8, 10], [10, 15]]\n assert candidate(candidates = [1, 3, 2, 6, 7, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1],target = 9) == [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 3], [1, 1, 1, 1, 1, 4], [1, 1, 1, 1, 2, 3], [1, 1, 1, 2, 4], [1, 1, 1, 6], [1, 1, 3, 4], [1, 1, 7], [1, 2, 6], [2, 3, 4], [2, 7], [3, 6]]\n assert candidate(candidates = [10, 1, 2, 7, 6, 1, 5, 3, 4],target = 10) == [[1, 1, 2, 6], [1, 1, 3, 5], [1, 2, 3, 4], [1, 2, 7], [1, 3, 6], [1, 4, 5], [2, 3, 5], [3, 7], [4, 6], [10]]\n assert candidate(candidates = [30, 20, 10, 5, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 15], [1, 2, 3, 4, 6, 14], [1, 2, 3, 4, 7, 13], [1, 2, 3, 4, 8, 12], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 10, 10], [1, 2, 3, 4, 20], [1, 2, 3, 5, 6, 13], [1, 2, 3, 5, 7, 12], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 9, 10], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 8, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 9, 15], [1, 2, 3, 10, 14], [1, 2, 3, 11, 13], [1, 2, 4, 5, 6, 12], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 8, 10], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 8, 15], [1, 2, 4, 9, 14], [1, 2, 4, 10, 13], [1, 2, 4, 11, 12], [1, 2, 5, 6, 7, 9], [1, 2, 5, 7, 15], [1, 2, 5, 8, 14], [1, 2, 5, 9, 13], [1, 2, 5, 10, 12], [1, 2, 6, 7, 14], [1, 2, 6, 8, 13], [1, 2, 6, 9, 12], [1, 2, 6, 10, 11], [1, 2, 7, 8, 12], [1, 2, 7, 9, 11], [1, 2, 7, 10, 10], [1, 2, 7, 20], [1, 2, 8, 9, 10], [1, 2, 12, 15], [1, 2, 13, 14], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 6, 7, 9], [1, 3, 4, 7, 15], [1, 3, 4, 8, 14], [1, 3, 4, 9, 13], [1, 3, 4, 10, 12], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 15], [1, 3, 5, 7, 14], [1, 3, 5, 8, 13], [1, 3, 5, 9, 12], [1, 3, 5, 10, 11], [1, 3, 6, 7, 13], [1, 3, 6, 8, 12], [1, 3, 6, 9, 11], [1, 3, 6, 10, 10], [1, 3, 6, 20], [1, 3, 7, 8, 11], [1, 3, 7, 9, 10], [1, 3, 11, 15], [1, 3, 12, 14], [1, 4, 5, 6, 14], [1, 4, 5, 7, 13], [1, 4, 5, 8, 12], [1, 4, 5, 9, 11], [1, 4, 5, 10, 10], [1, 4, 5, 20], [1, 4, 6, 7, 12], [1, 4, 6, 8, 11], [1, 4, 6, 9, 10], [1, 4, 7, 8, 10], [1, 4, 10, 15], [1, 4, 11, 14], [1, 4, 12, 13], [1, 5, 6, 7, 11], [1, 5, 6, 8, 10], [1, 5, 7, 8, 9], [1, 5, 9, 15], [1, 5, 10, 14], [1, 5, 11, 13], [1, 6, 8, 15], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 8, 9, 12], [1, 8, 10, 11], [1, 9, 10, 10], [1, 9, 20], [1, 14, 15], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 15], [2, 3, 4, 7, 14], [2, 3, 4, 8, 13], [2, 3, 4, 9, 12], [2, 3, 4, 10, 11], [2, 3, 5, 6, 14], [2, 3, 5, 7, 13], [2, 3, 5, 8, 12], [2, 3, 5, 9, 11], [2, 3, 5, 10, 10], [2, 3, 5, 20], [2, 3, 6, 7, 12], [2, 3, 6, 8, 11], [2, 3, 6, 9, 10], [2, 3, 7, 8, 10], [2, 3, 10, 15], [2, 3, 11, 14], [2, 3, 12, 13], [2, 4, 5, 6, 13], [2, 4, 5, 7, 12], [2, 4, 5, 8, 11], [2, 4, 5, 9, 10], [2, 4, 6, 7, 11], [2, 4, 6, 8, 10], [2, 4, 7, 8, 9], [2, 4, 9, 15], [2, 4, 10, 14], [2, 4, 11, 13], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 8, 15], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 6, 7, 15], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 8, 9, 11], [2, 8, 10, 10], [2, 8, 20], [2, 13, 15], [3, 4, 5, 6, 12], [3, 4, 5, 7, 11], [3, 4, 5, 8, 10], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 8, 15], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 5, 6, 7, 9], [3, 5, 7, 15], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 7, 8, 12], [3, 7, 9, 11], [3, 7, 10, 10], [3, 7, 20], [3, 8, 9, 10], [3, 12, 15], [3, 13, 14], [4, 5, 6, 7, 8], [4, 5, 6, 15], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 6, 10, 10], [4, 6, 20], [4, 7, 8, 11], [4, 7, 9, 10], [4, 11, 15], [4, 12, 14], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 7, 8, 10], [5, 10, 15], [5, 11, 14], [5, 12, 13], [6, 7, 8, 9], [6, 9, 15], [6, 10, 14], [6, 11, 13], [7, 8, 15], [7, 9, 14], [7, 10, 13], [7, 11, 12], [8, 9, 13], [8, 10, 12], [9, 10, 11], [10, 20], [30]]\n assert candidate(candidates = [1, 3, 2, 5, 4, 7, 6, 9, 8, 10],target = 15) == [[1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 10], [1, 5, 9], [1, 6, 8], [2, 3, 4, 6], [2, 3, 10], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6], [5, 10], [6, 9], [7, 8]]\n assert candidate(candidates = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 25) == [[5, 5, 5, 5, 5]]\n assert candidate(candidates = [20, 10, 5, 2, 3, 2, 1, 1],target = 15) == [[1, 1, 3, 10], [1, 2, 2, 10], [2, 3, 10], [5, 10]]\n assert candidate(candidates = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 25) == [[1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 15], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 14], [1, 2, 3, 6, 13], [1, 2, 3, 7, 12], [1, 2, 3, 8, 11], [1, 2, 3, 9, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 13], [1, 2, 4, 6, 12], [1, 2, 4, 7, 11], [1, 2, 4, 8, 10], [1, 2, 5, 6, 11], [1, 2, 5, 7, 10], [1, 2, 5, 8, 9], [1, 2, 6, 7, 9], [1, 2, 7, 15], [1, 2, 8, 14], [1, 2, 9, 13], [1, 2, 10, 12], [1, 3, 4, 5, 12], [1, 3, 4, 6, 11], [1, 3, 4, 7, 10], [1, 3, 4, 8, 9], [1, 3, 5, 6, 10], [1, 3, 5, 7, 9], [1, 3, 6, 7, 8], [1, 3, 6, 15], [1, 3, 7, 14], [1, 3, 8, 13], [1, 3, 9, 12], [1, 3, 10, 11], [1, 4, 5, 6, 9], [1, 4, 5, 7, 8], [1, 4, 5, 15], [1, 4, 6, 14], [1, 4, 7, 13], [1, 4, 8, 12], [1, 4, 9, 11], [1, 5, 6, 13], [1, 5, 7, 12], [1, 5, 8, 11], [1, 5, 9, 10], [1, 6, 7, 11], [1, 6, 8, 10], [1, 7, 8, 9], [1, 9, 15], [1, 10, 14], [1, 11, 13], [2, 3, 4, 5, 11], [2, 3, 4, 6, 10], [2, 3, 4, 7, 9], [2, 3, 5, 6, 9], [2, 3, 5, 7, 8], [2, 3, 5, 15], [2, 3, 6, 14], [2, 3, 7, 13], [2, 3, 8, 12], [2, 3, 9, 11], [2, 4, 5, 6, 8], [2, 4, 5, 14], [2, 4, 6, 13], [2, 4, 7, 12], [2, 4, 8, 11], [2, 4, 9, 10], [2, 5, 6, 12], [2, 5, 7, 11], [2, 5, 8, 10], [2, 6, 7, 10], [2, 6, 8, 9], [2, 8, 15], [2, 9, 14], [2, 10, 13], [2, 11, 12], [3, 4, 5, 6, 7], [3, 4, 5, 13], [3, 4, 6, 12], [3, 4, 7, 11], [3, 4, 8, 10], [3, 5, 6, 11], [3, 5, 7, 10], [3, 5, 8, 9], [3, 6, 7, 9], [3, 7, 15], [3, 8, 14], [3, 9, 13], [3, 10, 12], [4, 5, 6, 10], [4, 5, 7, 9], [4, 6, 7, 8], [4, 6, 15], [4, 7, 14], [4, 8, 13], [4, 9, 12], [4, 10, 11], [5, 6, 14], [5, 7, 13], [5, 8, 12], [5, 9, 11], [6, 7, 12], [6, 8, 11], [6, 9, 10], [7, 8, 10], [10, 15], [11, 14], [12, 13]]\n assert candidate(candidates = [4, 4, 4, 4, 4, 4, 4, 4],target = 16) == [[4, 4, 4, 4]]\n assert candidate(candidates = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 20) == [[1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 9], [1, 2, 2, 3, 4, 8], [1, 2, 2, 3, 5, 7], [1, 2, 2, 3, 6, 6], [1, 2, 2, 4, 4, 7], [1, 2, 2, 4, 5, 6], [1, 2, 2, 5, 10], [1, 2, 2, 6, 9], [1, 2, 2, 7, 8], [1, 2, 3, 3, 4, 7], [1, 2, 3, 3, 5, 6], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 10], [1, 2, 3, 5, 9], [1, 2, 3, 6, 8], [1, 2, 3, 7, 7], [1, 2, 4, 4, 9], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 2, 5, 5, 7], [1, 2, 5, 6, 6], [1, 2, 7, 10], [1, 2, 8, 9], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 9], [1, 3, 3, 5, 8], [1, 3, 3, 6, 7], [1, 3, 4, 4, 8], [1, 3, 4, 5, 7], [1, 3, 4, 6, 6], [1, 3, 5, 5, 6], [1, 3, 6, 10], [1, 3, 7, 9], [1, 3, 8, 8], [1, 4, 4, 5, 6], [1, 4, 5, 10], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 5, 9], [1, 5, 6, 8], [1, 5, 7, 7], [1, 6, 6, 7], [1, 9, 10], [2, 2, 3, 3, 4, 6], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 10], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 9], [2, 2, 3, 5, 8], [2, 2, 3, 6, 7], [2, 2, 4, 4, 8], [2, 2, 4, 5, 7], [2, 2, 4, 6, 6], [2, 2, 5, 5, 6], [2, 2, 6, 10], [2, 2, 7, 9], [2, 2, 8, 8], [2, 3, 3, 4, 8], [2, 3, 3, 5, 7], [2, 3, 3, 6, 6], [2, 3, 4, 4, 7], [2, 3, 4, 5, 6], [2, 3, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 4, 5, 5], [2, 4, 4, 10], [2, 4, 5, 9], [2, 4, 6, 8], [2, 4, 7, 7], [2, 5, 5, 8], [2, 5, 6, 7], [2, 8, 10], [2, 9, 9], [3, 3, 4, 4, 6], [3, 3, 4, 5, 5], [3, 3, 4, 10], [3, 3, 5, 9], [3, 3, 6, 8], [3, 3, 7, 7], [3, 4, 4, 9], [3, 4, 5, 8], [3, 4, 6, 7], [3, 5, 5, 7], [3, 5, 6, 6], [3, 7, 10], [3, 8, 9], [4, 4, 5, 7], [4, 4, 6, 6], [4, 5, 5, 6], [4, 6, 10], [4, 7, 9], [4, 8, 8], [5, 5, 10], [5, 6, 9], [5, 7, 8], [6, 6, 8], [6, 7, 7], [10, 10]]\n assert candidate(candidates = [1, 3, 2, 2, 4, 1, 1, 3, 3, 5, 7, 9, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9],target = 20) == [[1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 4], [1, 1, 1, 1, 1, 2, 2, 2, 2, 7], [1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 1, 1, 2, 2, 2, 3, 6], [1, 1, 1, 1, 1, 2, 2, 2, 4, 5], [1, 1, 1, 1, 1, 2, 2, 2, 9], [1, 1, 1, 1, 1, 2, 2, 3, 3, 5], [1, 1, 1, 1, 1, 2, 2, 3, 4, 4], [1, 1, 1, 1, 1, 2, 2, 3, 8], [1, 1, 1, 1, 1, 2, 2, 4, 7], [1, 1, 1, 1, 1, 2, 2, 5, 6], [1, 1, 1, 1, 1, 2, 3, 3, 3, 4], [1, 1, 1, 1, 1, 2, 3, 3, 7], [1, 1, 1, 1, 1, 2, 3, 4, 6], [1, 1, 1, 1, 1, 2, 3, 5, 5], [1, 1, 1, 1, 1, 2, 4, 4, 5], [1, 1, 1, 1, 1, 2, 4, 9], [1, 1, 1, 1, 1, 2, 5, 8], [1, 1, 1, 1, 1, 2, 6, 7], [1, 1, 1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 1, 1, 3, 3, 3, 6], [1, 1, 1, 1, 1, 3, 3, 4, 5], [1, 1, 1, 1, 1, 3, 3, 9], [1, 1, 1, 1, 1, 3, 4, 4, 4], [1, 1, 1, 1, 1, 3, 4, 8], [1, 1, 1, 1, 1, 3, 5, 7], [1, 1, 1, 1, 1, 3, 6, 6], [1, 1, 1, 1, 1, 4, 4, 7], [1, 1, 1, 1, 1, 4, 5, 6], [1, 1, 1, 1, 1, 5, 5, 5], [1, 1, 1, 1, 1, 6, 9], [1, 1, 1, 1, 1, 7, 8], [1, 1, 1, 1, 2, 2, 2, 2, 3, 5], [1, 1, 1, 1, 2, 2, 2, 2, 4, 4], [1, 1, 1, 1, 2, 2, 2, 2, 8], [1, 1, 1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 1, 1, 2, 2, 2, 3, 7], [1, 1, 1, 1, 2, 2, 2, 4, 6], [1, 1, 1, 1, 2, 2, 2, 5, 5], [1, 1, 1, 1, 2, 2, 3, 3, 3, 3], [1, 1, 1, 1, 2, 2, 3, 3, 6], [1, 1, 1, 1, 2, 2, 3, 4, 5], [1, 1, 1, 1, 2, 2, 3, 9], [1, 1, 1, 1, 2, 2, 4, 4, 4], [1, 1, 1, 1, 2, 2, 4, 8], [1, 1, 1, 1, 2, 2, 5, 7], [1, 1, 1, 1, 2, 2, 6, 6], [1, 1, 1, 1, 2, 3, 3, 3, 5], [1, 1, 1, 1, 2, 3, 3, 4, 4], [1, 1, 1, 1, 2, 3, 3, 8], [1, 1, 1, 1, 2, 3, 4, 7], [1, 1, 1, 1, 2, 3, 5, 6], [1, 1, 1, 1, 2, 4, 4, 6], [1, 1, 1, 1, 2, 4, 5, 5], [1, 1, 1, 1, 2, 5, 9], [1, 1, 1, 1, 2, 6, 8], [1, 1, 1, 1, 2, 7, 7], [1, 1, 1, 1, 3, 3, 3, 3, 4], [1, 1, 1, 1, 3, 3, 3, 7], [1, 1, 1, 1, 3, 3, 4, 6], [1, 1, 1, 1, 3, 3, 5, 5], [1, 1, 1, 1, 3, 4, 4, 5], [1, 1, 1, 1, 3, 4, 9], [1, 1, 1, 1, 3, 5, 8], [1, 1, 1, 1, 3, 6, 7], [1, 1, 1, 1, 4, 4, 8], [1, 1, 1, 1, 4, 5, 7], [1, 1, 1, 1, 4, 6, 6], [1, 1, 1, 1, 5, 5, 6], [1, 1, 1, 1, 7, 9], [1, 1, 1, 1, 8, 8], [1, 1, 1, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 3, 6], [1, 1, 1, 2, 2, 2, 2, 4, 5], [1, 1, 1, 2, 2, 2, 2, 9], [1, 1, 1, 2, 2, 2, 3, 3, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 8], [1, 1, 1, 2, 2, 2, 4, 7], [1, 1, 1, 2, 2, 2, 5, 6], [1, 1, 1, 2, 2, 3, 3, 3, 4], [1, 1, 1, 2, 2, 3, 3, 7], [1, 1, 1, 2, 2, 3, 4, 6], [1, 1, 1, 2, 2, 3, 5, 5], [1, 1, 1, 2, 2, 4, 4, 5], [1, 1, 1, 2, 2, 4, 9], [1, 1, 1, 2, 2, 5, 8], [1, 1, 1, 2, 2, 6, 7], [1, 1, 1, 2, 3, 3, 3, 3, 3], [1, 1, 1, 2, 3, 3, 3, 6], [1, 1, 1, 2, 3, 3, 4, 5], [1, 1, 1, 2, 3, 3, 9], [1, 1, 1, 2, 3, 4, 4, 4], [1, 1, 1, 2, 3, 4, 8], [1, 1, 1, 2, 3, 5, 7], [1, 1, 1, 2, 3, 6, 6], [1, 1, 1, 2, 4, 4, 7], [1, 1, 1, 2, 4, 5, 6], [1, 1, 1, 2, 5, 5, 5], [1, 1, 1, 2, 6, 9], [1, 1, 1, 2, 7, 8], [1, 1, 1, 3, 3, 3, 3, 5], [1, 1, 1, 3, 3, 3, 4, 4], [1, 1, 1, 3, 3, 3, 8], [1, 1, 1, 3, 3, 4, 7], [1, 1, 1, 3, 3, 5, 6], [1, 1, 1, 3, 4, 4, 6], [1, 1, 1, 3, 4, 5, 5], [1, 1, 1, 3, 5, 9], [1, 1, 1, 3, 6, 8], [1, 1, 1, 3, 7, 7], [1, 1, 1, 4, 4, 4, 5], [1, 1, 1, 4, 4, 9], [1, 1, 1, 4, 5, 8], [1, 1, 1, 4, 6, 7], [1, 1, 1, 5, 5, 7], [1, 1, 1, 5, 6, 6], [1, 1, 1, 8, 9], [1, 1, 2, 2, 2, 2, 3, 3, 4], [1, 1, 2, 2, 2, 2, 3, 7], [1, 1, 2, 2, 2, 2, 4, 6], [1, 1, 2, 2, 2, 2, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3, 6], [1, 1, 2, 2, 2, 3, 4, 5], [1, 1, 2, 2, 2, 3, 9], [1, 1, 2, 2, 2, 4, 4, 4], [1, 1, 2, 2, 2, 4, 8], [1, 1, 2, 2, 2, 5, 7], [1, 1, 2, 2, 2, 6, 6], [1, 1, 2, 2, 3, 3, 3, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 8], [1, 1, 2, 2, 3, 4, 7], [1, 1, 2, 2, 3, 5, 6], [1, 1, 2, 2, 4, 4, 6], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 5, 9], [1, 1, 2, 2, 6, 8], [1, 1, 2, 2, 7, 7], [1, 1, 2, 3, 3, 3, 3, 4], [1, 1, 2, 3, 3, 3, 7], [1, 1, 2, 3, 3, 4, 6], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 9], [1, 1, 2, 3, 5, 8], [1, 1, 2, 3, 6, 7], [1, 1, 2, 4, 4, 8], [1, 1, 2, 4, 5, 7], [1, 1, 2, 4, 6, 6], [1, 1, 2, 5, 5, 6], [1, 1, 2, 7, 9], [1, 1, 2, 8, 8], [1, 1, 3, 3, 3, 3, 6], [1, 1, 3, 3, 3, 4, 5], [1, 1, 3, 3, 3, 9], [1, 1, 3, 3, 4, 4, 4], [1, 1, 3, 3, 4, 8], [1, 1, 3, 3, 5, 7], [1, 1, 3, 3, 6, 6], [1, 1, 3, 4, 4, 7], [1, 1, 3, 4, 5, 6], [1, 1, 3, 5, 5, 5], [1, 1, 3, 6, 9], [1, 1, 3, 7, 8], [1, 1, 4, 4, 4, 6], [1, 1, 4, 4, 5, 5], [1, 1, 4, 5, 9], [1, 1, 4, 6, 8], [1, 1, 4, 7, 7], [1, 1, 5, 5, 8], [1, 1, 5, 6, 7], [1, 1, 9, 9], [1, 2, 2, 2, 2, 3, 3, 5], [1, 2, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 2, 3, 8], [1, 2, 2, 2, 2, 4, 7], [1, 2, 2, 2, 2, 5, 6], [1, 2, 2, 2, 3, 3, 3, 4], [1, 2, 2, 2, 3, 3, 7], [1, 2, 2, 2, 3, 4, 6], [1, 2, 2, 2, 3, 5, 5], [1, 2, 2, 2, 4, 4, 5], [1, 2, 2, 2, 4, 9], [1, 2, 2, 2, 5, 8], [1, 2, 2, 2, 6, 7], [1, 2, 2, 3, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3, 6], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 9], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 8], [1, 2, 2, 3, 5, 7], [1, 2, 2, 3, 6, 6], [1, 2, 2, 4, 4, 7], [1, 2, 2, 4, 5, 6], [1, 2, 2, 5, 5, 5], [1, 2, 2, 6, 9], [1, 2, 2, 7, 8], [1, 2, 3, 3, 3, 3, 5], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 8], [1, 2, 3, 3, 4, 7], [1, 2, 3, 3, 5, 6], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 5, 9], [1, 2, 3, 6, 8], [1, 2, 3, 7, 7], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 9], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 2, 5, 5, 7], [1, 2, 5, 6, 6], [1, 2, 8, 9], [1, 3, 3, 3, 3, 3, 4], [1, 3, 3, 3, 3, 7], [1, 3, 3, 3, 4, 6], [1, 3, 3, 3, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 9], [1, 3, 3, 5, 8], [1, 3, 3, 6, 7], [1, 3, 4, 4, 8], [1, 3, 4, 5, 7], [1, 3, 4, 6, 6], [1, 3, 5, 5, 6], [1, 3, 7, 9], [1, 3, 8, 8], [1, 4, 4, 4, 7], [1, 4, 4, 5, 6], [1, 4, 5, 5, 5], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 5, 9], [1, 5, 6, 8], [1, 5, 7, 7], [1, 6, 6, 7], [2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 6], [2, 2, 2, 2, 3, 4, 5], [2, 2, 2, 2, 3, 9], [2, 2, 2, 2, 4, 4, 4], [2, 2, 2, 2, 4, 8], [2, 2, 2, 2, 5, 7], [2, 2, 2, 2, 6, 6], [2, 2, 2, 3, 3, 3, 5], [2, 2, 2, 3, 3, 4, 4], [2, 2, 2, 3, 3, 8], [2, 2, 2, 3, 4, 7], [2, 2, 2, 3, 5, 6], [2, 2, 2, 4, 4, 6], [2, 2, 2, 4, 5, 5], [2, 2, 2, 5, 9], [2, 2, 2, 6, 8], [2, 2, 2, 7, 7], [2, 2, 3, 3, 3, 3, 4], [2, 2, 3, 3, 3, 7], [2, 2, 3, 3, 4, 6], [2, 2, 3, 3, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 9], [2, 2, 3, 5, 8], [2, 2, 3, 6, 7], [2, 2, 4, 4, 8], [2, 2, 4, 5, 7], [2, 2, 4, 6, 6], [2, 2, 5, 5, 6], [2, 2, 7, 9], [2, 2, 8, 8], [2, 3, 3, 3, 3, 6], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 9], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 8], [2, 3, 3, 5, 7], [2, 3, 3, 6, 6], [2, 3, 4, 4, 7], [2, 3, 4, 5, 6], [2, 3, 5, 5, 5], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 4, 4, 6], [2, 4, 4, 5, 5], [2, 4, 5, 9], [2, 4, 6, 8], [2, 4, 7, 7], [2, 5, 5, 8], [2, 5, 6, 7], [2, 9, 9], [3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 4, 4], [3, 3, 3, 3, 8], [3, 3, 3, 4, 7], [3, 3, 3, 5, 6], [3, 3, 4, 4, 6], [3, 3, 4, 5, 5], [3, 3, 5, 9], [3, 3, 6, 8], [3, 3, 7, 7], [3, 4, 4, 4, 5], [3, 4, 4, 9], [3, 4, 5, 8], [3, 4, 6, 7], [3, 5, 5, 7], [3, 5, 6, 6], [3, 8, 9], [4, 4, 4, 8], [4, 4, 5, 7], [4, 4, 6, 6], [4, 5, 5, 6], [4, 7, 9], [4, 8, 8], [5, 6, 9], [5, 7, 8], [6, 6, 8], [6, 7, 7]]\n assert candidate(candidates = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5],target = 10) == [[1, 2, 2, 5], [1, 2, 3, 4], [1, 3, 3, 3], [1, 4, 5], [2, 2, 3, 3], [2, 3, 5], [2, 4, 4], [3, 3, 4], [5, 5]]\n assert candidate(candidates = [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 20) == [[1, 1, 1, 2, 2, 3, 3, 7], [1, 1, 1, 2, 2, 3, 4, 6], [1, 1, 1, 2, 2, 3, 5, 5], [1, 1, 1, 2, 2, 3, 10], [1, 1, 1, 2, 2, 4, 4, 5], [1, 1, 1, 2, 2, 4, 9], [1, 1, 1, 2, 2, 5, 8], [1, 1, 1, 2, 2, 6, 7], [1, 1, 1, 2, 3, 3, 4, 5], [1, 1, 1, 2, 3, 3, 9], [1, 1, 1, 2, 3, 4, 8], [1, 1, 1, 2, 3, 5, 7], [1, 1, 1, 2, 3, 6, 6], [1, 1, 1, 2, 4, 4, 7], [1, 1, 1, 2, 4, 5, 6], [1, 1, 1, 2, 5, 10], [1, 1, 1, 2, 6, 9], [1, 1, 1, 2, 7, 8], [1, 1, 1, 3, 3, 4, 7], [1, 1, 1, 3, 3, 5, 6], [1, 1, 1, 3, 4, 4, 6], [1, 1, 1, 3, 4, 5, 5], [1, 1, 1, 3, 4, 10], [1, 1, 1, 3, 5, 9], [1, 1, 1, 3, 6, 8], [1, 1, 1, 3, 7, 7], [1, 1, 1, 4, 4, 9], [1, 1, 1, 4, 5, 8], [1, 1, 1, 4, 6, 7], [1, 1, 1, 5, 5, 7], [1, 1, 1, 5, 6, 6], [1, 1, 1, 7, 10], [1, 1, 1, 8, 9], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 8], [1, 1, 2, 2, 3, 4, 7], [1, 1, 2, 2, 3, 5, 6], [1, 1, 2, 2, 4, 4, 6], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 10], [1, 1, 2, 2, 5, 9], [1, 1, 2, 2, 6, 8], [1, 1, 2, 2, 7, 7], [1, 1, 2, 3, 3, 4, 6], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 10], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 9], [1, 1, 2, 3, 5, 8], [1, 1, 2, 3, 6, 7], [1, 1, 2, 4, 4, 8], [1, 1, 2, 4, 5, 7], [1, 1, 2, 4, 6, 6], [1, 1, 2, 5, 5, 6], [1, 1, 2, 6, 10], [1, 1, 2, 7, 9], [1, 1, 2, 8, 8], [1, 1, 3, 3, 4, 8], [1, 1, 3, 3, 5, 7], [1, 1, 3, 3, 6, 6], [1, 1, 3, 4, 4, 7], [1, 1, 3, 4, 5, 6], [1, 1, 3, 5, 10], [1, 1, 3, 6, 9], [1, 1, 3, 7, 8], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 10], [1, 1, 4, 5, 9], [1, 1, 4, 6, 8], [1, 1, 4, 7, 7], [1, 1, 5, 5, 8], [1, 1, 5, 6, 7], [1, 1, 8, 10], [1, 1, 9, 9], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 9], [1, 2, 2, 3, 4, 8], [1, 2, 2, 3, 5, 7], [1, 2, 2, 3, 6, 6], [1, 2, 2, 4, 4, 7], [1, 2, 2, 4, 5, 6], [1, 2, 2, 5, 10], [1, 2, 2, 6, 9], [1, 2, 2, 7, 8], [1, 2, 3, 3, 4, 7], [1, 2, 3, 3, 5, 6], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 10], [1, 2, 3, 5, 9], [1, 2, 3, 6, 8], [1, 2, 3, 7, 7], [1, 2, 4, 4, 9], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 2, 5, 5, 7], [1, 2, 5, 6, 6], [1, 2, 7, 10], [1, 2, 8, 9], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 9], [1, 3, 3, 5, 8], [1, 3, 3, 6, 7], [1, 3, 4, 4, 8], [1, 3, 4, 5, 7], [1, 3, 4, 6, 6], [1, 3, 5, 5, 6], [1, 3, 6, 10], [1, 3, 7, 9], [1, 3, 8, 8], [1, 4, 4, 5, 6], [1, 4, 5, 10], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 5, 9], [1, 5, 6, 8], [1, 5, 7, 7], [1, 6, 6, 7], [1, 9, 10], [2, 2, 3, 3, 4, 6], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 10], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 9], [2, 2, 3, 5, 8], [2, 2, 3, 6, 7], [2, 2, 4, 4, 8], [2, 2, 4, 5, 7], [2, 2, 4, 6, 6], [2, 2, 5, 5, 6], [2, 2, 6, 10], [2, 2, 7, 9], [2, 2, 8, 8], [2, 3, 3, 4, 8], [2, 3, 3, 5, 7], [2, 3, 3, 6, 6], [2, 3, 4, 4, 7], [2, 3, 4, 5, 6], [2, 3, 5, 10], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 4, 5, 5], [2, 4, 4, 10], [2, 4, 5, 9], [2, 4, 6, 8], [2, 4, 7, 7], [2, 5, 5, 8], [2, 5, 6, 7], [2, 8, 10], [2, 9, 9], [3, 3, 4, 4, 6], [3, 3, 4, 5, 5], [3, 3, 4, 10], [3, 3, 5, 9], [3, 3, 6, 8], [3, 3, 7, 7], [3, 4, 4, 9], [3, 4, 5, 8], [3, 4, 6, 7], [3, 5, 5, 7], [3, 5, 6, 6], [3, 7, 10], [3, 8, 9], [4, 4, 5, 7], [4, 4, 6, 6], [4, 5, 5, 6], [4, 6, 10], [4, 7, 9], [4, 8, 8], [5, 5, 10], [5, 6, 9], [5, 7, 8], [6, 6, 8], [6, 7, 7], [10, 10]]\n assert candidate(candidates = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10],target = 30) == [[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 8], [1, 1, 1, 2, 2, 2, 3, 3, 3, 5, 7], [1, 1, 1, 2, 2, 2, 3, 3, 3, 6, 6], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 7], [1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6], [1, 1, 1, 2, 2, 2, 3, 3, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 5, 10], [1, 1, 1, 2, 2, 2, 3, 3, 6, 9], [1, 1, 1, 2, 2, 2, 3, 3, 7, 8], [1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 6], [1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4, 10], [1, 1, 1, 2, 2, 2, 3, 4, 5, 9], [1, 1, 1, 2, 2, 2, 3, 4, 6, 8], [1, 1, 1, 2, 2, 2, 3, 4, 7, 7], [1, 1, 1, 2, 2, 2, 3, 5, 5, 8], [1, 1, 1, 2, 2, 2, 3, 5, 6, 7], [1, 1, 1, 2, 2, 2, 3, 6, 6, 6], [1, 1, 1, 2, 2, 2, 3, 8, 10], [1, 1, 1, 2, 2, 2, 3, 9, 9], [1, 1, 1, 2, 2, 2, 4, 4, 4, 9], [1, 1, 1, 2, 2, 2, 4, 4, 5, 8], [1, 1, 1, 2, 2, 2, 4, 4, 6, 7], [1, 1, 1, 2, 2, 2, 4, 5, 5, 7], [1, 1, 1, 2, 2, 2, 4, 5, 6, 6], [1, 1, 1, 2, 2, 2, 4, 7, 10], [1, 1, 1, 2, 2, 2, 4, 8, 9], [1, 1, 1, 2, 2, 2, 5, 5, 5, 6], [1, 1, 1, 2, 2, 2, 5, 6, 10], [1, 1, 1, 2, 2, 2, 5, 7, 9], [1, 1, 1, 2, 2, 2, 5, 8, 8], [1, 1, 1, 2, 2, 2, 6, 6, 9], [1, 1, 1, 2, 2, 2, 6, 7, 8], [1, 1, 1, 2, 2, 2, 7, 7, 7], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 6], [1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 10], [1, 1, 1, 2, 2, 3, 3, 3, 5, 9], [1, 1, 1, 2, 2, 3, 3, 3, 6, 8], [1, 1, 1, 2, 2, 3, 3, 3, 7, 7], [1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4, 9], [1, 1, 1, 2, 2, 3, 3, 4, 5, 8], [1, 1, 1, 2, 2, 3, 3, 4, 6, 7], [1, 1, 1, 2, 2, 3, 3, 5, 5, 7], [1, 1, 1, 2, 2, 3, 3, 5, 6, 6], [1, 1, 1, 2, 2, 3, 3, 7, 10], [1, 1, 1, 2, 2, 3, 3, 8, 9], [1, 1, 1, 2, 2, 3, 4, 4, 4, 8], [1, 1, 1, 2, 2, 3, 4, 4, 5, 7], [1, 1, 1, 2, 2, 3, 4, 4, 6, 6], [1, 1, 1, 2, 2, 3, 4, 5, 5, 6], [1, 1, 1, 2, 2, 3, 4, 6, 10], [1, 1, 1, 2, 2, 3, 4, 7, 9], [1, 1, 1, 2, 2, 3, 4, 8, 8], [1, 1, 1, 2, 2, 3, 5, 5, 10], [1, 1, 1, 2, 2, 3, 5, 6, 9], [1, 1, 1, 2, 2, 3, 5, 7, 8], [1, 1, 1, 2, 2, 3, 6, 6, 8], [1, 1, 1, 2, 2, 3, 6, 7, 7], [1, 1, 1, 2, 2, 3, 10, 10], [1, 1, 1, 2, 2, 4, 4, 4, 5, 6], [1, 1, 1, 2, 2, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 4, 4, 5, 10], [1, 1, 1, 2, 2, 4, 4, 6, 9], [1, 1, 1, 2, 2, 4, 4, 7, 8], [1, 1, 1, 2, 2, 4, 5, 5, 9], [1, 1, 1, 2, 2, 4, 5, 6, 8], [1, 1, 1, 2, 2, 4, 5, 7, 7], [1, 1, 1, 2, 2, 4, 6, 6, 7], [1, 1, 1, 2, 2, 4, 9, 10], [1, 1, 1, 2, 2, 5, 5, 5, 8], [1, 1, 1, 2, 2, 5, 5, 6, 7], [1, 1, 1, 2, 2, 5, 6, 6, 6], [1, 1, 1, 2, 2, 5, 8, 10], [1, 1, 1, 2, 2, 5, 9, 9], [1, 1, 1, 2, 2, 6, 7, 10], [1, 1, 1, 2, 2, 6, 8, 9], [1, 1, 1, 2, 2, 7, 7, 9], [1, 1, 1, 2, 2, 7, 8, 8], [1, 1, 1, 2, 3, 3, 3, 4, 4, 8], [1, 1, 1, 2, 3, 3, 3, 4, 5, 7], [1, 1, 1, 2, 3, 3, 3, 4, 6, 6], [1, 1, 1, 2, 3, 3, 3, 5, 5, 6], [1, 1, 1, 2, 3, 3, 3, 6, 10], [1, 1, 1, 2, 3, 3, 3, 7, 9], [1, 1, 1, 2, 3, 3, 3, 8, 8], [1, 1, 1, 2, 3, 3, 4, 4, 4, 7], [1, 1, 1, 2, 3, 3, 4, 4, 5, 6], [1, 1, 1, 2, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 4, 5, 10], [1, 1, 1, 2, 3, 3, 4, 6, 9], [1, 1, 1, 2, 3, 3, 4, 7, 8], [1, 1, 1, 2, 3, 3, 5, 5, 9], [1, 1, 1, 2, 3, 3, 5, 6, 8], [1, 1, 1, 2, 3, 3, 5, 7, 7], [1, 1, 1, 2, 3, 3, 6, 6, 7], [1, 1, 1, 2, 3, 3, 9, 10], [1, 1, 1, 2, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 3, 4, 4, 4, 10], [1, 1, 1, 2, 3, 4, 4, 5, 9], [1, 1, 1, 2, 3, 4, 4, 6, 8], [1, 1, 1, 2, 3, 4, 4, 7, 7], [1, 1, 1, 2, 3, 4, 5, 5, 8], [1, 1, 1, 2, 3, 4, 5, 6, 7], [1, 1, 1, 2, 3, 4, 6, 6, 6], [1, 1, 1, 2, 3, 4, 8, 10], [1, 1, 1, 2, 3, 4, 9, 9], [1, 1, 1, 2, 3, 5, 5, 5, 7], [1, 1, 1, 2, 3, 5, 5, 6, 6], [1, 1, 1, 2, 3, 5, 7, 10], [1, 1, 1, 2, 3, 5, 8, 9], [1, 1, 1, 2, 3, 6, 6, 10], [1, 1, 1, 2, 3, 6, 7, 9], [1, 1, 1, 2, 3, 6, 8, 8], [1, 1, 1, 2, 3, 7, 7, 8], [1, 1, 1, 2, 4, 4, 4, 5, 8], [1, 1, 1, 2, 4, 4, 4, 6, 7], [1, 1, 1, 2, 4, 4, 5, 5, 7], [1, 1, 1, 2, 4, 4, 5, 6, 6], [1, 1, 1, 2, 4, 4, 7, 10], [1, 1, 1, 2, 4, 4, 8, 9], [1, 1, 1, 2, 4, 5, 5, 5, 6], [1, 1, 1, 2, 4, 5, 6, 10], [1, 1, 1, 2, 4, 5, 7, 9], [1, 1, 1, 2, 4, 5, 8, 8], [1, 1, 1, 2, 4, 6, 6, 9], [1, 1, 1, 2, 4, 6, 7, 8], [1, 1, 1, 2, 4, 7, 7, 7], [1, 1, 1, 2, 5, 5, 5, 10], [1, 1, 1, 2, 5, 5, 6, 9], [1, 1, 1, 2, 5, 5, 7, 8], [1, 1, 1, 2, 5, 6, 6, 8], [1, 1, 1, 2, 5, 6, 7, 7], [1, 1, 1, 2, 5, 10, 10], [1, 1, 1, 2, 6, 6, 6, 7], [1, 1, 1, 2, 6, 9, 10], [1, 1, 1, 2, 7, 8, 10], [1, 1, 1, 2, 7, 9, 9], [1, 1, 1, 2, 8, 8, 9], [1, 1, 1, 3, 3, 3, 4, 4, 4, 6], [1, 1, 1, 3, 3, 3, 4, 4, 5, 5], [1, 1, 1, 3, 3, 3, 4, 4, 10], [1, 1, 1, 3, 3, 3, 4, 5, 9], [1, 1, 1, 3, 3, 3, 4, 6, 8], [1, 1, 1, 3, 3, 3, 4, 7, 7], [1, 1, 1, 3, 3, 3, 5, 5, 8], [1, 1, 1, 3, 3, 3, 5, 6, 7], [1, 1, 1, 3, 3, 3, 6, 6, 6], [1, 1, 1, 3, 3, 3, 8, 10], [1, 1, 1, 3, 3, 3, 9, 9], [1, 1, 1, 3, 3, 4, 4, 4, 9], [1, 1, 1, 3, 3, 4, 4, 5, 8], [1, 1, 1, 3, 3, 4, 4, 6, 7], [1, 1, 1, 3, 3, 4, 5, 5, 7], [1, 1, 1, 3, 3, 4, 5, 6, 6], [1, 1, 1, 3, 3, 4, 7, 10], [1, 1, 1, 3, 3, 4, 8, 9], [1, 1, 1, 3, 3, 5, 5, 5, 6], [1, 1, 1, 3, 3, 5, 6, 10], [1, 1, 1, 3, 3, 5, 7, 9], [1, 1, 1, 3, 3, 5, 8, 8], [1, 1, 1, 3, 3, 6, 6, 9], [1, 1, 1, 3, 3, 6, 7, 8], [1, 1, 1, 3, 3, 7, 7, 7], [1, 1, 1, 3, 4, 4, 4, 5, 7], [1, 1, 1, 3, 4, 4, 4, 6, 6], [1, 1, 1, 3, 4, 4, 5, 5, 6], [1, 1, 1, 3, 4, 4, 6, 10], [1, 1, 1, 3, 4, 4, 7, 9], [1, 1, 1, 3, 4, 4, 8, 8], [1, 1, 1, 3, 4, 5, 5, 10], [1, 1, 1, 3, 4, 5, 6, 9], [1, 1, 1, 3, 4, 5, 7, 8], [1, 1, 1, 3, 4, 6, 6, 8], [1, 1, 1, 3, 4, 6, 7, 7], [1, 1, 1, 3, 4, 10, 10], [1, 1, 1, 3, 5, 5, 5, 9], [1, 1, 1, 3, 5, 5, 6, 8], [1, 1, 1, 3, 5, 5, 7, 7], [1, 1, 1, 3, 5, 6, 6, 7], [1, 1, 1, 3, 5, 9, 10], [1, 1, 1, 3, 6, 8, 10], [1, 1, 1, 3, 6, 9, 9], [1, 1, 1, 3, 7, 7, 10], [1, 1, 1, 3, 7, 8, 9], [1, 1, 1, 3, 8, 8, 8], [1, 1, 1, 4, 4, 4, 5, 5, 5], [1, 1, 1, 4, 4, 4, 5, 10], [1, 1, 1, 4, 4, 4, 6, 9], [1, 1, 1, 4, 4, 4, 7, 8], [1, 1, 1, 4, 4, 5, 5, 9], [1, 1, 1, 4, 4, 5, 6, 8], [1, 1, 1, 4, 4, 5, 7, 7], [1, 1, 1, 4, 4, 6, 6, 7], [1, 1, 1, 4, 4, 9, 10], [1, 1, 1, 4, 5, 5, 5, 8], [1, 1, 1, 4, 5, 5, 6, 7], [1, 1, 1, 4, 5, 6, 6, 6], [1, 1, 1, 4, 5, 8, 10], [1, 1, 1, 4, 5, 9, 9], [1, 1, 1, 4, 6, 7, 10], [1, 1, 1, 4, 6, 8, 9], [1, 1, 1, 4, 7, 7, 9], [1, 1, 1, 4, 7, 8, 8], [1, 1, 1, 5, 5, 5, 6, 6], [1, 1, 1, 5, 5, 7, 10], [1, 1, 1, 5, 5, 8, 9], [1, 1, 1, 5, 6, 6, 10], [1, 1, 1, 5, 6, 7, 9], [1, 1, 1, 5, 6, 8, 8], [1, 1, 1, 5, 7, 7, 8], [1, 1, 1, 6, 6, 6, 9], [1, 1, 1, 6, 6, 7, 8], [1, 1, 1, 6, 7, 7, 7], [1, 1, 1, 7, 10, 10], [1, 1, 1, 8, 9, 10], [1, 1, 1, 9, 9, 9], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 9], [1, 1, 2, 2, 2, 3, 3, 3, 5, 8], [1, 1, 2, 2, 2, 3, 3, 3, 6, 7], [1, 1, 2, 2, 2, 3, 3, 4, 4, 8], [1, 1, 2, 2, 2, 3, 3, 4, 5, 7], [1, 1, 2, 2, 2, 3, 3, 4, 6, 6], [1, 1, 2, 2, 2, 3, 3, 5, 5, 6], [1, 1, 2, 2, 2, 3, 3, 6, 10], [1, 1, 2, 2, 2, 3, 3, 7, 9], [1, 1, 2, 2, 2, 3, 3, 8, 8], [1, 1, 2, 2, 2, 3, 4, 4, 4, 7], [1, 1, 2, 2, 2, 3, 4, 4, 5, 6], [1, 1, 2, 2, 2, 3, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 4, 5, 10], [1, 1, 2, 2, 2, 3, 4, 6, 9], [1, 1, 2, 2, 2, 3, 4, 7, 8], [1, 1, 2, 2, 2, 3, 5, 5, 9], [1, 1, 2, 2, 2, 3, 5, 6, 8], [1, 1, 2, 2, 2, 3, 5, 7, 7], [1, 1, 2, 2, 2, 3, 6, 6, 7], [1, 1, 2, 2, 2, 3, 9, 10], [1, 1, 2, 2, 2, 4, 4, 4, 5, 5], [1, 1, 2, 2, 2, 4, 4, 4, 10], [1, 1, 2, 2, 2, 4, 4, 5, 9], [1, 1, 2, 2, 2, 4, 4, 6, 8], [1, 1, 2, 2, 2, 4, 4, 7, 7], [1, 1, 2, 2, 2, 4, 5, 5, 8], [1, 1, 2, 2, 2, 4, 5, 6, 7], [1, 1, 2, 2, 2, 4, 6, 6, 6], [1, 1, 2, 2, 2, 4, 8, 10], [1, 1, 2, 2, 2, 4, 9, 9], [1, 1, 2, 2, 2, 5, 5, 5, 7], [1, 1, 2, 2, 2, 5, 5, 6, 6], [1, 1, 2, 2, 2, 5, 7, 10], [1, 1, 2, 2, 2, 5, 8, 9], [1, 1, 2, 2, 2, 6, 6, 10], [1, 1, 2, 2, 2, 6, 7, 9], [1, 1, 2, 2, 2, 6, 8, 8], [1, 1, 2, 2, 2, 7, 7, 8], [1, 1, 2, 2, 3, 3, 3, 4, 4, 7], [1, 1, 2, 2, 3, 3, 3, 4, 5, 6], [1, 1, 2, 2, 3, 3, 3, 5, 5, 5], [1, 1, 2, 2, 3, 3, 3, 5, 10], [1, 1, 2, 2, 3, 3, 3, 6, 9], [1, 1, 2, 2, 3, 3, 3, 7, 8], [1, 1, 2, 2, 3, 3, 4, 4, 4, 6], [1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 10], [1, 1, 2, 2, 3, 3, 4, 5, 9], [1, 1, 2, 2, 3, 3, 4, 6, 8], [1, 1, 2, 2, 3, 3, 4, 7, 7], [1, 1, 2, 2, 3, 3, 5, 5, 8], [1, 1, 2, 2, 3, 3, 5, 6, 7], [1, 1, 2, 2, 3, 3, 6, 6, 6], [1, 1, 2, 2, 3, 3, 8, 10], [1, 1, 2, 2, 3, 3, 9, 9], [1, 1, 2, 2, 3, 4, 4, 4, 9], [1, 1, 2, 2, 3, 4, 4, 5, 8], [1, 1, 2, 2, 3, 4, 4, 6, 7], [1, 1, 2, 2, 3, 4, 5, 5, 7], [1, 1, 2, 2, 3, 4, 5, 6, 6], [1, 1, 2, 2, 3, 4, 7, 10], [1, 1, 2, 2, 3, 4, 8, 9], [1, 1, 2, 2, 3, 5, 5, 5, 6], [1, 1, 2, 2, 3, 5, 6, 10], [1, 1, 2, 2, 3, 5, 7, 9], [1, 1, 2, 2, 3, 5, 8, 8], [1, 1, 2, 2, 3, 6, 6, 9], [1, 1, 2, 2, 3, 6, 7, 8], [1, 1, 2, 2, 3, 7, 7, 7], [1, 1, 2, 2, 4, 4, 4, 5, 7], [1, 1, 2, 2, 4, 4, 4, 6, 6], [1, 1, 2, 2, 4, 4, 5, 5, 6], [1, 1, 2, 2, 4, 4, 6, 10], [1, 1, 2, 2, 4, 4, 7, 9], [1, 1, 2, 2, 4, 4, 8, 8], [1, 1, 2, 2, 4, 5, 5, 10], [1, 1, 2, 2, 4, 5, 6, 9], [1, 1, 2, 2, 4, 5, 7, 8], [1, 1, 2, 2, 4, 6, 6, 8], [1, 1, 2, 2, 4, 6, 7, 7], [1, 1, 2, 2, 4, 10, 10], [1, 1, 2, 2, 5, 5, 5, 9], [1, 1, 2, 2, 5, 5, 6, 8], [1, 1, 2, 2, 5, 5, 7, 7], [1, 1, 2, 2, 5, 6, 6, 7], [1, 1, 2, 2, 5, 9, 10], [1, 1, 2, 2, 6, 8, 10], [1, 1, 2, 2, 6, 9, 9], [1, 1, 2, 2, 7, 7, 10], [1, 1, 2, 2, 7, 8, 9], [1, 1, 2, 2, 8, 8, 8], [1, 1, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 2, 3, 3, 3, 4, 4, 9], [1, 1, 2, 3, 3, 3, 4, 5, 8], [1, 1, 2, 3, 3, 3, 4, 6, 7], [1, 1, 2, 3, 3, 3, 5, 5, 7], [1, 1, 2, 3, 3, 3, 5, 6, 6], [1, 1, 2, 3, 3, 3, 7, 10], [1, 1, 2, 3, 3, 3, 8, 9], [1, 1, 2, 3, 3, 4, 4, 4, 8], [1, 1, 2, 3, 3, 4, 4, 5, 7], [1, 1, 2, 3, 3, 4, 4, 6, 6], [1, 1, 2, 3, 3, 4, 5, 5, 6], [1, 1, 2, 3, 3, 4, 6, 10], [1, 1, 2, 3, 3, 4, 7, 9], [1, 1, 2, 3, 3, 4, 8, 8], [1, 1, 2, 3, 3, 5, 5, 10], [1, 1, 2, 3, 3, 5, 6, 9], [1, 1, 2, 3, 3, 5, 7, 8], [1, 1, 2, 3, 3, 6, 6, 8], [1, 1, 2, 3, 3, 6, 7, 7], [1, 1, 2, 3, 3, 10, 10], [1, 1, 2, 3, 4, 4, 4, 5, 6], [1, 1, 2, 3, 4, 4, 5, 5, 5], [1, 1, 2, 3, 4, 4, 5, 10], [1, 1, 2, 3, 4, 4, 6, 9], [1, 1, 2, 3, 4, 4, 7, 8], [1, 1, 2, 3, 4, 5, 5, 9], [1, 1, 2, 3, 4, 5, 6, 8], [1, 1, 2, 3, 4, 5, 7, 7], [1, 1, 2, 3, 4, 6, 6, 7], [1, 1, 2, 3, 4, 9, 10], [1, 1, 2, 3, 5, 5, 5, 8], [1, 1, 2, 3, 5, 5, 6, 7], [1, 1, 2, 3, 5, 6, 6, 6], [1, 1, 2, 3, 5, 8, 10], [1, 1, 2, 3, 5, 9, 9], [1, 1, 2, 3, 6, 7, 10], [1, 1, 2, 3, 6, 8, 9], [1, 1, 2, 3, 7, 7, 9], [1, 1, 2, 3, 7, 8, 8], [1, 1, 2, 4, 4, 4, 5, 9], [1, 1, 2, 4, 4, 4, 6, 8], [1, 1, 2, 4, 4, 4, 7, 7], [1, 1, 2, 4, 4, 5, 5, 8], [1, 1, 2, 4, 4, 5, 6, 7], [1, 1, 2, 4, 4, 6, 6, 6], [1, 1, 2, 4, 4, 8, 10], [1, 1, 2, 4, 4, 9, 9], [1, 1, 2, 4, 5, 5, 5, 7], [1, 1, 2, 4, 5, 5, 6, 6], [1, 1, 2, 4, 5, 7, 10], [1, 1, 2, 4, 5, 8, 9], [1, 1, 2, 4, 6, 6, 10], [1, 1, 2, 4, 6, 7, 9], [1, 1, 2, 4, 6, 8, 8], [1, 1, 2, 4, 7, 7, 8], [1, 1, 2, 5, 5, 6, 10], [1, 1, 2, 5, 5, 7, 9], [1, 1, 2, 5, 5, 8, 8], [1, 1, 2, 5, 6, 6, 9], [1, 1, 2, 5, 6, 7, 8], [1, 1, 2, 5, 7, 7, 7], [1, 1, 2, 6, 6, 6, 8], [1, 1, 2, 6, 6, 7, 7], [1, 1, 2, 6, 10, 10], [1, 1, 2, 7, 9, 10], [1, 1, 2, 8, 8, 10], [1, 1, 2, 8, 9, 9], [1, 1, 3, 3, 3, 4, 4, 4, 7], [1, 1, 3, 3, 3, 4, 4, 5, 6], [1, 1, 3, 3, 3, 4, 5, 5, 5], [1, 1, 3, 3, 3, 4, 5, 10], [1, 1, 3, 3, 3, 4, 6, 9], [1, 1, 3, 3, 3, 4, 7, 8], [1, 1, 3, 3, 3, 5, 5, 9], [1, 1, 3, 3, 3, 5, 6, 8], [1, 1, 3, 3, 3, 5, 7, 7], [1, 1, 3, 3, 3, 6, 6, 7], [1, 1, 3, 3, 3, 9, 10], [1, 1, 3, 3, 4, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 4, 10], [1, 1, 3, 3, 4, 4, 5, 9], [1, 1, 3, 3, 4, 4, 6, 8], [1, 1, 3, 3, 4, 4, 7, 7], [1, 1, 3, 3, 4, 5, 5, 8], [1, 1, 3, 3, 4, 5, 6, 7], [1, 1, 3, 3, 4, 6, 6, 6], [1, 1, 3, 3, 4, 8, 10], [1, 1, 3, 3, 4, 9, 9], [1, 1, 3, 3, 5, 5, 5, 7], [1, 1, 3, 3, 5, 5, 6, 6], [1, 1, 3, 3, 5, 7, 10], [1, 1, 3, 3, 5, 8, 9], [1, 1, 3, 3, 6, 6, 10], [1, 1, 3, 3, 6, 7, 9], [1, 1, 3, 3, 6, 8, 8], [1, 1, 3, 3, 7, 7, 8], [1, 1, 3, 4, 4, 4, 5, 8], [1, 1, 3, 4, 4, 4, 6, 7], [1, 1, 3, 4, 4, 5, 5, 7], [1, 1, 3, 4, 4, 5, 6, 6], [1, 1, 3, 4, 4, 7, 10], [1, 1, 3, 4, 4, 8, 9], [1, 1, 3, 4, 5, 5, 5, 6], [1, 1, 3, 4, 5, 6, 10], [1, 1, 3, 4, 5, 7, 9], [1, 1, 3, 4, 5, 8, 8], [1, 1, 3, 4, 6, 6, 9], [1, 1, 3, 4, 6, 7, 8], [1, 1, 3, 4, 7, 7, 7], [1, 1, 3, 5, 5, 5, 10], [1, 1, 3, 5, 5, 6, 9], [1, 1, 3, 5, 5, 7, 8], [1, 1, 3, 5, 6, 6, 8], [1, 1, 3, 5, 6, 7, 7], [1, 1, 3, 5, 10, 10], [1, 1, 3, 6, 6, 6, 7], [1, 1, 3, 6, 9, 10], [1, 1, 3, 7, 8, 10], [1, 1, 3, 7, 9, 9], [1, 1, 3, 8, 8, 9], [1, 1, 4, 4, 4, 5, 5, 6], [1, 1, 4, 4, 4, 6, 10], [1, 1, 4, 4, 4, 7, 9], [1, 1, 4, 4, 4, 8, 8], [1, 1, 4, 4, 5, 5, 10], [1, 1, 4, 4, 5, 6, 9], [1, 1, 4, 4, 5, 7, 8], [1, 1, 4, 4, 6, 6, 8], [1, 1, 4, 4, 6, 7, 7], [1, 1, 4, 4, 10, 10], [1, 1, 4, 5, 5, 5, 9], [1, 1, 4, 5, 5, 6, 8], [1, 1, 4, 5, 5, 7, 7], [1, 1, 4, 5, 6, 6, 7], [1, 1, 4, 5, 9, 10], [1, 1, 4, 6, 8, 10], [1, 1, 4, 6, 9, 9], [1, 1, 4, 7, 7, 10], [1, 1, 4, 7, 8, 9], [1, 1, 4, 8, 8, 8], [1, 1, 5, 5, 5, 6, 7], [1, 1, 5, 5, 6, 6, 6], [1, 1, 5, 5, 8, 10], [1, 1, 5, 5, 9, 9], [1, 1, 5, 6, 7, 10], [1, 1, 5, 6, 8, 9], [1, 1, 5, 7, 7, 9], [1, 1, 5, 7, 8, 8], [1, 1, 6, 6, 6, 10], [1, 1, 6, 6, 7, 9], [1, 1, 6, 6, 8, 8], [1, 1, 6, 7, 7, 8], [1, 1, 8, 10, 10], [1, 1, 9, 9, 10], [1, 2, 2, 2, 3, 3, 3, 4, 4, 6], [1, 2, 2, 2, 3, 3, 3, 4, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 10], [1, 2, 2, 2, 3, 3, 3, 5, 9], [1, 2, 2, 2, 3, 3, 3, 6, 8], [1, 2, 2, 2, 3, 3, 3, 7, 7], [1, 2, 2, 2, 3, 3, 4, 4, 4, 5], [1, 2, 2, 2, 3, 3, 4, 4, 9], [1, 2, 2, 2, 3, 3, 4, 5, 8], [1, 2, 2, 2, 3, 3, 4, 6, 7], [1, 2, 2, 2, 3, 3, 5, 5, 7], [1, 2, 2, 2, 3, 3, 5, 6, 6], [1, 2, 2, 2, 3, 3, 7, 10], [1, 2, 2, 2, 3, 3, 8, 9], [1, 2, 2, 2, 3, 4, 4, 4, 8], [1, 2, 2, 2, 3, 4, 4, 5, 7], [1, 2, 2, 2, 3, 4, 4, 6, 6], [1, 2, 2, 2, 3, 4, 5, 5, 6], [1, 2, 2, 2, 3, 4, 6, 10], [1, 2, 2, 2, 3, 4, 7, 9], [1, 2, 2, 2, 3, 4, 8, 8], [1, 2, 2, 2, 3, 5, 5, 10], [1, 2, 2, 2, 3, 5, 6, 9], [1, 2, 2, 2, 3, 5, 7, 8], [1, 2, 2, 2, 3, 6, 6, 8], [1, 2, 2, 2, 3, 6, 7, 7], [1, 2, 2, 2, 3, 10, 10], [1, 2, 2, 2, 4, 4, 4, 5, 6], [1, 2, 2, 2, 4, 4, 5, 5, 5], [1, 2, 2, 2, 4, 4, 5, 10], [1, 2, 2, 2, 4, 4, 6, 9], [1, 2, 2, 2, 4, 4, 7, 8], [1, 2, 2, 2, 4, 5, 5, 9], [1, 2, 2, 2, 4, 5, 6, 8], [1, 2, 2, 2, 4, 5, 7, 7], [1, 2, 2, 2, 4, 6, 6, 7], [1, 2, 2, 2, 4, 9, 10], [1, 2, 2, 2, 5, 5, 5, 8], [1, 2, 2, 2, 5, 5, 6, 7], [1, 2, 2, 2, 5, 6, 6, 6], [1, 2, 2, 2, 5, 8, 10], [1, 2, 2, 2, 5, 9, 9], [1, 2, 2, 2, 6, 7, 10], [1, 2, 2, 2, 6, 8, 9], [1, 2, 2, 2, 7, 7, 9], [1, 2, 2, 2, 7, 8, 8], [1, 2, 2, 3, 3, 3, 4, 4, 8], [1, 2, 2, 3, 3, 3, 4, 5, 7], [1, 2, 2, 3, 3, 3, 4, 6, 6], [1, 2, 2, 3, 3, 3, 5, 5, 6], [1, 2, 2, 3, 3, 3, 6, 10], [1, 2, 2, 3, 3, 3, 7, 9], [1, 2, 2, 3, 3, 3, 8, 8], [1, 2, 2, 3, 3, 4, 4, 4, 7], [1, 2, 2, 3, 3, 4, 4, 5, 6], [1, 2, 2, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 5, 10], [1, 2, 2, 3, 3, 4, 6, 9], [1, 2, 2, 3, 3, 4, 7, 8], [1, 2, 2, 3, 3, 5, 5, 9], [1, 2, 2, 3, 3, 5, 6, 8], [1, 2, 2, 3, 3, 5, 7, 7], [1, 2, 2, 3, 3, 6, 6, 7], [1, 2, 2, 3, 3, 9, 10], [1, 2, 2, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 4, 10], [1, 2, 2, 3, 4, 4, 5, 9], [1, 2, 2, 3, 4, 4, 6, 8], [1, 2, 2, 3, 4, 4, 7, 7], [1, 2, 2, 3, 4, 5, 5, 8], [1, 2, 2, 3, 4, 5, 6, 7], [1, 2, 2, 3, 4, 6, 6, 6], [1, 2, 2, 3, 4, 8, 10], [1, 2, 2, 3, 4, 9, 9], [1, 2, 2, 3, 5, 5, 5, 7], [1, 2, 2, 3, 5, 5, 6, 6], [1, 2, 2, 3, 5, 7, 10], [1, 2, 2, 3, 5, 8, 9], [1, 2, 2, 3, 6, 6, 10], [1, 2, 2, 3, 6, 7, 9], [1, 2, 2, 3, 6, 8, 8], [1, 2, 2, 3, 7, 7, 8], [1, 2, 2, 4, 4, 4, 5, 8], [1, 2, 2, 4, 4, 4, 6, 7], [1, 2, 2, 4, 4, 5, 5, 7], [1, 2, 2, 4, 4, 5, 6, 6], [1, 2, 2, 4, 4, 7, 10], [1, 2, 2, 4, 4, 8, 9], [1, 2, 2, 4, 5, 5, 5, 6], [1, 2, 2, 4, 5, 6, 10], [1, 2, 2, 4, 5, 7, 9], [1, 2, 2, 4, 5, 8, 8], [1, 2, 2, 4, 6, 6, 9], [1, 2, 2, 4, 6, 7, 8], [1, 2, 2, 4, 7, 7, 7], [1, 2, 2, 5, 5, 5, 10], [1, 2, 2, 5, 5, 6, 9], [1, 2, 2, 5, 5, 7, 8], [1, 2, 2, 5, 6, 6, 8], [1, 2, 2, 5, 6, 7, 7], [1, 2, 2, 5, 10, 10], [1, 2, 2, 6, 6, 6, 7], [1, 2, 2, 6, 9, 10], [1, 2, 2, 7, 8, 10], [1, 2, 2, 7, 9, 9], [1, 2, 2, 8, 8, 9], [1, 2, 3, 3, 3, 4, 4, 4, 6], [1, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 10], [1, 2, 3, 3, 3, 4, 5, 9], [1, 2, 3, 3, 3, 4, 6, 8], [1, 2, 3, 3, 3, 4, 7, 7], [1, 2, 3, 3, 3, 5, 5, 8], [1, 2, 3, 3, 3, 5, 6, 7], [1, 2, 3, 3, 3, 6, 6, 6], [1, 2, 3, 3, 3, 8, 10], [1, 2, 3, 3, 3, 9, 9], [1, 2, 3, 3, 4, 4, 4, 9], [1, 2, 3, 3, 4, 4, 5, 8], [1, 2, 3, 3, 4, 4, 6, 7], [1, 2, 3, 3, 4, 5, 5, 7], [1, 2, 3, 3, 4, 5, 6, 6], [1, 2, 3, 3, 4, 7, 10], [1, 2, 3, 3, 4, 8, 9], [1, 2, 3, 3, 5, 5, 5, 6], [1, 2, 3, 3, 5, 6, 10], [1, 2, 3, 3, 5, 7, 9], [1, 2, 3, 3, 5, 8, 8], [1, 2, 3, 3, 6, 6, 9], [1, 2, 3, 3, 6, 7, 8], [1, 2, 3, 3, 7, 7, 7], [1, 2, 3, 4, 4, 4, 5, 7], [1, 2, 3, 4, 4, 4, 6, 6], [1, 2, 3, 4, 4, 5, 5, 6], [1, 2, 3, 4, 4, 6, 10], [1, 2, 3, 4, 4, 7, 9], [1, 2, 3, 4, 4, 8, 8], [1, 2, 3, 4, 5, 5, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 6, 6, 8], [1, 2, 3, 4, 6, 7, 7], [1, 2, 3, 4, 10, 10], [1, 2, 3, 5, 5, 5, 9], [1, 2, 3, 5, 5, 6, 8], [1, 2, 3, 5, 5, 7, 7], [1, 2, 3, 5, 6, 6, 7], [1, 2, 3, 5, 9, 10], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 9, 9], [1, 2, 3, 7, 7, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 8, 8, 8], [1, 2, 4, 4, 4, 5, 5, 5], [1, 2, 4, 4, 4, 5, 10], [1, 2, 4, 4, 4, 6, 9], [1, 2, 4, 4, 4, 7, 8], [1, 2, 4, 4, 5, 5, 9], [1, 2, 4, 4, 5, 6, 8], [1, 2, 4, 4, 5, 7, 7], [1, 2, 4, 4, 6, 6, 7], [1, 2, 4, 4, 9, 10], [1, 2, 4, 5, 5, 5, 8], [1, 2, 4, 5, 5, 6, 7], [1, 2, 4, 5, 6, 6, 6], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 9, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 7, 7, 9], [1, 2, 4, 7, 8, 8], [1, 2, 5, 5, 5, 6, 6], [1, 2, 5, 5, 7, 10], [1, 2, 5, 5, 8, 9], [1, 2, 5, 6, 6, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 8, 8], [1, 2, 5, 7, 7, 8], [1, 2, 6, 6, 6, 9], [1, 2, 6, 6, 7, 8], [1, 2, 6, 7, 7, 7], [1, 2, 7, 10, 10], [1, 2, 8, 9, 10], [1, 2, 9, 9, 9], [1, 3, 3, 3, 4, 4, 4, 8], [1, 3, 3, 3, 4, 4, 5, 7], [1, 3, 3, 3, 4, 4, 6, 6], [1, 3, 3, 3, 4, 5, 5, 6], [1, 3, 3, 3, 4, 6, 10], [1, 3, 3, 3, 4, 7, 9], [1, 3, 3, 3, 4, 8, 8], [1, 3, 3, 3, 5, 5, 10], [1, 3, 3, 3, 5, 6, 9], [1, 3, 3, 3, 5, 7, 8], [1, 3, 3, 3, 6, 6, 8], [1, 3, 3, 3, 6, 7, 7], [1, 3, 3, 3, 10, 10], [1, 3, 3, 4, 4, 4, 5, 6], [1, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 5, 10], [1, 3, 3, 4, 4, 6, 9], [1, 3, 3, 4, 4, 7, 8], [1, 3, 3, 4, 5, 5, 9], [1, 3, 3, 4, 5, 6, 8], [1, 3, 3, 4, 5, 7, 7], [1, 3, 3, 4, 6, 6, 7], [1, 3, 3, 4, 9, 10], [1, 3, 3, 5, 5, 5, 8], [1, 3, 3, 5, 5, 6, 7], [1, 3, 3, 5, 6, 6, 6], [1, 3, 3, 5, 8, 10], [1, 3, 3, 5, 9, 9], [1, 3, 3, 6, 7, 10], [1, 3, 3, 6, 8, 9], [1, 3, 3, 7, 7, 9], [1, 3, 3, 7, 8, 8], [1, 3, 4, 4, 4, 5, 9], [1, 3, 4, 4, 4, 6, 8], [1, 3, 4, 4, 4, 7, 7], [1, 3, 4, 4, 5, 5, 8], [1, 3, 4, 4, 5, 6, 7], [1, 3, 4, 4, 6, 6, 6], [1, 3, 4, 4, 8, 10], [1, 3, 4, 4, 9, 9], [1, 3, 4, 5, 5, 5, 7], [1, 3, 4, 5, 5, 6, 6], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 6, 6, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 8, 8], [1, 3, 4, 7, 7, 8], [1, 3, 5, 5, 6, 10], [1, 3, 5, 5, 7, 9], [1, 3, 5, 5, 8, 8], [1, 3, 5, 6, 6, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 7, 7, 7], [1, 3, 6, 6, 6, 8], [1, 3, 6, 6, 7, 7], [1, 3, 6, 10, 10], [1, 3, 7, 9, 10], [1, 3, 8, 8, 10], [1, 3, 8, 9, 9], [1, 4, 4, 4, 5, 5, 7], [1, 4, 4, 4, 5, 6, 6], [1, 4, 4, 4, 7, 10], [1, 4, 4, 4, 8, 9], [1, 4, 4, 5, 5, 5, 6], [1, 4, 4, 5, 6, 10], [1, 4, 4, 5, 7, 9], [1, 4, 4, 5, 8, 8], [1, 4, 4, 6, 6, 9], [1, 4, 4, 6, 7, 8], [1, 4, 4, 7, 7, 7], [1, 4, 5, 5, 5, 10], [1, 4, 5, 5, 6, 9], [1, 4, 5, 5, 7, 8], [1, 4, 5, 6, 6, 8], [1, 4, 5, 6, 7, 7], [1, 4, 5, 10, 10], [1, 4, 6, 6, 6, 7], [1, 4, 6, 9, 10], [1, 4, 7, 8, 10], [1, 4, 7, 9, 9], [1, 4, 8, 8, 9], [1, 5, 5, 5, 6, 8], [1, 5, 5, 5, 7, 7], [1, 5, 5, 6, 6, 7], [1, 5, 5, 9, 10], [1, 5, 6, 8, 10], [1, 5, 6, 9, 9], [1, 5, 7, 7, 10], [1, 5, 7, 8, 9], [1, 5, 8, 8, 8], [1, 6, 6, 7, 10], [1, 6, 6, 8, 9], [1, 6, 7, 7, 9], [1, 6, 7, 8, 8], [1, 7, 7, 7, 8], [1, 9, 10, 10], [2, 2, 2, 3, 3, 3, 4, 4, 7], [2, 2, 2, 3, 3, 3, 4, 5, 6], [2, 2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 2, 3, 3, 3, 5, 10], [2, 2, 2, 3, 3, 3, 6, 9], [2, 2, 2, 3, 3, 3, 7, 8], [2, 2, 2, 3, 3, 4, 4, 4, 6], [2, 2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 2, 3, 3, 4, 4, 10], [2, 2, 2, 3, 3, 4, 5, 9], [2, 2, 2, 3, 3, 4, 6, 8], [2, 2, 2, 3, 3, 4, 7, 7], [2, 2, 2, 3, 3, 5, 5, 8], [2, 2, 2, 3, 3, 5, 6, 7], [2, 2, 2, 3, 3, 6, 6, 6], [2, 2, 2, 3, 3, 8, 10], [2, 2, 2, 3, 3, 9, 9], [2, 2, 2, 3, 4, 4, 4, 9], [2, 2, 2, 3, 4, 4, 5, 8], [2, 2, 2, 3, 4, 4, 6, 7], [2, 2, 2, 3, 4, 5, 5, 7], [2, 2, 2, 3, 4, 5, 6, 6], [2, 2, 2, 3, 4, 7, 10], [2, 2, 2, 3, 4, 8, 9], [2, 2, 2, 3, 5, 5, 5, 6], [2, 2, 2, 3, 5, 6, 10], [2, 2, 2, 3, 5, 7, 9], [2, 2, 2, 3, 5, 8, 8], [2, 2, 2, 3, 6, 6, 9], [2, 2, 2, 3, 6, 7, 8], [2, 2, 2, 3, 7, 7, 7], [2, 2, 2, 4, 4, 4, 5, 7], [2, 2, 2, 4, 4, 4, 6, 6], [2, 2, 2, 4, 4, 5, 5, 6], [2, 2, 2, 4, 4, 6, 10], [2, 2, 2, 4, 4, 7, 9], [2, 2, 2, 4, 4, 8, 8], [2, 2, 2, 4, 5, 5, 10], [2, 2, 2, 4, 5, 6, 9], [2, 2, 2, 4, 5, 7, 8], [2, 2, 2, 4, 6, 6, 8], [2, 2, 2, 4, 6, 7, 7], [2, 2, 2, 4, 10, 10], [2, 2, 2, 5, 5, 5, 9], [2, 2, 2, 5, 5, 6, 8], [2, 2, 2, 5, 5, 7, 7], [2, 2, 2, 5, 6, 6, 7], [2, 2, 2, 5, 9, 10], [2, 2, 2, 6, 8, 10], [2, 2, 2, 6, 9, 9], [2, 2, 2, 7, 7, 10], [2, 2, 2, 7, 8, 9], [2, 2, 2, 8, 8, 8], [2, 2, 3, 3, 3, 4, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4, 9], [2, 2, 3, 3, 3, 4, 5, 8], [2, 2, 3, 3, 3, 4, 6, 7], [2, 2, 3, 3, 3, 5, 5, 7], [2, 2, 3, 3, 3, 5, 6, 6], [2, 2, 3, 3, 3, 7, 10], [2, 2, 3, 3, 3, 8, 9], [2, 2, 3, 3, 4, 4, 4, 8], [2, 2, 3, 3, 4, 4, 5, 7], [2, 2, 3, 3, 4, 4, 6, 6], [2, 2, 3, 3, 4, 5, 5, 6], [2, 2, 3, 3, 4, 6, 10], [2, 2, 3, 3, 4, 7, 9], [2, 2, 3, 3, 4, 8, 8], [2, 2, 3, 3, 5, 5, 10], [2, 2, 3, 3, 5, 6, 9], [2, 2, 3, 3, 5, 7, 8], [2, 2, 3, 3, 6, 6, 8], [2, 2, 3, 3, 6, 7, 7], [2, 2, 3, 3, 10, 10], [2, 2, 3, 4, 4, 4, 5, 6], [2, 2, 3, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 5, 10], [2, 2, 3, 4, 4, 6, 9], [2, 2, 3, 4, 4, 7, 8], [2, 2, 3, 4, 5, 5, 9], [2, 2, 3, 4, 5, 6, 8], [2, 2, 3, 4, 5, 7, 7], [2, 2, 3, 4, 6, 6, 7], [2, 2, 3, 4, 9, 10], [2, 2, 3, 5, 5, 5, 8], [2, 2, 3, 5, 5, 6, 7], [2, 2, 3, 5, 6, 6, 6], [2, 2, 3, 5, 8, 10], [2, 2, 3, 5, 9, 9], [2, 2, 3, 6, 7, 10], [2, 2, 3, 6, 8, 9], [2, 2, 3, 7, 7, 9], [2, 2, 3, 7, 8, 8], [2, 2, 4, 4, 4, 5, 9], [2, 2, 4, 4, 4, 6, 8], [2, 2, 4, 4, 4, 7, 7], [2, 2, 4, 4, 5, 5, 8], [2, 2, 4, 4, 5, 6, 7], [2, 2, 4, 4, 6, 6, 6], [2, 2, 4, 4, 8, 10], [2, 2, 4, 4, 9, 9], [2, 2, 4, 5, 5, 5, 7], [2, 2, 4, 5, 5, 6, 6], [2, 2, 4, 5, 7, 10], [2, 2, 4, 5, 8, 9], [2, 2, 4, 6, 6, 10], [2, 2, 4, 6, 7, 9], [2, 2, 4, 6, 8, 8], [2, 2, 4, 7, 7, 8], [2, 2, 5, 5, 6, 10], [2, 2, 5, 5, 7, 9], [2, 2, 5, 5, 8, 8], [2, 2, 5, 6, 6, 9], [2, 2, 5, 6, 7, 8], [2, 2, 5, 7, 7, 7], [2, 2, 6, 6, 6, 8], [2, 2, 6, 6, 7, 7], [2, 2, 6, 10, 10], [2, 2, 7, 9, 10], [2, 2, 8, 8, 10], [2, 2, 8, 9, 9], [2, 3, 3, 3, 4, 4, 4, 7], [2, 3, 3, 3, 4, 4, 5, 6], [2, 3, 3, 3, 4, 5, 5, 5], [2, 3, 3, 3, 4, 5, 10], [2, 3, 3, 3, 4, 6, 9], [2, 3, 3, 3, 4, 7, 8], [2, 3, 3, 3, 5, 5, 9], [2, 3, 3, 3, 5, 6, 8], [2, 3, 3, 3, 5, 7, 7], [2, 3, 3, 3, 6, 6, 7], [2, 3, 3, 3, 9, 10], [2, 3, 3, 4, 4, 4, 5, 5], [2, 3, 3, 4, 4, 4, 10], [2, 3, 3, 4, 4, 5, 9], [2, 3, 3, 4, 4, 6, 8], [2, 3, 3, 4, 4, 7, 7], [2, 3, 3, 4, 5, 5, 8], [2, 3, 3, 4, 5, 6, 7], [2, 3, 3, 4, 6, 6, 6], [2, 3, 3, 4, 8, 10], [2, 3, 3, 4, 9, 9], [2, 3, 3, 5, 5, 5, 7], [2, 3, 3, 5, 5, 6, 6], [2, 3, 3, 5, 7, 10], [2, 3, 3, 5, 8, 9], [2, 3, 3, 6, 6, 10], [2, 3, 3, 6, 7, 9], [2, 3, 3, 6, 8, 8], [2, 3, 3, 7, 7, 8], [2, 3, 4, 4, 4, 5, 8], [2, 3, 4, 4, 4, 6, 7], [2, 3, 4, 4, 5, 5, 7], [2, 3, 4, 4, 5, 6, 6], [2, 3, 4, 4, 7, 10], [2, 3, 4, 4, 8, 9], [2, 3, 4, 5, 5, 5, 6], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 8, 8], [2, 3, 4, 6, 6, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 7, 7, 7], [2, 3, 5, 5, 5, 10], [2, 3, 5, 5, 6, 9], [2, 3, 5, 5, 7, 8], [2, 3, 5, 6, 6, 8], [2, 3, 5, 6, 7, 7], [2, 3, 5, 10, 10], [2, 3, 6, 6, 6, 7], [2, 3, 6, 9, 10], [2, 3, 7, 8, 10], [2, 3, 7, 9, 9], [2, 3, 8, 8, 9], [2, 4, 4, 4, 5, 5, 6], [2, 4, 4, 4, 6, 10], [2, 4, 4, 4, 7, 9], [2, 4, 4, 4, 8, 8], [2, 4, 4, 5, 5, 10], [2, 4, 4, 5, 6, 9], [2, 4, 4, 5, 7, 8], [2, 4, 4, 6, 6, 8], [2, 4, 4, 6, 7, 7], [2, 4, 4, 10, 10], [2, 4, 5, 5, 5, 9], [2, 4, 5, 5, 6, 8], [2, 4, 5, 5, 7, 7], [2, 4, 5, 6, 6, 7], [2, 4, 5, 9, 10], [2, 4, 6, 8, 10], [2, 4, 6, 9, 9], [2, 4, 7, 7, 10], [2, 4, 7, 8, 9], [2, 4, 8, 8, 8], [2, 5, 5, 5, 6, 7], [2, 5, 5, 6, 6, 6], [2, 5, 5, 8, 10], [2, 5, 5, 9, 9], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 7, 7, 9], [2, 5, 7, 8, 8], [2, 6, 6, 6, 10], [2, 6, 6, 7, 9], [2, 6, 6, 8, 8], [2, 6, 7, 7, 8], [2, 8, 10, 10], [2, 9, 9, 10], [3, 3, 3, 4, 4, 4, 9], [3, 3, 3, 4, 4, 5, 8], [3, 3, 3, 4, 4, 6, 7], [3, 3, 3, 4, 5, 5, 7], [3, 3, 3, 4, 5, 6, 6], [3, 3, 3, 4, 7, 10], [3, 3, 3, 4, 8, 9], [3, 3, 3, 5, 5, 5, 6], [3, 3, 3, 5, 6, 10], [3, 3, 3, 5, 7, 9], [3, 3, 3, 5, 8, 8], [3, 3, 3, 6, 6, 9], [3, 3, 3, 6, 7, 8], [3, 3, 3, 7, 7, 7], [3, 3, 4, 4, 4, 5, 7], [3, 3, 4, 4, 4, 6, 6], [3, 3, 4, 4, 5, 5, 6], [3, 3, 4, 4, 6, 10], [3, 3, 4, 4, 7, 9], [3, 3, 4, 4, 8, 8], [3, 3, 4, 5, 5, 10], [3, 3, 4, 5, 6, 9], [3, 3, 4, 5, 7, 8], [3, 3, 4, 6, 6, 8], [3, 3, 4, 6, 7, 7], [3, 3, 4, 10, 10], [3, 3, 5, 5, 5, 9], [3, 3, 5, 5, 6, 8], [3, 3, 5, 5, 7, 7], [3, 3, 5, 6, 6, 7], [3, 3, 5, 9, 10], [3, 3, 6, 8, 10], [3, 3, 6, 9, 9], [3, 3, 7, 7, 10], [3, 3, 7, 8, 9], [3, 3, 8, 8, 8], [3, 4, 4, 4, 5, 5, 5], [3, 4, 4, 4, 5, 10], [3, 4, 4, 4, 6, 9], [3, 4, 4, 4, 7, 8], [3, 4, 4, 5, 5, 9], [3, 4, 4, 5, 6, 8], [3, 4, 4, 5, 7, 7], [3, 4, 4, 6, 6, 7], [3, 4, 4, 9, 10], [3, 4, 5, 5, 5, 8], [3, 4, 5, 5, 6, 7], [3, 4, 5, 6, 6, 6], [3, 4, 5, 8, 10], [3, 4, 5, 9, 9], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 7, 7, 9], [3, 4, 7, 8, 8], [3, 5, 5, 5, 6, 6], [3, 5, 5, 7, 10], [3, 5, 5, 8, 9], [3, 5, 6, 6, 10], [3, 5, 6, 7, 9], [3, 5, 6, 8, 8], [3, 5, 7, 7, 8], [3, 6, 6, 6, 9], [3, 6, 6, 7, 8], [3, 6, 7, 7, 7], [3, 7, 10, 10], [3, 8, 9, 10], [3, 9, 9, 9], [4, 4, 4, 5, 5, 8], [4, 4, 4, 5, 6, 7], [4, 4, 4, 6, 6, 6], [4, 4, 4, 8, 10], [4, 4, 4, 9, 9], [4, 4, 5, 5, 5, 7], [4, 4, 5, 5, 6, 6], [4, 4, 5, 7, 10], [4, 4, 5, 8, 9], [4, 4, 6, 6, 10], [4, 4, 6, 7, 9], [4, 4, 6, 8, 8], [4, 4, 7, 7, 8], [4, 5, 5, 6, 10], [4, 5, 5, 7, 9], [4, 5, 5, 8, 8], [4, 5, 6, 6, 9], [4, 5, 6, 7, 8], [4, 5, 7, 7, 7], [4, 6, 6, 6, 8], [4, 6, 6, 7, 7], [4, 6, 10, 10], [4, 7, 9, 10], [4, 8, 8, 10], [4, 8, 9, 9], [5, 5, 5, 6, 9], [5, 5, 5, 7, 8], [5, 5, 6, 6, 8], [5, 5, 6, 7, 7], [5, 5, 10, 10], [5, 6, 6, 6, 7], [5, 6, 9, 10], [5, 7, 8, 10], [5, 7, 9, 9], [5, 8, 8, 9], [6, 6, 8, 10], [6, 6, 9, 9], [6, 7, 7, 10], [6, 7, 8, 9], [6, 8, 8, 8], [7, 7, 7, 9], [7, 7, 8, 8], [10, 10, 10]]\n assert candidate(candidates = [7, 6, 5, 4, 3, 2, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 24) == [[1, 2, 3, 4, 14], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 13], [1, 2, 3, 6, 12], [1, 2, 3, 7, 11], [1, 2, 3, 18], [1, 2, 4, 5, 12], [1, 2, 4, 6, 11], [1, 2, 4, 7, 10], [1, 2, 4, 17], [1, 2, 5, 6, 10], [1, 2, 5, 16], [1, 2, 6, 15], [1, 2, 7, 14], [1, 2, 10, 11], [1, 3, 4, 5, 11], [1, 3, 4, 6, 10], [1, 3, 4, 16], [1, 3, 5, 15], [1, 3, 6, 14], [1, 3, 7, 13], [1, 3, 20], [1, 4, 5, 14], [1, 4, 6, 13], [1, 4, 7, 12], [1, 4, 19], [1, 5, 6, 12], [1, 5, 7, 11], [1, 5, 18], [1, 6, 7, 10], [1, 6, 17], [1, 7, 16], [1, 10, 13], [1, 11, 12], [2, 3, 4, 5, 10], [2, 3, 4, 15], [2, 3, 5, 14], [2, 3, 6, 13], [2, 3, 7, 12], [2, 3, 19], [2, 4, 5, 6, 7], [2, 4, 5, 13], [2, 4, 6, 12], [2, 4, 7, 11], [2, 4, 18], [2, 5, 6, 11], [2, 5, 7, 10], [2, 5, 17], [2, 6, 16], [2, 7, 15], [2, 10, 12], [3, 4, 5, 12], [3, 4, 6, 11], [3, 4, 7, 10], [3, 4, 17], [3, 5, 6, 10], [3, 5, 16], [3, 6, 15], [3, 7, 14], [3, 10, 11], [4, 5, 15], [4, 6, 14], [4, 7, 13], [4, 20], [5, 6, 13], [5, 7, 12], [5, 19], [6, 7, 11], [6, 18], [7, 17], [10, 14], [11, 13]]\n assert candidate(candidates = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],target = 15) == [[1, 2, 3, 4, 5], [1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [1, 4, 10], [1, 5, 9], [1, 6, 8], [2, 3, 4, 6], [2, 3, 10], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6], [5, 10], [6, 9], [7, 8]]\n assert candidate(candidates = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],target = 30) == [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 15], [1, 2, 3, 4, 6, 14], [1, 2, 3, 4, 7, 13], [1, 2, 3, 4, 8, 12], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 20], [1, 2, 3, 5, 6, 13], [1, 2, 3, 5, 7, 12], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 19], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 18], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 17], [1, 2, 3, 8, 16], [1, 2, 3, 9, 15], [1, 2, 3, 10, 14], [1, 2, 3, 11, 13], [1, 2, 3, 24], [1, 2, 4, 5, 6, 12], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 18], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 17], [1, 2, 4, 7, 16], [1, 2, 4, 8, 15], [1, 2, 4, 9, 14], [1, 2, 4, 10, 13], [1, 2, 4, 11, 12], [1, 2, 4, 23], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 16], [1, 2, 5, 7, 15], [1, 2, 5, 8, 14], [1, 2, 5, 9, 13], [1, 2, 5, 10, 12], [1, 2, 5, 22], [1, 2, 6, 7, 14], [1, 2, 6, 8, 13], [1, 2, 6, 9, 12], [1, 2, 6, 10, 11], [1, 2, 6, 21], [1, 2, 7, 8, 12], [1, 2, 7, 9, 11], [1, 2, 7, 20], [1, 2, 8, 9, 10], [1, 2, 8, 19], [1, 2, 9, 18], [1, 2, 10, 17], [1, 2, 11, 16], [1, 2, 12, 15], [1, 2, 13, 14], [1, 2, 27], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 17], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 16], [1, 3, 4, 7, 15], [1, 3, 4, 8, 14], [1, 3, 4, 9, 13], [1, 3, 4, 10, 12], [1, 3, 4, 22], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 15], [1, 3, 5, 7, 14], [1, 3, 5, 8, 13], [1, 3, 5, 9, 12], [1, 3, 5, 10, 11], [1, 3, 5, 21], [1, 3, 6, 7, 13], [1, 3, 6, 8, 12], [1, 3, 6, 9, 11], [1, 3, 6, 20], [1, 3, 7, 8, 11], [1, 3, 7, 9, 10], [1, 3, 7, 19], [1, 3, 8, 18], [1, 3, 9, 17], [1, 3, 10, 16], [1, 3, 11, 15], [1, 3, 12, 14], [1, 3, 26], [1, 4, 5, 6, 14], [1, 4, 5, 7, 13], [1, 4, 5, 8, 12], [1, 4, 5, 9, 11], [1, 4, 5, 20], [1, 4, 6, 7, 12], [1, 4, 6, 8, 11], [1, 4, 6, 9, 10], [1, 4, 6, 19], [1, 4, 7, 8, 10], [1, 4, 7, 18], [1, 4, 8, 17], [1, 4, 9, 16], [1, 4, 10, 15], [1, 4, 11, 14], [1, 4, 12, 13], [1, 4, 25], [1, 5, 6, 7, 11], [1, 5, 6, 8, 10], [1, 5, 6, 18], [1, 5, 7, 8, 9], [1, 5, 7, 17], [1, 5, 8, 16], [1, 5, 9, 15], [1, 5, 10, 14], [1, 5, 11, 13], [1, 5, 24], [1, 6, 7, 16], [1, 6, 8, 15], [1, 6, 9, 14], [1, 6, 10, 13], [1, 6, 11, 12], [1, 6, 23], [1, 7, 8, 14], [1, 7, 9, 13], [1, 7, 10, 12], [1, 7, 22], [1, 8, 9, 12], [1, 8, 10, 11], [1, 8, 21], [1, 9, 20], [1, 10, 19], [1, 11, 18], [1, 12, 17], [1, 13, 16], [1, 14, 15], [1, 29], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 16], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 15], [2, 3, 4, 7, 14], [2, 3, 4, 8, 13], [2, 3, 4, 9, 12], [2, 3, 4, 10, 11], [2, 3, 4, 21], [2, 3, 5, 6, 14], [2, 3, 5, 7, 13], [2, 3, 5, 8, 12], [2, 3, 5, 9, 11], [2, 3, 5, 20], [2, 3, 6, 7, 12], [2, 3, 6, 8, 11], [2, 3, 6, 9, 10], [2, 3, 6, 19], [2, 3, 7, 8, 10], [2, 3, 7, 18], [2, 3, 8, 17], [2, 3, 9, 16], [2, 3, 10, 15], [2, 3, 11, 14], [2, 3, 12, 13], [2, 3, 25], [2, 4, 5, 6, 13], [2, 4, 5, 7, 12], [2, 4, 5, 8, 11], [2, 4, 5, 9, 10], [2, 4, 5, 19], [2, 4, 6, 7, 11], [2, 4, 6, 8, 10], [2, 4, 6, 18], [2, 4, 7, 8, 9], [2, 4, 7, 17], [2, 4, 8, 16], [2, 4, 9, 15], [2, 4, 10, 14], [2, 4, 11, 13], [2, 4, 24], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 6, 17], [2, 5, 7, 16], [2, 5, 8, 15], [2, 5, 9, 14], [2, 5, 10, 13], [2, 5, 11, 12], [2, 5, 23], [2, 6, 7, 15], [2, 6, 8, 14], [2, 6, 9, 13], [2, 6, 10, 12], [2, 6, 22], [2, 7, 8, 13], [2, 7, 9, 12], [2, 7, 10, 11], [2, 7, 21], [2, 8, 9, 11], [2, 8, 20], [2, 9, 19], [2, 10, 18], [2, 11, 17], [2, 12, 16], [2, 13, 15], [2, 28], [3, 4, 5, 6, 12], [3, 4, 5, 7, 11], [3, 4, 5, 8, 10], [3, 4, 5, 18], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 6, 17], [3, 4, 7, 16], [3, 4, 8, 15], [3, 4, 9, 14], [3, 4, 10, 13], [3, 4, 11, 12], [3, 4, 23], [3, 5, 6, 7, 9], [3, 5, 6, 16], [3, 5, 7, 15], [3, 5, 8, 14], [3, 5, 9, 13], [3, 5, 10, 12], [3, 5, 22], [3, 6, 7, 14], [3, 6, 8, 13], [3, 6, 9, 12], [3, 6, 10, 11], [3, 6, 21], [3, 7, 8, 12], [3, 7, 9, 11], [3, 7, 20], [3, 8, 9, 10], [3, 8, 19], [3, 9, 18], [3, 10, 17], [3, 11, 16], [3, 12, 15], [3, 13, 14], [3, 27], [4, 5, 6, 7, 8], [4, 5, 6, 15], [4, 5, 7, 14], [4, 5, 8, 13], [4, 5, 9, 12], [4, 5, 10, 11], [4, 5, 21], [4, 6, 7, 13], [4, 6, 8, 12], [4, 6, 9, 11], [4, 6, 20], [4, 7, 8, 11], [4, 7, 9, 10], [4, 7, 19], [4, 8, 18], [4, 9, 17], [4, 10, 16], [4, 11, 15], [4, 12, 14], [4, 26], [5, 6, 7, 12], [5, 6, 8, 11], [5, 6, 9, 10], [5, 6, 19], [5, 7, 8, 10], [5, 7, 18], [5, 8, 17], [5, 9, 16], [5, 10, 15], [5, 11, 14], [5, 12, 13], [5, 25], [6, 7, 8, 9], [6, 7, 17], [6, 8, 16], [6, 9, 15], [6, 10, 14], [6, 11, 13], [6, 24], [7, 8, 15], [7, 9, 14], [7, 10, 13], [7, 11, 12], [7, 23], [8, 9, 13], [8, 10, 12], [8, 22], [9, 10, 11], [9, 21], [10, 20], [11, 19], [12, 18], [13, 17], [14, 16], [30]]\n assert candidate(candidates = [2, 3, 6, 7, 2, 5, 5, 10],target = 15) == [[2, 2, 5, 6], [2, 3, 5, 5], [2, 3, 10], [2, 6, 7], [3, 5, 7], [5, 10]]\n", "comparison": "exact"}, "public_tests": ["[10,1,2,7,6,1,5]\n8", "[2,5,2,1,2]\n5"], "hints": [], "metadata": {"canonical_parameter_names": ["candidates", "target"], "leetcode_dataset_entry_point": "Solution().combinationSum2", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:36:58+00:00", "tests_total": 102, "tests_dropped": 23, "flags": [], "topic_tags": ["array", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def combination_sum2(candidates, target)", "container": null, "callable": "combination_sum2", "parameters": [{"name": "candidates", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 41, "task_id": "first-missing-positive", "difficulty": "Hard", "problem_description": "Given an unsorted integer array nums. Return the smallest positive integer that is not present in nums.\n\nYou must implement an algorithm that runs in O(n) time and uses O(1) auxiliary space.\n\nExample 1:\n\nInput: nums = [1,2,0]\nOutput: 3\nExplanation: The numbers in the range [1,2] are all in the array.\n\nExample 2:\n\nInput: nums = [3,4,-1,1]\nOutput: 2\nExplanation: 1 is in the array but 2 is missing.\n\nExample 3:\n\nInput: nums = [7,8,9,11,12]\nOutput: 1\nExplanation: The smallest positive integer 1 is missing.\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -2^31 <= nums[i] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1000000, -1000000, 500000]) == 1\n assert candidate(nums = [1000000, -1000000, 1]) == 2\n assert candidate(nums = [1, 1, 1, 1]) == 2\n assert candidate(nums = [1, 1, 2, 2]) == 3\n assert candidate(nums = [2147483647, 1, 2, 0]) == 3\n assert candidate(nums = [-1, -2, -3]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [1]) == 2\n assert candidate(nums = [2]) == 1\n assert candidate(nums = [7, 8, 9, 11, 12]) == 1\n assert candidate(nums = [0, -1, -2]) == 1\n assert candidate(nums = [1, 3, 2]) == 4\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [0]) == 1\n assert candidate(nums = [2147483647, -2147483648, 0]) == 1\n assert candidate(nums = [0, -1, -2, -3]) == 1\n assert candidate(nums = [1000000, -1000000, 0]) == 1\n assert candidate(nums = [1, 2, 3]) == 4\n assert candidate(nums = [3, 4, -1, 1]) == 2\n assert candidate(nums = [1000000, 1000001, 1000002]) == 1\n assert candidate(nums = [2, 2]) == 1\n assert candidate(nums = [1, 2, 0]) == 3\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 11\n assert candidate(nums = [7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n assert candidate(nums = [2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1, 2, 2, 3, 1]) == 4\n assert candidate(nums = [-10, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 11\n assert candidate(nums = [3, 4, -1, 1, 2, 5]) == 6\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25]) == 21\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1]) == 11\n assert candidate(nums = [100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000]) == 1\n assert candidate(nums = [3, 1, -1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 20\n assert candidate(nums = [2147483647, -2147483648, 0, 1, 2, 3, 4, 5]) == 6\n assert candidate(nums = [5, 3, 5, 2, 3, 3, 9, 0, 123, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 101\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 21\n assert candidate(nums = [1, 2, 0, 4, 6, 3, 8, 5, 7]) == 9\n assert candidate(nums = [2, 3, 1, -1, -2, -3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 21\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, -1, -2, -3, -4, -5]) == 21\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 1\n assert candidate(nums = [1, 2, 0, 5, 3, 7, 8, 9, 4, 6]) == 10\n assert candidate(nums = [5, 3, 2, 1, 4, 6, 8, 7, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 41\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0]) == 30\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 11\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 20\n assert candidate(nums = [-10, -20, -30, -40, -50, 100, 200, 300, 400, 500]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == 11\n assert candidate(nums = [-5, -4, -3, -2, -1]) == 1\n assert candidate(nums = [100000, 100001, 100002, 100003, 100004, 100005, 100006, 100007, 100008, 100009, 100010, 100011, 100012, 100013, 100014, 100015, 100016, 100017, 100018, 100019]) == 1\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22]) == 21\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 1\n assert candidate(nums = [2, 3, -7, 6, 8, 1, -10, 15]) == 4\n assert candidate(nums = [1, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 3\n assert candidate(nums = [0, 2, 2, 1, 3, 5, 4]) == 6\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == 1\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 3\n assert candidate(nums = [3, 4, -1, 1, 5, 2]) == 6\n assert candidate(nums = [3, 2, 1, 5, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 31\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991]) == 1\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [5, 3, 1, 2, 4, 6, 8, 7, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 31\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [100000, 100001, 100002, 100003, 100004, 100005, 100006, 100007, 100008, 100009, 1]) == 2\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [100000, 100001, 100002, 100003, 100004, 100005, 100006, 100007, 100008, 100009, -1]) == 1\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6]) == 7\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30]) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 26\n assert candidate(nums = [1000000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == 11\n assert candidate(nums = [-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991, -99990, -99989, -99988, -99987, -99986, -99985, -99984, -99983, -99982, -99981]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 41\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 1\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 11\n assert candidate(nums = [5, 3, 4, 1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 6\n assert candidate(nums = [3, 4, -1, 1, 5, 6, 2]) == 7\n assert candidate(nums = [5, 3, 1, 2, 4, 6, 8, 7, 9, 11, 10, 13, 12, 14, 15, 16, 17, 18, 19, 20]) == 21\n assert candidate(nums = [10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 31\n assert candidate(nums = [2147483647, -2147483648, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 10\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 21\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 11\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 4\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 1\n assert candidate(nums = [3, 4, -1, 1, 5, 2, 7, 8, 9, 10]) == 6\n assert candidate(nums = [100, 4, 200, 1, 3, 2]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 16\n assert candidate(nums = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32]) == 31\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [2147483647, -2147483648, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200]) == 1\n assert candidate(nums = [100000, 100001, 100002, 100003, 100004, 100005, 100006, 100007, 100008, 100009, 100010]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, -1, -2, -3]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 21\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 11]) == 10\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 6\n assert candidate(nums = [1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 3\n assert candidate(nums = [5, 3, 1, 4, 2, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 21\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 2\n assert candidate(nums = [1, 2, 0, 0, 0, 0, 0]) == 3\n assert candidate(nums = [3, 5, -2, 1, 4, 2, 3, 6]) == 7\n assert candidate(nums = [1, 2, 0, 4, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21]) == 20\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 1\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [0, -1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [1, 1000000, 2, 999999, 3, 999998, 4, 999997, 5, 999996, 6, 999995, 7, 999994, 8, 999993, 9, 999992, 10, 999991, 11, 999990, 12, 999989, 13, 999988, 14, 999987, 15, 999986, 16, 999985, 17, 999984, 18, 999983, 19, 999982, 20, 999981, 21, 999980, 22, 999979, 23, 999978, 24, 999977, 25, 999976, 26, 999975, 27, 999974, 28, 999973, 29, 999972, 30, 999971, 31, 999970, 32, 999969, 33, 999968, 34, 999967, 35, 999966, 36, 999965, 37, 999964, 38, 999963, 39, 999962, 40, 999961, 41, 999960, 42, 999959, 43, 999958, 44, 999957, 45, 999956, 46, 999955, 47, 999954, 48, 999953, 49, 999952, 50, 999951]) == 51\n assert candidate(nums = [3, 5, -7, 1, 2, 4, 6, 8, 9, 10]) == 7\n assert candidate(nums = [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [5, 1, 4, 3, 2]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, -1, -2, -3, -4, -5]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, -1, -2, -3, -4, -5]) == 16\n", "comparison": "exact"}, "public_tests": ["[1,2,0]", "[3,4,-1,1]", "[7,8,9,11,12]"], "hints": ["Think about how you would solve the problem in non-constant space. Can you apply that logic to the existing space?", "We don't care about duplicates or non-positive integers", "Remember that O(2n) = O(n)"], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().firstMissingPositive", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:00+00:00", "tests_total": 126, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "hash-table"]}, "language": "ruby", "interface": {"raw_signature": "def first_missing_positive(nums)", "container": null, "callable": "first_missing_positive", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 42, "task_id": "trapping-rain-water", "difficulty": "Hard", "problem_description": "Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.\n\nExample 1:\n\nInput: height = [0,1,0,2,1,0,1,3,2,1,2,1]\nOutput: 6\nExplanation: The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped.\n\nExample 2:\n\nInput: height = [4,2,0,3,2,5]\nOutput: 9\n\nConstraints:\n\n- n == height.length\n- 1 <= n <= 2 * 10^4\n- 0 <= height[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(height = [3, 1, 2, 1, 4, 3, 2, 1, 5]) == 11\n assert candidate(height = [3, 0, 1, 3, 0, 1, 3]) == 10\n assert candidate(height = [5, 4, 3, 2, 1]) == 0\n assert candidate(height = [1]) == 0\n assert candidate(height = [2, 0, 2]) == 2\n assert candidate(height = [0, 0, 1, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(height = [1, 1, 1, 1, 1, 1]) == 0\n assert candidate(height = [1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 1, 2]) == 12\n assert candidate(height = [1, 2, 1, 0, 1, 0, 1, 0, 1, 2, 1]) == 10\n assert candidate(height = [0, 0, 0, 0, 0]) == 0\n assert candidate(height = [1, 2, 3, 4, 5, 4, 3, 2, 1]) == 0\n assert candidate(height = [0, 0, 0, 0]) == 0\n assert candidate(height = [5, 4, 1, 2]) == 1\n assert candidate(height = [3, 0, 1, 3, 0, 1, 1, 3, 2, 1, 2, 1]) == 13\n assert candidate(height = [4, 2, 0, 3, 2, 5]) == 9\n assert candidate(height = [3, 0, 0, 2, 0, 4]) == 10\n assert candidate(height = [5, 4, 3, 2, 1, 2, 3, 4, 5]) == 16\n assert candidate(height = [1, 0, 2, 0, 1, 0, 3, 1, 0, 1, 2]) == 10\n assert candidate(height = [0, 2, 0, 2, 0]) == 2\n assert candidate(height = [1, 0, 0, 0, 1]) == 3\n assert candidate(height = [3, 0, 1, 3, 0, 1, 2, 1, 2, 1]) == 9\n assert candidate(height = [0, 5, 0, 5, 0]) == 5\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]) == 6\n assert candidate(height = [1, 0, 1, 0, 1]) == 2\n assert candidate(height = [1, 2, 3, 4, 5]) == 0\n assert candidate(height = [2, 1, 0, 2]) == 3\n assert candidate(height = [10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == 81\n assert candidate(height = [0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 0]) == 36\n assert candidate(height = [10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10, 0, 10]) == 60\n assert candidate(height = [6, 4, 2, 0, 3, 2, 0, 3, 1, 4, 5, 3, 2, 7, 5, 3, 0, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1]) == 52\n assert candidate(height = [10, 0, 10, 0, 10, 0, 10, 0, 10]) == 40\n assert candidate(height = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 25\n assert candidate(height = [100, 80, 60, 40, 20, 0, 20, 40, 60, 80, 100]) == 500\n assert candidate(height = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 6\n assert candidate(height = [0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1]) == 12\n assert candidate(height = [10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(height = [0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0]) == 50\n assert candidate(height = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 8\n assert candidate(height = [1, 2, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 0, 3, 2, 1, 2, 1, 5]) == 21\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 4, 3, 2, 1, 2, 1, 0, 1]) == 13\n assert candidate(height = [6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6]) == 25\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7]) == 19\n assert candidate(height = [0, 1, 2, 1, 0, 1, 3, 1, 0, 1, 2, 1, 0]) == 8\n assert candidate(height = [10, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == 72\n assert candidate(height = [0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 0]) == 5\n assert candidate(height = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 0, 0, 1, 2, 3, 4, 5]) == 35\n assert candidate(height = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 4, 2, 1, 3, 2, 1, 2, 1]) == 15\n assert candidate(height = [10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 25\n assert candidate(height = [5, 2, 1, 2, 1, 5, 1, 2, 1, 5, 1, 2, 1, 2, 1, 5]) == 43\n assert candidate(height = [2, 1, 0, 1, 2]) == 4\n assert candidate(height = [10, 0, 10, 0, 10, 0, 10]) == 30\n assert candidate(height = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 9\n assert candidate(height = [1, 0, 2, 0, 1, 0, 1, 3, 2, 1, 2, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]) == 42\n assert candidate(height = [2, 8, 5, 5, 5, 9, 8, 9, 2]) == 10\n assert candidate(height = [1, 7, 8, 8, 6, 4, 3, 1, 1, 0, 1, 7, 6, 5, 4, 3, 2, 1, 0, 1, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1]) == 40\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(height = [1, 2, 3, 4, 3, 2, 1, 0, 1, 0, 1, 2, 3, 2, 1]) == 14\n assert candidate(height = [5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0]) == 18\n assert candidate(height = [4, 2, 0, 6, 2, 3, 8, 0, 4, 4, 1, 2, 2, 2, 3, 3, 4, 0, 1, 0, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2]) == 39\n assert candidate(height = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(height = [2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0]) == 18\n assert candidate(height = [1, 2, 3, 0, 1, 2, 0, 1, 2, 0, 1, 2]) == 9\n assert candidate(height = [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 23\n assert candidate(height = [0, 5, 4, 3, 2, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == 37\n assert candidate(height = [2, 1, 0, 1, 2, 1, 0, 1, 2, 1]) == 8\n assert candidate(height = [0, 1, 2, 3, 2, 1, 0, 1, 2, 1, 0]) == 4\n assert candidate(height = [1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 2, 1, 0]) == 16\n assert candidate(height = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 81\n assert candidate(height = [3, 0, 1, 3, 0, 1, 2, 0, 2]) == 10\n assert candidate(height = [5, 0, 3, 0, 0, 0, 2, 0, 4, 0, 0, 1, 0, 0, 5]) == 55\n assert candidate(height = [3, 0, 3, 0, 3, 0, 3, 0, 3, 0]) == 12\n assert candidate(height = [0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5]) == 50\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(height = [0, 2, 0, 2, 0, 3, 0, 3, 0, 2, 0, 2]) == 11\n assert candidate(height = [3, 0, 1, 0, 2, 0, 1, 0, 3, 0, 2, 0, 1, 0]) == 20\n assert candidate(height = [5, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 5, 1, 2, 1, 2, 1, 5]) == 86\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 0, 1, 2, 1, 0, 2, 1, 0]) == 13\n assert candidate(height = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 4\n assert candidate(height = [0, 1, 2, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 0, 3, 2, 1, 2, 1, 0, 5, 0, 4]) == 28\n assert candidate(height = [0, 2, 0, 2, 0, 3, 0, 3, 0, 4]) == 10\n assert candidate(height = [5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 0, 5, 4, 3, 2, 1]) == 30\n assert candidate(height = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 52\n assert candidate(height = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 6\n assert candidate(height = [4, 2, 0, 3, 2, 5, 0, 5, 2, 3, 0, 2, 4, 0, 5]) == 33\n assert candidate(height = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]) == 5\n assert candidate(height = [3, 2, 1, 2, 3]) == 4\n assert candidate(height = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 7\n assert candidate(height = [1, 8, 6, 2, 5, 4, 8, 3, 7, 9, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]) == 35\n assert candidate(height = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 9\n assert candidate(height = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 12\n assert candidate(height = [4, 2, 3, 0, 3, 5, 3, 2, 1, 5, 3, 0, 3, 5, 3, 0, 3, 5, 2, 1]) == 35\n assert candidate(height = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 5\n assert candidate(height = [7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7]) == 36\n assert candidate(height = [3, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 6\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 4, 2, 1, 0, 1, 3]) == 19\n assert candidate(height = [1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1]) == 12\n assert candidate(height = [1, 2, 3, 0, 1, 0, 2, 0, 3, 0, 2, 0, 1, 0, 3]) == 24\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7]) == 49\n assert candidate(height = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 100\n assert candidate(height = [3, 0, 1, 0, 2, 0, 4, 0, 3, 0, 5, 0]) == 21\n assert candidate(height = [5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5]) == 35\n assert candidate(height = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 0, 3, 2, 1, 2, 1]) == 15\n assert candidate(height = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 9\n assert candidate(height = [0, 1, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1, 0, 1, 0, 1, 3, 2, 1, 2, 1]) == 22\n assert candidate(height = [2, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2]) == 13\n assert candidate(height = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 6\n assert candidate(height = [5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5]) == 60\n assert candidate(height = [1, 3, 2, 4, 1, 3, 1, 4, 5, 2, 2, 1]) == 8\n assert candidate(height = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]) == 12\n assert candidate(height = [5, 5, 5, 5, 5, 1, 5, 5, 5, 5, 5]) == 4\n assert candidate(height = [5, 2, 1, 2, 1, 5]) == 14\n assert candidate(height = [0, 2, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]) == 7\n assert candidate(height = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(height = [2, 0, 2, 0, 2, 0, 2]) == 6\n assert candidate(height = [0, 1, 2, 0, 2, 1, 0, 1, 3, 2, 1, 2, 1]) == 7\n assert candidate(height = [0, 2, 0, 2, 0, 3, 0, 3, 0, 2, 0, 2, 0]) == 11\n assert candidate(height = [5, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 5]) == 36\n assert candidate(height = [3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0]) == 0\n assert candidate(height = [6, 4, 2, 0, 3, 0, 1, 4, 6, 2, 3, 5, 1, 0, 5, 4, 3, 2, 1, 0]) == 42\n assert candidate(height = [5, 0, 3, 0, 0, 5, 0, 0, 2, 4]) == 27\n assert candidate(height = [3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1]) == 16\n assert candidate(height = [5, 5, 1, 7, 1, 1, 5, 2, 7, 6]) == 23\n assert candidate(height = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 9\n assert candidate(height = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n", "comparison": "exact"}, "public_tests": ["[0,1,0,2,1,0,1,3,2,1,2,1]", "[4,2,0,3,2,5]"], "hints": [], "metadata": {"canonical_parameter_names": ["height"], "leetcode_dataset_entry_point": "Solution().trap", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:02+00:00", "tests_total": 128, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "two-pointers", "dynamic-programming", "stack", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def trap(height)", "container": null, "callable": "trap", "parameters": [{"name": "height", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 43, "task_id": "multiply-strings", "difficulty": "Medium", "problem_description": "Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string.\n\nNote: You must not use any built-in BigInteger library or convert the inputs to integer directly.\n\nExample 1:\n\nInput: num1 = \"2\", num2 = \"3\"\nOutput: \"6\"\n\nExample 2:\n\nInput: num1 = \"123\", num2 = \"456\"\nOutput: \"56088\"\n\nConstraints:\n\n- 1 <= num1.length, num2.length <= 200\n- num1 and num2 consist of digits only.\n- Both num1 and num2 do not contain any leading zero, except the number 0 itself.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num1 = \"999999999999999999\",num2 = \"888888888888888888\") == \"888888888888888887111111111111111112\"\n assert candidate(num1 = \"0\",num2 = \"12345\") == \"0\"\n assert candidate(num1 = \"2\",num2 = \"3\") == \"6\"\n assert candidate(num1 = \"123456789\",num2 = \"987654321\") == \"121932631112635269\"\n assert candidate(num1 = \"1000\",num2 = \"1000\") == \"1000000\"\n assert candidate(num1 = \"10\",num2 = \"10\") == \"100\"\n assert candidate(num1 = \"0\",num2 = \"123\") == \"0\"\n assert candidate(num1 = \"1\",num2 = \"1\") == \"1\"\n assert candidate(num1 = \"0\",num2 = \"5678\") == \"0\"\n assert candidate(num1 = \"100\",num2 = \"200\") == \"20000\"\n assert candidate(num1 = \"100\",num2 = \"100\") == \"10000\"\n assert candidate(num1 = \"0\",num2 = \"567\") == \"0\"\n assert candidate(num1 = \"999\",num2 = \"999\") == \"998001\"\n assert candidate(num1 = \"1111\",num2 = \"1111\") == \"1234321\"\n assert candidate(num1 = \"123\",num2 = \"456\") == \"56088\"\n assert candidate(num1 = \"987654321\",num2 = \"123456789\") == \"121932631112635269\"\n assert candidate(num1 = \"100000000000000000000\",num2 = \"2\") == \"200000000000000000000\"\n assert candidate(num1 = \"99999999999999999999\",num2 = \"99999999999999999999\") == \"9999999999999999999800000000000000000001\"\n assert candidate(num1 = \"5\",num2 = \"67890\") == \"339450\"\n assert candidate(num1 = \"500000000000000000\",num2 = \"300000000000000000\") == \"150000000000000000000000000000000000\"\n assert candidate(num1 = \"100000000000000000000\",num2 = \"99999999999999999999\") == \"9999999999999999999900000000000000000000\"\n assert candidate(num1 = \"123456789012345678901234567890\",num2 = \"987654321098765432109876543210\") == \"121932631137021795226185032733622923332237463801111263526900\"\n assert candidate(num1 = \"22222222222222222222\",num2 = \"33333333333333333333\") == \"740740740740740740725925925925925925926\"\n assert candidate(num1 = \"19999999999999999999\",num2 = \"2\") == \"39999999999999999998\"\n assert candidate(num1 = \"2718281828459045235360287471352662497757247093699997\",num2 = \"3141592653589793238462643383279502884197169399375105\") == \"8539734222673567065463550869546574495034888535765230304447162480822019507433994115871905265874140374685\"\n assert candidate(num1 = \"9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\",num2 = \"9\") == \"89999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999991\"\n assert candidate(num1 = \"123456789\",num2 = \"9876543210987654321\") == \"1219326311248285321112635269\"\n assert candidate(num1 = \"56789012345678901234\",num2 = \"43210987654321098765\") == \"2453909311370219463200426613308794376010\"\n assert candidate(num1 = \"2\",num2 = \"99999999999999999999\") == \"199999999999999999998\"\n assert candidate(num1 = \"1\",num2 = \"20000000000000000000\") == \"20000000000000000000\"\n assert candidate(num1 = \"99\",num2 = \"99\") == \"9801\"\n assert candidate(num1 = \"999999999999999999999999999999999999999999999999999\",num2 = \"888888888888888888888888888888888888888888888888888\") == \"888888888888888888888888888888888888888888888888887111111111111111111111111111111111111111111111111112\"\n assert candidate(num1 = \"1111111111\",num2 = \"11111111111111111111\") == \"12345679011111111110987654321\"\n assert candidate(num1 = \"18446744073709551615\",num2 = \"18446744073709551615\") == \"340282366920938463426481119284349108225\"\n assert candidate(num1 = \"1234567890\",num2 = \"0\") == \"0\"\n assert candidate(num1 = \"9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\",num2 = \"9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\") == \"99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\"\n assert candidate(num1 = \"10000000000000000000\",num2 = \"10000000000000000000\") == \"100000000000000000000000000000000000000\"\n assert candidate(num1 = \"50000000000000000000\",num2 = \"50000000000000000000\") == \"2500000000000000000000000000000000000000\"\n assert candidate(num1 = \"1234567890123456789012345678901234567890\",num2 = \"9876543210987654321098765432109876543210\") == \"12193263113702179522618503273386678859448712086533622923332237463801111263526900\"\n assert candidate(num1 = \"1000000000000000000000000000000\",num2 = \"2\") == \"2000000000000000000000000000000\"\n assert candidate(num1 = \"11111111111111111111111111111111111111111111111111\",num2 = \"11111111111111111111111111111111111111111111111111\") == \"123456790123456790123456790123456790123456790123454320987654320987654320987654320987654320987654321\"\n assert candidate(num1 = \"0\",num2 = \"0\") == \"0\"\n assert candidate(num1 = \"9\",num2 = \"9\") == \"81\"\n assert candidate(num1 = \"1\",num2 = \"9999999999999999999999999999999999999999999999999\") == \"9999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"99999999999999999999\",num2 = \"1\") == \"99999999999999999999\"\n assert candidate(num1 = \"55555555555555555555\",num2 = \"22222222222222222222\") == \"1234567901234567901209876543209876543210\"\n assert candidate(num1 = \"0\",num2 = \"1234567890\") == \"0\"\n assert candidate(num1 = \"1111111111111111111111111111111111111111111111111111\",num2 = \"2\") == \"2222222222222222222222222222222222222222222222222222\"\n assert candidate(num1 = \"987654321\",num2 = \"1234567890123456789\") == \"1219326311248285321112635269\"\n assert candidate(num1 = \"1234567890\",num2 = \"9876543210\") == \"12193263111263526900\"\n assert candidate(num1 = \"56789012345678901234567890\",num2 = \"98765432109876543210987654\") == \"5608791343414090382626730132663060260783452814830060\"\n assert candidate(num1 = \"9999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"9999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"10000000000000000000000000000000000000000000000000\",num2 = \"10000000000000000000000000000000000000000000000000\") == \"100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"999999999999999999\",num2 = \"999999999999999999\") == \"999999999999999998000000000000000001\"\n assert candidate(num1 = \"55555555555555555555\",num2 = \"55555555555555555555\") == \"3086419753086419753024691358024691358025\"\n assert candidate(num1 = \"1111111111111111111111111111111111111111111111111111\",num2 = \"999999999999999999999999999999999999999999999999999\") == \"1111111111111111111111111111111111111111111111111109888888888888888888888888888888888888888888888888889\"\n assert candidate(num1 = \"5000000000\",num2 = \"5000000000\") == \"25000000000000000000\"\n assert candidate(num1 = \"9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"1234567890123456789\",num2 = \"1234567890123456789\") == \"1524157875323883675019051998750190521\"\n assert candidate(num1 = \"12345678901234567890\",num2 = \"98765432109876543210\") == \"1219326311370217952237463801111263526900\"\n assert candidate(num1 = \"54321098765432109876543210987654321098765432109876543210987654321098765432109876543210\",num2 = \"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\") == \"6706308429202743325773485580862669682914799080774333119325718633057400395418222892752948635258986434993786160646167367779295611949397448712086533622923332237463801111263526900\"\n assert candidate(num1 = \"9\",num2 = \"99999999999999999999\") == \"899999999999999999991\"\n assert candidate(num1 = \"271828182845904523536028747135266249775724709369995\",num2 = \"314159265358979323846264338327950288419716939937510\") == \"85397342226735670654635508695465744950348885357650690581833014653136349617576232159238592126769012450\"\n assert candidate(num1 = \"1000000000\",num2 = \"1000000000\") == \"1000000000000000000\"\n assert candidate(num1 = \"1\",num2 = \"1000000000000000000000000000000000000000000000000000\") == \"1000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"9999\",num2 = \"1111\") == \"11108889\"\n assert candidate(num1 = \"1000000000000000000000000000000000000000000000000000\",num2 = \"1000000000000000000000000000000000000000000000000000\") == \"1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"98765432109876543210\",num2 = \"12345678901234567890\") == \"1219326311370217952237463801111263526900\"\n assert candidate(num1 = \"200\",num2 = \"300\") == \"60000\"\n assert candidate(num1 = \"9876543210987654321\",num2 = \"9876543210987654321\") == \"97546105798506325256774881877789971041\"\n assert candidate(num1 = \"11111111111111111111\",num2 = \"11111111111111111111\") == \"123456790123456790120987654320987654321\"\n", "comparison": "exact"}, "public_tests": ["\"2\"\n\"3\"", "\"123\"\n\"456\""], "hints": [], "metadata": {"canonical_parameter_names": ["num1", "num2"], "leetcode_dataset_entry_point": "Solution().multiply", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:04+00:00", "tests_total": 71, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def multiply(num1, num2)", "container": null, "callable": "multiply", "parameters": [{"name": "num1", "type": "String"}, {"name": "num2", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 44, "task_id": "wildcard-matching", "difficulty": "Hard", "problem_description": "Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where:\n\n- '?' Matches any single character.\n- '*' Matches any sequence of characters (including the empty sequence).\n\nThe matching should cover the entire input string (not partial).\n\nExample 1:\n\nInput: s = \"aa\", p = \"a\"\nOutput: false\nExplanation: \"a\" does not match the entire string \"aa\".\n\nExample 2:\n\nInput: s = \"aa\", p = \"*\"\nOutput: true\nExplanation: '*' matches any sequence.\n\nExample 3:\n\nInput: s = \"cb\", p = \"?a\"\nOutput: false\nExplanation: '?' matches 'c', but the second letter is 'a', which does not match 'b'.\n\nConstraints:\n\n- 0 <= s.length, p.length <= 2000\n- s contains only lowercase English letters.\n- p contains only lowercase English letters, '?' or '*'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcde\",p = \"ab*e\") == True\n assert candidate(s = \"abcde\",p = \"*\") == True\n assert candidate(s = \"mississippi\",p = \"m??*ss*?i*pi\") == False\n assert candidate(s = \"aa\",p = \"a\") == False\n assert candidate(s = \"abcde\",p = \"?bcde\") == True\n assert candidate(s = \"abcde\",p = \"a*b*e\") == True\n assert candidate(s = \"cb\",p = \"?a\") == False\n assert candidate(s = \"abcabczzzde\",p = \"*abc***de*\") == True\n assert candidate(s = \"abcde\",p = \"abc?de\") == False\n assert candidate(s = \"\",p = \"\") == True\n assert candidate(s = \"abcde\",p = \"b*c*d*e*\") == False\n assert candidate(s = \"abcde\",p = \"a?c*e\") == True\n assert candidate(s = \"abefcdgiescdfimde\",p = \"*a*b*ef*cd*ei*de*\") == False\n assert candidate(s = \"abcde\",p = \"*****e\") == True\n assert candidate(s = \"aa\",p = \"*\") == True\n assert candidate(s = \"abcde\",p = \"a*de\") == True\n assert candidate(s = \"adceb\",p = \"*a*b\") == True\n assert candidate(s = \"abcde\",p = \"*****\") == True\n assert candidate(s = \"abcde\",p = \"a*****\") == True\n assert candidate(s = \"acdcb\",p = \"a*c?b\") == False\n assert candidate(s = \"a\",p = \"?\") == True\n assert candidate(s = \"mississippi\",p = \"m*iss*iss*pp*i*pi\") == False\n assert candidate(s = \"abcde\",p = \"a?c?e\") == True\n assert candidate(s = \"abcde\",p = \"a*e?\") == False\n assert candidate(s = \"abcde\",p = \"a*b?e\") == False\n assert candidate(s = \"abcde\",p = \"*b*c*d*e*\") == True\n assert candidate(s = \"abcde\",p = \"a*e\") == True\n assert candidate(s = \"abcde\",p = \"*a*bc*e*\") == True\n assert candidate(s = \"abcde\",p = \"*b*c*d*e\") == True\n assert candidate(s = \"abcde\",p = \"a*b*c*d*e*f\") == False\n assert candidate(s = \"abefcdgiescdfimde\",p = \"ab*ef*cd*ei*de\") == False\n assert candidate(s = \"abcde\",p = \"abc*def\") == False\n assert candidate(s = \"abcde\",p = \"*bcde\") == True\n assert candidate(s = \"abcde\",p = \"abcd*\") == True\n assert candidate(s = \"hoop\",p = \"hoop*\") == True\n assert candidate(s = \"mississippi\",p = \"m??*ss*?si*pp*\") == False\n assert candidate(s = \"aaaa\",p = \"***a\") == True\n assert candidate(s = \"abcde\",p = \"abc??\") == True\n assert candidate(s = \"abcde\",p = \"a*b*c*d*e*\") == True\n assert candidate(s = \"bba\",p = \"?*a**\") == True\n assert candidate(s = \"abcde\",p = \"a*b*c*d*e?\") == False\n assert candidate(s = \"\",p = \"*\") == True\n assert candidate(s = \"abcde\",p = \"abcd?\") == True\n assert candidate(s = \"abcde\",p = \"*a*b*c*d*e*f\") == False\n assert candidate(s = \"a\",p = \"*\") == True\n assert candidate(s = \"\",p = \"?\") == False\n assert candidate(s = \"abcde\",p = \"abc*e\") == True\n assert candidate(s = \"abcde\",p = \"*a*b*c*d*e*\") == True\n assert candidate(s = \"abefcdgiescdfimde\",p = \"ab*ef*cd*de\") == True\n assert candidate(s = \"abefcdgiescdfimde\",p = \"ab*cd?i*de\") == True\n assert candidate(s = \"abcde\",p = \"a*b*c*d*e\") == True\n assert candidate(s = \"abcde\",p = \"abcde\") == True\n assert candidate(s = \"aaaaa\",p = \"a*a*a*a*a\") == True\n assert candidate(s = \"abcdef\",p = \"a*b*c*d*e*f\") == True\n assert candidate(s = \"abcd\",p = \"a*d\") == True\n assert candidate(s = \"xyxzyxytxzyxy\",p = \"x*y*z*x*y*z*x*y*z\") == False\n assert candidate(s = \"xyxxyxyxyx\",p = \"x*yx*yx*yx*yx\") == True\n assert candidate(s = \"abcxyz\",p = \"*xyz\") == True\n assert candidate(s = \"abcabcabc\",p = \"a*bc*a*bc*a*bc*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*c*e*g*i*j\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*bc*de*fgh*i*j\") == True\n assert candidate(s = \"ababababab\",p = \"a*b*a*b*a*b*\") == True\n assert candidate(s = \"xyz\",p = \"*x*y*z*\") == True\n assert candidate(s = \"zxyxzy\",p = \"z*xy*z*\") == True\n assert candidate(s = \"hellohellohello\",p = \"he*lo*he*lo*\") == True\n assert candidate(s = \"xyz\",p = \"*z\") == True\n assert candidate(s = \"xyxzyzyx\",p = \"x*y*x*y*x\") == True\n assert candidate(s = \"ababababa\",p = \"a*b*a*b*a\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*?*c*?*e*?*g*?*i*?*j\") == False\n assert candidate(s = \"abefcdgiescdfimdeeeiad\",p = \"ab*cd?i*de\") == False\n assert candidate(s = \"ababababab\",p = \"a*b*a*b*a*b*a*b*a*b\") == True\n assert candidate(s = \"aabbccdd\",p = \"aab?cc?d*\") == True\n assert candidate(s = \"abc\",p = \"*?*?*\") == True\n assert candidate(s = \"abcdefghij\",p = \"?????????\") == False\n assert candidate(s = \"abcabcabc\",p = \"abc*abc*abc*\") == True\n assert candidate(s = \"abcdefghij\",p = \"*b*d*f*h*\") == True\n assert candidate(s = \"xyzxyzxyz\",p = \"xyz*xyz*xyz\") == True\n assert candidate(s = \"aaaaaa\",p = \"?*?*?*?*?*\") == True\n assert candidate(s = \"abcd\",p = \"?b*d\") == True\n assert candidate(s = \"xxyyzz\",p = \"x*y*z\") == True\n assert candidate(s = \"abcabcabcabcabcabc\",p = \"abcabc*abcabc*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?\") == False\n assert candidate(s = \"abcdabcd\",p = \"ab*cd*ab*cd*\") == True\n assert candidate(s = \"mississippi\",p = \"m??*ss*?\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k*?*l*?\") == False\n assert candidate(s = \"abababab\",p = \"a?b?*b?\") == False\n assert candidate(s = \"mississippi\",p = \"m*is*p*i*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*d*f?j\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k*?*l*\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",p = \"a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*z*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*?*?*\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*\") == True\n assert candidate(s = \"abcdabcdabcd\",p = \"*a*b*c*d*a*b*c*d*a*b*c*d*\") == True\n assert candidate(s = \"abcabcabc\",p = \"abc*abc*\") == True\n assert candidate(s = \"patternmatching\",p = \"pa*?t*?n*?m*?a*?t*?c*?h*?i*?n*?g\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*?*\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*k*?\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*k?*\") == False\n assert candidate(s = \"abcabcabc\",p = \"*abc*abc*abc*\") == True\n assert candidate(s = \"abcdabcdabcd\",p = \"a*d*d*bc*bc*bc\") == False\n assert candidate(s = \"abcabcabc\",p = \"a*bc*bc*\") == True\n assert candidate(s = \"abcdefghij\",p = \"*a*b*c*d*e*f*g*h*i*j*?*\") == False\n assert candidate(s = \"abcdefghij\",p = \"*?*?*?*?*?*?*?*?\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k*?*\") == False\n assert candidate(s = \"abcdefg\",p = \"a*d?e?*g\") == False\n assert candidate(s = \"abcdefg\",p = \"abc*def*ghi\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k*?\") == False\n assert candidate(s = \"abcdefg\",p = \"a?c*f?g\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j????\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*a*\") == False\n assert candidate(s = \"mississippi\",p = \"m??*ss*?i*\") == True\n assert candidate(s = \"abcabcabc\",p = \"a*b*c*a*b*c*a*b*c\") == True\n assert candidate(s = \"aaaaabbbbbcccc\",p = \"a*b*c*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k*?*l\") == False\n assert candidate(s = \"aabbccddeeff\",p = \"a*b*c*d*e*f*\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",p = \"a*b*c*d*e*f*g*h*i*j*k*l*m*n*o*p*q*r*s*t*u*v*w*x*y*z*z*z*\") == False\n assert candidate(s = \"abcde\",p = \"a*bcd*e\") == True\n assert candidate(s = \"abcdefghij\",p = \"*a*b*c*d*e*f*g*h*i*j*k\") == False\n assert candidate(s = \"abcde\",p = \"a*?c*e\") == True\n assert candidate(s = \"mississippi\",p = \"m??*ss*ip*\") == True\n assert candidate(s = \"xyzxyzxyz\",p = \"*xyzxyzxyz\") == True\n assert candidate(s = \"hello\",p = \"h?ll*\") == True\n assert candidate(s = \"abcdexyz\",p = \"*d*xyz\") == True\n assert candidate(s = \"aaaaabbbbb\",p = \"a*b*\") == True\n assert candidate(s = \"hello\",p = \"he*o\") == True\n assert candidate(s = \"abcdabcd\",p = \"a*b*c*d*\") == True\n assert candidate(s = \"abcdefg\",p = \"a?c*e?g\") == True\n assert candidate(s = \"abxyzz\",p = \"ab*zz\") == True\n assert candidate(s = \"xyzabc\",p = \"*abc\") == True\n assert candidate(s = \"abcabcabc\",p = \"a*?*?*b*c*\") == True\n assert candidate(s = \"xyzzxyzzxyzz\",p = \"*z*z*z\") == True\n assert candidate(s = \"abcxyz\",p = \"abc*xyz\") == True\n assert candidate(s = \"abcdefghij\",p = \"*a????b????c????d????e????f????g????h????i????j*\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*k*\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j?*k?\") == False\n assert candidate(s = \"zazbzczdz\",p = \"z*a*z*b*z*c*z*d*z\") == True\n assert candidate(s = \"abcdefghij\",p = \"*a*b*c*d*e*f*g*h*i*j*\") == True\n assert candidate(s = \"abcdefghij\",p = \"*a*b*c*d*e*f*g*h*i*j\") == True\n assert candidate(s = \"mississippi\",p = \"mi*is*ip*pi\") == True\n assert candidate(s = \"aaaaaa\",p = \"a?a?a?a?a?a\") == False\n assert candidate(s = \"abcdefghij\",p = \"*a*b*c*d*e*f*g*h*i*j*k*?\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*k\") == False\n assert candidate(s = \"xyzzaz\",p = \"*x?z*a*\") == True\n assert candidate(s = \"abcde\",p = \"*abc?e\") == True\n assert candidate(s = \"abcdabcd\",p = \"a*a*a*a*\") == False\n assert candidate(s = \"abc\",p = \"a*c\") == True\n assert candidate(s = \"xyz\",p = \"?yz*\") == True\n assert candidate(s = \"abcdefg\",p = \"a*c*e*g\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*d*g*j\") == True\n assert candidate(s = \"abcdexyz\",p = \"a*?d*x*yz\") == True\n assert candidate(s = \"aabbccddeeffgg\",p = \"*b*c*d*e*f*g*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*e*i*\") == True\n assert candidate(s = \"xyxxyxyxyx\",p = \"x*y*x*y*x*y*x\") == True\n assert candidate(s = \"abcd\",p = \"*d\") == True\n assert candidate(s = \"abcdexyz\",p = \"abcd*xyz\") == True\n assert candidate(s = \"mississippi\",p = \"m*iss*ss*ip*\") == True\n assert candidate(s = \"mississippi\",p = \"m??*iss*ippi\") == True\n assert candidate(s = \"abcdefghij\",p = \"*b*d*f*h*j\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j\") == True\n assert candidate(s = \"abc\",p = \"***\") == True\n assert candidate(s = \"aabbccdd\",p = \"a*bb*cc*dd\") == True\n assert candidate(s = \"abcdefghij\",p = \"*\") == True\n assert candidate(s = \"abcde\",p = \"*abcde\") == True\n assert candidate(s = \"aaabbbccc\",p = \"a*bbb*c*\") == True\n assert candidate(s = \"abcde\",p = \"abcde*\") == True\n assert candidate(s = \"xyzabc\",p = \"x*y?*\") == True\n assert candidate(s = \"aabbaabb\",p = \"a*bb*a*bb\") == True\n assert candidate(s = \"abcdedef\",p = \"ab*?de*?\") == True\n assert candidate(s = \"worldwide\",p = \"wo*d*i*e\") == True\n assert candidate(s = \"aabbcc\",p = \"a*bb*c*\") == True\n assert candidate(s = \"abcdefg\",p = \"*cde*fg\") == True\n assert candidate(s = \"aabbcc\",p = \"a*b*c*\") == True\n assert candidate(s = \"xyyxxyyxxyy\",p = \"x*y*x*y*x*y*\") == True\n assert candidate(s = \"abcabcabc\",p = \"abc*abc*abc\") == True\n assert candidate(s = \"aabbababab\",p = \"a*b*a*\") == True\n assert candidate(s = \"abcdexyz\",p = \"a*b?c*?d*x?y*z*\") == False\n assert candidate(s = \"abcdefgh\",p = \"a*gh\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*?*k*\") == False\n assert candidate(s = \"zzzzzzzzzz\",p = \"z*z*z*z*z*z*z*z*z*z\") == True\n assert candidate(s = \"abcabcabcabc\",p = \"a*b*c*a*b*c*a*b*c\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*d*f*h*j\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*?\") == False\n assert candidate(s = \"abcdefghij\",p = \"a*b*c*d*e*f*g*h*i*j*?*?\") == False\n assert candidate(s = \"abcdefghij\",p = \"????a*b*c*d*e*f*g*h*i*j\") == False\n assert candidate(s = \"ababab\",p = \"a*b*a*b*\") == True\n assert candidate(s = \"abcabcabc\",p = \"abc*a*bc*a*bc*\") == True\n assert candidate(s = \"abcdefghij\",p = \"*a*b*c*d*e*f*g*h*i*j*j*\") == False\n assert candidate(s = \"abcabcabcabc\",p = \"abc*abc*\") == True\n assert candidate(s = \"abcdefghij\",p = \"*ef*gh*ij\") == True\n assert candidate(s = \"aabbccddeeff\",p = \"a*bb*c*dd*ee*f*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*d*f*h*j*\") == True\n assert candidate(s = \"abcdef\",p = \"*?*?*?*\") == True\n assert candidate(s = \"abcabcabc\",p = \"abcabcabc\") == True\n assert candidate(s = \"abcd\",p = \"*?c*d*\") == True\n assert candidate(s = \"abcdefghij\",p = \"a*d?g*j\") == False\n assert candidate(s = \"abcabcabc\",p = \"*b*a*b*c*a*b*c*\") == True\n assert candidate(s = \"mississippi\",p = \"m??*ss*?si*pp*i*\") == False\n assert candidate(s = \"aabb\",p = \"*b\") == True\n assert candidate(s = \"abcabcabcabc\",p = \"*abcabc*\") == True\n assert candidate(s = \"examplepattern\",p = \"e*ample?attern\") == True\n assert candidate(s = \"abcabcabc\",p = \"*a*b*c*a*b*c*a*b*c*\") == True\n assert candidate(s = \"teststring\",p = \"t*st*ng\") == True\n assert candidate(s = \"aabbcc\",p = \"a*a*a*c*c*\") == False\n assert candidate(s = \"abcdef\",p = \"*abc?ef\") == True\n assert candidate(s = \"aaaabaaaab\",p = \"a*a*ba*a*b\") == True\n", "comparison": "exact"}, "public_tests": ["\"aa\"\n\"a\"", "\"aa\"\n\"*\"", "\"cb\"\n\"?a\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "p"], "leetcode_dataset_entry_point": "Solution().isMatch", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:06+00:00", "tests_total": 209, "tests_dropped": 3, "flags": [], "topic_tags": ["string", "dynamic-programming", "greedy", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def is_match(s, p)", "container": null, "callable": "is_match", "parameters": [{"name": "s", "type": "String"}, {"name": "p", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 45, "task_id": "jump-game-ii", "difficulty": "Medium", "problem_description": "You are given a 0-indexed array of integers nums of length n. You are initially positioned at index 0.\n\nEach element nums[i] represents the maximum length of a forward jump from index i. In other words, if you are at index i, you can jump to any index (i + j) where:\n\n- 0 <= j <= nums[i] and\n- i + j < n\n\nReturn the minimum number of jumps to reach index n - 1. The test cases are generated such that you can reach index n - 1.\n\nExample 1:\n\nInput: nums = [2,3,1,1,4]\nOutput: 2\nExplanation: The minimum number of jumps to reach the last index is 2. Jump 1 step from index 0 to 1, then 3 steps to the last index.\n\nExample 2:\n\nInput: nums = [2,3,0,1,4]\nOutput: 2\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- 0 <= nums[i] <= 1000\n- It's guaranteed that you can reach nums[n - 1].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 6, 4, 4, 6, 9, 4, 4, 7, 4, 4, 8, 2, 6, 8, 1, 5, 9, 6, 5, 2, 7, 9, 7, 9, 6, 9, 4, 1, 6, 8, 8, 4, 4, 2, 0, 7, 1, 3, 8, 0, 1, 2, 1, 2, 4, 3, 2, 0, 7, 1, 2, 7, 0, 6, 8, 0, 6, 5, 9, 9, 7, 4, 6, 6, 5, 8, 9, 3, 4, 3, 7, 0, 4, 9, 0, 9, 8, 4, 3, 0, 7, 7, 1, 9, 1, 9, 4, 9, 0, 1, 9, 5, 7, 7, 9, 5, 6, 6, 4, 6, 8, 3, 1, 2, 1, 3, 4, 6, 0, 7, 1, 9, 8, 0, 4, 3, 0, 4, 3, 0, 8, 6, 1, 1, 6, 8, 7, 5, 3, 1, 1, 5, 0, 7, 3, 7, 0, 9, 1, 2, 1, 8, 8, 7, 2, 9, 7, 9, 7, 9, 6, 9, 4, 1, 6, 8, 8, 4, 4, 2, 0, 7, 1, 3, 8, 0, 1, 2, 1, 2, 4, 3, 2, 0, 7, 1, 2, 7, 0, 6, 8, 0, 6, 5, 9, 9, 7, 4, 6, 6, 5, 8, 9, 3, 4, 3, 7, 0, 4, 9, 0, 9, 8, 4, 3, 0, 7, 7, 1, 9]) == 32\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 9\n assert candidate(nums = [2, 3, 0, 1, 4]) == 2\n assert candidate(nums = [5, 6, 4, 4, 6, 9, 4, 4, 7, 4, 4, 8, 2, 6, 8, 1, 5, 9, 6, 5, 2, 7, 9, 7, 9, 6, 9, 4, 1, 6, 8, 8, 4, 4, 2, 0, 3, 8, 5]) == 5\n assert candidate(nums = [0]) == 0\n assert candidate(nums = [5, 6, 4, 4, 6, 9, 4, 4, 7, 4, 4, 8, 2, 6, 8, 1, 5, 9, 6, 5, 2, 7, 9, 7, 9, 6, 9, 4, 1, 6, 8, 8, 4, 4, 2, 0, 1, 1, 2, 6, 5, 5, 0, 1, 2, 2, 9, 1, 4, 9, 5, 8, 0, 1, 9, 4, 5, 0, 8, 0, 3, 4, 6, 6, 1, 5, 8, 5, 9, 6, 2, 6, 1]) == 11\n assert candidate(nums = [1, 2, 3]) == 2\n assert candidate(nums = [1, 1, 1, 1]) == 3\n assert candidate(nums = [2, 3, 1, 1, 4]) == 2\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 4\n assert candidate(nums = [2, 3, 1, 1, 4, 2, 3, 1, 1, 4, 2, 3, 1, 1, 4, 2, 3, 1, 1, 4]) == 8\n assert candidate(nums = [1, 3, 5, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 4\n assert candidate(nums = [3, 2, 1, 0, 4, 3, 2, 1, 0, 4, 3, 2, 1, 0, 4, 3, 2, 1, 0, 4]) == 2\n assert candidate(nums = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 2\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 5\n assert candidate(nums = [9, 4, 2, 1, 0, 2, 0, 1, 0, 0]) == 1\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 4\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 1\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 7\n assert candidate(nums = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 2\n assert candidate(nums = [1, 3, 5, 3, 1, 2, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 19\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 4\n assert candidate(nums = [2, 5, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 15\n assert candidate(nums = [2, 0, 1, 0, 1, 1, 1, 1, 1, 1]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 19\n assert candidate(nums = [10, 2, 3, 1, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [3, 0, 8, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 11\n assert candidate(nums = [3, 2, 1, 1, 4, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 14\n assert candidate(nums = [1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [100, 20, 10, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [3, 2, 1, 0, 4]) == 2\n assert candidate(nums = [3, 3, 0, 2, 1, 2, 4, 3, 0, 0, 3, 1, 2, 1]) == 5\n assert candidate(nums = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 205\n", "comparison": "exact"}, "public_tests": ["[2,3,1,1,4]", "[2,3,0,1,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().jump", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:09+00:00", "tests_total": 44, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def jump(nums)", "container": null, "callable": "jump", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 46, "task_id": "permutations", "difficulty": "Medium", "problem_description": "Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order.\n\nExample 1:\n\nInput: nums = [1,2,3]\nOutput: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n\nExample 2:\n\nInput: nums = [0,1]\nOutput: [[0,1],[1,0]]\n\nExample 3:\n\nInput: nums = [1]\nOutput: [[1]]\n\nConstraints:\n\n- 1 <= nums.length <= 6\n- -10 <= nums[i] <= 10\n- All the integers of nums are unique.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[1]), [[1]])\n assert answers_match(candidate(nums=[4, 5, 6, 7]), [[4, 5, 6, 7], [4, 5, 7, 6], [4, 6, 5, 7], [4, 6, 7, 5], [4, 7, 5, 6], [4, 7, 6, 5], [5, 4, 6, 7], [5, 4, 7, 6], [5, 6, 4, 7], [5, 6, 7, 4], [5, 7, 4, 6], [5, 7, 6, 4], [6, 4, 5, 7], [6, 4, 7, 5], [6, 5, 4, 7], [6, 5, 7, 4], [6, 7, 4, 5], [6, 7, 5, 4], [7, 4, 5, 6], [7, 4, 6, 5], [7, 5, 4, 6], [7, 5, 6, 4], [7, 6, 4, 5], [7, 6, 5, 4]])\n assert answers_match(candidate(nums=[4, 5, 6]), [[4, 5, 6], [4, 6, 5], [5, 4, 6], [5, 6, 4], [6, 4, 5], [6, 5, 4]])\n assert answers_match(candidate(nums=[5, 3, 4, 1, 2]), [[5, 3, 4, 1, 2], [5, 3, 4, 2, 1], [5, 3, 1, 4, 2], [5, 3, 1, 2, 4], [5, 3, 2, 4, 1], [5, 3, 2, 1, 4], [5, 4, 3, 1, 2], [5, 4, 3, 2, 1], [5, 4, 1, 3, 2], [5, 4, 1, 2, 3], [5, 4, 2, 3, 1], [5, 4, 2, 1, 3], [5, 1, 3, 4, 2], [5, 1, 3, 2, 4], [5, 1, 4, 3, 2], [5, 1, 4, 2, 3], [5, 1, 2, 3, 4], [5, 1, 2, 4, 3], [5, 2, 3, 4, 1], [5, 2, 3, 1, 4], [5, 2, 4, 3, 1], [5, 2, 4, 1, 3], [5, 2, 1, 3, 4], [5, 2, 1, 4, 3], [3, 5, 4, 1, 2], [3, 5, 4, 2, 1], [3, 5, 1, 4, 2], [3, 5, 1, 2, 4], [3, 5, 2, 4, 1], [3, 5, 2, 1, 4], [3, 4, 5, 1, 2], [3, 4, 5, 2, 1], [3, 4, 1, 5, 2], [3, 4, 1, 2, 5], [3, 4, 2, 5, 1], [3, 4, 2, 1, 5], [3, 1, 5, 4, 2], [3, 1, 5, 2, 4], [3, 1, 4, 5, 2], [3, 1, 4, 2, 5], [3, 1, 2, 5, 4], [3, 1, 2, 4, 5], [3, 2, 5, 4, 1], [3, 2, 5, 1, 4], [3, 2, 4, 5, 1], [3, 2, 4, 1, 5], [3, 2, 1, 5, 4], [3, 2, 1, 4, 5], [4, 5, 3, 1, 2], [4, 5, 3, 2, 1], [4, 5, 1, 3, 2], [4, 5, 1, 2, 3], [4, 5, 2, 3, 1], [4, 5, 2, 1, 3], [4, 3, 5, 1, 2], [4, 3, 5, 2, 1], [4, 3, 1, 5, 2], [4, 3, 1, 2, 5], [4, 3, 2, 5, 1], [4, 3, 2, 1, 5], [4, 1, 5, 3, 2], [4, 1, 5, 2, 3], [4, 1, 3, 5, 2], [4, 1, 3, 2, 5], [4, 1, 2, 5, 3], [4, 1, 2, 3, 5], [4, 2, 5, 3, 1], [4, 2, 5, 1, 3], [4, 2, 3, 5, 1], [4, 2, 3, 1, 5], [4, 2, 1, 5, 3], [4, 2, 1, 3, 5], [1, 5, 3, 4, 2], [1, 5, 3, 2, 4], [1, 5, 4, 3, 2], [1, 5, 4, 2, 3], [1, 5, 2, 3, 4], [1, 5, 2, 4, 3], [1, 3, 5, 4, 2], [1, 3, 5, 2, 4], [1, 3, 4, 5, 2], [1, 3, 4, 2, 5], [1, 3, 2, 5, 4], [1, 3, 2, 4, 5], [1, 4, 5, 3, 2], [1, 4, 5, 2, 3], [1, 4, 3, 5, 2], [1, 4, 3, 2, 5], [1, 4, 2, 5, 3], [1, 4, 2, 3, 5], [1, 2, 5, 3, 4], [1, 2, 5, 4, 3], [1, 2, 3, 5, 4], [1, 2, 3, 4, 5], [1, 2, 4, 5, 3], [1, 2, 4, 3, 5], [2, 5, 3, 4, 1], [2, 5, 3, 1, 4], [2, 5, 4, 3, 1], [2, 5, 4, 1, 3], [2, 5, 1, 3, 4], [2, 5, 1, 4, 3], [2, 3, 5, 4, 1], [2, 3, 5, 1, 4], [2, 3, 4, 5, 1], [2, 3, 4, 1, 5], [2, 3, 1, 5, 4], [2, 3, 1, 4, 5], [2, 4, 5, 3, 1], [2, 4, 5, 1, 3], [2, 4, 3, 5, 1], [2, 4, 3, 1, 5], [2, 4, 1, 5, 3], [2, 4, 1, 3, 5], [2, 1, 5, 3, 4], [2, 1, 5, 4, 3], [2, 1, 3, 5, 4], [2, 1, 3, 4, 5], [2, 1, 4, 5, 3], [2, 1, 4, 3, 5]])\n assert answers_match(candidate(nums=[1, 2, 3]), [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]])\n assert answers_match(candidate(nums=[0, 1]), [[0, 1], [1, 0]])\n assert answers_match(candidate(nums=[3, 1, 2]), [[3, 1, 2], [3, 2, 1], [1, 3, 2], [1, 2, 3], [2, 3, 1], [2, 1, 3]])\n assert answers_match(candidate(nums=[-1, 2, -3, 4, 5]), [[-1, 2, -3, 4, 5], [-1, 2, -3, 5, 4], [-1, 2, 4, -3, 5], [-1, 2, 4, 5, -3], [-1, 2, 5, -3, 4], [-1, 2, 5, 4, -3], [-1, -3, 2, 4, 5], [-1, -3, 2, 5, 4], [-1, -3, 4, 2, 5], [-1, -3, 4, 5, 2], [-1, -3, 5, 2, 4], [-1, -3, 5, 4, 2], [-1, 4, 2, -3, 5], [-1, 4, 2, 5, -3], [-1, 4, -3, 2, 5], [-1, 4, -3, 5, 2], [-1, 4, 5, 2, -3], [-1, 4, 5, -3, 2], [-1, 5, 2, -3, 4], [-1, 5, 2, 4, -3], [-1, 5, -3, 2, 4], [-1, 5, -3, 4, 2], [-1, 5, 4, 2, -3], [-1, 5, 4, -3, 2], [2, -1, -3, 4, 5], [2, -1, -3, 5, 4], [2, -1, 4, -3, 5], [2, -1, 4, 5, -3], [2, -1, 5, -3, 4], [2, -1, 5, 4, -3], [2, -3, -1, 4, 5], [2, -3, -1, 5, 4], [2, -3, 4, -1, 5], [2, -3, 4, 5, -1], [2, -3, 5, -1, 4], [2, -3, 5, 4, -1], [2, 4, -1, -3, 5], [2, 4, -1, 5, -3], [2, 4, -3, -1, 5], [2, 4, -3, 5, -1], [2, 4, 5, -1, -3], [2, 4, 5, -3, -1], [2, 5, -1, -3, 4], [2, 5, -1, 4, -3], [2, 5, -3, -1, 4], [2, 5, -3, 4, -1], [2, 5, 4, -1, -3], [2, 5, 4, -3, -1], [-3, -1, 2, 4, 5], [-3, -1, 2, 5, 4], [-3, -1, 4, 2, 5], [-3, -1, 4, 5, 2], [-3, -1, 5, 2, 4], [-3, -1, 5, 4, 2], [-3, 2, -1, 4, 5], [-3, 2, -1, 5, 4], [-3, 2, 4, -1, 5], [-3, 2, 4, 5, -1], [-3, 2, 5, -1, 4], [-3, 2, 5, 4, -1], [-3, 4, -1, 2, 5], [-3, 4, -1, 5, 2], [-3, 4, 2, -1, 5], [-3, 4, 2, 5, -1], [-3, 4, 5, -1, 2], [-3, 4, 5, 2, -1], [-3, 5, -1, 2, 4], [-3, 5, -1, 4, 2], [-3, 5, 2, -1, 4], [-3, 5, 2, 4, -1], [-3, 5, 4, -1, 2], [-3, 5, 4, 2, -1], [4, -1, 2, -3, 5], [4, -1, 2, 5, -3], [4, -1, -3, 2, 5], [4, -1, -3, 5, 2], [4, -1, 5, 2, -3], [4, -1, 5, -3, 2], [4, 2, -1, -3, 5], [4, 2, -1, 5, -3], [4, 2, -3, -1, 5], [4, 2, -3, 5, -1], [4, 2, 5, -1, -3], [4, 2, 5, -3, -1], [4, -3, -1, 2, 5], [4, -3, -1, 5, 2], [4, -3, 2, -1, 5], [4, -3, 2, 5, -1], [4, -3, 5, -1, 2], [4, -3, 5, 2, -1], [4, 5, -1, 2, -3], [4, 5, -1, -3, 2], [4, 5, 2, -1, -3], [4, 5, 2, -3, -1], [4, 5, -3, -1, 2], [4, 5, -3, 2, -1], [5, -1, 2, -3, 4], [5, -1, 2, 4, -3], [5, -1, -3, 2, 4], [5, -1, -3, 4, 2], [5, -1, 4, 2, -3], [5, -1, 4, -3, 2], [5, 2, -1, -3, 4], [5, 2, -1, 4, -3], [5, 2, -3, -1, 4], [5, 2, -3, 4, -1], [5, 2, 4, -1, -3], [5, 2, 4, -3, -1], [5, -3, -1, 2, 4], [5, -3, -1, 4, 2], [5, -3, 2, -1, 4], [5, -3, 2, 4, -1], [5, -3, 4, -1, 2], [5, -3, 4, 2, -1], [5, 4, -1, 2, -3], [5, 4, -1, -3, 2], [5, 4, 2, -1, -3], [5, 4, 2, -3, -1], [5, 4, -3, -1, 2], [5, 4, -3, 2, -1]])\n assert answers_match(candidate(nums=[-1, 2, -3]), [[-1, 2, -3], [-1, -3, 2], [2, -1, -3], [2, -3, -1], [-3, -1, 2], [-3, 2, -1]])\n assert answers_match(candidate(nums=[-1, 0, 1]), [[-1, 0, 1], [-1, 1, 0], [0, -1, 1], [0, 1, -1], [1, -1, 0], [1, 0, -1]])\n assert answers_match(candidate(nums=[5, 3, 8, 6]), [[5, 3, 8, 6], [5, 3, 6, 8], [5, 8, 3, 6], [5, 8, 6, 3], [5, 6, 3, 8], [5, 6, 8, 3], [3, 5, 8, 6], [3, 5, 6, 8], [3, 8, 5, 6], [3, 8, 6, 5], [3, 6, 5, 8], [3, 6, 8, 5], [8, 5, 3, 6], [8, 5, 6, 3], [8, 3, 5, 6], [8, 3, 6, 5], [8, 6, 5, 3], [8, 6, 3, 5], [6, 5, 3, 8], [6, 5, 8, 3], [6, 3, 5, 8], [6, 3, 8, 5], [6, 8, 5, 3], [6, 8, 3, 5]])\n assert answers_match(candidate(nums=[-7, -8, -9, -10]), [[-7, -8, -9, -10], [-7, -8, -10, -9], [-7, -9, -8, -10], [-7, -9, -10, -8], [-7, -10, -8, -9], [-7, -10, -9, -8], [-8, -7, -9, -10], [-8, -7, -10, -9], [-8, -9, -7, -10], [-8, -9, -10, -7], [-8, -10, -7, -9], [-8, -10, -9, -7], [-9, -7, -8, -10], [-9, -7, -10, -8], [-9, -8, -7, -10], [-9, -8, -10, -7], [-9, -10, -7, -8], [-9, -10, -8, -7], [-10, -7, -8, -9], [-10, -7, -9, -8], [-10, -8, -7, -9], [-10, -8, -9, -7], [-10, -9, -7, -8], [-10, -9, -8, -7]])\n assert answers_match(candidate(nums=[5, 3, 1, 4, 2]), [[5, 3, 1, 4, 2], [5, 3, 1, 2, 4], [5, 3, 4, 1, 2], [5, 3, 4, 2, 1], [5, 3, 2, 1, 4], [5, 3, 2, 4, 1], [5, 1, 3, 4, 2], [5, 1, 3, 2, 4], [5, 1, 4, 3, 2], [5, 1, 4, 2, 3], [5, 1, 2, 3, 4], [5, 1, 2, 4, 3], [5, 4, 3, 1, 2], [5, 4, 3, 2, 1], [5, 4, 1, 3, 2], [5, 4, 1, 2, 3], [5, 4, 2, 3, 1], [5, 4, 2, 1, 3], [5, 2, 3, 1, 4], [5, 2, 3, 4, 1], [5, 2, 1, 3, 4], [5, 2, 1, 4, 3], [5, 2, 4, 3, 1], [5, 2, 4, 1, 3], [3, 5, 1, 4, 2], [3, 5, 1, 2, 4], [3, 5, 4, 1, 2], [3, 5, 4, 2, 1], [3, 5, 2, 1, 4], [3, 5, 2, 4, 1], [3, 1, 5, 4, 2], [3, 1, 5, 2, 4], [3, 1, 4, 5, 2], [3, 1, 4, 2, 5], [3, 1, 2, 5, 4], [3, 1, 2, 4, 5], [3, 4, 5, 1, 2], [3, 4, 5, 2, 1], [3, 4, 1, 5, 2], [3, 4, 1, 2, 5], [3, 4, 2, 5, 1], [3, 4, 2, 1, 5], [3, 2, 5, 1, 4], [3, 2, 5, 4, 1], [3, 2, 1, 5, 4], [3, 2, 1, 4, 5], [3, 2, 4, 5, 1], [3, 2, 4, 1, 5], [1, 5, 3, 4, 2], [1, 5, 3, 2, 4], [1, 5, 4, 3, 2], [1, 5, 4, 2, 3], [1, 5, 2, 3, 4], [1, 5, 2, 4, 3], [1, 3, 5, 4, 2], [1, 3, 5, 2, 4], [1, 3, 4, 5, 2], [1, 3, 4, 2, 5], [1, 3, 2, 5, 4], [1, 3, 2, 4, 5], [1, 4, 5, 3, 2], [1, 4, 5, 2, 3], [1, 4, 3, 5, 2], [1, 4, 3, 2, 5], [1, 4, 2, 5, 3], [1, 4, 2, 3, 5], [1, 2, 5, 3, 4], [1, 2, 5, 4, 3], [1, 2, 3, 5, 4], [1, 2, 3, 4, 5], [1, 2, 4, 5, 3], [1, 2, 4, 3, 5], [4, 5, 3, 1, 2], [4, 5, 3, 2, 1], [4, 5, 1, 3, 2], [4, 5, 1, 2, 3], [4, 5, 2, 3, 1], [4, 5, 2, 1, 3], [4, 3, 5, 1, 2], [4, 3, 5, 2, 1], [4, 3, 1, 5, 2], [4, 3, 1, 2, 5], [4, 3, 2, 5, 1], [4, 3, 2, 1, 5], [4, 1, 5, 3, 2], [4, 1, 5, 2, 3], [4, 1, 3, 5, 2], [4, 1, 3, 2, 5], [4, 1, 2, 5, 3], [4, 1, 2, 3, 5], [4, 2, 5, 3, 1], [4, 2, 5, 1, 3], [4, 2, 3, 5, 1], [4, 2, 3, 1, 5], [4, 2, 1, 5, 3], [4, 2, 1, 3, 5], [2, 5, 3, 1, 4], [2, 5, 3, 4, 1], [2, 5, 1, 3, 4], [2, 5, 1, 4, 3], [2, 5, 4, 3, 1], [2, 5, 4, 1, 3], [2, 3, 5, 1, 4], [2, 3, 5, 4, 1], [2, 3, 1, 5, 4], [2, 3, 1, 4, 5], [2, 3, 4, 5, 1], [2, 3, 4, 1, 5], [2, 1, 5, 3, 4], [2, 1, 5, 4, 3], [2, 1, 3, 5, 4], [2, 1, 3, 4, 5], [2, 1, 4, 5, 3], [2, 1, 4, 3, 5], [2, 4, 5, 3, 1], [2, 4, 5, 1, 3], [2, 4, 3, 5, 1], [2, 4, 3, 1, 5], [2, 4, 1, 5, 3], [2, 4, 1, 3, 5]])\n assert answers_match(candidate(nums=[7, 2, 5, 3, 8, 1]), [[7, 2, 5, 3, 8, 1], [7, 2, 5, 3, 1, 8], [7, 2, 5, 8, 3, 1], [7, 2, 5, 8, 1, 3], [7, 2, 5, 1, 3, 8], [7, 2, 5, 1, 8, 3], [7, 2, 3, 5, 8, 1], [7, 2, 3, 5, 1, 8], [7, 2, 3, 8, 5, 1], [7, 2, 3, 8, 1, 5], [7, 2, 3, 1, 5, 8], [7, 2, 3, 1, 8, 5], [7, 2, 8, 5, 3, 1], [7, 2, 8, 5, 1, 3], [7, 2, 8, 3, 5, 1], [7, 2, 8, 3, 1, 5], [7, 2, 8, 1, 5, 3], [7, 2, 8, 1, 3, 5], [7, 2, 1, 5, 3, 8], [7, 2, 1, 5, 8, 3], [7, 2, 1, 3, 5, 8], [7, 2, 1, 3, 8, 5], [7, 2, 1, 8, 5, 3], [7, 2, 1, 8, 3, 5], [7, 5, 2, 3, 8, 1], [7, 5, 2, 3, 1, 8], [7, 5, 2, 8, 3, 1], [7, 5, 2, 8, 1, 3], [7, 5, 2, 1, 3, 8], [7, 5, 2, 1, 8, 3], [7, 5, 3, 2, 8, 1], [7, 5, 3, 2, 1, 8], [7, 5, 3, 8, 2, 1], [7, 5, 3, 8, 1, 2], [7, 5, 3, 1, 2, 8], [7, 5, 3, 1, 8, 2], [7, 5, 8, 2, 3, 1], [7, 5, 8, 2, 1, 3], [7, 5, 8, 3, 2, 1], [7, 5, 8, 3, 1, 2], [7, 5, 8, 1, 2, 3], [7, 5, 8, 1, 3, 2], [7, 5, 1, 2, 3, 8], [7, 5, 1, 2, 8, 3], [7, 5, 1, 3, 2, 8], [7, 5, 1, 3, 8, 2], [7, 5, 1, 8, 2, 3], [7, 5, 1, 8, 3, 2], [7, 3, 2, 5, 8, 1], [7, 3, 2, 5, 1, 8], [7, 3, 2, 8, 5, 1], [7, 3, 2, 8, 1, 5], [7, 3, 2, 1, 5, 8], [7, 3, 2, 1, 8, 5], [7, 3, 5, 2, 8, 1], [7, 3, 5, 2, 1, 8], [7, 3, 5, 8, 2, 1], [7, 3, 5, 8, 1, 2], [7, 3, 5, 1, 2, 8], [7, 3, 5, 1, 8, 2], [7, 3, 8, 2, 5, 1], [7, 3, 8, 2, 1, 5], [7, 3, 8, 5, 2, 1], [7, 3, 8, 5, 1, 2], [7, 3, 8, 1, 2, 5], [7, 3, 8, 1, 5, 2], [7, 3, 1, 2, 5, 8], [7, 3, 1, 2, 8, 5], [7, 3, 1, 5, 2, 8], [7, 3, 1, 5, 8, 2], [7, 3, 1, 8, 2, 5], [7, 3, 1, 8, 5, 2], [7, 8, 2, 5, 3, 1], [7, 8, 2, 5, 1, 3], [7, 8, 2, 3, 5, 1], [7, 8, 2, 3, 1, 5], [7, 8, 2, 1, 5, 3], [7, 8, 2, 1, 3, 5], [7, 8, 5, 2, 3, 1], [7, 8, 5, 2, 1, 3], [7, 8, 5, 3, 2, 1], [7, 8, 5, 3, 1, 2], [7, 8, 5, 1, 2, 3], [7, 8, 5, 1, 3, 2], [7, 8, 3, 2, 5, 1], [7, 8, 3, 2, 1, 5], [7, 8, 3, 5, 2, 1], [7, 8, 3, 5, 1, 2], [7, 8, 3, 1, 2, 5], [7, 8, 3, 1, 5, 2], [7, 8, 1, 2, 5, 3], [7, 8, 1, 2, 3, 5], [7, 8, 1, 5, 2, 3], [7, 8, 1, 5, 3, 2], [7, 8, 1, 3, 2, 5], [7, 8, 1, 3, 5, 2], [7, 1, 2, 5, 3, 8], [7, 1, 2, 5, 8, 3], [7, 1, 2, 3, 5, 8], [7, 1, 2, 3, 8, 5], [7, 1, 2, 8, 5, 3], [7, 1, 2, 8, 3, 5], [7, 1, 5, 2, 3, 8], [7, 1, 5, 2, 8, 3], [7, 1, 5, 3, 2, 8], [7, 1, 5, 3, 8, 2], [7, 1, 5, 8, 2, 3], [7, 1, 5, 8, 3, 2], [7, 1, 3, 2, 5, 8], [7, 1, 3, 2, 8, 5], [7, 1, 3, 5, 2, 8], [7, 1, 3, 5, 8, 2], [7, 1, 3, 8, 2, 5], [7, 1, 3, 8, 5, 2], [7, 1, 8, 2, 5, 3], [7, 1, 8, 2, 3, 5], [7, 1, 8, 5, 2, 3], [7, 1, 8, 5, 3, 2], [7, 1, 8, 3, 2, 5], [7, 1, 8, 3, 5, 2], [2, 7, 5, 3, 8, 1], [2, 7, 5, 3, 1, 8], [2, 7, 5, 8, 3, 1], [2, 7, 5, 8, 1, 3], [2, 7, 5, 1, 3, 8], [2, 7, 5, 1, 8, 3], [2, 7, 3, 5, 8, 1], [2, 7, 3, 5, 1, 8], [2, 7, 3, 8, 5, 1], [2, 7, 3, 8, 1, 5], [2, 7, 3, 1, 5, 8], [2, 7, 3, 1, 8, 5], [2, 7, 8, 5, 3, 1], [2, 7, 8, 5, 1, 3], [2, 7, 8, 3, 5, 1], [2, 7, 8, 3, 1, 5], [2, 7, 8, 1, 5, 3], [2, 7, 8, 1, 3, 5], [2, 7, 1, 5, 3, 8], [2, 7, 1, 5, 8, 3], [2, 7, 1, 3, 5, 8], [2, 7, 1, 3, 8, 5], [2, 7, 1, 8, 5, 3], [2, 7, 1, 8, 3, 5], [2, 5, 7, 3, 8, 1], [2, 5, 7, 3, 1, 8], [2, 5, 7, 8, 3, 1], [2, 5, 7, 8, 1, 3], [2, 5, 7, 1, 3, 8], [2, 5, 7, 1, 8, 3], [2, 5, 3, 7, 8, 1], [2, 5, 3, 7, 1, 8], [2, 5, 3, 8, 7, 1], [2, 5, 3, 8, 1, 7], [2, 5, 3, 1, 7, 8], [2, 5, 3, 1, 8, 7], [2, 5, 8, 7, 3, 1], [2, 5, 8, 7, 1, 3], [2, 5, 8, 3, 7, 1], [2, 5, 8, 3, 1, 7], [2, 5, 8, 1, 7, 3], [2, 5, 8, 1, 3, 7], [2, 5, 1, 7, 3, 8], [2, 5, 1, 7, 8, 3], [2, 5, 1, 3, 7, 8], [2, 5, 1, 3, 8, 7], [2, 5, 1, 8, 7, 3], [2, 5, 1, 8, 3, 7], [2, 3, 7, 5, 8, 1], [2, 3, 7, 5, 1, 8], [2, 3, 7, 8, 5, 1], [2, 3, 7, 8, 1, 5], [2, 3, 7, 1, 5, 8], [2, 3, 7, 1, 8, 5], [2, 3, 5, 7, 8, 1], [2, 3, 5, 7, 1, 8], [2, 3, 5, 8, 7, 1], [2, 3, 5, 8, 1, 7], [2, 3, 5, 1, 7, 8], [2, 3, 5, 1, 8, 7], [2, 3, 8, 7, 5, 1], [2, 3, 8, 7, 1, 5], [2, 3, 8, 5, 7, 1], [2, 3, 8, 5, 1, 7], [2, 3, 8, 1, 7, 5], [2, 3, 8, 1, 5, 7], [2, 3, 1, 7, 5, 8], [2, 3, 1, 7, 8, 5], [2, 3, 1, 5, 7, 8], [2, 3, 1, 5, 8, 7], [2, 3, 1, 8, 7, 5], [2, 3, 1, 8, 5, 7], [2, 8, 7, 5, 3, 1], [2, 8, 7, 5, 1, 3], [2, 8, 7, 3, 5, 1], [2, 8, 7, 3, 1, 5], [2, 8, 7, 1, 5, 3], [2, 8, 7, 1, 3, 5], [2, 8, 5, 7, 3, 1], [2, 8, 5, 7, 1, 3], [2, 8, 5, 3, 7, 1], [2, 8, 5, 3, 1, 7], [2, 8, 5, 1, 7, 3], [2, 8, 5, 1, 3, 7], [2, 8, 3, 7, 5, 1], [2, 8, 3, 7, 1, 5], [2, 8, 3, 5, 7, 1], [2, 8, 3, 5, 1, 7], [2, 8, 3, 1, 7, 5], [2, 8, 3, 1, 5, 7], [2, 8, 1, 7, 5, 3], [2, 8, 1, 7, 3, 5], [2, 8, 1, 5, 7, 3], [2, 8, 1, 5, 3, 7], [2, 8, 1, 3, 7, 5], [2, 8, 1, 3, 5, 7], [2, 1, 7, 5, 3, 8], [2, 1, 7, 5, 8, 3], [2, 1, 7, 3, 5, 8], [2, 1, 7, 3, 8, 5], [2, 1, 7, 8, 5, 3], [2, 1, 7, 8, 3, 5], [2, 1, 5, 7, 3, 8], [2, 1, 5, 7, 8, 3], [2, 1, 5, 3, 7, 8], [2, 1, 5, 3, 8, 7], [2, 1, 5, 8, 7, 3], [2, 1, 5, 8, 3, 7], [2, 1, 3, 7, 5, 8], [2, 1, 3, 7, 8, 5], [2, 1, 3, 5, 7, 8], [2, 1, 3, 5, 8, 7], [2, 1, 3, 8, 7, 5], [2, 1, 3, 8, 5, 7], [2, 1, 8, 7, 5, 3], [2, 1, 8, 7, 3, 5], [2, 1, 8, 5, 7, 3], [2, 1, 8, 5, 3, 7], [2, 1, 8, 3, 7, 5], [2, 1, 8, 3, 5, 7], [5, 7, 2, 3, 8, 1], [5, 7, 2, 3, 1, 8], [5, 7, 2, 8, 3, 1], [5, 7, 2, 8, 1, 3], [5, 7, 2, 1, 3, 8], [5, 7, 2, 1, 8, 3], [5, 7, 3, 2, 8, 1], [5, 7, 3, 2, 1, 8], [5, 7, 3, 8, 2, 1], [5, 7, 3, 8, 1, 2], [5, 7, 3, 1, 2, 8], [5, 7, 3, 1, 8, 2], [5, 7, 8, 2, 3, 1], [5, 7, 8, 2, 1, 3], [5, 7, 8, 3, 2, 1], [5, 7, 8, 3, 1, 2], [5, 7, 8, 1, 2, 3], [5, 7, 8, 1, 3, 2], [5, 7, 1, 2, 3, 8], [5, 7, 1, 2, 8, 3], [5, 7, 1, 3, 2, 8], [5, 7, 1, 3, 8, 2], [5, 7, 1, 8, 2, 3], [5, 7, 1, 8, 3, 2], [5, 2, 7, 3, 8, 1], [5, 2, 7, 3, 1, 8], [5, 2, 7, 8, 3, 1], [5, 2, 7, 8, 1, 3], [5, 2, 7, 1, 3, 8], [5, 2, 7, 1, 8, 3], [5, 2, 3, 7, 8, 1], [5, 2, 3, 7, 1, 8], [5, 2, 3, 8, 7, 1], [5, 2, 3, 8, 1, 7], [5, 2, 3, 1, 7, 8], [5, 2, 3, 1, 8, 7], [5, 2, 8, 7, 3, 1], [5, 2, 8, 7, 1, 3], [5, 2, 8, 3, 7, 1], [5, 2, 8, 3, 1, 7], [5, 2, 8, 1, 7, 3], [5, 2, 8, 1, 3, 7], [5, 2, 1, 7, 3, 8], [5, 2, 1, 7, 8, 3], [5, 2, 1, 3, 7, 8], [5, 2, 1, 3, 8, 7], [5, 2, 1, 8, 7, 3], [5, 2, 1, 8, 3, 7], [5, 3, 7, 2, 8, 1], [5, 3, 7, 2, 1, 8], [5, 3, 7, 8, 2, 1], [5, 3, 7, 8, 1, 2], [5, 3, 7, 1, 2, 8], [5, 3, 7, 1, 8, 2], [5, 3, 2, 7, 8, 1], [5, 3, 2, 7, 1, 8], [5, 3, 2, 8, 7, 1], [5, 3, 2, 8, 1, 7], [5, 3, 2, 1, 7, 8], [5, 3, 2, 1, 8, 7], [5, 3, 8, 7, 2, 1], [5, 3, 8, 7, 1, 2], [5, 3, 8, 2, 7, 1], [5, 3, 8, 2, 1, 7], [5, 3, 8, 1, 7, 2], [5, 3, 8, 1, 2, 7], [5, 3, 1, 7, 2, 8], [5, 3, 1, 7, 8, 2], [5, 3, 1, 2, 7, 8], [5, 3, 1, 2, 8, 7], [5, 3, 1, 8, 7, 2], [5, 3, 1, 8, 2, 7], [5, 8, 7, 2, 3, 1], [5, 8, 7, 2, 1, 3], [5, 8, 7, 3, 2, 1], [5, 8, 7, 3, 1, 2], [5, 8, 7, 1, 2, 3], [5, 8, 7, 1, 3, 2], [5, 8, 2, 7, 3, 1], [5, 8, 2, 7, 1, 3], [5, 8, 2, 3, 7, 1], [5, 8, 2, 3, 1, 7], [5, 8, 2, 1, 7, 3], [5, 8, 2, 1, 3, 7], [5, 8, 3, 7, 2, 1], [5, 8, 3, 7, 1, 2], [5, 8, 3, 2, 7, 1], [5, 8, 3, 2, 1, 7], [5, 8, 3, 1, 7, 2], [5, 8, 3, 1, 2, 7], [5, 8, 1, 7, 2, 3], [5, 8, 1, 7, 3, 2], [5, 8, 1, 2, 7, 3], [5, 8, 1, 2, 3, 7], [5, 8, 1, 3, 7, 2], [5, 8, 1, 3, 2, 7], [5, 1, 7, 2, 3, 8], [5, 1, 7, 2, 8, 3], [5, 1, 7, 3, 2, 8], [5, 1, 7, 3, 8, 2], [5, 1, 7, 8, 2, 3], [5, 1, 7, 8, 3, 2], [5, 1, 2, 7, 3, 8], [5, 1, 2, 7, 8, 3], [5, 1, 2, 3, 7, 8], [5, 1, 2, 3, 8, 7], [5, 1, 2, 8, 7, 3], [5, 1, 2, 8, 3, 7], [5, 1, 3, 7, 2, 8], [5, 1, 3, 7, 8, 2], [5, 1, 3, 2, 7, 8], [5, 1, 3, 2, 8, 7], [5, 1, 3, 8, 7, 2], [5, 1, 3, 8, 2, 7], [5, 1, 8, 7, 2, 3], [5, 1, 8, 7, 3, 2], [5, 1, 8, 2, 7, 3], [5, 1, 8, 2, 3, 7], [5, 1, 8, 3, 7, 2], [5, 1, 8, 3, 2, 7], [3, 7, 2, 5, 8, 1], [3, 7, 2, 5, 1, 8], [3, 7, 2, 8, 5, 1], [3, 7, 2, 8, 1, 5], [3, 7, 2, 1, 5, 8], [3, 7, 2, 1, 8, 5], [3, 7, 5, 2, 8, 1], [3, 7, 5, 2, 1, 8], [3, 7, 5, 8, 2, 1], [3, 7, 5, 8, 1, 2], [3, 7, 5, 1, 2, 8], [3, 7, 5, 1, 8, 2], [3, 7, 8, 2, 5, 1], [3, 7, 8, 2, 1, 5], [3, 7, 8, 5, 2, 1], [3, 7, 8, 5, 1, 2], [3, 7, 8, 1, 2, 5], [3, 7, 8, 1, 5, 2], [3, 7, 1, 2, 5, 8], [3, 7, 1, 2, 8, 5], [3, 7, 1, 5, 2, 8], [3, 7, 1, 5, 8, 2], [3, 7, 1, 8, 2, 5], [3, 7, 1, 8, 5, 2], [3, 2, 7, 5, 8, 1], [3, 2, 7, 5, 1, 8], [3, 2, 7, 8, 5, 1], [3, 2, 7, 8, 1, 5], [3, 2, 7, 1, 5, 8], [3, 2, 7, 1, 8, 5], [3, 2, 5, 7, 8, 1], [3, 2, 5, 7, 1, 8], [3, 2, 5, 8, 7, 1], [3, 2, 5, 8, 1, 7], [3, 2, 5, 1, 7, 8], [3, 2, 5, 1, 8, 7], [3, 2, 8, 7, 5, 1], [3, 2, 8, 7, 1, 5], [3, 2, 8, 5, 7, 1], [3, 2, 8, 5, 1, 7], [3, 2, 8, 1, 7, 5], [3, 2, 8, 1, 5, 7], [3, 2, 1, 7, 5, 8], [3, 2, 1, 7, 8, 5], [3, 2, 1, 5, 7, 8], [3, 2, 1, 5, 8, 7], [3, 2, 1, 8, 7, 5], [3, 2, 1, 8, 5, 7], [3, 5, 7, 2, 8, 1], [3, 5, 7, 2, 1, 8], [3, 5, 7, 8, 2, 1], [3, 5, 7, 8, 1, 2], [3, 5, 7, 1, 2, 8], [3, 5, 7, 1, 8, 2], [3, 5, 2, 7, 8, 1], [3, 5, 2, 7, 1, 8], [3, 5, 2, 8, 7, 1], [3, 5, 2, 8, 1, 7], [3, 5, 2, 1, 7, 8], [3, 5, 2, 1, 8, 7], [3, 5, 8, 7, 2, 1], [3, 5, 8, 7, 1, 2], [3, 5, 8, 2, 7, 1], [3, 5, 8, 2, 1, 7], [3, 5, 8, 1, 7, 2], [3, 5, 8, 1, 2, 7], [3, 5, 1, 7, 2, 8], [3, 5, 1, 7, 8, 2], [3, 5, 1, 2, 7, 8], [3, 5, 1, 2, 8, 7], [3, 5, 1, 8, 7, 2], [3, 5, 1, 8, 2, 7], [3, 8, 7, 2, 5, 1], [3, 8, 7, 2, 1, 5], [3, 8, 7, 5, 2, 1], [3, 8, 7, 5, 1, 2], [3, 8, 7, 1, 2, 5], [3, 8, 7, 1, 5, 2], [3, 8, 2, 7, 5, 1], [3, 8, 2, 7, 1, 5], [3, 8, 2, 5, 7, 1], [3, 8, 2, 5, 1, 7], [3, 8, 2, 1, 7, 5], [3, 8, 2, 1, 5, 7], [3, 8, 5, 7, 2, 1], [3, 8, 5, 7, 1, 2], [3, 8, 5, 2, 7, 1], [3, 8, 5, 2, 1, 7], [3, 8, 5, 1, 7, 2], [3, 8, 5, 1, 2, 7], [3, 8, 1, 7, 2, 5], [3, 8, 1, 7, 5, 2], [3, 8, 1, 2, 7, 5], [3, 8, 1, 2, 5, 7], [3, 8, 1, 5, 7, 2], [3, 8, 1, 5, 2, 7], [3, 1, 7, 2, 5, 8], [3, 1, 7, 2, 8, 5], [3, 1, 7, 5, 2, 8], [3, 1, 7, 5, 8, 2], [3, 1, 7, 8, 2, 5], [3, 1, 7, 8, 5, 2], [3, 1, 2, 7, 5, 8], [3, 1, 2, 7, 8, 5], [3, 1, 2, 5, 7, 8], [3, 1, 2, 5, 8, 7], [3, 1, 2, 8, 7, 5], [3, 1, 2, 8, 5, 7], [3, 1, 5, 7, 2, 8], [3, 1, 5, 7, 8, 2], [3, 1, 5, 2, 7, 8], [3, 1, 5, 2, 8, 7], [3, 1, 5, 8, 7, 2], [3, 1, 5, 8, 2, 7], [3, 1, 8, 7, 2, 5], [3, 1, 8, 7, 5, 2], [3, 1, 8, 2, 7, 5], [3, 1, 8, 2, 5, 7], [3, 1, 8, 5, 7, 2], [3, 1, 8, 5, 2, 7], [8, 7, 2, 5, 3, 1], [8, 7, 2, 5, 1, 3], [8, 7, 2, 3, 5, 1], [8, 7, 2, 3, 1, 5], [8, 7, 2, 1, 5, 3], [8, 7, 2, 1, 3, 5], [8, 7, 5, 2, 3, 1], [8, 7, 5, 2, 1, 3], [8, 7, 5, 3, 2, 1], [8, 7, 5, 3, 1, 2], [8, 7, 5, 1, 2, 3], [8, 7, 5, 1, 3, 2], [8, 7, 3, 2, 5, 1], [8, 7, 3, 2, 1, 5], [8, 7, 3, 5, 2, 1], [8, 7, 3, 5, 1, 2], [8, 7, 3, 1, 2, 5], [8, 7, 3, 1, 5, 2], [8, 7, 1, 2, 5, 3], [8, 7, 1, 2, 3, 5], [8, 7, 1, 5, 2, 3], [8, 7, 1, 5, 3, 2], [8, 7, 1, 3, 2, 5], [8, 7, 1, 3, 5, 2], [8, 2, 7, 5, 3, 1], [8, 2, 7, 5, 1, 3], [8, 2, 7, 3, 5, 1], [8, 2, 7, 3, 1, 5], [8, 2, 7, 1, 5, 3], [8, 2, 7, 1, 3, 5], [8, 2, 5, 7, 3, 1], [8, 2, 5, 7, 1, 3], [8, 2, 5, 3, 7, 1], [8, 2, 5, 3, 1, 7], [8, 2, 5, 1, 7, 3], [8, 2, 5, 1, 3, 7], [8, 2, 3, 7, 5, 1], [8, 2, 3, 7, 1, 5], [8, 2, 3, 5, 7, 1], [8, 2, 3, 5, 1, 7], [8, 2, 3, 1, 7, 5], [8, 2, 3, 1, 5, 7], [8, 2, 1, 7, 5, 3], [8, 2, 1, 7, 3, 5], [8, 2, 1, 5, 7, 3], [8, 2, 1, 5, 3, 7], [8, 2, 1, 3, 7, 5], [8, 2, 1, 3, 5, 7], [8, 5, 7, 2, 3, 1], [8, 5, 7, 2, 1, 3], [8, 5, 7, 3, 2, 1], [8, 5, 7, 3, 1, 2], [8, 5, 7, 1, 2, 3], [8, 5, 7, 1, 3, 2], [8, 5, 2, 7, 3, 1], [8, 5, 2, 7, 1, 3], [8, 5, 2, 3, 7, 1], [8, 5, 2, 3, 1, 7], [8, 5, 2, 1, 7, 3], [8, 5, 2, 1, 3, 7], [8, 5, 3, 7, 2, 1], [8, 5, 3, 7, 1, 2], [8, 5, 3, 2, 7, 1], [8, 5, 3, 2, 1, 7], [8, 5, 3, 1, 7, 2], [8, 5, 3, 1, 2, 7], [8, 5, 1, 7, 2, 3], [8, 5, 1, 7, 3, 2], [8, 5, 1, 2, 7, 3], [8, 5, 1, 2, 3, 7], [8, 5, 1, 3, 7, 2], [8, 5, 1, 3, 2, 7], [8, 3, 7, 2, 5, 1], [8, 3, 7, 2, 1, 5], [8, 3, 7, 5, 2, 1], [8, 3, 7, 5, 1, 2], [8, 3, 7, 1, 2, 5], [8, 3, 7, 1, 5, 2], [8, 3, 2, 7, 5, 1], [8, 3, 2, 7, 1, 5], [8, 3, 2, 5, 7, 1], [8, 3, 2, 5, 1, 7], [8, 3, 2, 1, 7, 5], [8, 3, 2, 1, 5, 7], [8, 3, 5, 7, 2, 1], [8, 3, 5, 7, 1, 2], [8, 3, 5, 2, 7, 1], [8, 3, 5, 2, 1, 7], [8, 3, 5, 1, 7, 2], [8, 3, 5, 1, 2, 7], [8, 3, 1, 7, 2, 5], [8, 3, 1, 7, 5, 2], [8, 3, 1, 2, 7, 5], [8, 3, 1, 2, 5, 7], [8, 3, 1, 5, 7, 2], [8, 3, 1, 5, 2, 7], [8, 1, 7, 2, 5, 3], [8, 1, 7, 2, 3, 5], [8, 1, 7, 5, 2, 3], [8, 1, 7, 5, 3, 2], [8, 1, 7, 3, 2, 5], [8, 1, 7, 3, 5, 2], [8, 1, 2, 7, 5, 3], [8, 1, 2, 7, 3, 5], [8, 1, 2, 5, 7, 3], [8, 1, 2, 5, 3, 7], [8, 1, 2, 3, 7, 5], [8, 1, 2, 3, 5, 7], [8, 1, 5, 7, 2, 3], [8, 1, 5, 7, 3, 2], [8, 1, 5, 2, 7, 3], [8, 1, 5, 2, 3, 7], [8, 1, 5, 3, 7, 2], [8, 1, 5, 3, 2, 7], [8, 1, 3, 7, 2, 5], [8, 1, 3, 7, 5, 2], [8, 1, 3, 2, 7, 5], [8, 1, 3, 2, 5, 7], [8, 1, 3, 5, 7, 2], [8, 1, 3, 5, 2, 7], [1, 7, 2, 5, 3, 8], [1, 7, 2, 5, 8, 3], [1, 7, 2, 3, 5, 8], [1, 7, 2, 3, 8, 5], [1, 7, 2, 8, 5, 3], [1, 7, 2, 8, 3, 5], [1, 7, 5, 2, 3, 8], [1, 7, 5, 2, 8, 3], [1, 7, 5, 3, 2, 8], [1, 7, 5, 3, 8, 2], [1, 7, 5, 8, 2, 3], [1, 7, 5, 8, 3, 2], [1, 7, 3, 2, 5, 8], [1, 7, 3, 2, 8, 5], [1, 7, 3, 5, 2, 8], [1, 7, 3, 5, 8, 2], [1, 7, 3, 8, 2, 5], [1, 7, 3, 8, 5, 2], [1, 7, 8, 2, 5, 3], [1, 7, 8, 2, 3, 5], [1, 7, 8, 5, 2, 3], [1, 7, 8, 5, 3, 2], [1, 7, 8, 3, 2, 5], [1, 7, 8, 3, 5, 2], [1, 2, 7, 5, 3, 8], [1, 2, 7, 5, 8, 3], [1, 2, 7, 3, 5, 8], [1, 2, 7, 3, 8, 5], [1, 2, 7, 8, 5, 3], [1, 2, 7, 8, 3, 5], [1, 2, 5, 7, 3, 8], [1, 2, 5, 7, 8, 3], [1, 2, 5, 3, 7, 8], [1, 2, 5, 3, 8, 7], [1, 2, 5, 8, 7, 3], [1, 2, 5, 8, 3, 7], [1, 2, 3, 7, 5, 8], [1, 2, 3, 7, 8, 5], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 8, 7], [1, 2, 3, 8, 7, 5], [1, 2, 3, 8, 5, 7], [1, 2, 8, 7, 5, 3], [1, 2, 8, 7, 3, 5], [1, 2, 8, 5, 7, 3], [1, 2, 8, 5, 3, 7], [1, 2, 8, 3, 7, 5], [1, 2, 8, 3, 5, 7], [1, 5, 7, 2, 3, 8], [1, 5, 7, 2, 8, 3], [1, 5, 7, 3, 2, 8], [1, 5, 7, 3, 8, 2], [1, 5, 7, 8, 2, 3], [1, 5, 7, 8, 3, 2], [1, 5, 2, 7, 3, 8], [1, 5, 2, 7, 8, 3], [1, 5, 2, 3, 7, 8], [1, 5, 2, 3, 8, 7], [1, 5, 2, 8, 7, 3], [1, 5, 2, 8, 3, 7], [1, 5, 3, 7, 2, 8], [1, 5, 3, 7, 8, 2], [1, 5, 3, 2, 7, 8], [1, 5, 3, 2, 8, 7], [1, 5, 3, 8, 7, 2], [1, 5, 3, 8, 2, 7], [1, 5, 8, 7, 2, 3], [1, 5, 8, 7, 3, 2], [1, 5, 8, 2, 7, 3], [1, 5, 8, 2, 3, 7], [1, 5, 8, 3, 7, 2], [1, 5, 8, 3, 2, 7], [1, 3, 7, 2, 5, 8], [1, 3, 7, 2, 8, 5], [1, 3, 7, 5, 2, 8], [1, 3, 7, 5, 8, 2], [1, 3, 7, 8, 2, 5], [1, 3, 7, 8, 5, 2], [1, 3, 2, 7, 5, 8], [1, 3, 2, 7, 8, 5], [1, 3, 2, 5, 7, 8], [1, 3, 2, 5, 8, 7], [1, 3, 2, 8, 7, 5], [1, 3, 2, 8, 5, 7], [1, 3, 5, 7, 2, 8], [1, 3, 5, 7, 8, 2], [1, 3, 5, 2, 7, 8], [1, 3, 5, 2, 8, 7], [1, 3, 5, 8, 7, 2], [1, 3, 5, 8, 2, 7], [1, 3, 8, 7, 2, 5], [1, 3, 8, 7, 5, 2], [1, 3, 8, 2, 7, 5], [1, 3, 8, 2, 5, 7], [1, 3, 8, 5, 7, 2], [1, 3, 8, 5, 2, 7], [1, 8, 7, 2, 5, 3], [1, 8, 7, 2, 3, 5], [1, 8, 7, 5, 2, 3], [1, 8, 7, 5, 3, 2], [1, 8, 7, 3, 2, 5], [1, 8, 7, 3, 5, 2], [1, 8, 2, 7, 5, 3], [1, 8, 2, 7, 3, 5], [1, 8, 2, 5, 7, 3], [1, 8, 2, 5, 3, 7], [1, 8, 2, 3, 7, 5], [1, 8, 2, 3, 5, 7], [1, 8, 5, 7, 2, 3], [1, 8, 5, 7, 3, 2], [1, 8, 5, 2, 7, 3], [1, 8, 5, 2, 3, 7], [1, 8, 5, 3, 7, 2], [1, 8, 5, 3, 2, 7], [1, 8, 3, 7, 2, 5], [1, 8, 3, 7, 5, 2], [1, 8, 3, 2, 7, 5], [1, 8, 3, 2, 5, 7], [1, 8, 3, 5, 7, 2], [1, 8, 3, 5, 2, 7]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5], [1, 2, 3, 5, 4], [1, 2, 4, 3, 5], [1, 2, 4, 5, 3], [1, 2, 5, 3, 4], [1, 2, 5, 4, 3], [1, 3, 2, 4, 5], [1, 3, 2, 5, 4], [1, 3, 4, 2, 5], [1, 3, 4, 5, 2], [1, 3, 5, 2, 4], [1, 3, 5, 4, 2], [1, 4, 2, 3, 5], [1, 4, 2, 5, 3], [1, 4, 3, 2, 5], [1, 4, 3, 5, 2], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 2, 3, 4], [1, 5, 2, 4, 3], [1, 5, 3, 2, 4], [1, 5, 3, 4, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2], [2, 1, 3, 4, 5], [2, 1, 3, 5, 4], [2, 1, 4, 3, 5], [2, 1, 4, 5, 3], [2, 1, 5, 3, 4], [2, 1, 5, 4, 3], [2, 3, 1, 4, 5], [2, 3, 1, 5, 4], [2, 3, 4, 1, 5], [2, 3, 4, 5, 1], [2, 3, 5, 1, 4], [2, 3, 5, 4, 1], [2, 4, 1, 3, 5], [2, 4, 1, 5, 3], [2, 4, 3, 1, 5], [2, 4, 3, 5, 1], [2, 4, 5, 1, 3], [2, 4, 5, 3, 1], [2, 5, 1, 3, 4], [2, 5, 1, 4, 3], [2, 5, 3, 1, 4], [2, 5, 3, 4, 1], [2, 5, 4, 1, 3], [2, 5, 4, 3, 1], [3, 1, 2, 4, 5], [3, 1, 2, 5, 4], [3, 1, 4, 2, 5], [3, 1, 4, 5, 2], [3, 1, 5, 2, 4], [3, 1, 5, 4, 2], [3, 2, 1, 4, 5], [3, 2, 1, 5, 4], [3, 2, 4, 1, 5], [3, 2, 4, 5, 1], [3, 2, 5, 1, 4], [3, 2, 5, 4, 1], [3, 4, 1, 2, 5], [3, 4, 1, 5, 2], [3, 4, 2, 1, 5], [3, 4, 2, 5, 1], [3, 4, 5, 1, 2], [3, 4, 5, 2, 1], [3, 5, 1, 2, 4], [3, 5, 1, 4, 2], [3, 5, 2, 1, 4], [3, 5, 2, 4, 1], [3, 5, 4, 1, 2], [3, 5, 4, 2, 1], [4, 1, 2, 3, 5], [4, 1, 2, 5, 3], [4, 1, 3, 2, 5], [4, 1, 3, 5, 2], [4, 1, 5, 2, 3], [4, 1, 5, 3, 2], [4, 2, 1, 3, 5], [4, 2, 1, 5, 3], [4, 2, 3, 1, 5], [4, 2, 3, 5, 1], [4, 2, 5, 1, 3], [4, 2, 5, 3, 1], [4, 3, 1, 2, 5], [4, 3, 1, 5, 2], [4, 3, 2, 1, 5], [4, 3, 2, 5, 1], [4, 3, 5, 1, 2], [4, 3, 5, 2, 1], [4, 5, 1, 2, 3], [4, 5, 1, 3, 2], [4, 5, 2, 1, 3], [4, 5, 2, 3, 1], [4, 5, 3, 1, 2], [4, 5, 3, 2, 1], [5, 1, 2, 3, 4], [5, 1, 2, 4, 3], [5, 1, 3, 2, 4], [5, 1, 3, 4, 2], [5, 1, 4, 2, 3], [5, 1, 4, 3, 2], [5, 2, 1, 3, 4], [5, 2, 1, 4, 3], [5, 2, 3, 1, 4], [5, 2, 3, 4, 1], [5, 2, 4, 1, 3], [5, 2, 4, 3, 1], [5, 3, 1, 2, 4], [5, 3, 1, 4, 2], [5, 3, 2, 1, 4], [5, 3, 2, 4, 1], [5, 3, 4, 1, 2], [5, 3, 4, 2, 1], [5, 4, 1, 2, 3], [5, 4, 1, 3, 2], [5, 4, 2, 1, 3], [5, 4, 2, 3, 1], [5, 4, 3, 1, 2], [5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[0, 2, 4, 6, 8, 10]), [[0, 2, 4, 6, 8, 10], [0, 2, 4, 6, 10, 8], [0, 2, 4, 8, 6, 10], [0, 2, 4, 8, 10, 6], [0, 2, 4, 10, 6, 8], [0, 2, 4, 10, 8, 6], [0, 2, 6, 4, 8, 10], [0, 2, 6, 4, 10, 8], [0, 2, 6, 8, 4, 10], [0, 2, 6, 8, 10, 4], [0, 2, 6, 10, 4, 8], [0, 2, 6, 10, 8, 4], [0, 2, 8, 4, 6, 10], [0, 2, 8, 4, 10, 6], [0, 2, 8, 6, 4, 10], [0, 2, 8, 6, 10, 4], [0, 2, 8, 10, 4, 6], [0, 2, 8, 10, 6, 4], [0, 2, 10, 4, 6, 8], [0, 2, 10, 4, 8, 6], [0, 2, 10, 6, 4, 8], [0, 2, 10, 6, 8, 4], [0, 2, 10, 8, 4, 6], [0, 2, 10, 8, 6, 4], [0, 4, 2, 6, 8, 10], [0, 4, 2, 6, 10, 8], [0, 4, 2, 8, 6, 10], [0, 4, 2, 8, 10, 6], [0, 4, 2, 10, 6, 8], [0, 4, 2, 10, 8, 6], [0, 4, 6, 2, 8, 10], [0, 4, 6, 2, 10, 8], [0, 4, 6, 8, 2, 10], [0, 4, 6, 8, 10, 2], [0, 4, 6, 10, 2, 8], [0, 4, 6, 10, 8, 2], [0, 4, 8, 2, 6, 10], [0, 4, 8, 2, 10, 6], [0, 4, 8, 6, 2, 10], [0, 4, 8, 6, 10, 2], [0, 4, 8, 10, 2, 6], [0, 4, 8, 10, 6, 2], [0, 4, 10, 2, 6, 8], [0, 4, 10, 2, 8, 6], [0, 4, 10, 6, 2, 8], [0, 4, 10, 6, 8, 2], [0, 4, 10, 8, 2, 6], [0, 4, 10, 8, 6, 2], [0, 6, 2, 4, 8, 10], [0, 6, 2, 4, 10, 8], [0, 6, 2, 8, 4, 10], [0, 6, 2, 8, 10, 4], [0, 6, 2, 10, 4, 8], [0, 6, 2, 10, 8, 4], [0, 6, 4, 2, 8, 10], [0, 6, 4, 2, 10, 8], [0, 6, 4, 8, 2, 10], [0, 6, 4, 8, 10, 2], [0, 6, 4, 10, 2, 8], [0, 6, 4, 10, 8, 2], [0, 6, 8, 2, 4, 10], [0, 6, 8, 2, 10, 4], [0, 6, 8, 4, 2, 10], [0, 6, 8, 4, 10, 2], [0, 6, 8, 10, 2, 4], [0, 6, 8, 10, 4, 2], [0, 6, 10, 2, 4, 8], [0, 6, 10, 2, 8, 4], [0, 6, 10, 4, 2, 8], [0, 6, 10, 4, 8, 2], [0, 6, 10, 8, 2, 4], [0, 6, 10, 8, 4, 2], [0, 8, 2, 4, 6, 10], [0, 8, 2, 4, 10, 6], [0, 8, 2, 6, 4, 10], [0, 8, 2, 6, 10, 4], [0, 8, 2, 10, 4, 6], [0, 8, 2, 10, 6, 4], [0, 8, 4, 2, 6, 10], [0, 8, 4, 2, 10, 6], [0, 8, 4, 6, 2, 10], [0, 8, 4, 6, 10, 2], [0, 8, 4, 10, 2, 6], [0, 8, 4, 10, 6, 2], [0, 8, 6, 2, 4, 10], [0, 8, 6, 2, 10, 4], [0, 8, 6, 4, 2, 10], [0, 8, 6, 4, 10, 2], [0, 8, 6, 10, 2, 4], [0, 8, 6, 10, 4, 2], [0, 8, 10, 2, 4, 6], [0, 8, 10, 2, 6, 4], [0, 8, 10, 4, 2, 6], [0, 8, 10, 4, 6, 2], [0, 8, 10, 6, 2, 4], [0, 8, 10, 6, 4, 2], [0, 10, 2, 4, 6, 8], [0, 10, 2, 4, 8, 6], [0, 10, 2, 6, 4, 8], [0, 10, 2, 6, 8, 4], [0, 10, 2, 8, 4, 6], [0, 10, 2, 8, 6, 4], [0, 10, 4, 2, 6, 8], [0, 10, 4, 2, 8, 6], [0, 10, 4, 6, 2, 8], [0, 10, 4, 6, 8, 2], [0, 10, 4, 8, 2, 6], [0, 10, 4, 8, 6, 2], [0, 10, 6, 2, 4, 8], [0, 10, 6, 2, 8, 4], [0, 10, 6, 4, 2, 8], [0, 10, 6, 4, 8, 2], [0, 10, 6, 8, 2, 4], [0, 10, 6, 8, 4, 2], [0, 10, 8, 2, 4, 6], [0, 10, 8, 2, 6, 4], [0, 10, 8, 4, 2, 6], [0, 10, 8, 4, 6, 2], [0, 10, 8, 6, 2, 4], [0, 10, 8, 6, 4, 2], [2, 0, 4, 6, 8, 10], [2, 0, 4, 6, 10, 8], [2, 0, 4, 8, 6, 10], [2, 0, 4, 8, 10, 6], [2, 0, 4, 10, 6, 8], [2, 0, 4, 10, 8, 6], [2, 0, 6, 4, 8, 10], [2, 0, 6, 4, 10, 8], [2, 0, 6, 8, 4, 10], [2, 0, 6, 8, 10, 4], [2, 0, 6, 10, 4, 8], [2, 0, 6, 10, 8, 4], [2, 0, 8, 4, 6, 10], [2, 0, 8, 4, 10, 6], [2, 0, 8, 6, 4, 10], [2, 0, 8, 6, 10, 4], [2, 0, 8, 10, 4, 6], [2, 0, 8, 10, 6, 4], [2, 0, 10, 4, 6, 8], [2, 0, 10, 4, 8, 6], [2, 0, 10, 6, 4, 8], [2, 0, 10, 6, 8, 4], [2, 0, 10, 8, 4, 6], [2, 0, 10, 8, 6, 4], [2, 4, 0, 6, 8, 10], [2, 4, 0, 6, 10, 8], [2, 4, 0, 8, 6, 10], [2, 4, 0, 8, 10, 6], [2, 4, 0, 10, 6, 8], [2, 4, 0, 10, 8, 6], [2, 4, 6, 0, 8, 10], [2, 4, 6, 0, 10, 8], [2, 4, 6, 8, 0, 10], [2, 4, 6, 8, 10, 0], [2, 4, 6, 10, 0, 8], [2, 4, 6, 10, 8, 0], [2, 4, 8, 0, 6, 10], [2, 4, 8, 0, 10, 6], [2, 4, 8, 6, 0, 10], [2, 4, 8, 6, 10, 0], [2, 4, 8, 10, 0, 6], [2, 4, 8, 10, 6, 0], [2, 4, 10, 0, 6, 8], [2, 4, 10, 0, 8, 6], [2, 4, 10, 6, 0, 8], [2, 4, 10, 6, 8, 0], [2, 4, 10, 8, 0, 6], [2, 4, 10, 8, 6, 0], [2, 6, 0, 4, 8, 10], [2, 6, 0, 4, 10, 8], [2, 6, 0, 8, 4, 10], [2, 6, 0, 8, 10, 4], [2, 6, 0, 10, 4, 8], [2, 6, 0, 10, 8, 4], [2, 6, 4, 0, 8, 10], [2, 6, 4, 0, 10, 8], [2, 6, 4, 8, 0, 10], [2, 6, 4, 8, 10, 0], [2, 6, 4, 10, 0, 8], [2, 6, 4, 10, 8, 0], [2, 6, 8, 0, 4, 10], [2, 6, 8, 0, 10, 4], [2, 6, 8, 4, 0, 10], [2, 6, 8, 4, 10, 0], [2, 6, 8, 10, 0, 4], [2, 6, 8, 10, 4, 0], [2, 6, 10, 0, 4, 8], [2, 6, 10, 0, 8, 4], [2, 6, 10, 4, 0, 8], [2, 6, 10, 4, 8, 0], [2, 6, 10, 8, 0, 4], [2, 6, 10, 8, 4, 0], [2, 8, 0, 4, 6, 10], [2, 8, 0, 4, 10, 6], [2, 8, 0, 6, 4, 10], [2, 8, 0, 6, 10, 4], [2, 8, 0, 10, 4, 6], [2, 8, 0, 10, 6, 4], [2, 8, 4, 0, 6, 10], [2, 8, 4, 0, 10, 6], [2, 8, 4, 6, 0, 10], [2, 8, 4, 6, 10, 0], [2, 8, 4, 10, 0, 6], [2, 8, 4, 10, 6, 0], [2, 8, 6, 0, 4, 10], [2, 8, 6, 0, 10, 4], [2, 8, 6, 4, 0, 10], [2, 8, 6, 4, 10, 0], [2, 8, 6, 10, 0, 4], [2, 8, 6, 10, 4, 0], [2, 8, 10, 0, 4, 6], [2, 8, 10, 0, 6, 4], [2, 8, 10, 4, 0, 6], [2, 8, 10, 4, 6, 0], [2, 8, 10, 6, 0, 4], [2, 8, 10, 6, 4, 0], [2, 10, 0, 4, 6, 8], [2, 10, 0, 4, 8, 6], [2, 10, 0, 6, 4, 8], [2, 10, 0, 6, 8, 4], [2, 10, 0, 8, 4, 6], [2, 10, 0, 8, 6, 4], [2, 10, 4, 0, 6, 8], [2, 10, 4, 0, 8, 6], [2, 10, 4, 6, 0, 8], [2, 10, 4, 6, 8, 0], [2, 10, 4, 8, 0, 6], [2, 10, 4, 8, 6, 0], [2, 10, 6, 0, 4, 8], [2, 10, 6, 0, 8, 4], [2, 10, 6, 4, 0, 8], [2, 10, 6, 4, 8, 0], [2, 10, 6, 8, 0, 4], [2, 10, 6, 8, 4, 0], [2, 10, 8, 0, 4, 6], [2, 10, 8, 0, 6, 4], [2, 10, 8, 4, 0, 6], [2, 10, 8, 4, 6, 0], [2, 10, 8, 6, 0, 4], [2, 10, 8, 6, 4, 0], [4, 0, 2, 6, 8, 10], [4, 0, 2, 6, 10, 8], [4, 0, 2, 8, 6, 10], [4, 0, 2, 8, 10, 6], [4, 0, 2, 10, 6, 8], [4, 0, 2, 10, 8, 6], [4, 0, 6, 2, 8, 10], [4, 0, 6, 2, 10, 8], [4, 0, 6, 8, 2, 10], [4, 0, 6, 8, 10, 2], [4, 0, 6, 10, 2, 8], [4, 0, 6, 10, 8, 2], [4, 0, 8, 2, 6, 10], [4, 0, 8, 2, 10, 6], [4, 0, 8, 6, 2, 10], [4, 0, 8, 6, 10, 2], [4, 0, 8, 10, 2, 6], [4, 0, 8, 10, 6, 2], [4, 0, 10, 2, 6, 8], [4, 0, 10, 2, 8, 6], [4, 0, 10, 6, 2, 8], [4, 0, 10, 6, 8, 2], [4, 0, 10, 8, 2, 6], [4, 0, 10, 8, 6, 2], [4, 2, 0, 6, 8, 10], [4, 2, 0, 6, 10, 8], [4, 2, 0, 8, 6, 10], [4, 2, 0, 8, 10, 6], [4, 2, 0, 10, 6, 8], [4, 2, 0, 10, 8, 6], [4, 2, 6, 0, 8, 10], [4, 2, 6, 0, 10, 8], [4, 2, 6, 8, 0, 10], [4, 2, 6, 8, 10, 0], [4, 2, 6, 10, 0, 8], [4, 2, 6, 10, 8, 0], [4, 2, 8, 0, 6, 10], [4, 2, 8, 0, 10, 6], [4, 2, 8, 6, 0, 10], [4, 2, 8, 6, 10, 0], [4, 2, 8, 10, 0, 6], [4, 2, 8, 10, 6, 0], [4, 2, 10, 0, 6, 8], [4, 2, 10, 0, 8, 6], [4, 2, 10, 6, 0, 8], [4, 2, 10, 6, 8, 0], [4, 2, 10, 8, 0, 6], [4, 2, 10, 8, 6, 0], [4, 6, 0, 2, 8, 10], [4, 6, 0, 2, 10, 8], [4, 6, 0, 8, 2, 10], [4, 6, 0, 8, 10, 2], [4, 6, 0, 10, 2, 8], [4, 6, 0, 10, 8, 2], [4, 6, 2, 0, 8, 10], [4, 6, 2, 0, 10, 8], [4, 6, 2, 8, 0, 10], [4, 6, 2, 8, 10, 0], [4, 6, 2, 10, 0, 8], [4, 6, 2, 10, 8, 0], [4, 6, 8, 0, 2, 10], [4, 6, 8, 0, 10, 2], [4, 6, 8, 2, 0, 10], [4, 6, 8, 2, 10, 0], [4, 6, 8, 10, 0, 2], [4, 6, 8, 10, 2, 0], [4, 6, 10, 0, 2, 8], [4, 6, 10, 0, 8, 2], [4, 6, 10, 2, 0, 8], [4, 6, 10, 2, 8, 0], [4, 6, 10, 8, 0, 2], [4, 6, 10, 8, 2, 0], [4, 8, 0, 2, 6, 10], [4, 8, 0, 2, 10, 6], [4, 8, 0, 6, 2, 10], [4, 8, 0, 6, 10, 2], [4, 8, 0, 10, 2, 6], [4, 8, 0, 10, 6, 2], [4, 8, 2, 0, 6, 10], [4, 8, 2, 0, 10, 6], [4, 8, 2, 6, 0, 10], [4, 8, 2, 6, 10, 0], [4, 8, 2, 10, 0, 6], [4, 8, 2, 10, 6, 0], [4, 8, 6, 0, 2, 10], [4, 8, 6, 0, 10, 2], [4, 8, 6, 2, 0, 10], [4, 8, 6, 2, 10, 0], [4, 8, 6, 10, 0, 2], [4, 8, 6, 10, 2, 0], [4, 8, 10, 0, 2, 6], [4, 8, 10, 0, 6, 2], [4, 8, 10, 2, 0, 6], [4, 8, 10, 2, 6, 0], [4, 8, 10, 6, 0, 2], [4, 8, 10, 6, 2, 0], [4, 10, 0, 2, 6, 8], [4, 10, 0, 2, 8, 6], [4, 10, 0, 6, 2, 8], [4, 10, 0, 6, 8, 2], [4, 10, 0, 8, 2, 6], [4, 10, 0, 8, 6, 2], [4, 10, 2, 0, 6, 8], [4, 10, 2, 0, 8, 6], [4, 10, 2, 6, 0, 8], [4, 10, 2, 6, 8, 0], [4, 10, 2, 8, 0, 6], [4, 10, 2, 8, 6, 0], [4, 10, 6, 0, 2, 8], [4, 10, 6, 0, 8, 2], [4, 10, 6, 2, 0, 8], [4, 10, 6, 2, 8, 0], [4, 10, 6, 8, 0, 2], [4, 10, 6, 8, 2, 0], [4, 10, 8, 0, 2, 6], [4, 10, 8, 0, 6, 2], [4, 10, 8, 2, 0, 6], [4, 10, 8, 2, 6, 0], [4, 10, 8, 6, 0, 2], [4, 10, 8, 6, 2, 0], [6, 0, 2, 4, 8, 10], [6, 0, 2, 4, 10, 8], [6, 0, 2, 8, 4, 10], [6, 0, 2, 8, 10, 4], [6, 0, 2, 10, 4, 8], [6, 0, 2, 10, 8, 4], [6, 0, 4, 2, 8, 10], [6, 0, 4, 2, 10, 8], [6, 0, 4, 8, 2, 10], [6, 0, 4, 8, 10, 2], [6, 0, 4, 10, 2, 8], [6, 0, 4, 10, 8, 2], [6, 0, 8, 2, 4, 10], [6, 0, 8, 2, 10, 4], [6, 0, 8, 4, 2, 10], [6, 0, 8, 4, 10, 2], [6, 0, 8, 10, 2, 4], [6, 0, 8, 10, 4, 2], [6, 0, 10, 2, 4, 8], [6, 0, 10, 2, 8, 4], [6, 0, 10, 4, 2, 8], [6, 0, 10, 4, 8, 2], [6, 0, 10, 8, 2, 4], [6, 0, 10, 8, 4, 2], [6, 2, 0, 4, 8, 10], [6, 2, 0, 4, 10, 8], [6, 2, 0, 8, 4, 10], [6, 2, 0, 8, 10, 4], [6, 2, 0, 10, 4, 8], [6, 2, 0, 10, 8, 4], [6, 2, 4, 0, 8, 10], [6, 2, 4, 0, 10, 8], [6, 2, 4, 8, 0, 10], [6, 2, 4, 8, 10, 0], [6, 2, 4, 10, 0, 8], [6, 2, 4, 10, 8, 0], [6, 2, 8, 0, 4, 10], [6, 2, 8, 0, 10, 4], [6, 2, 8, 4, 0, 10], [6, 2, 8, 4, 10, 0], [6, 2, 8, 10, 0, 4], [6, 2, 8, 10, 4, 0], [6, 2, 10, 0, 4, 8], [6, 2, 10, 0, 8, 4], [6, 2, 10, 4, 0, 8], [6, 2, 10, 4, 8, 0], [6, 2, 10, 8, 0, 4], [6, 2, 10, 8, 4, 0], [6, 4, 0, 2, 8, 10], [6, 4, 0, 2, 10, 8], [6, 4, 0, 8, 2, 10], [6, 4, 0, 8, 10, 2], [6, 4, 0, 10, 2, 8], [6, 4, 0, 10, 8, 2], [6, 4, 2, 0, 8, 10], [6, 4, 2, 0, 10, 8], [6, 4, 2, 8, 0, 10], [6, 4, 2, 8, 10, 0], [6, 4, 2, 10, 0, 8], [6, 4, 2, 10, 8, 0], [6, 4, 8, 0, 2, 10], [6, 4, 8, 0, 10, 2], [6, 4, 8, 2, 0, 10], [6, 4, 8, 2, 10, 0], [6, 4, 8, 10, 0, 2], [6, 4, 8, 10, 2, 0], [6, 4, 10, 0, 2, 8], [6, 4, 10, 0, 8, 2], [6, 4, 10, 2, 0, 8], [6, 4, 10, 2, 8, 0], [6, 4, 10, 8, 0, 2], [6, 4, 10, 8, 2, 0], [6, 8, 0, 2, 4, 10], [6, 8, 0, 2, 10, 4], [6, 8, 0, 4, 2, 10], [6, 8, 0, 4, 10, 2], [6, 8, 0, 10, 2, 4], [6, 8, 0, 10, 4, 2], [6, 8, 2, 0, 4, 10], [6, 8, 2, 0, 10, 4], [6, 8, 2, 4, 0, 10], [6, 8, 2, 4, 10, 0], [6, 8, 2, 10, 0, 4], [6, 8, 2, 10, 4, 0], [6, 8, 4, 0, 2, 10], [6, 8, 4, 0, 10, 2], [6, 8, 4, 2, 0, 10], [6, 8, 4, 2, 10, 0], [6, 8, 4, 10, 0, 2], [6, 8, 4, 10, 2, 0], [6, 8, 10, 0, 2, 4], [6, 8, 10, 0, 4, 2], [6, 8, 10, 2, 0, 4], [6, 8, 10, 2, 4, 0], [6, 8, 10, 4, 0, 2], [6, 8, 10, 4, 2, 0], [6, 10, 0, 2, 4, 8], [6, 10, 0, 2, 8, 4], [6, 10, 0, 4, 2, 8], [6, 10, 0, 4, 8, 2], [6, 10, 0, 8, 2, 4], [6, 10, 0, 8, 4, 2], [6, 10, 2, 0, 4, 8], [6, 10, 2, 0, 8, 4], [6, 10, 2, 4, 0, 8], [6, 10, 2, 4, 8, 0], [6, 10, 2, 8, 0, 4], [6, 10, 2, 8, 4, 0], [6, 10, 4, 0, 2, 8], [6, 10, 4, 0, 8, 2], [6, 10, 4, 2, 0, 8], [6, 10, 4, 2, 8, 0], [6, 10, 4, 8, 0, 2], [6, 10, 4, 8, 2, 0], [6, 10, 8, 0, 2, 4], [6, 10, 8, 0, 4, 2], [6, 10, 8, 2, 0, 4], [6, 10, 8, 2, 4, 0], [6, 10, 8, 4, 0, 2], [6, 10, 8, 4, 2, 0], [8, 0, 2, 4, 6, 10], [8, 0, 2, 4, 10, 6], [8, 0, 2, 6, 4, 10], [8, 0, 2, 6, 10, 4], [8, 0, 2, 10, 4, 6], [8, 0, 2, 10, 6, 4], [8, 0, 4, 2, 6, 10], [8, 0, 4, 2, 10, 6], [8, 0, 4, 6, 2, 10], [8, 0, 4, 6, 10, 2], [8, 0, 4, 10, 2, 6], [8, 0, 4, 10, 6, 2], [8, 0, 6, 2, 4, 10], [8, 0, 6, 2, 10, 4], [8, 0, 6, 4, 2, 10], [8, 0, 6, 4, 10, 2], [8, 0, 6, 10, 2, 4], [8, 0, 6, 10, 4, 2], [8, 0, 10, 2, 4, 6], [8, 0, 10, 2, 6, 4], [8, 0, 10, 4, 2, 6], [8, 0, 10, 4, 6, 2], [8, 0, 10, 6, 2, 4], [8, 0, 10, 6, 4, 2], [8, 2, 0, 4, 6, 10], [8, 2, 0, 4, 10, 6], [8, 2, 0, 6, 4, 10], [8, 2, 0, 6, 10, 4], [8, 2, 0, 10, 4, 6], [8, 2, 0, 10, 6, 4], [8, 2, 4, 0, 6, 10], [8, 2, 4, 0, 10, 6], [8, 2, 4, 6, 0, 10], [8, 2, 4, 6, 10, 0], [8, 2, 4, 10, 0, 6], [8, 2, 4, 10, 6, 0], [8, 2, 6, 0, 4, 10], [8, 2, 6, 0, 10, 4], [8, 2, 6, 4, 0, 10], [8, 2, 6, 4, 10, 0], [8, 2, 6, 10, 0, 4], [8, 2, 6, 10, 4, 0], [8, 2, 10, 0, 4, 6], [8, 2, 10, 0, 6, 4], [8, 2, 10, 4, 0, 6], [8, 2, 10, 4, 6, 0], [8, 2, 10, 6, 0, 4], [8, 2, 10, 6, 4, 0], [8, 4, 0, 2, 6, 10], [8, 4, 0, 2, 10, 6], [8, 4, 0, 6, 2, 10], [8, 4, 0, 6, 10, 2], [8, 4, 0, 10, 2, 6], [8, 4, 0, 10, 6, 2], [8, 4, 2, 0, 6, 10], [8, 4, 2, 0, 10, 6], [8, 4, 2, 6, 0, 10], [8, 4, 2, 6, 10, 0], [8, 4, 2, 10, 0, 6], [8, 4, 2, 10, 6, 0], [8, 4, 6, 0, 2, 10], [8, 4, 6, 0, 10, 2], [8, 4, 6, 2, 0, 10], [8, 4, 6, 2, 10, 0], [8, 4, 6, 10, 0, 2], [8, 4, 6, 10, 2, 0], [8, 4, 10, 0, 2, 6], [8, 4, 10, 0, 6, 2], [8, 4, 10, 2, 0, 6], [8, 4, 10, 2, 6, 0], [8, 4, 10, 6, 0, 2], [8, 4, 10, 6, 2, 0], [8, 6, 0, 2, 4, 10], [8, 6, 0, 2, 10, 4], [8, 6, 0, 4, 2, 10], [8, 6, 0, 4, 10, 2], [8, 6, 0, 10, 2, 4], [8, 6, 0, 10, 4, 2], [8, 6, 2, 0, 4, 10], [8, 6, 2, 0, 10, 4], [8, 6, 2, 4, 0, 10], [8, 6, 2, 4, 10, 0], [8, 6, 2, 10, 0, 4], [8, 6, 2, 10, 4, 0], [8, 6, 4, 0, 2, 10], [8, 6, 4, 0, 10, 2], [8, 6, 4, 2, 0, 10], [8, 6, 4, 2, 10, 0], [8, 6, 4, 10, 0, 2], [8, 6, 4, 10, 2, 0], [8, 6, 10, 0, 2, 4], [8, 6, 10, 0, 4, 2], [8, 6, 10, 2, 0, 4], [8, 6, 10, 2, 4, 0], [8, 6, 10, 4, 0, 2], [8, 6, 10, 4, 2, 0], [8, 10, 0, 2, 4, 6], [8, 10, 0, 2, 6, 4], [8, 10, 0, 4, 2, 6], [8, 10, 0, 4, 6, 2], [8, 10, 0, 6, 2, 4], [8, 10, 0, 6, 4, 2], [8, 10, 2, 0, 4, 6], [8, 10, 2, 0, 6, 4], [8, 10, 2, 4, 0, 6], [8, 10, 2, 4, 6, 0], [8, 10, 2, 6, 0, 4], [8, 10, 2, 6, 4, 0], [8, 10, 4, 0, 2, 6], [8, 10, 4, 0, 6, 2], [8, 10, 4, 2, 0, 6], [8, 10, 4, 2, 6, 0], [8, 10, 4, 6, 0, 2], [8, 10, 4, 6, 2, 0], [8, 10, 6, 0, 2, 4], [8, 10, 6, 0, 4, 2], [8, 10, 6, 2, 0, 4], [8, 10, 6, 2, 4, 0], [8, 10, 6, 4, 0, 2], [8, 10, 6, 4, 2, 0], [10, 0, 2, 4, 6, 8], [10, 0, 2, 4, 8, 6], [10, 0, 2, 6, 4, 8], [10, 0, 2, 6, 8, 4], [10, 0, 2, 8, 4, 6], [10, 0, 2, 8, 6, 4], [10, 0, 4, 2, 6, 8], [10, 0, 4, 2, 8, 6], [10, 0, 4, 6, 2, 8], [10, 0, 4, 6, 8, 2], [10, 0, 4, 8, 2, 6], [10, 0, 4, 8, 6, 2], [10, 0, 6, 2, 4, 8], [10, 0, 6, 2, 8, 4], [10, 0, 6, 4, 2, 8], [10, 0, 6, 4, 8, 2], [10, 0, 6, 8, 2, 4], [10, 0, 6, 8, 4, 2], [10, 0, 8, 2, 4, 6], [10, 0, 8, 2, 6, 4], [10, 0, 8, 4, 2, 6], [10, 0, 8, 4, 6, 2], [10, 0, 8, 6, 2, 4], [10, 0, 8, 6, 4, 2], [10, 2, 0, 4, 6, 8], [10, 2, 0, 4, 8, 6], [10, 2, 0, 6, 4, 8], [10, 2, 0, 6, 8, 4], [10, 2, 0, 8, 4, 6], [10, 2, 0, 8, 6, 4], [10, 2, 4, 0, 6, 8], [10, 2, 4, 0, 8, 6], [10, 2, 4, 6, 0, 8], [10, 2, 4, 6, 8, 0], [10, 2, 4, 8, 0, 6], [10, 2, 4, 8, 6, 0], [10, 2, 6, 0, 4, 8], [10, 2, 6, 0, 8, 4], [10, 2, 6, 4, 0, 8], [10, 2, 6, 4, 8, 0], [10, 2, 6, 8, 0, 4], [10, 2, 6, 8, 4, 0], [10, 2, 8, 0, 4, 6], [10, 2, 8, 0, 6, 4], [10, 2, 8, 4, 0, 6], [10, 2, 8, 4, 6, 0], [10, 2, 8, 6, 0, 4], [10, 2, 8, 6, 4, 0], [10, 4, 0, 2, 6, 8], [10, 4, 0, 2, 8, 6], [10, 4, 0, 6, 2, 8], [10, 4, 0, 6, 8, 2], [10, 4, 0, 8, 2, 6], [10, 4, 0, 8, 6, 2], [10, 4, 2, 0, 6, 8], [10, 4, 2, 0, 8, 6], [10, 4, 2, 6, 0, 8], [10, 4, 2, 6, 8, 0], [10, 4, 2, 8, 0, 6], [10, 4, 2, 8, 6, 0], [10, 4, 6, 0, 2, 8], [10, 4, 6, 0, 8, 2], [10, 4, 6, 2, 0, 8], [10, 4, 6, 2, 8, 0], [10, 4, 6, 8, 0, 2], [10, 4, 6, 8, 2, 0], [10, 4, 8, 0, 2, 6], [10, 4, 8, 0, 6, 2], [10, 4, 8, 2, 0, 6], [10, 4, 8, 2, 6, 0], [10, 4, 8, 6, 0, 2], [10, 4, 8, 6, 2, 0], [10, 6, 0, 2, 4, 8], [10, 6, 0, 2, 8, 4], [10, 6, 0, 4, 2, 8], [10, 6, 0, 4, 8, 2], [10, 6, 0, 8, 2, 4], [10, 6, 0, 8, 4, 2], [10, 6, 2, 0, 4, 8], [10, 6, 2, 0, 8, 4], [10, 6, 2, 4, 0, 8], [10, 6, 2, 4, 8, 0], [10, 6, 2, 8, 0, 4], [10, 6, 2, 8, 4, 0], [10, 6, 4, 0, 2, 8], [10, 6, 4, 0, 8, 2], [10, 6, 4, 2, 0, 8], [10, 6, 4, 2, 8, 0], [10, 6, 4, 8, 0, 2], [10, 6, 4, 8, 2, 0], [10, 6, 8, 0, 2, 4], [10, 6, 8, 0, 4, 2], [10, 6, 8, 2, 0, 4], [10, 6, 8, 2, 4, 0], [10, 6, 8, 4, 0, 2], [10, 6, 8, 4, 2, 0], [10, 8, 0, 2, 4, 6], [10, 8, 0, 2, 6, 4], [10, 8, 0, 4, 2, 6], [10, 8, 0, 4, 6, 2], [10, 8, 0, 6, 2, 4], [10, 8, 0, 6, 4, 2], [10, 8, 2, 0, 4, 6], [10, 8, 2, 0, 6, 4], [10, 8, 2, 4, 0, 6], [10, 8, 2, 4, 6, 0], [10, 8, 2, 6, 0, 4], [10, 8, 2, 6, 4, 0], [10, 8, 4, 0, 2, 6], [10, 8, 4, 0, 6, 2], [10, 8, 4, 2, 0, 6], [10, 8, 4, 2, 6, 0], [10, 8, 4, 6, 0, 2], [10, 8, 4, 6, 2, 0], [10, 8, 6, 0, 2, 4], [10, 8, 6, 0, 4, 2], [10, 8, 6, 2, 0, 4], [10, 8, 6, 2, 4, 0], [10, 8, 6, 4, 0, 2], [10, 8, 6, 4, 2, 0]])\n assert answers_match(candidate(nums=[-5, -3, -1, 1, 3, 5]), [[-5, -3, -1, 1, 3, 5], [-5, -3, -1, 1, 5, 3], [-5, -3, -1, 3, 1, 5], [-5, -3, -1, 3, 5, 1], [-5, -3, -1, 5, 1, 3], [-5, -3, -1, 5, 3, 1], [-5, -3, 1, -1, 3, 5], [-5, -3, 1, -1, 5, 3], [-5, -3, 1, 3, -1, 5], [-5, -3, 1, 3, 5, -1], [-5, -3, 1, 5, -1, 3], [-5, -3, 1, 5, 3, -1], [-5, -3, 3, -1, 1, 5], [-5, -3, 3, -1, 5, 1], [-5, -3, 3, 1, -1, 5], [-5, -3, 3, 1, 5, -1], [-5, -3, 3, 5, -1, 1], [-5, -3, 3, 5, 1, -1], [-5, -3, 5, -1, 1, 3], [-5, -3, 5, -1, 3, 1], [-5, -3, 5, 1, -1, 3], [-5, -3, 5, 1, 3, -1], [-5, -3, 5, 3, -1, 1], [-5, -3, 5, 3, 1, -1], [-5, -1, -3, 1, 3, 5], [-5, -1, -3, 1, 5, 3], [-5, -1, -3, 3, 1, 5], [-5, -1, -3, 3, 5, 1], [-5, -1, -3, 5, 1, 3], [-5, -1, -3, 5, 3, 1], [-5, -1, 1, -3, 3, 5], [-5, -1, 1, -3, 5, 3], [-5, -1, 1, 3, -3, 5], [-5, -1, 1, 3, 5, -3], [-5, -1, 1, 5, -3, 3], [-5, -1, 1, 5, 3, -3], [-5, -1, 3, -3, 1, 5], [-5, -1, 3, -3, 5, 1], [-5, -1, 3, 1, -3, 5], [-5, -1, 3, 1, 5, -3], [-5, -1, 3, 5, -3, 1], [-5, -1, 3, 5, 1, -3], [-5, -1, 5, -3, 1, 3], [-5, -1, 5, -3, 3, 1], [-5, -1, 5, 1, -3, 3], [-5, -1, 5, 1, 3, -3], [-5, -1, 5, 3, -3, 1], [-5, -1, 5, 3, 1, -3], [-5, 1, -3, -1, 3, 5], [-5, 1, -3, -1, 5, 3], [-5, 1, -3, 3, -1, 5], [-5, 1, -3, 3, 5, -1], [-5, 1, -3, 5, -1, 3], [-5, 1, -3, 5, 3, -1], [-5, 1, -1, -3, 3, 5], [-5, 1, -1, -3, 5, 3], [-5, 1, -1, 3, -3, 5], [-5, 1, -1, 3, 5, -3], [-5, 1, -1, 5, -3, 3], [-5, 1, -1, 5, 3, -3], [-5, 1, 3, -3, -1, 5], [-5, 1, 3, -3, 5, -1], [-5, 1, 3, -1, -3, 5], [-5, 1, 3, -1, 5, -3], [-5, 1, 3, 5, -3, -1], [-5, 1, 3, 5, -1, -3], [-5, 1, 5, -3, -1, 3], [-5, 1, 5, -3, 3, -1], [-5, 1, 5, -1, -3, 3], [-5, 1, 5, -1, 3, -3], [-5, 1, 5, 3, -3, -1], [-5, 1, 5, 3, -1, -3], [-5, 3, -3, -1, 1, 5], [-5, 3, -3, -1, 5, 1], [-5, 3, -3, 1, -1, 5], [-5, 3, -3, 1, 5, -1], [-5, 3, -3, 5, -1, 1], [-5, 3, -3, 5, 1, -1], [-5, 3, -1, -3, 1, 5], [-5, 3, -1, -3, 5, 1], [-5, 3, -1, 1, -3, 5], [-5, 3, -1, 1, 5, -3], [-5, 3, -1, 5, -3, 1], [-5, 3, -1, 5, 1, -3], [-5, 3, 1, -3, -1, 5], [-5, 3, 1, -3, 5, -1], [-5, 3, 1, -1, -3, 5], [-5, 3, 1, -1, 5, -3], [-5, 3, 1, 5, -3, -1], [-5, 3, 1, 5, -1, -3], [-5, 3, 5, -3, -1, 1], [-5, 3, 5, -3, 1, -1], [-5, 3, 5, -1, -3, 1], [-5, 3, 5, -1, 1, -3], [-5, 3, 5, 1, -3, -1], [-5, 3, 5, 1, -1, -3], [-5, 5, -3, -1, 1, 3], [-5, 5, -3, -1, 3, 1], [-5, 5, -3, 1, -1, 3], [-5, 5, -3, 1, 3, -1], [-5, 5, -3, 3, -1, 1], [-5, 5, -3, 3, 1, -1], [-5, 5, -1, -3, 1, 3], [-5, 5, -1, -3, 3, 1], [-5, 5, -1, 1, -3, 3], [-5, 5, -1, 1, 3, -3], [-5, 5, -1, 3, -3, 1], [-5, 5, -1, 3, 1, -3], [-5, 5, 1, -3, -1, 3], [-5, 5, 1, -3, 3, -1], [-5, 5, 1, -1, -3, 3], [-5, 5, 1, -1, 3, -3], [-5, 5, 1, 3, -3, -1], [-5, 5, 1, 3, -1, -3], [-5, 5, 3, -3, -1, 1], [-5, 5, 3, -3, 1, -1], [-5, 5, 3, -1, -3, 1], [-5, 5, 3, -1, 1, -3], [-5, 5, 3, 1, -3, -1], [-5, 5, 3, 1, -1, -3], [-3, -5, -1, 1, 3, 5], [-3, -5, -1, 1, 5, 3], [-3, -5, -1, 3, 1, 5], [-3, -5, -1, 3, 5, 1], [-3, -5, -1, 5, 1, 3], [-3, -5, -1, 5, 3, 1], [-3, -5, 1, -1, 3, 5], [-3, -5, 1, -1, 5, 3], [-3, -5, 1, 3, -1, 5], [-3, -5, 1, 3, 5, -1], [-3, -5, 1, 5, -1, 3], [-3, -5, 1, 5, 3, -1], [-3, -5, 3, -1, 1, 5], [-3, -5, 3, -1, 5, 1], [-3, -5, 3, 1, -1, 5], [-3, -5, 3, 1, 5, -1], [-3, -5, 3, 5, -1, 1], [-3, -5, 3, 5, 1, -1], [-3, -5, 5, -1, 1, 3], [-3, -5, 5, -1, 3, 1], [-3, -5, 5, 1, -1, 3], [-3, -5, 5, 1, 3, -1], [-3, -5, 5, 3, -1, 1], [-3, -5, 5, 3, 1, -1], [-3, -1, -5, 1, 3, 5], [-3, -1, -5, 1, 5, 3], [-3, -1, -5, 3, 1, 5], [-3, -1, -5, 3, 5, 1], [-3, -1, -5, 5, 1, 3], [-3, -1, -5, 5, 3, 1], [-3, -1, 1, -5, 3, 5], [-3, -1, 1, -5, 5, 3], [-3, -1, 1, 3, -5, 5], [-3, -1, 1, 3, 5, -5], [-3, -1, 1, 5, -5, 3], [-3, -1, 1, 5, 3, -5], [-3, -1, 3, -5, 1, 5], [-3, -1, 3, -5, 5, 1], [-3, -1, 3, 1, -5, 5], [-3, -1, 3, 1, 5, -5], [-3, -1, 3, 5, -5, 1], [-3, -1, 3, 5, 1, -5], [-3, -1, 5, -5, 1, 3], [-3, -1, 5, -5, 3, 1], [-3, -1, 5, 1, -5, 3], [-3, -1, 5, 1, 3, -5], [-3, -1, 5, 3, -5, 1], [-3, -1, 5, 3, 1, -5], [-3, 1, -5, -1, 3, 5], [-3, 1, -5, -1, 5, 3], [-3, 1, -5, 3, -1, 5], [-3, 1, -5, 3, 5, -1], [-3, 1, -5, 5, -1, 3], [-3, 1, -5, 5, 3, -1], [-3, 1, -1, -5, 3, 5], [-3, 1, -1, -5, 5, 3], [-3, 1, -1, 3, -5, 5], [-3, 1, -1, 3, 5, -5], [-3, 1, -1, 5, -5, 3], [-3, 1, -1, 5, 3, -5], [-3, 1, 3, -5, -1, 5], [-3, 1, 3, -5, 5, -1], [-3, 1, 3, -1, -5, 5], [-3, 1, 3, -1, 5, -5], [-3, 1, 3, 5, -5, -1], [-3, 1, 3, 5, -1, -5], [-3, 1, 5, -5, -1, 3], [-3, 1, 5, -5, 3, -1], [-3, 1, 5, -1, -5, 3], [-3, 1, 5, -1, 3, -5], [-3, 1, 5, 3, -5, -1], [-3, 1, 5, 3, -1, -5], [-3, 3, -5, -1, 1, 5], [-3, 3, -5, -1, 5, 1], [-3, 3, -5, 1, -1, 5], [-3, 3, -5, 1, 5, -1], [-3, 3, -5, 5, -1, 1], [-3, 3, -5, 5, 1, -1], [-3, 3, -1, -5, 1, 5], [-3, 3, -1, -5, 5, 1], [-3, 3, -1, 1, -5, 5], [-3, 3, -1, 1, 5, -5], [-3, 3, -1, 5, -5, 1], [-3, 3, -1, 5, 1, -5], [-3, 3, 1, -5, -1, 5], [-3, 3, 1, -5, 5, -1], [-3, 3, 1, -1, -5, 5], [-3, 3, 1, -1, 5, -5], [-3, 3, 1, 5, -5, -1], [-3, 3, 1, 5, -1, -5], [-3, 3, 5, -5, -1, 1], [-3, 3, 5, -5, 1, -1], [-3, 3, 5, -1, -5, 1], [-3, 3, 5, -1, 1, -5], [-3, 3, 5, 1, -5, -1], [-3, 3, 5, 1, -1, -5], [-3, 5, -5, -1, 1, 3], [-3, 5, -5, -1, 3, 1], [-3, 5, -5, 1, -1, 3], [-3, 5, -5, 1, 3, -1], [-3, 5, -5, 3, -1, 1], [-3, 5, -5, 3, 1, -1], [-3, 5, -1, -5, 1, 3], [-3, 5, -1, -5, 3, 1], [-3, 5, -1, 1, -5, 3], [-3, 5, -1, 1, 3, -5], [-3, 5, -1, 3, -5, 1], [-3, 5, -1, 3, 1, -5], [-3, 5, 1, -5, -1, 3], [-3, 5, 1, -5, 3, -1], [-3, 5, 1, -1, -5, 3], [-3, 5, 1, -1, 3, -5], [-3, 5, 1, 3, -5, -1], [-3, 5, 1, 3, -1, -5], [-3, 5, 3, -5, -1, 1], [-3, 5, 3, -5, 1, -1], [-3, 5, 3, -1, -5, 1], [-3, 5, 3, -1, 1, -5], [-3, 5, 3, 1, -5, -1], [-3, 5, 3, 1, -1, -5], [-1, -5, -3, 1, 3, 5], [-1, -5, -3, 1, 5, 3], [-1, -5, -3, 3, 1, 5], [-1, -5, -3, 3, 5, 1], [-1, -5, -3, 5, 1, 3], [-1, -5, -3, 5, 3, 1], [-1, -5, 1, -3, 3, 5], [-1, -5, 1, -3, 5, 3], [-1, -5, 1, 3, -3, 5], [-1, -5, 1, 3, 5, -3], [-1, -5, 1, 5, -3, 3], [-1, -5, 1, 5, 3, -3], [-1, -5, 3, -3, 1, 5], [-1, -5, 3, -3, 5, 1], [-1, -5, 3, 1, -3, 5], [-1, -5, 3, 1, 5, -3], [-1, -5, 3, 5, -3, 1], [-1, -5, 3, 5, 1, -3], [-1, -5, 5, -3, 1, 3], [-1, -5, 5, -3, 3, 1], [-1, -5, 5, 1, -3, 3], [-1, -5, 5, 1, 3, -3], [-1, -5, 5, 3, -3, 1], [-1, -5, 5, 3, 1, -3], [-1, -3, -5, 1, 3, 5], [-1, -3, -5, 1, 5, 3], [-1, -3, -5, 3, 1, 5], [-1, -3, -5, 3, 5, 1], [-1, -3, -5, 5, 1, 3], [-1, -3, -5, 5, 3, 1], [-1, -3, 1, -5, 3, 5], [-1, -3, 1, -5, 5, 3], [-1, -3, 1, 3, -5, 5], [-1, -3, 1, 3, 5, -5], [-1, -3, 1, 5, -5, 3], [-1, -3, 1, 5, 3, -5], [-1, -3, 3, -5, 1, 5], [-1, -3, 3, -5, 5, 1], [-1, -3, 3, 1, -5, 5], [-1, -3, 3, 1, 5, -5], [-1, -3, 3, 5, -5, 1], [-1, -3, 3, 5, 1, -5], [-1, -3, 5, -5, 1, 3], [-1, -3, 5, -5, 3, 1], [-1, -3, 5, 1, -5, 3], [-1, -3, 5, 1, 3, -5], [-1, -3, 5, 3, -5, 1], [-1, -3, 5, 3, 1, -5], [-1, 1, -5, -3, 3, 5], [-1, 1, -5, -3, 5, 3], [-1, 1, -5, 3, -3, 5], [-1, 1, -5, 3, 5, -3], [-1, 1, -5, 5, -3, 3], [-1, 1, -5, 5, 3, -3], [-1, 1, -3, -5, 3, 5], [-1, 1, -3, -5, 5, 3], [-1, 1, -3, 3, -5, 5], [-1, 1, -3, 3, 5, -5], [-1, 1, -3, 5, -5, 3], [-1, 1, -3, 5, 3, -5], [-1, 1, 3, -5, -3, 5], [-1, 1, 3, -5, 5, -3], [-1, 1, 3, -3, -5, 5], [-1, 1, 3, -3, 5, -5], [-1, 1, 3, 5, -5, -3], [-1, 1, 3, 5, -3, -5], [-1, 1, 5, -5, -3, 3], [-1, 1, 5, -5, 3, -3], [-1, 1, 5, -3, -5, 3], [-1, 1, 5, -3, 3, -5], [-1, 1, 5, 3, -5, -3], [-1, 1, 5, 3, -3, -5], [-1, 3, -5, -3, 1, 5], [-1, 3, -5, -3, 5, 1], [-1, 3, -5, 1, -3, 5], [-1, 3, -5, 1, 5, -3], [-1, 3, -5, 5, -3, 1], [-1, 3, -5, 5, 1, -3], [-1, 3, -3, -5, 1, 5], [-1, 3, -3, -5, 5, 1], [-1, 3, -3, 1, -5, 5], [-1, 3, -3, 1, 5, -5], [-1, 3, -3, 5, -5, 1], [-1, 3, -3, 5, 1, -5], [-1, 3, 1, -5, -3, 5], [-1, 3, 1, -5, 5, -3], [-1, 3, 1, -3, -5, 5], [-1, 3, 1, -3, 5, -5], [-1, 3, 1, 5, -5, -3], [-1, 3, 1, 5, -3, -5], [-1, 3, 5, -5, -3, 1], [-1, 3, 5, -5, 1, -3], [-1, 3, 5, -3, -5, 1], [-1, 3, 5, -3, 1, -5], [-1, 3, 5, 1, -5, -3], [-1, 3, 5, 1, -3, -5], [-1, 5, -5, -3, 1, 3], [-1, 5, -5, -3, 3, 1], [-1, 5, -5, 1, -3, 3], [-1, 5, -5, 1, 3, -3], [-1, 5, -5, 3, -3, 1], [-1, 5, -5, 3, 1, -3], [-1, 5, -3, -5, 1, 3], [-1, 5, -3, -5, 3, 1], [-1, 5, -3, 1, -5, 3], [-1, 5, -3, 1, 3, -5], [-1, 5, -3, 3, -5, 1], [-1, 5, -3, 3, 1, -5], [-1, 5, 1, -5, -3, 3], [-1, 5, 1, -5, 3, -3], [-1, 5, 1, -3, -5, 3], [-1, 5, 1, -3, 3, -5], [-1, 5, 1, 3, -5, -3], [-1, 5, 1, 3, -3, -5], [-1, 5, 3, -5, -3, 1], [-1, 5, 3, -5, 1, -3], [-1, 5, 3, -3, -5, 1], [-1, 5, 3, -3, 1, -5], [-1, 5, 3, 1, -5, -3], [-1, 5, 3, 1, -3, -5], [1, -5, -3, -1, 3, 5], [1, -5, -3, -1, 5, 3], [1, -5, -3, 3, -1, 5], [1, -5, -3, 3, 5, -1], [1, -5, -3, 5, -1, 3], [1, -5, -3, 5, 3, -1], [1, -5, -1, -3, 3, 5], [1, -5, -1, -3, 5, 3], [1, -5, -1, 3, -3, 5], [1, -5, -1, 3, 5, -3], [1, -5, -1, 5, -3, 3], [1, -5, -1, 5, 3, -3], [1, -5, 3, -3, -1, 5], [1, -5, 3, -3, 5, -1], [1, -5, 3, -1, -3, 5], [1, -5, 3, -1, 5, -3], [1, -5, 3, 5, -3, -1], [1, -5, 3, 5, -1, -3], [1, -5, 5, -3, -1, 3], [1, -5, 5, -3, 3, -1], [1, -5, 5, -1, -3, 3], [1, -5, 5, -1, 3, -3], [1, -5, 5, 3, -3, -1], [1, -5, 5, 3, -1, -3], [1, -3, -5, -1, 3, 5], [1, -3, -5, -1, 5, 3], [1, -3, -5, 3, -1, 5], [1, -3, -5, 3, 5, -1], [1, -3, -5, 5, -1, 3], [1, -3, -5, 5, 3, -1], [1, -3, -1, -5, 3, 5], [1, -3, -1, -5, 5, 3], [1, -3, -1, 3, -5, 5], [1, -3, -1, 3, 5, -5], [1, -3, -1, 5, -5, 3], [1, -3, -1, 5, 3, -5], [1, -3, 3, -5, -1, 5], [1, -3, 3, -5, 5, -1], [1, -3, 3, -1, -5, 5], [1, -3, 3, -1, 5, -5], [1, -3, 3, 5, -5, -1], [1, -3, 3, 5, -1, -5], [1, -3, 5, -5, -1, 3], [1, -3, 5, -5, 3, -1], [1, -3, 5, -1, -5, 3], [1, -3, 5, -1, 3, -5], [1, -3, 5, 3, -5, -1], [1, -3, 5, 3, -1, -5], [1, -1, -5, -3, 3, 5], [1, -1, -5, -3, 5, 3], [1, -1, -5, 3, -3, 5], [1, -1, -5, 3, 5, -3], [1, -1, -5, 5, -3, 3], [1, -1, -5, 5, 3, -3], [1, -1, -3, -5, 3, 5], [1, -1, -3, -5, 5, 3], [1, -1, -3, 3, -5, 5], [1, -1, -3, 3, 5, -5], [1, -1, -3, 5, -5, 3], [1, -1, -3, 5, 3, -5], [1, -1, 3, -5, -3, 5], [1, -1, 3, -5, 5, -3], [1, -1, 3, -3, -5, 5], [1, -1, 3, -3, 5, -5], [1, -1, 3, 5, -5, -3], [1, -1, 3, 5, -3, -5], [1, -1, 5, -5, -3, 3], [1, -1, 5, -5, 3, -3], [1, -1, 5, -3, -5, 3], [1, -1, 5, -3, 3, -5], [1, -1, 5, 3, -5, -3], [1, -1, 5, 3, -3, -5], [1, 3, -5, -3, -1, 5], [1, 3, -5, -3, 5, -1], [1, 3, -5, -1, -3, 5], [1, 3, -5, -1, 5, -3], [1, 3, -5, 5, -3, -1], [1, 3, -5, 5, -1, -3], [1, 3, -3, -5, -1, 5], [1, 3, -3, -5, 5, -1], [1, 3, -3, -1, -5, 5], [1, 3, -3, -1, 5, -5], [1, 3, -3, 5, -5, -1], [1, 3, -3, 5, -1, -5], [1, 3, -1, -5, -3, 5], [1, 3, -1, -5, 5, -3], [1, 3, -1, -3, -5, 5], [1, 3, -1, -3, 5, -5], [1, 3, -1, 5, -5, -3], [1, 3, -1, 5, -3, -5], [1, 3, 5, -5, -3, -1], [1, 3, 5, -5, -1, -3], [1, 3, 5, -3, -5, -1], [1, 3, 5, -3, -1, -5], [1, 3, 5, -1, -5, -3], [1, 3, 5, -1, -3, -5], [1, 5, -5, -3, -1, 3], [1, 5, -5, -3, 3, -1], [1, 5, -5, -1, -3, 3], [1, 5, -5, -1, 3, -3], [1, 5, -5, 3, -3, -1], [1, 5, -5, 3, -1, -3], [1, 5, -3, -5, -1, 3], [1, 5, -3, -5, 3, -1], [1, 5, -3, -1, -5, 3], [1, 5, -3, -1, 3, -5], [1, 5, -3, 3, -5, -1], [1, 5, -3, 3, -1, -5], [1, 5, -1, -5, -3, 3], [1, 5, -1, -5, 3, -3], [1, 5, -1, -3, -5, 3], [1, 5, -1, -3, 3, -5], [1, 5, -1, 3, -5, -3], [1, 5, -1, 3, -3, -5], [1, 5, 3, -5, -3, -1], [1, 5, 3, -5, -1, -3], [1, 5, 3, -3, -5, -1], [1, 5, 3, -3, -1, -5], [1, 5, 3, -1, -5, -3], [1, 5, 3, -1, -3, -5], [3, -5, -3, -1, 1, 5], [3, -5, -3, -1, 5, 1], [3, -5, -3, 1, -1, 5], [3, -5, -3, 1, 5, -1], [3, -5, -3, 5, -1, 1], [3, -5, -3, 5, 1, -1], [3, -5, -1, -3, 1, 5], [3, -5, -1, -3, 5, 1], [3, -5, -1, 1, -3, 5], [3, -5, -1, 1, 5, -3], [3, -5, -1, 5, -3, 1], [3, -5, -1, 5, 1, -3], [3, -5, 1, -3, -1, 5], [3, -5, 1, -3, 5, -1], [3, -5, 1, -1, -3, 5], [3, -5, 1, -1, 5, -3], [3, -5, 1, 5, -3, -1], [3, -5, 1, 5, -1, -3], [3, -5, 5, -3, -1, 1], [3, -5, 5, -3, 1, -1], [3, -5, 5, -1, -3, 1], [3, -5, 5, -1, 1, -3], [3, -5, 5, 1, -3, -1], [3, -5, 5, 1, -1, -3], [3, -3, -5, -1, 1, 5], [3, -3, -5, -1, 5, 1], [3, -3, -5, 1, -1, 5], [3, -3, -5, 1, 5, -1], [3, -3, -5, 5, -1, 1], [3, -3, -5, 5, 1, -1], [3, -3, -1, -5, 1, 5], [3, -3, -1, -5, 5, 1], [3, -3, -1, 1, -5, 5], [3, -3, -1, 1, 5, -5], [3, -3, -1, 5, -5, 1], [3, -3, -1, 5, 1, -5], [3, -3, 1, -5, -1, 5], [3, -3, 1, -5, 5, -1], [3, -3, 1, -1, -5, 5], [3, -3, 1, -1, 5, -5], [3, -3, 1, 5, -5, -1], [3, -3, 1, 5, -1, -5], [3, -3, 5, -5, -1, 1], [3, -3, 5, -5, 1, -1], [3, -3, 5, -1, -5, 1], [3, -3, 5, -1, 1, -5], [3, -3, 5, 1, -5, -1], [3, -3, 5, 1, -1, -5], [3, -1, -5, -3, 1, 5], [3, -1, -5, -3, 5, 1], [3, -1, -5, 1, -3, 5], [3, -1, -5, 1, 5, -3], [3, -1, -5, 5, -3, 1], [3, -1, -5, 5, 1, -3], [3, -1, -3, -5, 1, 5], [3, -1, -3, -5, 5, 1], [3, -1, -3, 1, -5, 5], [3, -1, -3, 1, 5, -5], [3, -1, -3, 5, -5, 1], [3, -1, -3, 5, 1, -5], [3, -1, 1, -5, -3, 5], [3, -1, 1, -5, 5, -3], [3, -1, 1, -3, -5, 5], [3, -1, 1, -3, 5, -5], [3, -1, 1, 5, -5, -3], [3, -1, 1, 5, -3, -5], [3, -1, 5, -5, -3, 1], [3, -1, 5, -5, 1, -3], [3, -1, 5, -3, -5, 1], [3, -1, 5, -3, 1, -5], [3, -1, 5, 1, -5, -3], [3, -1, 5, 1, -3, -5], [3, 1, -5, -3, -1, 5], [3, 1, -5, -3, 5, -1], [3, 1, -5, -1, -3, 5], [3, 1, -5, -1, 5, -3], [3, 1, -5, 5, -3, -1], [3, 1, -5, 5, -1, -3], [3, 1, -3, -5, -1, 5], [3, 1, -3, -5, 5, -1], [3, 1, -3, -1, -5, 5], [3, 1, -3, -1, 5, -5], [3, 1, -3, 5, -5, -1], [3, 1, -3, 5, -1, -5], [3, 1, -1, -5, -3, 5], [3, 1, -1, -5, 5, -3], [3, 1, -1, -3, -5, 5], [3, 1, -1, -3, 5, -5], [3, 1, -1, 5, -5, -3], [3, 1, -1, 5, -3, -5], [3, 1, 5, -5, -3, -1], [3, 1, 5, -5, -1, -3], [3, 1, 5, -3, -5, -1], [3, 1, 5, -3, -1, -5], [3, 1, 5, -1, -5, -3], [3, 1, 5, -1, -3, -5], [3, 5, -5, -3, -1, 1], [3, 5, -5, -3, 1, -1], [3, 5, -5, -1, -3, 1], [3, 5, -5, -1, 1, -3], [3, 5, -5, 1, -3, -1], [3, 5, -5, 1, -1, -3], [3, 5, -3, -5, -1, 1], [3, 5, -3, -5, 1, -1], [3, 5, -3, -1, -5, 1], [3, 5, -3, -1, 1, -5], [3, 5, -3, 1, -5, -1], [3, 5, -3, 1, -1, -5], [3, 5, -1, -5, -3, 1], [3, 5, -1, -5, 1, -3], [3, 5, -1, -3, -5, 1], [3, 5, -1, -3, 1, -5], [3, 5, -1, 1, -5, -3], [3, 5, -1, 1, -3, -5], [3, 5, 1, -5, -3, -1], [3, 5, 1, -5, -1, -3], [3, 5, 1, -3, -5, -1], [3, 5, 1, -3, -1, -5], [3, 5, 1, -1, -5, -3], [3, 5, 1, -1, -3, -5], [5, -5, -3, -1, 1, 3], [5, -5, -3, -1, 3, 1], [5, -5, -3, 1, -1, 3], [5, -5, -3, 1, 3, -1], [5, -5, -3, 3, -1, 1], [5, -5, -3, 3, 1, -1], [5, -5, -1, -3, 1, 3], [5, -5, -1, -3, 3, 1], [5, -5, -1, 1, -3, 3], [5, -5, -1, 1, 3, -3], [5, -5, -1, 3, -3, 1], [5, -5, -1, 3, 1, -3], [5, -5, 1, -3, -1, 3], [5, -5, 1, -3, 3, -1], [5, -5, 1, -1, -3, 3], [5, -5, 1, -1, 3, -3], [5, -5, 1, 3, -3, -1], [5, -5, 1, 3, -1, -3], [5, -5, 3, -3, -1, 1], [5, -5, 3, -3, 1, -1], [5, -5, 3, -1, -3, 1], [5, -5, 3, -1, 1, -3], [5, -5, 3, 1, -3, -1], [5, -5, 3, 1, -1, -3], [5, -3, -5, -1, 1, 3], [5, -3, -5, -1, 3, 1], [5, -3, -5, 1, -1, 3], [5, -3, -5, 1, 3, -1], [5, -3, -5, 3, -1, 1], [5, -3, -5, 3, 1, -1], [5, -3, -1, -5, 1, 3], [5, -3, -1, -5, 3, 1], [5, -3, -1, 1, -5, 3], [5, -3, -1, 1, 3, -5], [5, -3, -1, 3, -5, 1], [5, -3, -1, 3, 1, -5], [5, -3, 1, -5, -1, 3], [5, -3, 1, -5, 3, -1], [5, -3, 1, -1, -5, 3], [5, -3, 1, -1, 3, -5], [5, -3, 1, 3, -5, -1], [5, -3, 1, 3, -1, -5], [5, -3, 3, -5, -1, 1], [5, -3, 3, -5, 1, -1], [5, -3, 3, -1, -5, 1], [5, -3, 3, -1, 1, -5], [5, -3, 3, 1, -5, -1], [5, -3, 3, 1, -1, -5], [5, -1, -5, -3, 1, 3], [5, -1, -5, -3, 3, 1], [5, -1, -5, 1, -3, 3], [5, -1, -5, 1, 3, -3], [5, -1, -5, 3, -3, 1], [5, -1, -5, 3, 1, -3], [5, -1, -3, -5, 1, 3], [5, -1, -3, -5, 3, 1], [5, -1, -3, 1, -5, 3], [5, -1, -3, 1, 3, -5], [5, -1, -3, 3, -5, 1], [5, -1, -3, 3, 1, -5], [5, -1, 1, -5, -3, 3], [5, -1, 1, -5, 3, -3], [5, -1, 1, -3, -5, 3], [5, -1, 1, -3, 3, -5], [5, -1, 1, 3, -5, -3], [5, -1, 1, 3, -3, -5], [5, -1, 3, -5, -3, 1], [5, -1, 3, -5, 1, -3], [5, -1, 3, -3, -5, 1], [5, -1, 3, -3, 1, -5], [5, -1, 3, 1, -5, -3], [5, -1, 3, 1, -3, -5], [5, 1, -5, -3, -1, 3], [5, 1, -5, -3, 3, -1], [5, 1, -5, -1, -3, 3], [5, 1, -5, -1, 3, -3], [5, 1, -5, 3, -3, -1], [5, 1, -5, 3, -1, -3], [5, 1, -3, -5, -1, 3], [5, 1, -3, -5, 3, -1], [5, 1, -3, -1, -5, 3], [5, 1, -3, -1, 3, -5], [5, 1, -3, 3, -5, -1], [5, 1, -3, 3, -1, -5], [5, 1, -1, -5, -3, 3], [5, 1, -1, -5, 3, -3], [5, 1, -1, -3, -5, 3], [5, 1, -1, -3, 3, -5], [5, 1, -1, 3, -5, -3], [5, 1, -1, 3, -3, -5], [5, 1, 3, -5, -3, -1], [5, 1, 3, -5, -1, -3], [5, 1, 3, -3, -5, -1], [5, 1, 3, -3, -1, -5], [5, 1, 3, -1, -5, -3], [5, 1, 3, -1, -3, -5], [5, 3, -5, -3, -1, 1], [5, 3, -5, -3, 1, -1], [5, 3, -5, -1, -3, 1], [5, 3, -5, -1, 1, -3], [5, 3, -5, 1, -3, -1], [5, 3, -5, 1, -1, -3], [5, 3, -3, -5, -1, 1], [5, 3, -3, -5, 1, -1], [5, 3, -3, -1, -5, 1], [5, 3, -3, -1, 1, -5], [5, 3, -3, 1, -5, -1], [5, 3, -3, 1, -1, -5], [5, 3, -1, -5, -3, 1], [5, 3, -1, -5, 1, -3], [5, 3, -1, -3, -5, 1], [5, 3, -1, -3, 1, -5], [5, 3, -1, 1, -5, -3], [5, 3, -1, 1, -3, -5], [5, 3, 1, -5, -3, -1], [5, 3, 1, -5, -1, -3], [5, 3, 1, -3, -5, -1], [5, 3, 1, -3, -1, -5], [5, 3, 1, -1, -5, -3], [5, 3, 1, -1, -3, -5]])\n assert answers_match(candidate(nums=[-5, 0, 5, 10, -10, 2]), [[-5, 0, 5, 10, -10, 2], [-5, 0, 5, 10, 2, -10], [-5, 0, 5, -10, 10, 2], [-5, 0, 5, -10, 2, 10], [-5, 0, 5, 2, 10, -10], [-5, 0, 5, 2, -10, 10], [-5, 0, 10, 5, -10, 2], [-5, 0, 10, 5, 2, -10], [-5, 0, 10, -10, 5, 2], [-5, 0, 10, -10, 2, 5], [-5, 0, 10, 2, 5, -10], [-5, 0, 10, 2, -10, 5], [-5, 0, -10, 5, 10, 2], [-5, 0, -10, 5, 2, 10], [-5, 0, -10, 10, 5, 2], [-5, 0, -10, 10, 2, 5], [-5, 0, -10, 2, 5, 10], [-5, 0, -10, 2, 10, 5], [-5, 0, 2, 5, 10, -10], [-5, 0, 2, 5, -10, 10], [-5, 0, 2, 10, 5, -10], [-5, 0, 2, 10, -10, 5], [-5, 0, 2, -10, 5, 10], [-5, 0, 2, -10, 10, 5], [-5, 5, 0, 10, -10, 2], [-5, 5, 0, 10, 2, -10], [-5, 5, 0, -10, 10, 2], [-5, 5, 0, -10, 2, 10], [-5, 5, 0, 2, 10, -10], [-5, 5, 0, 2, -10, 10], [-5, 5, 10, 0, -10, 2], [-5, 5, 10, 0, 2, -10], [-5, 5, 10, -10, 0, 2], [-5, 5, 10, -10, 2, 0], [-5, 5, 10, 2, 0, -10], [-5, 5, 10, 2, -10, 0], [-5, 5, -10, 0, 10, 2], [-5, 5, -10, 0, 2, 10], [-5, 5, -10, 10, 0, 2], [-5, 5, -10, 10, 2, 0], [-5, 5, -10, 2, 0, 10], [-5, 5, -10, 2, 10, 0], [-5, 5, 2, 0, 10, -10], [-5, 5, 2, 0, -10, 10], [-5, 5, 2, 10, 0, -10], [-5, 5, 2, 10, -10, 0], [-5, 5, 2, -10, 0, 10], [-5, 5, 2, -10, 10, 0], [-5, 10, 0, 5, -10, 2], [-5, 10, 0, 5, 2, -10], [-5, 10, 0, -10, 5, 2], [-5, 10, 0, -10, 2, 5], [-5, 10, 0, 2, 5, -10], [-5, 10, 0, 2, -10, 5], [-5, 10, 5, 0, -10, 2], [-5, 10, 5, 0, 2, -10], [-5, 10, 5, -10, 0, 2], [-5, 10, 5, -10, 2, 0], [-5, 10, 5, 2, 0, -10], [-5, 10, 5, 2, -10, 0], [-5, 10, -10, 0, 5, 2], [-5, 10, -10, 0, 2, 5], [-5, 10, -10, 5, 0, 2], [-5, 10, -10, 5, 2, 0], [-5, 10, -10, 2, 0, 5], [-5, 10, -10, 2, 5, 0], [-5, 10, 2, 0, 5, -10], [-5, 10, 2, 0, -10, 5], [-5, 10, 2, 5, 0, -10], [-5, 10, 2, 5, -10, 0], [-5, 10, 2, -10, 0, 5], [-5, 10, 2, -10, 5, 0], [-5, -10, 0, 5, 10, 2], [-5, -10, 0, 5, 2, 10], [-5, -10, 0, 10, 5, 2], [-5, -10, 0, 10, 2, 5], [-5, -10, 0, 2, 5, 10], [-5, -10, 0, 2, 10, 5], [-5, -10, 5, 0, 10, 2], [-5, -10, 5, 0, 2, 10], [-5, -10, 5, 10, 0, 2], [-5, -10, 5, 10, 2, 0], [-5, -10, 5, 2, 0, 10], [-5, -10, 5, 2, 10, 0], [-5, -10, 10, 0, 5, 2], [-5, -10, 10, 0, 2, 5], [-5, -10, 10, 5, 0, 2], [-5, -10, 10, 5, 2, 0], [-5, -10, 10, 2, 0, 5], [-5, -10, 10, 2, 5, 0], [-5, -10, 2, 0, 5, 10], [-5, -10, 2, 0, 10, 5], [-5, -10, 2, 5, 0, 10], [-5, -10, 2, 5, 10, 0], [-5, -10, 2, 10, 0, 5], [-5, -10, 2, 10, 5, 0], [-5, 2, 0, 5, 10, -10], [-5, 2, 0, 5, -10, 10], [-5, 2, 0, 10, 5, -10], [-5, 2, 0, 10, -10, 5], [-5, 2, 0, -10, 5, 10], [-5, 2, 0, -10, 10, 5], [-5, 2, 5, 0, 10, -10], [-5, 2, 5, 0, -10, 10], [-5, 2, 5, 10, 0, -10], [-5, 2, 5, 10, -10, 0], [-5, 2, 5, -10, 0, 10], [-5, 2, 5, -10, 10, 0], [-5, 2, 10, 0, 5, -10], [-5, 2, 10, 0, -10, 5], [-5, 2, 10, 5, 0, -10], [-5, 2, 10, 5, -10, 0], [-5, 2, 10, -10, 0, 5], [-5, 2, 10, -10, 5, 0], [-5, 2, -10, 0, 5, 10], [-5, 2, -10, 0, 10, 5], [-5, 2, -10, 5, 0, 10], [-5, 2, -10, 5, 10, 0], [-5, 2, -10, 10, 0, 5], [-5, 2, -10, 10, 5, 0], [0, -5, 5, 10, -10, 2], [0, -5, 5, 10, 2, -10], [0, -5, 5, -10, 10, 2], [0, -5, 5, -10, 2, 10], [0, -5, 5, 2, 10, -10], [0, -5, 5, 2, -10, 10], [0, -5, 10, 5, -10, 2], [0, -5, 10, 5, 2, -10], [0, -5, 10, -10, 5, 2], [0, -5, 10, -10, 2, 5], [0, -5, 10, 2, 5, -10], [0, -5, 10, 2, -10, 5], [0, -5, -10, 5, 10, 2], [0, -5, -10, 5, 2, 10], [0, -5, -10, 10, 5, 2], [0, -5, -10, 10, 2, 5], [0, -5, -10, 2, 5, 10], [0, -5, -10, 2, 10, 5], [0, -5, 2, 5, 10, -10], [0, -5, 2, 5, -10, 10], [0, -5, 2, 10, 5, -10], [0, -5, 2, 10, -10, 5], [0, -5, 2, -10, 5, 10], [0, -5, 2, -10, 10, 5], [0, 5, -5, 10, -10, 2], [0, 5, -5, 10, 2, -10], [0, 5, -5, -10, 10, 2], [0, 5, -5, -10, 2, 10], [0, 5, -5, 2, 10, -10], [0, 5, -5, 2, -10, 10], [0, 5, 10, -5, -10, 2], [0, 5, 10, -5, 2, -10], [0, 5, 10, -10, -5, 2], [0, 5, 10, -10, 2, -5], [0, 5, 10, 2, -5, -10], [0, 5, 10, 2, -10, -5], [0, 5, -10, -5, 10, 2], [0, 5, -10, -5, 2, 10], [0, 5, -10, 10, -5, 2], [0, 5, -10, 10, 2, -5], [0, 5, -10, 2, -5, 10], [0, 5, -10, 2, 10, -5], [0, 5, 2, -5, 10, -10], [0, 5, 2, -5, -10, 10], [0, 5, 2, 10, -5, -10], [0, 5, 2, 10, -10, -5], [0, 5, 2, -10, -5, 10], [0, 5, 2, -10, 10, -5], [0, 10, -5, 5, -10, 2], [0, 10, -5, 5, 2, -10], [0, 10, -5, -10, 5, 2], [0, 10, -5, -10, 2, 5], [0, 10, -5, 2, 5, -10], [0, 10, -5, 2, -10, 5], [0, 10, 5, -5, -10, 2], [0, 10, 5, -5, 2, -10], [0, 10, 5, -10, -5, 2], [0, 10, 5, -10, 2, -5], [0, 10, 5, 2, -5, -10], [0, 10, 5, 2, -10, -5], [0, 10, -10, -5, 5, 2], [0, 10, -10, -5, 2, 5], [0, 10, -10, 5, -5, 2], [0, 10, -10, 5, 2, -5], [0, 10, -10, 2, -5, 5], [0, 10, -10, 2, 5, -5], [0, 10, 2, -5, 5, -10], [0, 10, 2, -5, -10, 5], [0, 10, 2, 5, -5, -10], [0, 10, 2, 5, -10, -5], [0, 10, 2, -10, -5, 5], [0, 10, 2, -10, 5, -5], [0, -10, -5, 5, 10, 2], [0, -10, -5, 5, 2, 10], [0, -10, -5, 10, 5, 2], [0, -10, -5, 10, 2, 5], [0, -10, -5, 2, 5, 10], [0, -10, -5, 2, 10, 5], [0, -10, 5, -5, 10, 2], [0, -10, 5, -5, 2, 10], [0, -10, 5, 10, -5, 2], [0, -10, 5, 10, 2, -5], [0, -10, 5, 2, -5, 10], [0, -10, 5, 2, 10, -5], [0, -10, 10, -5, 5, 2], [0, -10, 10, -5, 2, 5], [0, -10, 10, 5, -5, 2], [0, -10, 10, 5, 2, -5], [0, -10, 10, 2, -5, 5], [0, -10, 10, 2, 5, -5], [0, -10, 2, -5, 5, 10], [0, -10, 2, -5, 10, 5], [0, -10, 2, 5, -5, 10], [0, -10, 2, 5, 10, -5], [0, -10, 2, 10, -5, 5], [0, -10, 2, 10, 5, -5], [0, 2, -5, 5, 10, -10], [0, 2, -5, 5, -10, 10], [0, 2, -5, 10, 5, -10], [0, 2, -5, 10, -10, 5], [0, 2, -5, -10, 5, 10], [0, 2, -5, -10, 10, 5], [0, 2, 5, -5, 10, -10], [0, 2, 5, -5, -10, 10], [0, 2, 5, 10, -5, -10], [0, 2, 5, 10, -10, -5], [0, 2, 5, -10, -5, 10], [0, 2, 5, -10, 10, -5], [0, 2, 10, -5, 5, -10], [0, 2, 10, -5, -10, 5], [0, 2, 10, 5, -5, -10], [0, 2, 10, 5, -10, -5], [0, 2, 10, -10, -5, 5], [0, 2, 10, -10, 5, -5], [0, 2, -10, -5, 5, 10], [0, 2, -10, -5, 10, 5], [0, 2, -10, 5, -5, 10], [0, 2, -10, 5, 10, -5], [0, 2, -10, 10, -5, 5], [0, 2, -10, 10, 5, -5], [5, -5, 0, 10, -10, 2], [5, -5, 0, 10, 2, -10], [5, -5, 0, -10, 10, 2], [5, -5, 0, -10, 2, 10], [5, -5, 0, 2, 10, -10], [5, -5, 0, 2, -10, 10], [5, -5, 10, 0, -10, 2], [5, -5, 10, 0, 2, -10], [5, -5, 10, -10, 0, 2], [5, -5, 10, -10, 2, 0], [5, -5, 10, 2, 0, -10], [5, -5, 10, 2, -10, 0], [5, -5, -10, 0, 10, 2], [5, -5, -10, 0, 2, 10], [5, -5, -10, 10, 0, 2], [5, -5, -10, 10, 2, 0], [5, -5, -10, 2, 0, 10], [5, -5, -10, 2, 10, 0], [5, -5, 2, 0, 10, -10], [5, -5, 2, 0, -10, 10], [5, -5, 2, 10, 0, -10], [5, -5, 2, 10, -10, 0], [5, -5, 2, -10, 0, 10], [5, -5, 2, -10, 10, 0], [5, 0, -5, 10, -10, 2], [5, 0, -5, 10, 2, -10], [5, 0, -5, -10, 10, 2], [5, 0, -5, -10, 2, 10], [5, 0, -5, 2, 10, -10], [5, 0, -5, 2, -10, 10], [5, 0, 10, -5, -10, 2], [5, 0, 10, -5, 2, -10], [5, 0, 10, -10, -5, 2], [5, 0, 10, -10, 2, -5], [5, 0, 10, 2, -5, -10], [5, 0, 10, 2, -10, -5], [5, 0, -10, -5, 10, 2], [5, 0, -10, -5, 2, 10], [5, 0, -10, 10, -5, 2], [5, 0, -10, 10, 2, -5], [5, 0, -10, 2, -5, 10], [5, 0, -10, 2, 10, -5], [5, 0, 2, -5, 10, -10], [5, 0, 2, -5, -10, 10], [5, 0, 2, 10, -5, -10], [5, 0, 2, 10, -10, -5], [5, 0, 2, -10, -5, 10], [5, 0, 2, -10, 10, -5], [5, 10, -5, 0, -10, 2], [5, 10, -5, 0, 2, -10], [5, 10, -5, -10, 0, 2], [5, 10, -5, -10, 2, 0], [5, 10, -5, 2, 0, -10], [5, 10, -5, 2, -10, 0], [5, 10, 0, -5, -10, 2], [5, 10, 0, -5, 2, -10], [5, 10, 0, -10, -5, 2], [5, 10, 0, -10, 2, -5], [5, 10, 0, 2, -5, -10], [5, 10, 0, 2, -10, -5], [5, 10, -10, -5, 0, 2], [5, 10, -10, -5, 2, 0], [5, 10, -10, 0, -5, 2], [5, 10, -10, 0, 2, -5], [5, 10, -10, 2, -5, 0], [5, 10, -10, 2, 0, -5], [5, 10, 2, -5, 0, -10], [5, 10, 2, -5, -10, 0], [5, 10, 2, 0, -5, -10], [5, 10, 2, 0, -10, -5], [5, 10, 2, -10, -5, 0], [5, 10, 2, -10, 0, -5], [5, -10, -5, 0, 10, 2], [5, -10, -5, 0, 2, 10], [5, -10, -5, 10, 0, 2], [5, -10, -5, 10, 2, 0], [5, -10, -5, 2, 0, 10], [5, -10, -5, 2, 10, 0], [5, -10, 0, -5, 10, 2], [5, -10, 0, -5, 2, 10], [5, -10, 0, 10, -5, 2], [5, -10, 0, 10, 2, -5], [5, -10, 0, 2, -5, 10], [5, -10, 0, 2, 10, -5], [5, -10, 10, -5, 0, 2], [5, -10, 10, -5, 2, 0], [5, -10, 10, 0, -5, 2], [5, -10, 10, 0, 2, -5], [5, -10, 10, 2, -5, 0], [5, -10, 10, 2, 0, -5], [5, -10, 2, -5, 0, 10], [5, -10, 2, -5, 10, 0], [5, -10, 2, 0, -5, 10], [5, -10, 2, 0, 10, -5], [5, -10, 2, 10, -5, 0], [5, -10, 2, 10, 0, -5], [5, 2, -5, 0, 10, -10], [5, 2, -5, 0, -10, 10], [5, 2, -5, 10, 0, -10], [5, 2, -5, 10, -10, 0], [5, 2, -5, -10, 0, 10], [5, 2, -5, -10, 10, 0], [5, 2, 0, -5, 10, -10], [5, 2, 0, -5, -10, 10], [5, 2, 0, 10, -5, -10], [5, 2, 0, 10, -10, -5], [5, 2, 0, -10, -5, 10], [5, 2, 0, -10, 10, -5], [5, 2, 10, -5, 0, -10], [5, 2, 10, -5, -10, 0], [5, 2, 10, 0, -5, -10], [5, 2, 10, 0, -10, -5], [5, 2, 10, -10, -5, 0], [5, 2, 10, -10, 0, -5], [5, 2, -10, -5, 0, 10], [5, 2, -10, -5, 10, 0], [5, 2, -10, 0, -5, 10], [5, 2, -10, 0, 10, -5], [5, 2, -10, 10, -5, 0], [5, 2, -10, 10, 0, -5], [10, -5, 0, 5, -10, 2], [10, -5, 0, 5, 2, -10], [10, -5, 0, -10, 5, 2], [10, -5, 0, -10, 2, 5], [10, -5, 0, 2, 5, -10], [10, -5, 0, 2, -10, 5], [10, -5, 5, 0, -10, 2], [10, -5, 5, 0, 2, -10], [10, -5, 5, -10, 0, 2], [10, -5, 5, -10, 2, 0], [10, -5, 5, 2, 0, -10], [10, -5, 5, 2, -10, 0], [10, -5, -10, 0, 5, 2], [10, -5, -10, 0, 2, 5], [10, -5, -10, 5, 0, 2], [10, -5, -10, 5, 2, 0], [10, -5, -10, 2, 0, 5], [10, -5, -10, 2, 5, 0], [10, -5, 2, 0, 5, -10], [10, -5, 2, 0, -10, 5], [10, -5, 2, 5, 0, -10], [10, -5, 2, 5, -10, 0], [10, -5, 2, -10, 0, 5], [10, -5, 2, -10, 5, 0], [10, 0, -5, 5, -10, 2], [10, 0, -5, 5, 2, -10], [10, 0, -5, -10, 5, 2], [10, 0, -5, -10, 2, 5], [10, 0, -5, 2, 5, -10], [10, 0, -5, 2, -10, 5], [10, 0, 5, -5, -10, 2], [10, 0, 5, -5, 2, -10], [10, 0, 5, -10, -5, 2], [10, 0, 5, -10, 2, -5], [10, 0, 5, 2, -5, -10], [10, 0, 5, 2, -10, -5], [10, 0, -10, -5, 5, 2], [10, 0, -10, -5, 2, 5], [10, 0, -10, 5, -5, 2], [10, 0, -10, 5, 2, -5], [10, 0, -10, 2, -5, 5], [10, 0, -10, 2, 5, -5], [10, 0, 2, -5, 5, -10], [10, 0, 2, -5, -10, 5], [10, 0, 2, 5, -5, -10], [10, 0, 2, 5, -10, -5], [10, 0, 2, -10, -5, 5], [10, 0, 2, -10, 5, -5], [10, 5, -5, 0, -10, 2], [10, 5, -5, 0, 2, -10], [10, 5, -5, -10, 0, 2], [10, 5, -5, -10, 2, 0], [10, 5, -5, 2, 0, -10], [10, 5, -5, 2, -10, 0], [10, 5, 0, -5, -10, 2], [10, 5, 0, -5, 2, -10], [10, 5, 0, -10, -5, 2], [10, 5, 0, -10, 2, -5], [10, 5, 0, 2, -5, -10], [10, 5, 0, 2, -10, -5], [10, 5, -10, -5, 0, 2], [10, 5, -10, -5, 2, 0], [10, 5, -10, 0, -5, 2], [10, 5, -10, 0, 2, -5], [10, 5, -10, 2, -5, 0], [10, 5, -10, 2, 0, -5], [10, 5, 2, -5, 0, -10], [10, 5, 2, -5, -10, 0], [10, 5, 2, 0, -5, -10], [10, 5, 2, 0, -10, -5], [10, 5, 2, -10, -5, 0], [10, 5, 2, -10, 0, -5], [10, -10, -5, 0, 5, 2], [10, -10, -5, 0, 2, 5], [10, -10, -5, 5, 0, 2], [10, -10, -5, 5, 2, 0], [10, -10, -5, 2, 0, 5], [10, -10, -5, 2, 5, 0], [10, -10, 0, -5, 5, 2], [10, -10, 0, -5, 2, 5], [10, -10, 0, 5, -5, 2], [10, -10, 0, 5, 2, -5], [10, -10, 0, 2, -5, 5], [10, -10, 0, 2, 5, -5], [10, -10, 5, -5, 0, 2], [10, -10, 5, -5, 2, 0], [10, -10, 5, 0, -5, 2], [10, -10, 5, 0, 2, -5], [10, -10, 5, 2, -5, 0], [10, -10, 5, 2, 0, -5], [10, -10, 2, -5, 0, 5], [10, -10, 2, -5, 5, 0], [10, -10, 2, 0, -5, 5], [10, -10, 2, 0, 5, -5], [10, -10, 2, 5, -5, 0], [10, -10, 2, 5, 0, -5], [10, 2, -5, 0, 5, -10], [10, 2, -5, 0, -10, 5], [10, 2, -5, 5, 0, -10], [10, 2, -5, 5, -10, 0], [10, 2, -5, -10, 0, 5], [10, 2, -5, -10, 5, 0], [10, 2, 0, -5, 5, -10], [10, 2, 0, -5, -10, 5], [10, 2, 0, 5, -5, -10], [10, 2, 0, 5, -10, -5], [10, 2, 0, -10, -5, 5], [10, 2, 0, -10, 5, -5], [10, 2, 5, -5, 0, -10], [10, 2, 5, -5, -10, 0], [10, 2, 5, 0, -5, -10], [10, 2, 5, 0, -10, -5], [10, 2, 5, -10, -5, 0], [10, 2, 5, -10, 0, -5], [10, 2, -10, -5, 0, 5], [10, 2, -10, -5, 5, 0], [10, 2, -10, 0, -5, 5], [10, 2, -10, 0, 5, -5], [10, 2, -10, 5, -5, 0], [10, 2, -10, 5, 0, -5], [-10, -5, 0, 5, 10, 2], [-10, -5, 0, 5, 2, 10], [-10, -5, 0, 10, 5, 2], [-10, -5, 0, 10, 2, 5], [-10, -5, 0, 2, 5, 10], [-10, -5, 0, 2, 10, 5], [-10, -5, 5, 0, 10, 2], [-10, -5, 5, 0, 2, 10], [-10, -5, 5, 10, 0, 2], [-10, -5, 5, 10, 2, 0], [-10, -5, 5, 2, 0, 10], [-10, -5, 5, 2, 10, 0], [-10, -5, 10, 0, 5, 2], [-10, -5, 10, 0, 2, 5], [-10, -5, 10, 5, 0, 2], [-10, -5, 10, 5, 2, 0], [-10, -5, 10, 2, 0, 5], [-10, -5, 10, 2, 5, 0], [-10, -5, 2, 0, 5, 10], [-10, -5, 2, 0, 10, 5], [-10, -5, 2, 5, 0, 10], [-10, -5, 2, 5, 10, 0], [-10, -5, 2, 10, 0, 5], [-10, -5, 2, 10, 5, 0], [-10, 0, -5, 5, 10, 2], [-10, 0, -5, 5, 2, 10], [-10, 0, -5, 10, 5, 2], [-10, 0, -5, 10, 2, 5], [-10, 0, -5, 2, 5, 10], [-10, 0, -5, 2, 10, 5], [-10, 0, 5, -5, 10, 2], [-10, 0, 5, -5, 2, 10], [-10, 0, 5, 10, -5, 2], [-10, 0, 5, 10, 2, -5], [-10, 0, 5, 2, -5, 10], [-10, 0, 5, 2, 10, -5], [-10, 0, 10, -5, 5, 2], [-10, 0, 10, -5, 2, 5], [-10, 0, 10, 5, -5, 2], [-10, 0, 10, 5, 2, -5], [-10, 0, 10, 2, -5, 5], [-10, 0, 10, 2, 5, -5], [-10, 0, 2, -5, 5, 10], [-10, 0, 2, -5, 10, 5], [-10, 0, 2, 5, -5, 10], [-10, 0, 2, 5, 10, -5], [-10, 0, 2, 10, -5, 5], [-10, 0, 2, 10, 5, -5], [-10, 5, -5, 0, 10, 2], [-10, 5, -5, 0, 2, 10], [-10, 5, -5, 10, 0, 2], [-10, 5, -5, 10, 2, 0], [-10, 5, -5, 2, 0, 10], [-10, 5, -5, 2, 10, 0], [-10, 5, 0, -5, 10, 2], [-10, 5, 0, -5, 2, 10], [-10, 5, 0, 10, -5, 2], [-10, 5, 0, 10, 2, -5], [-10, 5, 0, 2, -5, 10], [-10, 5, 0, 2, 10, -5], [-10, 5, 10, -5, 0, 2], [-10, 5, 10, -5, 2, 0], [-10, 5, 10, 0, -5, 2], [-10, 5, 10, 0, 2, -5], [-10, 5, 10, 2, -5, 0], [-10, 5, 10, 2, 0, -5], [-10, 5, 2, -5, 0, 10], [-10, 5, 2, -5, 10, 0], [-10, 5, 2, 0, -5, 10], [-10, 5, 2, 0, 10, -5], [-10, 5, 2, 10, -5, 0], [-10, 5, 2, 10, 0, -5], [-10, 10, -5, 0, 5, 2], [-10, 10, -5, 0, 2, 5], [-10, 10, -5, 5, 0, 2], [-10, 10, -5, 5, 2, 0], [-10, 10, -5, 2, 0, 5], [-10, 10, -5, 2, 5, 0], [-10, 10, 0, -5, 5, 2], [-10, 10, 0, -5, 2, 5], [-10, 10, 0, 5, -5, 2], [-10, 10, 0, 5, 2, -5], [-10, 10, 0, 2, -5, 5], [-10, 10, 0, 2, 5, -5], [-10, 10, 5, -5, 0, 2], [-10, 10, 5, -5, 2, 0], [-10, 10, 5, 0, -5, 2], [-10, 10, 5, 0, 2, -5], [-10, 10, 5, 2, -5, 0], [-10, 10, 5, 2, 0, -5], [-10, 10, 2, -5, 0, 5], [-10, 10, 2, -5, 5, 0], [-10, 10, 2, 0, -5, 5], [-10, 10, 2, 0, 5, -5], [-10, 10, 2, 5, -5, 0], [-10, 10, 2, 5, 0, -5], [-10, 2, -5, 0, 5, 10], [-10, 2, -5, 0, 10, 5], [-10, 2, -5, 5, 0, 10], [-10, 2, -5, 5, 10, 0], [-10, 2, -5, 10, 0, 5], [-10, 2, -5, 10, 5, 0], [-10, 2, 0, -5, 5, 10], [-10, 2, 0, -5, 10, 5], [-10, 2, 0, 5, -5, 10], [-10, 2, 0, 5, 10, -5], [-10, 2, 0, 10, -5, 5], [-10, 2, 0, 10, 5, -5], [-10, 2, 5, -5, 0, 10], [-10, 2, 5, -5, 10, 0], [-10, 2, 5, 0, -5, 10], [-10, 2, 5, 0, 10, -5], [-10, 2, 5, 10, -5, 0], [-10, 2, 5, 10, 0, -5], [-10, 2, 10, -5, 0, 5], [-10, 2, 10, -5, 5, 0], [-10, 2, 10, 0, -5, 5], [-10, 2, 10, 0, 5, -5], [-10, 2, 10, 5, -5, 0], [-10, 2, 10, 5, 0, -5], [2, -5, 0, 5, 10, -10], [2, -5, 0, 5, -10, 10], [2, -5, 0, 10, 5, -10], [2, -5, 0, 10, -10, 5], [2, -5, 0, -10, 5, 10], [2, -5, 0, -10, 10, 5], [2, -5, 5, 0, 10, -10], [2, -5, 5, 0, -10, 10], [2, -5, 5, 10, 0, -10], [2, -5, 5, 10, -10, 0], [2, -5, 5, -10, 0, 10], [2, -5, 5, -10, 10, 0], [2, -5, 10, 0, 5, -10], [2, -5, 10, 0, -10, 5], [2, -5, 10, 5, 0, -10], [2, -5, 10, 5, -10, 0], [2, -5, 10, -10, 0, 5], [2, -5, 10, -10, 5, 0], [2, -5, -10, 0, 5, 10], [2, -5, -10, 0, 10, 5], [2, -5, -10, 5, 0, 10], [2, -5, -10, 5, 10, 0], [2, -5, -10, 10, 0, 5], [2, -5, -10, 10, 5, 0], [2, 0, -5, 5, 10, -10], [2, 0, -5, 5, -10, 10], [2, 0, -5, 10, 5, -10], [2, 0, -5, 10, -10, 5], [2, 0, -5, -10, 5, 10], [2, 0, -5, -10, 10, 5], [2, 0, 5, -5, 10, -10], [2, 0, 5, -5, -10, 10], [2, 0, 5, 10, -5, -10], [2, 0, 5, 10, -10, -5], [2, 0, 5, -10, -5, 10], [2, 0, 5, -10, 10, -5], [2, 0, 10, -5, 5, -10], [2, 0, 10, -5, -10, 5], [2, 0, 10, 5, -5, -10], [2, 0, 10, 5, -10, -5], [2, 0, 10, -10, -5, 5], [2, 0, 10, -10, 5, -5], [2, 0, -10, -5, 5, 10], [2, 0, -10, -5, 10, 5], [2, 0, -10, 5, -5, 10], [2, 0, -10, 5, 10, -5], [2, 0, -10, 10, -5, 5], [2, 0, -10, 10, 5, -5], [2, 5, -5, 0, 10, -10], [2, 5, -5, 0, -10, 10], [2, 5, -5, 10, 0, -10], [2, 5, -5, 10, -10, 0], [2, 5, -5, -10, 0, 10], [2, 5, -5, -10, 10, 0], [2, 5, 0, -5, 10, -10], [2, 5, 0, -5, -10, 10], [2, 5, 0, 10, -5, -10], [2, 5, 0, 10, -10, -5], [2, 5, 0, -10, -5, 10], [2, 5, 0, -10, 10, -5], [2, 5, 10, -5, 0, -10], [2, 5, 10, -5, -10, 0], [2, 5, 10, 0, -5, -10], [2, 5, 10, 0, -10, -5], [2, 5, 10, -10, -5, 0], [2, 5, 10, -10, 0, -5], [2, 5, -10, -5, 0, 10], [2, 5, -10, -5, 10, 0], [2, 5, -10, 0, -5, 10], [2, 5, -10, 0, 10, -5], [2, 5, -10, 10, -5, 0], [2, 5, -10, 10, 0, -5], [2, 10, -5, 0, 5, -10], [2, 10, -5, 0, -10, 5], [2, 10, -5, 5, 0, -10], [2, 10, -5, 5, -10, 0], [2, 10, -5, -10, 0, 5], [2, 10, -5, -10, 5, 0], [2, 10, 0, -5, 5, -10], [2, 10, 0, -5, -10, 5], [2, 10, 0, 5, -5, -10], [2, 10, 0, 5, -10, -5], [2, 10, 0, -10, -5, 5], [2, 10, 0, -10, 5, -5], [2, 10, 5, -5, 0, -10], [2, 10, 5, -5, -10, 0], [2, 10, 5, 0, -5, -10], [2, 10, 5, 0, -10, -5], [2, 10, 5, -10, -5, 0], [2, 10, 5, -10, 0, -5], [2, 10, -10, -5, 0, 5], [2, 10, -10, -5, 5, 0], [2, 10, -10, 0, -5, 5], [2, 10, -10, 0, 5, -5], [2, 10, -10, 5, -5, 0], [2, 10, -10, 5, 0, -5], [2, -10, -5, 0, 5, 10], [2, -10, -5, 0, 10, 5], [2, -10, -5, 5, 0, 10], [2, -10, -5, 5, 10, 0], [2, -10, -5, 10, 0, 5], [2, -10, -5, 10, 5, 0], [2, -10, 0, -5, 5, 10], [2, -10, 0, -5, 10, 5], [2, -10, 0, 5, -5, 10], [2, -10, 0, 5, 10, -5], [2, -10, 0, 10, -5, 5], [2, -10, 0, 10, 5, -5], [2, -10, 5, -5, 0, 10], [2, -10, 5, -5, 10, 0], [2, -10, 5, 0, -5, 10], [2, -10, 5, 0, 10, -5], [2, -10, 5, 10, -5, 0], [2, -10, 5, 10, 0, -5], [2, -10, 10, -5, 0, 5], [2, -10, 10, -5, 5, 0], [2, -10, 10, 0, -5, 5], [2, -10, 10, 0, 5, -5], [2, -10, 10, 5, -5, 0], [2, -10, 10, 5, 0, -5]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, 3, 4]), [[-1, 0, 1, 2, 3, 4], [-1, 0, 1, 2, 4, 3], [-1, 0, 1, 3, 2, 4], [-1, 0, 1, 3, 4, 2], [-1, 0, 1, 4, 2, 3], [-1, 0, 1, 4, 3, 2], [-1, 0, 2, 1, 3, 4], [-1, 0, 2, 1, 4, 3], [-1, 0, 2, 3, 1, 4], [-1, 0, 2, 3, 4, 1], [-1, 0, 2, 4, 1, 3], [-1, 0, 2, 4, 3, 1], [-1, 0, 3, 1, 2, 4], [-1, 0, 3, 1, 4, 2], [-1, 0, 3, 2, 1, 4], [-1, 0, 3, 2, 4, 1], [-1, 0, 3, 4, 1, 2], [-1, 0, 3, 4, 2, 1], [-1, 0, 4, 1, 2, 3], [-1, 0, 4, 1, 3, 2], [-1, 0, 4, 2, 1, 3], [-1, 0, 4, 2, 3, 1], [-1, 0, 4, 3, 1, 2], [-1, 0, 4, 3, 2, 1], [-1, 1, 0, 2, 3, 4], [-1, 1, 0, 2, 4, 3], [-1, 1, 0, 3, 2, 4], [-1, 1, 0, 3, 4, 2], [-1, 1, 0, 4, 2, 3], [-1, 1, 0, 4, 3, 2], [-1, 1, 2, 0, 3, 4], [-1, 1, 2, 0, 4, 3], [-1, 1, 2, 3, 0, 4], [-1, 1, 2, 3, 4, 0], [-1, 1, 2, 4, 0, 3], [-1, 1, 2, 4, 3, 0], [-1, 1, 3, 0, 2, 4], [-1, 1, 3, 0, 4, 2], [-1, 1, 3, 2, 0, 4], [-1, 1, 3, 2, 4, 0], [-1, 1, 3, 4, 0, 2], [-1, 1, 3, 4, 2, 0], [-1, 1, 4, 0, 2, 3], [-1, 1, 4, 0, 3, 2], [-1, 1, 4, 2, 0, 3], [-1, 1, 4, 2, 3, 0], [-1, 1, 4, 3, 0, 2], [-1, 1, 4, 3, 2, 0], [-1, 2, 0, 1, 3, 4], [-1, 2, 0, 1, 4, 3], [-1, 2, 0, 3, 1, 4], [-1, 2, 0, 3, 4, 1], [-1, 2, 0, 4, 1, 3], [-1, 2, 0, 4, 3, 1], [-1, 2, 1, 0, 3, 4], [-1, 2, 1, 0, 4, 3], [-1, 2, 1, 3, 0, 4], [-1, 2, 1, 3, 4, 0], [-1, 2, 1, 4, 0, 3], [-1, 2, 1, 4, 3, 0], [-1, 2, 3, 0, 1, 4], [-1, 2, 3, 0, 4, 1], [-1, 2, 3, 1, 0, 4], [-1, 2, 3, 1, 4, 0], [-1, 2, 3, 4, 0, 1], [-1, 2, 3, 4, 1, 0], [-1, 2, 4, 0, 1, 3], [-1, 2, 4, 0, 3, 1], [-1, 2, 4, 1, 0, 3], [-1, 2, 4, 1, 3, 0], [-1, 2, 4, 3, 0, 1], [-1, 2, 4, 3, 1, 0], [-1, 3, 0, 1, 2, 4], [-1, 3, 0, 1, 4, 2], [-1, 3, 0, 2, 1, 4], [-1, 3, 0, 2, 4, 1], [-1, 3, 0, 4, 1, 2], [-1, 3, 0, 4, 2, 1], [-1, 3, 1, 0, 2, 4], [-1, 3, 1, 0, 4, 2], [-1, 3, 1, 2, 0, 4], [-1, 3, 1, 2, 4, 0], [-1, 3, 1, 4, 0, 2], [-1, 3, 1, 4, 2, 0], [-1, 3, 2, 0, 1, 4], [-1, 3, 2, 0, 4, 1], [-1, 3, 2, 1, 0, 4], [-1, 3, 2, 1, 4, 0], [-1, 3, 2, 4, 0, 1], [-1, 3, 2, 4, 1, 0], [-1, 3, 4, 0, 1, 2], [-1, 3, 4, 0, 2, 1], [-1, 3, 4, 1, 0, 2], [-1, 3, 4, 1, 2, 0], [-1, 3, 4, 2, 0, 1], [-1, 3, 4, 2, 1, 0], [-1, 4, 0, 1, 2, 3], [-1, 4, 0, 1, 3, 2], [-1, 4, 0, 2, 1, 3], [-1, 4, 0, 2, 3, 1], [-1, 4, 0, 3, 1, 2], [-1, 4, 0, 3, 2, 1], [-1, 4, 1, 0, 2, 3], [-1, 4, 1, 0, 3, 2], [-1, 4, 1, 2, 0, 3], [-1, 4, 1, 2, 3, 0], [-1, 4, 1, 3, 0, 2], [-1, 4, 1, 3, 2, 0], [-1, 4, 2, 0, 1, 3], [-1, 4, 2, 0, 3, 1], [-1, 4, 2, 1, 0, 3], [-1, 4, 2, 1, 3, 0], [-1, 4, 2, 3, 0, 1], [-1, 4, 2, 3, 1, 0], [-1, 4, 3, 0, 1, 2], [-1, 4, 3, 0, 2, 1], [-1, 4, 3, 1, 0, 2], [-1, 4, 3, 1, 2, 0], [-1, 4, 3, 2, 0, 1], [-1, 4, 3, 2, 1, 0], [0, -1, 1, 2, 3, 4], [0, -1, 1, 2, 4, 3], [0, -1, 1, 3, 2, 4], [0, -1, 1, 3, 4, 2], [0, -1, 1, 4, 2, 3], [0, -1, 1, 4, 3, 2], [0, -1, 2, 1, 3, 4], [0, -1, 2, 1, 4, 3], [0, -1, 2, 3, 1, 4], [0, -1, 2, 3, 4, 1], [0, -1, 2, 4, 1, 3], [0, -1, 2, 4, 3, 1], [0, -1, 3, 1, 2, 4], [0, -1, 3, 1, 4, 2], [0, -1, 3, 2, 1, 4], [0, -1, 3, 2, 4, 1], [0, -1, 3, 4, 1, 2], [0, -1, 3, 4, 2, 1], [0, -1, 4, 1, 2, 3], [0, -1, 4, 1, 3, 2], [0, -1, 4, 2, 1, 3], [0, -1, 4, 2, 3, 1], [0, -1, 4, 3, 1, 2], [0, -1, 4, 3, 2, 1], [0, 1, -1, 2, 3, 4], [0, 1, -1, 2, 4, 3], [0, 1, -1, 3, 2, 4], [0, 1, -1, 3, 4, 2], [0, 1, -1, 4, 2, 3], [0, 1, -1, 4, 3, 2], [0, 1, 2, -1, 3, 4], [0, 1, 2, -1, 4, 3], [0, 1, 2, 3, -1, 4], [0, 1, 2, 3, 4, -1], [0, 1, 2, 4, -1, 3], [0, 1, 2, 4, 3, -1], [0, 1, 3, -1, 2, 4], [0, 1, 3, -1, 4, 2], [0, 1, 3, 2, -1, 4], [0, 1, 3, 2, 4, -1], [0, 1, 3, 4, -1, 2], [0, 1, 3, 4, 2, -1], [0, 1, 4, -1, 2, 3], [0, 1, 4, -1, 3, 2], [0, 1, 4, 2, -1, 3], [0, 1, 4, 2, 3, -1], [0, 1, 4, 3, -1, 2], [0, 1, 4, 3, 2, -1], [0, 2, -1, 1, 3, 4], [0, 2, -1, 1, 4, 3], [0, 2, -1, 3, 1, 4], [0, 2, -1, 3, 4, 1], [0, 2, -1, 4, 1, 3], [0, 2, -1, 4, 3, 1], [0, 2, 1, -1, 3, 4], [0, 2, 1, -1, 4, 3], [0, 2, 1, 3, -1, 4], [0, 2, 1, 3, 4, -1], [0, 2, 1, 4, -1, 3], [0, 2, 1, 4, 3, -1], [0, 2, 3, -1, 1, 4], [0, 2, 3, -1, 4, 1], [0, 2, 3, 1, -1, 4], [0, 2, 3, 1, 4, -1], [0, 2, 3, 4, -1, 1], [0, 2, 3, 4, 1, -1], [0, 2, 4, -1, 1, 3], [0, 2, 4, -1, 3, 1], [0, 2, 4, 1, -1, 3], [0, 2, 4, 1, 3, -1], [0, 2, 4, 3, -1, 1], [0, 2, 4, 3, 1, -1], [0, 3, -1, 1, 2, 4], [0, 3, -1, 1, 4, 2], [0, 3, -1, 2, 1, 4], [0, 3, -1, 2, 4, 1], [0, 3, -1, 4, 1, 2], [0, 3, -1, 4, 2, 1], [0, 3, 1, -1, 2, 4], [0, 3, 1, -1, 4, 2], [0, 3, 1, 2, -1, 4], [0, 3, 1, 2, 4, -1], [0, 3, 1, 4, -1, 2], [0, 3, 1, 4, 2, -1], [0, 3, 2, -1, 1, 4], [0, 3, 2, -1, 4, 1], [0, 3, 2, 1, -1, 4], [0, 3, 2, 1, 4, -1], [0, 3, 2, 4, -1, 1], [0, 3, 2, 4, 1, -1], [0, 3, 4, -1, 1, 2], [0, 3, 4, -1, 2, 1], [0, 3, 4, 1, -1, 2], [0, 3, 4, 1, 2, -1], [0, 3, 4, 2, -1, 1], [0, 3, 4, 2, 1, -1], [0, 4, -1, 1, 2, 3], [0, 4, -1, 1, 3, 2], [0, 4, -1, 2, 1, 3], [0, 4, -1, 2, 3, 1], [0, 4, -1, 3, 1, 2], [0, 4, -1, 3, 2, 1], [0, 4, 1, -1, 2, 3], [0, 4, 1, -1, 3, 2], [0, 4, 1, 2, -1, 3], [0, 4, 1, 2, 3, -1], [0, 4, 1, 3, -1, 2], [0, 4, 1, 3, 2, -1], [0, 4, 2, -1, 1, 3], [0, 4, 2, -1, 3, 1], [0, 4, 2, 1, -1, 3], [0, 4, 2, 1, 3, -1], [0, 4, 2, 3, -1, 1], [0, 4, 2, 3, 1, -1], [0, 4, 3, -1, 1, 2], [0, 4, 3, -1, 2, 1], [0, 4, 3, 1, -1, 2], [0, 4, 3, 1, 2, -1], [0, 4, 3, 2, -1, 1], [0, 4, 3, 2, 1, -1], [1, -1, 0, 2, 3, 4], [1, -1, 0, 2, 4, 3], [1, -1, 0, 3, 2, 4], [1, -1, 0, 3, 4, 2], [1, -1, 0, 4, 2, 3], [1, -1, 0, 4, 3, 2], [1, -1, 2, 0, 3, 4], [1, -1, 2, 0, 4, 3], [1, -1, 2, 3, 0, 4], [1, -1, 2, 3, 4, 0], [1, -1, 2, 4, 0, 3], [1, -1, 2, 4, 3, 0], [1, -1, 3, 0, 2, 4], [1, -1, 3, 0, 4, 2], [1, -1, 3, 2, 0, 4], [1, -1, 3, 2, 4, 0], [1, -1, 3, 4, 0, 2], [1, -1, 3, 4, 2, 0], [1, -1, 4, 0, 2, 3], [1, -1, 4, 0, 3, 2], [1, -1, 4, 2, 0, 3], [1, -1, 4, 2, 3, 0], [1, -1, 4, 3, 0, 2], [1, -1, 4, 3, 2, 0], [1, 0, -1, 2, 3, 4], [1, 0, -1, 2, 4, 3], [1, 0, -1, 3, 2, 4], [1, 0, -1, 3, 4, 2], [1, 0, -1, 4, 2, 3], [1, 0, -1, 4, 3, 2], [1, 0, 2, -1, 3, 4], [1, 0, 2, -1, 4, 3], [1, 0, 2, 3, -1, 4], [1, 0, 2, 3, 4, -1], [1, 0, 2, 4, -1, 3], [1, 0, 2, 4, 3, -1], [1, 0, 3, -1, 2, 4], [1, 0, 3, -1, 4, 2], [1, 0, 3, 2, -1, 4], [1, 0, 3, 2, 4, -1], [1, 0, 3, 4, -1, 2], [1, 0, 3, 4, 2, -1], [1, 0, 4, -1, 2, 3], [1, 0, 4, -1, 3, 2], [1, 0, 4, 2, -1, 3], [1, 0, 4, 2, 3, -1], [1, 0, 4, 3, -1, 2], [1, 0, 4, 3, 2, -1], [1, 2, -1, 0, 3, 4], [1, 2, -1, 0, 4, 3], [1, 2, -1, 3, 0, 4], [1, 2, -1, 3, 4, 0], [1, 2, -1, 4, 0, 3], [1, 2, -1, 4, 3, 0], [1, 2, 0, -1, 3, 4], [1, 2, 0, -1, 4, 3], [1, 2, 0, 3, -1, 4], [1, 2, 0, 3, 4, -1], [1, 2, 0, 4, -1, 3], [1, 2, 0, 4, 3, -1], [1, 2, 3, -1, 0, 4], [1, 2, 3, -1, 4, 0], [1, 2, 3, 0, -1, 4], [1, 2, 3, 0, 4, -1], [1, 2, 3, 4, -1, 0], [1, 2, 3, 4, 0, -1], [1, 2, 4, -1, 0, 3], [1, 2, 4, -1, 3, 0], [1, 2, 4, 0, -1, 3], [1, 2, 4, 0, 3, -1], [1, 2, 4, 3, -1, 0], [1, 2, 4, 3, 0, -1], [1, 3, -1, 0, 2, 4], [1, 3, -1, 0, 4, 2], [1, 3, -1, 2, 0, 4], [1, 3, -1, 2, 4, 0], [1, 3, -1, 4, 0, 2], [1, 3, -1, 4, 2, 0], [1, 3, 0, -1, 2, 4], [1, 3, 0, -1, 4, 2], [1, 3, 0, 2, -1, 4], [1, 3, 0, 2, 4, -1], [1, 3, 0, 4, -1, 2], [1, 3, 0, 4, 2, -1], [1, 3, 2, -1, 0, 4], [1, 3, 2, -1, 4, 0], [1, 3, 2, 0, -1, 4], [1, 3, 2, 0, 4, -1], [1, 3, 2, 4, -1, 0], [1, 3, 2, 4, 0, -1], [1, 3, 4, -1, 0, 2], [1, 3, 4, -1, 2, 0], [1, 3, 4, 0, -1, 2], [1, 3, 4, 0, 2, -1], [1, 3, 4, 2, -1, 0], [1, 3, 4, 2, 0, -1], [1, 4, -1, 0, 2, 3], [1, 4, -1, 0, 3, 2], [1, 4, -1, 2, 0, 3], [1, 4, -1, 2, 3, 0], [1, 4, -1, 3, 0, 2], [1, 4, -1, 3, 2, 0], [1, 4, 0, -1, 2, 3], [1, 4, 0, -1, 3, 2], [1, 4, 0, 2, -1, 3], [1, 4, 0, 2, 3, -1], [1, 4, 0, 3, -1, 2], [1, 4, 0, 3, 2, -1], [1, 4, 2, -1, 0, 3], [1, 4, 2, -1, 3, 0], [1, 4, 2, 0, -1, 3], [1, 4, 2, 0, 3, -1], [1, 4, 2, 3, -1, 0], [1, 4, 2, 3, 0, -1], [1, 4, 3, -1, 0, 2], [1, 4, 3, -1, 2, 0], [1, 4, 3, 0, -1, 2], [1, 4, 3, 0, 2, -1], [1, 4, 3, 2, -1, 0], [1, 4, 3, 2, 0, -1], [2, -1, 0, 1, 3, 4], [2, -1, 0, 1, 4, 3], [2, -1, 0, 3, 1, 4], [2, -1, 0, 3, 4, 1], [2, -1, 0, 4, 1, 3], [2, -1, 0, 4, 3, 1], [2, -1, 1, 0, 3, 4], [2, -1, 1, 0, 4, 3], [2, -1, 1, 3, 0, 4], [2, -1, 1, 3, 4, 0], [2, -1, 1, 4, 0, 3], [2, -1, 1, 4, 3, 0], [2, -1, 3, 0, 1, 4], [2, -1, 3, 0, 4, 1], [2, -1, 3, 1, 0, 4], [2, -1, 3, 1, 4, 0], [2, -1, 3, 4, 0, 1], [2, -1, 3, 4, 1, 0], [2, -1, 4, 0, 1, 3], [2, -1, 4, 0, 3, 1], [2, -1, 4, 1, 0, 3], [2, -1, 4, 1, 3, 0], [2, -1, 4, 3, 0, 1], [2, -1, 4, 3, 1, 0], [2, 0, -1, 1, 3, 4], [2, 0, -1, 1, 4, 3], [2, 0, -1, 3, 1, 4], [2, 0, -1, 3, 4, 1], [2, 0, -1, 4, 1, 3], [2, 0, -1, 4, 3, 1], [2, 0, 1, -1, 3, 4], [2, 0, 1, -1, 4, 3], [2, 0, 1, 3, -1, 4], [2, 0, 1, 3, 4, -1], [2, 0, 1, 4, -1, 3], [2, 0, 1, 4, 3, -1], [2, 0, 3, -1, 1, 4], [2, 0, 3, -1, 4, 1], [2, 0, 3, 1, -1, 4], [2, 0, 3, 1, 4, -1], [2, 0, 3, 4, -1, 1], [2, 0, 3, 4, 1, -1], [2, 0, 4, -1, 1, 3], [2, 0, 4, -1, 3, 1], [2, 0, 4, 1, -1, 3], [2, 0, 4, 1, 3, -1], [2, 0, 4, 3, -1, 1], [2, 0, 4, 3, 1, -1], [2, 1, -1, 0, 3, 4], [2, 1, -1, 0, 4, 3], [2, 1, -1, 3, 0, 4], [2, 1, -1, 3, 4, 0], [2, 1, -1, 4, 0, 3], [2, 1, -1, 4, 3, 0], [2, 1, 0, -1, 3, 4], [2, 1, 0, -1, 4, 3], [2, 1, 0, 3, -1, 4], [2, 1, 0, 3, 4, -1], [2, 1, 0, 4, -1, 3], [2, 1, 0, 4, 3, -1], [2, 1, 3, -1, 0, 4], [2, 1, 3, -1, 4, 0], [2, 1, 3, 0, -1, 4], [2, 1, 3, 0, 4, -1], [2, 1, 3, 4, -1, 0], [2, 1, 3, 4, 0, -1], [2, 1, 4, -1, 0, 3], [2, 1, 4, -1, 3, 0], [2, 1, 4, 0, -1, 3], [2, 1, 4, 0, 3, -1], [2, 1, 4, 3, -1, 0], [2, 1, 4, 3, 0, -1], [2, 3, -1, 0, 1, 4], [2, 3, -1, 0, 4, 1], [2, 3, -1, 1, 0, 4], [2, 3, -1, 1, 4, 0], [2, 3, -1, 4, 0, 1], [2, 3, -1, 4, 1, 0], [2, 3, 0, -1, 1, 4], [2, 3, 0, -1, 4, 1], [2, 3, 0, 1, -1, 4], [2, 3, 0, 1, 4, -1], [2, 3, 0, 4, -1, 1], [2, 3, 0, 4, 1, -1], [2, 3, 1, -1, 0, 4], [2, 3, 1, -1, 4, 0], [2, 3, 1, 0, -1, 4], [2, 3, 1, 0, 4, -1], [2, 3, 1, 4, -1, 0], [2, 3, 1, 4, 0, -1], [2, 3, 4, -1, 0, 1], [2, 3, 4, -1, 1, 0], [2, 3, 4, 0, -1, 1], [2, 3, 4, 0, 1, -1], [2, 3, 4, 1, -1, 0], [2, 3, 4, 1, 0, -1], [2, 4, -1, 0, 1, 3], [2, 4, -1, 0, 3, 1], [2, 4, -1, 1, 0, 3], [2, 4, -1, 1, 3, 0], [2, 4, -1, 3, 0, 1], [2, 4, -1, 3, 1, 0], [2, 4, 0, -1, 1, 3], [2, 4, 0, -1, 3, 1], [2, 4, 0, 1, -1, 3], [2, 4, 0, 1, 3, -1], [2, 4, 0, 3, -1, 1], [2, 4, 0, 3, 1, -1], [2, 4, 1, -1, 0, 3], [2, 4, 1, -1, 3, 0], [2, 4, 1, 0, -1, 3], [2, 4, 1, 0, 3, -1], [2, 4, 1, 3, -1, 0], [2, 4, 1, 3, 0, -1], [2, 4, 3, -1, 0, 1], [2, 4, 3, -1, 1, 0], [2, 4, 3, 0, -1, 1], [2, 4, 3, 0, 1, -1], [2, 4, 3, 1, -1, 0], [2, 4, 3, 1, 0, -1], [3, -1, 0, 1, 2, 4], [3, -1, 0, 1, 4, 2], [3, -1, 0, 2, 1, 4], [3, -1, 0, 2, 4, 1], [3, -1, 0, 4, 1, 2], [3, -1, 0, 4, 2, 1], [3, -1, 1, 0, 2, 4], [3, -1, 1, 0, 4, 2], [3, -1, 1, 2, 0, 4], [3, -1, 1, 2, 4, 0], [3, -1, 1, 4, 0, 2], [3, -1, 1, 4, 2, 0], [3, -1, 2, 0, 1, 4], [3, -1, 2, 0, 4, 1], [3, -1, 2, 1, 0, 4], [3, -1, 2, 1, 4, 0], [3, -1, 2, 4, 0, 1], [3, -1, 2, 4, 1, 0], [3, -1, 4, 0, 1, 2], [3, -1, 4, 0, 2, 1], [3, -1, 4, 1, 0, 2], [3, -1, 4, 1, 2, 0], [3, -1, 4, 2, 0, 1], [3, -1, 4, 2, 1, 0], [3, 0, -1, 1, 2, 4], [3, 0, -1, 1, 4, 2], [3, 0, -1, 2, 1, 4], [3, 0, -1, 2, 4, 1], [3, 0, -1, 4, 1, 2], [3, 0, -1, 4, 2, 1], [3, 0, 1, -1, 2, 4], [3, 0, 1, -1, 4, 2], [3, 0, 1, 2, -1, 4], [3, 0, 1, 2, 4, -1], [3, 0, 1, 4, -1, 2], [3, 0, 1, 4, 2, -1], [3, 0, 2, -1, 1, 4], [3, 0, 2, -1, 4, 1], [3, 0, 2, 1, -1, 4], [3, 0, 2, 1, 4, -1], [3, 0, 2, 4, -1, 1], [3, 0, 2, 4, 1, -1], [3, 0, 4, -1, 1, 2], [3, 0, 4, -1, 2, 1], [3, 0, 4, 1, -1, 2], [3, 0, 4, 1, 2, -1], [3, 0, 4, 2, -1, 1], [3, 0, 4, 2, 1, -1], [3, 1, -1, 0, 2, 4], [3, 1, -1, 0, 4, 2], [3, 1, -1, 2, 0, 4], [3, 1, -1, 2, 4, 0], [3, 1, -1, 4, 0, 2], [3, 1, -1, 4, 2, 0], [3, 1, 0, -1, 2, 4], [3, 1, 0, -1, 4, 2], [3, 1, 0, 2, -1, 4], [3, 1, 0, 2, 4, -1], [3, 1, 0, 4, -1, 2], [3, 1, 0, 4, 2, -1], [3, 1, 2, -1, 0, 4], [3, 1, 2, -1, 4, 0], [3, 1, 2, 0, -1, 4], [3, 1, 2, 0, 4, -1], [3, 1, 2, 4, -1, 0], [3, 1, 2, 4, 0, -1], [3, 1, 4, -1, 0, 2], [3, 1, 4, -1, 2, 0], [3, 1, 4, 0, -1, 2], [3, 1, 4, 0, 2, -1], [3, 1, 4, 2, -1, 0], [3, 1, 4, 2, 0, -1], [3, 2, -1, 0, 1, 4], [3, 2, -1, 0, 4, 1], [3, 2, -1, 1, 0, 4], [3, 2, -1, 1, 4, 0], [3, 2, -1, 4, 0, 1], [3, 2, -1, 4, 1, 0], [3, 2, 0, -1, 1, 4], [3, 2, 0, -1, 4, 1], [3, 2, 0, 1, -1, 4], [3, 2, 0, 1, 4, -1], [3, 2, 0, 4, -1, 1], [3, 2, 0, 4, 1, -1], [3, 2, 1, -1, 0, 4], [3, 2, 1, -1, 4, 0], [3, 2, 1, 0, -1, 4], [3, 2, 1, 0, 4, -1], [3, 2, 1, 4, -1, 0], [3, 2, 1, 4, 0, -1], [3, 2, 4, -1, 0, 1], [3, 2, 4, -1, 1, 0], [3, 2, 4, 0, -1, 1], [3, 2, 4, 0, 1, -1], [3, 2, 4, 1, -1, 0], [3, 2, 4, 1, 0, -1], [3, 4, -1, 0, 1, 2], [3, 4, -1, 0, 2, 1], [3, 4, -1, 1, 0, 2], [3, 4, -1, 1, 2, 0], [3, 4, -1, 2, 0, 1], [3, 4, -1, 2, 1, 0], [3, 4, 0, -1, 1, 2], [3, 4, 0, -1, 2, 1], [3, 4, 0, 1, -1, 2], [3, 4, 0, 1, 2, -1], [3, 4, 0, 2, -1, 1], [3, 4, 0, 2, 1, -1], [3, 4, 1, -1, 0, 2], [3, 4, 1, -1, 2, 0], [3, 4, 1, 0, -1, 2], [3, 4, 1, 0, 2, -1], [3, 4, 1, 2, -1, 0], [3, 4, 1, 2, 0, -1], [3, 4, 2, -1, 0, 1], [3, 4, 2, -1, 1, 0], [3, 4, 2, 0, -1, 1], [3, 4, 2, 0, 1, -1], [3, 4, 2, 1, -1, 0], [3, 4, 2, 1, 0, -1], [4, -1, 0, 1, 2, 3], [4, -1, 0, 1, 3, 2], [4, -1, 0, 2, 1, 3], [4, -1, 0, 2, 3, 1], [4, -1, 0, 3, 1, 2], [4, -1, 0, 3, 2, 1], [4, -1, 1, 0, 2, 3], [4, -1, 1, 0, 3, 2], [4, -1, 1, 2, 0, 3], [4, -1, 1, 2, 3, 0], [4, -1, 1, 3, 0, 2], [4, -1, 1, 3, 2, 0], [4, -1, 2, 0, 1, 3], [4, -1, 2, 0, 3, 1], [4, -1, 2, 1, 0, 3], [4, -1, 2, 1, 3, 0], [4, -1, 2, 3, 0, 1], [4, -1, 2, 3, 1, 0], [4, -1, 3, 0, 1, 2], [4, -1, 3, 0, 2, 1], [4, -1, 3, 1, 0, 2], [4, -1, 3, 1, 2, 0], [4, -1, 3, 2, 0, 1], [4, -1, 3, 2, 1, 0], [4, 0, -1, 1, 2, 3], [4, 0, -1, 1, 3, 2], [4, 0, -1, 2, 1, 3], [4, 0, -1, 2, 3, 1], [4, 0, -1, 3, 1, 2], [4, 0, -1, 3, 2, 1], [4, 0, 1, -1, 2, 3], [4, 0, 1, -1, 3, 2], [4, 0, 1, 2, -1, 3], [4, 0, 1, 2, 3, -1], [4, 0, 1, 3, -1, 2], [4, 0, 1, 3, 2, -1], [4, 0, 2, -1, 1, 3], [4, 0, 2, -1, 3, 1], [4, 0, 2, 1, -1, 3], [4, 0, 2, 1, 3, -1], [4, 0, 2, 3, -1, 1], [4, 0, 2, 3, 1, -1], [4, 0, 3, -1, 1, 2], [4, 0, 3, -1, 2, 1], [4, 0, 3, 1, -1, 2], [4, 0, 3, 1, 2, -1], [4, 0, 3, 2, -1, 1], [4, 0, 3, 2, 1, -1], [4, 1, -1, 0, 2, 3], [4, 1, -1, 0, 3, 2], [4, 1, -1, 2, 0, 3], [4, 1, -1, 2, 3, 0], [4, 1, -1, 3, 0, 2], [4, 1, -1, 3, 2, 0], [4, 1, 0, -1, 2, 3], [4, 1, 0, -1, 3, 2], [4, 1, 0, 2, -1, 3], [4, 1, 0, 2, 3, -1], [4, 1, 0, 3, -1, 2], [4, 1, 0, 3, 2, -1], [4, 1, 2, -1, 0, 3], [4, 1, 2, -1, 3, 0], [4, 1, 2, 0, -1, 3], [4, 1, 2, 0, 3, -1], [4, 1, 2, 3, -1, 0], [4, 1, 2, 3, 0, -1], [4, 1, 3, -1, 0, 2], [4, 1, 3, -1, 2, 0], [4, 1, 3, 0, -1, 2], [4, 1, 3, 0, 2, -1], [4, 1, 3, 2, -1, 0], [4, 1, 3, 2, 0, -1], [4, 2, -1, 0, 1, 3], [4, 2, -1, 0, 3, 1], [4, 2, -1, 1, 0, 3], [4, 2, -1, 1, 3, 0], [4, 2, -1, 3, 0, 1], [4, 2, -1, 3, 1, 0], [4, 2, 0, -1, 1, 3], [4, 2, 0, -1, 3, 1], [4, 2, 0, 1, -1, 3], [4, 2, 0, 1, 3, -1], [4, 2, 0, 3, -1, 1], [4, 2, 0, 3, 1, -1], [4, 2, 1, -1, 0, 3], [4, 2, 1, -1, 3, 0], [4, 2, 1, 0, -1, 3], [4, 2, 1, 0, 3, -1], [4, 2, 1, 3, -1, 0], [4, 2, 1, 3, 0, -1], [4, 2, 3, -1, 0, 1], [4, 2, 3, -1, 1, 0], [4, 2, 3, 0, -1, 1], [4, 2, 3, 0, 1, -1], [4, 2, 3, 1, -1, 0], [4, 2, 3, 1, 0, -1], [4, 3, -1, 0, 1, 2], [4, 3, -1, 0, 2, 1], [4, 3, -1, 1, 0, 2], [4, 3, -1, 1, 2, 0], [4, 3, -1, 2, 0, 1], [4, 3, -1, 2, 1, 0], [4, 3, 0, -1, 1, 2], [4, 3, 0, -1, 2, 1], [4, 3, 0, 1, -1, 2], [4, 3, 0, 1, 2, -1], [4, 3, 0, 2, -1, 1], [4, 3, 0, 2, 1, -1], [4, 3, 1, -1, 0, 2], [4, 3, 1, -1, 2, 0], [4, 3, 1, 0, -1, 2], [4, 3, 1, 0, 2, -1], [4, 3, 1, 2, -1, 0], [4, 3, 1, 2, 0, -1], [4, 3, 2, -1, 0, 1], [4, 3, 2, -1, 1, 0], [4, 3, 2, 0, -1, 1], [4, 3, 2, 0, 1, -1], [4, 3, 2, 1, -1, 0], [4, 3, 2, 1, 0, -1]])\n assert answers_match(candidate(nums=[-5, -3, -8, -6, -1]), [[-5, -3, -8, -6, -1], [-5, -3, -8, -1, -6], [-5, -3, -6, -8, -1], [-5, -3, -6, -1, -8], [-5, -3, -1, -8, -6], [-5, -3, -1, -6, -8], [-5, -8, -3, -6, -1], [-5, -8, -3, -1, -6], [-5, -8, -6, -3, -1], [-5, -8, -6, -1, -3], [-5, -8, -1, -3, -6], [-5, -8, -1, -6, -3], [-5, -6, -3, -8, -1], [-5, -6, -3, -1, -8], [-5, -6, -8, -3, -1], [-5, -6, -8, -1, -3], [-5, -6, -1, -3, -8], [-5, -6, -1, -8, -3], [-5, -1, -3, -8, -6], [-5, -1, -3, -6, -8], [-5, -1, -8, -3, -6], [-5, -1, -8, -6, -3], [-5, -1, -6, -3, -8], [-5, -1, -6, -8, -3], [-3, -5, -8, -6, -1], [-3, -5, -8, -1, -6], [-3, -5, -6, -8, -1], [-3, -5, -6, -1, -8], [-3, -5, -1, -8, -6], [-3, -5, -1, -6, -8], [-3, -8, -5, -6, -1], [-3, -8, -5, -1, -6], [-3, -8, -6, -5, -1], [-3, -8, -6, -1, -5], [-3, -8, -1, -5, -6], [-3, -8, -1, -6, -5], [-3, -6, -5, -8, -1], [-3, -6, -5, -1, -8], [-3, -6, -8, -5, -1], [-3, -6, -8, -1, -5], [-3, -6, -1, -5, -8], [-3, -6, -1, -8, -5], [-3, -1, -5, -8, -6], [-3, -1, -5, -6, -8], [-3, -1, -8, -5, -6], [-3, -1, -8, -6, -5], [-3, -1, -6, -5, -8], [-3, -1, -6, -8, -5], [-8, -5, -3, -6, -1], [-8, -5, -3, -1, -6], [-8, -5, -6, -3, -1], [-8, -5, -6, -1, -3], [-8, -5, -1, -3, -6], [-8, -5, -1, -6, -3], [-8, -3, -5, -6, -1], [-8, -3, -5, -1, -6], [-8, -3, -6, -5, -1], [-8, -3, -6, -1, -5], [-8, -3, -1, -5, -6], [-8, -3, -1, -6, -5], [-8, -6, -5, -3, -1], [-8, -6, -5, -1, -3], [-8, -6, -3, -5, -1], [-8, -6, -3, -1, -5], [-8, -6, -1, -5, -3], [-8, -6, -1, -3, -5], [-8, -1, -5, -3, -6], [-8, -1, -5, -6, -3], [-8, -1, -3, -5, -6], [-8, -1, -3, -6, -5], [-8, -1, -6, -5, -3], [-8, -1, -6, -3, -5], [-6, -5, -3, -8, -1], [-6, -5, -3, -1, -8], [-6, -5, -8, -3, -1], [-6, -5, -8, -1, -3], [-6, -5, -1, -3, -8], [-6, -5, -1, -8, -3], [-6, -3, -5, -8, -1], [-6, -3, -5, -1, -8], [-6, -3, -8, -5, -1], [-6, -3, -8, -1, -5], [-6, -3, -1, -5, -8], [-6, -3, -1, -8, -5], [-6, -8, -5, -3, -1], [-6, -8, -5, -1, -3], [-6, -8, -3, -5, -1], [-6, -8, -3, -1, -5], [-6, -8, -1, -5, -3], [-6, -8, -1, -3, -5], [-6, -1, -5, -3, -8], [-6, -1, -5, -8, -3], [-6, -1, -3, -5, -8], [-6, -1, -3, -8, -5], [-6, -1, -8, -5, -3], [-6, -1, -8, -3, -5], [-1, -5, -3, -8, -6], [-1, -5, -3, -6, -8], [-1, -5, -8, -3, -6], [-1, -5, -8, -6, -3], [-1, -5, -6, -3, -8], [-1, -5, -6, -8, -3], [-1, -3, -5, -8, -6], [-1, -3, -5, -6, -8], [-1, -3, -8, -5, -6], [-1, -3, -8, -6, -5], [-1, -3, -6, -5, -8], [-1, -3, -6, -8, -5], [-1, -8, -5, -3, -6], [-1, -8, -5, -6, -3], [-1, -8, -3, -5, -6], [-1, -8, -3, -6, -5], [-1, -8, -6, -5, -3], [-1, -8, -6, -3, -5], [-1, -6, -5, -3, -8], [-1, -6, -5, -8, -3], [-1, -6, -3, -5, -8], [-1, -6, -3, -8, -5], [-1, -6, -8, -5, -3], [-1, -6, -8, -3, -5]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5]), [[-1, -2, -3, -4, -5], [-1, -2, -3, -5, -4], [-1, -2, -4, -3, -5], [-1, -2, -4, -5, -3], [-1, -2, -5, -3, -4], [-1, -2, -5, -4, -3], [-1, -3, -2, -4, -5], [-1, -3, -2, -5, -4], [-1, -3, -4, -2, -5], [-1, -3, -4, -5, -2], [-1, -3, -5, -2, -4], [-1, -3, -5, -4, -2], [-1, -4, -2, -3, -5], [-1, -4, -2, -5, -3], [-1, -4, -3, -2, -5], [-1, -4, -3, -5, -2], [-1, -4, -5, -2, -3], [-1, -4, -5, -3, -2], [-1, -5, -2, -3, -4], [-1, -5, -2, -4, -3], [-1, -5, -3, -2, -4], [-1, -5, -3, -4, -2], [-1, -5, -4, -2, -3], [-1, -5, -4, -3, -2], [-2, -1, -3, -4, -5], [-2, -1, -3, -5, -4], [-2, -1, -4, -3, -5], [-2, -1, -4, -5, -3], [-2, -1, -5, -3, -4], [-2, -1, -5, -4, -3], [-2, -3, -1, -4, -5], [-2, -3, -1, -5, -4], [-2, -3, -4, -1, -5], [-2, -3, -4, -5, -1], [-2, -3, -5, -1, -4], [-2, -3, -5, -4, -1], [-2, -4, -1, -3, -5], [-2, -4, -1, -5, -3], [-2, -4, -3, -1, -5], [-2, -4, -3, -5, -1], [-2, -4, -5, -1, -3], [-2, -4, -5, -3, -1], [-2, -5, -1, -3, -4], [-2, -5, -1, -4, -3], [-2, -5, -3, -1, -4], [-2, -5, -3, -4, -1], [-2, -5, -4, -1, -3], [-2, -5, -4, -3, -1], [-3, -1, -2, -4, -5], [-3, -1, -2, -5, -4], [-3, -1, -4, -2, -5], [-3, -1, -4, -5, -2], [-3, -1, -5, -2, -4], [-3, -1, -5, -4, -2], [-3, -2, -1, -4, -5], [-3, -2, -1, -5, -4], [-3, -2, -4, -1, -5], [-3, -2, -4, -5, -1], [-3, -2, -5, -1, -4], [-3, -2, -5, -4, -1], [-3, -4, -1, -2, -5], [-3, -4, -1, -5, -2], [-3, -4, -2, -1, -5], [-3, -4, -2, -5, -1], [-3, -4, -5, -1, -2], [-3, -4, -5, -2, -1], [-3, -5, -1, -2, -4], [-3, -5, -1, -4, -2], [-3, -5, -2, -1, -4], [-3, -5, -2, -4, -1], [-3, -5, -4, -1, -2], [-3, -5, -4, -2, -1], [-4, -1, -2, -3, -5], [-4, -1, -2, -5, -3], [-4, -1, -3, -2, -5], [-4, -1, -3, -5, -2], [-4, -1, -5, -2, -3], [-4, -1, -5, -3, -2], [-4, -2, -1, -3, -5], [-4, -2, -1, -5, -3], [-4, -2, -3, -1, -5], [-4, -2, -3, -5, -1], [-4, -2, -5, -1, -3], [-4, -2, -5, -3, -1], [-4, -3, -1, -2, -5], [-4, -3, -1, -5, -2], [-4, -3, -2, -1, -5], [-4, -3, -2, -5, -1], [-4, -3, -5, -1, -2], [-4, -3, -5, -2, -1], [-4, -5, -1, -2, -3], [-4, -5, -1, -3, -2], [-4, -5, -2, -1, -3], [-4, -5, -2, -3, -1], [-4, -5, -3, -1, -2], [-4, -5, -3, -2, -1], [-5, -1, -2, -3, -4], [-5, -1, -2, -4, -3], [-5, -1, -3, -2, -4], [-5, -1, -3, -4, -2], [-5, -1, -4, -2, -3], [-5, -1, -4, -3, -2], [-5, -2, -1, -3, -4], [-5, -2, -1, -4, -3], [-5, -2, -3, -1, -4], [-5, -2, -3, -4, -1], [-5, -2, -4, -1, -3], [-5, -2, -4, -3, -1], [-5, -3, -1, -2, -4], [-5, -3, -1, -4, -2], [-5, -3, -2, -1, -4], [-5, -3, -2, -4, -1], [-5, -3, -4, -1, -2], [-5, -3, -4, -2, -1], [-5, -4, -1, -2, -3], [-5, -4, -1, -3, -2], [-5, -4, -2, -1, -3], [-5, -4, -2, -3, -1], [-5, -4, -3, -1, -2], [-5, -4, -3, -2, -1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[1, 2, 3, 4], [1, 2, 4, 3], [1, 3, 2, 4], [1, 3, 4, 2], [1, 4, 2, 3], [1, 4, 3, 2], [2, 1, 3, 4], [2, 1, 4, 3], [2, 3, 1, 4], [2, 3, 4, 1], [2, 4, 1, 3], [2, 4, 3, 1], [3, 1, 2, 4], [3, 1, 4, 2], [3, 2, 1, 4], [3, 2, 4, 1], [3, 4, 1, 2], [3, 4, 2, 1], [4, 1, 2, 3], [4, 1, 3, 2], [4, 2, 1, 3], [4, 2, 3, 1], [4, 3, 1, 2], [4, 3, 2, 1]])\n assert answers_match(candidate(nums=[7, 8, 9, 10]), [[7, 8, 9, 10], [7, 8, 10, 9], [7, 9, 8, 10], [7, 9, 10, 8], [7, 10, 8, 9], [7, 10, 9, 8], [8, 7, 9, 10], [8, 7, 10, 9], [8, 9, 7, 10], [8, 9, 10, 7], [8, 10, 7, 9], [8, 10, 9, 7], [9, 7, 8, 10], [9, 7, 10, 8], [9, 8, 7, 10], [9, 8, 10, 7], [9, 10, 7, 8], [9, 10, 8, 7], [10, 7, 8, 9], [10, 7, 9, 8], [10, 8, 7, 9], [10, 8, 9, 7], [10, 9, 7, 8], [10, 9, 8, 7]])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9]), [[1, 3, 5, 7, 9], [1, 3, 5, 9, 7], [1, 3, 7, 5, 9], [1, 3, 7, 9, 5], [1, 3, 9, 5, 7], [1, 3, 9, 7, 5], [1, 5, 3, 7, 9], [1, 5, 3, 9, 7], [1, 5, 7, 3, 9], [1, 5, 7, 9, 3], [1, 5, 9, 3, 7], [1, 5, 9, 7, 3], [1, 7, 3, 5, 9], [1, 7, 3, 9, 5], [1, 7, 5, 3, 9], [1, 7, 5, 9, 3], [1, 7, 9, 3, 5], [1, 7, 9, 5, 3], [1, 9, 3, 5, 7], [1, 9, 3, 7, 5], [1, 9, 5, 3, 7], [1, 9, 5, 7, 3], [1, 9, 7, 3, 5], [1, 9, 7, 5, 3], [3, 1, 5, 7, 9], [3, 1, 5, 9, 7], [3, 1, 7, 5, 9], [3, 1, 7, 9, 5], [3, 1, 9, 5, 7], [3, 1, 9, 7, 5], [3, 5, 1, 7, 9], [3, 5, 1, 9, 7], [3, 5, 7, 1, 9], [3, 5, 7, 9, 1], [3, 5, 9, 1, 7], [3, 5, 9, 7, 1], [3, 7, 1, 5, 9], [3, 7, 1, 9, 5], [3, 7, 5, 1, 9], [3, 7, 5, 9, 1], [3, 7, 9, 1, 5], [3, 7, 9, 5, 1], [3, 9, 1, 5, 7], [3, 9, 1, 7, 5], [3, 9, 5, 1, 7], [3, 9, 5, 7, 1], [3, 9, 7, 1, 5], [3, 9, 7, 5, 1], [5, 1, 3, 7, 9], [5, 1, 3, 9, 7], [5, 1, 7, 3, 9], [5, 1, 7, 9, 3], [5, 1, 9, 3, 7], [5, 1, 9, 7, 3], [5, 3, 1, 7, 9], [5, 3, 1, 9, 7], [5, 3, 7, 1, 9], [5, 3, 7, 9, 1], [5, 3, 9, 1, 7], [5, 3, 9, 7, 1], [5, 7, 1, 3, 9], [5, 7, 1, 9, 3], [5, 7, 3, 1, 9], [5, 7, 3, 9, 1], [5, 7, 9, 1, 3], [5, 7, 9, 3, 1], [5, 9, 1, 3, 7], [5, 9, 1, 7, 3], [5, 9, 3, 1, 7], [5, 9, 3, 7, 1], [5, 9, 7, 1, 3], [5, 9, 7, 3, 1], [7, 1, 3, 5, 9], [7, 1, 3, 9, 5], [7, 1, 5, 3, 9], [7, 1, 5, 9, 3], [7, 1, 9, 3, 5], [7, 1, 9, 5, 3], [7, 3, 1, 5, 9], [7, 3, 1, 9, 5], [7, 3, 5, 1, 9], [7, 3, 5, 9, 1], [7, 3, 9, 1, 5], [7, 3, 9, 5, 1], [7, 5, 1, 3, 9], [7, 5, 1, 9, 3], [7, 5, 3, 1, 9], [7, 5, 3, 9, 1], [7, 5, 9, 1, 3], [7, 5, 9, 3, 1], [7, 9, 1, 3, 5], [7, 9, 1, 5, 3], [7, 9, 3, 1, 5], [7, 9, 3, 5, 1], [7, 9, 5, 1, 3], [7, 9, 5, 3, 1], [9, 1, 3, 5, 7], [9, 1, 3, 7, 5], [9, 1, 5, 3, 7], [9, 1, 5, 7, 3], [9, 1, 7, 3, 5], [9, 1, 7, 5, 3], [9, 3, 1, 5, 7], [9, 3, 1, 7, 5], [9, 3, 5, 1, 7], [9, 3, 5, 7, 1], [9, 3, 7, 1, 5], [9, 3, 7, 5, 1], [9, 5, 1, 3, 7], [9, 5, 1, 7, 3], [9, 5, 3, 1, 7], [9, 5, 3, 7, 1], [9, 5, 7, 1, 3], [9, 5, 7, 3, 1], [9, 7, 1, 3, 5], [9, 7, 1, 5, 3], [9, 7, 3, 1, 5], [9, 7, 3, 5, 1], [9, 7, 5, 1, 3], [9, 7, 5, 3, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6]), [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 6, 5], [1, 2, 3, 5, 4, 6], [1, 2, 3, 5, 6, 4], [1, 2, 3, 6, 4, 5], [1, 2, 3, 6, 5, 4], [1, 2, 4, 3, 5, 6], [1, 2, 4, 3, 6, 5], [1, 2, 4, 5, 3, 6], [1, 2, 4, 5, 6, 3], [1, 2, 4, 6, 3, 5], [1, 2, 4, 6, 5, 3], [1, 2, 5, 3, 4, 6], [1, 2, 5, 3, 6, 4], [1, 2, 5, 4, 3, 6], [1, 2, 5, 4, 6, 3], [1, 2, 5, 6, 3, 4], [1, 2, 5, 6, 4, 3], [1, 2, 6, 3, 4, 5], [1, 2, 6, 3, 5, 4], [1, 2, 6, 4, 3, 5], [1, 2, 6, 4, 5, 3], [1, 2, 6, 5, 3, 4], [1, 2, 6, 5, 4, 3], [1, 3, 2, 4, 5, 6], [1, 3, 2, 4, 6, 5], [1, 3, 2, 5, 4, 6], [1, 3, 2, 5, 6, 4], [1, 3, 2, 6, 4, 5], [1, 3, 2, 6, 5, 4], [1, 3, 4, 2, 5, 6], [1, 3, 4, 2, 6, 5], [1, 3, 4, 5, 2, 6], [1, 3, 4, 5, 6, 2], [1, 3, 4, 6, 2, 5], [1, 3, 4, 6, 5, 2], [1, 3, 5, 2, 4, 6], [1, 3, 5, 2, 6, 4], [1, 3, 5, 4, 2, 6], [1, 3, 5, 4, 6, 2], [1, 3, 5, 6, 2, 4], [1, 3, 5, 6, 4, 2], [1, 3, 6, 2, 4, 5], [1, 3, 6, 2, 5, 4], [1, 3, 6, 4, 2, 5], [1, 3, 6, 4, 5, 2], [1, 3, 6, 5, 2, 4], [1, 3, 6, 5, 4, 2], [1, 4, 2, 3, 5, 6], [1, 4, 2, 3, 6, 5], [1, 4, 2, 5, 3, 6], [1, 4, 2, 5, 6, 3], [1, 4, 2, 6, 3, 5], [1, 4, 2, 6, 5, 3], [1, 4, 3, 2, 5, 6], [1, 4, 3, 2, 6, 5], [1, 4, 3, 5, 2, 6], [1, 4, 3, 5, 6, 2], [1, 4, 3, 6, 2, 5], [1, 4, 3, 6, 5, 2], [1, 4, 5, 2, 3, 6], [1, 4, 5, 2, 6, 3], [1, 4, 5, 3, 2, 6], [1, 4, 5, 3, 6, 2], [1, 4, 5, 6, 2, 3], [1, 4, 5, 6, 3, 2], [1, 4, 6, 2, 3, 5], [1, 4, 6, 2, 5, 3], [1, 4, 6, 3, 2, 5], [1, 4, 6, 3, 5, 2], [1, 4, 6, 5, 2, 3], [1, 4, 6, 5, 3, 2], [1, 5, 2, 3, 4, 6], [1, 5, 2, 3, 6, 4], [1, 5, 2, 4, 3, 6], [1, 5, 2, 4, 6, 3], [1, 5, 2, 6, 3, 4], [1, 5, 2, 6, 4, 3], [1, 5, 3, 2, 4, 6], [1, 5, 3, 2, 6, 4], [1, 5, 3, 4, 2, 6], [1, 5, 3, 4, 6, 2], [1, 5, 3, 6, 2, 4], [1, 5, 3, 6, 4, 2], [1, 5, 4, 2, 3, 6], [1, 5, 4, 2, 6, 3], [1, 5, 4, 3, 2, 6], [1, 5, 4, 3, 6, 2], [1, 5, 4, 6, 2, 3], [1, 5, 4, 6, 3, 2], [1, 5, 6, 2, 3, 4], [1, 5, 6, 2, 4, 3], [1, 5, 6, 3, 2, 4], [1, 5, 6, 3, 4, 2], [1, 5, 6, 4, 2, 3], [1, 5, 6, 4, 3, 2], [1, 6, 2, 3, 4, 5], [1, 6, 2, 3, 5, 4], [1, 6, 2, 4, 3, 5], [1, 6, 2, 4, 5, 3], [1, 6, 2, 5, 3, 4], [1, 6, 2, 5, 4, 3], [1, 6, 3, 2, 4, 5], [1, 6, 3, 2, 5, 4], [1, 6, 3, 4, 2, 5], [1, 6, 3, 4, 5, 2], [1, 6, 3, 5, 2, 4], [1, 6, 3, 5, 4, 2], [1, 6, 4, 2, 3, 5], [1, 6, 4, 2, 5, 3], [1, 6, 4, 3, 2, 5], [1, 6, 4, 3, 5, 2], [1, 6, 4, 5, 2, 3], [1, 6, 4, 5, 3, 2], [1, 6, 5, 2, 3, 4], [1, 6, 5, 2, 4, 3], [1, 6, 5, 3, 2, 4], [1, 6, 5, 3, 4, 2], [1, 6, 5, 4, 2, 3], [1, 6, 5, 4, 3, 2], [2, 1, 3, 4, 5, 6], [2, 1, 3, 4, 6, 5], [2, 1, 3, 5, 4, 6], [2, 1, 3, 5, 6, 4], [2, 1, 3, 6, 4, 5], [2, 1, 3, 6, 5, 4], [2, 1, 4, 3, 5, 6], [2, 1, 4, 3, 6, 5], [2, 1, 4, 5, 3, 6], [2, 1, 4, 5, 6, 3], [2, 1, 4, 6, 3, 5], [2, 1, 4, 6, 5, 3], [2, 1, 5, 3, 4, 6], [2, 1, 5, 3, 6, 4], [2, 1, 5, 4, 3, 6], [2, 1, 5, 4, 6, 3], [2, 1, 5, 6, 3, 4], [2, 1, 5, 6, 4, 3], [2, 1, 6, 3, 4, 5], [2, 1, 6, 3, 5, 4], [2, 1, 6, 4, 3, 5], [2, 1, 6, 4, 5, 3], [2, 1, 6, 5, 3, 4], [2, 1, 6, 5, 4, 3], [2, 3, 1, 4, 5, 6], [2, 3, 1, 4, 6, 5], [2, 3, 1, 5, 4, 6], [2, 3, 1, 5, 6, 4], [2, 3, 1, 6, 4, 5], [2, 3, 1, 6, 5, 4], [2, 3, 4, 1, 5, 6], [2, 3, 4, 1, 6, 5], [2, 3, 4, 5, 1, 6], [2, 3, 4, 5, 6, 1], [2, 3, 4, 6, 1, 5], [2, 3, 4, 6, 5, 1], [2, 3, 5, 1, 4, 6], [2, 3, 5, 1, 6, 4], [2, 3, 5, 4, 1, 6], [2, 3, 5, 4, 6, 1], [2, 3, 5, 6, 1, 4], [2, 3, 5, 6, 4, 1], [2, 3, 6, 1, 4, 5], [2, 3, 6, 1, 5, 4], [2, 3, 6, 4, 1, 5], [2, 3, 6, 4, 5, 1], [2, 3, 6, 5, 1, 4], [2, 3, 6, 5, 4, 1], [2, 4, 1, 3, 5, 6], [2, 4, 1, 3, 6, 5], [2, 4, 1, 5, 3, 6], [2, 4, 1, 5, 6, 3], [2, 4, 1, 6, 3, 5], [2, 4, 1, 6, 5, 3], [2, 4, 3, 1, 5, 6], [2, 4, 3, 1, 6, 5], [2, 4, 3, 5, 1, 6], [2, 4, 3, 5, 6, 1], [2, 4, 3, 6, 1, 5], [2, 4, 3, 6, 5, 1], [2, 4, 5, 1, 3, 6], [2, 4, 5, 1, 6, 3], [2, 4, 5, 3, 1, 6], [2, 4, 5, 3, 6, 1], [2, 4, 5, 6, 1, 3], [2, 4, 5, 6, 3, 1], [2, 4, 6, 1, 3, 5], [2, 4, 6, 1, 5, 3], [2, 4, 6, 3, 1, 5], [2, 4, 6, 3, 5, 1], [2, 4, 6, 5, 1, 3], [2, 4, 6, 5, 3, 1], [2, 5, 1, 3, 4, 6], [2, 5, 1, 3, 6, 4], [2, 5, 1, 4, 3, 6], [2, 5, 1, 4, 6, 3], [2, 5, 1, 6, 3, 4], [2, 5, 1, 6, 4, 3], [2, 5, 3, 1, 4, 6], [2, 5, 3, 1, 6, 4], [2, 5, 3, 4, 1, 6], [2, 5, 3, 4, 6, 1], [2, 5, 3, 6, 1, 4], [2, 5, 3, 6, 4, 1], [2, 5, 4, 1, 3, 6], [2, 5, 4, 1, 6, 3], [2, 5, 4, 3, 1, 6], [2, 5, 4, 3, 6, 1], [2, 5, 4, 6, 1, 3], [2, 5, 4, 6, 3, 1], [2, 5, 6, 1, 3, 4], [2, 5, 6, 1, 4, 3], [2, 5, 6, 3, 1, 4], [2, 5, 6, 3, 4, 1], [2, 5, 6, 4, 1, 3], [2, 5, 6, 4, 3, 1], [2, 6, 1, 3, 4, 5], [2, 6, 1, 3, 5, 4], [2, 6, 1, 4, 3, 5], [2, 6, 1, 4, 5, 3], [2, 6, 1, 5, 3, 4], [2, 6, 1, 5, 4, 3], [2, 6, 3, 1, 4, 5], [2, 6, 3, 1, 5, 4], [2, 6, 3, 4, 1, 5], [2, 6, 3, 4, 5, 1], [2, 6, 3, 5, 1, 4], [2, 6, 3, 5, 4, 1], [2, 6, 4, 1, 3, 5], [2, 6, 4, 1, 5, 3], [2, 6, 4, 3, 1, 5], [2, 6, 4, 3, 5, 1], [2, 6, 4, 5, 1, 3], [2, 6, 4, 5, 3, 1], [2, 6, 5, 1, 3, 4], [2, 6, 5, 1, 4, 3], [2, 6, 5, 3, 1, 4], [2, 6, 5, 3, 4, 1], [2, 6, 5, 4, 1, 3], [2, 6, 5, 4, 3, 1], [3, 1, 2, 4, 5, 6], [3, 1, 2, 4, 6, 5], [3, 1, 2, 5, 4, 6], [3, 1, 2, 5, 6, 4], [3, 1, 2, 6, 4, 5], [3, 1, 2, 6, 5, 4], [3, 1, 4, 2, 5, 6], [3, 1, 4, 2, 6, 5], [3, 1, 4, 5, 2, 6], [3, 1, 4, 5, 6, 2], [3, 1, 4, 6, 2, 5], [3, 1, 4, 6, 5, 2], [3, 1, 5, 2, 4, 6], [3, 1, 5, 2, 6, 4], [3, 1, 5, 4, 2, 6], [3, 1, 5, 4, 6, 2], [3, 1, 5, 6, 2, 4], [3, 1, 5, 6, 4, 2], [3, 1, 6, 2, 4, 5], [3, 1, 6, 2, 5, 4], [3, 1, 6, 4, 2, 5], [3, 1, 6, 4, 5, 2], [3, 1, 6, 5, 2, 4], [3, 1, 6, 5, 4, 2], [3, 2, 1, 4, 5, 6], [3, 2, 1, 4, 6, 5], [3, 2, 1, 5, 4, 6], [3, 2, 1, 5, 6, 4], [3, 2, 1, 6, 4, 5], [3, 2, 1, 6, 5, 4], [3, 2, 4, 1, 5, 6], [3, 2, 4, 1, 6, 5], [3, 2, 4, 5, 1, 6], [3, 2, 4, 5, 6, 1], [3, 2, 4, 6, 1, 5], [3, 2, 4, 6, 5, 1], [3, 2, 5, 1, 4, 6], [3, 2, 5, 1, 6, 4], [3, 2, 5, 4, 1, 6], [3, 2, 5, 4, 6, 1], [3, 2, 5, 6, 1, 4], [3, 2, 5, 6, 4, 1], [3, 2, 6, 1, 4, 5], [3, 2, 6, 1, 5, 4], [3, 2, 6, 4, 1, 5], [3, 2, 6, 4, 5, 1], [3, 2, 6, 5, 1, 4], [3, 2, 6, 5, 4, 1], [3, 4, 1, 2, 5, 6], [3, 4, 1, 2, 6, 5], [3, 4, 1, 5, 2, 6], [3, 4, 1, 5, 6, 2], [3, 4, 1, 6, 2, 5], [3, 4, 1, 6, 5, 2], [3, 4, 2, 1, 5, 6], [3, 4, 2, 1, 6, 5], [3, 4, 2, 5, 1, 6], [3, 4, 2, 5, 6, 1], [3, 4, 2, 6, 1, 5], [3, 4, 2, 6, 5, 1], [3, 4, 5, 1, 2, 6], [3, 4, 5, 1, 6, 2], [3, 4, 5, 2, 1, 6], [3, 4, 5, 2, 6, 1], [3, 4, 5, 6, 1, 2], [3, 4, 5, 6, 2, 1], [3, 4, 6, 1, 2, 5], [3, 4, 6, 1, 5, 2], [3, 4, 6, 2, 1, 5], [3, 4, 6, 2, 5, 1], [3, 4, 6, 5, 1, 2], [3, 4, 6, 5, 2, 1], [3, 5, 1, 2, 4, 6], [3, 5, 1, 2, 6, 4], [3, 5, 1, 4, 2, 6], [3, 5, 1, 4, 6, 2], [3, 5, 1, 6, 2, 4], [3, 5, 1, 6, 4, 2], [3, 5, 2, 1, 4, 6], [3, 5, 2, 1, 6, 4], [3, 5, 2, 4, 1, 6], [3, 5, 2, 4, 6, 1], [3, 5, 2, 6, 1, 4], [3, 5, 2, 6, 4, 1], [3, 5, 4, 1, 2, 6], [3, 5, 4, 1, 6, 2], [3, 5, 4, 2, 1, 6], [3, 5, 4, 2, 6, 1], [3, 5, 4, 6, 1, 2], [3, 5, 4, 6, 2, 1], [3, 5, 6, 1, 2, 4], [3, 5, 6, 1, 4, 2], [3, 5, 6, 2, 1, 4], [3, 5, 6, 2, 4, 1], [3, 5, 6, 4, 1, 2], [3, 5, 6, 4, 2, 1], [3, 6, 1, 2, 4, 5], [3, 6, 1, 2, 5, 4], [3, 6, 1, 4, 2, 5], [3, 6, 1, 4, 5, 2], [3, 6, 1, 5, 2, 4], [3, 6, 1, 5, 4, 2], [3, 6, 2, 1, 4, 5], [3, 6, 2, 1, 5, 4], [3, 6, 2, 4, 1, 5], [3, 6, 2, 4, 5, 1], [3, 6, 2, 5, 1, 4], [3, 6, 2, 5, 4, 1], [3, 6, 4, 1, 2, 5], [3, 6, 4, 1, 5, 2], [3, 6, 4, 2, 1, 5], [3, 6, 4, 2, 5, 1], [3, 6, 4, 5, 1, 2], [3, 6, 4, 5, 2, 1], [3, 6, 5, 1, 2, 4], [3, 6, 5, 1, 4, 2], [3, 6, 5, 2, 1, 4], [3, 6, 5, 2, 4, 1], [3, 6, 5, 4, 1, 2], [3, 6, 5, 4, 2, 1], [4, 1, 2, 3, 5, 6], [4, 1, 2, 3, 6, 5], [4, 1, 2, 5, 3, 6], [4, 1, 2, 5, 6, 3], [4, 1, 2, 6, 3, 5], [4, 1, 2, 6, 5, 3], [4, 1, 3, 2, 5, 6], [4, 1, 3, 2, 6, 5], [4, 1, 3, 5, 2, 6], [4, 1, 3, 5, 6, 2], [4, 1, 3, 6, 2, 5], [4, 1, 3, 6, 5, 2], [4, 1, 5, 2, 3, 6], [4, 1, 5, 2, 6, 3], [4, 1, 5, 3, 2, 6], [4, 1, 5, 3, 6, 2], [4, 1, 5, 6, 2, 3], [4, 1, 5, 6, 3, 2], [4, 1, 6, 2, 3, 5], [4, 1, 6, 2, 5, 3], [4, 1, 6, 3, 2, 5], [4, 1, 6, 3, 5, 2], [4, 1, 6, 5, 2, 3], [4, 1, 6, 5, 3, 2], [4, 2, 1, 3, 5, 6], [4, 2, 1, 3, 6, 5], [4, 2, 1, 5, 3, 6], [4, 2, 1, 5, 6, 3], [4, 2, 1, 6, 3, 5], [4, 2, 1, 6, 5, 3], [4, 2, 3, 1, 5, 6], [4, 2, 3, 1, 6, 5], [4, 2, 3, 5, 1, 6], [4, 2, 3, 5, 6, 1], [4, 2, 3, 6, 1, 5], [4, 2, 3, 6, 5, 1], [4, 2, 5, 1, 3, 6], [4, 2, 5, 1, 6, 3], [4, 2, 5, 3, 1, 6], [4, 2, 5, 3, 6, 1], [4, 2, 5, 6, 1, 3], [4, 2, 5, 6, 3, 1], [4, 2, 6, 1, 3, 5], [4, 2, 6, 1, 5, 3], [4, 2, 6, 3, 1, 5], [4, 2, 6, 3, 5, 1], [4, 2, 6, 5, 1, 3], [4, 2, 6, 5, 3, 1], [4, 3, 1, 2, 5, 6], [4, 3, 1, 2, 6, 5], [4, 3, 1, 5, 2, 6], [4, 3, 1, 5, 6, 2], [4, 3, 1, 6, 2, 5], [4, 3, 1, 6, 5, 2], [4, 3, 2, 1, 5, 6], [4, 3, 2, 1, 6, 5], [4, 3, 2, 5, 1, 6], [4, 3, 2, 5, 6, 1], [4, 3, 2, 6, 1, 5], [4, 3, 2, 6, 5, 1], [4, 3, 5, 1, 2, 6], [4, 3, 5, 1, 6, 2], [4, 3, 5, 2, 1, 6], [4, 3, 5, 2, 6, 1], [4, 3, 5, 6, 1, 2], [4, 3, 5, 6, 2, 1], [4, 3, 6, 1, 2, 5], [4, 3, 6, 1, 5, 2], [4, 3, 6, 2, 1, 5], [4, 3, 6, 2, 5, 1], [4, 3, 6, 5, 1, 2], [4, 3, 6, 5, 2, 1], [4, 5, 1, 2, 3, 6], [4, 5, 1, 2, 6, 3], [4, 5, 1, 3, 2, 6], [4, 5, 1, 3, 6, 2], [4, 5, 1, 6, 2, 3], [4, 5, 1, 6, 3, 2], [4, 5, 2, 1, 3, 6], [4, 5, 2, 1, 6, 3], [4, 5, 2, 3, 1, 6], [4, 5, 2, 3, 6, 1], [4, 5, 2, 6, 1, 3], [4, 5, 2, 6, 3, 1], [4, 5, 3, 1, 2, 6], [4, 5, 3, 1, 6, 2], [4, 5, 3, 2, 1, 6], [4, 5, 3, 2, 6, 1], [4, 5, 3, 6, 1, 2], [4, 5, 3, 6, 2, 1], [4, 5, 6, 1, 2, 3], [4, 5, 6, 1, 3, 2], [4, 5, 6, 2, 1, 3], [4, 5, 6, 2, 3, 1], [4, 5, 6, 3, 1, 2], [4, 5, 6, 3, 2, 1], [4, 6, 1, 2, 3, 5], [4, 6, 1, 2, 5, 3], [4, 6, 1, 3, 2, 5], [4, 6, 1, 3, 5, 2], [4, 6, 1, 5, 2, 3], [4, 6, 1, 5, 3, 2], [4, 6, 2, 1, 3, 5], [4, 6, 2, 1, 5, 3], [4, 6, 2, 3, 1, 5], [4, 6, 2, 3, 5, 1], [4, 6, 2, 5, 1, 3], [4, 6, 2, 5, 3, 1], [4, 6, 3, 1, 2, 5], [4, 6, 3, 1, 5, 2], [4, 6, 3, 2, 1, 5], [4, 6, 3, 2, 5, 1], [4, 6, 3, 5, 1, 2], [4, 6, 3, 5, 2, 1], [4, 6, 5, 1, 2, 3], [4, 6, 5, 1, 3, 2], [4, 6, 5, 2, 1, 3], [4, 6, 5, 2, 3, 1], [4, 6, 5, 3, 1, 2], [4, 6, 5, 3, 2, 1], [5, 1, 2, 3, 4, 6], [5, 1, 2, 3, 6, 4], [5, 1, 2, 4, 3, 6], [5, 1, 2, 4, 6, 3], [5, 1, 2, 6, 3, 4], [5, 1, 2, 6, 4, 3], [5, 1, 3, 2, 4, 6], [5, 1, 3, 2, 6, 4], [5, 1, 3, 4, 2, 6], [5, 1, 3, 4, 6, 2], [5, 1, 3, 6, 2, 4], [5, 1, 3, 6, 4, 2], [5, 1, 4, 2, 3, 6], [5, 1, 4, 2, 6, 3], [5, 1, 4, 3, 2, 6], [5, 1, 4, 3, 6, 2], [5, 1, 4, 6, 2, 3], [5, 1, 4, 6, 3, 2], [5, 1, 6, 2, 3, 4], [5, 1, 6, 2, 4, 3], [5, 1, 6, 3, 2, 4], [5, 1, 6, 3, 4, 2], [5, 1, 6, 4, 2, 3], [5, 1, 6, 4, 3, 2], [5, 2, 1, 3, 4, 6], [5, 2, 1, 3, 6, 4], [5, 2, 1, 4, 3, 6], [5, 2, 1, 4, 6, 3], [5, 2, 1, 6, 3, 4], [5, 2, 1, 6, 4, 3], [5, 2, 3, 1, 4, 6], [5, 2, 3, 1, 6, 4], [5, 2, 3, 4, 1, 6], [5, 2, 3, 4, 6, 1], [5, 2, 3, 6, 1, 4], [5, 2, 3, 6, 4, 1], [5, 2, 4, 1, 3, 6], [5, 2, 4, 1, 6, 3], [5, 2, 4, 3, 1, 6], [5, 2, 4, 3, 6, 1], [5, 2, 4, 6, 1, 3], [5, 2, 4, 6, 3, 1], [5, 2, 6, 1, 3, 4], [5, 2, 6, 1, 4, 3], [5, 2, 6, 3, 1, 4], [5, 2, 6, 3, 4, 1], [5, 2, 6, 4, 1, 3], [5, 2, 6, 4, 3, 1], [5, 3, 1, 2, 4, 6], [5, 3, 1, 2, 6, 4], [5, 3, 1, 4, 2, 6], [5, 3, 1, 4, 6, 2], [5, 3, 1, 6, 2, 4], [5, 3, 1, 6, 4, 2], [5, 3, 2, 1, 4, 6], [5, 3, 2, 1, 6, 4], [5, 3, 2, 4, 1, 6], [5, 3, 2, 4, 6, 1], [5, 3, 2, 6, 1, 4], [5, 3, 2, 6, 4, 1], [5, 3, 4, 1, 2, 6], [5, 3, 4, 1, 6, 2], [5, 3, 4, 2, 1, 6], [5, 3, 4, 2, 6, 1], [5, 3, 4, 6, 1, 2], [5, 3, 4, 6, 2, 1], [5, 3, 6, 1, 2, 4], [5, 3, 6, 1, 4, 2], [5, 3, 6, 2, 1, 4], [5, 3, 6, 2, 4, 1], [5, 3, 6, 4, 1, 2], [5, 3, 6, 4, 2, 1], [5, 4, 1, 2, 3, 6], [5, 4, 1, 2, 6, 3], [5, 4, 1, 3, 2, 6], [5, 4, 1, 3, 6, 2], [5, 4, 1, 6, 2, 3], [5, 4, 1, 6, 3, 2], [5, 4, 2, 1, 3, 6], [5, 4, 2, 1, 6, 3], [5, 4, 2, 3, 1, 6], [5, 4, 2, 3, 6, 1], [5, 4, 2, 6, 1, 3], [5, 4, 2, 6, 3, 1], [5, 4, 3, 1, 2, 6], [5, 4, 3, 1, 6, 2], [5, 4, 3, 2, 1, 6], [5, 4, 3, 2, 6, 1], [5, 4, 3, 6, 1, 2], [5, 4, 3, 6, 2, 1], [5, 4, 6, 1, 2, 3], [5, 4, 6, 1, 3, 2], [5, 4, 6, 2, 1, 3], [5, 4, 6, 2, 3, 1], [5, 4, 6, 3, 1, 2], [5, 4, 6, 3, 2, 1], [5, 6, 1, 2, 3, 4], [5, 6, 1, 2, 4, 3], [5, 6, 1, 3, 2, 4], [5, 6, 1, 3, 4, 2], [5, 6, 1, 4, 2, 3], [5, 6, 1, 4, 3, 2], [5, 6, 2, 1, 3, 4], [5, 6, 2, 1, 4, 3], [5, 6, 2, 3, 1, 4], [5, 6, 2, 3, 4, 1], [5, 6, 2, 4, 1, 3], [5, 6, 2, 4, 3, 1], [5, 6, 3, 1, 2, 4], [5, 6, 3, 1, 4, 2], [5, 6, 3, 2, 1, 4], [5, 6, 3, 2, 4, 1], [5, 6, 3, 4, 1, 2], [5, 6, 3, 4, 2, 1], [5, 6, 4, 1, 2, 3], [5, 6, 4, 1, 3, 2], [5, 6, 4, 2, 1, 3], [5, 6, 4, 2, 3, 1], [5, 6, 4, 3, 1, 2], [5, 6, 4, 3, 2, 1], [6, 1, 2, 3, 4, 5], [6, 1, 2, 3, 5, 4], [6, 1, 2, 4, 3, 5], [6, 1, 2, 4, 5, 3], [6, 1, 2, 5, 3, 4], [6, 1, 2, 5, 4, 3], [6, 1, 3, 2, 4, 5], [6, 1, 3, 2, 5, 4], [6, 1, 3, 4, 2, 5], [6, 1, 3, 4, 5, 2], [6, 1, 3, 5, 2, 4], [6, 1, 3, 5, 4, 2], [6, 1, 4, 2, 3, 5], [6, 1, 4, 2, 5, 3], [6, 1, 4, 3, 2, 5], [6, 1, 4, 3, 5, 2], [6, 1, 4, 5, 2, 3], [6, 1, 4, 5, 3, 2], [6, 1, 5, 2, 3, 4], [6, 1, 5, 2, 4, 3], [6, 1, 5, 3, 2, 4], [6, 1, 5, 3, 4, 2], [6, 1, 5, 4, 2, 3], [6, 1, 5, 4, 3, 2], [6, 2, 1, 3, 4, 5], [6, 2, 1, 3, 5, 4], [6, 2, 1, 4, 3, 5], [6, 2, 1, 4, 5, 3], [6, 2, 1, 5, 3, 4], [6, 2, 1, 5, 4, 3], [6, 2, 3, 1, 4, 5], [6, 2, 3, 1, 5, 4], [6, 2, 3, 4, 1, 5], [6, 2, 3, 4, 5, 1], [6, 2, 3, 5, 1, 4], [6, 2, 3, 5, 4, 1], [6, 2, 4, 1, 3, 5], [6, 2, 4, 1, 5, 3], [6, 2, 4, 3, 1, 5], [6, 2, 4, 3, 5, 1], [6, 2, 4, 5, 1, 3], [6, 2, 4, 5, 3, 1], [6, 2, 5, 1, 3, 4], [6, 2, 5, 1, 4, 3], [6, 2, 5, 3, 1, 4], [6, 2, 5, 3, 4, 1], [6, 2, 5, 4, 1, 3], [6, 2, 5, 4, 3, 1], [6, 3, 1, 2, 4, 5], [6, 3, 1, 2, 5, 4], [6, 3, 1, 4, 2, 5], [6, 3, 1, 4, 5, 2], [6, 3, 1, 5, 2, 4], [6, 3, 1, 5, 4, 2], [6, 3, 2, 1, 4, 5], [6, 3, 2, 1, 5, 4], [6, 3, 2, 4, 1, 5], [6, 3, 2, 4, 5, 1], [6, 3, 2, 5, 1, 4], [6, 3, 2, 5, 4, 1], [6, 3, 4, 1, 2, 5], [6, 3, 4, 1, 5, 2], [6, 3, 4, 2, 1, 5], [6, 3, 4, 2, 5, 1], [6, 3, 4, 5, 1, 2], [6, 3, 4, 5, 2, 1], [6, 3, 5, 1, 2, 4], [6, 3, 5, 1, 4, 2], [6, 3, 5, 2, 1, 4], [6, 3, 5, 2, 4, 1], [6, 3, 5, 4, 1, 2], [6, 3, 5, 4, 2, 1], [6, 4, 1, 2, 3, 5], [6, 4, 1, 2, 5, 3], [6, 4, 1, 3, 2, 5], [6, 4, 1, 3, 5, 2], [6, 4, 1, 5, 2, 3], [6, 4, 1, 5, 3, 2], [6, 4, 2, 1, 3, 5], [6, 4, 2, 1, 5, 3], [6, 4, 2, 3, 1, 5], [6, 4, 2, 3, 5, 1], [6, 4, 2, 5, 1, 3], [6, 4, 2, 5, 3, 1], [6, 4, 3, 1, 2, 5], [6, 4, 3, 1, 5, 2], [6, 4, 3, 2, 1, 5], [6, 4, 3, 2, 5, 1], [6, 4, 3, 5, 1, 2], [6, 4, 3, 5, 2, 1], [6, 4, 5, 1, 2, 3], [6, 4, 5, 1, 3, 2], [6, 4, 5, 2, 1, 3], [6, 4, 5, 2, 3, 1], [6, 4, 5, 3, 1, 2], [6, 4, 5, 3, 2, 1], [6, 5, 1, 2, 3, 4], [6, 5, 1, 2, 4, 3], [6, 5, 1, 3, 2, 4], [6, 5, 1, 3, 4, 2], [6, 5, 1, 4, 2, 3], [6, 5, 1, 4, 3, 2], [6, 5, 2, 1, 3, 4], [6, 5, 2, 1, 4, 3], [6, 5, 2, 3, 1, 4], [6, 5, 2, 3, 4, 1], [6, 5, 2, 4, 1, 3], [6, 5, 2, 4, 3, 1], [6, 5, 3, 1, 2, 4], [6, 5, 3, 1, 4, 2], [6, 5, 3, 2, 1, 4], [6, 5, 3, 2, 4, 1], [6, 5, 3, 4, 1, 2], [6, 5, 3, 4, 2, 1], [6, 5, 4, 1, 2, 3], [6, 5, 4, 1, 3, 2], [6, 5, 4, 2, 1, 3], [6, 5, 4, 2, 3, 1], [6, 5, 4, 3, 1, 2], [6, 5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[-10, 0, 10, 5, -5]), [[-10, 0, 10, 5, -5], [-10, 0, 10, -5, 5], [-10, 0, 5, 10, -5], [-10, 0, 5, -5, 10], [-10, 0, -5, 10, 5], [-10, 0, -5, 5, 10], [-10, 10, 0, 5, -5], [-10, 10, 0, -5, 5], [-10, 10, 5, 0, -5], [-10, 10, 5, -5, 0], [-10, 10, -5, 0, 5], [-10, 10, -5, 5, 0], [-10, 5, 0, 10, -5], [-10, 5, 0, -5, 10], [-10, 5, 10, 0, -5], [-10, 5, 10, -5, 0], [-10, 5, -5, 0, 10], [-10, 5, -5, 10, 0], [-10, -5, 0, 10, 5], [-10, -5, 0, 5, 10], [-10, -5, 10, 0, 5], [-10, -5, 10, 5, 0], [-10, -5, 5, 0, 10], [-10, -5, 5, 10, 0], [0, -10, 10, 5, -5], [0, -10, 10, -5, 5], [0, -10, 5, 10, -5], [0, -10, 5, -5, 10], [0, -10, -5, 10, 5], [0, -10, -5, 5, 10], [0, 10, -10, 5, -5], [0, 10, -10, -5, 5], [0, 10, 5, -10, -5], [0, 10, 5, -5, -10], [0, 10, -5, -10, 5], [0, 10, -5, 5, -10], [0, 5, -10, 10, -5], [0, 5, -10, -5, 10], [0, 5, 10, -10, -5], [0, 5, 10, -5, -10], [0, 5, -5, -10, 10], [0, 5, -5, 10, -10], [0, -5, -10, 10, 5], [0, -5, -10, 5, 10], [0, -5, 10, -10, 5], [0, -5, 10, 5, -10], [0, -5, 5, -10, 10], [0, -5, 5, 10, -10], [10, -10, 0, 5, -5], [10, -10, 0, -5, 5], [10, -10, 5, 0, -5], [10, -10, 5, -5, 0], [10, -10, -5, 0, 5], [10, -10, -5, 5, 0], [10, 0, -10, 5, -5], [10, 0, -10, -5, 5], [10, 0, 5, -10, -5], [10, 0, 5, -5, -10], [10, 0, -5, -10, 5], [10, 0, -5, 5, -10], [10, 5, -10, 0, -5], [10, 5, -10, -5, 0], [10, 5, 0, -10, -5], [10, 5, 0, -5, -10], [10, 5, -5, -10, 0], [10, 5, -5, 0, -10], [10, -5, -10, 0, 5], [10, -5, -10, 5, 0], [10, -5, 0, -10, 5], [10, -5, 0, 5, -10], [10, -5, 5, -10, 0], [10, -5, 5, 0, -10], [5, -10, 0, 10, -5], [5, -10, 0, -5, 10], [5, -10, 10, 0, -5], [5, -10, 10, -5, 0], [5, -10, -5, 0, 10], [5, -10, -5, 10, 0], [5, 0, -10, 10, -5], [5, 0, -10, -5, 10], [5, 0, 10, -10, -5], [5, 0, 10, -5, -10], [5, 0, -5, -10, 10], [5, 0, -5, 10, -10], [5, 10, -10, 0, -5], [5, 10, -10, -5, 0], [5, 10, 0, -10, -5], [5, 10, 0, -5, -10], [5, 10, -5, -10, 0], [5, 10, -5, 0, -10], [5, -5, -10, 0, 10], [5, -5, -10, 10, 0], [5, -5, 0, -10, 10], [5, -5, 0, 10, -10], [5, -5, 10, -10, 0], [5, -5, 10, 0, -10], [-5, -10, 0, 10, 5], [-5, -10, 0, 5, 10], [-5, -10, 10, 0, 5], [-5, -10, 10, 5, 0], [-5, -10, 5, 0, 10], [-5, -10, 5, 10, 0], [-5, 0, -10, 10, 5], [-5, 0, -10, 5, 10], [-5, 0, 10, -10, 5], [-5, 0, 10, 5, -10], [-5, 0, 5, -10, 10], [-5, 0, 5, 10, -10], [-5, 10, -10, 0, 5], [-5, 10, -10, 5, 0], [-5, 10, 0, -10, 5], [-5, 10, 0, 5, -10], [-5, 10, 5, -10, 0], [-5, 10, 5, 0, -10], [-5, 5, -10, 0, 10], [-5, 5, -10, 10, 0], [-5, 5, 0, -10, 10], [-5, 5, 0, 10, -10], [-5, 5, 10, -10, 0], [-5, 5, 10, 0, -10]])\n assert answers_match(candidate(nums=[-1, 1, -2, 2, -3, 3]), [[-1, 1, -2, 2, -3, 3], [-1, 1, -2, 2, 3, -3], [-1, 1, -2, -3, 2, 3], [-1, 1, -2, -3, 3, 2], [-1, 1, -2, 3, 2, -3], [-1, 1, -2, 3, -3, 2], [-1, 1, 2, -2, -3, 3], [-1, 1, 2, -2, 3, -3], [-1, 1, 2, -3, -2, 3], [-1, 1, 2, -3, 3, -2], [-1, 1, 2, 3, -2, -3], [-1, 1, 2, 3, -3, -2], [-1, 1, -3, -2, 2, 3], [-1, 1, -3, -2, 3, 2], [-1, 1, -3, 2, -2, 3], [-1, 1, -3, 2, 3, -2], [-1, 1, -3, 3, -2, 2], [-1, 1, -3, 3, 2, -2], [-1, 1, 3, -2, 2, -3], [-1, 1, 3, -2, -3, 2], [-1, 1, 3, 2, -2, -3], [-1, 1, 3, 2, -3, -2], [-1, 1, 3, -3, -2, 2], [-1, 1, 3, -3, 2, -2], [-1, -2, 1, 2, -3, 3], [-1, -2, 1, 2, 3, -3], [-1, -2, 1, -3, 2, 3], [-1, -2, 1, -3, 3, 2], [-1, -2, 1, 3, 2, -3], [-1, -2, 1, 3, -3, 2], [-1, -2, 2, 1, -3, 3], [-1, -2, 2, 1, 3, -3], [-1, -2, 2, -3, 1, 3], [-1, -2, 2, -3, 3, 1], [-1, -2, 2, 3, 1, -3], [-1, -2, 2, 3, -3, 1], [-1, -2, -3, 1, 2, 3], [-1, -2, -3, 1, 3, 2], [-1, -2, -3, 2, 1, 3], [-1, -2, -3, 2, 3, 1], [-1, -2, -3, 3, 1, 2], [-1, -2, -3, 3, 2, 1], [-1, -2, 3, 1, 2, -3], [-1, -2, 3, 1, -3, 2], [-1, -2, 3, 2, 1, -3], [-1, -2, 3, 2, -3, 1], [-1, -2, 3, -3, 1, 2], [-1, -2, 3, -3, 2, 1], [-1, 2, 1, -2, -3, 3], [-1, 2, 1, -2, 3, -3], [-1, 2, 1, -3, -2, 3], [-1, 2, 1, -3, 3, -2], [-1, 2, 1, 3, -2, -3], [-1, 2, 1, 3, -3, -2], [-1, 2, -2, 1, -3, 3], [-1, 2, -2, 1, 3, -3], [-1, 2, -2, -3, 1, 3], [-1, 2, -2, -3, 3, 1], [-1, 2, -2, 3, 1, -3], [-1, 2, -2, 3, -3, 1], [-1, 2, -3, 1, -2, 3], [-1, 2, -3, 1, 3, -2], [-1, 2, -3, -2, 1, 3], [-1, 2, -3, -2, 3, 1], [-1, 2, -3, 3, 1, -2], [-1, 2, -3, 3, -2, 1], [-1, 2, 3, 1, -2, -3], [-1, 2, 3, 1, -3, -2], [-1, 2, 3, -2, 1, -3], [-1, 2, 3, -2, -3, 1], [-1, 2, 3, -3, 1, -2], [-1, 2, 3, -3, -2, 1], [-1, -3, 1, -2, 2, 3], [-1, -3, 1, -2, 3, 2], [-1, -3, 1, 2, -2, 3], [-1, -3, 1, 2, 3, -2], [-1, -3, 1, 3, -2, 2], [-1, -3, 1, 3, 2, -2], [-1, -3, -2, 1, 2, 3], [-1, -3, -2, 1, 3, 2], [-1, -3, -2, 2, 1, 3], [-1, -3, -2, 2, 3, 1], [-1, -3, -2, 3, 1, 2], [-1, -3, -2, 3, 2, 1], [-1, -3, 2, 1, -2, 3], [-1, -3, 2, 1, 3, -2], [-1, -3, 2, -2, 1, 3], [-1, -3, 2, -2, 3, 1], [-1, -3, 2, 3, 1, -2], [-1, -3, 2, 3, -2, 1], [-1, -3, 3, 1, -2, 2], [-1, -3, 3, 1, 2, -2], [-1, -3, 3, -2, 1, 2], [-1, -3, 3, -2, 2, 1], [-1, -3, 3, 2, 1, -2], [-1, -3, 3, 2, -2, 1], [-1, 3, 1, -2, 2, -3], [-1, 3, 1, -2, -3, 2], [-1, 3, 1, 2, -2, -3], [-1, 3, 1, 2, -3, -2], [-1, 3, 1, -3, -2, 2], [-1, 3, 1, -3, 2, -2], [-1, 3, -2, 1, 2, -3], [-1, 3, -2, 1, -3, 2], [-1, 3, -2, 2, 1, -3], [-1, 3, -2, 2, -3, 1], [-1, 3, -2, -3, 1, 2], [-1, 3, -2, -3, 2, 1], [-1, 3, 2, 1, -2, -3], [-1, 3, 2, 1, -3, -2], [-1, 3, 2, -2, 1, -3], [-1, 3, 2, -2, -3, 1], [-1, 3, 2, -3, 1, -2], [-1, 3, 2, -3, -2, 1], [-1, 3, -3, 1, -2, 2], [-1, 3, -3, 1, 2, -2], [-1, 3, -3, -2, 1, 2], [-1, 3, -3, -2, 2, 1], [-1, 3, -3, 2, 1, -2], [-1, 3, -3, 2, -2, 1], [1, -1, -2, 2, -3, 3], [1, -1, -2, 2, 3, -3], [1, -1, -2, -3, 2, 3], [1, -1, -2, -3, 3, 2], [1, -1, -2, 3, 2, -3], [1, -1, -2, 3, -3, 2], [1, -1, 2, -2, -3, 3], [1, -1, 2, -2, 3, -3], [1, -1, 2, -3, -2, 3], [1, -1, 2, -3, 3, -2], [1, -1, 2, 3, -2, -3], [1, -1, 2, 3, -3, -2], [1, -1, -3, -2, 2, 3], [1, -1, -3, -2, 3, 2], [1, -1, -3, 2, -2, 3], [1, -1, -3, 2, 3, -2], [1, -1, -3, 3, -2, 2], [1, -1, -3, 3, 2, -2], [1, -1, 3, -2, 2, -3], [1, -1, 3, -2, -3, 2], [1, -1, 3, 2, -2, -3], [1, -1, 3, 2, -3, -2], [1, -1, 3, -3, -2, 2], [1, -1, 3, -3, 2, -2], [1, -2, -1, 2, -3, 3], [1, -2, -1, 2, 3, -3], [1, -2, -1, -3, 2, 3], [1, -2, -1, -3, 3, 2], [1, -2, -1, 3, 2, -3], [1, -2, -1, 3, -3, 2], [1, -2, 2, -1, -3, 3], [1, -2, 2, -1, 3, -3], [1, -2, 2, -3, -1, 3], [1, -2, 2, -3, 3, -1], [1, -2, 2, 3, -1, -3], [1, -2, 2, 3, -3, -1], [1, -2, -3, -1, 2, 3], [1, -2, -3, -1, 3, 2], [1, -2, -3, 2, -1, 3], [1, -2, -3, 2, 3, -1], [1, -2, -3, 3, -1, 2], [1, -2, -3, 3, 2, -1], [1, -2, 3, -1, 2, -3], [1, -2, 3, -1, -3, 2], [1, -2, 3, 2, -1, -3], [1, -2, 3, 2, -3, -1], [1, -2, 3, -3, -1, 2], [1, -2, 3, -3, 2, -1], [1, 2, -1, -2, -3, 3], [1, 2, -1, -2, 3, -3], [1, 2, -1, -3, -2, 3], [1, 2, -1, -3, 3, -2], [1, 2, -1, 3, -2, -3], [1, 2, -1, 3, -3, -2], [1, 2, -2, -1, -3, 3], [1, 2, -2, -1, 3, -3], [1, 2, -2, -3, -1, 3], [1, 2, -2, -3, 3, -1], [1, 2, -2, 3, -1, -3], [1, 2, -2, 3, -3, -1], [1, 2, -3, -1, -2, 3], [1, 2, -3, -1, 3, -2], [1, 2, -3, -2, -1, 3], [1, 2, -3, -2, 3, -1], [1, 2, -3, 3, -1, -2], [1, 2, -3, 3, -2, -1], [1, 2, 3, -1, -2, -3], [1, 2, 3, -1, -3, -2], [1, 2, 3, -2, -1, -3], [1, 2, 3, -2, -3, -1], [1, 2, 3, -3, -1, -2], [1, 2, 3, -3, -2, -1], [1, -3, -1, -2, 2, 3], [1, -3, -1, -2, 3, 2], [1, -3, -1, 2, -2, 3], [1, -3, -1, 2, 3, -2], [1, -3, -1, 3, -2, 2], [1, -3, -1, 3, 2, -2], [1, -3, -2, -1, 2, 3], [1, -3, -2, -1, 3, 2], [1, -3, -2, 2, -1, 3], [1, -3, -2, 2, 3, -1], [1, -3, -2, 3, -1, 2], [1, -3, -2, 3, 2, -1], [1, -3, 2, -1, -2, 3], [1, -3, 2, -1, 3, -2], [1, -3, 2, -2, -1, 3], [1, -3, 2, -2, 3, -1], [1, -3, 2, 3, -1, -2], [1, -3, 2, 3, -2, -1], [1, -3, 3, -1, -2, 2], [1, -3, 3, -1, 2, -2], [1, -3, 3, -2, -1, 2], [1, -3, 3, -2, 2, -1], [1, -3, 3, 2, -1, -2], [1, -3, 3, 2, -2, -1], [1, 3, -1, -2, 2, -3], [1, 3, -1, -2, -3, 2], [1, 3, -1, 2, -2, -3], [1, 3, -1, 2, -3, -2], [1, 3, -1, -3, -2, 2], [1, 3, -1, -3, 2, -2], [1, 3, -2, -1, 2, -3], [1, 3, -2, -1, -3, 2], [1, 3, -2, 2, -1, -3], [1, 3, -2, 2, -3, -1], [1, 3, -2, -3, -1, 2], [1, 3, -2, -3, 2, -1], [1, 3, 2, -1, -2, -3], [1, 3, 2, -1, -3, -2], [1, 3, 2, -2, -1, -3], [1, 3, 2, -2, -3, -1], [1, 3, 2, -3, -1, -2], [1, 3, 2, -3, -2, -1], [1, 3, -3, -1, -2, 2], [1, 3, -3, -1, 2, -2], [1, 3, -3, -2, -1, 2], [1, 3, -3, -2, 2, -1], [1, 3, -3, 2, -1, -2], [1, 3, -3, 2, -2, -1], [-2, -1, 1, 2, -3, 3], [-2, -1, 1, 2, 3, -3], [-2, -1, 1, -3, 2, 3], [-2, -1, 1, -3, 3, 2], [-2, -1, 1, 3, 2, -3], [-2, -1, 1, 3, -3, 2], [-2, -1, 2, 1, -3, 3], [-2, -1, 2, 1, 3, -3], [-2, -1, 2, -3, 1, 3], [-2, -1, 2, -3, 3, 1], [-2, -1, 2, 3, 1, -3], [-2, -1, 2, 3, -3, 1], [-2, -1, -3, 1, 2, 3], [-2, -1, -3, 1, 3, 2], [-2, -1, -3, 2, 1, 3], [-2, -1, -3, 2, 3, 1], [-2, -1, -3, 3, 1, 2], [-2, -1, -3, 3, 2, 1], [-2, -1, 3, 1, 2, -3], [-2, -1, 3, 1, -3, 2], [-2, -1, 3, 2, 1, -3], [-2, -1, 3, 2, -3, 1], [-2, -1, 3, -3, 1, 2], [-2, -1, 3, -3, 2, 1], [-2, 1, -1, 2, -3, 3], [-2, 1, -1, 2, 3, -3], [-2, 1, -1, -3, 2, 3], [-2, 1, -1, -3, 3, 2], [-2, 1, -1, 3, 2, -3], [-2, 1, -1, 3, -3, 2], [-2, 1, 2, -1, -3, 3], [-2, 1, 2, -1, 3, -3], [-2, 1, 2, -3, -1, 3], [-2, 1, 2, -3, 3, -1], [-2, 1, 2, 3, -1, -3], [-2, 1, 2, 3, -3, -1], [-2, 1, -3, -1, 2, 3], [-2, 1, -3, -1, 3, 2], [-2, 1, -3, 2, -1, 3], [-2, 1, -3, 2, 3, -1], [-2, 1, -3, 3, -1, 2], [-2, 1, -3, 3, 2, -1], [-2, 1, 3, -1, 2, -3], [-2, 1, 3, -1, -3, 2], [-2, 1, 3, 2, -1, -3], [-2, 1, 3, 2, -3, -1], [-2, 1, 3, -3, -1, 2], [-2, 1, 3, -3, 2, -1], [-2, 2, -1, 1, -3, 3], [-2, 2, -1, 1, 3, -3], [-2, 2, -1, -3, 1, 3], [-2, 2, -1, -3, 3, 1], [-2, 2, -1, 3, 1, -3], [-2, 2, -1, 3, -3, 1], [-2, 2, 1, -1, -3, 3], [-2, 2, 1, -1, 3, -3], [-2, 2, 1, -3, -1, 3], [-2, 2, 1, -3, 3, -1], [-2, 2, 1, 3, -1, -3], [-2, 2, 1, 3, -3, -1], [-2, 2, -3, -1, 1, 3], [-2, 2, -3, -1, 3, 1], [-2, 2, -3, 1, -1, 3], [-2, 2, -3, 1, 3, -1], [-2, 2, -3, 3, -1, 1], [-2, 2, -3, 3, 1, -1], [-2, 2, 3, -1, 1, -3], [-2, 2, 3, -1, -3, 1], [-2, 2, 3, 1, -1, -3], [-2, 2, 3, 1, -3, -1], [-2, 2, 3, -3, -1, 1], [-2, 2, 3, -3, 1, -1], [-2, -3, -1, 1, 2, 3], [-2, -3, -1, 1, 3, 2], [-2, -3, -1, 2, 1, 3], [-2, -3, -1, 2, 3, 1], [-2, -3, -1, 3, 1, 2], [-2, -3, -1, 3, 2, 1], [-2, -3, 1, -1, 2, 3], [-2, -3, 1, -1, 3, 2], [-2, -3, 1, 2, -1, 3], [-2, -3, 1, 2, 3, -1], [-2, -3, 1, 3, -1, 2], [-2, -3, 1, 3, 2, -1], [-2, -3, 2, -1, 1, 3], [-2, -3, 2, -1, 3, 1], [-2, -3, 2, 1, -1, 3], [-2, -3, 2, 1, 3, -1], [-2, -3, 2, 3, -1, 1], [-2, -3, 2, 3, 1, -1], [-2, -3, 3, -1, 1, 2], [-2, -3, 3, -1, 2, 1], [-2, -3, 3, 1, -1, 2], [-2, -3, 3, 1, 2, -1], [-2, -3, 3, 2, -1, 1], [-2, -3, 3, 2, 1, -1], [-2, 3, -1, 1, 2, -3], [-2, 3, -1, 1, -3, 2], [-2, 3, -1, 2, 1, -3], [-2, 3, -1, 2, -3, 1], [-2, 3, -1, -3, 1, 2], [-2, 3, -1, -3, 2, 1], [-2, 3, 1, -1, 2, -3], [-2, 3, 1, -1, -3, 2], [-2, 3, 1, 2, -1, -3], [-2, 3, 1, 2, -3, -1], [-2, 3, 1, -3, -1, 2], [-2, 3, 1, -3, 2, -1], [-2, 3, 2, -1, 1, -3], [-2, 3, 2, -1, -3, 1], [-2, 3, 2, 1, -1, -3], [-2, 3, 2, 1, -3, -1], [-2, 3, 2, -3, -1, 1], [-2, 3, 2, -3, 1, -1], [-2, 3, -3, -1, 1, 2], [-2, 3, -3, -1, 2, 1], [-2, 3, -3, 1, -1, 2], [-2, 3, -3, 1, 2, -1], [-2, 3, -3, 2, -1, 1], [-2, 3, -3, 2, 1, -1], [2, -1, 1, -2, -3, 3], [2, -1, 1, -2, 3, -3], [2, -1, 1, -3, -2, 3], [2, -1, 1, -3, 3, -2], [2, -1, 1, 3, -2, -3], [2, -1, 1, 3, -3, -2], [2, -1, -2, 1, -3, 3], [2, -1, -2, 1, 3, -3], [2, -1, -2, -3, 1, 3], [2, -1, -2, -3, 3, 1], [2, -1, -2, 3, 1, -3], [2, -1, -2, 3, -3, 1], [2, -1, -3, 1, -2, 3], [2, -1, -3, 1, 3, -2], [2, -1, -3, -2, 1, 3], [2, -1, -3, -2, 3, 1], [2, -1, -3, 3, 1, -2], [2, -1, -3, 3, -2, 1], [2, -1, 3, 1, -2, -3], [2, -1, 3, 1, -3, -2], [2, -1, 3, -2, 1, -3], [2, -1, 3, -2, -3, 1], [2, -1, 3, -3, 1, -2], [2, -1, 3, -3, -2, 1], [2, 1, -1, -2, -3, 3], [2, 1, -1, -2, 3, -3], [2, 1, -1, -3, -2, 3], [2, 1, -1, -3, 3, -2], [2, 1, -1, 3, -2, -3], [2, 1, -1, 3, -3, -2], [2, 1, -2, -1, -3, 3], [2, 1, -2, -1, 3, -3], [2, 1, -2, -3, -1, 3], [2, 1, -2, -3, 3, -1], [2, 1, -2, 3, -1, -3], [2, 1, -2, 3, -3, -1], [2, 1, -3, -1, -2, 3], [2, 1, -3, -1, 3, -2], [2, 1, -3, -2, -1, 3], [2, 1, -3, -2, 3, -1], [2, 1, -3, 3, -1, -2], [2, 1, -3, 3, -2, -1], [2, 1, 3, -1, -2, -3], [2, 1, 3, -1, -3, -2], [2, 1, 3, -2, -1, -3], [2, 1, 3, -2, -3, -1], [2, 1, 3, -3, -1, -2], [2, 1, 3, -3, -2, -1], [2, -2, -1, 1, -3, 3], [2, -2, -1, 1, 3, -3], [2, -2, -1, -3, 1, 3], [2, -2, -1, -3, 3, 1], [2, -2, -1, 3, 1, -3], [2, -2, -1, 3, -3, 1], [2, -2, 1, -1, -3, 3], [2, -2, 1, -1, 3, -3], [2, -2, 1, -3, -1, 3], [2, -2, 1, -3, 3, -1], [2, -2, 1, 3, -1, -3], [2, -2, 1, 3, -3, -1], [2, -2, -3, -1, 1, 3], [2, -2, -3, -1, 3, 1], [2, -2, -3, 1, -1, 3], [2, -2, -3, 1, 3, -1], [2, -2, -3, 3, -1, 1], [2, -2, -3, 3, 1, -1], [2, -2, 3, -1, 1, -3], [2, -2, 3, -1, -3, 1], [2, -2, 3, 1, -1, -3], [2, -2, 3, 1, -3, -1], [2, -2, 3, -3, -1, 1], [2, -2, 3, -3, 1, -1], [2, -3, -1, 1, -2, 3], [2, -3, -1, 1, 3, -2], [2, -3, -1, -2, 1, 3], [2, -3, -1, -2, 3, 1], [2, -3, -1, 3, 1, -2], [2, -3, -1, 3, -2, 1], [2, -3, 1, -1, -2, 3], [2, -3, 1, -1, 3, -2], [2, -3, 1, -2, -1, 3], [2, -3, 1, -2, 3, -1], [2, -3, 1, 3, -1, -2], [2, -3, 1, 3, -2, -1], [2, -3, -2, -1, 1, 3], [2, -3, -2, -1, 3, 1], [2, -3, -2, 1, -1, 3], [2, -3, -2, 1, 3, -1], [2, -3, -2, 3, -1, 1], [2, -3, -2, 3, 1, -1], [2, -3, 3, -1, 1, -2], [2, -3, 3, -1, -2, 1], [2, -3, 3, 1, -1, -2], [2, -3, 3, 1, -2, -1], [2, -3, 3, -2, -1, 1], [2, -3, 3, -2, 1, -1], [2, 3, -1, 1, -2, -3], [2, 3, -1, 1, -3, -2], [2, 3, -1, -2, 1, -3], [2, 3, -1, -2, -3, 1], [2, 3, -1, -3, 1, -2], [2, 3, -1, -3, -2, 1], [2, 3, 1, -1, -2, -3], [2, 3, 1, -1, -3, -2], [2, 3, 1, -2, -1, -3], [2, 3, 1, -2, -3, -1], [2, 3, 1, -3, -1, -2], [2, 3, 1, -3, -2, -1], [2, 3, -2, -1, 1, -3], [2, 3, -2, -1, -3, 1], [2, 3, -2, 1, -1, -3], [2, 3, -2, 1, -3, -1], [2, 3, -2, -3, -1, 1], [2, 3, -2, -3, 1, -1], [2, 3, -3, -1, 1, -2], [2, 3, -3, -1, -2, 1], [2, 3, -3, 1, -1, -2], [2, 3, -3, 1, -2, -1], [2, 3, -3, -2, -1, 1], [2, 3, -3, -2, 1, -1], [-3, -1, 1, -2, 2, 3], [-3, -1, 1, -2, 3, 2], [-3, -1, 1, 2, -2, 3], [-3, -1, 1, 2, 3, -2], [-3, -1, 1, 3, -2, 2], [-3, -1, 1, 3, 2, -2], [-3, -1, -2, 1, 2, 3], [-3, -1, -2, 1, 3, 2], [-3, -1, -2, 2, 1, 3], [-3, -1, -2, 2, 3, 1], [-3, -1, -2, 3, 1, 2], [-3, -1, -2, 3, 2, 1], [-3, -1, 2, 1, -2, 3], [-3, -1, 2, 1, 3, -2], [-3, -1, 2, -2, 1, 3], [-3, -1, 2, -2, 3, 1], [-3, -1, 2, 3, 1, -2], [-3, -1, 2, 3, -2, 1], [-3, -1, 3, 1, -2, 2], [-3, -1, 3, 1, 2, -2], [-3, -1, 3, -2, 1, 2], [-3, -1, 3, -2, 2, 1], [-3, -1, 3, 2, 1, -2], [-3, -1, 3, 2, -2, 1], [-3, 1, -1, -2, 2, 3], [-3, 1, -1, -2, 3, 2], [-3, 1, -1, 2, -2, 3], [-3, 1, -1, 2, 3, -2], [-3, 1, -1, 3, -2, 2], [-3, 1, -1, 3, 2, -2], [-3, 1, -2, -1, 2, 3], [-3, 1, -2, -1, 3, 2], [-3, 1, -2, 2, -1, 3], [-3, 1, -2, 2, 3, -1], [-3, 1, -2, 3, -1, 2], [-3, 1, -2, 3, 2, -1], [-3, 1, 2, -1, -2, 3], [-3, 1, 2, -1, 3, -2], [-3, 1, 2, -2, -1, 3], [-3, 1, 2, -2, 3, -1], [-3, 1, 2, 3, -1, -2], [-3, 1, 2, 3, -2, -1], [-3, 1, 3, -1, -2, 2], [-3, 1, 3, -1, 2, -2], [-3, 1, 3, -2, -1, 2], [-3, 1, 3, -2, 2, -1], [-3, 1, 3, 2, -1, -2], [-3, 1, 3, 2, -2, -1], [-3, -2, -1, 1, 2, 3], [-3, -2, -1, 1, 3, 2], [-3, -2, -1, 2, 1, 3], [-3, -2, -1, 2, 3, 1], [-3, -2, -1, 3, 1, 2], [-3, -2, -1, 3, 2, 1], [-3, -2, 1, -1, 2, 3], [-3, -2, 1, -1, 3, 2], [-3, -2, 1, 2, -1, 3], [-3, -2, 1, 2, 3, -1], [-3, -2, 1, 3, -1, 2], [-3, -2, 1, 3, 2, -1], [-3, -2, 2, -1, 1, 3], [-3, -2, 2, -1, 3, 1], [-3, -2, 2, 1, -1, 3], [-3, -2, 2, 1, 3, -1], [-3, -2, 2, 3, -1, 1], [-3, -2, 2, 3, 1, -1], [-3, -2, 3, -1, 1, 2], [-3, -2, 3, -1, 2, 1], [-3, -2, 3, 1, -1, 2], [-3, -2, 3, 1, 2, -1], [-3, -2, 3, 2, -1, 1], [-3, -2, 3, 2, 1, -1], [-3, 2, -1, 1, -2, 3], [-3, 2, -1, 1, 3, -2], [-3, 2, -1, -2, 1, 3], [-3, 2, -1, -2, 3, 1], [-3, 2, -1, 3, 1, -2], [-3, 2, -1, 3, -2, 1], [-3, 2, 1, -1, -2, 3], [-3, 2, 1, -1, 3, -2], [-3, 2, 1, -2, -1, 3], [-3, 2, 1, -2, 3, -1], [-3, 2, 1, 3, -1, -2], [-3, 2, 1, 3, -2, -1], [-3, 2, -2, -1, 1, 3], [-3, 2, -2, -1, 3, 1], [-3, 2, -2, 1, -1, 3], [-3, 2, -2, 1, 3, -1], [-3, 2, -2, 3, -1, 1], [-3, 2, -2, 3, 1, -1], [-3, 2, 3, -1, 1, -2], [-3, 2, 3, -1, -2, 1], [-3, 2, 3, 1, -1, -2], [-3, 2, 3, 1, -2, -1], [-3, 2, 3, -2, -1, 1], [-3, 2, 3, -2, 1, -1], [-3, 3, -1, 1, -2, 2], [-3, 3, -1, 1, 2, -2], [-3, 3, -1, -2, 1, 2], [-3, 3, -1, -2, 2, 1], [-3, 3, -1, 2, 1, -2], [-3, 3, -1, 2, -2, 1], [-3, 3, 1, -1, -2, 2], [-3, 3, 1, -1, 2, -2], [-3, 3, 1, -2, -1, 2], [-3, 3, 1, -2, 2, -1], [-3, 3, 1, 2, -1, -2], [-3, 3, 1, 2, -2, -1], [-3, 3, -2, -1, 1, 2], [-3, 3, -2, -1, 2, 1], [-3, 3, -2, 1, -1, 2], [-3, 3, -2, 1, 2, -1], [-3, 3, -2, 2, -1, 1], [-3, 3, -2, 2, 1, -1], [-3, 3, 2, -1, 1, -2], [-3, 3, 2, -1, -2, 1], [-3, 3, 2, 1, -1, -2], [-3, 3, 2, 1, -2, -1], [-3, 3, 2, -2, -1, 1], [-3, 3, 2, -2, 1, -1], [3, -1, 1, -2, 2, -3], [3, -1, 1, -2, -3, 2], [3, -1, 1, 2, -2, -3], [3, -1, 1, 2, -3, -2], [3, -1, 1, -3, -2, 2], [3, -1, 1, -3, 2, -2], [3, -1, -2, 1, 2, -3], [3, -1, -2, 1, -3, 2], [3, -1, -2, 2, 1, -3], [3, -1, -2, 2, -3, 1], [3, -1, -2, -3, 1, 2], [3, -1, -2, -3, 2, 1], [3, -1, 2, 1, -2, -3], [3, -1, 2, 1, -3, -2], [3, -1, 2, -2, 1, -3], [3, -1, 2, -2, -3, 1], [3, -1, 2, -3, 1, -2], [3, -1, 2, -3, -2, 1], [3, -1, -3, 1, -2, 2], [3, -1, -3, 1, 2, -2], [3, -1, -3, -2, 1, 2], [3, -1, -3, -2, 2, 1], [3, -1, -3, 2, 1, -2], [3, -1, -3, 2, -2, 1], [3, 1, -1, -2, 2, -3], [3, 1, -1, -2, -3, 2], [3, 1, -1, 2, -2, -3], [3, 1, -1, 2, -3, -2], [3, 1, -1, -3, -2, 2], [3, 1, -1, -3, 2, -2], [3, 1, -2, -1, 2, -3], [3, 1, -2, -1, -3, 2], [3, 1, -2, 2, -1, -3], [3, 1, -2, 2, -3, -1], [3, 1, -2, -3, -1, 2], [3, 1, -2, -3, 2, -1], [3, 1, 2, -1, -2, -3], [3, 1, 2, -1, -3, -2], [3, 1, 2, -2, -1, -3], [3, 1, 2, -2, -3, -1], [3, 1, 2, -3, -1, -2], [3, 1, 2, -3, -2, -1], [3, 1, -3, -1, -2, 2], [3, 1, -3, -1, 2, -2], [3, 1, -3, -2, -1, 2], [3, 1, -3, -2, 2, -1], [3, 1, -3, 2, -1, -2], [3, 1, -3, 2, -2, -1], [3, -2, -1, 1, 2, -3], [3, -2, -1, 1, -3, 2], [3, -2, -1, 2, 1, -3], [3, -2, -1, 2, -3, 1], [3, -2, -1, -3, 1, 2], [3, -2, -1, -3, 2, 1], [3, -2, 1, -1, 2, -3], [3, -2, 1, -1, -3, 2], [3, -2, 1, 2, -1, -3], [3, -2, 1, 2, -3, -1], [3, -2, 1, -3, -1, 2], [3, -2, 1, -3, 2, -1], [3, -2, 2, -1, 1, -3], [3, -2, 2, -1, -3, 1], [3, -2, 2, 1, -1, -3], [3, -2, 2, 1, -3, -1], [3, -2, 2, -3, -1, 1], [3, -2, 2, -3, 1, -1], [3, -2, -3, -1, 1, 2], [3, -2, -3, -1, 2, 1], [3, -2, -3, 1, -1, 2], [3, -2, -3, 1, 2, -1], [3, -2, -3, 2, -1, 1], [3, -2, -3, 2, 1, -1], [3, 2, -1, 1, -2, -3], [3, 2, -1, 1, -3, -2], [3, 2, -1, -2, 1, -3], [3, 2, -1, -2, -3, 1], [3, 2, -1, -3, 1, -2], [3, 2, -1, -3, -2, 1], [3, 2, 1, -1, -2, -3], [3, 2, 1, -1, -3, -2], [3, 2, 1, -2, -1, -3], [3, 2, 1, -2, -3, -1], [3, 2, 1, -3, -1, -2], [3, 2, 1, -3, -2, -1], [3, 2, -2, -1, 1, -3], [3, 2, -2, -1, -3, 1], [3, 2, -2, 1, -1, -3], [3, 2, -2, 1, -3, -1], [3, 2, -2, -3, -1, 1], [3, 2, -2, -3, 1, -1], [3, 2, -3, -1, 1, -2], [3, 2, -3, -1, -2, 1], [3, 2, -3, 1, -1, -2], [3, 2, -3, 1, -2, -1], [3, 2, -3, -2, -1, 1], [3, 2, -3, -2, 1, -1], [3, -3, -1, 1, -2, 2], [3, -3, -1, 1, 2, -2], [3, -3, -1, -2, 1, 2], [3, -3, -1, -2, 2, 1], [3, -3, -1, 2, 1, -2], [3, -3, -1, 2, -2, 1], [3, -3, 1, -1, -2, 2], [3, -3, 1, -1, 2, -2], [3, -3, 1, -2, -1, 2], [3, -3, 1, -2, 2, -1], [3, -3, 1, 2, -1, -2], [3, -3, 1, 2, -2, -1], [3, -3, -2, -1, 1, 2], [3, -3, -2, -1, 2, 1], [3, -3, -2, 1, -1, 2], [3, -3, -2, 1, 2, -1], [3, -3, -2, 2, -1, 1], [3, -3, -2, 2, 1, -1], [3, -3, 2, -1, 1, -2], [3, -3, 2, -1, -2, 1], [3, -3, 2, 1, -1, -2], [3, -3, 2, 1, -2, -1], [3, -3, 2, -2, -1, 1], [3, -3, 2, -2, 1, -1]])\n assert answers_match(candidate(nums=[1, 2, 3, 0, -1, -2]), [[1, 2, 3, 0, -1, -2], [1, 2, 3, 0, -2, -1], [1, 2, 3, -1, 0, -2], [1, 2, 3, -1, -2, 0], [1, 2, 3, -2, 0, -1], [1, 2, 3, -2, -1, 0], [1, 2, 0, 3, -1, -2], [1, 2, 0, 3, -2, -1], [1, 2, 0, -1, 3, -2], [1, 2, 0, -1, -2, 3], [1, 2, 0, -2, 3, -1], [1, 2, 0, -2, -1, 3], [1, 2, -1, 3, 0, -2], [1, 2, -1, 3, -2, 0], [1, 2, -1, 0, 3, -2], [1, 2, -1, 0, -2, 3], [1, 2, -1, -2, 3, 0], [1, 2, -1, -2, 0, 3], [1, 2, -2, 3, 0, -1], [1, 2, -2, 3, -1, 0], [1, 2, -2, 0, 3, -1], [1, 2, -2, 0, -1, 3], [1, 2, -2, -1, 3, 0], [1, 2, -2, -1, 0, 3], [1, 3, 2, 0, -1, -2], [1, 3, 2, 0, -2, -1], [1, 3, 2, -1, 0, -2], [1, 3, 2, -1, -2, 0], [1, 3, 2, -2, 0, -1], [1, 3, 2, -2, -1, 0], [1, 3, 0, 2, -1, -2], [1, 3, 0, 2, -2, -1], [1, 3, 0, -1, 2, -2], [1, 3, 0, -1, -2, 2], [1, 3, 0, -2, 2, -1], [1, 3, 0, -2, -1, 2], [1, 3, -1, 2, 0, -2], [1, 3, -1, 2, -2, 0], [1, 3, -1, 0, 2, -2], [1, 3, -1, 0, -2, 2], [1, 3, -1, -2, 2, 0], [1, 3, -1, -2, 0, 2], [1, 3, -2, 2, 0, -1], [1, 3, -2, 2, -1, 0], [1, 3, -2, 0, 2, -1], [1, 3, -2, 0, -1, 2], [1, 3, -2, -1, 2, 0], [1, 3, -2, -1, 0, 2], [1, 0, 2, 3, -1, -2], [1, 0, 2, 3, -2, -1], [1, 0, 2, -1, 3, -2], [1, 0, 2, -1, -2, 3], [1, 0, 2, -2, 3, -1], [1, 0, 2, -2, -1, 3], [1, 0, 3, 2, -1, -2], [1, 0, 3, 2, -2, -1], [1, 0, 3, -1, 2, -2], [1, 0, 3, -1, -2, 2], [1, 0, 3, -2, 2, -1], [1, 0, 3, -2, -1, 2], [1, 0, -1, 2, 3, -2], [1, 0, -1, 2, -2, 3], [1, 0, -1, 3, 2, -2], [1, 0, -1, 3, -2, 2], [1, 0, -1, -2, 2, 3], [1, 0, -1, -2, 3, 2], [1, 0, -2, 2, 3, -1], [1, 0, -2, 2, -1, 3], [1, 0, -2, 3, 2, -1], [1, 0, -2, 3, -1, 2], [1, 0, -2, -1, 2, 3], [1, 0, -2, -1, 3, 2], [1, -1, 2, 3, 0, -2], [1, -1, 2, 3, -2, 0], [1, -1, 2, 0, 3, -2], [1, -1, 2, 0, -2, 3], [1, -1, 2, -2, 3, 0], [1, -1, 2, -2, 0, 3], [1, -1, 3, 2, 0, -2], [1, -1, 3, 2, -2, 0], [1, -1, 3, 0, 2, -2], [1, -1, 3, 0, -2, 2], [1, -1, 3, -2, 2, 0], [1, -1, 3, -2, 0, 2], [1, -1, 0, 2, 3, -2], [1, -1, 0, 2, -2, 3], [1, -1, 0, 3, 2, -2], [1, -1, 0, 3, -2, 2], [1, -1, 0, -2, 2, 3], [1, -1, 0, -2, 3, 2], [1, -1, -2, 2, 3, 0], [1, -1, -2, 2, 0, 3], [1, -1, -2, 3, 2, 0], [1, -1, -2, 3, 0, 2], [1, -1, -2, 0, 2, 3], [1, -1, -2, 0, 3, 2], [1, -2, 2, 3, 0, -1], [1, -2, 2, 3, -1, 0], [1, -2, 2, 0, 3, -1], [1, -2, 2, 0, -1, 3], [1, -2, 2, -1, 3, 0], [1, -2, 2, -1, 0, 3], [1, -2, 3, 2, 0, -1], [1, -2, 3, 2, -1, 0], [1, -2, 3, 0, 2, -1], [1, -2, 3, 0, -1, 2], [1, -2, 3, -1, 2, 0], [1, -2, 3, -1, 0, 2], [1, -2, 0, 2, 3, -1], [1, -2, 0, 2, -1, 3], [1, -2, 0, 3, 2, -1], [1, -2, 0, 3, -1, 2], [1, -2, 0, -1, 2, 3], [1, -2, 0, -1, 3, 2], [1, -2, -1, 2, 3, 0], [1, -2, -1, 2, 0, 3], [1, -2, -1, 3, 2, 0], [1, -2, -1, 3, 0, 2], [1, -2, -1, 0, 2, 3], [1, -2, -1, 0, 3, 2], [2, 1, 3, 0, -1, -2], [2, 1, 3, 0, -2, -1], [2, 1, 3, -1, 0, -2], [2, 1, 3, -1, -2, 0], [2, 1, 3, -2, 0, -1], [2, 1, 3, -2, -1, 0], [2, 1, 0, 3, -1, -2], [2, 1, 0, 3, -2, -1], [2, 1, 0, -1, 3, -2], [2, 1, 0, -1, -2, 3], [2, 1, 0, -2, 3, -1], [2, 1, 0, -2, -1, 3], [2, 1, -1, 3, 0, -2], [2, 1, -1, 3, -2, 0], [2, 1, -1, 0, 3, -2], [2, 1, -1, 0, -2, 3], [2, 1, -1, -2, 3, 0], [2, 1, -1, -2, 0, 3], [2, 1, -2, 3, 0, -1], [2, 1, -2, 3, -1, 0], [2, 1, -2, 0, 3, -1], [2, 1, -2, 0, -1, 3], [2, 1, -2, -1, 3, 0], [2, 1, -2, -1, 0, 3], [2, 3, 1, 0, -1, -2], [2, 3, 1, 0, -2, -1], [2, 3, 1, -1, 0, -2], [2, 3, 1, -1, -2, 0], [2, 3, 1, -2, 0, -1], [2, 3, 1, -2, -1, 0], [2, 3, 0, 1, -1, -2], [2, 3, 0, 1, -2, -1], [2, 3, 0, -1, 1, -2], [2, 3, 0, -1, -2, 1], [2, 3, 0, -2, 1, -1], [2, 3, 0, -2, -1, 1], [2, 3, -1, 1, 0, -2], [2, 3, -1, 1, -2, 0], [2, 3, -1, 0, 1, -2], [2, 3, -1, 0, -2, 1], [2, 3, -1, -2, 1, 0], [2, 3, -1, -2, 0, 1], [2, 3, -2, 1, 0, -1], [2, 3, -2, 1, -1, 0], [2, 3, -2, 0, 1, -1], [2, 3, -2, 0, -1, 1], [2, 3, -2, -1, 1, 0], [2, 3, -2, -1, 0, 1], [2, 0, 1, 3, -1, -2], [2, 0, 1, 3, -2, -1], [2, 0, 1, -1, 3, -2], [2, 0, 1, -1, -2, 3], [2, 0, 1, -2, 3, -1], [2, 0, 1, -2, -1, 3], [2, 0, 3, 1, -1, -2], [2, 0, 3, 1, -2, -1], [2, 0, 3, -1, 1, -2], [2, 0, 3, -1, -2, 1], [2, 0, 3, -2, 1, -1], [2, 0, 3, -2, -1, 1], [2, 0, -1, 1, 3, -2], [2, 0, -1, 1, -2, 3], [2, 0, -1, 3, 1, -2], [2, 0, -1, 3, -2, 1], [2, 0, -1, -2, 1, 3], [2, 0, -1, -2, 3, 1], [2, 0, -2, 1, 3, -1], [2, 0, -2, 1, -1, 3], [2, 0, -2, 3, 1, -1], [2, 0, -2, 3, -1, 1], [2, 0, -2, -1, 1, 3], [2, 0, -2, -1, 3, 1], [2, -1, 1, 3, 0, -2], [2, -1, 1, 3, -2, 0], [2, -1, 1, 0, 3, -2], [2, -1, 1, 0, -2, 3], [2, -1, 1, -2, 3, 0], [2, -1, 1, -2, 0, 3], [2, -1, 3, 1, 0, -2], [2, -1, 3, 1, -2, 0], [2, -1, 3, 0, 1, -2], [2, -1, 3, 0, -2, 1], [2, -1, 3, -2, 1, 0], [2, -1, 3, -2, 0, 1], [2, -1, 0, 1, 3, -2], [2, -1, 0, 1, -2, 3], [2, -1, 0, 3, 1, -2], [2, -1, 0, 3, -2, 1], [2, -1, 0, -2, 1, 3], [2, -1, 0, -2, 3, 1], [2, -1, -2, 1, 3, 0], [2, -1, -2, 1, 0, 3], [2, -1, -2, 3, 1, 0], [2, -1, -2, 3, 0, 1], [2, -1, -2, 0, 1, 3], [2, -1, -2, 0, 3, 1], [2, -2, 1, 3, 0, -1], [2, -2, 1, 3, -1, 0], [2, -2, 1, 0, 3, -1], [2, -2, 1, 0, -1, 3], [2, -2, 1, -1, 3, 0], [2, -2, 1, -1, 0, 3], [2, -2, 3, 1, 0, -1], [2, -2, 3, 1, -1, 0], [2, -2, 3, 0, 1, -1], [2, -2, 3, 0, -1, 1], [2, -2, 3, -1, 1, 0], [2, -2, 3, -1, 0, 1], [2, -2, 0, 1, 3, -1], [2, -2, 0, 1, -1, 3], [2, -2, 0, 3, 1, -1], [2, -2, 0, 3, -1, 1], [2, -2, 0, -1, 1, 3], [2, -2, 0, -1, 3, 1], [2, -2, -1, 1, 3, 0], [2, -2, -1, 1, 0, 3], [2, -2, -1, 3, 1, 0], [2, -2, -1, 3, 0, 1], [2, -2, -1, 0, 1, 3], [2, -2, -1, 0, 3, 1], [3, 1, 2, 0, -1, -2], [3, 1, 2, 0, -2, -1], [3, 1, 2, -1, 0, -2], [3, 1, 2, -1, -2, 0], [3, 1, 2, -2, 0, -1], [3, 1, 2, -2, -1, 0], [3, 1, 0, 2, -1, -2], [3, 1, 0, 2, -2, -1], [3, 1, 0, -1, 2, -2], [3, 1, 0, -1, -2, 2], [3, 1, 0, -2, 2, -1], [3, 1, 0, -2, -1, 2], [3, 1, -1, 2, 0, -2], [3, 1, -1, 2, -2, 0], [3, 1, -1, 0, 2, -2], [3, 1, -1, 0, -2, 2], [3, 1, -1, -2, 2, 0], [3, 1, -1, -2, 0, 2], [3, 1, -2, 2, 0, -1], [3, 1, -2, 2, -1, 0], [3, 1, -2, 0, 2, -1], [3, 1, -2, 0, -1, 2], [3, 1, -2, -1, 2, 0], [3, 1, -2, -1, 0, 2], [3, 2, 1, 0, -1, -2], [3, 2, 1, 0, -2, -1], [3, 2, 1, -1, 0, -2], [3, 2, 1, -1, -2, 0], [3, 2, 1, -2, 0, -1], [3, 2, 1, -2, -1, 0], [3, 2, 0, 1, -1, -2], [3, 2, 0, 1, -2, -1], [3, 2, 0, -1, 1, -2], [3, 2, 0, -1, -2, 1], [3, 2, 0, -2, 1, -1], [3, 2, 0, -2, -1, 1], [3, 2, -1, 1, 0, -2], [3, 2, -1, 1, -2, 0], [3, 2, -1, 0, 1, -2], [3, 2, -1, 0, -2, 1], [3, 2, -1, -2, 1, 0], [3, 2, -1, -2, 0, 1], [3, 2, -2, 1, 0, -1], [3, 2, -2, 1, -1, 0], [3, 2, -2, 0, 1, -1], [3, 2, -2, 0, -1, 1], [3, 2, -2, -1, 1, 0], [3, 2, -2, -1, 0, 1], [3, 0, 1, 2, -1, -2], [3, 0, 1, 2, -2, -1], [3, 0, 1, -1, 2, -2], [3, 0, 1, -1, -2, 2], [3, 0, 1, -2, 2, -1], [3, 0, 1, -2, -1, 2], [3, 0, 2, 1, -1, -2], [3, 0, 2, 1, -2, -1], [3, 0, 2, -1, 1, -2], [3, 0, 2, -1, -2, 1], [3, 0, 2, -2, 1, -1], [3, 0, 2, -2, -1, 1], [3, 0, -1, 1, 2, -2], [3, 0, -1, 1, -2, 2], [3, 0, -1, 2, 1, -2], [3, 0, -1, 2, -2, 1], [3, 0, -1, -2, 1, 2], [3, 0, -1, -2, 2, 1], [3, 0, -2, 1, 2, -1], [3, 0, -2, 1, -1, 2], [3, 0, -2, 2, 1, -1], [3, 0, -2, 2, -1, 1], [3, 0, -2, -1, 1, 2], [3, 0, -2, -1, 2, 1], [3, -1, 1, 2, 0, -2], [3, -1, 1, 2, -2, 0], [3, -1, 1, 0, 2, -2], [3, -1, 1, 0, -2, 2], [3, -1, 1, -2, 2, 0], [3, -1, 1, -2, 0, 2], [3, -1, 2, 1, 0, -2], [3, -1, 2, 1, -2, 0], [3, -1, 2, 0, 1, -2], [3, -1, 2, 0, -2, 1], [3, -1, 2, -2, 1, 0], [3, -1, 2, -2, 0, 1], [3, -1, 0, 1, 2, -2], [3, -1, 0, 1, -2, 2], [3, -1, 0, 2, 1, -2], [3, -1, 0, 2, -2, 1], [3, -1, 0, -2, 1, 2], [3, -1, 0, -2, 2, 1], [3, -1, -2, 1, 2, 0], [3, -1, -2, 1, 0, 2], [3, -1, -2, 2, 1, 0], [3, -1, -2, 2, 0, 1], [3, -1, -2, 0, 1, 2], [3, -1, -2, 0, 2, 1], [3, -2, 1, 2, 0, -1], [3, -2, 1, 2, -1, 0], [3, -2, 1, 0, 2, -1], [3, -2, 1, 0, -1, 2], [3, -2, 1, -1, 2, 0], [3, -2, 1, -1, 0, 2], [3, -2, 2, 1, 0, -1], [3, -2, 2, 1, -1, 0], [3, -2, 2, 0, 1, -1], [3, -2, 2, 0, -1, 1], [3, -2, 2, -1, 1, 0], [3, -2, 2, -1, 0, 1], [3, -2, 0, 1, 2, -1], [3, -2, 0, 1, -1, 2], [3, -2, 0, 2, 1, -1], [3, -2, 0, 2, -1, 1], [3, -2, 0, -1, 1, 2], [3, -2, 0, -1, 2, 1], [3, -2, -1, 1, 2, 0], [3, -2, -1, 1, 0, 2], [3, -2, -1, 2, 1, 0], [3, -2, -1, 2, 0, 1], [3, -2, -1, 0, 1, 2], [3, -2, -1, 0, 2, 1], [0, 1, 2, 3, -1, -2], [0, 1, 2, 3, -2, -1], [0, 1, 2, -1, 3, -2], [0, 1, 2, -1, -2, 3], [0, 1, 2, -2, 3, -1], [0, 1, 2, -2, -1, 3], [0, 1, 3, 2, -1, -2], [0, 1, 3, 2, -2, -1], [0, 1, 3, -1, 2, -2], [0, 1, 3, -1, -2, 2], [0, 1, 3, -2, 2, -1], [0, 1, 3, -2, -1, 2], [0, 1, -1, 2, 3, -2], [0, 1, -1, 2, -2, 3], [0, 1, -1, 3, 2, -2], [0, 1, -1, 3, -2, 2], [0, 1, -1, -2, 2, 3], [0, 1, -1, -2, 3, 2], [0, 1, -2, 2, 3, -1], [0, 1, -2, 2, -1, 3], [0, 1, -2, 3, 2, -1], [0, 1, -2, 3, -1, 2], [0, 1, -2, -1, 2, 3], [0, 1, -2, -1, 3, 2], [0, 2, 1, 3, -1, -2], [0, 2, 1, 3, -2, -1], [0, 2, 1, -1, 3, -2], [0, 2, 1, -1, -2, 3], [0, 2, 1, -2, 3, -1], [0, 2, 1, -2, -1, 3], [0, 2, 3, 1, -1, -2], [0, 2, 3, 1, -2, -1], [0, 2, 3, -1, 1, -2], [0, 2, 3, -1, -2, 1], [0, 2, 3, -2, 1, -1], [0, 2, 3, -2, -1, 1], [0, 2, -1, 1, 3, -2], [0, 2, -1, 1, -2, 3], [0, 2, -1, 3, 1, -2], [0, 2, -1, 3, -2, 1], [0, 2, -1, -2, 1, 3], [0, 2, -1, -2, 3, 1], [0, 2, -2, 1, 3, -1], [0, 2, -2, 1, -1, 3], [0, 2, -2, 3, 1, -1], [0, 2, -2, 3, -1, 1], [0, 2, -2, -1, 1, 3], [0, 2, -2, -1, 3, 1], [0, 3, 1, 2, -1, -2], [0, 3, 1, 2, -2, -1], [0, 3, 1, -1, 2, -2], [0, 3, 1, -1, -2, 2], [0, 3, 1, -2, 2, -1], [0, 3, 1, -2, -1, 2], [0, 3, 2, 1, -1, -2], [0, 3, 2, 1, -2, -1], [0, 3, 2, -1, 1, -2], [0, 3, 2, -1, -2, 1], [0, 3, 2, -2, 1, -1], [0, 3, 2, -2, -1, 1], [0, 3, -1, 1, 2, -2], [0, 3, -1, 1, -2, 2], [0, 3, -1, 2, 1, -2], [0, 3, -1, 2, -2, 1], [0, 3, -1, -2, 1, 2], [0, 3, -1, -2, 2, 1], [0, 3, -2, 1, 2, -1], [0, 3, -2, 1, -1, 2], [0, 3, -2, 2, 1, -1], [0, 3, -2, 2, -1, 1], [0, 3, -2, -1, 1, 2], [0, 3, -2, -1, 2, 1], [0, -1, 1, 2, 3, -2], [0, -1, 1, 2, -2, 3], [0, -1, 1, 3, 2, -2], [0, -1, 1, 3, -2, 2], [0, -1, 1, -2, 2, 3], [0, -1, 1, -2, 3, 2], [0, -1, 2, 1, 3, -2], [0, -1, 2, 1, -2, 3], [0, -1, 2, 3, 1, -2], [0, -1, 2, 3, -2, 1], [0, -1, 2, -2, 1, 3], [0, -1, 2, -2, 3, 1], [0, -1, 3, 1, 2, -2], [0, -1, 3, 1, -2, 2], [0, -1, 3, 2, 1, -2], [0, -1, 3, 2, -2, 1], [0, -1, 3, -2, 1, 2], [0, -1, 3, -2, 2, 1], [0, -1, -2, 1, 2, 3], [0, -1, -2, 1, 3, 2], [0, -1, -2, 2, 1, 3], [0, -1, -2, 2, 3, 1], [0, -1, -2, 3, 1, 2], [0, -1, -2, 3, 2, 1], [0, -2, 1, 2, 3, -1], [0, -2, 1, 2, -1, 3], [0, -2, 1, 3, 2, -1], [0, -2, 1, 3, -1, 2], [0, -2, 1, -1, 2, 3], [0, -2, 1, -1, 3, 2], [0, -2, 2, 1, 3, -1], [0, -2, 2, 1, -1, 3], [0, -2, 2, 3, 1, -1], [0, -2, 2, 3, -1, 1], [0, -2, 2, -1, 1, 3], [0, -2, 2, -1, 3, 1], [0, -2, 3, 1, 2, -1], [0, -2, 3, 1, -1, 2], [0, -2, 3, 2, 1, -1], [0, -2, 3, 2, -1, 1], [0, -2, 3, -1, 1, 2], [0, -2, 3, -1, 2, 1], [0, -2, -1, 1, 2, 3], [0, -2, -1, 1, 3, 2], [0, -2, -1, 2, 1, 3], [0, -2, -1, 2, 3, 1], [0, -2, -1, 3, 1, 2], [0, -2, -1, 3, 2, 1], [-1, 1, 2, 3, 0, -2], [-1, 1, 2, 3, -2, 0], [-1, 1, 2, 0, 3, -2], [-1, 1, 2, 0, -2, 3], [-1, 1, 2, -2, 3, 0], [-1, 1, 2, -2, 0, 3], [-1, 1, 3, 2, 0, -2], [-1, 1, 3, 2, -2, 0], [-1, 1, 3, 0, 2, -2], [-1, 1, 3, 0, -2, 2], [-1, 1, 3, -2, 2, 0], [-1, 1, 3, -2, 0, 2], [-1, 1, 0, 2, 3, -2], [-1, 1, 0, 2, -2, 3], [-1, 1, 0, 3, 2, -2], [-1, 1, 0, 3, -2, 2], [-1, 1, 0, -2, 2, 3], [-1, 1, 0, -2, 3, 2], [-1, 1, -2, 2, 3, 0], [-1, 1, -2, 2, 0, 3], [-1, 1, -2, 3, 2, 0], [-1, 1, -2, 3, 0, 2], [-1, 1, -2, 0, 2, 3], [-1, 1, -2, 0, 3, 2], [-1, 2, 1, 3, 0, -2], [-1, 2, 1, 3, -2, 0], [-1, 2, 1, 0, 3, -2], [-1, 2, 1, 0, -2, 3], [-1, 2, 1, -2, 3, 0], [-1, 2, 1, -2, 0, 3], [-1, 2, 3, 1, 0, -2], [-1, 2, 3, 1, -2, 0], [-1, 2, 3, 0, 1, -2], [-1, 2, 3, 0, -2, 1], [-1, 2, 3, -2, 1, 0], [-1, 2, 3, -2, 0, 1], [-1, 2, 0, 1, 3, -2], [-1, 2, 0, 1, -2, 3], [-1, 2, 0, 3, 1, -2], [-1, 2, 0, 3, -2, 1], [-1, 2, 0, -2, 1, 3], [-1, 2, 0, -2, 3, 1], [-1, 2, -2, 1, 3, 0], [-1, 2, -2, 1, 0, 3], [-1, 2, -2, 3, 1, 0], [-1, 2, -2, 3, 0, 1], [-1, 2, -2, 0, 1, 3], [-1, 2, -2, 0, 3, 1], [-1, 3, 1, 2, 0, -2], [-1, 3, 1, 2, -2, 0], [-1, 3, 1, 0, 2, -2], [-1, 3, 1, 0, -2, 2], [-1, 3, 1, -2, 2, 0], [-1, 3, 1, -2, 0, 2], [-1, 3, 2, 1, 0, -2], [-1, 3, 2, 1, -2, 0], [-1, 3, 2, 0, 1, -2], [-1, 3, 2, 0, -2, 1], [-1, 3, 2, -2, 1, 0], [-1, 3, 2, -2, 0, 1], [-1, 3, 0, 1, 2, -2], [-1, 3, 0, 1, -2, 2], [-1, 3, 0, 2, 1, -2], [-1, 3, 0, 2, -2, 1], [-1, 3, 0, -2, 1, 2], [-1, 3, 0, -2, 2, 1], [-1, 3, -2, 1, 2, 0], [-1, 3, -2, 1, 0, 2], [-1, 3, -2, 2, 1, 0], [-1, 3, -2, 2, 0, 1], [-1, 3, -2, 0, 1, 2], [-1, 3, -2, 0, 2, 1], [-1, 0, 1, 2, 3, -2], [-1, 0, 1, 2, -2, 3], [-1, 0, 1, 3, 2, -2], [-1, 0, 1, 3, -2, 2], [-1, 0, 1, -2, 2, 3], [-1, 0, 1, -2, 3, 2], [-1, 0, 2, 1, 3, -2], [-1, 0, 2, 1, -2, 3], [-1, 0, 2, 3, 1, -2], [-1, 0, 2, 3, -2, 1], [-1, 0, 2, -2, 1, 3], [-1, 0, 2, -2, 3, 1], [-1, 0, 3, 1, 2, -2], [-1, 0, 3, 1, -2, 2], [-1, 0, 3, 2, 1, -2], [-1, 0, 3, 2, -2, 1], [-1, 0, 3, -2, 1, 2], [-1, 0, 3, -2, 2, 1], [-1, 0, -2, 1, 2, 3], [-1, 0, -2, 1, 3, 2], [-1, 0, -2, 2, 1, 3], [-1, 0, -2, 2, 3, 1], [-1, 0, -2, 3, 1, 2], [-1, 0, -2, 3, 2, 1], [-1, -2, 1, 2, 3, 0], [-1, -2, 1, 2, 0, 3], [-1, -2, 1, 3, 2, 0], [-1, -2, 1, 3, 0, 2], [-1, -2, 1, 0, 2, 3], [-1, -2, 1, 0, 3, 2], [-1, -2, 2, 1, 3, 0], [-1, -2, 2, 1, 0, 3], [-1, -2, 2, 3, 1, 0], [-1, -2, 2, 3, 0, 1], [-1, -2, 2, 0, 1, 3], [-1, -2, 2, 0, 3, 1], [-1, -2, 3, 1, 2, 0], [-1, -2, 3, 1, 0, 2], [-1, -2, 3, 2, 1, 0], [-1, -2, 3, 2, 0, 1], [-1, -2, 3, 0, 1, 2], [-1, -2, 3, 0, 2, 1], [-1, -2, 0, 1, 2, 3], [-1, -2, 0, 1, 3, 2], [-1, -2, 0, 2, 1, 3], [-1, -2, 0, 2, 3, 1], [-1, -2, 0, 3, 1, 2], [-1, -2, 0, 3, 2, 1], [-2, 1, 2, 3, 0, -1], [-2, 1, 2, 3, -1, 0], [-2, 1, 2, 0, 3, -1], [-2, 1, 2, 0, -1, 3], [-2, 1, 2, -1, 3, 0], [-2, 1, 2, -1, 0, 3], [-2, 1, 3, 2, 0, -1], [-2, 1, 3, 2, -1, 0], [-2, 1, 3, 0, 2, -1], [-2, 1, 3, 0, -1, 2], [-2, 1, 3, -1, 2, 0], [-2, 1, 3, -1, 0, 2], [-2, 1, 0, 2, 3, -1], [-2, 1, 0, 2, -1, 3], [-2, 1, 0, 3, 2, -1], [-2, 1, 0, 3, -1, 2], [-2, 1, 0, -1, 2, 3], [-2, 1, 0, -1, 3, 2], [-2, 1, -1, 2, 3, 0], [-2, 1, -1, 2, 0, 3], [-2, 1, -1, 3, 2, 0], [-2, 1, -1, 3, 0, 2], [-2, 1, -1, 0, 2, 3], [-2, 1, -1, 0, 3, 2], [-2, 2, 1, 3, 0, -1], [-2, 2, 1, 3, -1, 0], [-2, 2, 1, 0, 3, -1], [-2, 2, 1, 0, -1, 3], [-2, 2, 1, -1, 3, 0], [-2, 2, 1, -1, 0, 3], [-2, 2, 3, 1, 0, -1], [-2, 2, 3, 1, -1, 0], [-2, 2, 3, 0, 1, -1], [-2, 2, 3, 0, -1, 1], [-2, 2, 3, -1, 1, 0], [-2, 2, 3, -1, 0, 1], [-2, 2, 0, 1, 3, -1], [-2, 2, 0, 1, -1, 3], [-2, 2, 0, 3, 1, -1], [-2, 2, 0, 3, -1, 1], [-2, 2, 0, -1, 1, 3], [-2, 2, 0, -1, 3, 1], [-2, 2, -1, 1, 3, 0], [-2, 2, -1, 1, 0, 3], [-2, 2, -1, 3, 1, 0], [-2, 2, -1, 3, 0, 1], [-2, 2, -1, 0, 1, 3], [-2, 2, -1, 0, 3, 1], [-2, 3, 1, 2, 0, -1], [-2, 3, 1, 2, -1, 0], [-2, 3, 1, 0, 2, -1], [-2, 3, 1, 0, -1, 2], [-2, 3, 1, -1, 2, 0], [-2, 3, 1, -1, 0, 2], [-2, 3, 2, 1, 0, -1], [-2, 3, 2, 1, -1, 0], [-2, 3, 2, 0, 1, -1], [-2, 3, 2, 0, -1, 1], [-2, 3, 2, -1, 1, 0], [-2, 3, 2, -1, 0, 1], [-2, 3, 0, 1, 2, -1], [-2, 3, 0, 1, -1, 2], [-2, 3, 0, 2, 1, -1], [-2, 3, 0, 2, -1, 1], [-2, 3, 0, -1, 1, 2], [-2, 3, 0, -1, 2, 1], [-2, 3, -1, 1, 2, 0], [-2, 3, -1, 1, 0, 2], [-2, 3, -1, 2, 1, 0], [-2, 3, -1, 2, 0, 1], [-2, 3, -1, 0, 1, 2], [-2, 3, -1, 0, 2, 1], [-2, 0, 1, 2, 3, -1], [-2, 0, 1, 2, -1, 3], [-2, 0, 1, 3, 2, -1], [-2, 0, 1, 3, -1, 2], [-2, 0, 1, -1, 2, 3], [-2, 0, 1, -1, 3, 2], [-2, 0, 2, 1, 3, -1], [-2, 0, 2, 1, -1, 3], [-2, 0, 2, 3, 1, -1], [-2, 0, 2, 3, -1, 1], [-2, 0, 2, -1, 1, 3], [-2, 0, 2, -1, 3, 1], [-2, 0, 3, 1, 2, -1], [-2, 0, 3, 1, -1, 2], [-2, 0, 3, 2, 1, -1], [-2, 0, 3, 2, -1, 1], [-2, 0, 3, -1, 1, 2], [-2, 0, 3, -1, 2, 1], [-2, 0, -1, 1, 2, 3], [-2, 0, -1, 1, 3, 2], [-2, 0, -1, 2, 1, 3], [-2, 0, -1, 2, 3, 1], [-2, 0, -1, 3, 1, 2], [-2, 0, -1, 3, 2, 1], [-2, -1, 1, 2, 3, 0], [-2, -1, 1, 2, 0, 3], [-2, -1, 1, 3, 2, 0], [-2, -1, 1, 3, 0, 2], [-2, -1, 1, 0, 2, 3], [-2, -1, 1, 0, 3, 2], [-2, -1, 2, 1, 3, 0], [-2, -1, 2, 1, 0, 3], [-2, -1, 2, 3, 1, 0], [-2, -1, 2, 3, 0, 1], [-2, -1, 2, 0, 1, 3], [-2, -1, 2, 0, 3, 1], [-2, -1, 3, 1, 2, 0], [-2, -1, 3, 1, 0, 2], [-2, -1, 3, 2, 1, 0], [-2, -1, 3, 2, 0, 1], [-2, -1, 3, 0, 1, 2], [-2, -1, 3, 0, 2, 1], [-2, -1, 0, 1, 2, 3], [-2, -1, 0, 1, 3, 2], [-2, -1, 0, 2, 1, 3], [-2, -1, 0, 2, 3, 1], [-2, -1, 0, 3, 1, 2], [-2, -1, 0, 3, 2, 1]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, 3]), [[-1, 0, 1, 2, 3], [-1, 0, 1, 3, 2], [-1, 0, 2, 1, 3], [-1, 0, 2, 3, 1], [-1, 0, 3, 1, 2], [-1, 0, 3, 2, 1], [-1, 1, 0, 2, 3], [-1, 1, 0, 3, 2], [-1, 1, 2, 0, 3], [-1, 1, 2, 3, 0], [-1, 1, 3, 0, 2], [-1, 1, 3, 2, 0], [-1, 2, 0, 1, 3], [-1, 2, 0, 3, 1], [-1, 2, 1, 0, 3], [-1, 2, 1, 3, 0], [-1, 2, 3, 0, 1], [-1, 2, 3, 1, 0], [-1, 3, 0, 1, 2], [-1, 3, 0, 2, 1], [-1, 3, 1, 0, 2], [-1, 3, 1, 2, 0], [-1, 3, 2, 0, 1], [-1, 3, 2, 1, 0], [0, -1, 1, 2, 3], [0, -1, 1, 3, 2], [0, -1, 2, 1, 3], [0, -1, 2, 3, 1], [0, -1, 3, 1, 2], [0, -1, 3, 2, 1], [0, 1, -1, 2, 3], [0, 1, -1, 3, 2], [0, 1, 2, -1, 3], [0, 1, 2, 3, -1], [0, 1, 3, -1, 2], [0, 1, 3, 2, -1], [0, 2, -1, 1, 3], [0, 2, -1, 3, 1], [0, 2, 1, -1, 3], [0, 2, 1, 3, -1], [0, 2, 3, -1, 1], [0, 2, 3, 1, -1], [0, 3, -1, 1, 2], [0, 3, -1, 2, 1], [0, 3, 1, -1, 2], [0, 3, 1, 2, -1], [0, 3, 2, -1, 1], [0, 3, 2, 1, -1], [1, -1, 0, 2, 3], [1, -1, 0, 3, 2], [1, -1, 2, 0, 3], [1, -1, 2, 3, 0], [1, -1, 3, 0, 2], [1, -1, 3, 2, 0], [1, 0, -1, 2, 3], [1, 0, -1, 3, 2], [1, 0, 2, -1, 3], [1, 0, 2, 3, -1], [1, 0, 3, -1, 2], [1, 0, 3, 2, -1], [1, 2, -1, 0, 3], [1, 2, -1, 3, 0], [1, 2, 0, -1, 3], [1, 2, 0, 3, -1], [1, 2, 3, -1, 0], [1, 2, 3, 0, -1], [1, 3, -1, 0, 2], [1, 3, -1, 2, 0], [1, 3, 0, -1, 2], [1, 3, 0, 2, -1], [1, 3, 2, -1, 0], [1, 3, 2, 0, -1], [2, -1, 0, 1, 3], [2, -1, 0, 3, 1], [2, -1, 1, 0, 3], [2, -1, 1, 3, 0], [2, -1, 3, 0, 1], [2, -1, 3, 1, 0], [2, 0, -1, 1, 3], [2, 0, -1, 3, 1], [2, 0, 1, -1, 3], [2, 0, 1, 3, -1], [2, 0, 3, -1, 1], [2, 0, 3, 1, -1], [2, 1, -1, 0, 3], [2, 1, -1, 3, 0], [2, 1, 0, -1, 3], [2, 1, 0, 3, -1], [2, 1, 3, -1, 0], [2, 1, 3, 0, -1], [2, 3, -1, 0, 1], [2, 3, -1, 1, 0], [2, 3, 0, -1, 1], [2, 3, 0, 1, -1], [2, 3, 1, -1, 0], [2, 3, 1, 0, -1], [3, -1, 0, 1, 2], [3, -1, 0, 2, 1], [3, -1, 1, 0, 2], [3, -1, 1, 2, 0], [3, -1, 2, 0, 1], [3, -1, 2, 1, 0], [3, 0, -1, 1, 2], [3, 0, -1, 2, 1], [3, 0, 1, -1, 2], [3, 0, 1, 2, -1], [3, 0, 2, -1, 1], [3, 0, 2, 1, -1], [3, 1, -1, 0, 2], [3, 1, -1, 2, 0], [3, 1, 0, -1, 2], [3, 1, 0, 2, -1], [3, 1, 2, -1, 0], [3, 1, 2, 0, -1], [3, 2, -1, 0, 1], [3, 2, -1, 1, 0], [3, 2, 0, -1, 1], [3, 2, 0, 1, -1], [3, 2, 1, -1, 0], [3, 2, 1, 0, -1]])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1]), [[5, 4, 3, 2, 1], [5, 4, 3, 1, 2], [5, 4, 2, 3, 1], [5, 4, 2, 1, 3], [5, 4, 1, 3, 2], [5, 4, 1, 2, 3], [5, 3, 4, 2, 1], [5, 3, 4, 1, 2], [5, 3, 2, 4, 1], [5, 3, 2, 1, 4], [5, 3, 1, 4, 2], [5, 3, 1, 2, 4], [5, 2, 4, 3, 1], [5, 2, 4, 1, 3], [5, 2, 3, 4, 1], [5, 2, 3, 1, 4], [5, 2, 1, 4, 3], [5, 2, 1, 3, 4], [5, 1, 4, 3, 2], [5, 1, 4, 2, 3], [5, 1, 3, 4, 2], [5, 1, 3, 2, 4], [5, 1, 2, 4, 3], [5, 1, 2, 3, 4], [4, 5, 3, 2, 1], [4, 5, 3, 1, 2], [4, 5, 2, 3, 1], [4, 5, 2, 1, 3], [4, 5, 1, 3, 2], [4, 5, 1, 2, 3], [4, 3, 5, 2, 1], [4, 3, 5, 1, 2], [4, 3, 2, 5, 1], [4, 3, 2, 1, 5], [4, 3, 1, 5, 2], [4, 3, 1, 2, 5], [4, 2, 5, 3, 1], [4, 2, 5, 1, 3], [4, 2, 3, 5, 1], [4, 2, 3, 1, 5], [4, 2, 1, 5, 3], [4, 2, 1, 3, 5], [4, 1, 5, 3, 2], [4, 1, 5, 2, 3], [4, 1, 3, 5, 2], [4, 1, 3, 2, 5], [4, 1, 2, 5, 3], [4, 1, 2, 3, 5], [3, 5, 4, 2, 1], [3, 5, 4, 1, 2], [3, 5, 2, 4, 1], [3, 5, 2, 1, 4], [3, 5, 1, 4, 2], [3, 5, 1, 2, 4], [3, 4, 5, 2, 1], [3, 4, 5, 1, 2], [3, 4, 2, 5, 1], [3, 4, 2, 1, 5], [3, 4, 1, 5, 2], [3, 4, 1, 2, 5], [3, 2, 5, 4, 1], [3, 2, 5, 1, 4], [3, 2, 4, 5, 1], [3, 2, 4, 1, 5], [3, 2, 1, 5, 4], [3, 2, 1, 4, 5], [3, 1, 5, 4, 2], [3, 1, 5, 2, 4], [3, 1, 4, 5, 2], [3, 1, 4, 2, 5], [3, 1, 2, 5, 4], [3, 1, 2, 4, 5], [2, 5, 4, 3, 1], [2, 5, 4, 1, 3], [2, 5, 3, 4, 1], [2, 5, 3, 1, 4], [2, 5, 1, 4, 3], [2, 5, 1, 3, 4], [2, 4, 5, 3, 1], [2, 4, 5, 1, 3], [2, 4, 3, 5, 1], [2, 4, 3, 1, 5], [2, 4, 1, 5, 3], [2, 4, 1, 3, 5], [2, 3, 5, 4, 1], [2, 3, 5, 1, 4], [2, 3, 4, 5, 1], [2, 3, 4, 1, 5], [2, 3, 1, 5, 4], [2, 3, 1, 4, 5], [2, 1, 5, 4, 3], [2, 1, 5, 3, 4], [2, 1, 4, 5, 3], [2, 1, 4, 3, 5], [2, 1, 3, 5, 4], [2, 1, 3, 4, 5], [1, 5, 4, 3, 2], [1, 5, 4, 2, 3], [1, 5, 3, 4, 2], [1, 5, 3, 2, 4], [1, 5, 2, 4, 3], [1, 5, 2, 3, 4], [1, 4, 5, 3, 2], [1, 4, 5, 2, 3], [1, 4, 3, 5, 2], [1, 4, 3, 2, 5], [1, 4, 2, 5, 3], [1, 4, 2, 3, 5], [1, 3, 5, 4, 2], [1, 3, 5, 2, 4], [1, 3, 4, 5, 2], [1, 3, 4, 2, 5], [1, 3, 2, 5, 4], [1, 3, 2, 4, 5], [1, 2, 5, 4, 3], [1, 2, 5, 3, 4], [1, 2, 4, 5, 3], [1, 2, 4, 3, 5], [1, 2, 3, 5, 4], [1, 2, 3, 4, 5]])\n assert answers_match(candidate(nums=[6, 3, -1, 2, 0, -4]), [[6, 3, -1, 2, 0, -4], [6, 3, -1, 2, -4, 0], [6, 3, -1, 0, 2, -4], [6, 3, -1, 0, -4, 2], [6, 3, -1, -4, 2, 0], [6, 3, -1, -4, 0, 2], [6, 3, 2, -1, 0, -4], [6, 3, 2, -1, -4, 0], [6, 3, 2, 0, -1, -4], [6, 3, 2, 0, -4, -1], [6, 3, 2, -4, -1, 0], [6, 3, 2, -4, 0, -1], [6, 3, 0, -1, 2, -4], [6, 3, 0, -1, -4, 2], [6, 3, 0, 2, -1, -4], [6, 3, 0, 2, -4, -1], [6, 3, 0, -4, -1, 2], [6, 3, 0, -4, 2, -1], [6, 3, -4, -1, 2, 0], [6, 3, -4, -1, 0, 2], [6, 3, -4, 2, -1, 0], [6, 3, -4, 2, 0, -1], [6, 3, -4, 0, -1, 2], [6, 3, -4, 0, 2, -1], [6, -1, 3, 2, 0, -4], [6, -1, 3, 2, -4, 0], [6, -1, 3, 0, 2, -4], [6, -1, 3, 0, -4, 2], [6, -1, 3, -4, 2, 0], [6, -1, 3, -4, 0, 2], [6, -1, 2, 3, 0, -4], [6, -1, 2, 3, -4, 0], [6, -1, 2, 0, 3, -4], [6, -1, 2, 0, -4, 3], [6, -1, 2, -4, 3, 0], [6, -1, 2, -4, 0, 3], [6, -1, 0, 3, 2, -4], [6, -1, 0, 3, -4, 2], [6, -1, 0, 2, 3, -4], [6, -1, 0, 2, -4, 3], [6, -1, 0, -4, 3, 2], [6, -1, 0, -4, 2, 3], [6, -1, -4, 3, 2, 0], [6, -1, -4, 3, 0, 2], [6, -1, -4, 2, 3, 0], [6, -1, -4, 2, 0, 3], [6, -1, -4, 0, 3, 2], [6, -1, -4, 0, 2, 3], [6, 2, 3, -1, 0, -4], [6, 2, 3, -1, -4, 0], [6, 2, 3, 0, -1, -4], [6, 2, 3, 0, -4, -1], [6, 2, 3, -4, -1, 0], [6, 2, 3, -4, 0, -1], [6, 2, -1, 3, 0, -4], [6, 2, -1, 3, -4, 0], [6, 2, -1, 0, 3, -4], [6, 2, -1, 0, -4, 3], [6, 2, -1, -4, 3, 0], [6, 2, -1, -4, 0, 3], [6, 2, 0, 3, -1, -4], [6, 2, 0, 3, -4, -1], [6, 2, 0, -1, 3, -4], [6, 2, 0, -1, -4, 3], [6, 2, 0, -4, 3, -1], [6, 2, 0, -4, -1, 3], [6, 2, -4, 3, -1, 0], [6, 2, -4, 3, 0, -1], [6, 2, -4, -1, 3, 0], [6, 2, -4, -1, 0, 3], [6, 2, -4, 0, 3, -1], [6, 2, -4, 0, -1, 3], [6, 0, 3, -1, 2, -4], [6, 0, 3, -1, -4, 2], [6, 0, 3, 2, -1, -4], [6, 0, 3, 2, -4, -1], [6, 0, 3, -4, -1, 2], [6, 0, 3, -4, 2, -1], [6, 0, -1, 3, 2, -4], [6, 0, -1, 3, -4, 2], [6, 0, -1, 2, 3, -4], [6, 0, -1, 2, -4, 3], [6, 0, -1, -4, 3, 2], [6, 0, -1, -4, 2, 3], [6, 0, 2, 3, -1, -4], [6, 0, 2, 3, -4, -1], [6, 0, 2, -1, 3, -4], [6, 0, 2, -1, -4, 3], [6, 0, 2, -4, 3, -1], [6, 0, 2, -4, -1, 3], [6, 0, -4, 3, -1, 2], [6, 0, -4, 3, 2, -1], [6, 0, -4, -1, 3, 2], [6, 0, -4, -1, 2, 3], [6, 0, -4, 2, 3, -1], [6, 0, -4, 2, -1, 3], [6, -4, 3, -1, 2, 0], [6, -4, 3, -1, 0, 2], [6, -4, 3, 2, -1, 0], [6, -4, 3, 2, 0, -1], [6, -4, 3, 0, -1, 2], [6, -4, 3, 0, 2, -1], [6, -4, -1, 3, 2, 0], [6, -4, -1, 3, 0, 2], [6, -4, -1, 2, 3, 0], [6, -4, -1, 2, 0, 3], [6, -4, -1, 0, 3, 2], [6, -4, -1, 0, 2, 3], [6, -4, 2, 3, -1, 0], [6, -4, 2, 3, 0, -1], [6, -4, 2, -1, 3, 0], [6, -4, 2, -1, 0, 3], [6, -4, 2, 0, 3, -1], [6, -4, 2, 0, -1, 3], [6, -4, 0, 3, -1, 2], [6, -4, 0, 3, 2, -1], [6, -4, 0, -1, 3, 2], [6, -4, 0, -1, 2, 3], [6, -4, 0, 2, 3, -1], [6, -4, 0, 2, -1, 3], [3, 6, -1, 2, 0, -4], [3, 6, -1, 2, -4, 0], [3, 6, -1, 0, 2, -4], [3, 6, -1, 0, -4, 2], [3, 6, -1, -4, 2, 0], [3, 6, -1, -4, 0, 2], [3, 6, 2, -1, 0, -4], [3, 6, 2, -1, -4, 0], [3, 6, 2, 0, -1, -4], [3, 6, 2, 0, -4, -1], [3, 6, 2, -4, -1, 0], [3, 6, 2, -4, 0, -1], [3, 6, 0, -1, 2, -4], [3, 6, 0, -1, -4, 2], [3, 6, 0, 2, -1, -4], [3, 6, 0, 2, -4, -1], [3, 6, 0, -4, -1, 2], [3, 6, 0, -4, 2, -1], [3, 6, -4, -1, 2, 0], [3, 6, -4, -1, 0, 2], [3, 6, -4, 2, -1, 0], [3, 6, -4, 2, 0, -1], [3, 6, -4, 0, -1, 2], [3, 6, -4, 0, 2, -1], [3, -1, 6, 2, 0, -4], [3, -1, 6, 2, -4, 0], [3, -1, 6, 0, 2, -4], [3, -1, 6, 0, -4, 2], [3, -1, 6, -4, 2, 0], [3, -1, 6, -4, 0, 2], [3, -1, 2, 6, 0, -4], [3, -1, 2, 6, -4, 0], [3, -1, 2, 0, 6, -4], [3, -1, 2, 0, -4, 6], [3, -1, 2, -4, 6, 0], [3, -1, 2, -4, 0, 6], [3, -1, 0, 6, 2, -4], [3, -1, 0, 6, -4, 2], [3, -1, 0, 2, 6, -4], [3, -1, 0, 2, -4, 6], [3, -1, 0, -4, 6, 2], [3, -1, 0, -4, 2, 6], [3, -1, -4, 6, 2, 0], [3, -1, -4, 6, 0, 2], [3, -1, -4, 2, 6, 0], [3, -1, -4, 2, 0, 6], [3, -1, -4, 0, 6, 2], [3, -1, -4, 0, 2, 6], [3, 2, 6, -1, 0, -4], [3, 2, 6, -1, -4, 0], [3, 2, 6, 0, -1, -4], [3, 2, 6, 0, -4, -1], [3, 2, 6, -4, -1, 0], [3, 2, 6, -4, 0, -1], [3, 2, -1, 6, 0, -4], [3, 2, -1, 6, -4, 0], [3, 2, -1, 0, 6, -4], [3, 2, -1, 0, -4, 6], [3, 2, -1, -4, 6, 0], [3, 2, -1, -4, 0, 6], [3, 2, 0, 6, -1, -4], [3, 2, 0, 6, -4, -1], [3, 2, 0, -1, 6, -4], [3, 2, 0, -1, -4, 6], [3, 2, 0, -4, 6, -1], [3, 2, 0, -4, -1, 6], [3, 2, -4, 6, -1, 0], [3, 2, -4, 6, 0, -1], [3, 2, -4, -1, 6, 0], [3, 2, -4, -1, 0, 6], [3, 2, -4, 0, 6, -1], [3, 2, -4, 0, -1, 6], [3, 0, 6, -1, 2, -4], [3, 0, 6, -1, -4, 2], [3, 0, 6, 2, -1, -4], [3, 0, 6, 2, -4, -1], [3, 0, 6, -4, -1, 2], [3, 0, 6, -4, 2, -1], [3, 0, -1, 6, 2, -4], [3, 0, -1, 6, -4, 2], [3, 0, -1, 2, 6, -4], [3, 0, -1, 2, -4, 6], [3, 0, -1, -4, 6, 2], [3, 0, -1, -4, 2, 6], [3, 0, 2, 6, -1, -4], [3, 0, 2, 6, -4, -1], [3, 0, 2, -1, 6, -4], [3, 0, 2, -1, -4, 6], [3, 0, 2, -4, 6, -1], [3, 0, 2, -4, -1, 6], [3, 0, -4, 6, -1, 2], [3, 0, -4, 6, 2, -1], [3, 0, -4, -1, 6, 2], [3, 0, -4, -1, 2, 6], [3, 0, -4, 2, 6, -1], [3, 0, -4, 2, -1, 6], [3, -4, 6, -1, 2, 0], [3, -4, 6, -1, 0, 2], [3, -4, 6, 2, -1, 0], [3, -4, 6, 2, 0, -1], [3, -4, 6, 0, -1, 2], [3, -4, 6, 0, 2, -1], [3, -4, -1, 6, 2, 0], [3, -4, -1, 6, 0, 2], [3, -4, -1, 2, 6, 0], [3, -4, -1, 2, 0, 6], [3, -4, -1, 0, 6, 2], [3, -4, -1, 0, 2, 6], [3, -4, 2, 6, -1, 0], [3, -4, 2, 6, 0, -1], [3, -4, 2, -1, 6, 0], [3, -4, 2, -1, 0, 6], [3, -4, 2, 0, 6, -1], [3, -4, 2, 0, -1, 6], [3, -4, 0, 6, -1, 2], [3, -4, 0, 6, 2, -1], [3, -4, 0, -1, 6, 2], [3, -4, 0, -1, 2, 6], [3, -4, 0, 2, 6, -1], [3, -4, 0, 2, -1, 6], [-1, 6, 3, 2, 0, -4], [-1, 6, 3, 2, -4, 0], [-1, 6, 3, 0, 2, -4], [-1, 6, 3, 0, -4, 2], [-1, 6, 3, -4, 2, 0], [-1, 6, 3, -4, 0, 2], [-1, 6, 2, 3, 0, -4], [-1, 6, 2, 3, -4, 0], [-1, 6, 2, 0, 3, -4], [-1, 6, 2, 0, -4, 3], [-1, 6, 2, -4, 3, 0], [-1, 6, 2, -4, 0, 3], [-1, 6, 0, 3, 2, -4], [-1, 6, 0, 3, -4, 2], [-1, 6, 0, 2, 3, -4], [-1, 6, 0, 2, -4, 3], [-1, 6, 0, -4, 3, 2], [-1, 6, 0, -4, 2, 3], [-1, 6, -4, 3, 2, 0], [-1, 6, -4, 3, 0, 2], [-1, 6, -4, 2, 3, 0], [-1, 6, -4, 2, 0, 3], [-1, 6, -4, 0, 3, 2], [-1, 6, -4, 0, 2, 3], [-1, 3, 6, 2, 0, -4], [-1, 3, 6, 2, -4, 0], [-1, 3, 6, 0, 2, -4], [-1, 3, 6, 0, -4, 2], [-1, 3, 6, -4, 2, 0], [-1, 3, 6, -4, 0, 2], [-1, 3, 2, 6, 0, -4], [-1, 3, 2, 6, -4, 0], [-1, 3, 2, 0, 6, -4], [-1, 3, 2, 0, -4, 6], [-1, 3, 2, -4, 6, 0], [-1, 3, 2, -4, 0, 6], [-1, 3, 0, 6, 2, -4], [-1, 3, 0, 6, -4, 2], [-1, 3, 0, 2, 6, -4], [-1, 3, 0, 2, -4, 6], [-1, 3, 0, -4, 6, 2], [-1, 3, 0, -4, 2, 6], [-1, 3, -4, 6, 2, 0], [-1, 3, -4, 6, 0, 2], [-1, 3, -4, 2, 6, 0], [-1, 3, -4, 2, 0, 6], [-1, 3, -4, 0, 6, 2], [-1, 3, -4, 0, 2, 6], [-1, 2, 6, 3, 0, -4], [-1, 2, 6, 3, -4, 0], [-1, 2, 6, 0, 3, -4], [-1, 2, 6, 0, -4, 3], [-1, 2, 6, -4, 3, 0], [-1, 2, 6, -4, 0, 3], [-1, 2, 3, 6, 0, -4], [-1, 2, 3, 6, -4, 0], [-1, 2, 3, 0, 6, -4], [-1, 2, 3, 0, -4, 6], [-1, 2, 3, -4, 6, 0], [-1, 2, 3, -4, 0, 6], [-1, 2, 0, 6, 3, -4], [-1, 2, 0, 6, -4, 3], [-1, 2, 0, 3, 6, -4], [-1, 2, 0, 3, -4, 6], [-1, 2, 0, -4, 6, 3], [-1, 2, 0, -4, 3, 6], [-1, 2, -4, 6, 3, 0], [-1, 2, -4, 6, 0, 3], [-1, 2, -4, 3, 6, 0], [-1, 2, -4, 3, 0, 6], [-1, 2, -4, 0, 6, 3], [-1, 2, -4, 0, 3, 6], [-1, 0, 6, 3, 2, -4], [-1, 0, 6, 3, -4, 2], [-1, 0, 6, 2, 3, -4], [-1, 0, 6, 2, -4, 3], [-1, 0, 6, -4, 3, 2], [-1, 0, 6, -4, 2, 3], [-1, 0, 3, 6, 2, -4], [-1, 0, 3, 6, -4, 2], [-1, 0, 3, 2, 6, -4], [-1, 0, 3, 2, -4, 6], [-1, 0, 3, -4, 6, 2], [-1, 0, 3, -4, 2, 6], [-1, 0, 2, 6, 3, -4], [-1, 0, 2, 6, -4, 3], [-1, 0, 2, 3, 6, -4], [-1, 0, 2, 3, -4, 6], [-1, 0, 2, -4, 6, 3], [-1, 0, 2, -4, 3, 6], [-1, 0, -4, 6, 3, 2], [-1, 0, -4, 6, 2, 3], [-1, 0, -4, 3, 6, 2], [-1, 0, -4, 3, 2, 6], [-1, 0, -4, 2, 6, 3], [-1, 0, -4, 2, 3, 6], [-1, -4, 6, 3, 2, 0], [-1, -4, 6, 3, 0, 2], [-1, -4, 6, 2, 3, 0], [-1, -4, 6, 2, 0, 3], [-1, -4, 6, 0, 3, 2], [-1, -4, 6, 0, 2, 3], [-1, -4, 3, 6, 2, 0], [-1, -4, 3, 6, 0, 2], [-1, -4, 3, 2, 6, 0], [-1, -4, 3, 2, 0, 6], [-1, -4, 3, 0, 6, 2], [-1, -4, 3, 0, 2, 6], [-1, -4, 2, 6, 3, 0], [-1, -4, 2, 6, 0, 3], [-1, -4, 2, 3, 6, 0], [-1, -4, 2, 3, 0, 6], [-1, -4, 2, 0, 6, 3], [-1, -4, 2, 0, 3, 6], [-1, -4, 0, 6, 3, 2], [-1, -4, 0, 6, 2, 3], [-1, -4, 0, 3, 6, 2], [-1, -4, 0, 3, 2, 6], [-1, -4, 0, 2, 6, 3], [-1, -4, 0, 2, 3, 6], [2, 6, 3, -1, 0, -4], [2, 6, 3, -1, -4, 0], [2, 6, 3, 0, -1, -4], [2, 6, 3, 0, -4, -1], [2, 6, 3, -4, -1, 0], [2, 6, 3, -4, 0, -1], [2, 6, -1, 3, 0, -4], [2, 6, -1, 3, -4, 0], [2, 6, -1, 0, 3, -4], [2, 6, -1, 0, -4, 3], [2, 6, -1, -4, 3, 0], [2, 6, -1, -4, 0, 3], [2, 6, 0, 3, -1, -4], [2, 6, 0, 3, -4, -1], [2, 6, 0, -1, 3, -4], [2, 6, 0, -1, -4, 3], [2, 6, 0, -4, 3, -1], [2, 6, 0, -4, -1, 3], [2, 6, -4, 3, -1, 0], [2, 6, -4, 3, 0, -1], [2, 6, -4, -1, 3, 0], [2, 6, -4, -1, 0, 3], [2, 6, -4, 0, 3, -1], [2, 6, -4, 0, -1, 3], [2, 3, 6, -1, 0, -4], [2, 3, 6, -1, -4, 0], [2, 3, 6, 0, -1, -4], [2, 3, 6, 0, -4, -1], [2, 3, 6, -4, -1, 0], [2, 3, 6, -4, 0, -1], [2, 3, -1, 6, 0, -4], [2, 3, -1, 6, -4, 0], [2, 3, -1, 0, 6, -4], [2, 3, -1, 0, -4, 6], [2, 3, -1, -4, 6, 0], [2, 3, -1, -4, 0, 6], [2, 3, 0, 6, -1, -4], [2, 3, 0, 6, -4, -1], [2, 3, 0, -1, 6, -4], [2, 3, 0, -1, -4, 6], [2, 3, 0, -4, 6, -1], [2, 3, 0, -4, -1, 6], [2, 3, -4, 6, -1, 0], [2, 3, -4, 6, 0, -1], [2, 3, -4, -1, 6, 0], [2, 3, -4, -1, 0, 6], [2, 3, -4, 0, 6, -1], [2, 3, -4, 0, -1, 6], [2, -1, 6, 3, 0, -4], [2, -1, 6, 3, -4, 0], [2, -1, 6, 0, 3, -4], [2, -1, 6, 0, -4, 3], [2, -1, 6, -4, 3, 0], [2, -1, 6, -4, 0, 3], [2, -1, 3, 6, 0, -4], [2, -1, 3, 6, -4, 0], [2, -1, 3, 0, 6, -4], [2, -1, 3, 0, -4, 6], [2, -1, 3, -4, 6, 0], [2, -1, 3, -4, 0, 6], [2, -1, 0, 6, 3, -4], [2, -1, 0, 6, -4, 3], [2, -1, 0, 3, 6, -4], [2, -1, 0, 3, -4, 6], [2, -1, 0, -4, 6, 3], [2, -1, 0, -4, 3, 6], [2, -1, -4, 6, 3, 0], [2, -1, -4, 6, 0, 3], [2, -1, -4, 3, 6, 0], [2, -1, -4, 3, 0, 6], [2, -1, -4, 0, 6, 3], [2, -1, -4, 0, 3, 6], [2, 0, 6, 3, -1, -4], [2, 0, 6, 3, -4, -1], [2, 0, 6, -1, 3, -4], [2, 0, 6, -1, -4, 3], [2, 0, 6, -4, 3, -1], [2, 0, 6, -4, -1, 3], [2, 0, 3, 6, -1, -4], [2, 0, 3, 6, -4, -1], [2, 0, 3, -1, 6, -4], [2, 0, 3, -1, -4, 6], [2, 0, 3, -4, 6, -1], [2, 0, 3, -4, -1, 6], [2, 0, -1, 6, 3, -4], [2, 0, -1, 6, -4, 3], [2, 0, -1, 3, 6, -4], [2, 0, -1, 3, -4, 6], [2, 0, -1, -4, 6, 3], [2, 0, -1, -4, 3, 6], [2, 0, -4, 6, 3, -1], [2, 0, -4, 6, -1, 3], [2, 0, -4, 3, 6, -1], [2, 0, -4, 3, -1, 6], [2, 0, -4, -1, 6, 3], [2, 0, -4, -1, 3, 6], [2, -4, 6, 3, -1, 0], [2, -4, 6, 3, 0, -1], [2, -4, 6, -1, 3, 0], [2, -4, 6, -1, 0, 3], [2, -4, 6, 0, 3, -1], [2, -4, 6, 0, -1, 3], [2, -4, 3, 6, -1, 0], [2, -4, 3, 6, 0, -1], [2, -4, 3, -1, 6, 0], [2, -4, 3, -1, 0, 6], [2, -4, 3, 0, 6, -1], [2, -4, 3, 0, -1, 6], [2, -4, -1, 6, 3, 0], [2, -4, -1, 6, 0, 3], [2, -4, -1, 3, 6, 0], [2, -4, -1, 3, 0, 6], [2, -4, -1, 0, 6, 3], [2, -4, -1, 0, 3, 6], [2, -4, 0, 6, 3, -1], [2, -4, 0, 6, -1, 3], [2, -4, 0, 3, 6, -1], [2, -4, 0, 3, -1, 6], [2, -4, 0, -1, 6, 3], [2, -4, 0, -1, 3, 6], [0, 6, 3, -1, 2, -4], [0, 6, 3, -1, -4, 2], [0, 6, 3, 2, -1, -4], [0, 6, 3, 2, -4, -1], [0, 6, 3, -4, -1, 2], [0, 6, 3, -4, 2, -1], [0, 6, -1, 3, 2, -4], [0, 6, -1, 3, -4, 2], [0, 6, -1, 2, 3, -4], [0, 6, -1, 2, -4, 3], [0, 6, -1, -4, 3, 2], [0, 6, -1, -4, 2, 3], [0, 6, 2, 3, -1, -4], [0, 6, 2, 3, -4, -1], [0, 6, 2, -1, 3, -4], [0, 6, 2, -1, -4, 3], [0, 6, 2, -4, 3, -1], [0, 6, 2, -4, -1, 3], [0, 6, -4, 3, -1, 2], [0, 6, -4, 3, 2, -1], [0, 6, -4, -1, 3, 2], [0, 6, -4, -1, 2, 3], [0, 6, -4, 2, 3, -1], [0, 6, -4, 2, -1, 3], [0, 3, 6, -1, 2, -4], [0, 3, 6, -1, -4, 2], [0, 3, 6, 2, -1, -4], [0, 3, 6, 2, -4, -1], [0, 3, 6, -4, -1, 2], [0, 3, 6, -4, 2, -1], [0, 3, -1, 6, 2, -4], [0, 3, -1, 6, -4, 2], [0, 3, -1, 2, 6, -4], [0, 3, -1, 2, -4, 6], [0, 3, -1, -4, 6, 2], [0, 3, -1, -4, 2, 6], [0, 3, 2, 6, -1, -4], [0, 3, 2, 6, -4, -1], [0, 3, 2, -1, 6, -4], [0, 3, 2, -1, -4, 6], [0, 3, 2, -4, 6, -1], [0, 3, 2, -4, -1, 6], [0, 3, -4, 6, -1, 2], [0, 3, -4, 6, 2, -1], [0, 3, -4, -1, 6, 2], [0, 3, -4, -1, 2, 6], [0, 3, -4, 2, 6, -1], [0, 3, -4, 2, -1, 6], [0, -1, 6, 3, 2, -4], [0, -1, 6, 3, -4, 2], [0, -1, 6, 2, 3, -4], [0, -1, 6, 2, -4, 3], [0, -1, 6, -4, 3, 2], [0, -1, 6, -4, 2, 3], [0, -1, 3, 6, 2, -4], [0, -1, 3, 6, -4, 2], [0, -1, 3, 2, 6, -4], [0, -1, 3, 2, -4, 6], [0, -1, 3, -4, 6, 2], [0, -1, 3, -4, 2, 6], [0, -1, 2, 6, 3, -4], [0, -1, 2, 6, -4, 3], [0, -1, 2, 3, 6, -4], [0, -1, 2, 3, -4, 6], [0, -1, 2, -4, 6, 3], [0, -1, 2, -4, 3, 6], [0, -1, -4, 6, 3, 2], [0, -1, -4, 6, 2, 3], [0, -1, -4, 3, 6, 2], [0, -1, -4, 3, 2, 6], [0, -1, -4, 2, 6, 3], [0, -1, -4, 2, 3, 6], [0, 2, 6, 3, -1, -4], [0, 2, 6, 3, -4, -1], [0, 2, 6, -1, 3, -4], [0, 2, 6, -1, -4, 3], [0, 2, 6, -4, 3, -1], [0, 2, 6, -4, -1, 3], [0, 2, 3, 6, -1, -4], [0, 2, 3, 6, -4, -1], [0, 2, 3, -1, 6, -4], [0, 2, 3, -1, -4, 6], [0, 2, 3, -4, 6, -1], [0, 2, 3, -4, -1, 6], [0, 2, -1, 6, 3, -4], [0, 2, -1, 6, -4, 3], [0, 2, -1, 3, 6, -4], [0, 2, -1, 3, -4, 6], [0, 2, -1, -4, 6, 3], [0, 2, -1, -4, 3, 6], [0, 2, -4, 6, 3, -1], [0, 2, -4, 6, -1, 3], [0, 2, -4, 3, 6, -1], [0, 2, -4, 3, -1, 6], [0, 2, -4, -1, 6, 3], [0, 2, -4, -1, 3, 6], [0, -4, 6, 3, -1, 2], [0, -4, 6, 3, 2, -1], [0, -4, 6, -1, 3, 2], [0, -4, 6, -1, 2, 3], [0, -4, 6, 2, 3, -1], [0, -4, 6, 2, -1, 3], [0, -4, 3, 6, -1, 2], [0, -4, 3, 6, 2, -1], [0, -4, 3, -1, 6, 2], [0, -4, 3, -1, 2, 6], [0, -4, 3, 2, 6, -1], [0, -4, 3, 2, -1, 6], [0, -4, -1, 6, 3, 2], [0, -4, -1, 6, 2, 3], [0, -4, -1, 3, 6, 2], [0, -4, -1, 3, 2, 6], [0, -4, -1, 2, 6, 3], [0, -4, -1, 2, 3, 6], [0, -4, 2, 6, 3, -1], [0, -4, 2, 6, -1, 3], [0, -4, 2, 3, 6, -1], [0, -4, 2, 3, -1, 6], [0, -4, 2, -1, 6, 3], [0, -4, 2, -1, 3, 6], [-4, 6, 3, -1, 2, 0], [-4, 6, 3, -1, 0, 2], [-4, 6, 3, 2, -1, 0], [-4, 6, 3, 2, 0, -1], [-4, 6, 3, 0, -1, 2], [-4, 6, 3, 0, 2, -1], [-4, 6, -1, 3, 2, 0], [-4, 6, -1, 3, 0, 2], [-4, 6, -1, 2, 3, 0], [-4, 6, -1, 2, 0, 3], [-4, 6, -1, 0, 3, 2], [-4, 6, -1, 0, 2, 3], [-4, 6, 2, 3, -1, 0], [-4, 6, 2, 3, 0, -1], [-4, 6, 2, -1, 3, 0], [-4, 6, 2, -1, 0, 3], [-4, 6, 2, 0, 3, -1], [-4, 6, 2, 0, -1, 3], [-4, 6, 0, 3, -1, 2], [-4, 6, 0, 3, 2, -1], [-4, 6, 0, -1, 3, 2], [-4, 6, 0, -1, 2, 3], [-4, 6, 0, 2, 3, -1], [-4, 6, 0, 2, -1, 3], [-4, 3, 6, -1, 2, 0], [-4, 3, 6, -1, 0, 2], [-4, 3, 6, 2, -1, 0], [-4, 3, 6, 2, 0, -1], [-4, 3, 6, 0, -1, 2], [-4, 3, 6, 0, 2, -1], [-4, 3, -1, 6, 2, 0], [-4, 3, -1, 6, 0, 2], [-4, 3, -1, 2, 6, 0], [-4, 3, -1, 2, 0, 6], [-4, 3, -1, 0, 6, 2], [-4, 3, -1, 0, 2, 6], [-4, 3, 2, 6, -1, 0], [-4, 3, 2, 6, 0, -1], [-4, 3, 2, -1, 6, 0], [-4, 3, 2, -1, 0, 6], [-4, 3, 2, 0, 6, -1], [-4, 3, 2, 0, -1, 6], [-4, 3, 0, 6, -1, 2], [-4, 3, 0, 6, 2, -1], [-4, 3, 0, -1, 6, 2], [-4, 3, 0, -1, 2, 6], [-4, 3, 0, 2, 6, -1], [-4, 3, 0, 2, -1, 6], [-4, -1, 6, 3, 2, 0], [-4, -1, 6, 3, 0, 2], [-4, -1, 6, 2, 3, 0], [-4, -1, 6, 2, 0, 3], [-4, -1, 6, 0, 3, 2], [-4, -1, 6, 0, 2, 3], [-4, -1, 3, 6, 2, 0], [-4, -1, 3, 6, 0, 2], [-4, -1, 3, 2, 6, 0], [-4, -1, 3, 2, 0, 6], [-4, -1, 3, 0, 6, 2], [-4, -1, 3, 0, 2, 6], [-4, -1, 2, 6, 3, 0], [-4, -1, 2, 6, 0, 3], [-4, -1, 2, 3, 6, 0], [-4, -1, 2, 3, 0, 6], [-4, -1, 2, 0, 6, 3], [-4, -1, 2, 0, 3, 6], [-4, -1, 0, 6, 3, 2], [-4, -1, 0, 6, 2, 3], [-4, -1, 0, 3, 6, 2], [-4, -1, 0, 3, 2, 6], [-4, -1, 0, 2, 6, 3], [-4, -1, 0, 2, 3, 6], [-4, 2, 6, 3, -1, 0], [-4, 2, 6, 3, 0, -1], [-4, 2, 6, -1, 3, 0], [-4, 2, 6, -1, 0, 3], [-4, 2, 6, 0, 3, -1], [-4, 2, 6, 0, -1, 3], [-4, 2, 3, 6, -1, 0], [-4, 2, 3, 6, 0, -1], [-4, 2, 3, -1, 6, 0], [-4, 2, 3, -1, 0, 6], [-4, 2, 3, 0, 6, -1], [-4, 2, 3, 0, -1, 6], [-4, 2, -1, 6, 3, 0], [-4, 2, -1, 6, 0, 3], [-4, 2, -1, 3, 6, 0], [-4, 2, -1, 3, 0, 6], [-4, 2, -1, 0, 6, 3], [-4, 2, -1, 0, 3, 6], [-4, 2, 0, 6, 3, -1], [-4, 2, 0, 6, -1, 3], [-4, 2, 0, 3, 6, -1], [-4, 2, 0, 3, -1, 6], [-4, 2, 0, -1, 6, 3], [-4, 2, 0, -1, 3, 6], [-4, 0, 6, 3, -1, 2], [-4, 0, 6, 3, 2, -1], [-4, 0, 6, -1, 3, 2], [-4, 0, 6, -1, 2, 3], [-4, 0, 6, 2, 3, -1], [-4, 0, 6, 2, -1, 3], [-4, 0, 3, 6, -1, 2], [-4, 0, 3, 6, 2, -1], [-4, 0, 3, -1, 6, 2], [-4, 0, 3, -1, 2, 6], [-4, 0, 3, 2, 6, -1], [-4, 0, 3, 2, -1, 6], [-4, 0, -1, 6, 3, 2], [-4, 0, -1, 6, 2, 3], [-4, 0, -1, 3, 6, 2], [-4, 0, -1, 3, 2, 6], [-4, 0, -1, 2, 6, 3], [-4, 0, -1, 2, 3, 6], [-4, 0, 2, 6, 3, -1], [-4, 0, 2, 6, -1, 3], [-4, 0, 2, 3, 6, -1], [-4, 0, 2, 3, -1, 6], [-4, 0, 2, -1, 6, 3], [-4, 0, 2, -1, 3, 6]])\n assert answers_match(candidate(nums=[7, 3, 5, 9, 1, 4]), [[7, 3, 5, 9, 1, 4], [7, 3, 5, 9, 4, 1], [7, 3, 5, 1, 9, 4], [7, 3, 5, 1, 4, 9], [7, 3, 5, 4, 9, 1], [7, 3, 5, 4, 1, 9], [7, 3, 9, 5, 1, 4], [7, 3, 9, 5, 4, 1], [7, 3, 9, 1, 5, 4], [7, 3, 9, 1, 4, 5], [7, 3, 9, 4, 5, 1], [7, 3, 9, 4, 1, 5], [7, 3, 1, 5, 9, 4], [7, 3, 1, 5, 4, 9], [7, 3, 1, 9, 5, 4], [7, 3, 1, 9, 4, 5], [7, 3, 1, 4, 5, 9], [7, 3, 1, 4, 9, 5], [7, 3, 4, 5, 9, 1], [7, 3, 4, 5, 1, 9], [7, 3, 4, 9, 5, 1], [7, 3, 4, 9, 1, 5], [7, 3, 4, 1, 5, 9], [7, 3, 4, 1, 9, 5], [7, 5, 3, 9, 1, 4], [7, 5, 3, 9, 4, 1], [7, 5, 3, 1, 9, 4], [7, 5, 3, 1, 4, 9], [7, 5, 3, 4, 9, 1], [7, 5, 3, 4, 1, 9], [7, 5, 9, 3, 1, 4], [7, 5, 9, 3, 4, 1], [7, 5, 9, 1, 3, 4], [7, 5, 9, 1, 4, 3], [7, 5, 9, 4, 3, 1], [7, 5, 9, 4, 1, 3], [7, 5, 1, 3, 9, 4], [7, 5, 1, 3, 4, 9], [7, 5, 1, 9, 3, 4], [7, 5, 1, 9, 4, 3], [7, 5, 1, 4, 3, 9], [7, 5, 1, 4, 9, 3], [7, 5, 4, 3, 9, 1], [7, 5, 4, 3, 1, 9], [7, 5, 4, 9, 3, 1], [7, 5, 4, 9, 1, 3], [7, 5, 4, 1, 3, 9], [7, 5, 4, 1, 9, 3], [7, 9, 3, 5, 1, 4], [7, 9, 3, 5, 4, 1], [7, 9, 3, 1, 5, 4], [7, 9, 3, 1, 4, 5], [7, 9, 3, 4, 5, 1], [7, 9, 3, 4, 1, 5], [7, 9, 5, 3, 1, 4], [7, 9, 5, 3, 4, 1], [7, 9, 5, 1, 3, 4], [7, 9, 5, 1, 4, 3], [7, 9, 5, 4, 3, 1], [7, 9, 5, 4, 1, 3], [7, 9, 1, 3, 5, 4], [7, 9, 1, 3, 4, 5], [7, 9, 1, 5, 3, 4], [7, 9, 1, 5, 4, 3], [7, 9, 1, 4, 3, 5], [7, 9, 1, 4, 5, 3], [7, 9, 4, 3, 5, 1], [7, 9, 4, 3, 1, 5], [7, 9, 4, 5, 3, 1], [7, 9, 4, 5, 1, 3], [7, 9, 4, 1, 3, 5], [7, 9, 4, 1, 5, 3], [7, 1, 3, 5, 9, 4], [7, 1, 3, 5, 4, 9], [7, 1, 3, 9, 5, 4], [7, 1, 3, 9, 4, 5], [7, 1, 3, 4, 5, 9], [7, 1, 3, 4, 9, 5], [7, 1, 5, 3, 9, 4], [7, 1, 5, 3, 4, 9], [7, 1, 5, 9, 3, 4], [7, 1, 5, 9, 4, 3], [7, 1, 5, 4, 3, 9], [7, 1, 5, 4, 9, 3], [7, 1, 9, 3, 5, 4], [7, 1, 9, 3, 4, 5], [7, 1, 9, 5, 3, 4], [7, 1, 9, 5, 4, 3], [7, 1, 9, 4, 3, 5], [7, 1, 9, 4, 5, 3], [7, 1, 4, 3, 5, 9], [7, 1, 4, 3, 9, 5], [7, 1, 4, 5, 3, 9], [7, 1, 4, 5, 9, 3], [7, 1, 4, 9, 3, 5], [7, 1, 4, 9, 5, 3], [7, 4, 3, 5, 9, 1], [7, 4, 3, 5, 1, 9], [7, 4, 3, 9, 5, 1], [7, 4, 3, 9, 1, 5], [7, 4, 3, 1, 5, 9], [7, 4, 3, 1, 9, 5], [7, 4, 5, 3, 9, 1], [7, 4, 5, 3, 1, 9], [7, 4, 5, 9, 3, 1], [7, 4, 5, 9, 1, 3], [7, 4, 5, 1, 3, 9], [7, 4, 5, 1, 9, 3], [7, 4, 9, 3, 5, 1], [7, 4, 9, 3, 1, 5], [7, 4, 9, 5, 3, 1], [7, 4, 9, 5, 1, 3], [7, 4, 9, 1, 3, 5], [7, 4, 9, 1, 5, 3], [7, 4, 1, 3, 5, 9], [7, 4, 1, 3, 9, 5], [7, 4, 1, 5, 3, 9], [7, 4, 1, 5, 9, 3], [7, 4, 1, 9, 3, 5], [7, 4, 1, 9, 5, 3], [3, 7, 5, 9, 1, 4], [3, 7, 5, 9, 4, 1], [3, 7, 5, 1, 9, 4], [3, 7, 5, 1, 4, 9], [3, 7, 5, 4, 9, 1], [3, 7, 5, 4, 1, 9], [3, 7, 9, 5, 1, 4], [3, 7, 9, 5, 4, 1], [3, 7, 9, 1, 5, 4], [3, 7, 9, 1, 4, 5], [3, 7, 9, 4, 5, 1], [3, 7, 9, 4, 1, 5], [3, 7, 1, 5, 9, 4], [3, 7, 1, 5, 4, 9], [3, 7, 1, 9, 5, 4], [3, 7, 1, 9, 4, 5], [3, 7, 1, 4, 5, 9], [3, 7, 1, 4, 9, 5], [3, 7, 4, 5, 9, 1], [3, 7, 4, 5, 1, 9], [3, 7, 4, 9, 5, 1], [3, 7, 4, 9, 1, 5], [3, 7, 4, 1, 5, 9], [3, 7, 4, 1, 9, 5], [3, 5, 7, 9, 1, 4], [3, 5, 7, 9, 4, 1], [3, 5, 7, 1, 9, 4], [3, 5, 7, 1, 4, 9], [3, 5, 7, 4, 9, 1], [3, 5, 7, 4, 1, 9], [3, 5, 9, 7, 1, 4], [3, 5, 9, 7, 4, 1], [3, 5, 9, 1, 7, 4], [3, 5, 9, 1, 4, 7], [3, 5, 9, 4, 7, 1], [3, 5, 9, 4, 1, 7], [3, 5, 1, 7, 9, 4], [3, 5, 1, 7, 4, 9], [3, 5, 1, 9, 7, 4], [3, 5, 1, 9, 4, 7], [3, 5, 1, 4, 7, 9], [3, 5, 1, 4, 9, 7], [3, 5, 4, 7, 9, 1], [3, 5, 4, 7, 1, 9], [3, 5, 4, 9, 7, 1], [3, 5, 4, 9, 1, 7], [3, 5, 4, 1, 7, 9], [3, 5, 4, 1, 9, 7], [3, 9, 7, 5, 1, 4], [3, 9, 7, 5, 4, 1], [3, 9, 7, 1, 5, 4], [3, 9, 7, 1, 4, 5], [3, 9, 7, 4, 5, 1], [3, 9, 7, 4, 1, 5], [3, 9, 5, 7, 1, 4], [3, 9, 5, 7, 4, 1], [3, 9, 5, 1, 7, 4], [3, 9, 5, 1, 4, 7], [3, 9, 5, 4, 7, 1], [3, 9, 5, 4, 1, 7], [3, 9, 1, 7, 5, 4], [3, 9, 1, 7, 4, 5], [3, 9, 1, 5, 7, 4], [3, 9, 1, 5, 4, 7], [3, 9, 1, 4, 7, 5], [3, 9, 1, 4, 5, 7], [3, 9, 4, 7, 5, 1], [3, 9, 4, 7, 1, 5], [3, 9, 4, 5, 7, 1], [3, 9, 4, 5, 1, 7], [3, 9, 4, 1, 7, 5], [3, 9, 4, 1, 5, 7], [3, 1, 7, 5, 9, 4], [3, 1, 7, 5, 4, 9], [3, 1, 7, 9, 5, 4], [3, 1, 7, 9, 4, 5], [3, 1, 7, 4, 5, 9], [3, 1, 7, 4, 9, 5], [3, 1, 5, 7, 9, 4], [3, 1, 5, 7, 4, 9], [3, 1, 5, 9, 7, 4], [3, 1, 5, 9, 4, 7], [3, 1, 5, 4, 7, 9], [3, 1, 5, 4, 9, 7], [3, 1, 9, 7, 5, 4], [3, 1, 9, 7, 4, 5], [3, 1, 9, 5, 7, 4], [3, 1, 9, 5, 4, 7], [3, 1, 9, 4, 7, 5], [3, 1, 9, 4, 5, 7], [3, 1, 4, 7, 5, 9], [3, 1, 4, 7, 9, 5], [3, 1, 4, 5, 7, 9], [3, 1, 4, 5, 9, 7], [3, 1, 4, 9, 7, 5], [3, 1, 4, 9, 5, 7], [3, 4, 7, 5, 9, 1], [3, 4, 7, 5, 1, 9], [3, 4, 7, 9, 5, 1], [3, 4, 7, 9, 1, 5], [3, 4, 7, 1, 5, 9], [3, 4, 7, 1, 9, 5], [3, 4, 5, 7, 9, 1], [3, 4, 5, 7, 1, 9], [3, 4, 5, 9, 7, 1], [3, 4, 5, 9, 1, 7], [3, 4, 5, 1, 7, 9], [3, 4, 5, 1, 9, 7], [3, 4, 9, 7, 5, 1], [3, 4, 9, 7, 1, 5], [3, 4, 9, 5, 7, 1], [3, 4, 9, 5, 1, 7], [3, 4, 9, 1, 7, 5], [3, 4, 9, 1, 5, 7], [3, 4, 1, 7, 5, 9], [3, 4, 1, 7, 9, 5], [3, 4, 1, 5, 7, 9], [3, 4, 1, 5, 9, 7], [3, 4, 1, 9, 7, 5], [3, 4, 1, 9, 5, 7], [5, 7, 3, 9, 1, 4], [5, 7, 3, 9, 4, 1], [5, 7, 3, 1, 9, 4], [5, 7, 3, 1, 4, 9], [5, 7, 3, 4, 9, 1], [5, 7, 3, 4, 1, 9], [5, 7, 9, 3, 1, 4], [5, 7, 9, 3, 4, 1], [5, 7, 9, 1, 3, 4], [5, 7, 9, 1, 4, 3], [5, 7, 9, 4, 3, 1], [5, 7, 9, 4, 1, 3], [5, 7, 1, 3, 9, 4], [5, 7, 1, 3, 4, 9], [5, 7, 1, 9, 3, 4], [5, 7, 1, 9, 4, 3], [5, 7, 1, 4, 3, 9], [5, 7, 1, 4, 9, 3], [5, 7, 4, 3, 9, 1], [5, 7, 4, 3, 1, 9], [5, 7, 4, 9, 3, 1], [5, 7, 4, 9, 1, 3], [5, 7, 4, 1, 3, 9], [5, 7, 4, 1, 9, 3], [5, 3, 7, 9, 1, 4], [5, 3, 7, 9, 4, 1], [5, 3, 7, 1, 9, 4], [5, 3, 7, 1, 4, 9], [5, 3, 7, 4, 9, 1], [5, 3, 7, 4, 1, 9], [5, 3, 9, 7, 1, 4], [5, 3, 9, 7, 4, 1], [5, 3, 9, 1, 7, 4], [5, 3, 9, 1, 4, 7], [5, 3, 9, 4, 7, 1], [5, 3, 9, 4, 1, 7], [5, 3, 1, 7, 9, 4], [5, 3, 1, 7, 4, 9], [5, 3, 1, 9, 7, 4], [5, 3, 1, 9, 4, 7], [5, 3, 1, 4, 7, 9], [5, 3, 1, 4, 9, 7], [5, 3, 4, 7, 9, 1], [5, 3, 4, 7, 1, 9], [5, 3, 4, 9, 7, 1], [5, 3, 4, 9, 1, 7], [5, 3, 4, 1, 7, 9], [5, 3, 4, 1, 9, 7], [5, 9, 7, 3, 1, 4], [5, 9, 7, 3, 4, 1], [5, 9, 7, 1, 3, 4], [5, 9, 7, 1, 4, 3], [5, 9, 7, 4, 3, 1], [5, 9, 7, 4, 1, 3], [5, 9, 3, 7, 1, 4], [5, 9, 3, 7, 4, 1], [5, 9, 3, 1, 7, 4], [5, 9, 3, 1, 4, 7], [5, 9, 3, 4, 7, 1], [5, 9, 3, 4, 1, 7], [5, 9, 1, 7, 3, 4], [5, 9, 1, 7, 4, 3], [5, 9, 1, 3, 7, 4], [5, 9, 1, 3, 4, 7], [5, 9, 1, 4, 7, 3], [5, 9, 1, 4, 3, 7], [5, 9, 4, 7, 3, 1], [5, 9, 4, 7, 1, 3], [5, 9, 4, 3, 7, 1], [5, 9, 4, 3, 1, 7], [5, 9, 4, 1, 7, 3], [5, 9, 4, 1, 3, 7], [5, 1, 7, 3, 9, 4], [5, 1, 7, 3, 4, 9], [5, 1, 7, 9, 3, 4], [5, 1, 7, 9, 4, 3], [5, 1, 7, 4, 3, 9], [5, 1, 7, 4, 9, 3], [5, 1, 3, 7, 9, 4], [5, 1, 3, 7, 4, 9], [5, 1, 3, 9, 7, 4], [5, 1, 3, 9, 4, 7], [5, 1, 3, 4, 7, 9], [5, 1, 3, 4, 9, 7], [5, 1, 9, 7, 3, 4], [5, 1, 9, 7, 4, 3], [5, 1, 9, 3, 7, 4], [5, 1, 9, 3, 4, 7], [5, 1, 9, 4, 7, 3], [5, 1, 9, 4, 3, 7], [5, 1, 4, 7, 3, 9], [5, 1, 4, 7, 9, 3], [5, 1, 4, 3, 7, 9], [5, 1, 4, 3, 9, 7], [5, 1, 4, 9, 7, 3], [5, 1, 4, 9, 3, 7], [5, 4, 7, 3, 9, 1], [5, 4, 7, 3, 1, 9], [5, 4, 7, 9, 3, 1], [5, 4, 7, 9, 1, 3], [5, 4, 7, 1, 3, 9], [5, 4, 7, 1, 9, 3], [5, 4, 3, 7, 9, 1], [5, 4, 3, 7, 1, 9], [5, 4, 3, 9, 7, 1], [5, 4, 3, 9, 1, 7], [5, 4, 3, 1, 7, 9], [5, 4, 3, 1, 9, 7], [5, 4, 9, 7, 3, 1], [5, 4, 9, 7, 1, 3], [5, 4, 9, 3, 7, 1], [5, 4, 9, 3, 1, 7], [5, 4, 9, 1, 7, 3], [5, 4, 9, 1, 3, 7], [5, 4, 1, 7, 3, 9], [5, 4, 1, 7, 9, 3], [5, 4, 1, 3, 7, 9], [5, 4, 1, 3, 9, 7], [5, 4, 1, 9, 7, 3], [5, 4, 1, 9, 3, 7], [9, 7, 3, 5, 1, 4], [9, 7, 3, 5, 4, 1], [9, 7, 3, 1, 5, 4], [9, 7, 3, 1, 4, 5], [9, 7, 3, 4, 5, 1], [9, 7, 3, 4, 1, 5], [9, 7, 5, 3, 1, 4], [9, 7, 5, 3, 4, 1], [9, 7, 5, 1, 3, 4], [9, 7, 5, 1, 4, 3], [9, 7, 5, 4, 3, 1], [9, 7, 5, 4, 1, 3], [9, 7, 1, 3, 5, 4], [9, 7, 1, 3, 4, 5], [9, 7, 1, 5, 3, 4], [9, 7, 1, 5, 4, 3], [9, 7, 1, 4, 3, 5], [9, 7, 1, 4, 5, 3], [9, 7, 4, 3, 5, 1], [9, 7, 4, 3, 1, 5], [9, 7, 4, 5, 3, 1], [9, 7, 4, 5, 1, 3], [9, 7, 4, 1, 3, 5], [9, 7, 4, 1, 5, 3], [9, 3, 7, 5, 1, 4], [9, 3, 7, 5, 4, 1], [9, 3, 7, 1, 5, 4], [9, 3, 7, 1, 4, 5], [9, 3, 7, 4, 5, 1], [9, 3, 7, 4, 1, 5], [9, 3, 5, 7, 1, 4], [9, 3, 5, 7, 4, 1], [9, 3, 5, 1, 7, 4], [9, 3, 5, 1, 4, 7], [9, 3, 5, 4, 7, 1], [9, 3, 5, 4, 1, 7], [9, 3, 1, 7, 5, 4], [9, 3, 1, 7, 4, 5], [9, 3, 1, 5, 7, 4], [9, 3, 1, 5, 4, 7], [9, 3, 1, 4, 7, 5], [9, 3, 1, 4, 5, 7], [9, 3, 4, 7, 5, 1], [9, 3, 4, 7, 1, 5], [9, 3, 4, 5, 7, 1], [9, 3, 4, 5, 1, 7], [9, 3, 4, 1, 7, 5], [9, 3, 4, 1, 5, 7], [9, 5, 7, 3, 1, 4], [9, 5, 7, 3, 4, 1], [9, 5, 7, 1, 3, 4], [9, 5, 7, 1, 4, 3], [9, 5, 7, 4, 3, 1], [9, 5, 7, 4, 1, 3], [9, 5, 3, 7, 1, 4], [9, 5, 3, 7, 4, 1], [9, 5, 3, 1, 7, 4], [9, 5, 3, 1, 4, 7], [9, 5, 3, 4, 7, 1], [9, 5, 3, 4, 1, 7], [9, 5, 1, 7, 3, 4], [9, 5, 1, 7, 4, 3], [9, 5, 1, 3, 7, 4], [9, 5, 1, 3, 4, 7], [9, 5, 1, 4, 7, 3], [9, 5, 1, 4, 3, 7], [9, 5, 4, 7, 3, 1], [9, 5, 4, 7, 1, 3], [9, 5, 4, 3, 7, 1], [9, 5, 4, 3, 1, 7], [9, 5, 4, 1, 7, 3], [9, 5, 4, 1, 3, 7], [9, 1, 7, 3, 5, 4], [9, 1, 7, 3, 4, 5], [9, 1, 7, 5, 3, 4], [9, 1, 7, 5, 4, 3], [9, 1, 7, 4, 3, 5], [9, 1, 7, 4, 5, 3], [9, 1, 3, 7, 5, 4], [9, 1, 3, 7, 4, 5], [9, 1, 3, 5, 7, 4], [9, 1, 3, 5, 4, 7], [9, 1, 3, 4, 7, 5], [9, 1, 3, 4, 5, 7], [9, 1, 5, 7, 3, 4], [9, 1, 5, 7, 4, 3], [9, 1, 5, 3, 7, 4], [9, 1, 5, 3, 4, 7], [9, 1, 5, 4, 7, 3], [9, 1, 5, 4, 3, 7], [9, 1, 4, 7, 3, 5], [9, 1, 4, 7, 5, 3], [9, 1, 4, 3, 7, 5], [9, 1, 4, 3, 5, 7], [9, 1, 4, 5, 7, 3], [9, 1, 4, 5, 3, 7], [9, 4, 7, 3, 5, 1], [9, 4, 7, 3, 1, 5], [9, 4, 7, 5, 3, 1], [9, 4, 7, 5, 1, 3], [9, 4, 7, 1, 3, 5], [9, 4, 7, 1, 5, 3], [9, 4, 3, 7, 5, 1], [9, 4, 3, 7, 1, 5], [9, 4, 3, 5, 7, 1], [9, 4, 3, 5, 1, 7], [9, 4, 3, 1, 7, 5], [9, 4, 3, 1, 5, 7], [9, 4, 5, 7, 3, 1], [9, 4, 5, 7, 1, 3], [9, 4, 5, 3, 7, 1], [9, 4, 5, 3, 1, 7], [9, 4, 5, 1, 7, 3], [9, 4, 5, 1, 3, 7], [9, 4, 1, 7, 3, 5], [9, 4, 1, 7, 5, 3], [9, 4, 1, 3, 7, 5], [9, 4, 1, 3, 5, 7], [9, 4, 1, 5, 7, 3], [9, 4, 1, 5, 3, 7], [1, 7, 3, 5, 9, 4], [1, 7, 3, 5, 4, 9], [1, 7, 3, 9, 5, 4], [1, 7, 3, 9, 4, 5], [1, 7, 3, 4, 5, 9], [1, 7, 3, 4, 9, 5], [1, 7, 5, 3, 9, 4], [1, 7, 5, 3, 4, 9], [1, 7, 5, 9, 3, 4], [1, 7, 5, 9, 4, 3], [1, 7, 5, 4, 3, 9], [1, 7, 5, 4, 9, 3], [1, 7, 9, 3, 5, 4], [1, 7, 9, 3, 4, 5], [1, 7, 9, 5, 3, 4], [1, 7, 9, 5, 4, 3], [1, 7, 9, 4, 3, 5], [1, 7, 9, 4, 5, 3], [1, 7, 4, 3, 5, 9], [1, 7, 4, 3, 9, 5], [1, 7, 4, 5, 3, 9], [1, 7, 4, 5, 9, 3], [1, 7, 4, 9, 3, 5], [1, 7, 4, 9, 5, 3], [1, 3, 7, 5, 9, 4], [1, 3, 7, 5, 4, 9], [1, 3, 7, 9, 5, 4], [1, 3, 7, 9, 4, 5], [1, 3, 7, 4, 5, 9], [1, 3, 7, 4, 9, 5], [1, 3, 5, 7, 9, 4], [1, 3, 5, 7, 4, 9], [1, 3, 5, 9, 7, 4], [1, 3, 5, 9, 4, 7], [1, 3, 5, 4, 7, 9], [1, 3, 5, 4, 9, 7], [1, 3, 9, 7, 5, 4], [1, 3, 9, 7, 4, 5], [1, 3, 9, 5, 7, 4], [1, 3, 9, 5, 4, 7], [1, 3, 9, 4, 7, 5], [1, 3, 9, 4, 5, 7], [1, 3, 4, 7, 5, 9], [1, 3, 4, 7, 9, 5], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 9, 7], [1, 3, 4, 9, 7, 5], [1, 3, 4, 9, 5, 7], [1, 5, 7, 3, 9, 4], [1, 5, 7, 3, 4, 9], [1, 5, 7, 9, 3, 4], [1, 5, 7, 9, 4, 3], [1, 5, 7, 4, 3, 9], [1, 5, 7, 4, 9, 3], [1, 5, 3, 7, 9, 4], [1, 5, 3, 7, 4, 9], [1, 5, 3, 9, 7, 4], [1, 5, 3, 9, 4, 7], [1, 5, 3, 4, 7, 9], [1, 5, 3, 4, 9, 7], [1, 5, 9, 7, 3, 4], [1, 5, 9, 7, 4, 3], [1, 5, 9, 3, 7, 4], [1, 5, 9, 3, 4, 7], [1, 5, 9, 4, 7, 3], [1, 5, 9, 4, 3, 7], [1, 5, 4, 7, 3, 9], [1, 5, 4, 7, 9, 3], [1, 5, 4, 3, 7, 9], [1, 5, 4, 3, 9, 7], [1, 5, 4, 9, 7, 3], [1, 5, 4, 9, 3, 7], [1, 9, 7, 3, 5, 4], [1, 9, 7, 3, 4, 5], [1, 9, 7, 5, 3, 4], [1, 9, 7, 5, 4, 3], [1, 9, 7, 4, 3, 5], [1, 9, 7, 4, 5, 3], [1, 9, 3, 7, 5, 4], [1, 9, 3, 7, 4, 5], [1, 9, 3, 5, 7, 4], [1, 9, 3, 5, 4, 7], [1, 9, 3, 4, 7, 5], [1, 9, 3, 4, 5, 7], [1, 9, 5, 7, 3, 4], [1, 9, 5, 7, 4, 3], [1, 9, 5, 3, 7, 4], [1, 9, 5, 3, 4, 7], [1, 9, 5, 4, 7, 3], [1, 9, 5, 4, 3, 7], [1, 9, 4, 7, 3, 5], [1, 9, 4, 7, 5, 3], [1, 9, 4, 3, 7, 5], [1, 9, 4, 3, 5, 7], [1, 9, 4, 5, 7, 3], [1, 9, 4, 5, 3, 7], [1, 4, 7, 3, 5, 9], [1, 4, 7, 3, 9, 5], [1, 4, 7, 5, 3, 9], [1, 4, 7, 5, 9, 3], [1, 4, 7, 9, 3, 5], [1, 4, 7, 9, 5, 3], [1, 4, 3, 7, 5, 9], [1, 4, 3, 7, 9, 5], [1, 4, 3, 5, 7, 9], [1, 4, 3, 5, 9, 7], [1, 4, 3, 9, 7, 5], [1, 4, 3, 9, 5, 7], [1, 4, 5, 7, 3, 9], [1, 4, 5, 7, 9, 3], [1, 4, 5, 3, 7, 9], [1, 4, 5, 3, 9, 7], [1, 4, 5, 9, 7, 3], [1, 4, 5, 9, 3, 7], [1, 4, 9, 7, 3, 5], [1, 4, 9, 7, 5, 3], [1, 4, 9, 3, 7, 5], [1, 4, 9, 3, 5, 7], [1, 4, 9, 5, 7, 3], [1, 4, 9, 5, 3, 7], [4, 7, 3, 5, 9, 1], [4, 7, 3, 5, 1, 9], [4, 7, 3, 9, 5, 1], [4, 7, 3, 9, 1, 5], [4, 7, 3, 1, 5, 9], [4, 7, 3, 1, 9, 5], [4, 7, 5, 3, 9, 1], [4, 7, 5, 3, 1, 9], [4, 7, 5, 9, 3, 1], [4, 7, 5, 9, 1, 3], [4, 7, 5, 1, 3, 9], [4, 7, 5, 1, 9, 3], [4, 7, 9, 3, 5, 1], [4, 7, 9, 3, 1, 5], [4, 7, 9, 5, 3, 1], [4, 7, 9, 5, 1, 3], [4, 7, 9, 1, 3, 5], [4, 7, 9, 1, 5, 3], [4, 7, 1, 3, 5, 9], [4, 7, 1, 3, 9, 5], [4, 7, 1, 5, 3, 9], [4, 7, 1, 5, 9, 3], [4, 7, 1, 9, 3, 5], [4, 7, 1, 9, 5, 3], [4, 3, 7, 5, 9, 1], [4, 3, 7, 5, 1, 9], [4, 3, 7, 9, 5, 1], [4, 3, 7, 9, 1, 5], [4, 3, 7, 1, 5, 9], [4, 3, 7, 1, 9, 5], [4, 3, 5, 7, 9, 1], [4, 3, 5, 7, 1, 9], [4, 3, 5, 9, 7, 1], [4, 3, 5, 9, 1, 7], [4, 3, 5, 1, 7, 9], [4, 3, 5, 1, 9, 7], [4, 3, 9, 7, 5, 1], [4, 3, 9, 7, 1, 5], [4, 3, 9, 5, 7, 1], [4, 3, 9, 5, 1, 7], [4, 3, 9, 1, 7, 5], [4, 3, 9, 1, 5, 7], [4, 3, 1, 7, 5, 9], [4, 3, 1, 7, 9, 5], [4, 3, 1, 5, 7, 9], [4, 3, 1, 5, 9, 7], [4, 3, 1, 9, 7, 5], [4, 3, 1, 9, 5, 7], [4, 5, 7, 3, 9, 1], [4, 5, 7, 3, 1, 9], [4, 5, 7, 9, 3, 1], [4, 5, 7, 9, 1, 3], [4, 5, 7, 1, 3, 9], [4, 5, 7, 1, 9, 3], [4, 5, 3, 7, 9, 1], [4, 5, 3, 7, 1, 9], [4, 5, 3, 9, 7, 1], [4, 5, 3, 9, 1, 7], [4, 5, 3, 1, 7, 9], [4, 5, 3, 1, 9, 7], [4, 5, 9, 7, 3, 1], [4, 5, 9, 7, 1, 3], [4, 5, 9, 3, 7, 1], [4, 5, 9, 3, 1, 7], [4, 5, 9, 1, 7, 3], [4, 5, 9, 1, 3, 7], [4, 5, 1, 7, 3, 9], [4, 5, 1, 7, 9, 3], [4, 5, 1, 3, 7, 9], [4, 5, 1, 3, 9, 7], [4, 5, 1, 9, 7, 3], [4, 5, 1, 9, 3, 7], [4, 9, 7, 3, 5, 1], [4, 9, 7, 3, 1, 5], [4, 9, 7, 5, 3, 1], [4, 9, 7, 5, 1, 3], [4, 9, 7, 1, 3, 5], [4, 9, 7, 1, 5, 3], [4, 9, 3, 7, 5, 1], [4, 9, 3, 7, 1, 5], [4, 9, 3, 5, 7, 1], [4, 9, 3, 5, 1, 7], [4, 9, 3, 1, 7, 5], [4, 9, 3, 1, 5, 7], [4, 9, 5, 7, 3, 1], [4, 9, 5, 7, 1, 3], [4, 9, 5, 3, 7, 1], [4, 9, 5, 3, 1, 7], [4, 9, 5, 1, 7, 3], [4, 9, 5, 1, 3, 7], [4, 9, 1, 7, 3, 5], [4, 9, 1, 7, 5, 3], [4, 9, 1, 3, 7, 5], [4, 9, 1, 3, 5, 7], [4, 9, 1, 5, 7, 3], [4, 9, 1, 5, 3, 7], [4, 1, 7, 3, 5, 9], [4, 1, 7, 3, 9, 5], [4, 1, 7, 5, 3, 9], [4, 1, 7, 5, 9, 3], [4, 1, 7, 9, 3, 5], [4, 1, 7, 9, 5, 3], [4, 1, 3, 7, 5, 9], [4, 1, 3, 7, 9, 5], [4, 1, 3, 5, 7, 9], [4, 1, 3, 5, 9, 7], [4, 1, 3, 9, 7, 5], [4, 1, 3, 9, 5, 7], [4, 1, 5, 7, 3, 9], [4, 1, 5, 7, 9, 3], [4, 1, 5, 3, 7, 9], [4, 1, 5, 3, 9, 7], [4, 1, 5, 9, 7, 3], [4, 1, 5, 9, 3, 7], [4, 1, 9, 7, 3, 5], [4, 1, 9, 7, 5, 3], [4, 1, 9, 3, 7, 5], [4, 1, 9, 3, 5, 7], [4, 1, 9, 5, 7, 3], [4, 1, 9, 5, 3, 7]])\n assert answers_match(candidate(nums=[0]), [[0]])\n assert answers_match(candidate(nums=[-1, 2, -3, 4, -5, 6]), [[-1, 2, -3, 4, -5, 6], [-1, 2, -3, 4, 6, -5], [-1, 2, -3, -5, 4, 6], [-1, 2, -3, -5, 6, 4], [-1, 2, -3, 6, 4, -5], [-1, 2, -3, 6, -5, 4], [-1, 2, 4, -3, -5, 6], [-1, 2, 4, -3, 6, -5], [-1, 2, 4, -5, -3, 6], [-1, 2, 4, -5, 6, -3], [-1, 2, 4, 6, -3, -5], [-1, 2, 4, 6, -5, -3], [-1, 2, -5, -3, 4, 6], [-1, 2, -5, -3, 6, 4], [-1, 2, -5, 4, -3, 6], [-1, 2, -5, 4, 6, -3], [-1, 2, -5, 6, -3, 4], [-1, 2, -5, 6, 4, -3], [-1, 2, 6, -3, 4, -5], [-1, 2, 6, -3, -5, 4], [-1, 2, 6, 4, -3, -5], [-1, 2, 6, 4, -5, -3], [-1, 2, 6, -5, -3, 4], [-1, 2, 6, -5, 4, -3], [-1, -3, 2, 4, -5, 6], [-1, -3, 2, 4, 6, -5], [-1, -3, 2, -5, 4, 6], [-1, -3, 2, -5, 6, 4], [-1, -3, 2, 6, 4, -5], [-1, -3, 2, 6, -5, 4], [-1, -3, 4, 2, -5, 6], [-1, -3, 4, 2, 6, -5], [-1, -3, 4, -5, 2, 6], [-1, -3, 4, -5, 6, 2], [-1, -3, 4, 6, 2, -5], [-1, -3, 4, 6, -5, 2], [-1, -3, -5, 2, 4, 6], [-1, -3, -5, 2, 6, 4], [-1, -3, -5, 4, 2, 6], [-1, -3, -5, 4, 6, 2], [-1, -3, -5, 6, 2, 4], [-1, -3, -5, 6, 4, 2], [-1, -3, 6, 2, 4, -5], [-1, -3, 6, 2, -5, 4], [-1, -3, 6, 4, 2, -5], [-1, -3, 6, 4, -5, 2], [-1, -3, 6, -5, 2, 4], [-1, -3, 6, -5, 4, 2], [-1, 4, 2, -3, -5, 6], [-1, 4, 2, -3, 6, -5], [-1, 4, 2, -5, -3, 6], [-1, 4, 2, -5, 6, -3], [-1, 4, 2, 6, -3, -5], [-1, 4, 2, 6, -5, -3], [-1, 4, -3, 2, -5, 6], [-1, 4, -3, 2, 6, -5], [-1, 4, -3, -5, 2, 6], [-1, 4, -3, -5, 6, 2], [-1, 4, -3, 6, 2, -5], [-1, 4, -3, 6, -5, 2], [-1, 4, -5, 2, -3, 6], [-1, 4, -5, 2, 6, -3], [-1, 4, -5, -3, 2, 6], [-1, 4, -5, -3, 6, 2], [-1, 4, -5, 6, 2, -3], [-1, 4, -5, 6, -3, 2], [-1, 4, 6, 2, -3, -5], [-1, 4, 6, 2, -5, -3], [-1, 4, 6, -3, 2, -5], [-1, 4, 6, -3, -5, 2], [-1, 4, 6, -5, 2, -3], [-1, 4, 6, -5, -3, 2], [-1, -5, 2, -3, 4, 6], [-1, -5, 2, -3, 6, 4], [-1, -5, 2, 4, -3, 6], [-1, -5, 2, 4, 6, -3], [-1, -5, 2, 6, -3, 4], [-1, -5, 2, 6, 4, -3], [-1, -5, -3, 2, 4, 6], [-1, -5, -3, 2, 6, 4], [-1, -5, -3, 4, 2, 6], [-1, -5, -3, 4, 6, 2], [-1, -5, -3, 6, 2, 4], [-1, -5, -3, 6, 4, 2], [-1, -5, 4, 2, -3, 6], [-1, -5, 4, 2, 6, -3], [-1, -5, 4, -3, 2, 6], [-1, -5, 4, -3, 6, 2], [-1, -5, 4, 6, 2, -3], [-1, -5, 4, 6, -3, 2], [-1, -5, 6, 2, -3, 4], [-1, -5, 6, 2, 4, -3], [-1, -5, 6, -3, 2, 4], [-1, -5, 6, -3, 4, 2], [-1, -5, 6, 4, 2, -3], [-1, -5, 6, 4, -3, 2], [-1, 6, 2, -3, 4, -5], [-1, 6, 2, -3, -5, 4], [-1, 6, 2, 4, -3, -5], [-1, 6, 2, 4, -5, -3], [-1, 6, 2, -5, -3, 4], [-1, 6, 2, -5, 4, -3], [-1, 6, -3, 2, 4, -5], [-1, 6, -3, 2, -5, 4], [-1, 6, -3, 4, 2, -5], [-1, 6, -3, 4, -5, 2], [-1, 6, -3, -5, 2, 4], [-1, 6, -3, -5, 4, 2], [-1, 6, 4, 2, -3, -5], [-1, 6, 4, 2, -5, -3], [-1, 6, 4, -3, 2, -5], [-1, 6, 4, -3, -5, 2], [-1, 6, 4, -5, 2, -3], [-1, 6, 4, -5, -3, 2], [-1, 6, -5, 2, -3, 4], [-1, 6, -5, 2, 4, -3], [-1, 6, -5, -3, 2, 4], [-1, 6, -5, -3, 4, 2], [-1, 6, -5, 4, 2, -3], [-1, 6, -5, 4, -3, 2], [2, -1, -3, 4, -5, 6], [2, -1, -3, 4, 6, -5], [2, -1, -3, -5, 4, 6], [2, -1, -3, -5, 6, 4], [2, -1, -3, 6, 4, -5], [2, -1, -3, 6, -5, 4], [2, -1, 4, -3, -5, 6], [2, -1, 4, -3, 6, -5], [2, -1, 4, -5, -3, 6], [2, -1, 4, -5, 6, -3], [2, -1, 4, 6, -3, -5], [2, -1, 4, 6, -5, -3], [2, -1, -5, -3, 4, 6], [2, -1, -5, -3, 6, 4], [2, -1, -5, 4, -3, 6], [2, -1, -5, 4, 6, -3], [2, -1, -5, 6, -3, 4], [2, -1, -5, 6, 4, -3], [2, -1, 6, -3, 4, -5], [2, -1, 6, -3, -5, 4], [2, -1, 6, 4, -3, -5], [2, -1, 6, 4, -5, -3], [2, -1, 6, -5, -3, 4], [2, -1, 6, -5, 4, -3], [2, -3, -1, 4, -5, 6], [2, -3, -1, 4, 6, -5], [2, -3, -1, -5, 4, 6], [2, -3, -1, -5, 6, 4], [2, -3, -1, 6, 4, -5], [2, -3, -1, 6, -5, 4], [2, -3, 4, -1, -5, 6], [2, -3, 4, -1, 6, -5], [2, -3, 4, -5, -1, 6], [2, -3, 4, -5, 6, -1], [2, -3, 4, 6, -1, -5], [2, -3, 4, 6, -5, -1], [2, -3, -5, -1, 4, 6], [2, -3, -5, -1, 6, 4], [2, -3, -5, 4, -1, 6], [2, -3, -5, 4, 6, -1], [2, -3, -5, 6, -1, 4], [2, -3, -5, 6, 4, -1], [2, -3, 6, -1, 4, -5], [2, -3, 6, -1, -5, 4], [2, -3, 6, 4, -1, -5], [2, -3, 6, 4, -5, -1], [2, -3, 6, -5, -1, 4], [2, -3, 6, -5, 4, -1], [2, 4, -1, -3, -5, 6], [2, 4, -1, -3, 6, -5], [2, 4, -1, -5, -3, 6], [2, 4, -1, -5, 6, -3], [2, 4, -1, 6, -3, -5], [2, 4, -1, 6, -5, -3], [2, 4, -3, -1, -5, 6], [2, 4, -3, -1, 6, -5], [2, 4, -3, -5, -1, 6], [2, 4, -3, -5, 6, -1], [2, 4, -3, 6, -1, -5], [2, 4, -3, 6, -5, -1], [2, 4, -5, -1, -3, 6], [2, 4, -5, -1, 6, -3], [2, 4, -5, -3, -1, 6], [2, 4, -5, -3, 6, -1], [2, 4, -5, 6, -1, -3], [2, 4, -5, 6, -3, -1], [2, 4, 6, -1, -3, -5], [2, 4, 6, -1, -5, -3], [2, 4, 6, -3, -1, -5], [2, 4, 6, -3, -5, -1], [2, 4, 6, -5, -1, -3], [2, 4, 6, -5, -3, -1], [2, -5, -1, -3, 4, 6], [2, -5, -1, -3, 6, 4], [2, -5, -1, 4, -3, 6], [2, -5, -1, 4, 6, -3], [2, -5, -1, 6, -3, 4], [2, -5, -1, 6, 4, -3], [2, -5, -3, -1, 4, 6], [2, -5, -3, -1, 6, 4], [2, -5, -3, 4, -1, 6], [2, -5, -3, 4, 6, -1], [2, -5, -3, 6, -1, 4], [2, -5, -3, 6, 4, -1], [2, -5, 4, -1, -3, 6], [2, -5, 4, -1, 6, -3], [2, -5, 4, -3, -1, 6], [2, -5, 4, -3, 6, -1], [2, -5, 4, 6, -1, -3], [2, -5, 4, 6, -3, -1], [2, -5, 6, -1, -3, 4], [2, -5, 6, -1, 4, -3], [2, -5, 6, -3, -1, 4], [2, -5, 6, -3, 4, -1], [2, -5, 6, 4, -1, -3], [2, -5, 6, 4, -3, -1], [2, 6, -1, -3, 4, -5], [2, 6, -1, -3, -5, 4], [2, 6, -1, 4, -3, -5], [2, 6, -1, 4, -5, -3], [2, 6, -1, -5, -3, 4], [2, 6, -1, -5, 4, -3], [2, 6, -3, -1, 4, -5], [2, 6, -3, -1, -5, 4], [2, 6, -3, 4, -1, -5], [2, 6, -3, 4, -5, -1], [2, 6, -3, -5, -1, 4], [2, 6, -3, -5, 4, -1], [2, 6, 4, -1, -3, -5], [2, 6, 4, -1, -5, -3], [2, 6, 4, -3, -1, -5], [2, 6, 4, -3, -5, -1], [2, 6, 4, -5, -1, -3], [2, 6, 4, -5, -3, -1], [2, 6, -5, -1, -3, 4], [2, 6, -5, -1, 4, -3], [2, 6, -5, -3, -1, 4], [2, 6, -5, -3, 4, -1], [2, 6, -5, 4, -1, -3], [2, 6, -5, 4, -3, -1], [-3, -1, 2, 4, -5, 6], [-3, -1, 2, 4, 6, -5], [-3, -1, 2, -5, 4, 6], [-3, -1, 2, -5, 6, 4], [-3, -1, 2, 6, 4, -5], [-3, -1, 2, 6, -5, 4], [-3, -1, 4, 2, -5, 6], [-3, -1, 4, 2, 6, -5], [-3, -1, 4, -5, 2, 6], [-3, -1, 4, -5, 6, 2], [-3, -1, 4, 6, 2, -5], [-3, -1, 4, 6, -5, 2], [-3, -1, -5, 2, 4, 6], [-3, -1, -5, 2, 6, 4], [-3, -1, -5, 4, 2, 6], [-3, -1, -5, 4, 6, 2], [-3, -1, -5, 6, 2, 4], [-3, -1, -5, 6, 4, 2], [-3, -1, 6, 2, 4, -5], [-3, -1, 6, 2, -5, 4], [-3, -1, 6, 4, 2, -5], [-3, -1, 6, 4, -5, 2], [-3, -1, 6, -5, 2, 4], [-3, -1, 6, -5, 4, 2], [-3, 2, -1, 4, -5, 6], [-3, 2, -1, 4, 6, -5], [-3, 2, -1, -5, 4, 6], [-3, 2, -1, -5, 6, 4], [-3, 2, -1, 6, 4, -5], [-3, 2, -1, 6, -5, 4], [-3, 2, 4, -1, -5, 6], [-3, 2, 4, -1, 6, -5], [-3, 2, 4, -5, -1, 6], [-3, 2, 4, -5, 6, -1], [-3, 2, 4, 6, -1, -5], [-3, 2, 4, 6, -5, -1], [-3, 2, -5, -1, 4, 6], [-3, 2, -5, -1, 6, 4], [-3, 2, -5, 4, -1, 6], [-3, 2, -5, 4, 6, -1], [-3, 2, -5, 6, -1, 4], [-3, 2, -5, 6, 4, -1], [-3, 2, 6, -1, 4, -5], [-3, 2, 6, -1, -5, 4], [-3, 2, 6, 4, -1, -5], [-3, 2, 6, 4, -5, -1], [-3, 2, 6, -5, -1, 4], [-3, 2, 6, -5, 4, -1], [-3, 4, -1, 2, -5, 6], [-3, 4, -1, 2, 6, -5], [-3, 4, -1, -5, 2, 6], [-3, 4, -1, -5, 6, 2], [-3, 4, -1, 6, 2, -5], [-3, 4, -1, 6, -5, 2], [-3, 4, 2, -1, -5, 6], [-3, 4, 2, -1, 6, -5], [-3, 4, 2, -5, -1, 6], [-3, 4, 2, -5, 6, -1], [-3, 4, 2, 6, -1, -5], [-3, 4, 2, 6, -5, -1], [-3, 4, -5, -1, 2, 6], [-3, 4, -5, -1, 6, 2], [-3, 4, -5, 2, -1, 6], [-3, 4, -5, 2, 6, -1], [-3, 4, -5, 6, -1, 2], [-3, 4, -5, 6, 2, -1], [-3, 4, 6, -1, 2, -5], [-3, 4, 6, -1, -5, 2], [-3, 4, 6, 2, -1, -5], [-3, 4, 6, 2, -5, -1], [-3, 4, 6, -5, -1, 2], [-3, 4, 6, -5, 2, -1], [-3, -5, -1, 2, 4, 6], [-3, -5, -1, 2, 6, 4], [-3, -5, -1, 4, 2, 6], [-3, -5, -1, 4, 6, 2], [-3, -5, -1, 6, 2, 4], [-3, -5, -1, 6, 4, 2], [-3, -5, 2, -1, 4, 6], [-3, -5, 2, -1, 6, 4], [-3, -5, 2, 4, -1, 6], [-3, -5, 2, 4, 6, -1], [-3, -5, 2, 6, -1, 4], [-3, -5, 2, 6, 4, -1], [-3, -5, 4, -1, 2, 6], [-3, -5, 4, -1, 6, 2], [-3, -5, 4, 2, -1, 6], [-3, -5, 4, 2, 6, -1], [-3, -5, 4, 6, -1, 2], [-3, -5, 4, 6, 2, -1], [-3, -5, 6, -1, 2, 4], [-3, -5, 6, -1, 4, 2], [-3, -5, 6, 2, -1, 4], [-3, -5, 6, 2, 4, -1], [-3, -5, 6, 4, -1, 2], [-3, -5, 6, 4, 2, -1], [-3, 6, -1, 2, 4, -5], [-3, 6, -1, 2, -5, 4], [-3, 6, -1, 4, 2, -5], [-3, 6, -1, 4, -5, 2], [-3, 6, -1, -5, 2, 4], [-3, 6, -1, -5, 4, 2], [-3, 6, 2, -1, 4, -5], [-3, 6, 2, -1, -5, 4], [-3, 6, 2, 4, -1, -5], [-3, 6, 2, 4, -5, -1], [-3, 6, 2, -5, -1, 4], [-3, 6, 2, -5, 4, -1], [-3, 6, 4, -1, 2, -5], [-3, 6, 4, -1, -5, 2], [-3, 6, 4, 2, -1, -5], [-3, 6, 4, 2, -5, -1], [-3, 6, 4, -5, -1, 2], [-3, 6, 4, -5, 2, -1], [-3, 6, -5, -1, 2, 4], [-3, 6, -5, -1, 4, 2], [-3, 6, -5, 2, -1, 4], [-3, 6, -5, 2, 4, -1], [-3, 6, -5, 4, -1, 2], [-3, 6, -5, 4, 2, -1], [4, -1, 2, -3, -5, 6], [4, -1, 2, -3, 6, -5], [4, -1, 2, -5, -3, 6], [4, -1, 2, -5, 6, -3], [4, -1, 2, 6, -3, -5], [4, -1, 2, 6, -5, -3], [4, -1, -3, 2, -5, 6], [4, -1, -3, 2, 6, -5], [4, -1, -3, -5, 2, 6], [4, -1, -3, -5, 6, 2], [4, -1, -3, 6, 2, -5], [4, -1, -3, 6, -5, 2], [4, -1, -5, 2, -3, 6], [4, -1, -5, 2, 6, -3], [4, -1, -5, -3, 2, 6], [4, -1, -5, -3, 6, 2], [4, -1, -5, 6, 2, -3], [4, -1, -5, 6, -3, 2], [4, -1, 6, 2, -3, -5], [4, -1, 6, 2, -5, -3], [4, -1, 6, -3, 2, -5], [4, -1, 6, -3, -5, 2], [4, -1, 6, -5, 2, -3], [4, -1, 6, -5, -3, 2], [4, 2, -1, -3, -5, 6], [4, 2, -1, -3, 6, -5], [4, 2, -1, -5, -3, 6], [4, 2, -1, -5, 6, -3], [4, 2, -1, 6, -3, -5], [4, 2, -1, 6, -5, -3], [4, 2, -3, -1, -5, 6], [4, 2, -3, -1, 6, -5], [4, 2, -3, -5, -1, 6], [4, 2, -3, -5, 6, -1], [4, 2, -3, 6, -1, -5], [4, 2, -3, 6, -5, -1], [4, 2, -5, -1, -3, 6], [4, 2, -5, -1, 6, -3], [4, 2, -5, -3, -1, 6], [4, 2, -5, -3, 6, -1], [4, 2, -5, 6, -1, -3], [4, 2, -5, 6, -3, -1], [4, 2, 6, -1, -3, -5], [4, 2, 6, -1, -5, -3], [4, 2, 6, -3, -1, -5], [4, 2, 6, -3, -5, -1], [4, 2, 6, -5, -1, -3], [4, 2, 6, -5, -3, -1], [4, -3, -1, 2, -5, 6], [4, -3, -1, 2, 6, -5], [4, -3, -1, -5, 2, 6], [4, -3, -1, -5, 6, 2], [4, -3, -1, 6, 2, -5], [4, -3, -1, 6, -5, 2], [4, -3, 2, -1, -5, 6], [4, -3, 2, -1, 6, -5], [4, -3, 2, -5, -1, 6], [4, -3, 2, -5, 6, -1], [4, -3, 2, 6, -1, -5], [4, -3, 2, 6, -5, -1], [4, -3, -5, -1, 2, 6], [4, -3, -5, -1, 6, 2], [4, -3, -5, 2, -1, 6], [4, -3, -5, 2, 6, -1], [4, -3, -5, 6, -1, 2], [4, -3, -5, 6, 2, -1], [4, -3, 6, -1, 2, -5], [4, -3, 6, -1, -5, 2], [4, -3, 6, 2, -1, -5], [4, -3, 6, 2, -5, -1], [4, -3, 6, -5, -1, 2], [4, -3, 6, -5, 2, -1], [4, -5, -1, 2, -3, 6], [4, -5, -1, 2, 6, -3], [4, -5, -1, -3, 2, 6], [4, -5, -1, -3, 6, 2], [4, -5, -1, 6, 2, -3], [4, -5, -1, 6, -3, 2], [4, -5, 2, -1, -3, 6], [4, -5, 2, -1, 6, -3], [4, -5, 2, -3, -1, 6], [4, -5, 2, -3, 6, -1], [4, -5, 2, 6, -1, -3], [4, -5, 2, 6, -3, -1], [4, -5, -3, -1, 2, 6], [4, -5, -3, -1, 6, 2], [4, -5, -3, 2, -1, 6], [4, -5, -3, 2, 6, -1], [4, -5, -3, 6, -1, 2], [4, -5, -3, 6, 2, -1], [4, -5, 6, -1, 2, -3], [4, -5, 6, -1, -3, 2], [4, -5, 6, 2, -1, -3], [4, -5, 6, 2, -3, -1], [4, -5, 6, -3, -1, 2], [4, -5, 6, -3, 2, -1], [4, 6, -1, 2, -3, -5], [4, 6, -1, 2, -5, -3], [4, 6, -1, -3, 2, -5], [4, 6, -1, -3, -5, 2], [4, 6, -1, -5, 2, -3], [4, 6, -1, -5, -3, 2], [4, 6, 2, -1, -3, -5], [4, 6, 2, -1, -5, -3], [4, 6, 2, -3, -1, -5], [4, 6, 2, -3, -5, -1], [4, 6, 2, -5, -1, -3], [4, 6, 2, -5, -3, -1], [4, 6, -3, -1, 2, -5], [4, 6, -3, -1, -5, 2], [4, 6, -3, 2, -1, -5], [4, 6, -3, 2, -5, -1], [4, 6, -3, -5, -1, 2], [4, 6, -3, -5, 2, -1], [4, 6, -5, -1, 2, -3], [4, 6, -5, -1, -3, 2], [4, 6, -5, 2, -1, -3], [4, 6, -5, 2, -3, -1], [4, 6, -5, -3, -1, 2], [4, 6, -5, -3, 2, -1], [-5, -1, 2, -3, 4, 6], [-5, -1, 2, -3, 6, 4], [-5, -1, 2, 4, -3, 6], [-5, -1, 2, 4, 6, -3], [-5, -1, 2, 6, -3, 4], [-5, -1, 2, 6, 4, -3], [-5, -1, -3, 2, 4, 6], [-5, -1, -3, 2, 6, 4], [-5, -1, -3, 4, 2, 6], [-5, -1, -3, 4, 6, 2], [-5, -1, -3, 6, 2, 4], [-5, -1, -3, 6, 4, 2], [-5, -1, 4, 2, -3, 6], [-5, -1, 4, 2, 6, -3], [-5, -1, 4, -3, 2, 6], [-5, -1, 4, -3, 6, 2], [-5, -1, 4, 6, 2, -3], [-5, -1, 4, 6, -3, 2], [-5, -1, 6, 2, -3, 4], [-5, -1, 6, 2, 4, -3], [-5, -1, 6, -3, 2, 4], [-5, -1, 6, -3, 4, 2], [-5, -1, 6, 4, 2, -3], [-5, -1, 6, 4, -3, 2], [-5, 2, -1, -3, 4, 6], [-5, 2, -1, -3, 6, 4], [-5, 2, -1, 4, -3, 6], [-5, 2, -1, 4, 6, -3], [-5, 2, -1, 6, -3, 4], [-5, 2, -1, 6, 4, -3], [-5, 2, -3, -1, 4, 6], [-5, 2, -3, -1, 6, 4], [-5, 2, -3, 4, -1, 6], [-5, 2, -3, 4, 6, -1], [-5, 2, -3, 6, -1, 4], [-5, 2, -3, 6, 4, -1], [-5, 2, 4, -1, -3, 6], [-5, 2, 4, -1, 6, -3], [-5, 2, 4, -3, -1, 6], [-5, 2, 4, -3, 6, -1], [-5, 2, 4, 6, -1, -3], [-5, 2, 4, 6, -3, -1], [-5, 2, 6, -1, -3, 4], [-5, 2, 6, -1, 4, -3], [-5, 2, 6, -3, -1, 4], [-5, 2, 6, -3, 4, -1], [-5, 2, 6, 4, -1, -3], [-5, 2, 6, 4, -3, -1], [-5, -3, -1, 2, 4, 6], [-5, -3, -1, 2, 6, 4], [-5, -3, -1, 4, 2, 6], [-5, -3, -1, 4, 6, 2], [-5, -3, -1, 6, 2, 4], [-5, -3, -1, 6, 4, 2], [-5, -3, 2, -1, 4, 6], [-5, -3, 2, -1, 6, 4], [-5, -3, 2, 4, -1, 6], [-5, -3, 2, 4, 6, -1], [-5, -3, 2, 6, -1, 4], [-5, -3, 2, 6, 4, -1], [-5, -3, 4, -1, 2, 6], [-5, -3, 4, -1, 6, 2], [-5, -3, 4, 2, -1, 6], [-5, -3, 4, 2, 6, -1], [-5, -3, 4, 6, -1, 2], [-5, -3, 4, 6, 2, -1], [-5, -3, 6, -1, 2, 4], [-5, -3, 6, -1, 4, 2], [-5, -3, 6, 2, -1, 4], [-5, -3, 6, 2, 4, -1], [-5, -3, 6, 4, -1, 2], [-5, -3, 6, 4, 2, -1], [-5, 4, -1, 2, -3, 6], [-5, 4, -1, 2, 6, -3], [-5, 4, -1, -3, 2, 6], [-5, 4, -1, -3, 6, 2], [-5, 4, -1, 6, 2, -3], [-5, 4, -1, 6, -3, 2], [-5, 4, 2, -1, -3, 6], [-5, 4, 2, -1, 6, -3], [-5, 4, 2, -3, -1, 6], [-5, 4, 2, -3, 6, -1], [-5, 4, 2, 6, -1, -3], [-5, 4, 2, 6, -3, -1], [-5, 4, -3, -1, 2, 6], [-5, 4, -3, -1, 6, 2], [-5, 4, -3, 2, -1, 6], [-5, 4, -3, 2, 6, -1], [-5, 4, -3, 6, -1, 2], [-5, 4, -3, 6, 2, -1], [-5, 4, 6, -1, 2, -3], [-5, 4, 6, -1, -3, 2], [-5, 4, 6, 2, -1, -3], [-5, 4, 6, 2, -3, -1], [-5, 4, 6, -3, -1, 2], [-5, 4, 6, -3, 2, -1], [-5, 6, -1, 2, -3, 4], [-5, 6, -1, 2, 4, -3], [-5, 6, -1, -3, 2, 4], [-5, 6, -1, -3, 4, 2], [-5, 6, -1, 4, 2, -3], [-5, 6, -1, 4, -3, 2], [-5, 6, 2, -1, -3, 4], [-5, 6, 2, -1, 4, -3], [-5, 6, 2, -3, -1, 4], [-5, 6, 2, -3, 4, -1], [-5, 6, 2, 4, -1, -3], [-5, 6, 2, 4, -3, -1], [-5, 6, -3, -1, 2, 4], [-5, 6, -3, -1, 4, 2], [-5, 6, -3, 2, -1, 4], [-5, 6, -3, 2, 4, -1], [-5, 6, -3, 4, -1, 2], [-5, 6, -3, 4, 2, -1], [-5, 6, 4, -1, 2, -3], [-5, 6, 4, -1, -3, 2], [-5, 6, 4, 2, -1, -3], [-5, 6, 4, 2, -3, -1], [-5, 6, 4, -3, -1, 2], [-5, 6, 4, -3, 2, -1], [6, -1, 2, -3, 4, -5], [6, -1, 2, -3, -5, 4], [6, -1, 2, 4, -3, -5], [6, -1, 2, 4, -5, -3], [6, -1, 2, -5, -3, 4], [6, -1, 2, -5, 4, -3], [6, -1, -3, 2, 4, -5], [6, -1, -3, 2, -5, 4], [6, -1, -3, 4, 2, -5], [6, -1, -3, 4, -5, 2], [6, -1, -3, -5, 2, 4], [6, -1, -3, -5, 4, 2], [6, -1, 4, 2, -3, -5], [6, -1, 4, 2, -5, -3], [6, -1, 4, -3, 2, -5], [6, -1, 4, -3, -5, 2], [6, -1, 4, -5, 2, -3], [6, -1, 4, -5, -3, 2], [6, -1, -5, 2, -3, 4], [6, -1, -5, 2, 4, -3], [6, -1, -5, -3, 2, 4], [6, -1, -5, -3, 4, 2], [6, -1, -5, 4, 2, -3], [6, -1, -5, 4, -3, 2], [6, 2, -1, -3, 4, -5], [6, 2, -1, -3, -5, 4], [6, 2, -1, 4, -3, -5], [6, 2, -1, 4, -5, -3], [6, 2, -1, -5, -3, 4], [6, 2, -1, -5, 4, -3], [6, 2, -3, -1, 4, -5], [6, 2, -3, -1, -5, 4], [6, 2, -3, 4, -1, -5], [6, 2, -3, 4, -5, -1], [6, 2, -3, -5, -1, 4], [6, 2, -3, -5, 4, -1], [6, 2, 4, -1, -3, -5], [6, 2, 4, -1, -5, -3], [6, 2, 4, -3, -1, -5], [6, 2, 4, -3, -5, -1], [6, 2, 4, -5, -1, -3], [6, 2, 4, -5, -3, -1], [6, 2, -5, -1, -3, 4], [6, 2, -5, -1, 4, -3], [6, 2, -5, -3, -1, 4], [6, 2, -5, -3, 4, -1], [6, 2, -5, 4, -1, -3], [6, 2, -5, 4, -3, -1], [6, -3, -1, 2, 4, -5], [6, -3, -1, 2, -5, 4], [6, -3, -1, 4, 2, -5], [6, -3, -1, 4, -5, 2], [6, -3, -1, -5, 2, 4], [6, -3, -1, -5, 4, 2], [6, -3, 2, -1, 4, -5], [6, -3, 2, -1, -5, 4], [6, -3, 2, 4, -1, -5], [6, -3, 2, 4, -5, -1], [6, -3, 2, -5, -1, 4], [6, -3, 2, -5, 4, -1], [6, -3, 4, -1, 2, -5], [6, -3, 4, -1, -5, 2], [6, -3, 4, 2, -1, -5], [6, -3, 4, 2, -5, -1], [6, -3, 4, -5, -1, 2], [6, -3, 4, -5, 2, -1], [6, -3, -5, -1, 2, 4], [6, -3, -5, -1, 4, 2], [6, -3, -5, 2, -1, 4], [6, -3, -5, 2, 4, -1], [6, -3, -5, 4, -1, 2], [6, -3, -5, 4, 2, -1], [6, 4, -1, 2, -3, -5], [6, 4, -1, 2, -5, -3], [6, 4, -1, -3, 2, -5], [6, 4, -1, -3, -5, 2], [6, 4, -1, -5, 2, -3], [6, 4, -1, -5, -3, 2], [6, 4, 2, -1, -3, -5], [6, 4, 2, -1, -5, -3], [6, 4, 2, -3, -1, -5], [6, 4, 2, -3, -5, -1], [6, 4, 2, -5, -1, -3], [6, 4, 2, -5, -3, -1], [6, 4, -3, -1, 2, -5], [6, 4, -3, -1, -5, 2], [6, 4, -3, 2, -1, -5], [6, 4, -3, 2, -5, -1], [6, 4, -3, -5, -1, 2], [6, 4, -3, -5, 2, -1], [6, 4, -5, -1, 2, -3], [6, 4, -5, -1, -3, 2], [6, 4, -5, 2, -1, -3], [6, 4, -5, 2, -3, -1], [6, 4, -5, -3, -1, 2], [6, 4, -5, -3, 2, -1], [6, -5, -1, 2, -3, 4], [6, -5, -1, 2, 4, -3], [6, -5, -1, -3, 2, 4], [6, -5, -1, -3, 4, 2], [6, -5, -1, 4, 2, -3], [6, -5, -1, 4, -3, 2], [6, -5, 2, -1, -3, 4], [6, -5, 2, -1, 4, -3], [6, -5, 2, -3, -1, 4], [6, -5, 2, -3, 4, -1], [6, -5, 2, 4, -1, -3], [6, -5, 2, 4, -3, -1], [6, -5, -3, -1, 2, 4], [6, -5, -3, -1, 4, 2], [6, -5, -3, 2, -1, 4], [6, -5, -3, 2, 4, -1], [6, -5, -3, 4, -1, 2], [6, -5, -3, 4, 2, -1], [6, -5, 4, -1, 2, -3], [6, -5, 4, -1, -3, 2], [6, -5, 4, 2, -1, -3], [6, -5, 4, 2, -3, -1], [6, -5, 4, -3, -1, 2], [6, -5, 4, -3, 2, -1]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6]), [[-1, -2, -3, -4, -5, -6], [-1, -2, -3, -4, -6, -5], [-1, -2, -3, -5, -4, -6], [-1, -2, -3, -5, -6, -4], [-1, -2, -3, -6, -4, -5], [-1, -2, -3, -6, -5, -4], [-1, -2, -4, -3, -5, -6], [-1, -2, -4, -3, -6, -5], [-1, -2, -4, -5, -3, -6], [-1, -2, -4, -5, -6, -3], [-1, -2, -4, -6, -3, -5], [-1, -2, -4, -6, -5, -3], [-1, -2, -5, -3, -4, -6], [-1, -2, -5, -3, -6, -4], [-1, -2, -5, -4, -3, -6], [-1, -2, -5, -4, -6, -3], [-1, -2, -5, -6, -3, -4], [-1, -2, -5, -6, -4, -3], [-1, -2, -6, -3, -4, -5], [-1, -2, -6, -3, -5, -4], [-1, -2, -6, -4, -3, -5], [-1, -2, -6, -4, -5, -3], [-1, -2, -6, -5, -3, -4], [-1, -2, -6, -5, -4, -3], [-1, -3, -2, -4, -5, -6], [-1, -3, -2, -4, -6, -5], [-1, -3, -2, -5, -4, -6], [-1, -3, -2, -5, -6, -4], [-1, -3, -2, -6, -4, -5], [-1, -3, -2, -6, -5, -4], [-1, -3, -4, -2, -5, -6], [-1, -3, -4, -2, -6, -5], [-1, -3, -4, -5, -2, -6], [-1, -3, -4, -5, -6, -2], [-1, -3, -4, -6, -2, -5], [-1, -3, -4, -6, -5, -2], [-1, -3, -5, -2, -4, -6], [-1, -3, -5, -2, -6, -4], [-1, -3, -5, -4, -2, -6], [-1, -3, -5, -4, -6, -2], [-1, -3, -5, -6, -2, -4], [-1, -3, -5, -6, -4, -2], [-1, -3, -6, -2, -4, -5], [-1, -3, -6, -2, -5, -4], [-1, -3, -6, -4, -2, -5], [-1, -3, -6, -4, -5, -2], [-1, -3, -6, -5, -2, -4], [-1, -3, -6, -5, -4, -2], [-1, -4, -2, -3, -5, -6], [-1, -4, -2, -3, -6, -5], [-1, -4, -2, -5, -3, -6], [-1, -4, -2, -5, -6, -3], [-1, -4, -2, -6, -3, -5], [-1, -4, -2, -6, -5, -3], [-1, -4, -3, -2, -5, -6], [-1, -4, -3, -2, -6, -5], [-1, -4, -3, -5, -2, -6], [-1, -4, -3, -5, -6, -2], [-1, -4, -3, -6, -2, -5], [-1, -4, -3, -6, -5, -2], [-1, -4, -5, -2, -3, -6], [-1, -4, -5, -2, -6, -3], [-1, -4, -5, -3, -2, -6], [-1, -4, -5, -3, -6, -2], [-1, -4, -5, -6, -2, -3], [-1, -4, -5, -6, -3, -2], [-1, -4, -6, -2, -3, -5], [-1, -4, -6, -2, -5, -3], [-1, -4, -6, -3, -2, -5], [-1, -4, -6, -3, -5, -2], [-1, -4, -6, -5, -2, -3], [-1, -4, -6, -5, -3, -2], [-1, -5, -2, -3, -4, -6], [-1, -5, -2, -3, -6, -4], [-1, -5, -2, -4, -3, -6], [-1, -5, -2, -4, -6, -3], [-1, -5, -2, -6, -3, -4], [-1, -5, -2, -6, -4, -3], [-1, -5, -3, -2, -4, -6], [-1, -5, -3, -2, -6, -4], [-1, -5, -3, -4, -2, -6], [-1, -5, -3, -4, -6, -2], [-1, -5, -3, -6, -2, -4], [-1, -5, -3, -6, -4, -2], [-1, -5, -4, -2, -3, -6], [-1, -5, -4, -2, -6, -3], [-1, -5, -4, -3, -2, -6], [-1, -5, -4, -3, -6, -2], [-1, -5, -4, -6, -2, -3], [-1, -5, -4, -6, -3, -2], [-1, -5, -6, -2, -3, -4], [-1, -5, -6, -2, -4, -3], [-1, -5, -6, -3, -2, -4], [-1, -5, -6, -3, -4, -2], [-1, -5, -6, -4, -2, -3], [-1, -5, -6, -4, -3, -2], [-1, -6, -2, -3, -4, -5], [-1, -6, -2, -3, -5, -4], [-1, -6, -2, -4, -3, -5], [-1, -6, -2, -4, -5, -3], [-1, -6, -2, -5, -3, -4], [-1, -6, -2, -5, -4, -3], [-1, -6, -3, -2, -4, -5], [-1, -6, -3, -2, -5, -4], [-1, -6, -3, -4, -2, -5], [-1, -6, -3, -4, -5, -2], [-1, -6, -3, -5, -2, -4], [-1, -6, -3, -5, -4, -2], [-1, -6, -4, -2, -3, -5], [-1, -6, -4, -2, -5, -3], [-1, -6, -4, -3, -2, -5], [-1, -6, -4, -3, -5, -2], [-1, -6, -4, -5, -2, -3], [-1, -6, -4, -5, -3, -2], [-1, -6, -5, -2, -3, -4], [-1, -6, -5, -2, -4, -3], [-1, -6, -5, -3, -2, -4], [-1, -6, -5, -3, -4, -2], [-1, -6, -5, -4, -2, -3], [-1, -6, -5, -4, -3, -2], [-2, -1, -3, -4, -5, -6], [-2, -1, -3, -4, -6, -5], [-2, -1, -3, -5, -4, -6], [-2, -1, -3, -5, -6, -4], [-2, -1, -3, -6, -4, -5], [-2, -1, -3, -6, -5, -4], [-2, -1, -4, -3, -5, -6], [-2, -1, -4, -3, -6, -5], [-2, -1, -4, -5, -3, -6], [-2, -1, -4, -5, -6, -3], [-2, -1, -4, -6, -3, -5], [-2, -1, -4, -6, -5, -3], [-2, -1, -5, -3, -4, -6], [-2, -1, -5, -3, -6, -4], [-2, -1, -5, -4, -3, -6], [-2, -1, -5, -4, -6, -3], [-2, -1, -5, -6, -3, -4], [-2, -1, -5, -6, -4, -3], [-2, -1, -6, -3, -4, -5], [-2, -1, -6, -3, -5, -4], [-2, -1, -6, -4, -3, -5], [-2, -1, -6, -4, -5, -3], [-2, -1, -6, -5, -3, -4], [-2, -1, -6, -5, -4, -3], [-2, -3, -1, -4, -5, -6], [-2, -3, -1, -4, -6, -5], [-2, -3, -1, -5, -4, -6], [-2, -3, -1, -5, -6, -4], [-2, -3, -1, -6, -4, -5], [-2, -3, -1, -6, -5, -4], [-2, -3, -4, -1, -5, -6], [-2, -3, -4, -1, -6, -5], [-2, -3, -4, -5, -1, -6], [-2, -3, -4, -5, -6, -1], [-2, -3, -4, -6, -1, -5], [-2, -3, -4, -6, -5, -1], [-2, -3, -5, -1, -4, -6], [-2, -3, -5, -1, -6, -4], [-2, -3, -5, -4, -1, -6], [-2, -3, -5, -4, -6, -1], [-2, -3, -5, -6, -1, -4], [-2, -3, -5, -6, -4, -1], [-2, -3, -6, -1, -4, -5], [-2, -3, -6, -1, -5, -4], [-2, -3, -6, -4, -1, -5], [-2, -3, -6, -4, -5, -1], [-2, -3, -6, -5, -1, -4], [-2, -3, -6, -5, -4, -1], [-2, -4, -1, -3, -5, -6], [-2, -4, -1, -3, -6, -5], [-2, -4, -1, -5, -3, -6], [-2, -4, -1, -5, -6, -3], [-2, -4, -1, -6, -3, -5], [-2, -4, -1, -6, -5, -3], [-2, -4, -3, -1, -5, -6], [-2, -4, -3, -1, -6, -5], [-2, -4, -3, -5, -1, -6], [-2, -4, -3, -5, -6, -1], [-2, -4, -3, -6, -1, -5], [-2, -4, -3, -6, -5, -1], [-2, -4, -5, -1, -3, -6], [-2, -4, -5, -1, -6, -3], [-2, -4, -5, -3, -1, -6], [-2, -4, -5, -3, -6, -1], [-2, -4, -5, -6, -1, -3], [-2, -4, -5, -6, -3, -1], [-2, -4, -6, -1, -3, -5], [-2, -4, -6, -1, -5, -3], [-2, -4, -6, -3, -1, -5], [-2, -4, -6, -3, -5, -1], [-2, -4, -6, -5, -1, -3], [-2, -4, -6, -5, -3, -1], [-2, -5, -1, -3, -4, -6], [-2, -5, -1, -3, -6, -4], [-2, -5, -1, -4, -3, -6], [-2, -5, -1, -4, -6, -3], [-2, -5, -1, -6, -3, -4], [-2, -5, -1, -6, -4, -3], [-2, -5, -3, -1, -4, -6], [-2, -5, -3, -1, -6, -4], [-2, -5, -3, -4, -1, -6], [-2, -5, -3, -4, -6, -1], [-2, -5, -3, -6, -1, -4], [-2, -5, -3, -6, -4, -1], [-2, -5, -4, -1, -3, -6], [-2, -5, -4, -1, -6, -3], [-2, -5, -4, -3, -1, -6], [-2, -5, -4, -3, -6, -1], [-2, -5, -4, -6, -1, -3], [-2, -5, -4, -6, -3, -1], [-2, -5, -6, -1, -3, -4], [-2, -5, -6, -1, -4, -3], [-2, -5, -6, -3, -1, -4], [-2, -5, -6, -3, -4, -1], [-2, -5, -6, -4, -1, -3], [-2, -5, -6, -4, -3, -1], [-2, -6, -1, -3, -4, -5], [-2, -6, -1, -3, -5, -4], [-2, -6, -1, -4, -3, -5], [-2, -6, -1, -4, -5, -3], [-2, -6, -1, -5, -3, -4], [-2, -6, -1, -5, -4, -3], [-2, -6, -3, -1, -4, -5], [-2, -6, -3, -1, -5, -4], [-2, -6, -3, -4, -1, -5], [-2, -6, -3, -4, -5, -1], [-2, -6, -3, -5, -1, -4], [-2, -6, -3, -5, -4, -1], [-2, -6, -4, -1, -3, -5], [-2, -6, -4, -1, -5, -3], [-2, -6, -4, -3, -1, -5], [-2, -6, -4, -3, -5, -1], [-2, -6, -4, -5, -1, -3], [-2, -6, -4, -5, -3, -1], [-2, -6, -5, -1, -3, -4], [-2, -6, -5, -1, -4, -3], [-2, -6, -5, -3, -1, -4], [-2, -6, -5, -3, -4, -1], [-2, -6, -5, -4, -1, -3], [-2, -6, -5, -4, -3, -1], [-3, -1, -2, -4, -5, -6], [-3, -1, -2, -4, -6, -5], [-3, -1, -2, -5, -4, -6], [-3, -1, -2, -5, -6, -4], [-3, -1, -2, -6, -4, -5], [-3, -1, -2, -6, -5, -4], [-3, -1, -4, -2, -5, -6], [-3, -1, -4, -2, -6, -5], [-3, -1, -4, -5, -2, -6], [-3, -1, -4, -5, -6, -2], [-3, -1, -4, -6, -2, -5], [-3, -1, -4, -6, -5, -2], [-3, -1, -5, -2, -4, -6], [-3, -1, -5, -2, -6, -4], [-3, -1, -5, -4, -2, -6], [-3, -1, -5, -4, -6, -2], [-3, -1, -5, -6, -2, -4], [-3, -1, -5, -6, -4, -2], [-3, -1, -6, -2, -4, -5], [-3, -1, -6, -2, -5, -4], [-3, -1, -6, -4, -2, -5], [-3, -1, -6, -4, -5, -2], [-3, -1, -6, -5, -2, -4], [-3, -1, -6, -5, -4, -2], [-3, -2, -1, -4, -5, -6], [-3, -2, -1, -4, -6, -5], [-3, -2, -1, -5, -4, -6], [-3, -2, -1, -5, -6, -4], [-3, -2, -1, -6, -4, -5], [-3, -2, -1, -6, -5, -4], [-3, -2, -4, -1, -5, -6], [-3, -2, -4, -1, -6, -5], [-3, -2, -4, -5, -1, -6], [-3, -2, -4, -5, -6, -1], [-3, -2, -4, -6, -1, -5], [-3, -2, -4, -6, -5, -1], [-3, -2, -5, -1, -4, -6], [-3, -2, -5, -1, -6, -4], [-3, -2, -5, -4, -1, -6], [-3, -2, -5, -4, -6, -1], [-3, -2, -5, -6, -1, -4], [-3, -2, -5, -6, -4, -1], [-3, -2, -6, -1, -4, -5], [-3, -2, -6, -1, -5, -4], [-3, -2, -6, -4, -1, -5], [-3, -2, -6, -4, -5, -1], [-3, -2, -6, -5, -1, -4], [-3, -2, -6, -5, -4, -1], [-3, -4, -1, -2, -5, -6], [-3, -4, -1, -2, -6, -5], [-3, -4, -1, -5, -2, -6], [-3, -4, -1, -5, -6, -2], [-3, -4, -1, -6, -2, -5], [-3, -4, -1, -6, -5, -2], [-3, -4, -2, -1, -5, -6], [-3, -4, -2, -1, -6, -5], [-3, -4, -2, -5, -1, -6], [-3, -4, -2, -5, -6, -1], [-3, -4, -2, -6, -1, -5], [-3, -4, -2, -6, -5, -1], [-3, -4, -5, -1, -2, -6], [-3, -4, -5, -1, -6, -2], [-3, -4, -5, -2, -1, -6], [-3, -4, -5, -2, -6, -1], [-3, -4, -5, -6, -1, -2], [-3, -4, -5, -6, -2, -1], [-3, -4, -6, -1, -2, -5], [-3, -4, -6, -1, -5, -2], [-3, -4, -6, -2, -1, -5], [-3, -4, -6, -2, -5, -1], [-3, -4, -6, -5, -1, -2], [-3, -4, -6, -5, -2, -1], [-3, -5, -1, -2, -4, -6], [-3, -5, -1, -2, -6, -4], [-3, -5, -1, -4, -2, -6], [-3, -5, -1, -4, -6, -2], [-3, -5, -1, -6, -2, -4], [-3, -5, -1, -6, -4, -2], [-3, -5, -2, -1, -4, -6], [-3, -5, -2, -1, -6, -4], [-3, -5, -2, -4, -1, -6], [-3, -5, -2, -4, -6, -1], [-3, -5, -2, -6, -1, -4], [-3, -5, -2, -6, -4, -1], [-3, -5, -4, -1, -2, -6], [-3, -5, -4, -1, -6, -2], [-3, -5, -4, -2, -1, -6], [-3, -5, -4, -2, -6, -1], [-3, -5, -4, -6, -1, -2], [-3, -5, -4, -6, -2, -1], [-3, -5, -6, -1, -2, -4], [-3, -5, -6, -1, -4, -2], [-3, -5, -6, -2, -1, -4], [-3, -5, -6, -2, -4, -1], [-3, -5, -6, -4, -1, -2], [-3, -5, -6, -4, -2, -1], [-3, -6, -1, -2, -4, -5], [-3, -6, -1, -2, -5, -4], [-3, -6, -1, -4, -2, -5], [-3, -6, -1, -4, -5, -2], [-3, -6, -1, -5, -2, -4], [-3, -6, -1, -5, -4, -2], [-3, -6, -2, -1, -4, -5], [-3, -6, -2, -1, -5, -4], [-3, -6, -2, -4, -1, -5], [-3, -6, -2, -4, -5, -1], [-3, -6, -2, -5, -1, -4], [-3, -6, -2, -5, -4, -1], [-3, -6, -4, -1, -2, -5], [-3, -6, -4, -1, -5, -2], [-3, -6, -4, -2, -1, -5], [-3, -6, -4, -2, -5, -1], [-3, -6, -4, -5, -1, -2], [-3, -6, -4, -5, -2, -1], [-3, -6, -5, -1, -2, -4], [-3, -6, -5, -1, -4, -2], [-3, -6, -5, -2, -1, -4], [-3, -6, -5, -2, -4, -1], [-3, -6, -5, -4, -1, -2], [-3, -6, -5, -4, -2, -1], [-4, -1, -2, -3, -5, -6], [-4, -1, -2, -3, -6, -5], [-4, -1, -2, -5, -3, -6], [-4, -1, -2, -5, -6, -3], [-4, -1, -2, -6, -3, -5], [-4, -1, -2, -6, -5, -3], [-4, -1, -3, -2, -5, -6], [-4, -1, -3, -2, -6, -5], [-4, -1, -3, -5, -2, -6], [-4, -1, -3, -5, -6, -2], [-4, -1, -3, -6, -2, -5], [-4, -1, -3, -6, -5, -2], [-4, -1, -5, -2, -3, -6], [-4, -1, -5, -2, -6, -3], [-4, -1, -5, -3, -2, -6], [-4, -1, -5, -3, -6, -2], [-4, -1, -5, -6, -2, -3], [-4, -1, -5, -6, -3, -2], [-4, -1, -6, -2, -3, -5], [-4, -1, -6, -2, -5, -3], [-4, -1, -6, -3, -2, -5], [-4, -1, -6, -3, -5, -2], [-4, -1, -6, -5, -2, -3], [-4, -1, -6, -5, -3, -2], [-4, -2, -1, -3, -5, -6], [-4, -2, -1, -3, -6, -5], [-4, -2, -1, -5, -3, -6], [-4, -2, -1, -5, -6, -3], [-4, -2, -1, -6, -3, -5], [-4, -2, -1, -6, -5, -3], [-4, -2, -3, -1, -5, -6], [-4, -2, -3, -1, -6, -5], [-4, -2, -3, -5, -1, -6], [-4, -2, -3, -5, -6, -1], [-4, -2, -3, -6, -1, -5], [-4, -2, -3, -6, -5, -1], [-4, -2, -5, -1, -3, -6], [-4, -2, -5, -1, -6, -3], [-4, -2, -5, -3, -1, -6], [-4, -2, -5, -3, -6, -1], [-4, -2, -5, -6, -1, -3], [-4, -2, -5, -6, -3, -1], [-4, -2, -6, -1, -3, -5], [-4, -2, -6, -1, -5, -3], [-4, -2, -6, -3, -1, -5], [-4, -2, -6, -3, -5, -1], [-4, -2, -6, -5, -1, -3], [-4, -2, -6, -5, -3, -1], [-4, -3, -1, -2, -5, -6], [-4, -3, -1, -2, -6, -5], [-4, -3, -1, -5, -2, -6], [-4, -3, -1, -5, -6, -2], [-4, -3, -1, -6, -2, -5], [-4, -3, -1, -6, -5, -2], [-4, -3, -2, -1, -5, -6], [-4, -3, -2, -1, -6, -5], [-4, -3, -2, -5, -1, -6], [-4, -3, -2, -5, -6, -1], [-4, -3, -2, -6, -1, -5], [-4, -3, -2, -6, -5, -1], [-4, -3, -5, -1, -2, -6], [-4, -3, -5, -1, -6, -2], [-4, -3, -5, -2, -1, -6], [-4, -3, -5, -2, -6, -1], [-4, -3, -5, -6, -1, -2], [-4, -3, -5, -6, -2, -1], [-4, -3, -6, -1, -2, -5], [-4, -3, -6, -1, -5, -2], [-4, -3, -6, -2, -1, -5], [-4, -3, -6, -2, -5, -1], [-4, -3, -6, -5, -1, -2], [-4, -3, -6, -5, -2, -1], [-4, -5, -1, -2, -3, -6], [-4, -5, -1, -2, -6, -3], [-4, -5, -1, -3, -2, -6], [-4, -5, -1, -3, -6, -2], [-4, -5, -1, -6, -2, -3], [-4, -5, -1, -6, -3, -2], [-4, -5, -2, -1, -3, -6], [-4, -5, -2, -1, -6, -3], [-4, -5, -2, -3, -1, -6], [-4, -5, -2, -3, -6, -1], [-4, -5, -2, -6, -1, -3], [-4, -5, -2, -6, -3, -1], [-4, -5, -3, -1, -2, -6], [-4, -5, -3, -1, -6, -2], [-4, -5, -3, -2, -1, -6], [-4, -5, -3, -2, -6, -1], [-4, -5, -3, -6, -1, -2], [-4, -5, -3, -6, -2, -1], [-4, -5, -6, -1, -2, -3], [-4, -5, -6, -1, -3, -2], [-4, -5, -6, -2, -1, -3], [-4, -5, -6, -2, -3, -1], [-4, -5, -6, -3, -1, -2], [-4, -5, -6, -3, -2, -1], [-4, -6, -1, -2, -3, -5], [-4, -6, -1, -2, -5, -3], [-4, -6, -1, -3, -2, -5], [-4, -6, -1, -3, -5, -2], [-4, -6, -1, -5, -2, -3], [-4, -6, -1, -5, -3, -2], [-4, -6, -2, -1, -3, -5], [-4, -6, -2, -1, -5, -3], [-4, -6, -2, -3, -1, -5], [-4, -6, -2, -3, -5, -1], [-4, -6, -2, -5, -1, -3], [-4, -6, -2, -5, -3, -1], [-4, -6, -3, -1, -2, -5], [-4, -6, -3, -1, -5, -2], [-4, -6, -3, -2, -1, -5], [-4, -6, -3, -2, -5, -1], [-4, -6, -3, -5, -1, -2], [-4, -6, -3, -5, -2, -1], [-4, -6, -5, -1, -2, -3], [-4, -6, -5, -1, -3, -2], [-4, -6, -5, -2, -1, -3], [-4, -6, -5, -2, -3, -1], [-4, -6, -5, -3, -1, -2], [-4, -6, -5, -3, -2, -1], [-5, -1, -2, -3, -4, -6], [-5, -1, -2, -3, -6, -4], [-5, -1, -2, -4, -3, -6], [-5, -1, -2, -4, -6, -3], [-5, -1, -2, -6, -3, -4], [-5, -1, -2, -6, -4, -3], [-5, -1, -3, -2, -4, -6], [-5, -1, -3, -2, -6, -4], [-5, -1, -3, -4, -2, -6], [-5, -1, -3, -4, -6, -2], [-5, -1, -3, -6, -2, -4], [-5, -1, -3, -6, -4, -2], [-5, -1, -4, -2, -3, -6], [-5, -1, -4, -2, -6, -3], [-5, -1, -4, -3, -2, -6], [-5, -1, -4, -3, -6, -2], [-5, -1, -4, -6, -2, -3], [-5, -1, -4, -6, -3, -2], [-5, -1, -6, -2, -3, -4], [-5, -1, -6, -2, -4, -3], [-5, -1, -6, -3, -2, -4], [-5, -1, -6, -3, -4, -2], [-5, -1, -6, -4, -2, -3], [-5, -1, -6, -4, -3, -2], [-5, -2, -1, -3, -4, -6], [-5, -2, -1, -3, -6, -4], [-5, -2, -1, -4, -3, -6], [-5, -2, -1, -4, -6, -3], [-5, -2, -1, -6, -3, -4], [-5, -2, -1, -6, -4, -3], [-5, -2, -3, -1, -4, -6], [-5, -2, -3, -1, -6, -4], [-5, -2, -3, -4, -1, -6], [-5, -2, -3, -4, -6, -1], [-5, -2, -3, -6, -1, -4], [-5, -2, -3, -6, -4, -1], [-5, -2, -4, -1, -3, -6], [-5, -2, -4, -1, -6, -3], [-5, -2, -4, -3, -1, -6], [-5, -2, -4, -3, -6, -1], [-5, -2, -4, -6, -1, -3], [-5, -2, -4, -6, -3, -1], [-5, -2, -6, -1, -3, -4], [-5, -2, -6, -1, -4, -3], [-5, -2, -6, -3, -1, -4], [-5, -2, -6, -3, -4, -1], [-5, -2, -6, -4, -1, -3], [-5, -2, -6, -4, -3, -1], [-5, -3, -1, -2, -4, -6], [-5, -3, -1, -2, -6, -4], [-5, -3, -1, -4, -2, -6], [-5, -3, -1, -4, -6, -2], [-5, -3, -1, -6, -2, -4], [-5, -3, -1, -6, -4, -2], [-5, -3, -2, -1, -4, -6], [-5, -3, -2, -1, -6, -4], [-5, -3, -2, -4, -1, -6], [-5, -3, -2, -4, -6, -1], [-5, -3, -2, -6, -1, -4], [-5, -3, -2, -6, -4, -1], [-5, -3, -4, -1, -2, -6], [-5, -3, -4, -1, -6, -2], [-5, -3, -4, -2, -1, -6], [-5, -3, -4, -2, -6, -1], [-5, -3, -4, -6, -1, -2], [-5, -3, -4, -6, -2, -1], [-5, -3, -6, -1, -2, -4], [-5, -3, -6, -1, -4, -2], [-5, -3, -6, -2, -1, -4], [-5, -3, -6, -2, -4, -1], [-5, -3, -6, -4, -1, -2], [-5, -3, -6, -4, -2, -1], [-5, -4, -1, -2, -3, -6], [-5, -4, -1, -2, -6, -3], [-5, -4, -1, -3, -2, -6], [-5, -4, -1, -3, -6, -2], [-5, -4, -1, -6, -2, -3], [-5, -4, -1, -6, -3, -2], [-5, -4, -2, -1, -3, -6], [-5, -4, -2, -1, -6, -3], [-5, -4, -2, -3, -1, -6], [-5, -4, -2, -3, -6, -1], [-5, -4, -2, -6, -1, -3], [-5, -4, -2, -6, -3, -1], [-5, -4, -3, -1, -2, -6], [-5, -4, -3, -1, -6, -2], [-5, -4, -3, -2, -1, -6], [-5, -4, -3, -2, -6, -1], [-5, -4, -3, -6, -1, -2], [-5, -4, -3, -6, -2, -1], [-5, -4, -6, -1, -2, -3], [-5, -4, -6, -1, -3, -2], [-5, -4, -6, -2, -1, -3], [-5, -4, -6, -2, -3, -1], [-5, -4, -6, -3, -1, -2], [-5, -4, -6, -3, -2, -1], [-5, -6, -1, -2, -3, -4], [-5, -6, -1, -2, -4, -3], [-5, -6, -1, -3, -2, -4], [-5, -6, -1, -3, -4, -2], [-5, -6, -1, -4, -2, -3], [-5, -6, -1, -4, -3, -2], [-5, -6, -2, -1, -3, -4], [-5, -6, -2, -1, -4, -3], [-5, -6, -2, -3, -1, -4], [-5, -6, -2, -3, -4, -1], [-5, -6, -2, -4, -1, -3], [-5, -6, -2, -4, -3, -1], [-5, -6, -3, -1, -2, -4], [-5, -6, -3, -1, -4, -2], [-5, -6, -3, -2, -1, -4], [-5, -6, -3, -2, -4, -1], [-5, -6, -3, -4, -1, -2], [-5, -6, -3, -4, -2, -1], [-5, -6, -4, -1, -2, -3], [-5, -6, -4, -1, -3, -2], [-5, -6, -4, -2, -1, -3], [-5, -6, -4, -2, -3, -1], [-5, -6, -4, -3, -1, -2], [-5, -6, -4, -3, -2, -1], [-6, -1, -2, -3, -4, -5], [-6, -1, -2, -3, -5, -4], [-6, -1, -2, -4, -3, -5], [-6, -1, -2, -4, -5, -3], [-6, -1, -2, -5, -3, -4], [-6, -1, -2, -5, -4, -3], [-6, -1, -3, -2, -4, -5], [-6, -1, -3, -2, -5, -4], [-6, -1, -3, -4, -2, -5], [-6, -1, -3, -4, -5, -2], [-6, -1, -3, -5, -2, -4], [-6, -1, -3, -5, -4, -2], [-6, -1, -4, -2, -3, -5], [-6, -1, -4, -2, -5, -3], [-6, -1, -4, -3, -2, -5], [-6, -1, -4, -3, -5, -2], [-6, -1, -4, -5, -2, -3], [-6, -1, -4, -5, -3, -2], [-6, -1, -5, -2, -3, -4], [-6, -1, -5, -2, -4, -3], [-6, -1, -5, -3, -2, -4], [-6, -1, -5, -3, -4, -2], [-6, -1, -5, -4, -2, -3], [-6, -1, -5, -4, -3, -2], [-6, -2, -1, -3, -4, -5], [-6, -2, -1, -3, -5, -4], [-6, -2, -1, -4, -3, -5], [-6, -2, -1, -4, -5, -3], [-6, -2, -1, -5, -3, -4], [-6, -2, -1, -5, -4, -3], [-6, -2, -3, -1, -4, -5], [-6, -2, -3, -1, -5, -4], [-6, -2, -3, -4, -1, -5], [-6, -2, -3, -4, -5, -1], [-6, -2, -3, -5, -1, -4], [-6, -2, -3, -5, -4, -1], [-6, -2, -4, -1, -3, -5], [-6, -2, -4, -1, -5, -3], [-6, -2, -4, -3, -1, -5], [-6, -2, -4, -3, -5, -1], [-6, -2, -4, -5, -1, -3], [-6, -2, -4, -5, -3, -1], [-6, -2, -5, -1, -3, -4], [-6, -2, -5, -1, -4, -3], [-6, -2, -5, -3, -1, -4], [-6, -2, -5, -3, -4, -1], [-6, -2, -5, -4, -1, -3], [-6, -2, -5, -4, -3, -1], [-6, -3, -1, -2, -4, -5], [-6, -3, -1, -2, -5, -4], [-6, -3, -1, -4, -2, -5], [-6, -3, -1, -4, -5, -2], [-6, -3, -1, -5, -2, -4], [-6, -3, -1, -5, -4, -2], [-6, -3, -2, -1, -4, -5], [-6, -3, -2, -1, -5, -4], [-6, -3, -2, -4, -1, -5], [-6, -3, -2, -4, -5, -1], [-6, -3, -2, -5, -1, -4], [-6, -3, -2, -5, -4, -1], [-6, -3, -4, -1, -2, -5], [-6, -3, -4, -1, -5, -2], [-6, -3, -4, -2, -1, -5], [-6, -3, -4, -2, -5, -1], [-6, -3, -4, -5, -1, -2], [-6, -3, -4, -5, -2, -1], [-6, -3, -5, -1, -2, -4], [-6, -3, -5, -1, -4, -2], [-6, -3, -5, -2, -1, -4], [-6, -3, -5, -2, -4, -1], [-6, -3, -5, -4, -1, -2], [-6, -3, -5, -4, -2, -1], [-6, -4, -1, -2, -3, -5], [-6, -4, -1, -2, -5, -3], [-6, -4, -1, -3, -2, -5], [-6, -4, -1, -3, -5, -2], [-6, -4, -1, -5, -2, -3], [-6, -4, -1, -5, -3, -2], [-6, -4, -2, -1, -3, -5], [-6, -4, -2, -1, -5, -3], [-6, -4, -2, -3, -1, -5], [-6, -4, -2, -3, -5, -1], [-6, -4, -2, -5, -1, -3], [-6, -4, -2, -5, -3, -1], [-6, -4, -3, -1, -2, -5], [-6, -4, -3, -1, -5, -2], [-6, -4, -3, -2, -1, -5], [-6, -4, -3, -2, -5, -1], [-6, -4, -3, -5, -1, -2], [-6, -4, -3, -5, -2, -1], [-6, -4, -5, -1, -2, -3], [-6, -4, -5, -1, -3, -2], [-6, -4, -5, -2, -1, -3], [-6, -4, -5, -2, -3, -1], [-6, -4, -5, -3, -1, -2], [-6, -4, -5, -3, -2, -1], [-6, -5, -1, -2, -3, -4], [-6, -5, -1, -2, -4, -3], [-6, -5, -1, -3, -2, -4], [-6, -5, -1, -3, -4, -2], [-6, -5, -1, -4, -2, -3], [-6, -5, -1, -4, -3, -2], [-6, -5, -2, -1, -3, -4], [-6, -5, -2, -1, -4, -3], [-6, -5, -2, -3, -1, -4], [-6, -5, -2, -3, -4, -1], [-6, -5, -2, -4, -1, -3], [-6, -5, -2, -4, -3, -1], [-6, -5, -3, -1, -2, -4], [-6, -5, -3, -1, -4, -2], [-6, -5, -3, -2, -1, -4], [-6, -5, -3, -2, -4, -1], [-6, -5, -3, -4, -1, -2], [-6, -5, -3, -4, -2, -1], [-6, -5, -4, -1, -2, -3], [-6, -5, -4, -1, -3, -2], [-6, -5, -4, -2, -1, -3], [-6, -5, -4, -2, -3, -1], [-6, -5, -4, -3, -1, -2], [-6, -5, -4, -3, -2, -1]])\n assert answers_match(candidate(nums=[-6, -4, -2, 0, 2, 4]), [[-6, -4, -2, 0, 2, 4], [-6, -4, -2, 0, 4, 2], [-6, -4, -2, 2, 0, 4], [-6, -4, -2, 2, 4, 0], [-6, -4, -2, 4, 0, 2], [-6, -4, -2, 4, 2, 0], [-6, -4, 0, -2, 2, 4], [-6, -4, 0, -2, 4, 2], [-6, -4, 0, 2, -2, 4], [-6, -4, 0, 2, 4, -2], [-6, -4, 0, 4, -2, 2], [-6, -4, 0, 4, 2, -2], [-6, -4, 2, -2, 0, 4], [-6, -4, 2, -2, 4, 0], [-6, -4, 2, 0, -2, 4], [-6, -4, 2, 0, 4, -2], [-6, -4, 2, 4, -2, 0], [-6, -4, 2, 4, 0, -2], [-6, -4, 4, -2, 0, 2], [-6, -4, 4, -2, 2, 0], [-6, -4, 4, 0, -2, 2], [-6, -4, 4, 0, 2, -2], [-6, -4, 4, 2, -2, 0], [-6, -4, 4, 2, 0, -2], [-6, -2, -4, 0, 2, 4], [-6, -2, -4, 0, 4, 2], [-6, -2, -4, 2, 0, 4], [-6, -2, -4, 2, 4, 0], [-6, -2, -4, 4, 0, 2], [-6, -2, -4, 4, 2, 0], [-6, -2, 0, -4, 2, 4], [-6, -2, 0, -4, 4, 2], [-6, -2, 0, 2, -4, 4], [-6, -2, 0, 2, 4, -4], [-6, -2, 0, 4, -4, 2], [-6, -2, 0, 4, 2, -4], [-6, -2, 2, -4, 0, 4], [-6, -2, 2, -4, 4, 0], [-6, -2, 2, 0, -4, 4], [-6, -2, 2, 0, 4, -4], [-6, -2, 2, 4, -4, 0], [-6, -2, 2, 4, 0, -4], [-6, -2, 4, -4, 0, 2], [-6, -2, 4, -4, 2, 0], [-6, -2, 4, 0, -4, 2], [-6, -2, 4, 0, 2, -4], [-6, -2, 4, 2, -4, 0], [-6, -2, 4, 2, 0, -4], [-6, 0, -4, -2, 2, 4], [-6, 0, -4, -2, 4, 2], [-6, 0, -4, 2, -2, 4], [-6, 0, -4, 2, 4, -2], [-6, 0, -4, 4, -2, 2], [-6, 0, -4, 4, 2, -2], [-6, 0, -2, -4, 2, 4], [-6, 0, -2, -4, 4, 2], [-6, 0, -2, 2, -4, 4], [-6, 0, -2, 2, 4, -4], [-6, 0, -2, 4, -4, 2], [-6, 0, -2, 4, 2, -4], [-6, 0, 2, -4, -2, 4], [-6, 0, 2, -4, 4, -2], [-6, 0, 2, -2, -4, 4], [-6, 0, 2, -2, 4, -4], [-6, 0, 2, 4, -4, -2], [-6, 0, 2, 4, -2, -4], [-6, 0, 4, -4, -2, 2], [-6, 0, 4, -4, 2, -2], [-6, 0, 4, -2, -4, 2], [-6, 0, 4, -2, 2, -4], [-6, 0, 4, 2, -4, -2], [-6, 0, 4, 2, -2, -4], [-6, 2, -4, -2, 0, 4], [-6, 2, -4, -2, 4, 0], [-6, 2, -4, 0, -2, 4], [-6, 2, -4, 0, 4, -2], [-6, 2, -4, 4, -2, 0], [-6, 2, -4, 4, 0, -2], [-6, 2, -2, -4, 0, 4], [-6, 2, -2, -4, 4, 0], [-6, 2, -2, 0, -4, 4], [-6, 2, -2, 0, 4, -4], [-6, 2, -2, 4, -4, 0], [-6, 2, -2, 4, 0, -4], [-6, 2, 0, -4, -2, 4], [-6, 2, 0, -4, 4, -2], [-6, 2, 0, -2, -4, 4], [-6, 2, 0, -2, 4, -4], [-6, 2, 0, 4, -4, -2], [-6, 2, 0, 4, -2, -4], [-6, 2, 4, -4, -2, 0], [-6, 2, 4, -4, 0, -2], [-6, 2, 4, -2, -4, 0], [-6, 2, 4, -2, 0, -4], [-6, 2, 4, 0, -4, -2], [-6, 2, 4, 0, -2, -4], [-6, 4, -4, -2, 0, 2], [-6, 4, -4, -2, 2, 0], [-6, 4, -4, 0, -2, 2], [-6, 4, -4, 0, 2, -2], [-6, 4, -4, 2, -2, 0], [-6, 4, -4, 2, 0, -2], [-6, 4, -2, -4, 0, 2], [-6, 4, -2, -4, 2, 0], [-6, 4, -2, 0, -4, 2], [-6, 4, -2, 0, 2, -4], [-6, 4, -2, 2, -4, 0], [-6, 4, -2, 2, 0, -4], [-6, 4, 0, -4, -2, 2], [-6, 4, 0, -4, 2, -2], [-6, 4, 0, -2, -4, 2], [-6, 4, 0, -2, 2, -4], [-6, 4, 0, 2, -4, -2], [-6, 4, 0, 2, -2, -4], [-6, 4, 2, -4, -2, 0], [-6, 4, 2, -4, 0, -2], [-6, 4, 2, -2, -4, 0], [-6, 4, 2, -2, 0, -4], [-6, 4, 2, 0, -4, -2], [-6, 4, 2, 0, -2, -4], [-4, -6, -2, 0, 2, 4], [-4, -6, -2, 0, 4, 2], [-4, -6, -2, 2, 0, 4], [-4, -6, -2, 2, 4, 0], [-4, -6, -2, 4, 0, 2], [-4, -6, -2, 4, 2, 0], [-4, -6, 0, -2, 2, 4], [-4, -6, 0, -2, 4, 2], [-4, -6, 0, 2, -2, 4], [-4, -6, 0, 2, 4, -2], [-4, -6, 0, 4, -2, 2], [-4, -6, 0, 4, 2, -2], [-4, -6, 2, -2, 0, 4], [-4, -6, 2, -2, 4, 0], [-4, -6, 2, 0, -2, 4], [-4, -6, 2, 0, 4, -2], [-4, -6, 2, 4, -2, 0], [-4, -6, 2, 4, 0, -2], [-4, -6, 4, -2, 0, 2], [-4, -6, 4, -2, 2, 0], [-4, -6, 4, 0, -2, 2], [-4, -6, 4, 0, 2, -2], [-4, -6, 4, 2, -2, 0], [-4, -6, 4, 2, 0, -2], [-4, -2, -6, 0, 2, 4], [-4, -2, -6, 0, 4, 2], [-4, -2, -6, 2, 0, 4], [-4, -2, -6, 2, 4, 0], [-4, -2, -6, 4, 0, 2], [-4, -2, -6, 4, 2, 0], [-4, -2, 0, -6, 2, 4], [-4, -2, 0, -6, 4, 2], [-4, -2, 0, 2, -6, 4], [-4, -2, 0, 2, 4, -6], [-4, -2, 0, 4, -6, 2], [-4, -2, 0, 4, 2, -6], [-4, -2, 2, -6, 0, 4], [-4, -2, 2, -6, 4, 0], [-4, -2, 2, 0, -6, 4], [-4, -2, 2, 0, 4, -6], [-4, -2, 2, 4, -6, 0], [-4, -2, 2, 4, 0, -6], [-4, -2, 4, -6, 0, 2], [-4, -2, 4, -6, 2, 0], [-4, -2, 4, 0, -6, 2], [-4, -2, 4, 0, 2, -6], [-4, -2, 4, 2, -6, 0], [-4, -2, 4, 2, 0, -6], [-4, 0, -6, -2, 2, 4], [-4, 0, -6, -2, 4, 2], [-4, 0, -6, 2, -2, 4], [-4, 0, -6, 2, 4, -2], [-4, 0, -6, 4, -2, 2], [-4, 0, -6, 4, 2, -2], [-4, 0, -2, -6, 2, 4], [-4, 0, -2, -6, 4, 2], [-4, 0, -2, 2, -6, 4], [-4, 0, -2, 2, 4, -6], [-4, 0, -2, 4, -6, 2], [-4, 0, -2, 4, 2, -6], [-4, 0, 2, -6, -2, 4], [-4, 0, 2, -6, 4, -2], [-4, 0, 2, -2, -6, 4], [-4, 0, 2, -2, 4, -6], [-4, 0, 2, 4, -6, -2], [-4, 0, 2, 4, -2, -6], [-4, 0, 4, -6, -2, 2], [-4, 0, 4, -6, 2, -2], [-4, 0, 4, -2, -6, 2], [-4, 0, 4, -2, 2, -6], [-4, 0, 4, 2, -6, -2], [-4, 0, 4, 2, -2, -6], [-4, 2, -6, -2, 0, 4], [-4, 2, -6, -2, 4, 0], [-4, 2, -6, 0, -2, 4], [-4, 2, -6, 0, 4, -2], [-4, 2, -6, 4, -2, 0], [-4, 2, -6, 4, 0, -2], [-4, 2, -2, -6, 0, 4], [-4, 2, -2, -6, 4, 0], [-4, 2, -2, 0, -6, 4], [-4, 2, -2, 0, 4, -6], [-4, 2, -2, 4, -6, 0], [-4, 2, -2, 4, 0, -6], [-4, 2, 0, -6, -2, 4], [-4, 2, 0, -6, 4, -2], [-4, 2, 0, -2, -6, 4], [-4, 2, 0, -2, 4, -6], [-4, 2, 0, 4, -6, -2], [-4, 2, 0, 4, -2, -6], [-4, 2, 4, -6, -2, 0], [-4, 2, 4, -6, 0, -2], [-4, 2, 4, -2, -6, 0], [-4, 2, 4, -2, 0, -6], [-4, 2, 4, 0, -6, -2], [-4, 2, 4, 0, -2, -6], [-4, 4, -6, -2, 0, 2], [-4, 4, -6, -2, 2, 0], [-4, 4, -6, 0, -2, 2], [-4, 4, -6, 0, 2, -2], [-4, 4, -6, 2, -2, 0], [-4, 4, -6, 2, 0, -2], [-4, 4, -2, -6, 0, 2], [-4, 4, -2, -6, 2, 0], [-4, 4, -2, 0, -6, 2], [-4, 4, -2, 0, 2, -6], [-4, 4, -2, 2, -6, 0], [-4, 4, -2, 2, 0, -6], [-4, 4, 0, -6, -2, 2], [-4, 4, 0, -6, 2, -2], [-4, 4, 0, -2, -6, 2], [-4, 4, 0, -2, 2, -6], [-4, 4, 0, 2, -6, -2], [-4, 4, 0, 2, -2, -6], [-4, 4, 2, -6, -2, 0], [-4, 4, 2, -6, 0, -2], [-4, 4, 2, -2, -6, 0], [-4, 4, 2, -2, 0, -6], [-4, 4, 2, 0, -6, -2], [-4, 4, 2, 0, -2, -6], [-2, -6, -4, 0, 2, 4], [-2, -6, -4, 0, 4, 2], [-2, -6, -4, 2, 0, 4], [-2, -6, -4, 2, 4, 0], [-2, -6, -4, 4, 0, 2], [-2, -6, -4, 4, 2, 0], [-2, -6, 0, -4, 2, 4], [-2, -6, 0, -4, 4, 2], [-2, -6, 0, 2, -4, 4], [-2, -6, 0, 2, 4, -4], [-2, -6, 0, 4, -4, 2], [-2, -6, 0, 4, 2, -4], [-2, -6, 2, -4, 0, 4], [-2, -6, 2, -4, 4, 0], [-2, -6, 2, 0, -4, 4], [-2, -6, 2, 0, 4, -4], [-2, -6, 2, 4, -4, 0], [-2, -6, 2, 4, 0, -4], [-2, -6, 4, -4, 0, 2], [-2, -6, 4, -4, 2, 0], [-2, -6, 4, 0, -4, 2], [-2, -6, 4, 0, 2, -4], [-2, -6, 4, 2, -4, 0], [-2, -6, 4, 2, 0, -4], [-2, -4, -6, 0, 2, 4], [-2, -4, -6, 0, 4, 2], [-2, -4, -6, 2, 0, 4], [-2, -4, -6, 2, 4, 0], [-2, -4, -6, 4, 0, 2], [-2, -4, -6, 4, 2, 0], [-2, -4, 0, -6, 2, 4], [-2, -4, 0, -6, 4, 2], [-2, -4, 0, 2, -6, 4], [-2, -4, 0, 2, 4, -6], [-2, -4, 0, 4, -6, 2], [-2, -4, 0, 4, 2, -6], [-2, -4, 2, -6, 0, 4], [-2, -4, 2, -6, 4, 0], [-2, -4, 2, 0, -6, 4], [-2, -4, 2, 0, 4, -6], [-2, -4, 2, 4, -6, 0], [-2, -4, 2, 4, 0, -6], [-2, -4, 4, -6, 0, 2], [-2, -4, 4, -6, 2, 0], [-2, -4, 4, 0, -6, 2], [-2, -4, 4, 0, 2, -6], [-2, -4, 4, 2, -6, 0], [-2, -4, 4, 2, 0, -6], [-2, 0, -6, -4, 2, 4], [-2, 0, -6, -4, 4, 2], [-2, 0, -6, 2, -4, 4], [-2, 0, -6, 2, 4, -4], [-2, 0, -6, 4, -4, 2], [-2, 0, -6, 4, 2, -4], [-2, 0, -4, -6, 2, 4], [-2, 0, -4, -6, 4, 2], [-2, 0, -4, 2, -6, 4], [-2, 0, -4, 2, 4, -6], [-2, 0, -4, 4, -6, 2], [-2, 0, -4, 4, 2, -6], [-2, 0, 2, -6, -4, 4], [-2, 0, 2, -6, 4, -4], [-2, 0, 2, -4, -6, 4], [-2, 0, 2, -4, 4, -6], [-2, 0, 2, 4, -6, -4], [-2, 0, 2, 4, -4, -6], [-2, 0, 4, -6, -4, 2], [-2, 0, 4, -6, 2, -4], [-2, 0, 4, -4, -6, 2], [-2, 0, 4, -4, 2, -6], [-2, 0, 4, 2, -6, -4], [-2, 0, 4, 2, -4, -6], [-2, 2, -6, -4, 0, 4], [-2, 2, -6, -4, 4, 0], [-2, 2, -6, 0, -4, 4], [-2, 2, -6, 0, 4, -4], [-2, 2, -6, 4, -4, 0], [-2, 2, -6, 4, 0, -4], [-2, 2, -4, -6, 0, 4], [-2, 2, -4, -6, 4, 0], [-2, 2, -4, 0, -6, 4], [-2, 2, -4, 0, 4, -6], [-2, 2, -4, 4, -6, 0], [-2, 2, -4, 4, 0, -6], [-2, 2, 0, -6, -4, 4], [-2, 2, 0, -6, 4, -4], [-2, 2, 0, -4, -6, 4], [-2, 2, 0, -4, 4, -6], [-2, 2, 0, 4, -6, -4], [-2, 2, 0, 4, -4, -6], [-2, 2, 4, -6, -4, 0], [-2, 2, 4, -6, 0, -4], [-2, 2, 4, -4, -6, 0], [-2, 2, 4, -4, 0, -6], [-2, 2, 4, 0, -6, -4], [-2, 2, 4, 0, -4, -6], [-2, 4, -6, -4, 0, 2], [-2, 4, -6, -4, 2, 0], [-2, 4, -6, 0, -4, 2], [-2, 4, -6, 0, 2, -4], [-2, 4, -6, 2, -4, 0], [-2, 4, -6, 2, 0, -4], [-2, 4, -4, -6, 0, 2], [-2, 4, -4, -6, 2, 0], [-2, 4, -4, 0, -6, 2], [-2, 4, -4, 0, 2, -6], [-2, 4, -4, 2, -6, 0], [-2, 4, -4, 2, 0, -6], [-2, 4, 0, -6, -4, 2], [-2, 4, 0, -6, 2, -4], [-2, 4, 0, -4, -6, 2], [-2, 4, 0, -4, 2, -6], [-2, 4, 0, 2, -6, -4], [-2, 4, 0, 2, -4, -6], [-2, 4, 2, -6, -4, 0], [-2, 4, 2, -6, 0, -4], [-2, 4, 2, -4, -6, 0], [-2, 4, 2, -4, 0, -6], [-2, 4, 2, 0, -6, -4], [-2, 4, 2, 0, -4, -6], [0, -6, -4, -2, 2, 4], [0, -6, -4, -2, 4, 2], [0, -6, -4, 2, -2, 4], [0, -6, -4, 2, 4, -2], [0, -6, -4, 4, -2, 2], [0, -6, -4, 4, 2, -2], [0, -6, -2, -4, 2, 4], [0, -6, -2, -4, 4, 2], [0, -6, -2, 2, -4, 4], [0, -6, -2, 2, 4, -4], [0, -6, -2, 4, -4, 2], [0, -6, -2, 4, 2, -4], [0, -6, 2, -4, -2, 4], [0, -6, 2, -4, 4, -2], [0, -6, 2, -2, -4, 4], [0, -6, 2, -2, 4, -4], [0, -6, 2, 4, -4, -2], [0, -6, 2, 4, -2, -4], [0, -6, 4, -4, -2, 2], [0, -6, 4, -4, 2, -2], [0, -6, 4, -2, -4, 2], [0, -6, 4, -2, 2, -4], [0, -6, 4, 2, -4, -2], [0, -6, 4, 2, -2, -4], [0, -4, -6, -2, 2, 4], [0, -4, -6, -2, 4, 2], [0, -4, -6, 2, -2, 4], [0, -4, -6, 2, 4, -2], [0, -4, -6, 4, -2, 2], [0, -4, -6, 4, 2, -2], [0, -4, -2, -6, 2, 4], [0, -4, -2, -6, 4, 2], [0, -4, -2, 2, -6, 4], [0, -4, -2, 2, 4, -6], [0, -4, -2, 4, -6, 2], [0, -4, -2, 4, 2, -6], [0, -4, 2, -6, -2, 4], [0, -4, 2, -6, 4, -2], [0, -4, 2, -2, -6, 4], [0, -4, 2, -2, 4, -6], [0, -4, 2, 4, -6, -2], [0, -4, 2, 4, -2, -6], [0, -4, 4, -6, -2, 2], [0, -4, 4, -6, 2, -2], [0, -4, 4, -2, -6, 2], [0, -4, 4, -2, 2, -6], [0, -4, 4, 2, -6, -2], [0, -4, 4, 2, -2, -6], [0, -2, -6, -4, 2, 4], [0, -2, -6, -4, 4, 2], [0, -2, -6, 2, -4, 4], [0, -2, -6, 2, 4, -4], [0, -2, -6, 4, -4, 2], [0, -2, -6, 4, 2, -4], [0, -2, -4, -6, 2, 4], [0, -2, -4, -6, 4, 2], [0, -2, -4, 2, -6, 4], [0, -2, -4, 2, 4, -6], [0, -2, -4, 4, -6, 2], [0, -2, -4, 4, 2, -6], [0, -2, 2, -6, -4, 4], [0, -2, 2, -6, 4, -4], [0, -2, 2, -4, -6, 4], [0, -2, 2, -4, 4, -6], [0, -2, 2, 4, -6, -4], [0, -2, 2, 4, -4, -6], [0, -2, 4, -6, -4, 2], [0, -2, 4, -6, 2, -4], [0, -2, 4, -4, -6, 2], [0, -2, 4, -4, 2, -6], [0, -2, 4, 2, -6, -4], [0, -2, 4, 2, -4, -6], [0, 2, -6, -4, -2, 4], [0, 2, -6, -4, 4, -2], [0, 2, -6, -2, -4, 4], [0, 2, -6, -2, 4, -4], [0, 2, -6, 4, -4, -2], [0, 2, -6, 4, -2, -4], [0, 2, -4, -6, -2, 4], [0, 2, -4, -6, 4, -2], [0, 2, -4, -2, -6, 4], [0, 2, -4, -2, 4, -6], [0, 2, -4, 4, -6, -2], [0, 2, -4, 4, -2, -6], [0, 2, -2, -6, -4, 4], [0, 2, -2, -6, 4, -4], [0, 2, -2, -4, -6, 4], [0, 2, -2, -4, 4, -6], [0, 2, -2, 4, -6, -4], [0, 2, -2, 4, -4, -6], [0, 2, 4, -6, -4, -2], [0, 2, 4, -6, -2, -4], [0, 2, 4, -4, -6, -2], [0, 2, 4, -4, -2, -6], [0, 2, 4, -2, -6, -4], [0, 2, 4, -2, -4, -6], [0, 4, -6, -4, -2, 2], [0, 4, -6, -4, 2, -2], [0, 4, -6, -2, -4, 2], [0, 4, -6, -2, 2, -4], [0, 4, -6, 2, -4, -2], [0, 4, -6, 2, -2, -4], [0, 4, -4, -6, -2, 2], [0, 4, -4, -6, 2, -2], [0, 4, -4, -2, -6, 2], [0, 4, -4, -2, 2, -6], [0, 4, -4, 2, -6, -2], [0, 4, -4, 2, -2, -6], [0, 4, -2, -6, -4, 2], [0, 4, -2, -6, 2, -4], [0, 4, -2, -4, -6, 2], [0, 4, -2, -4, 2, -6], [0, 4, -2, 2, -6, -4], [0, 4, -2, 2, -4, -6], [0, 4, 2, -6, -4, -2], [0, 4, 2, -6, -2, -4], [0, 4, 2, -4, -6, -2], [0, 4, 2, -4, -2, -6], [0, 4, 2, -2, -6, -4], [0, 4, 2, -2, -4, -6], [2, -6, -4, -2, 0, 4], [2, -6, -4, -2, 4, 0], [2, -6, -4, 0, -2, 4], [2, -6, -4, 0, 4, -2], [2, -6, -4, 4, -2, 0], [2, -6, -4, 4, 0, -2], [2, -6, -2, -4, 0, 4], [2, -6, -2, -4, 4, 0], [2, -6, -2, 0, -4, 4], [2, -6, -2, 0, 4, -4], [2, -6, -2, 4, -4, 0], [2, -6, -2, 4, 0, -4], [2, -6, 0, -4, -2, 4], [2, -6, 0, -4, 4, -2], [2, -6, 0, -2, -4, 4], [2, -6, 0, -2, 4, -4], [2, -6, 0, 4, -4, -2], [2, -6, 0, 4, -2, -4], [2, -6, 4, -4, -2, 0], [2, -6, 4, -4, 0, -2], [2, -6, 4, -2, -4, 0], [2, -6, 4, -2, 0, -4], [2, -6, 4, 0, -4, -2], [2, -6, 4, 0, -2, -4], [2, -4, -6, -2, 0, 4], [2, -4, -6, -2, 4, 0], [2, -4, -6, 0, -2, 4], [2, -4, -6, 0, 4, -2], [2, -4, -6, 4, -2, 0], [2, -4, -6, 4, 0, -2], [2, -4, -2, -6, 0, 4], [2, -4, -2, -6, 4, 0], [2, -4, -2, 0, -6, 4], [2, -4, -2, 0, 4, -6], [2, -4, -2, 4, -6, 0], [2, -4, -2, 4, 0, -6], [2, -4, 0, -6, -2, 4], [2, -4, 0, -6, 4, -2], [2, -4, 0, -2, -6, 4], [2, -4, 0, -2, 4, -6], [2, -4, 0, 4, -6, -2], [2, -4, 0, 4, -2, -6], [2, -4, 4, -6, -2, 0], [2, -4, 4, -6, 0, -2], [2, -4, 4, -2, -6, 0], [2, -4, 4, -2, 0, -6], [2, -4, 4, 0, -6, -2], [2, -4, 4, 0, -2, -6], [2, -2, -6, -4, 0, 4], [2, -2, -6, -4, 4, 0], [2, -2, -6, 0, -4, 4], [2, -2, -6, 0, 4, -4], [2, -2, -6, 4, -4, 0], [2, -2, -6, 4, 0, -4], [2, -2, -4, -6, 0, 4], [2, -2, -4, -6, 4, 0], [2, -2, -4, 0, -6, 4], [2, -2, -4, 0, 4, -6], [2, -2, -4, 4, -6, 0], [2, -2, -4, 4, 0, -6], [2, -2, 0, -6, -4, 4], [2, -2, 0, -6, 4, -4], [2, -2, 0, -4, -6, 4], [2, -2, 0, -4, 4, -6], [2, -2, 0, 4, -6, -4], [2, -2, 0, 4, -4, -6], [2, -2, 4, -6, -4, 0], [2, -2, 4, -6, 0, -4], [2, -2, 4, -4, -6, 0], [2, -2, 4, -4, 0, -6], [2, -2, 4, 0, -6, -4], [2, -2, 4, 0, -4, -6], [2, 0, -6, -4, -2, 4], [2, 0, -6, -4, 4, -2], [2, 0, -6, -2, -4, 4], [2, 0, -6, -2, 4, -4], [2, 0, -6, 4, -4, -2], [2, 0, -6, 4, -2, -4], [2, 0, -4, -6, -2, 4], [2, 0, -4, -6, 4, -2], [2, 0, -4, -2, -6, 4], [2, 0, -4, -2, 4, -6], [2, 0, -4, 4, -6, -2], [2, 0, -4, 4, -2, -6], [2, 0, -2, -6, -4, 4], [2, 0, -2, -6, 4, -4], [2, 0, -2, -4, -6, 4], [2, 0, -2, -4, 4, -6], [2, 0, -2, 4, -6, -4], [2, 0, -2, 4, -4, -6], [2, 0, 4, -6, -4, -2], [2, 0, 4, -6, -2, -4], [2, 0, 4, -4, -6, -2], [2, 0, 4, -4, -2, -6], [2, 0, 4, -2, -6, -4], [2, 0, 4, -2, -4, -6], [2, 4, -6, -4, -2, 0], [2, 4, -6, -4, 0, -2], [2, 4, -6, -2, -4, 0], [2, 4, -6, -2, 0, -4], [2, 4, -6, 0, -4, -2], [2, 4, -6, 0, -2, -4], [2, 4, -4, -6, -2, 0], [2, 4, -4, -6, 0, -2], [2, 4, -4, -2, -6, 0], [2, 4, -4, -2, 0, -6], [2, 4, -4, 0, -6, -2], [2, 4, -4, 0, -2, -6], [2, 4, -2, -6, -4, 0], [2, 4, -2, -6, 0, -4], [2, 4, -2, -4, -6, 0], [2, 4, -2, -4, 0, -6], [2, 4, -2, 0, -6, -4], [2, 4, -2, 0, -4, -6], [2, 4, 0, -6, -4, -2], [2, 4, 0, -6, -2, -4], [2, 4, 0, -4, -6, -2], [2, 4, 0, -4, -2, -6], [2, 4, 0, -2, -6, -4], [2, 4, 0, -2, -4, -6], [4, -6, -4, -2, 0, 2], [4, -6, -4, -2, 2, 0], [4, -6, -4, 0, -2, 2], [4, -6, -4, 0, 2, -2], [4, -6, -4, 2, -2, 0], [4, -6, -4, 2, 0, -2], [4, -6, -2, -4, 0, 2], [4, -6, -2, -4, 2, 0], [4, -6, -2, 0, -4, 2], [4, -6, -2, 0, 2, -4], [4, -6, -2, 2, -4, 0], [4, -6, -2, 2, 0, -4], [4, -6, 0, -4, -2, 2], [4, -6, 0, -4, 2, -2], [4, -6, 0, -2, -4, 2], [4, -6, 0, -2, 2, -4], [4, -6, 0, 2, -4, -2], [4, -6, 0, 2, -2, -4], [4, -6, 2, -4, -2, 0], [4, -6, 2, -4, 0, -2], [4, -6, 2, -2, -4, 0], [4, -6, 2, -2, 0, -4], [4, -6, 2, 0, -4, -2], [4, -6, 2, 0, -2, -4], [4, -4, -6, -2, 0, 2], [4, -4, -6, -2, 2, 0], [4, -4, -6, 0, -2, 2], [4, -4, -6, 0, 2, -2], [4, -4, -6, 2, -2, 0], [4, -4, -6, 2, 0, -2], [4, -4, -2, -6, 0, 2], [4, -4, -2, -6, 2, 0], [4, -4, -2, 0, -6, 2], [4, -4, -2, 0, 2, -6], [4, -4, -2, 2, -6, 0], [4, -4, -2, 2, 0, -6], [4, -4, 0, -6, -2, 2], [4, -4, 0, -6, 2, -2], [4, -4, 0, -2, -6, 2], [4, -4, 0, -2, 2, -6], [4, -4, 0, 2, -6, -2], [4, -4, 0, 2, -2, -6], [4, -4, 2, -6, -2, 0], [4, -4, 2, -6, 0, -2], [4, -4, 2, -2, -6, 0], [4, -4, 2, -2, 0, -6], [4, -4, 2, 0, -6, -2], [4, -4, 2, 0, -2, -6], [4, -2, -6, -4, 0, 2], [4, -2, -6, -4, 2, 0], [4, -2, -6, 0, -4, 2], [4, -2, -6, 0, 2, -4], [4, -2, -6, 2, -4, 0], [4, -2, -6, 2, 0, -4], [4, -2, -4, -6, 0, 2], [4, -2, -4, -6, 2, 0], [4, -2, -4, 0, -6, 2], [4, -2, -4, 0, 2, -6], [4, -2, -4, 2, -6, 0], [4, -2, -4, 2, 0, -6], [4, -2, 0, -6, -4, 2], [4, -2, 0, -6, 2, -4], [4, -2, 0, -4, -6, 2], [4, -2, 0, -4, 2, -6], [4, -2, 0, 2, -6, -4], [4, -2, 0, 2, -4, -6], [4, -2, 2, -6, -4, 0], [4, -2, 2, -6, 0, -4], [4, -2, 2, -4, -6, 0], [4, -2, 2, -4, 0, -6], [4, -2, 2, 0, -6, -4], [4, -2, 2, 0, -4, -6], [4, 0, -6, -4, -2, 2], [4, 0, -6, -4, 2, -2], [4, 0, -6, -2, -4, 2], [4, 0, -6, -2, 2, -4], [4, 0, -6, 2, -4, -2], [4, 0, -6, 2, -2, -4], [4, 0, -4, -6, -2, 2], [4, 0, -4, -6, 2, -2], [4, 0, -4, -2, -6, 2], [4, 0, -4, -2, 2, -6], [4, 0, -4, 2, -6, -2], [4, 0, -4, 2, -2, -6], [4, 0, -2, -6, -4, 2], [4, 0, -2, -6, 2, -4], [4, 0, -2, -4, -6, 2], [4, 0, -2, -4, 2, -6], [4, 0, -2, 2, -6, -4], [4, 0, -2, 2, -4, -6], [4, 0, 2, -6, -4, -2], [4, 0, 2, -6, -2, -4], [4, 0, 2, -4, -6, -2], [4, 0, 2, -4, -2, -6], [4, 0, 2, -2, -6, -4], [4, 0, 2, -2, -4, -6], [4, 2, -6, -4, -2, 0], [4, 2, -6, -4, 0, -2], [4, 2, -6, -2, -4, 0], [4, 2, -6, -2, 0, -4], [4, 2, -6, 0, -4, -2], [4, 2, -6, 0, -2, -4], [4, 2, -4, -6, -2, 0], [4, 2, -4, -6, 0, -2], [4, 2, -4, -2, -6, 0], [4, 2, -4, -2, 0, -6], [4, 2, -4, 0, -6, -2], [4, 2, -4, 0, -2, -6], [4, 2, -2, -6, -4, 0], [4, 2, -2, -6, 0, -4], [4, 2, -2, -4, -6, 0], [4, 2, -2, -4, 0, -6], [4, 2, -2, 0, -6, -4], [4, 2, -2, 0, -4, -6], [4, 2, 0, -6, -4, -2], [4, 2, 0, -6, -2, -4], [4, 2, 0, -4, -6, -2], [4, 2, 0, -4, -2, -6], [4, 2, 0, -2, -6, -4], [4, 2, 0, -2, -4, -6]])\n assert answers_match(candidate(nums=[0, 1, -1, 2, -2, 3]), [[0, 1, -1, 2, -2, 3], [0, 1, -1, 2, 3, -2], [0, 1, -1, -2, 2, 3], [0, 1, -1, -2, 3, 2], [0, 1, -1, 3, 2, -2], [0, 1, -1, 3, -2, 2], [0, 1, 2, -1, -2, 3], [0, 1, 2, -1, 3, -2], [0, 1, 2, -2, -1, 3], [0, 1, 2, -2, 3, -1], [0, 1, 2, 3, -1, -2], [0, 1, 2, 3, -2, -1], [0, 1, -2, -1, 2, 3], [0, 1, -2, -1, 3, 2], [0, 1, -2, 2, -1, 3], [0, 1, -2, 2, 3, -1], [0, 1, -2, 3, -1, 2], [0, 1, -2, 3, 2, -1], [0, 1, 3, -1, 2, -2], [0, 1, 3, -1, -2, 2], [0, 1, 3, 2, -1, -2], [0, 1, 3, 2, -2, -1], [0, 1, 3, -2, -1, 2], [0, 1, 3, -2, 2, -1], [0, -1, 1, 2, -2, 3], [0, -1, 1, 2, 3, -2], [0, -1, 1, -2, 2, 3], [0, -1, 1, -2, 3, 2], [0, -1, 1, 3, 2, -2], [0, -1, 1, 3, -2, 2], [0, -1, 2, 1, -2, 3], [0, -1, 2, 1, 3, -2], [0, -1, 2, -2, 1, 3], [0, -1, 2, -2, 3, 1], [0, -1, 2, 3, 1, -2], [0, -1, 2, 3, -2, 1], [0, -1, -2, 1, 2, 3], [0, -1, -2, 1, 3, 2], [0, -1, -2, 2, 1, 3], [0, -1, -2, 2, 3, 1], [0, -1, -2, 3, 1, 2], [0, -1, -2, 3, 2, 1], [0, -1, 3, 1, 2, -2], [0, -1, 3, 1, -2, 2], [0, -1, 3, 2, 1, -2], [0, -1, 3, 2, -2, 1], [0, -1, 3, -2, 1, 2], [0, -1, 3, -2, 2, 1], [0, 2, 1, -1, -2, 3], [0, 2, 1, -1, 3, -2], [0, 2, 1, -2, -1, 3], [0, 2, 1, -2, 3, -1], [0, 2, 1, 3, -1, -2], [0, 2, 1, 3, -2, -1], [0, 2, -1, 1, -2, 3], [0, 2, -1, 1, 3, -2], [0, 2, -1, -2, 1, 3], [0, 2, -1, -2, 3, 1], [0, 2, -1, 3, 1, -2], [0, 2, -1, 3, -2, 1], [0, 2, -2, 1, -1, 3], [0, 2, -2, 1, 3, -1], [0, 2, -2, -1, 1, 3], [0, 2, -2, -1, 3, 1], [0, 2, -2, 3, 1, -1], [0, 2, -2, 3, -1, 1], [0, 2, 3, 1, -1, -2], [0, 2, 3, 1, -2, -1], [0, 2, 3, -1, 1, -2], [0, 2, 3, -1, -2, 1], [0, 2, 3, -2, 1, -1], [0, 2, 3, -2, -1, 1], [0, -2, 1, -1, 2, 3], [0, -2, 1, -1, 3, 2], [0, -2, 1, 2, -1, 3], [0, -2, 1, 2, 3, -1], [0, -2, 1, 3, -1, 2], [0, -2, 1, 3, 2, -1], [0, -2, -1, 1, 2, 3], [0, -2, -1, 1, 3, 2], [0, -2, -1, 2, 1, 3], [0, -2, -1, 2, 3, 1], [0, -2, -1, 3, 1, 2], [0, -2, -1, 3, 2, 1], [0, -2, 2, 1, -1, 3], [0, -2, 2, 1, 3, -1], [0, -2, 2, -1, 1, 3], [0, -2, 2, -1, 3, 1], [0, -2, 2, 3, 1, -1], [0, -2, 2, 3, -1, 1], [0, -2, 3, 1, -1, 2], [0, -2, 3, 1, 2, -1], [0, -2, 3, -1, 1, 2], [0, -2, 3, -1, 2, 1], [0, -2, 3, 2, 1, -1], [0, -2, 3, 2, -1, 1], [0, 3, 1, -1, 2, -2], [0, 3, 1, -1, -2, 2], [0, 3, 1, 2, -1, -2], [0, 3, 1, 2, -2, -1], [0, 3, 1, -2, -1, 2], [0, 3, 1, -2, 2, -1], [0, 3, -1, 1, 2, -2], [0, 3, -1, 1, -2, 2], [0, 3, -1, 2, 1, -2], [0, 3, -1, 2, -2, 1], [0, 3, -1, -2, 1, 2], [0, 3, -1, -2, 2, 1], [0, 3, 2, 1, -1, -2], [0, 3, 2, 1, -2, -1], [0, 3, 2, -1, 1, -2], [0, 3, 2, -1, -2, 1], [0, 3, 2, -2, 1, -1], [0, 3, 2, -2, -1, 1], [0, 3, -2, 1, -1, 2], [0, 3, -2, 1, 2, -1], [0, 3, -2, -1, 1, 2], [0, 3, -2, -1, 2, 1], [0, 3, -2, 2, 1, -1], [0, 3, -2, 2, -1, 1], [1, 0, -1, 2, -2, 3], [1, 0, -1, 2, 3, -2], [1, 0, -1, -2, 2, 3], [1, 0, -1, -2, 3, 2], [1, 0, -1, 3, 2, -2], [1, 0, -1, 3, -2, 2], [1, 0, 2, -1, -2, 3], [1, 0, 2, -1, 3, -2], [1, 0, 2, -2, -1, 3], [1, 0, 2, -2, 3, -1], [1, 0, 2, 3, -1, -2], [1, 0, 2, 3, -2, -1], [1, 0, -2, -1, 2, 3], [1, 0, -2, -1, 3, 2], [1, 0, -2, 2, -1, 3], [1, 0, -2, 2, 3, -1], [1, 0, -2, 3, -1, 2], [1, 0, -2, 3, 2, -1], [1, 0, 3, -1, 2, -2], [1, 0, 3, -1, -2, 2], [1, 0, 3, 2, -1, -2], [1, 0, 3, 2, -2, -1], [1, 0, 3, -2, -1, 2], [1, 0, 3, -2, 2, -1], [1, -1, 0, 2, -2, 3], [1, -1, 0, 2, 3, -2], [1, -1, 0, -2, 2, 3], [1, -1, 0, -2, 3, 2], [1, -1, 0, 3, 2, -2], [1, -1, 0, 3, -2, 2], [1, -1, 2, 0, -2, 3], [1, -1, 2, 0, 3, -2], [1, -1, 2, -2, 0, 3], [1, -1, 2, -2, 3, 0], [1, -1, 2, 3, 0, -2], [1, -1, 2, 3, -2, 0], [1, -1, -2, 0, 2, 3], [1, -1, -2, 0, 3, 2], [1, -1, -2, 2, 0, 3], [1, -1, -2, 2, 3, 0], [1, -1, -2, 3, 0, 2], [1, -1, -2, 3, 2, 0], [1, -1, 3, 0, 2, -2], [1, -1, 3, 0, -2, 2], [1, -1, 3, 2, 0, -2], [1, -1, 3, 2, -2, 0], [1, -1, 3, -2, 0, 2], [1, -1, 3, -2, 2, 0], [1, 2, 0, -1, -2, 3], [1, 2, 0, -1, 3, -2], [1, 2, 0, -2, -1, 3], [1, 2, 0, -2, 3, -1], [1, 2, 0, 3, -1, -2], [1, 2, 0, 3, -2, -1], [1, 2, -1, 0, -2, 3], [1, 2, -1, 0, 3, -2], [1, 2, -1, -2, 0, 3], [1, 2, -1, -2, 3, 0], [1, 2, -1, 3, 0, -2], [1, 2, -1, 3, -2, 0], [1, 2, -2, 0, -1, 3], [1, 2, -2, 0, 3, -1], [1, 2, -2, -1, 0, 3], [1, 2, -2, -1, 3, 0], [1, 2, -2, 3, 0, -1], [1, 2, -2, 3, -1, 0], [1, 2, 3, 0, -1, -2], [1, 2, 3, 0, -2, -1], [1, 2, 3, -1, 0, -2], [1, 2, 3, -1, -2, 0], [1, 2, 3, -2, 0, -1], [1, 2, 3, -2, -1, 0], [1, -2, 0, -1, 2, 3], [1, -2, 0, -1, 3, 2], [1, -2, 0, 2, -1, 3], [1, -2, 0, 2, 3, -1], [1, -2, 0, 3, -1, 2], [1, -2, 0, 3, 2, -1], [1, -2, -1, 0, 2, 3], [1, -2, -1, 0, 3, 2], [1, -2, -1, 2, 0, 3], [1, -2, -1, 2, 3, 0], [1, -2, -1, 3, 0, 2], [1, -2, -1, 3, 2, 0], [1, -2, 2, 0, -1, 3], [1, -2, 2, 0, 3, -1], [1, -2, 2, -1, 0, 3], [1, -2, 2, -1, 3, 0], [1, -2, 2, 3, 0, -1], [1, -2, 2, 3, -1, 0], [1, -2, 3, 0, -1, 2], [1, -2, 3, 0, 2, -1], [1, -2, 3, -1, 0, 2], [1, -2, 3, -1, 2, 0], [1, -2, 3, 2, 0, -1], [1, -2, 3, 2, -1, 0], [1, 3, 0, -1, 2, -2], [1, 3, 0, -1, -2, 2], [1, 3, 0, 2, -1, -2], [1, 3, 0, 2, -2, -1], [1, 3, 0, -2, -1, 2], [1, 3, 0, -2, 2, -1], [1, 3, -1, 0, 2, -2], [1, 3, -1, 0, -2, 2], [1, 3, -1, 2, 0, -2], [1, 3, -1, 2, -2, 0], [1, 3, -1, -2, 0, 2], [1, 3, -1, -2, 2, 0], [1, 3, 2, 0, -1, -2], [1, 3, 2, 0, -2, -1], [1, 3, 2, -1, 0, -2], [1, 3, 2, -1, -2, 0], [1, 3, 2, -2, 0, -1], [1, 3, 2, -2, -1, 0], [1, 3, -2, 0, -1, 2], [1, 3, -2, 0, 2, -1], [1, 3, -2, -1, 0, 2], [1, 3, -2, -1, 2, 0], [1, 3, -2, 2, 0, -1], [1, 3, -2, 2, -1, 0], [-1, 0, 1, 2, -2, 3], [-1, 0, 1, 2, 3, -2], [-1, 0, 1, -2, 2, 3], [-1, 0, 1, -2, 3, 2], [-1, 0, 1, 3, 2, -2], [-1, 0, 1, 3, -2, 2], [-1, 0, 2, 1, -2, 3], [-1, 0, 2, 1, 3, -2], [-1, 0, 2, -2, 1, 3], [-1, 0, 2, -2, 3, 1], [-1, 0, 2, 3, 1, -2], [-1, 0, 2, 3, -2, 1], [-1, 0, -2, 1, 2, 3], [-1, 0, -2, 1, 3, 2], [-1, 0, -2, 2, 1, 3], [-1, 0, -2, 2, 3, 1], [-1, 0, -2, 3, 1, 2], [-1, 0, -2, 3, 2, 1], [-1, 0, 3, 1, 2, -2], [-1, 0, 3, 1, -2, 2], [-1, 0, 3, 2, 1, -2], [-1, 0, 3, 2, -2, 1], [-1, 0, 3, -2, 1, 2], [-1, 0, 3, -2, 2, 1], [-1, 1, 0, 2, -2, 3], [-1, 1, 0, 2, 3, -2], [-1, 1, 0, -2, 2, 3], [-1, 1, 0, -2, 3, 2], [-1, 1, 0, 3, 2, -2], [-1, 1, 0, 3, -2, 2], [-1, 1, 2, 0, -2, 3], [-1, 1, 2, 0, 3, -2], [-1, 1, 2, -2, 0, 3], [-1, 1, 2, -2, 3, 0], [-1, 1, 2, 3, 0, -2], [-1, 1, 2, 3, -2, 0], [-1, 1, -2, 0, 2, 3], [-1, 1, -2, 0, 3, 2], [-1, 1, -2, 2, 0, 3], [-1, 1, -2, 2, 3, 0], [-1, 1, -2, 3, 0, 2], [-1, 1, -2, 3, 2, 0], [-1, 1, 3, 0, 2, -2], [-1, 1, 3, 0, -2, 2], [-1, 1, 3, 2, 0, -2], [-1, 1, 3, 2, -2, 0], [-1, 1, 3, -2, 0, 2], [-1, 1, 3, -2, 2, 0], [-1, 2, 0, 1, -2, 3], [-1, 2, 0, 1, 3, -2], [-1, 2, 0, -2, 1, 3], [-1, 2, 0, -2, 3, 1], [-1, 2, 0, 3, 1, -2], [-1, 2, 0, 3, -2, 1], [-1, 2, 1, 0, -2, 3], [-1, 2, 1, 0, 3, -2], [-1, 2, 1, -2, 0, 3], [-1, 2, 1, -2, 3, 0], [-1, 2, 1, 3, 0, -2], [-1, 2, 1, 3, -2, 0], [-1, 2, -2, 0, 1, 3], [-1, 2, -2, 0, 3, 1], [-1, 2, -2, 1, 0, 3], [-1, 2, -2, 1, 3, 0], [-1, 2, -2, 3, 0, 1], [-1, 2, -2, 3, 1, 0], [-1, 2, 3, 0, 1, -2], [-1, 2, 3, 0, -2, 1], [-1, 2, 3, 1, 0, -2], [-1, 2, 3, 1, -2, 0], [-1, 2, 3, -2, 0, 1], [-1, 2, 3, -2, 1, 0], [-1, -2, 0, 1, 2, 3], [-1, -2, 0, 1, 3, 2], [-1, -2, 0, 2, 1, 3], [-1, -2, 0, 2, 3, 1], [-1, -2, 0, 3, 1, 2], [-1, -2, 0, 3, 2, 1], [-1, -2, 1, 0, 2, 3], [-1, -2, 1, 0, 3, 2], [-1, -2, 1, 2, 0, 3], [-1, -2, 1, 2, 3, 0], [-1, -2, 1, 3, 0, 2], [-1, -2, 1, 3, 2, 0], [-1, -2, 2, 0, 1, 3], [-1, -2, 2, 0, 3, 1], [-1, -2, 2, 1, 0, 3], [-1, -2, 2, 1, 3, 0], [-1, -2, 2, 3, 0, 1], [-1, -2, 2, 3, 1, 0], [-1, -2, 3, 0, 1, 2], [-1, -2, 3, 0, 2, 1], [-1, -2, 3, 1, 0, 2], [-1, -2, 3, 1, 2, 0], [-1, -2, 3, 2, 0, 1], [-1, -2, 3, 2, 1, 0], [-1, 3, 0, 1, 2, -2], [-1, 3, 0, 1, -2, 2], [-1, 3, 0, 2, 1, -2], [-1, 3, 0, 2, -2, 1], [-1, 3, 0, -2, 1, 2], [-1, 3, 0, -2, 2, 1], [-1, 3, 1, 0, 2, -2], [-1, 3, 1, 0, -2, 2], [-1, 3, 1, 2, 0, -2], [-1, 3, 1, 2, -2, 0], [-1, 3, 1, -2, 0, 2], [-1, 3, 1, -2, 2, 0], [-1, 3, 2, 0, 1, -2], [-1, 3, 2, 0, -2, 1], [-1, 3, 2, 1, 0, -2], [-1, 3, 2, 1, -2, 0], [-1, 3, 2, -2, 0, 1], [-1, 3, 2, -2, 1, 0], [-1, 3, -2, 0, 1, 2], [-1, 3, -2, 0, 2, 1], [-1, 3, -2, 1, 0, 2], [-1, 3, -2, 1, 2, 0], [-1, 3, -2, 2, 0, 1], [-1, 3, -2, 2, 1, 0], [2, 0, 1, -1, -2, 3], [2, 0, 1, -1, 3, -2], [2, 0, 1, -2, -1, 3], [2, 0, 1, -2, 3, -1], [2, 0, 1, 3, -1, -2], [2, 0, 1, 3, -2, -1], [2, 0, -1, 1, -2, 3], [2, 0, -1, 1, 3, -2], [2, 0, -1, -2, 1, 3], [2, 0, -1, -2, 3, 1], [2, 0, -1, 3, 1, -2], [2, 0, -1, 3, -2, 1], [2, 0, -2, 1, -1, 3], [2, 0, -2, 1, 3, -1], [2, 0, -2, -1, 1, 3], [2, 0, -2, -1, 3, 1], [2, 0, -2, 3, 1, -1], [2, 0, -2, 3, -1, 1], [2, 0, 3, 1, -1, -2], [2, 0, 3, 1, -2, -1], [2, 0, 3, -1, 1, -2], [2, 0, 3, -1, -2, 1], [2, 0, 3, -2, 1, -1], [2, 0, 3, -2, -1, 1], [2, 1, 0, -1, -2, 3], [2, 1, 0, -1, 3, -2], [2, 1, 0, -2, -1, 3], [2, 1, 0, -2, 3, -1], [2, 1, 0, 3, -1, -2], [2, 1, 0, 3, -2, -1], [2, 1, -1, 0, -2, 3], [2, 1, -1, 0, 3, -2], [2, 1, -1, -2, 0, 3], [2, 1, -1, -2, 3, 0], [2, 1, -1, 3, 0, -2], [2, 1, -1, 3, -2, 0], [2, 1, -2, 0, -1, 3], [2, 1, -2, 0, 3, -1], [2, 1, -2, -1, 0, 3], [2, 1, -2, -1, 3, 0], [2, 1, -2, 3, 0, -1], [2, 1, -2, 3, -1, 0], [2, 1, 3, 0, -1, -2], [2, 1, 3, 0, -2, -1], [2, 1, 3, -1, 0, -2], [2, 1, 3, -1, -2, 0], [2, 1, 3, -2, 0, -1], [2, 1, 3, -2, -1, 0], [2, -1, 0, 1, -2, 3], [2, -1, 0, 1, 3, -2], [2, -1, 0, -2, 1, 3], [2, -1, 0, -2, 3, 1], [2, -1, 0, 3, 1, -2], [2, -1, 0, 3, -2, 1], [2, -1, 1, 0, -2, 3], [2, -1, 1, 0, 3, -2], [2, -1, 1, -2, 0, 3], [2, -1, 1, -2, 3, 0], [2, -1, 1, 3, 0, -2], [2, -1, 1, 3, -2, 0], [2, -1, -2, 0, 1, 3], [2, -1, -2, 0, 3, 1], [2, -1, -2, 1, 0, 3], [2, -1, -2, 1, 3, 0], [2, -1, -2, 3, 0, 1], [2, -1, -2, 3, 1, 0], [2, -1, 3, 0, 1, -2], [2, -1, 3, 0, -2, 1], [2, -1, 3, 1, 0, -2], [2, -1, 3, 1, -2, 0], [2, -1, 3, -2, 0, 1], [2, -1, 3, -2, 1, 0], [2, -2, 0, 1, -1, 3], [2, -2, 0, 1, 3, -1], [2, -2, 0, -1, 1, 3], [2, -2, 0, -1, 3, 1], [2, -2, 0, 3, 1, -1], [2, -2, 0, 3, -1, 1], [2, -2, 1, 0, -1, 3], [2, -2, 1, 0, 3, -1], [2, -2, 1, -1, 0, 3], [2, -2, 1, -1, 3, 0], [2, -2, 1, 3, 0, -1], [2, -2, 1, 3, -1, 0], [2, -2, -1, 0, 1, 3], [2, -2, -1, 0, 3, 1], [2, -2, -1, 1, 0, 3], [2, -2, -1, 1, 3, 0], [2, -2, -1, 3, 0, 1], [2, -2, -1, 3, 1, 0], [2, -2, 3, 0, 1, -1], [2, -2, 3, 0, -1, 1], [2, -2, 3, 1, 0, -1], [2, -2, 3, 1, -1, 0], [2, -2, 3, -1, 0, 1], [2, -2, 3, -1, 1, 0], [2, 3, 0, 1, -1, -2], [2, 3, 0, 1, -2, -1], [2, 3, 0, -1, 1, -2], [2, 3, 0, -1, -2, 1], [2, 3, 0, -2, 1, -1], [2, 3, 0, -2, -1, 1], [2, 3, 1, 0, -1, -2], [2, 3, 1, 0, -2, -1], [2, 3, 1, -1, 0, -2], [2, 3, 1, -1, -2, 0], [2, 3, 1, -2, 0, -1], [2, 3, 1, -2, -1, 0], [2, 3, -1, 0, 1, -2], [2, 3, -1, 0, -2, 1], [2, 3, -1, 1, 0, -2], [2, 3, -1, 1, -2, 0], [2, 3, -1, -2, 0, 1], [2, 3, -1, -2, 1, 0], [2, 3, -2, 0, 1, -1], [2, 3, -2, 0, -1, 1], [2, 3, -2, 1, 0, -1], [2, 3, -2, 1, -1, 0], [2, 3, -2, -1, 0, 1], [2, 3, -2, -1, 1, 0], [-2, 0, 1, -1, 2, 3], [-2, 0, 1, -1, 3, 2], [-2, 0, 1, 2, -1, 3], [-2, 0, 1, 2, 3, -1], [-2, 0, 1, 3, -1, 2], [-2, 0, 1, 3, 2, -1], [-2, 0, -1, 1, 2, 3], [-2, 0, -1, 1, 3, 2], [-2, 0, -1, 2, 1, 3], [-2, 0, -1, 2, 3, 1], [-2, 0, -1, 3, 1, 2], [-2, 0, -1, 3, 2, 1], [-2, 0, 2, 1, -1, 3], [-2, 0, 2, 1, 3, -1], [-2, 0, 2, -1, 1, 3], [-2, 0, 2, -1, 3, 1], [-2, 0, 2, 3, 1, -1], [-2, 0, 2, 3, -1, 1], [-2, 0, 3, 1, -1, 2], [-2, 0, 3, 1, 2, -1], [-2, 0, 3, -1, 1, 2], [-2, 0, 3, -1, 2, 1], [-2, 0, 3, 2, 1, -1], [-2, 0, 3, 2, -1, 1], [-2, 1, 0, -1, 2, 3], [-2, 1, 0, -1, 3, 2], [-2, 1, 0, 2, -1, 3], [-2, 1, 0, 2, 3, -1], [-2, 1, 0, 3, -1, 2], [-2, 1, 0, 3, 2, -1], [-2, 1, -1, 0, 2, 3], [-2, 1, -1, 0, 3, 2], [-2, 1, -1, 2, 0, 3], [-2, 1, -1, 2, 3, 0], [-2, 1, -1, 3, 0, 2], [-2, 1, -1, 3, 2, 0], [-2, 1, 2, 0, -1, 3], [-2, 1, 2, 0, 3, -1], [-2, 1, 2, -1, 0, 3], [-2, 1, 2, -1, 3, 0], [-2, 1, 2, 3, 0, -1], [-2, 1, 2, 3, -1, 0], [-2, 1, 3, 0, -1, 2], [-2, 1, 3, 0, 2, -1], [-2, 1, 3, -1, 0, 2], [-2, 1, 3, -1, 2, 0], [-2, 1, 3, 2, 0, -1], [-2, 1, 3, 2, -1, 0], [-2, -1, 0, 1, 2, 3], [-2, -1, 0, 1, 3, 2], [-2, -1, 0, 2, 1, 3], [-2, -1, 0, 2, 3, 1], [-2, -1, 0, 3, 1, 2], [-2, -1, 0, 3, 2, 1], [-2, -1, 1, 0, 2, 3], [-2, -1, 1, 0, 3, 2], [-2, -1, 1, 2, 0, 3], [-2, -1, 1, 2, 3, 0], [-2, -1, 1, 3, 0, 2], [-2, -1, 1, 3, 2, 0], [-2, -1, 2, 0, 1, 3], [-2, -1, 2, 0, 3, 1], [-2, -1, 2, 1, 0, 3], [-2, -1, 2, 1, 3, 0], [-2, -1, 2, 3, 0, 1], [-2, -1, 2, 3, 1, 0], [-2, -1, 3, 0, 1, 2], [-2, -1, 3, 0, 2, 1], [-2, -1, 3, 1, 0, 2], [-2, -1, 3, 1, 2, 0], [-2, -1, 3, 2, 0, 1], [-2, -1, 3, 2, 1, 0], [-2, 2, 0, 1, -1, 3], [-2, 2, 0, 1, 3, -1], [-2, 2, 0, -1, 1, 3], [-2, 2, 0, -1, 3, 1], [-2, 2, 0, 3, 1, -1], [-2, 2, 0, 3, -1, 1], [-2, 2, 1, 0, -1, 3], [-2, 2, 1, 0, 3, -1], [-2, 2, 1, -1, 0, 3], [-2, 2, 1, -1, 3, 0], [-2, 2, 1, 3, 0, -1], [-2, 2, 1, 3, -1, 0], [-2, 2, -1, 0, 1, 3], [-2, 2, -1, 0, 3, 1], [-2, 2, -1, 1, 0, 3], [-2, 2, -1, 1, 3, 0], [-2, 2, -1, 3, 0, 1], [-2, 2, -1, 3, 1, 0], [-2, 2, 3, 0, 1, -1], [-2, 2, 3, 0, -1, 1], [-2, 2, 3, 1, 0, -1], [-2, 2, 3, 1, -1, 0], [-2, 2, 3, -1, 0, 1], [-2, 2, 3, -1, 1, 0], [-2, 3, 0, 1, -1, 2], [-2, 3, 0, 1, 2, -1], [-2, 3, 0, -1, 1, 2], [-2, 3, 0, -1, 2, 1], [-2, 3, 0, 2, 1, -1], [-2, 3, 0, 2, -1, 1], [-2, 3, 1, 0, -1, 2], [-2, 3, 1, 0, 2, -1], [-2, 3, 1, -1, 0, 2], [-2, 3, 1, -1, 2, 0], [-2, 3, 1, 2, 0, -1], [-2, 3, 1, 2, -1, 0], [-2, 3, -1, 0, 1, 2], [-2, 3, -1, 0, 2, 1], [-2, 3, -1, 1, 0, 2], [-2, 3, -1, 1, 2, 0], [-2, 3, -1, 2, 0, 1], [-2, 3, -1, 2, 1, 0], [-2, 3, 2, 0, 1, -1], [-2, 3, 2, 0, -1, 1], [-2, 3, 2, 1, 0, -1], [-2, 3, 2, 1, -1, 0], [-2, 3, 2, -1, 0, 1], [-2, 3, 2, -1, 1, 0], [3, 0, 1, -1, 2, -2], [3, 0, 1, -1, -2, 2], [3, 0, 1, 2, -1, -2], [3, 0, 1, 2, -2, -1], [3, 0, 1, -2, -1, 2], [3, 0, 1, -2, 2, -1], [3, 0, -1, 1, 2, -2], [3, 0, -1, 1, -2, 2], [3, 0, -1, 2, 1, -2], [3, 0, -1, 2, -2, 1], [3, 0, -1, -2, 1, 2], [3, 0, -1, -2, 2, 1], [3, 0, 2, 1, -1, -2], [3, 0, 2, 1, -2, -1], [3, 0, 2, -1, 1, -2], [3, 0, 2, -1, -2, 1], [3, 0, 2, -2, 1, -1], [3, 0, 2, -2, -1, 1], [3, 0, -2, 1, -1, 2], [3, 0, -2, 1, 2, -1], [3, 0, -2, -1, 1, 2], [3, 0, -2, -1, 2, 1], [3, 0, -2, 2, 1, -1], [3, 0, -2, 2, -1, 1], [3, 1, 0, -1, 2, -2], [3, 1, 0, -1, -2, 2], [3, 1, 0, 2, -1, -2], [3, 1, 0, 2, -2, -1], [3, 1, 0, -2, -1, 2], [3, 1, 0, -2, 2, -1], [3, 1, -1, 0, 2, -2], [3, 1, -1, 0, -2, 2], [3, 1, -1, 2, 0, -2], [3, 1, -1, 2, -2, 0], [3, 1, -1, -2, 0, 2], [3, 1, -1, -2, 2, 0], [3, 1, 2, 0, -1, -2], [3, 1, 2, 0, -2, -1], [3, 1, 2, -1, 0, -2], [3, 1, 2, -1, -2, 0], [3, 1, 2, -2, 0, -1], [3, 1, 2, -2, -1, 0], [3, 1, -2, 0, -1, 2], [3, 1, -2, 0, 2, -1], [3, 1, -2, -1, 0, 2], [3, 1, -2, -1, 2, 0], [3, 1, -2, 2, 0, -1], [3, 1, -2, 2, -1, 0], [3, -1, 0, 1, 2, -2], [3, -1, 0, 1, -2, 2], [3, -1, 0, 2, 1, -2], [3, -1, 0, 2, -2, 1], [3, -1, 0, -2, 1, 2], [3, -1, 0, -2, 2, 1], [3, -1, 1, 0, 2, -2], [3, -1, 1, 0, -2, 2], [3, -1, 1, 2, 0, -2], [3, -1, 1, 2, -2, 0], [3, -1, 1, -2, 0, 2], [3, -1, 1, -2, 2, 0], [3, -1, 2, 0, 1, -2], [3, -1, 2, 0, -2, 1], [3, -1, 2, 1, 0, -2], [3, -1, 2, 1, -2, 0], [3, -1, 2, -2, 0, 1], [3, -1, 2, -2, 1, 0], [3, -1, -2, 0, 1, 2], [3, -1, -2, 0, 2, 1], [3, -1, -2, 1, 0, 2], [3, -1, -2, 1, 2, 0], [3, -1, -2, 2, 0, 1], [3, -1, -2, 2, 1, 0], [3, 2, 0, 1, -1, -2], [3, 2, 0, 1, -2, -1], [3, 2, 0, -1, 1, -2], [3, 2, 0, -1, -2, 1], [3, 2, 0, -2, 1, -1], [3, 2, 0, -2, -1, 1], [3, 2, 1, 0, -1, -2], [3, 2, 1, 0, -2, -1], [3, 2, 1, -1, 0, -2], [3, 2, 1, -1, -2, 0], [3, 2, 1, -2, 0, -1], [3, 2, 1, -2, -1, 0], [3, 2, -1, 0, 1, -2], [3, 2, -1, 0, -2, 1], [3, 2, -1, 1, 0, -2], [3, 2, -1, 1, -2, 0], [3, 2, -1, -2, 0, 1], [3, 2, -1, -2, 1, 0], [3, 2, -2, 0, 1, -1], [3, 2, -2, 0, -1, 1], [3, 2, -2, 1, 0, -1], [3, 2, -2, 1, -1, 0], [3, 2, -2, -1, 0, 1], [3, 2, -2, -1, 1, 0], [3, -2, 0, 1, -1, 2], [3, -2, 0, 1, 2, -1], [3, -2, 0, -1, 1, 2], [3, -2, 0, -1, 2, 1], [3, -2, 0, 2, 1, -1], [3, -2, 0, 2, -1, 1], [3, -2, 1, 0, -1, 2], [3, -2, 1, 0, 2, -1], [3, -2, 1, -1, 0, 2], [3, -2, 1, -1, 2, 0], [3, -2, 1, 2, 0, -1], [3, -2, 1, 2, -1, 0], [3, -2, -1, 0, 1, 2], [3, -2, -1, 0, 2, 1], [3, -2, -1, 1, 0, 2], [3, -2, -1, 1, 2, 0], [3, -2, -1, 2, 0, 1], [3, -2, -1, 2, 1, 0], [3, -2, 2, 0, 1, -1], [3, -2, 2, 0, -1, 1], [3, -2, 2, 1, 0, -1], [3, -2, 2, 1, -1, 0], [3, -2, 2, -1, 0, 1], [3, -2, 2, -1, 1, 0]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, -1]), [[1, 2, 3, 4, 5, -1], [1, 2, 3, 4, -1, 5], [1, 2, 3, 5, 4, -1], [1, 2, 3, 5, -1, 4], [1, 2, 3, -1, 4, 5], [1, 2, 3, -1, 5, 4], [1, 2, 4, 3, 5, -1], [1, 2, 4, 3, -1, 5], [1, 2, 4, 5, 3, -1], [1, 2, 4, 5, -1, 3], [1, 2, 4, -1, 3, 5], [1, 2, 4, -1, 5, 3], [1, 2, 5, 3, 4, -1], [1, 2, 5, 3, -1, 4], [1, 2, 5, 4, 3, -1], [1, 2, 5, 4, -1, 3], [1, 2, 5, -1, 3, 4], [1, 2, 5, -1, 4, 3], [1, 2, -1, 3, 4, 5], [1, 2, -1, 3, 5, 4], [1, 2, -1, 4, 3, 5], [1, 2, -1, 4, 5, 3], [1, 2, -1, 5, 3, 4], [1, 2, -1, 5, 4, 3], [1, 3, 2, 4, 5, -1], [1, 3, 2, 4, -1, 5], [1, 3, 2, 5, 4, -1], [1, 3, 2, 5, -1, 4], [1, 3, 2, -1, 4, 5], [1, 3, 2, -1, 5, 4], [1, 3, 4, 2, 5, -1], [1, 3, 4, 2, -1, 5], [1, 3, 4, 5, 2, -1], [1, 3, 4, 5, -1, 2], [1, 3, 4, -1, 2, 5], [1, 3, 4, -1, 5, 2], [1, 3, 5, 2, 4, -1], [1, 3, 5, 2, -1, 4], [1, 3, 5, 4, 2, -1], [1, 3, 5, 4, -1, 2], [1, 3, 5, -1, 2, 4], [1, 3, 5, -1, 4, 2], [1, 3, -1, 2, 4, 5], [1, 3, -1, 2, 5, 4], [1, 3, -1, 4, 2, 5], [1, 3, -1, 4, 5, 2], [1, 3, -1, 5, 2, 4], [1, 3, -1, 5, 4, 2], [1, 4, 2, 3, 5, -1], [1, 4, 2, 3, -1, 5], [1, 4, 2, 5, 3, -1], [1, 4, 2, 5, -1, 3], [1, 4, 2, -1, 3, 5], [1, 4, 2, -1, 5, 3], [1, 4, 3, 2, 5, -1], [1, 4, 3, 2, -1, 5], [1, 4, 3, 5, 2, -1], [1, 4, 3, 5, -1, 2], [1, 4, 3, -1, 2, 5], [1, 4, 3, -1, 5, 2], [1, 4, 5, 2, 3, -1], [1, 4, 5, 2, -1, 3], [1, 4, 5, 3, 2, -1], [1, 4, 5, 3, -1, 2], [1, 4, 5, -1, 2, 3], [1, 4, 5, -1, 3, 2], [1, 4, -1, 2, 3, 5], [1, 4, -1, 2, 5, 3], [1, 4, -1, 3, 2, 5], [1, 4, -1, 3, 5, 2], [1, 4, -1, 5, 2, 3], [1, 4, -1, 5, 3, 2], [1, 5, 2, 3, 4, -1], [1, 5, 2, 3, -1, 4], [1, 5, 2, 4, 3, -1], [1, 5, 2, 4, -1, 3], [1, 5, 2, -1, 3, 4], [1, 5, 2, -1, 4, 3], [1, 5, 3, 2, 4, -1], [1, 5, 3, 2, -1, 4], [1, 5, 3, 4, 2, -1], [1, 5, 3, 4, -1, 2], [1, 5, 3, -1, 2, 4], [1, 5, 3, -1, 4, 2], [1, 5, 4, 2, 3, -1], [1, 5, 4, 2, -1, 3], [1, 5, 4, 3, 2, -1], [1, 5, 4, 3, -1, 2], [1, 5, 4, -1, 2, 3], [1, 5, 4, -1, 3, 2], [1, 5, -1, 2, 3, 4], [1, 5, -1, 2, 4, 3], [1, 5, -1, 3, 2, 4], [1, 5, -1, 3, 4, 2], [1, 5, -1, 4, 2, 3], [1, 5, -1, 4, 3, 2], [1, -1, 2, 3, 4, 5], [1, -1, 2, 3, 5, 4], [1, -1, 2, 4, 3, 5], [1, -1, 2, 4, 5, 3], [1, -1, 2, 5, 3, 4], [1, -1, 2, 5, 4, 3], [1, -1, 3, 2, 4, 5], [1, -1, 3, 2, 5, 4], [1, -1, 3, 4, 2, 5], [1, -1, 3, 4, 5, 2], [1, -1, 3, 5, 2, 4], [1, -1, 3, 5, 4, 2], [1, -1, 4, 2, 3, 5], [1, -1, 4, 2, 5, 3], [1, -1, 4, 3, 2, 5], [1, -1, 4, 3, 5, 2], [1, -1, 4, 5, 2, 3], [1, -1, 4, 5, 3, 2], [1, -1, 5, 2, 3, 4], [1, -1, 5, 2, 4, 3], [1, -1, 5, 3, 2, 4], [1, -1, 5, 3, 4, 2], [1, -1, 5, 4, 2, 3], [1, -1, 5, 4, 3, 2], [2, 1, 3, 4, 5, -1], [2, 1, 3, 4, -1, 5], [2, 1, 3, 5, 4, -1], [2, 1, 3, 5, -1, 4], [2, 1, 3, -1, 4, 5], [2, 1, 3, -1, 5, 4], [2, 1, 4, 3, 5, -1], [2, 1, 4, 3, -1, 5], [2, 1, 4, 5, 3, -1], [2, 1, 4, 5, -1, 3], [2, 1, 4, -1, 3, 5], [2, 1, 4, -1, 5, 3], [2, 1, 5, 3, 4, -1], [2, 1, 5, 3, -1, 4], [2, 1, 5, 4, 3, -1], [2, 1, 5, 4, -1, 3], [2, 1, 5, -1, 3, 4], [2, 1, 5, -1, 4, 3], [2, 1, -1, 3, 4, 5], [2, 1, -1, 3, 5, 4], [2, 1, -1, 4, 3, 5], [2, 1, -1, 4, 5, 3], [2, 1, -1, 5, 3, 4], [2, 1, -1, 5, 4, 3], [2, 3, 1, 4, 5, -1], [2, 3, 1, 4, -1, 5], [2, 3, 1, 5, 4, -1], [2, 3, 1, 5, -1, 4], [2, 3, 1, -1, 4, 5], [2, 3, 1, -1, 5, 4], [2, 3, 4, 1, 5, -1], [2, 3, 4, 1, -1, 5], [2, 3, 4, 5, 1, -1], [2, 3, 4, 5, -1, 1], [2, 3, 4, -1, 1, 5], [2, 3, 4, -1, 5, 1], [2, 3, 5, 1, 4, -1], [2, 3, 5, 1, -1, 4], [2, 3, 5, 4, 1, -1], [2, 3, 5, 4, -1, 1], [2, 3, 5, -1, 1, 4], [2, 3, 5, -1, 4, 1], [2, 3, -1, 1, 4, 5], [2, 3, -1, 1, 5, 4], [2, 3, -1, 4, 1, 5], [2, 3, -1, 4, 5, 1], [2, 3, -1, 5, 1, 4], [2, 3, -1, 5, 4, 1], [2, 4, 1, 3, 5, -1], [2, 4, 1, 3, -1, 5], [2, 4, 1, 5, 3, -1], [2, 4, 1, 5, -1, 3], [2, 4, 1, -1, 3, 5], [2, 4, 1, -1, 5, 3], [2, 4, 3, 1, 5, -1], [2, 4, 3, 1, -1, 5], [2, 4, 3, 5, 1, -1], [2, 4, 3, 5, -1, 1], [2, 4, 3, -1, 1, 5], [2, 4, 3, -1, 5, 1], [2, 4, 5, 1, 3, -1], [2, 4, 5, 1, -1, 3], [2, 4, 5, 3, 1, -1], [2, 4, 5, 3, -1, 1], [2, 4, 5, -1, 1, 3], [2, 4, 5, -1, 3, 1], [2, 4, -1, 1, 3, 5], [2, 4, -1, 1, 5, 3], [2, 4, -1, 3, 1, 5], [2, 4, -1, 3, 5, 1], [2, 4, -1, 5, 1, 3], [2, 4, -1, 5, 3, 1], [2, 5, 1, 3, 4, -1], [2, 5, 1, 3, -1, 4], [2, 5, 1, 4, 3, -1], [2, 5, 1, 4, -1, 3], [2, 5, 1, -1, 3, 4], [2, 5, 1, -1, 4, 3], [2, 5, 3, 1, 4, -1], [2, 5, 3, 1, -1, 4], [2, 5, 3, 4, 1, -1], [2, 5, 3, 4, -1, 1], [2, 5, 3, -1, 1, 4], [2, 5, 3, -1, 4, 1], [2, 5, 4, 1, 3, -1], [2, 5, 4, 1, -1, 3], [2, 5, 4, 3, 1, -1], [2, 5, 4, 3, -1, 1], [2, 5, 4, -1, 1, 3], [2, 5, 4, -1, 3, 1], [2, 5, -1, 1, 3, 4], [2, 5, -1, 1, 4, 3], [2, 5, -1, 3, 1, 4], [2, 5, -1, 3, 4, 1], [2, 5, -1, 4, 1, 3], [2, 5, -1, 4, 3, 1], [2, -1, 1, 3, 4, 5], [2, -1, 1, 3, 5, 4], [2, -1, 1, 4, 3, 5], [2, -1, 1, 4, 5, 3], [2, -1, 1, 5, 3, 4], [2, -1, 1, 5, 4, 3], [2, -1, 3, 1, 4, 5], [2, -1, 3, 1, 5, 4], [2, -1, 3, 4, 1, 5], [2, -1, 3, 4, 5, 1], [2, -1, 3, 5, 1, 4], [2, -1, 3, 5, 4, 1], [2, -1, 4, 1, 3, 5], [2, -1, 4, 1, 5, 3], [2, -1, 4, 3, 1, 5], [2, -1, 4, 3, 5, 1], [2, -1, 4, 5, 1, 3], [2, -1, 4, 5, 3, 1], [2, -1, 5, 1, 3, 4], [2, -1, 5, 1, 4, 3], [2, -1, 5, 3, 1, 4], [2, -1, 5, 3, 4, 1], [2, -1, 5, 4, 1, 3], [2, -1, 5, 4, 3, 1], [3, 1, 2, 4, 5, -1], [3, 1, 2, 4, -1, 5], [3, 1, 2, 5, 4, -1], [3, 1, 2, 5, -1, 4], [3, 1, 2, -1, 4, 5], [3, 1, 2, -1, 5, 4], [3, 1, 4, 2, 5, -1], [3, 1, 4, 2, -1, 5], [3, 1, 4, 5, 2, -1], [3, 1, 4, 5, -1, 2], [3, 1, 4, -1, 2, 5], [3, 1, 4, -1, 5, 2], [3, 1, 5, 2, 4, -1], [3, 1, 5, 2, -1, 4], [3, 1, 5, 4, 2, -1], [3, 1, 5, 4, -1, 2], [3, 1, 5, -1, 2, 4], [3, 1, 5, -1, 4, 2], [3, 1, -1, 2, 4, 5], [3, 1, -1, 2, 5, 4], [3, 1, -1, 4, 2, 5], [3, 1, -1, 4, 5, 2], [3, 1, -1, 5, 2, 4], [3, 1, -1, 5, 4, 2], [3, 2, 1, 4, 5, -1], [3, 2, 1, 4, -1, 5], [3, 2, 1, 5, 4, -1], [3, 2, 1, 5, -1, 4], [3, 2, 1, -1, 4, 5], [3, 2, 1, -1, 5, 4], [3, 2, 4, 1, 5, -1], [3, 2, 4, 1, -1, 5], [3, 2, 4, 5, 1, -1], [3, 2, 4, 5, -1, 1], [3, 2, 4, -1, 1, 5], [3, 2, 4, -1, 5, 1], [3, 2, 5, 1, 4, -1], [3, 2, 5, 1, -1, 4], [3, 2, 5, 4, 1, -1], [3, 2, 5, 4, -1, 1], [3, 2, 5, -1, 1, 4], [3, 2, 5, -1, 4, 1], [3, 2, -1, 1, 4, 5], [3, 2, -1, 1, 5, 4], [3, 2, -1, 4, 1, 5], [3, 2, -1, 4, 5, 1], [3, 2, -1, 5, 1, 4], [3, 2, -1, 5, 4, 1], [3, 4, 1, 2, 5, -1], [3, 4, 1, 2, -1, 5], [3, 4, 1, 5, 2, -1], [3, 4, 1, 5, -1, 2], [3, 4, 1, -1, 2, 5], [3, 4, 1, -1, 5, 2], [3, 4, 2, 1, 5, -1], [3, 4, 2, 1, -1, 5], [3, 4, 2, 5, 1, -1], [3, 4, 2, 5, -1, 1], [3, 4, 2, -1, 1, 5], [3, 4, 2, -1, 5, 1], [3, 4, 5, 1, 2, -1], [3, 4, 5, 1, -1, 2], [3, 4, 5, 2, 1, -1], [3, 4, 5, 2, -1, 1], [3, 4, 5, -1, 1, 2], [3, 4, 5, -1, 2, 1], [3, 4, -1, 1, 2, 5], [3, 4, -1, 1, 5, 2], [3, 4, -1, 2, 1, 5], [3, 4, -1, 2, 5, 1], [3, 4, -1, 5, 1, 2], [3, 4, -1, 5, 2, 1], [3, 5, 1, 2, 4, -1], [3, 5, 1, 2, -1, 4], [3, 5, 1, 4, 2, -1], [3, 5, 1, 4, -1, 2], [3, 5, 1, -1, 2, 4], [3, 5, 1, -1, 4, 2], [3, 5, 2, 1, 4, -1], [3, 5, 2, 1, -1, 4], [3, 5, 2, 4, 1, -1], [3, 5, 2, 4, -1, 1], [3, 5, 2, -1, 1, 4], [3, 5, 2, -1, 4, 1], [3, 5, 4, 1, 2, -1], [3, 5, 4, 1, -1, 2], [3, 5, 4, 2, 1, -1], [3, 5, 4, 2, -1, 1], [3, 5, 4, -1, 1, 2], [3, 5, 4, -1, 2, 1], [3, 5, -1, 1, 2, 4], [3, 5, -1, 1, 4, 2], [3, 5, -1, 2, 1, 4], [3, 5, -1, 2, 4, 1], [3, 5, -1, 4, 1, 2], [3, 5, -1, 4, 2, 1], [3, -1, 1, 2, 4, 5], [3, -1, 1, 2, 5, 4], [3, -1, 1, 4, 2, 5], [3, -1, 1, 4, 5, 2], [3, -1, 1, 5, 2, 4], [3, -1, 1, 5, 4, 2], [3, -1, 2, 1, 4, 5], [3, -1, 2, 1, 5, 4], [3, -1, 2, 4, 1, 5], [3, -1, 2, 4, 5, 1], [3, -1, 2, 5, 1, 4], [3, -1, 2, 5, 4, 1], [3, -1, 4, 1, 2, 5], [3, -1, 4, 1, 5, 2], [3, -1, 4, 2, 1, 5], [3, -1, 4, 2, 5, 1], [3, -1, 4, 5, 1, 2], [3, -1, 4, 5, 2, 1], [3, -1, 5, 1, 2, 4], [3, -1, 5, 1, 4, 2], [3, -1, 5, 2, 1, 4], [3, -1, 5, 2, 4, 1], [3, -1, 5, 4, 1, 2], [3, -1, 5, 4, 2, 1], [4, 1, 2, 3, 5, -1], [4, 1, 2, 3, -1, 5], [4, 1, 2, 5, 3, -1], [4, 1, 2, 5, -1, 3], [4, 1, 2, -1, 3, 5], [4, 1, 2, -1, 5, 3], [4, 1, 3, 2, 5, -1], [4, 1, 3, 2, -1, 5], [4, 1, 3, 5, 2, -1], [4, 1, 3, 5, -1, 2], [4, 1, 3, -1, 2, 5], [4, 1, 3, -1, 5, 2], [4, 1, 5, 2, 3, -1], [4, 1, 5, 2, -1, 3], [4, 1, 5, 3, 2, -1], [4, 1, 5, 3, -1, 2], [4, 1, 5, -1, 2, 3], [4, 1, 5, -1, 3, 2], [4, 1, -1, 2, 3, 5], [4, 1, -1, 2, 5, 3], [4, 1, -1, 3, 2, 5], [4, 1, -1, 3, 5, 2], [4, 1, -1, 5, 2, 3], [4, 1, -1, 5, 3, 2], [4, 2, 1, 3, 5, -1], [4, 2, 1, 3, -1, 5], [4, 2, 1, 5, 3, -1], [4, 2, 1, 5, -1, 3], [4, 2, 1, -1, 3, 5], [4, 2, 1, -1, 5, 3], [4, 2, 3, 1, 5, -1], [4, 2, 3, 1, -1, 5], [4, 2, 3, 5, 1, -1], [4, 2, 3, 5, -1, 1], [4, 2, 3, -1, 1, 5], [4, 2, 3, -1, 5, 1], [4, 2, 5, 1, 3, -1], [4, 2, 5, 1, -1, 3], [4, 2, 5, 3, 1, -1], [4, 2, 5, 3, -1, 1], [4, 2, 5, -1, 1, 3], [4, 2, 5, -1, 3, 1], [4, 2, -1, 1, 3, 5], [4, 2, -1, 1, 5, 3], [4, 2, -1, 3, 1, 5], [4, 2, -1, 3, 5, 1], [4, 2, -1, 5, 1, 3], [4, 2, -1, 5, 3, 1], [4, 3, 1, 2, 5, -1], [4, 3, 1, 2, -1, 5], [4, 3, 1, 5, 2, -1], [4, 3, 1, 5, -1, 2], [4, 3, 1, -1, 2, 5], [4, 3, 1, -1, 5, 2], [4, 3, 2, 1, 5, -1], [4, 3, 2, 1, -1, 5], [4, 3, 2, 5, 1, -1], [4, 3, 2, 5, -1, 1], [4, 3, 2, -1, 1, 5], [4, 3, 2, -1, 5, 1], [4, 3, 5, 1, 2, -1], [4, 3, 5, 1, -1, 2], [4, 3, 5, 2, 1, -1], [4, 3, 5, 2, -1, 1], [4, 3, 5, -1, 1, 2], [4, 3, 5, -1, 2, 1], [4, 3, -1, 1, 2, 5], [4, 3, -1, 1, 5, 2], [4, 3, -1, 2, 1, 5], [4, 3, -1, 2, 5, 1], [4, 3, -1, 5, 1, 2], [4, 3, -1, 5, 2, 1], [4, 5, 1, 2, 3, -1], [4, 5, 1, 2, -1, 3], [4, 5, 1, 3, 2, -1], [4, 5, 1, 3, -1, 2], [4, 5, 1, -1, 2, 3], [4, 5, 1, -1, 3, 2], [4, 5, 2, 1, 3, -1], [4, 5, 2, 1, -1, 3], [4, 5, 2, 3, 1, -1], [4, 5, 2, 3, -1, 1], [4, 5, 2, -1, 1, 3], [4, 5, 2, -1, 3, 1], [4, 5, 3, 1, 2, -1], [4, 5, 3, 1, -1, 2], [4, 5, 3, 2, 1, -1], [4, 5, 3, 2, -1, 1], [4, 5, 3, -1, 1, 2], [4, 5, 3, -1, 2, 1], [4, 5, -1, 1, 2, 3], [4, 5, -1, 1, 3, 2], [4, 5, -1, 2, 1, 3], [4, 5, -1, 2, 3, 1], [4, 5, -1, 3, 1, 2], [4, 5, -1, 3, 2, 1], [4, -1, 1, 2, 3, 5], [4, -1, 1, 2, 5, 3], [4, -1, 1, 3, 2, 5], [4, -1, 1, 3, 5, 2], [4, -1, 1, 5, 2, 3], [4, -1, 1, 5, 3, 2], [4, -1, 2, 1, 3, 5], [4, -1, 2, 1, 5, 3], [4, -1, 2, 3, 1, 5], [4, -1, 2, 3, 5, 1], [4, -1, 2, 5, 1, 3], [4, -1, 2, 5, 3, 1], [4, -1, 3, 1, 2, 5], [4, -1, 3, 1, 5, 2], [4, -1, 3, 2, 1, 5], [4, -1, 3, 2, 5, 1], [4, -1, 3, 5, 1, 2], [4, -1, 3, 5, 2, 1], [4, -1, 5, 1, 2, 3], [4, -1, 5, 1, 3, 2], [4, -1, 5, 2, 1, 3], [4, -1, 5, 2, 3, 1], [4, -1, 5, 3, 1, 2], [4, -1, 5, 3, 2, 1], [5, 1, 2, 3, 4, -1], [5, 1, 2, 3, -1, 4], [5, 1, 2, 4, 3, -1], [5, 1, 2, 4, -1, 3], [5, 1, 2, -1, 3, 4], [5, 1, 2, -1, 4, 3], [5, 1, 3, 2, 4, -1], [5, 1, 3, 2, -1, 4], [5, 1, 3, 4, 2, -1], [5, 1, 3, 4, -1, 2], [5, 1, 3, -1, 2, 4], [5, 1, 3, -1, 4, 2], [5, 1, 4, 2, 3, -1], [5, 1, 4, 2, -1, 3], [5, 1, 4, 3, 2, -1], [5, 1, 4, 3, -1, 2], [5, 1, 4, -1, 2, 3], [5, 1, 4, -1, 3, 2], [5, 1, -1, 2, 3, 4], [5, 1, -1, 2, 4, 3], [5, 1, -1, 3, 2, 4], [5, 1, -1, 3, 4, 2], [5, 1, -1, 4, 2, 3], [5, 1, -1, 4, 3, 2], [5, 2, 1, 3, 4, -1], [5, 2, 1, 3, -1, 4], [5, 2, 1, 4, 3, -1], [5, 2, 1, 4, -1, 3], [5, 2, 1, -1, 3, 4], [5, 2, 1, -1, 4, 3], [5, 2, 3, 1, 4, -1], [5, 2, 3, 1, -1, 4], [5, 2, 3, 4, 1, -1], [5, 2, 3, 4, -1, 1], [5, 2, 3, -1, 1, 4], [5, 2, 3, -1, 4, 1], [5, 2, 4, 1, 3, -1], [5, 2, 4, 1, -1, 3], [5, 2, 4, 3, 1, -1], [5, 2, 4, 3, -1, 1], [5, 2, 4, -1, 1, 3], [5, 2, 4, -1, 3, 1], [5, 2, -1, 1, 3, 4], [5, 2, -1, 1, 4, 3], [5, 2, -1, 3, 1, 4], [5, 2, -1, 3, 4, 1], [5, 2, -1, 4, 1, 3], [5, 2, -1, 4, 3, 1], [5, 3, 1, 2, 4, -1], [5, 3, 1, 2, -1, 4], [5, 3, 1, 4, 2, -1], [5, 3, 1, 4, -1, 2], [5, 3, 1, -1, 2, 4], [5, 3, 1, -1, 4, 2], [5, 3, 2, 1, 4, -1], [5, 3, 2, 1, -1, 4], [5, 3, 2, 4, 1, -1], [5, 3, 2, 4, -1, 1], [5, 3, 2, -1, 1, 4], [5, 3, 2, -1, 4, 1], [5, 3, 4, 1, 2, -1], [5, 3, 4, 1, -1, 2], [5, 3, 4, 2, 1, -1], [5, 3, 4, 2, -1, 1], [5, 3, 4, -1, 1, 2], [5, 3, 4, -1, 2, 1], [5, 3, -1, 1, 2, 4], [5, 3, -1, 1, 4, 2], [5, 3, -1, 2, 1, 4], [5, 3, -1, 2, 4, 1], [5, 3, -1, 4, 1, 2], [5, 3, -1, 4, 2, 1], [5, 4, 1, 2, 3, -1], [5, 4, 1, 2, -1, 3], [5, 4, 1, 3, 2, -1], [5, 4, 1, 3, -1, 2], [5, 4, 1, -1, 2, 3], [5, 4, 1, -1, 3, 2], [5, 4, 2, 1, 3, -1], [5, 4, 2, 1, -1, 3], [5, 4, 2, 3, 1, -1], [5, 4, 2, 3, -1, 1], [5, 4, 2, -1, 1, 3], [5, 4, 2, -1, 3, 1], [5, 4, 3, 1, 2, -1], [5, 4, 3, 1, -1, 2], [5, 4, 3, 2, 1, -1], [5, 4, 3, 2, -1, 1], [5, 4, 3, -1, 1, 2], [5, 4, 3, -1, 2, 1], [5, 4, -1, 1, 2, 3], [5, 4, -1, 1, 3, 2], [5, 4, -1, 2, 1, 3], [5, 4, -1, 2, 3, 1], [5, 4, -1, 3, 1, 2], [5, 4, -1, 3, 2, 1], [5, -1, 1, 2, 3, 4], [5, -1, 1, 2, 4, 3], [5, -1, 1, 3, 2, 4], [5, -1, 1, 3, 4, 2], [5, -1, 1, 4, 2, 3], [5, -1, 1, 4, 3, 2], [5, -1, 2, 1, 3, 4], [5, -1, 2, 1, 4, 3], [5, -1, 2, 3, 1, 4], [5, -1, 2, 3, 4, 1], [5, -1, 2, 4, 1, 3], [5, -1, 2, 4, 3, 1], [5, -1, 3, 1, 2, 4], [5, -1, 3, 1, 4, 2], [5, -1, 3, 2, 1, 4], [5, -1, 3, 2, 4, 1], [5, -1, 3, 4, 1, 2], [5, -1, 3, 4, 2, 1], [5, -1, 4, 1, 2, 3], [5, -1, 4, 1, 3, 2], [5, -1, 4, 2, 1, 3], [5, -1, 4, 2, 3, 1], [5, -1, 4, 3, 1, 2], [5, -1, 4, 3, 2, 1], [-1, 1, 2, 3, 4, 5], [-1, 1, 2, 3, 5, 4], [-1, 1, 2, 4, 3, 5], [-1, 1, 2, 4, 5, 3], [-1, 1, 2, 5, 3, 4], [-1, 1, 2, 5, 4, 3], [-1, 1, 3, 2, 4, 5], [-1, 1, 3, 2, 5, 4], [-1, 1, 3, 4, 2, 5], [-1, 1, 3, 4, 5, 2], [-1, 1, 3, 5, 2, 4], [-1, 1, 3, 5, 4, 2], [-1, 1, 4, 2, 3, 5], [-1, 1, 4, 2, 5, 3], [-1, 1, 4, 3, 2, 5], [-1, 1, 4, 3, 5, 2], [-1, 1, 4, 5, 2, 3], [-1, 1, 4, 5, 3, 2], [-1, 1, 5, 2, 3, 4], [-1, 1, 5, 2, 4, 3], [-1, 1, 5, 3, 2, 4], [-1, 1, 5, 3, 4, 2], [-1, 1, 5, 4, 2, 3], [-1, 1, 5, 4, 3, 2], [-1, 2, 1, 3, 4, 5], [-1, 2, 1, 3, 5, 4], [-1, 2, 1, 4, 3, 5], [-1, 2, 1, 4, 5, 3], [-1, 2, 1, 5, 3, 4], [-1, 2, 1, 5, 4, 3], [-1, 2, 3, 1, 4, 5], [-1, 2, 3, 1, 5, 4], [-1, 2, 3, 4, 1, 5], [-1, 2, 3, 4, 5, 1], [-1, 2, 3, 5, 1, 4], [-1, 2, 3, 5, 4, 1], [-1, 2, 4, 1, 3, 5], [-1, 2, 4, 1, 5, 3], [-1, 2, 4, 3, 1, 5], [-1, 2, 4, 3, 5, 1], [-1, 2, 4, 5, 1, 3], [-1, 2, 4, 5, 3, 1], [-1, 2, 5, 1, 3, 4], [-1, 2, 5, 1, 4, 3], [-1, 2, 5, 3, 1, 4], [-1, 2, 5, 3, 4, 1], [-1, 2, 5, 4, 1, 3], [-1, 2, 5, 4, 3, 1], [-1, 3, 1, 2, 4, 5], [-1, 3, 1, 2, 5, 4], [-1, 3, 1, 4, 2, 5], [-1, 3, 1, 4, 5, 2], [-1, 3, 1, 5, 2, 4], [-1, 3, 1, 5, 4, 2], [-1, 3, 2, 1, 4, 5], [-1, 3, 2, 1, 5, 4], [-1, 3, 2, 4, 1, 5], [-1, 3, 2, 4, 5, 1], [-1, 3, 2, 5, 1, 4], [-1, 3, 2, 5, 4, 1], [-1, 3, 4, 1, 2, 5], [-1, 3, 4, 1, 5, 2], [-1, 3, 4, 2, 1, 5], [-1, 3, 4, 2, 5, 1], [-1, 3, 4, 5, 1, 2], [-1, 3, 4, 5, 2, 1], [-1, 3, 5, 1, 2, 4], [-1, 3, 5, 1, 4, 2], [-1, 3, 5, 2, 1, 4], [-1, 3, 5, 2, 4, 1], [-1, 3, 5, 4, 1, 2], [-1, 3, 5, 4, 2, 1], [-1, 4, 1, 2, 3, 5], [-1, 4, 1, 2, 5, 3], [-1, 4, 1, 3, 2, 5], [-1, 4, 1, 3, 5, 2], [-1, 4, 1, 5, 2, 3], [-1, 4, 1, 5, 3, 2], [-1, 4, 2, 1, 3, 5], [-1, 4, 2, 1, 5, 3], [-1, 4, 2, 3, 1, 5], [-1, 4, 2, 3, 5, 1], [-1, 4, 2, 5, 1, 3], [-1, 4, 2, 5, 3, 1], [-1, 4, 3, 1, 2, 5], [-1, 4, 3, 1, 5, 2], [-1, 4, 3, 2, 1, 5], [-1, 4, 3, 2, 5, 1], [-1, 4, 3, 5, 1, 2], [-1, 4, 3, 5, 2, 1], [-1, 4, 5, 1, 2, 3], [-1, 4, 5, 1, 3, 2], [-1, 4, 5, 2, 1, 3], [-1, 4, 5, 2, 3, 1], [-1, 4, 5, 3, 1, 2], [-1, 4, 5, 3, 2, 1], [-1, 5, 1, 2, 3, 4], [-1, 5, 1, 2, 4, 3], [-1, 5, 1, 3, 2, 4], [-1, 5, 1, 3, 4, 2], [-1, 5, 1, 4, 2, 3], [-1, 5, 1, 4, 3, 2], [-1, 5, 2, 1, 3, 4], [-1, 5, 2, 1, 4, 3], [-1, 5, 2, 3, 1, 4], [-1, 5, 2, 3, 4, 1], [-1, 5, 2, 4, 1, 3], [-1, 5, 2, 4, 3, 1], [-1, 5, 3, 1, 2, 4], [-1, 5, 3, 1, 4, 2], [-1, 5, 3, 2, 1, 4], [-1, 5, 3, 2, 4, 1], [-1, 5, 3, 4, 1, 2], [-1, 5, 3, 4, 2, 1], [-1, 5, 4, 1, 2, 3], [-1, 5, 4, 1, 3, 2], [-1, 5, 4, 2, 1, 3], [-1, 5, 4, 2, 3, 1], [-1, 5, 4, 3, 1, 2], [-1, 5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[5, 1, 4, 2, 3]), [[5, 1, 4, 2, 3], [5, 1, 4, 3, 2], [5, 1, 2, 4, 3], [5, 1, 2, 3, 4], [5, 1, 3, 4, 2], [5, 1, 3, 2, 4], [5, 4, 1, 2, 3], [5, 4, 1, 3, 2], [5, 4, 2, 1, 3], [5, 4, 2, 3, 1], [5, 4, 3, 1, 2], [5, 4, 3, 2, 1], [5, 2, 1, 4, 3], [5, 2, 1, 3, 4], [5, 2, 4, 1, 3], [5, 2, 4, 3, 1], [5, 2, 3, 1, 4], [5, 2, 3, 4, 1], [5, 3, 1, 4, 2], [5, 3, 1, 2, 4], [5, 3, 4, 1, 2], [5, 3, 4, 2, 1], [5, 3, 2, 1, 4], [5, 3, 2, 4, 1], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2], [1, 5, 2, 4, 3], [1, 5, 2, 3, 4], [1, 5, 3, 4, 2], [1, 5, 3, 2, 4], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 4, 2, 5, 3], [1, 4, 2, 3, 5], [1, 4, 3, 5, 2], [1, 4, 3, 2, 5], [1, 2, 5, 4, 3], [1, 2, 5, 3, 4], [1, 2, 4, 5, 3], [1, 2, 4, 3, 5], [1, 2, 3, 5, 4], [1, 2, 3, 4, 5], [1, 3, 5, 4, 2], [1, 3, 5, 2, 4], [1, 3, 4, 5, 2], [1, 3, 4, 2, 5], [1, 3, 2, 5, 4], [1, 3, 2, 4, 5], [4, 5, 1, 2, 3], [4, 5, 1, 3, 2], [4, 5, 2, 1, 3], [4, 5, 2, 3, 1], [4, 5, 3, 1, 2], [4, 5, 3, 2, 1], [4, 1, 5, 2, 3], [4, 1, 5, 3, 2], [4, 1, 2, 5, 3], [4, 1, 2, 3, 5], [4, 1, 3, 5, 2], [4, 1, 3, 2, 5], [4, 2, 5, 1, 3], [4, 2, 5, 3, 1], [4, 2, 1, 5, 3], [4, 2, 1, 3, 5], [4, 2, 3, 5, 1], [4, 2, 3, 1, 5], [4, 3, 5, 1, 2], [4, 3, 5, 2, 1], [4, 3, 1, 5, 2], [4, 3, 1, 2, 5], [4, 3, 2, 5, 1], [4, 3, 2, 1, 5], [2, 5, 1, 4, 3], [2, 5, 1, 3, 4], [2, 5, 4, 1, 3], [2, 5, 4, 3, 1], [2, 5, 3, 1, 4], [2, 5, 3, 4, 1], [2, 1, 5, 4, 3], [2, 1, 5, 3, 4], [2, 1, 4, 5, 3], [2, 1, 4, 3, 5], [2, 1, 3, 5, 4], [2, 1, 3, 4, 5], [2, 4, 5, 1, 3], [2, 4, 5, 3, 1], [2, 4, 1, 5, 3], [2, 4, 1, 3, 5], [2, 4, 3, 5, 1], [2, 4, 3, 1, 5], [2, 3, 5, 1, 4], [2, 3, 5, 4, 1], [2, 3, 1, 5, 4], [2, 3, 1, 4, 5], [2, 3, 4, 5, 1], [2, 3, 4, 1, 5], [3, 5, 1, 4, 2], [3, 5, 1, 2, 4], [3, 5, 4, 1, 2], [3, 5, 4, 2, 1], [3, 5, 2, 1, 4], [3, 5, 2, 4, 1], [3, 1, 5, 4, 2], [3, 1, 5, 2, 4], [3, 1, 4, 5, 2], [3, 1, 4, 2, 5], [3, 1, 2, 5, 4], [3, 1, 2, 4, 5], [3, 4, 5, 1, 2], [3, 4, 5, 2, 1], [3, 4, 1, 5, 2], [3, 4, 1, 2, 5], [3, 4, 2, 5, 1], [3, 4, 2, 1, 5], [3, 2, 5, 1, 4], [3, 2, 5, 4, 1], [3, 2, 1, 5, 4], [3, 2, 1, 4, 5], [3, 2, 4, 5, 1], [3, 2, 4, 1, 5]])\n assert answers_match(candidate(nums=[1, -1, 2, -2, 3, -3]), [[1, -1, 2, -2, 3, -3], [1, -1, 2, -2, -3, 3], [1, -1, 2, 3, -2, -3], [1, -1, 2, 3, -3, -2], [1, -1, 2, -3, -2, 3], [1, -1, 2, -3, 3, -2], [1, -1, -2, 2, 3, -3], [1, -1, -2, 2, -3, 3], [1, -1, -2, 3, 2, -3], [1, -1, -2, 3, -3, 2], [1, -1, -2, -3, 2, 3], [1, -1, -2, -3, 3, 2], [1, -1, 3, 2, -2, -3], [1, -1, 3, 2, -3, -2], [1, -1, 3, -2, 2, -3], [1, -1, 3, -2, -3, 2], [1, -1, 3, -3, 2, -2], [1, -1, 3, -3, -2, 2], [1, -1, -3, 2, -2, 3], [1, -1, -3, 2, 3, -2], [1, -1, -3, -2, 2, 3], [1, -1, -3, -2, 3, 2], [1, -1, -3, 3, 2, -2], [1, -1, -3, 3, -2, 2], [1, 2, -1, -2, 3, -3], [1, 2, -1, -2, -3, 3], [1, 2, -1, 3, -2, -3], [1, 2, -1, 3, -3, -2], [1, 2, -1, -3, -2, 3], [1, 2, -1, -3, 3, -2], [1, 2, -2, -1, 3, -3], [1, 2, -2, -1, -3, 3], [1, 2, -2, 3, -1, -3], [1, 2, -2, 3, -3, -1], [1, 2, -2, -3, -1, 3], [1, 2, -2, -3, 3, -1], [1, 2, 3, -1, -2, -3], [1, 2, 3, -1, -3, -2], [1, 2, 3, -2, -1, -3], [1, 2, 3, -2, -3, -1], [1, 2, 3, -3, -1, -2], [1, 2, 3, -3, -2, -1], [1, 2, -3, -1, -2, 3], [1, 2, -3, -1, 3, -2], [1, 2, -3, -2, -1, 3], [1, 2, -3, -2, 3, -1], [1, 2, -3, 3, -1, -2], [1, 2, -3, 3, -2, -1], [1, -2, -1, 2, 3, -3], [1, -2, -1, 2, -3, 3], [1, -2, -1, 3, 2, -3], [1, -2, -1, 3, -3, 2], [1, -2, -1, -3, 2, 3], [1, -2, -1, -3, 3, 2], [1, -2, 2, -1, 3, -3], [1, -2, 2, -1, -3, 3], [1, -2, 2, 3, -1, -3], [1, -2, 2, 3, -3, -1], [1, -2, 2, -3, -1, 3], [1, -2, 2, -3, 3, -1], [1, -2, 3, -1, 2, -3], [1, -2, 3, -1, -3, 2], [1, -2, 3, 2, -1, -3], [1, -2, 3, 2, -3, -1], [1, -2, 3, -3, -1, 2], [1, -2, 3, -3, 2, -1], [1, -2, -3, -1, 2, 3], [1, -2, -3, -1, 3, 2], [1, -2, -3, 2, -1, 3], [1, -2, -3, 2, 3, -1], [1, -2, -3, 3, -1, 2], [1, -2, -3, 3, 2, -1], [1, 3, -1, 2, -2, -3], [1, 3, -1, 2, -3, -2], [1, 3, -1, -2, 2, -3], [1, 3, -1, -2, -3, 2], [1, 3, -1, -3, 2, -2], [1, 3, -1, -3, -2, 2], [1, 3, 2, -1, -2, -3], [1, 3, 2, -1, -3, -2], [1, 3, 2, -2, -1, -3], [1, 3, 2, -2, -3, -1], [1, 3, 2, -3, -1, -2], [1, 3, 2, -3, -2, -1], [1, 3, -2, -1, 2, -3], [1, 3, -2, -1, -3, 2], [1, 3, -2, 2, -1, -3], [1, 3, -2, 2, -3, -1], [1, 3, -2, -3, -1, 2], [1, 3, -2, -3, 2, -1], [1, 3, -3, -1, 2, -2], [1, 3, -3, -1, -2, 2], [1, 3, -3, 2, -1, -2], [1, 3, -3, 2, -2, -1], [1, 3, -3, -2, -1, 2], [1, 3, -3, -2, 2, -1], [1, -3, -1, 2, -2, 3], [1, -3, -1, 2, 3, -2], [1, -3, -1, -2, 2, 3], [1, -3, -1, -2, 3, 2], [1, -3, -1, 3, 2, -2], [1, -3, -1, 3, -2, 2], [1, -3, 2, -1, -2, 3], [1, -3, 2, -1, 3, -2], [1, -3, 2, -2, -1, 3], [1, -3, 2, -2, 3, -1], [1, -3, 2, 3, -1, -2], [1, -3, 2, 3, -2, -1], [1, -3, -2, -1, 2, 3], [1, -3, -2, -1, 3, 2], [1, -3, -2, 2, -1, 3], [1, -3, -2, 2, 3, -1], [1, -3, -2, 3, -1, 2], [1, -3, -2, 3, 2, -1], [1, -3, 3, -1, 2, -2], [1, -3, 3, -1, -2, 2], [1, -3, 3, 2, -1, -2], [1, -3, 3, 2, -2, -1], [1, -3, 3, -2, -1, 2], [1, -3, 3, -2, 2, -1], [-1, 1, 2, -2, 3, -3], [-1, 1, 2, -2, -3, 3], [-1, 1, 2, 3, -2, -3], [-1, 1, 2, 3, -3, -2], [-1, 1, 2, -3, -2, 3], [-1, 1, 2, -3, 3, -2], [-1, 1, -2, 2, 3, -3], [-1, 1, -2, 2, -3, 3], [-1, 1, -2, 3, 2, -3], [-1, 1, -2, 3, -3, 2], [-1, 1, -2, -3, 2, 3], [-1, 1, -2, -3, 3, 2], [-1, 1, 3, 2, -2, -3], [-1, 1, 3, 2, -3, -2], [-1, 1, 3, -2, 2, -3], [-1, 1, 3, -2, -3, 2], [-1, 1, 3, -3, 2, -2], [-1, 1, 3, -3, -2, 2], [-1, 1, -3, 2, -2, 3], [-1, 1, -3, 2, 3, -2], [-1, 1, -3, -2, 2, 3], [-1, 1, -3, -2, 3, 2], [-1, 1, -3, 3, 2, -2], [-1, 1, -3, 3, -2, 2], [-1, 2, 1, -2, 3, -3], [-1, 2, 1, -2, -3, 3], [-1, 2, 1, 3, -2, -3], [-1, 2, 1, 3, -3, -2], [-1, 2, 1, -3, -2, 3], [-1, 2, 1, -3, 3, -2], [-1, 2, -2, 1, 3, -3], [-1, 2, -2, 1, -3, 3], [-1, 2, -2, 3, 1, -3], [-1, 2, -2, 3, -3, 1], [-1, 2, -2, -3, 1, 3], [-1, 2, -2, -3, 3, 1], [-1, 2, 3, 1, -2, -3], [-1, 2, 3, 1, -3, -2], [-1, 2, 3, -2, 1, -3], [-1, 2, 3, -2, -3, 1], [-1, 2, 3, -3, 1, -2], [-1, 2, 3, -3, -2, 1], [-1, 2, -3, 1, -2, 3], [-1, 2, -3, 1, 3, -2], [-1, 2, -3, -2, 1, 3], [-1, 2, -3, -2, 3, 1], [-1, 2, -3, 3, 1, -2], [-1, 2, -3, 3, -2, 1], [-1, -2, 1, 2, 3, -3], [-1, -2, 1, 2, -3, 3], [-1, -2, 1, 3, 2, -3], [-1, -2, 1, 3, -3, 2], [-1, -2, 1, -3, 2, 3], [-1, -2, 1, -3, 3, 2], [-1, -2, 2, 1, 3, -3], [-1, -2, 2, 1, -3, 3], [-1, -2, 2, 3, 1, -3], [-1, -2, 2, 3, -3, 1], [-1, -2, 2, -3, 1, 3], [-1, -2, 2, -3, 3, 1], [-1, -2, 3, 1, 2, -3], [-1, -2, 3, 1, -3, 2], [-1, -2, 3, 2, 1, -3], [-1, -2, 3, 2, -3, 1], [-1, -2, 3, -3, 1, 2], [-1, -2, 3, -3, 2, 1], [-1, -2, -3, 1, 2, 3], [-1, -2, -3, 1, 3, 2], [-1, -2, -3, 2, 1, 3], [-1, -2, -3, 2, 3, 1], [-1, -2, -3, 3, 1, 2], [-1, -2, -3, 3, 2, 1], [-1, 3, 1, 2, -2, -3], [-1, 3, 1, 2, -3, -2], [-1, 3, 1, -2, 2, -3], [-1, 3, 1, -2, -3, 2], [-1, 3, 1, -3, 2, -2], [-1, 3, 1, -3, -2, 2], [-1, 3, 2, 1, -2, -3], [-1, 3, 2, 1, -3, -2], [-1, 3, 2, -2, 1, -3], [-1, 3, 2, -2, -3, 1], [-1, 3, 2, -3, 1, -2], [-1, 3, 2, -3, -2, 1], [-1, 3, -2, 1, 2, -3], [-1, 3, -2, 1, -3, 2], [-1, 3, -2, 2, 1, -3], [-1, 3, -2, 2, -3, 1], [-1, 3, -2, -3, 1, 2], [-1, 3, -2, -3, 2, 1], [-1, 3, -3, 1, 2, -2], [-1, 3, -3, 1, -2, 2], [-1, 3, -3, 2, 1, -2], [-1, 3, -3, 2, -2, 1], [-1, 3, -3, -2, 1, 2], [-1, 3, -3, -2, 2, 1], [-1, -3, 1, 2, -2, 3], [-1, -3, 1, 2, 3, -2], [-1, -3, 1, -2, 2, 3], [-1, -3, 1, -2, 3, 2], [-1, -3, 1, 3, 2, -2], [-1, -3, 1, 3, -2, 2], [-1, -3, 2, 1, -2, 3], [-1, -3, 2, 1, 3, -2], [-1, -3, 2, -2, 1, 3], [-1, -3, 2, -2, 3, 1], [-1, -3, 2, 3, 1, -2], [-1, -3, 2, 3, -2, 1], [-1, -3, -2, 1, 2, 3], [-1, -3, -2, 1, 3, 2], [-1, -3, -2, 2, 1, 3], [-1, -3, -2, 2, 3, 1], [-1, -3, -2, 3, 1, 2], [-1, -3, -2, 3, 2, 1], [-1, -3, 3, 1, 2, -2], [-1, -3, 3, 1, -2, 2], [-1, -3, 3, 2, 1, -2], [-1, -3, 3, 2, -2, 1], [-1, -3, 3, -2, 1, 2], [-1, -3, 3, -2, 2, 1], [2, 1, -1, -2, 3, -3], [2, 1, -1, -2, -3, 3], [2, 1, -1, 3, -2, -3], [2, 1, -1, 3, -3, -2], [2, 1, -1, -3, -2, 3], [2, 1, -1, -3, 3, -2], [2, 1, -2, -1, 3, -3], [2, 1, -2, -1, -3, 3], [2, 1, -2, 3, -1, -3], [2, 1, -2, 3, -3, -1], [2, 1, -2, -3, -1, 3], [2, 1, -2, -3, 3, -1], [2, 1, 3, -1, -2, -3], [2, 1, 3, -1, -3, -2], [2, 1, 3, -2, -1, -3], [2, 1, 3, -2, -3, -1], [2, 1, 3, -3, -1, -2], [2, 1, 3, -3, -2, -1], [2, 1, -3, -1, -2, 3], [2, 1, -3, -1, 3, -2], [2, 1, -3, -2, -1, 3], [2, 1, -3, -2, 3, -1], [2, 1, -3, 3, -1, -2], [2, 1, -3, 3, -2, -1], [2, -1, 1, -2, 3, -3], [2, -1, 1, -2, -3, 3], [2, -1, 1, 3, -2, -3], [2, -1, 1, 3, -3, -2], [2, -1, 1, -3, -2, 3], [2, -1, 1, -3, 3, -2], [2, -1, -2, 1, 3, -3], [2, -1, -2, 1, -3, 3], [2, -1, -2, 3, 1, -3], [2, -1, -2, 3, -3, 1], [2, -1, -2, -3, 1, 3], [2, -1, -2, -3, 3, 1], [2, -1, 3, 1, -2, -3], [2, -1, 3, 1, -3, -2], [2, -1, 3, -2, 1, -3], [2, -1, 3, -2, -3, 1], [2, -1, 3, -3, 1, -2], [2, -1, 3, -3, -2, 1], [2, -1, -3, 1, -2, 3], [2, -1, -3, 1, 3, -2], [2, -1, -3, -2, 1, 3], [2, -1, -3, -2, 3, 1], [2, -1, -3, 3, 1, -2], [2, -1, -3, 3, -2, 1], [2, -2, 1, -1, 3, -3], [2, -2, 1, -1, -3, 3], [2, -2, 1, 3, -1, -3], [2, -2, 1, 3, -3, -1], [2, -2, 1, -3, -1, 3], [2, -2, 1, -3, 3, -1], [2, -2, -1, 1, 3, -3], [2, -2, -1, 1, -3, 3], [2, -2, -1, 3, 1, -3], [2, -2, -1, 3, -3, 1], [2, -2, -1, -3, 1, 3], [2, -2, -1, -3, 3, 1], [2, -2, 3, 1, -1, -3], [2, -2, 3, 1, -3, -1], [2, -2, 3, -1, 1, -3], [2, -2, 3, -1, -3, 1], [2, -2, 3, -3, 1, -1], [2, -2, 3, -3, -1, 1], [2, -2, -3, 1, -1, 3], [2, -2, -3, 1, 3, -1], [2, -2, -3, -1, 1, 3], [2, -2, -3, -1, 3, 1], [2, -2, -3, 3, 1, -1], [2, -2, -3, 3, -1, 1], [2, 3, 1, -1, -2, -3], [2, 3, 1, -1, -3, -2], [2, 3, 1, -2, -1, -3], [2, 3, 1, -2, -3, -1], [2, 3, 1, -3, -1, -2], [2, 3, 1, -3, -2, -1], [2, 3, -1, 1, -2, -3], [2, 3, -1, 1, -3, -2], [2, 3, -1, -2, 1, -3], [2, 3, -1, -2, -3, 1], [2, 3, -1, -3, 1, -2], [2, 3, -1, -3, -2, 1], [2, 3, -2, 1, -1, -3], [2, 3, -2, 1, -3, -1], [2, 3, -2, -1, 1, -3], [2, 3, -2, -1, -3, 1], [2, 3, -2, -3, 1, -1], [2, 3, -2, -3, -1, 1], [2, 3, -3, 1, -1, -2], [2, 3, -3, 1, -2, -1], [2, 3, -3, -1, 1, -2], [2, 3, -3, -1, -2, 1], [2, 3, -3, -2, 1, -1], [2, 3, -3, -2, -1, 1], [2, -3, 1, -1, -2, 3], [2, -3, 1, -1, 3, -2], [2, -3, 1, -2, -1, 3], [2, -3, 1, -2, 3, -1], [2, -3, 1, 3, -1, -2], [2, -3, 1, 3, -2, -1], [2, -3, -1, 1, -2, 3], [2, -3, -1, 1, 3, -2], [2, -3, -1, -2, 1, 3], [2, -3, -1, -2, 3, 1], [2, -3, -1, 3, 1, -2], [2, -3, -1, 3, -2, 1], [2, -3, -2, 1, -1, 3], [2, -3, -2, 1, 3, -1], [2, -3, -2, -1, 1, 3], [2, -3, -2, -1, 3, 1], [2, -3, -2, 3, 1, -1], [2, -3, -2, 3, -1, 1], [2, -3, 3, 1, -1, -2], [2, -3, 3, 1, -2, -1], [2, -3, 3, -1, 1, -2], [2, -3, 3, -1, -2, 1], [2, -3, 3, -2, 1, -1], [2, -3, 3, -2, -1, 1], [-2, 1, -1, 2, 3, -3], [-2, 1, -1, 2, -3, 3], [-2, 1, -1, 3, 2, -3], [-2, 1, -1, 3, -3, 2], [-2, 1, -1, -3, 2, 3], [-2, 1, -1, -3, 3, 2], [-2, 1, 2, -1, 3, -3], [-2, 1, 2, -1, -3, 3], [-2, 1, 2, 3, -1, -3], [-2, 1, 2, 3, -3, -1], [-2, 1, 2, -3, -1, 3], [-2, 1, 2, -3, 3, -1], [-2, 1, 3, -1, 2, -3], [-2, 1, 3, -1, -3, 2], [-2, 1, 3, 2, -1, -3], [-2, 1, 3, 2, -3, -1], [-2, 1, 3, -3, -1, 2], [-2, 1, 3, -3, 2, -1], [-2, 1, -3, -1, 2, 3], [-2, 1, -3, -1, 3, 2], [-2, 1, -3, 2, -1, 3], [-2, 1, -3, 2, 3, -1], [-2, 1, -3, 3, -1, 2], [-2, 1, -3, 3, 2, -1], [-2, -1, 1, 2, 3, -3], [-2, -1, 1, 2, -3, 3], [-2, -1, 1, 3, 2, -3], [-2, -1, 1, 3, -3, 2], [-2, -1, 1, -3, 2, 3], [-2, -1, 1, -3, 3, 2], [-2, -1, 2, 1, 3, -3], [-2, -1, 2, 1, -3, 3], [-2, -1, 2, 3, 1, -3], [-2, -1, 2, 3, -3, 1], [-2, -1, 2, -3, 1, 3], [-2, -1, 2, -3, 3, 1], [-2, -1, 3, 1, 2, -3], [-2, -1, 3, 1, -3, 2], [-2, -1, 3, 2, 1, -3], [-2, -1, 3, 2, -3, 1], [-2, -1, 3, -3, 1, 2], [-2, -1, 3, -3, 2, 1], [-2, -1, -3, 1, 2, 3], [-2, -1, -3, 1, 3, 2], [-2, -1, -3, 2, 1, 3], [-2, -1, -3, 2, 3, 1], [-2, -1, -3, 3, 1, 2], [-2, -1, -3, 3, 2, 1], [-2, 2, 1, -1, 3, -3], [-2, 2, 1, -1, -3, 3], [-2, 2, 1, 3, -1, -3], [-2, 2, 1, 3, -3, -1], [-2, 2, 1, -3, -1, 3], [-2, 2, 1, -3, 3, -1], [-2, 2, -1, 1, 3, -3], [-2, 2, -1, 1, -3, 3], [-2, 2, -1, 3, 1, -3], [-2, 2, -1, 3, -3, 1], [-2, 2, -1, -3, 1, 3], [-2, 2, -1, -3, 3, 1], [-2, 2, 3, 1, -1, -3], [-2, 2, 3, 1, -3, -1], [-2, 2, 3, -1, 1, -3], [-2, 2, 3, -1, -3, 1], [-2, 2, 3, -3, 1, -1], [-2, 2, 3, -3, -1, 1], [-2, 2, -3, 1, -1, 3], [-2, 2, -3, 1, 3, -1], [-2, 2, -3, -1, 1, 3], [-2, 2, -3, -1, 3, 1], [-2, 2, -3, 3, 1, -1], [-2, 2, -3, 3, -1, 1], [-2, 3, 1, -1, 2, -3], [-2, 3, 1, -1, -3, 2], [-2, 3, 1, 2, -1, -3], [-2, 3, 1, 2, -3, -1], [-2, 3, 1, -3, -1, 2], [-2, 3, 1, -3, 2, -1], [-2, 3, -1, 1, 2, -3], [-2, 3, -1, 1, -3, 2], [-2, 3, -1, 2, 1, -3], [-2, 3, -1, 2, -3, 1], [-2, 3, -1, -3, 1, 2], [-2, 3, -1, -3, 2, 1], [-2, 3, 2, 1, -1, -3], [-2, 3, 2, 1, -3, -1], [-2, 3, 2, -1, 1, -3], [-2, 3, 2, -1, -3, 1], [-2, 3, 2, -3, 1, -1], [-2, 3, 2, -3, -1, 1], [-2, 3, -3, 1, -1, 2], [-2, 3, -3, 1, 2, -1], [-2, 3, -3, -1, 1, 2], [-2, 3, -3, -1, 2, 1], [-2, 3, -3, 2, 1, -1], [-2, 3, -3, 2, -1, 1], [-2, -3, 1, -1, 2, 3], [-2, -3, 1, -1, 3, 2], [-2, -3, 1, 2, -1, 3], [-2, -3, 1, 2, 3, -1], [-2, -3, 1, 3, -1, 2], [-2, -3, 1, 3, 2, -1], [-2, -3, -1, 1, 2, 3], [-2, -3, -1, 1, 3, 2], [-2, -3, -1, 2, 1, 3], [-2, -3, -1, 2, 3, 1], [-2, -3, -1, 3, 1, 2], [-2, -3, -1, 3, 2, 1], [-2, -3, 2, 1, -1, 3], [-2, -3, 2, 1, 3, -1], [-2, -3, 2, -1, 1, 3], [-2, -3, 2, -1, 3, 1], [-2, -3, 2, 3, 1, -1], [-2, -3, 2, 3, -1, 1], [-2, -3, 3, 1, -1, 2], [-2, -3, 3, 1, 2, -1], [-2, -3, 3, -1, 1, 2], [-2, -3, 3, -1, 2, 1], [-2, -3, 3, 2, 1, -1], [-2, -3, 3, 2, -1, 1], [3, 1, -1, 2, -2, -3], [3, 1, -1, 2, -3, -2], [3, 1, -1, -2, 2, -3], [3, 1, -1, -2, -3, 2], [3, 1, -1, -3, 2, -2], [3, 1, -1, -3, -2, 2], [3, 1, 2, -1, -2, -3], [3, 1, 2, -1, -3, -2], [3, 1, 2, -2, -1, -3], [3, 1, 2, -2, -3, -1], [3, 1, 2, -3, -1, -2], [3, 1, 2, -3, -2, -1], [3, 1, -2, -1, 2, -3], [3, 1, -2, -1, -3, 2], [3, 1, -2, 2, -1, -3], [3, 1, -2, 2, -3, -1], [3, 1, -2, -3, -1, 2], [3, 1, -2, -3, 2, -1], [3, 1, -3, -1, 2, -2], [3, 1, -3, -1, -2, 2], [3, 1, -3, 2, -1, -2], [3, 1, -3, 2, -2, -1], [3, 1, -3, -2, -1, 2], [3, 1, -3, -2, 2, -1], [3, -1, 1, 2, -2, -3], [3, -1, 1, 2, -3, -2], [3, -1, 1, -2, 2, -3], [3, -1, 1, -2, -3, 2], [3, -1, 1, -3, 2, -2], [3, -1, 1, -3, -2, 2], [3, -1, 2, 1, -2, -3], [3, -1, 2, 1, -3, -2], [3, -1, 2, -2, 1, -3], [3, -1, 2, -2, -3, 1], [3, -1, 2, -3, 1, -2], [3, -1, 2, -3, -2, 1], [3, -1, -2, 1, 2, -3], [3, -1, -2, 1, -3, 2], [3, -1, -2, 2, 1, -3], [3, -1, -2, 2, -3, 1], [3, -1, -2, -3, 1, 2], [3, -1, -2, -3, 2, 1], [3, -1, -3, 1, 2, -2], [3, -1, -3, 1, -2, 2], [3, -1, -3, 2, 1, -2], [3, -1, -3, 2, -2, 1], [3, -1, -3, -2, 1, 2], [3, -1, -3, -2, 2, 1], [3, 2, 1, -1, -2, -3], [3, 2, 1, -1, -3, -2], [3, 2, 1, -2, -1, -3], [3, 2, 1, -2, -3, -1], [3, 2, 1, -3, -1, -2], [3, 2, 1, -3, -2, -1], [3, 2, -1, 1, -2, -3], [3, 2, -1, 1, -3, -2], [3, 2, -1, -2, 1, -3], [3, 2, -1, -2, -3, 1], [3, 2, -1, -3, 1, -2], [3, 2, -1, -3, -2, 1], [3, 2, -2, 1, -1, -3], [3, 2, -2, 1, -3, -1], [3, 2, -2, -1, 1, -3], [3, 2, -2, -1, -3, 1], [3, 2, -2, -3, 1, -1], [3, 2, -2, -3, -1, 1], [3, 2, -3, 1, -1, -2], [3, 2, -3, 1, -2, -1], [3, 2, -3, -1, 1, -2], [3, 2, -3, -1, -2, 1], [3, 2, -3, -2, 1, -1], [3, 2, -3, -2, -1, 1], [3, -2, 1, -1, 2, -3], [3, -2, 1, -1, -3, 2], [3, -2, 1, 2, -1, -3], [3, -2, 1, 2, -3, -1], [3, -2, 1, -3, -1, 2], [3, -2, 1, -3, 2, -1], [3, -2, -1, 1, 2, -3], [3, -2, -1, 1, -3, 2], [3, -2, -1, 2, 1, -3], [3, -2, -1, 2, -3, 1], [3, -2, -1, -3, 1, 2], [3, -2, -1, -3, 2, 1], [3, -2, 2, 1, -1, -3], [3, -2, 2, 1, -3, -1], [3, -2, 2, -1, 1, -3], [3, -2, 2, -1, -3, 1], [3, -2, 2, -3, 1, -1], [3, -2, 2, -3, -1, 1], [3, -2, -3, 1, -1, 2], [3, -2, -3, 1, 2, -1], [3, -2, -3, -1, 1, 2], [3, -2, -3, -1, 2, 1], [3, -2, -3, 2, 1, -1], [3, -2, -3, 2, -1, 1], [3, -3, 1, -1, 2, -2], [3, -3, 1, -1, -2, 2], [3, -3, 1, 2, -1, -2], [3, -3, 1, 2, -2, -1], [3, -3, 1, -2, -1, 2], [3, -3, 1, -2, 2, -1], [3, -3, -1, 1, 2, -2], [3, -3, -1, 1, -2, 2], [3, -3, -1, 2, 1, -2], [3, -3, -1, 2, -2, 1], [3, -3, -1, -2, 1, 2], [3, -3, -1, -2, 2, 1], [3, -3, 2, 1, -1, -2], [3, -3, 2, 1, -2, -1], [3, -3, 2, -1, 1, -2], [3, -3, 2, -1, -2, 1], [3, -3, 2, -2, 1, -1], [3, -3, 2, -2, -1, 1], [3, -3, -2, 1, -1, 2], [3, -3, -2, 1, 2, -1], [3, -3, -2, -1, 1, 2], [3, -3, -2, -1, 2, 1], [3, -3, -2, 2, 1, -1], [3, -3, -2, 2, -1, 1], [-3, 1, -1, 2, -2, 3], [-3, 1, -1, 2, 3, -2], [-3, 1, -1, -2, 2, 3], [-3, 1, -1, -2, 3, 2], [-3, 1, -1, 3, 2, -2], [-3, 1, -1, 3, -2, 2], [-3, 1, 2, -1, -2, 3], [-3, 1, 2, -1, 3, -2], [-3, 1, 2, -2, -1, 3], [-3, 1, 2, -2, 3, -1], [-3, 1, 2, 3, -1, -2], [-3, 1, 2, 3, -2, -1], [-3, 1, -2, -1, 2, 3], [-3, 1, -2, -1, 3, 2], [-3, 1, -2, 2, -1, 3], [-3, 1, -2, 2, 3, -1], [-3, 1, -2, 3, -1, 2], [-3, 1, -2, 3, 2, -1], [-3, 1, 3, -1, 2, -2], [-3, 1, 3, -1, -2, 2], [-3, 1, 3, 2, -1, -2], [-3, 1, 3, 2, -2, -1], [-3, 1, 3, -2, -1, 2], [-3, 1, 3, -2, 2, -1], [-3, -1, 1, 2, -2, 3], [-3, -1, 1, 2, 3, -2], [-3, -1, 1, -2, 2, 3], [-3, -1, 1, -2, 3, 2], [-3, -1, 1, 3, 2, -2], [-3, -1, 1, 3, -2, 2], [-3, -1, 2, 1, -2, 3], [-3, -1, 2, 1, 3, -2], [-3, -1, 2, -2, 1, 3], [-3, -1, 2, -2, 3, 1], [-3, -1, 2, 3, 1, -2], [-3, -1, 2, 3, -2, 1], [-3, -1, -2, 1, 2, 3], [-3, -1, -2, 1, 3, 2], [-3, -1, -2, 2, 1, 3], [-3, -1, -2, 2, 3, 1], [-3, -1, -2, 3, 1, 2], [-3, -1, -2, 3, 2, 1], [-3, -1, 3, 1, 2, -2], [-3, -1, 3, 1, -2, 2], [-3, -1, 3, 2, 1, -2], [-3, -1, 3, 2, -2, 1], [-3, -1, 3, -2, 1, 2], [-3, -1, 3, -2, 2, 1], [-3, 2, 1, -1, -2, 3], [-3, 2, 1, -1, 3, -2], [-3, 2, 1, -2, -1, 3], [-3, 2, 1, -2, 3, -1], [-3, 2, 1, 3, -1, -2], [-3, 2, 1, 3, -2, -1], [-3, 2, -1, 1, -2, 3], [-3, 2, -1, 1, 3, -2], [-3, 2, -1, -2, 1, 3], [-3, 2, -1, -2, 3, 1], [-3, 2, -1, 3, 1, -2], [-3, 2, -1, 3, -2, 1], [-3, 2, -2, 1, -1, 3], [-3, 2, -2, 1, 3, -1], [-3, 2, -2, -1, 1, 3], [-3, 2, -2, -1, 3, 1], [-3, 2, -2, 3, 1, -1], [-3, 2, -2, 3, -1, 1], [-3, 2, 3, 1, -1, -2], [-3, 2, 3, 1, -2, -1], [-3, 2, 3, -1, 1, -2], [-3, 2, 3, -1, -2, 1], [-3, 2, 3, -2, 1, -1], [-3, 2, 3, -2, -1, 1], [-3, -2, 1, -1, 2, 3], [-3, -2, 1, -1, 3, 2], [-3, -2, 1, 2, -1, 3], [-3, -2, 1, 2, 3, -1], [-3, -2, 1, 3, -1, 2], [-3, -2, 1, 3, 2, -1], [-3, -2, -1, 1, 2, 3], [-3, -2, -1, 1, 3, 2], [-3, -2, -1, 2, 1, 3], [-3, -2, -1, 2, 3, 1], [-3, -2, -1, 3, 1, 2], [-3, -2, -1, 3, 2, 1], [-3, -2, 2, 1, -1, 3], [-3, -2, 2, 1, 3, -1], [-3, -2, 2, -1, 1, 3], [-3, -2, 2, -1, 3, 1], [-3, -2, 2, 3, 1, -1], [-3, -2, 2, 3, -1, 1], [-3, -2, 3, 1, -1, 2], [-3, -2, 3, 1, 2, -1], [-3, -2, 3, -1, 1, 2], [-3, -2, 3, -1, 2, 1], [-3, -2, 3, 2, 1, -1], [-3, -2, 3, 2, -1, 1], [-3, 3, 1, -1, 2, -2], [-3, 3, 1, -1, -2, 2], [-3, 3, 1, 2, -1, -2], [-3, 3, 1, 2, -2, -1], [-3, 3, 1, -2, -1, 2], [-3, 3, 1, -2, 2, -1], [-3, 3, -1, 1, 2, -2], [-3, 3, -1, 1, -2, 2], [-3, 3, -1, 2, 1, -2], [-3, 3, -1, 2, -2, 1], [-3, 3, -1, -2, 1, 2], [-3, 3, -1, -2, 2, 1], [-3, 3, 2, 1, -1, -2], [-3, 3, 2, 1, -2, -1], [-3, 3, 2, -1, 1, -2], [-3, 3, 2, -1, -2, 1], [-3, 3, 2, -2, 1, -1], [-3, 3, 2, -2, -1, 1], [-3, 3, -2, 1, -1, 2], [-3, 3, -2, 1, 2, -1], [-3, 3, -2, -1, 1, 2], [-3, 3, -2, -1, 2, 1], [-3, 3, -2, 2, 1, -1], [-3, 3, -2, 2, -1, 1]])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1]), [[-5, -4, -3, -2, -1], [-5, -4, -3, -1, -2], [-5, -4, -2, -3, -1], [-5, -4, -2, -1, -3], [-5, -4, -1, -3, -2], [-5, -4, -1, -2, -3], [-5, -3, -4, -2, -1], [-5, -3, -4, -1, -2], [-5, -3, -2, -4, -1], [-5, -3, -2, -1, -4], [-5, -3, -1, -4, -2], [-5, -3, -1, -2, -4], [-5, -2, -4, -3, -1], [-5, -2, -4, -1, -3], [-5, -2, -3, -4, -1], [-5, -2, -3, -1, -4], [-5, -2, -1, -4, -3], [-5, -2, -1, -3, -4], [-5, -1, -4, -3, -2], [-5, -1, -4, -2, -3], [-5, -1, -3, -4, -2], [-5, -1, -3, -2, -4], [-5, -1, -2, -4, -3], [-5, -1, -2, -3, -4], [-4, -5, -3, -2, -1], [-4, -5, -3, -1, -2], [-4, -5, -2, -3, -1], [-4, -5, -2, -1, -3], [-4, -5, -1, -3, -2], [-4, -5, -1, -2, -3], [-4, -3, -5, -2, -1], [-4, -3, -5, -1, -2], [-4, -3, -2, -5, -1], [-4, -3, -2, -1, -5], [-4, -3, -1, -5, -2], [-4, -3, -1, -2, -5], [-4, -2, -5, -3, -1], [-4, -2, -5, -1, -3], [-4, -2, -3, -5, -1], [-4, -2, -3, -1, -5], [-4, -2, -1, -5, -3], [-4, -2, -1, -3, -5], [-4, -1, -5, -3, -2], [-4, -1, -5, -2, -3], [-4, -1, -3, -5, -2], [-4, -1, -3, -2, -5], [-4, -1, -2, -5, -3], [-4, -1, -2, -3, -5], [-3, -5, -4, -2, -1], [-3, -5, -4, -1, -2], [-3, -5, -2, -4, -1], [-3, -5, -2, -1, -4], [-3, -5, -1, -4, -2], [-3, -5, -1, -2, -4], [-3, -4, -5, -2, -1], [-3, -4, -5, -1, -2], [-3, -4, -2, -5, -1], [-3, -4, -2, -1, -5], [-3, -4, -1, -5, -2], [-3, -4, -1, -2, -5], [-3, -2, -5, -4, -1], [-3, -2, -5, -1, -4], [-3, -2, -4, -5, -1], [-3, -2, -4, -1, -5], [-3, -2, -1, -5, -4], [-3, -2, -1, -4, -5], [-3, -1, -5, -4, -2], [-3, -1, -5, -2, -4], [-3, -1, -4, -5, -2], [-3, -1, -4, -2, -5], [-3, -1, -2, -5, -4], [-3, -1, -2, -4, -5], [-2, -5, -4, -3, -1], [-2, -5, -4, -1, -3], [-2, -5, -3, -4, -1], [-2, -5, -3, -1, -4], [-2, -5, -1, -4, -3], [-2, -5, -1, -3, -4], [-2, -4, -5, -3, -1], [-2, -4, -5, -1, -3], [-2, -4, -3, -5, -1], [-2, -4, -3, -1, -5], [-2, -4, -1, -5, -3], [-2, -4, -1, -3, -5], [-2, -3, -5, -4, -1], [-2, -3, -5, -1, -4], [-2, -3, -4, -5, -1], [-2, -3, -4, -1, -5], [-2, -3, -1, -5, -4], [-2, -3, -1, -4, -5], [-2, -1, -5, -4, -3], [-2, -1, -5, -3, -4], [-2, -1, -4, -5, -3], [-2, -1, -4, -3, -5], [-2, -1, -3, -5, -4], [-2, -1, -3, -4, -5], [-1, -5, -4, -3, -2], [-1, -5, -4, -2, -3], [-1, -5, -3, -4, -2], [-1, -5, -3, -2, -4], [-1, -5, -2, -4, -3], [-1, -5, -2, -3, -4], [-1, -4, -5, -3, -2], [-1, -4, -5, -2, -3], [-1, -4, -3, -5, -2], [-1, -4, -3, -2, -5], [-1, -4, -2, -5, -3], [-1, -4, -2, -3, -5], [-1, -3, -5, -4, -2], [-1, -3, -5, -2, -4], [-1, -3, -4, -5, -2], [-1, -3, -4, -2, -5], [-1, -3, -2, -5, -4], [-1, -3, -2, -4, -5], [-1, -2, -5, -4, -3], [-1, -2, -5, -3, -4], [-1, -2, -4, -5, -3], [-1, -2, -4, -3, -5], [-1, -2, -3, -5, -4], [-1, -2, -3, -4, -5]])\n assert answers_match(candidate(nums=[-5, -3, -1, -4, -2]), [[-5, -3, -1, -4, -2], [-5, -3, -1, -2, -4], [-5, -3, -4, -1, -2], [-5, -3, -4, -2, -1], [-5, -3, -2, -1, -4], [-5, -3, -2, -4, -1], [-5, -1, -3, -4, -2], [-5, -1, -3, -2, -4], [-5, -1, -4, -3, -2], [-5, -1, -4, -2, -3], [-5, -1, -2, -3, -4], [-5, -1, -2, -4, -3], [-5, -4, -3, -1, -2], [-5, -4, -3, -2, -1], [-5, -4, -1, -3, -2], [-5, -4, -1, -2, -3], [-5, -4, -2, -3, -1], [-5, -4, -2, -1, -3], [-5, -2, -3, -1, -4], [-5, -2, -3, -4, -1], [-5, -2, -1, -3, -4], [-5, -2, -1, -4, -3], [-5, -2, -4, -3, -1], [-5, -2, -4, -1, -3], [-3, -5, -1, -4, -2], [-3, -5, -1, -2, -4], [-3, -5, -4, -1, -2], [-3, -5, -4, -2, -1], [-3, -5, -2, -1, -4], [-3, -5, -2, -4, -1], [-3, -1, -5, -4, -2], [-3, -1, -5, -2, -4], [-3, -1, -4, -5, -2], [-3, -1, -4, -2, -5], [-3, -1, -2, -5, -4], [-3, -1, -2, -4, -5], [-3, -4, -5, -1, -2], [-3, -4, -5, -2, -1], [-3, -4, -1, -5, -2], [-3, -4, -1, -2, -5], [-3, -4, -2, -5, -1], [-3, -4, -2, -1, -5], [-3, -2, -5, -1, -4], [-3, -2, -5, -4, -1], [-3, -2, -1, -5, -4], [-3, -2, -1, -4, -5], [-3, -2, -4, -5, -1], [-3, -2, -4, -1, -5], [-1, -5, -3, -4, -2], [-1, -5, -3, -2, -4], [-1, -5, -4, -3, -2], [-1, -5, -4, -2, -3], [-1, -5, -2, -3, -4], [-1, -5, -2, -4, -3], [-1, -3, -5, -4, -2], [-1, -3, -5, -2, -4], [-1, -3, -4, -5, -2], [-1, -3, -4, -2, -5], [-1, -3, -2, -5, -4], [-1, -3, -2, -4, -5], [-1, -4, -5, -3, -2], [-1, -4, -5, -2, -3], [-1, -4, -3, -5, -2], [-1, -4, -3, -2, -5], [-1, -4, -2, -5, -3], [-1, -4, -2, -3, -5], [-1, -2, -5, -3, -4], [-1, -2, -5, -4, -3], [-1, -2, -3, -5, -4], [-1, -2, -3, -4, -5], [-1, -2, -4, -5, -3], [-1, -2, -4, -3, -5], [-4, -5, -3, -1, -2], [-4, -5, -3, -2, -1], [-4, -5, -1, -3, -2], [-4, -5, -1, -2, -3], [-4, -5, -2, -3, -1], [-4, -5, -2, -1, -3], [-4, -3, -5, -1, -2], [-4, -3, -5, -2, -1], [-4, -3, -1, -5, -2], [-4, -3, -1, -2, -5], [-4, -3, -2, -5, -1], [-4, -3, -2, -1, -5], [-4, -1, -5, -3, -2], [-4, -1, -5, -2, -3], [-4, -1, -3, -5, -2], [-4, -1, -3, -2, -5], [-4, -1, -2, -5, -3], [-4, -1, -2, -3, -5], [-4, -2, -5, -3, -1], [-4, -2, -5, -1, -3], [-4, -2, -3, -5, -1], [-4, -2, -3, -1, -5], [-4, -2, -1, -5, -3], [-4, -2, -1, -3, -5], [-2, -5, -3, -1, -4], [-2, -5, -3, -4, -1], [-2, -5, -1, -3, -4], [-2, -5, -1, -4, -3], [-2, -5, -4, -3, -1], [-2, -5, -4, -1, -3], [-2, -3, -5, -1, -4], [-2, -3, -5, -4, -1], [-2, -3, -1, -5, -4], [-2, -3, -1, -4, -5], [-2, -3, -4, -5, -1], [-2, -3, -4, -1, -5], [-2, -1, -5, -3, -4], [-2, -1, -5, -4, -3], [-2, -1, -3, -5, -4], [-2, -1, -3, -4, -5], [-2, -1, -4, -5, -3], [-2, -1, -4, -3, -5], [-2, -4, -5, -3, -1], [-2, -4, -5, -1, -3], [-2, -4, -3, -5, -1], [-2, -4, -3, -1, -5], [-2, -4, -1, -5, -3], [-2, -4, -1, -3, -5]])\n assert answers_match(candidate(nums=[-5, 0, 5, 10]), [[-5, 0, 5, 10], [-5, 0, 10, 5], [-5, 5, 0, 10], [-5, 5, 10, 0], [-5, 10, 0, 5], [-5, 10, 5, 0], [0, -5, 5, 10], [0, -5, 10, 5], [0, 5, -5, 10], [0, 5, 10, -5], [0, 10, -5, 5], [0, 10, 5, -5], [5, -5, 0, 10], [5, -5, 10, 0], [5, 0, -5, 10], [5, 0, 10, -5], [5, 10, -5, 0], [5, 10, 0, -5], [10, -5, 0, 5], [10, -5, 5, 0], [10, 0, -5, 5], [10, 0, 5, -5], [10, 5, -5, 0], [10, 5, 0, -5]])\n assert answers_match(candidate(nums=[-1, 0, 1]), [[-1, 0, 1], [-1, 1, 0], [0, -1, 1], [0, 1, -1], [1, -1, 0], [1, 0, -1]])\n assert answers_match(candidate(nums=[6, 5, 4, 3, 2, 1]), [[6, 5, 4, 3, 2, 1], [6, 5, 4, 3, 1, 2], [6, 5, 4, 2, 3, 1], [6, 5, 4, 2, 1, 3], [6, 5, 4, 1, 3, 2], [6, 5, 4, 1, 2, 3], [6, 5, 3, 4, 2, 1], [6, 5, 3, 4, 1, 2], [6, 5, 3, 2, 4, 1], [6, 5, 3, 2, 1, 4], [6, 5, 3, 1, 4, 2], [6, 5, 3, 1, 2, 4], [6, 5, 2, 4, 3, 1], [6, 5, 2, 4, 1, 3], [6, 5, 2, 3, 4, 1], [6, 5, 2, 3, 1, 4], [6, 5, 2, 1, 4, 3], [6, 5, 2, 1, 3, 4], [6, 5, 1, 4, 3, 2], [6, 5, 1, 4, 2, 3], [6, 5, 1, 3, 4, 2], [6, 5, 1, 3, 2, 4], [6, 5, 1, 2, 4, 3], [6, 5, 1, 2, 3, 4], [6, 4, 5, 3, 2, 1], [6, 4, 5, 3, 1, 2], [6, 4, 5, 2, 3, 1], [6, 4, 5, 2, 1, 3], [6, 4, 5, 1, 3, 2], [6, 4, 5, 1, 2, 3], [6, 4, 3, 5, 2, 1], [6, 4, 3, 5, 1, 2], [6, 4, 3, 2, 5, 1], [6, 4, 3, 2, 1, 5], [6, 4, 3, 1, 5, 2], [6, 4, 3, 1, 2, 5], [6, 4, 2, 5, 3, 1], [6, 4, 2, 5, 1, 3], [6, 4, 2, 3, 5, 1], [6, 4, 2, 3, 1, 5], [6, 4, 2, 1, 5, 3], [6, 4, 2, 1, 3, 5], [6, 4, 1, 5, 3, 2], [6, 4, 1, 5, 2, 3], [6, 4, 1, 3, 5, 2], [6, 4, 1, 3, 2, 5], [6, 4, 1, 2, 5, 3], [6, 4, 1, 2, 3, 5], [6, 3, 5, 4, 2, 1], [6, 3, 5, 4, 1, 2], [6, 3, 5, 2, 4, 1], [6, 3, 5, 2, 1, 4], [6, 3, 5, 1, 4, 2], [6, 3, 5, 1, 2, 4], [6, 3, 4, 5, 2, 1], [6, 3, 4, 5, 1, 2], [6, 3, 4, 2, 5, 1], [6, 3, 4, 2, 1, 5], [6, 3, 4, 1, 5, 2], [6, 3, 4, 1, 2, 5], [6, 3, 2, 5, 4, 1], [6, 3, 2, 5, 1, 4], [6, 3, 2, 4, 5, 1], [6, 3, 2, 4, 1, 5], [6, 3, 2, 1, 5, 4], [6, 3, 2, 1, 4, 5], [6, 3, 1, 5, 4, 2], [6, 3, 1, 5, 2, 4], [6, 3, 1, 4, 5, 2], [6, 3, 1, 4, 2, 5], [6, 3, 1, 2, 5, 4], [6, 3, 1, 2, 4, 5], [6, 2, 5, 4, 3, 1], [6, 2, 5, 4, 1, 3], [6, 2, 5, 3, 4, 1], [6, 2, 5, 3, 1, 4], [6, 2, 5, 1, 4, 3], [6, 2, 5, 1, 3, 4], [6, 2, 4, 5, 3, 1], [6, 2, 4, 5, 1, 3], [6, 2, 4, 3, 5, 1], [6, 2, 4, 3, 1, 5], [6, 2, 4, 1, 5, 3], [6, 2, 4, 1, 3, 5], [6, 2, 3, 5, 4, 1], [6, 2, 3, 5, 1, 4], [6, 2, 3, 4, 5, 1], [6, 2, 3, 4, 1, 5], [6, 2, 3, 1, 5, 4], [6, 2, 3, 1, 4, 5], [6, 2, 1, 5, 4, 3], [6, 2, 1, 5, 3, 4], [6, 2, 1, 4, 5, 3], [6, 2, 1, 4, 3, 5], [6, 2, 1, 3, 5, 4], [6, 2, 1, 3, 4, 5], [6, 1, 5, 4, 3, 2], [6, 1, 5, 4, 2, 3], [6, 1, 5, 3, 4, 2], [6, 1, 5, 3, 2, 4], [6, 1, 5, 2, 4, 3], [6, 1, 5, 2, 3, 4], [6, 1, 4, 5, 3, 2], [6, 1, 4, 5, 2, 3], [6, 1, 4, 3, 5, 2], [6, 1, 4, 3, 2, 5], [6, 1, 4, 2, 5, 3], [6, 1, 4, 2, 3, 5], [6, 1, 3, 5, 4, 2], [6, 1, 3, 5, 2, 4], [6, 1, 3, 4, 5, 2], [6, 1, 3, 4, 2, 5], [6, 1, 3, 2, 5, 4], [6, 1, 3, 2, 4, 5], [6, 1, 2, 5, 4, 3], [6, 1, 2, 5, 3, 4], [6, 1, 2, 4, 5, 3], [6, 1, 2, 4, 3, 5], [6, 1, 2, 3, 5, 4], [6, 1, 2, 3, 4, 5], [5, 6, 4, 3, 2, 1], [5, 6, 4, 3, 1, 2], [5, 6, 4, 2, 3, 1], [5, 6, 4, 2, 1, 3], [5, 6, 4, 1, 3, 2], [5, 6, 4, 1, 2, 3], [5, 6, 3, 4, 2, 1], [5, 6, 3, 4, 1, 2], [5, 6, 3, 2, 4, 1], [5, 6, 3, 2, 1, 4], [5, 6, 3, 1, 4, 2], [5, 6, 3, 1, 2, 4], [5, 6, 2, 4, 3, 1], [5, 6, 2, 4, 1, 3], [5, 6, 2, 3, 4, 1], [5, 6, 2, 3, 1, 4], [5, 6, 2, 1, 4, 3], [5, 6, 2, 1, 3, 4], [5, 6, 1, 4, 3, 2], [5, 6, 1, 4, 2, 3], [5, 6, 1, 3, 4, 2], [5, 6, 1, 3, 2, 4], [5, 6, 1, 2, 4, 3], [5, 6, 1, 2, 3, 4], [5, 4, 6, 3, 2, 1], [5, 4, 6, 3, 1, 2], [5, 4, 6, 2, 3, 1], [5, 4, 6, 2, 1, 3], [5, 4, 6, 1, 3, 2], [5, 4, 6, 1, 2, 3], [5, 4, 3, 6, 2, 1], [5, 4, 3, 6, 1, 2], [5, 4, 3, 2, 6, 1], [5, 4, 3, 2, 1, 6], [5, 4, 3, 1, 6, 2], [5, 4, 3, 1, 2, 6], [5, 4, 2, 6, 3, 1], [5, 4, 2, 6, 1, 3], [5, 4, 2, 3, 6, 1], [5, 4, 2, 3, 1, 6], [5, 4, 2, 1, 6, 3], [5, 4, 2, 1, 3, 6], [5, 4, 1, 6, 3, 2], [5, 4, 1, 6, 2, 3], [5, 4, 1, 3, 6, 2], [5, 4, 1, 3, 2, 6], [5, 4, 1, 2, 6, 3], [5, 4, 1, 2, 3, 6], [5, 3, 6, 4, 2, 1], [5, 3, 6, 4, 1, 2], [5, 3, 6, 2, 4, 1], [5, 3, 6, 2, 1, 4], [5, 3, 6, 1, 4, 2], [5, 3, 6, 1, 2, 4], [5, 3, 4, 6, 2, 1], [5, 3, 4, 6, 1, 2], [5, 3, 4, 2, 6, 1], [5, 3, 4, 2, 1, 6], [5, 3, 4, 1, 6, 2], [5, 3, 4, 1, 2, 6], [5, 3, 2, 6, 4, 1], [5, 3, 2, 6, 1, 4], [5, 3, 2, 4, 6, 1], [5, 3, 2, 4, 1, 6], [5, 3, 2, 1, 6, 4], [5, 3, 2, 1, 4, 6], [5, 3, 1, 6, 4, 2], [5, 3, 1, 6, 2, 4], [5, 3, 1, 4, 6, 2], [5, 3, 1, 4, 2, 6], [5, 3, 1, 2, 6, 4], [5, 3, 1, 2, 4, 6], [5, 2, 6, 4, 3, 1], [5, 2, 6, 4, 1, 3], [5, 2, 6, 3, 4, 1], [5, 2, 6, 3, 1, 4], [5, 2, 6, 1, 4, 3], [5, 2, 6, 1, 3, 4], [5, 2, 4, 6, 3, 1], [5, 2, 4, 6, 1, 3], [5, 2, 4, 3, 6, 1], [5, 2, 4, 3, 1, 6], [5, 2, 4, 1, 6, 3], [5, 2, 4, 1, 3, 6], [5, 2, 3, 6, 4, 1], [5, 2, 3, 6, 1, 4], [5, 2, 3, 4, 6, 1], [5, 2, 3, 4, 1, 6], [5, 2, 3, 1, 6, 4], [5, 2, 3, 1, 4, 6], [5, 2, 1, 6, 4, 3], [5, 2, 1, 6, 3, 4], [5, 2, 1, 4, 6, 3], [5, 2, 1, 4, 3, 6], [5, 2, 1, 3, 6, 4], [5, 2, 1, 3, 4, 6], [5, 1, 6, 4, 3, 2], [5, 1, 6, 4, 2, 3], [5, 1, 6, 3, 4, 2], [5, 1, 6, 3, 2, 4], [5, 1, 6, 2, 4, 3], [5, 1, 6, 2, 3, 4], [5, 1, 4, 6, 3, 2], [5, 1, 4, 6, 2, 3], [5, 1, 4, 3, 6, 2], [5, 1, 4, 3, 2, 6], [5, 1, 4, 2, 6, 3], [5, 1, 4, 2, 3, 6], [5, 1, 3, 6, 4, 2], [5, 1, 3, 6, 2, 4], [5, 1, 3, 4, 6, 2], [5, 1, 3, 4, 2, 6], [5, 1, 3, 2, 6, 4], [5, 1, 3, 2, 4, 6], [5, 1, 2, 6, 4, 3], [5, 1, 2, 6, 3, 4], [5, 1, 2, 4, 6, 3], [5, 1, 2, 4, 3, 6], [5, 1, 2, 3, 6, 4], [5, 1, 2, 3, 4, 6], [4, 6, 5, 3, 2, 1], [4, 6, 5, 3, 1, 2], [4, 6, 5, 2, 3, 1], [4, 6, 5, 2, 1, 3], [4, 6, 5, 1, 3, 2], [4, 6, 5, 1, 2, 3], [4, 6, 3, 5, 2, 1], [4, 6, 3, 5, 1, 2], [4, 6, 3, 2, 5, 1], [4, 6, 3, 2, 1, 5], [4, 6, 3, 1, 5, 2], [4, 6, 3, 1, 2, 5], [4, 6, 2, 5, 3, 1], [4, 6, 2, 5, 1, 3], [4, 6, 2, 3, 5, 1], [4, 6, 2, 3, 1, 5], [4, 6, 2, 1, 5, 3], [4, 6, 2, 1, 3, 5], [4, 6, 1, 5, 3, 2], [4, 6, 1, 5, 2, 3], [4, 6, 1, 3, 5, 2], [4, 6, 1, 3, 2, 5], [4, 6, 1, 2, 5, 3], [4, 6, 1, 2, 3, 5], [4, 5, 6, 3, 2, 1], [4, 5, 6, 3, 1, 2], [4, 5, 6, 2, 3, 1], [4, 5, 6, 2, 1, 3], [4, 5, 6, 1, 3, 2], [4, 5, 6, 1, 2, 3], [4, 5, 3, 6, 2, 1], [4, 5, 3, 6, 1, 2], [4, 5, 3, 2, 6, 1], [4, 5, 3, 2, 1, 6], [4, 5, 3, 1, 6, 2], [4, 5, 3, 1, 2, 6], [4, 5, 2, 6, 3, 1], [4, 5, 2, 6, 1, 3], [4, 5, 2, 3, 6, 1], [4, 5, 2, 3, 1, 6], [4, 5, 2, 1, 6, 3], [4, 5, 2, 1, 3, 6], [4, 5, 1, 6, 3, 2], [4, 5, 1, 6, 2, 3], [4, 5, 1, 3, 6, 2], [4, 5, 1, 3, 2, 6], [4, 5, 1, 2, 6, 3], [4, 5, 1, 2, 3, 6], [4, 3, 6, 5, 2, 1], [4, 3, 6, 5, 1, 2], [4, 3, 6, 2, 5, 1], [4, 3, 6, 2, 1, 5], [4, 3, 6, 1, 5, 2], [4, 3, 6, 1, 2, 5], [4, 3, 5, 6, 2, 1], [4, 3, 5, 6, 1, 2], [4, 3, 5, 2, 6, 1], [4, 3, 5, 2, 1, 6], [4, 3, 5, 1, 6, 2], [4, 3, 5, 1, 2, 6], [4, 3, 2, 6, 5, 1], [4, 3, 2, 6, 1, 5], [4, 3, 2, 5, 6, 1], [4, 3, 2, 5, 1, 6], [4, 3, 2, 1, 6, 5], [4, 3, 2, 1, 5, 6], [4, 3, 1, 6, 5, 2], [4, 3, 1, 6, 2, 5], [4, 3, 1, 5, 6, 2], [4, 3, 1, 5, 2, 6], [4, 3, 1, 2, 6, 5], [4, 3, 1, 2, 5, 6], [4, 2, 6, 5, 3, 1], [4, 2, 6, 5, 1, 3], [4, 2, 6, 3, 5, 1], [4, 2, 6, 3, 1, 5], [4, 2, 6, 1, 5, 3], [4, 2, 6, 1, 3, 5], [4, 2, 5, 6, 3, 1], [4, 2, 5, 6, 1, 3], [4, 2, 5, 3, 6, 1], [4, 2, 5, 3, 1, 6], [4, 2, 5, 1, 6, 3], [4, 2, 5, 1, 3, 6], [4, 2, 3, 6, 5, 1], [4, 2, 3, 6, 1, 5], [4, 2, 3, 5, 6, 1], [4, 2, 3, 5, 1, 6], [4, 2, 3, 1, 6, 5], [4, 2, 3, 1, 5, 6], [4, 2, 1, 6, 5, 3], [4, 2, 1, 6, 3, 5], [4, 2, 1, 5, 6, 3], [4, 2, 1, 5, 3, 6], [4, 2, 1, 3, 6, 5], [4, 2, 1, 3, 5, 6], [4, 1, 6, 5, 3, 2], [4, 1, 6, 5, 2, 3], [4, 1, 6, 3, 5, 2], [4, 1, 6, 3, 2, 5], [4, 1, 6, 2, 5, 3], [4, 1, 6, 2, 3, 5], [4, 1, 5, 6, 3, 2], [4, 1, 5, 6, 2, 3], [4, 1, 5, 3, 6, 2], [4, 1, 5, 3, 2, 6], [4, 1, 5, 2, 6, 3], [4, 1, 5, 2, 3, 6], [4, 1, 3, 6, 5, 2], [4, 1, 3, 6, 2, 5], [4, 1, 3, 5, 6, 2], [4, 1, 3, 5, 2, 6], [4, 1, 3, 2, 6, 5], [4, 1, 3, 2, 5, 6], [4, 1, 2, 6, 5, 3], [4, 1, 2, 6, 3, 5], [4, 1, 2, 5, 6, 3], [4, 1, 2, 5, 3, 6], [4, 1, 2, 3, 6, 5], [4, 1, 2, 3, 5, 6], [3, 6, 5, 4, 2, 1], [3, 6, 5, 4, 1, 2], [3, 6, 5, 2, 4, 1], [3, 6, 5, 2, 1, 4], [3, 6, 5, 1, 4, 2], [3, 6, 5, 1, 2, 4], [3, 6, 4, 5, 2, 1], [3, 6, 4, 5, 1, 2], [3, 6, 4, 2, 5, 1], [3, 6, 4, 2, 1, 5], [3, 6, 4, 1, 5, 2], [3, 6, 4, 1, 2, 5], [3, 6, 2, 5, 4, 1], [3, 6, 2, 5, 1, 4], [3, 6, 2, 4, 5, 1], [3, 6, 2, 4, 1, 5], [3, 6, 2, 1, 5, 4], [3, 6, 2, 1, 4, 5], [3, 6, 1, 5, 4, 2], [3, 6, 1, 5, 2, 4], [3, 6, 1, 4, 5, 2], [3, 6, 1, 4, 2, 5], [3, 6, 1, 2, 5, 4], [3, 6, 1, 2, 4, 5], [3, 5, 6, 4, 2, 1], [3, 5, 6, 4, 1, 2], [3, 5, 6, 2, 4, 1], [3, 5, 6, 2, 1, 4], [3, 5, 6, 1, 4, 2], [3, 5, 6, 1, 2, 4], [3, 5, 4, 6, 2, 1], [3, 5, 4, 6, 1, 2], [3, 5, 4, 2, 6, 1], [3, 5, 4, 2, 1, 6], [3, 5, 4, 1, 6, 2], [3, 5, 4, 1, 2, 6], [3, 5, 2, 6, 4, 1], [3, 5, 2, 6, 1, 4], [3, 5, 2, 4, 6, 1], [3, 5, 2, 4, 1, 6], [3, 5, 2, 1, 6, 4], [3, 5, 2, 1, 4, 6], [3, 5, 1, 6, 4, 2], [3, 5, 1, 6, 2, 4], [3, 5, 1, 4, 6, 2], [3, 5, 1, 4, 2, 6], [3, 5, 1, 2, 6, 4], [3, 5, 1, 2, 4, 6], [3, 4, 6, 5, 2, 1], [3, 4, 6, 5, 1, 2], [3, 4, 6, 2, 5, 1], [3, 4, 6, 2, 1, 5], [3, 4, 6, 1, 5, 2], [3, 4, 6, 1, 2, 5], [3, 4, 5, 6, 2, 1], [3, 4, 5, 6, 1, 2], [3, 4, 5, 2, 6, 1], [3, 4, 5, 2, 1, 6], [3, 4, 5, 1, 6, 2], [3, 4, 5, 1, 2, 6], [3, 4, 2, 6, 5, 1], [3, 4, 2, 6, 1, 5], [3, 4, 2, 5, 6, 1], [3, 4, 2, 5, 1, 6], [3, 4, 2, 1, 6, 5], [3, 4, 2, 1, 5, 6], [3, 4, 1, 6, 5, 2], [3, 4, 1, 6, 2, 5], [3, 4, 1, 5, 6, 2], [3, 4, 1, 5, 2, 6], [3, 4, 1, 2, 6, 5], [3, 4, 1, 2, 5, 6], [3, 2, 6, 5, 4, 1], [3, 2, 6, 5, 1, 4], [3, 2, 6, 4, 5, 1], [3, 2, 6, 4, 1, 5], [3, 2, 6, 1, 5, 4], [3, 2, 6, 1, 4, 5], [3, 2, 5, 6, 4, 1], [3, 2, 5, 6, 1, 4], [3, 2, 5, 4, 6, 1], [3, 2, 5, 4, 1, 6], [3, 2, 5, 1, 6, 4], [3, 2, 5, 1, 4, 6], [3, 2, 4, 6, 5, 1], [3, 2, 4, 6, 1, 5], [3, 2, 4, 5, 6, 1], [3, 2, 4, 5, 1, 6], [3, 2, 4, 1, 6, 5], [3, 2, 4, 1, 5, 6], [3, 2, 1, 6, 5, 4], [3, 2, 1, 6, 4, 5], [3, 2, 1, 5, 6, 4], [3, 2, 1, 5, 4, 6], [3, 2, 1, 4, 6, 5], [3, 2, 1, 4, 5, 6], [3, 1, 6, 5, 4, 2], [3, 1, 6, 5, 2, 4], [3, 1, 6, 4, 5, 2], [3, 1, 6, 4, 2, 5], [3, 1, 6, 2, 5, 4], [3, 1, 6, 2, 4, 5], [3, 1, 5, 6, 4, 2], [3, 1, 5, 6, 2, 4], [3, 1, 5, 4, 6, 2], [3, 1, 5, 4, 2, 6], [3, 1, 5, 2, 6, 4], [3, 1, 5, 2, 4, 6], [3, 1, 4, 6, 5, 2], [3, 1, 4, 6, 2, 5], [3, 1, 4, 5, 6, 2], [3, 1, 4, 5, 2, 6], [3, 1, 4, 2, 6, 5], [3, 1, 4, 2, 5, 6], [3, 1, 2, 6, 5, 4], [3, 1, 2, 6, 4, 5], [3, 1, 2, 5, 6, 4], [3, 1, 2, 5, 4, 6], [3, 1, 2, 4, 6, 5], [3, 1, 2, 4, 5, 6], [2, 6, 5, 4, 3, 1], [2, 6, 5, 4, 1, 3], [2, 6, 5, 3, 4, 1], [2, 6, 5, 3, 1, 4], [2, 6, 5, 1, 4, 3], [2, 6, 5, 1, 3, 4], [2, 6, 4, 5, 3, 1], [2, 6, 4, 5, 1, 3], [2, 6, 4, 3, 5, 1], [2, 6, 4, 3, 1, 5], [2, 6, 4, 1, 5, 3], [2, 6, 4, 1, 3, 5], [2, 6, 3, 5, 4, 1], [2, 6, 3, 5, 1, 4], [2, 6, 3, 4, 5, 1], [2, 6, 3, 4, 1, 5], [2, 6, 3, 1, 5, 4], [2, 6, 3, 1, 4, 5], [2, 6, 1, 5, 4, 3], [2, 6, 1, 5, 3, 4], [2, 6, 1, 4, 5, 3], [2, 6, 1, 4, 3, 5], [2, 6, 1, 3, 5, 4], [2, 6, 1, 3, 4, 5], [2, 5, 6, 4, 3, 1], [2, 5, 6, 4, 1, 3], [2, 5, 6, 3, 4, 1], [2, 5, 6, 3, 1, 4], [2, 5, 6, 1, 4, 3], [2, 5, 6, 1, 3, 4], [2, 5, 4, 6, 3, 1], [2, 5, 4, 6, 1, 3], [2, 5, 4, 3, 6, 1], [2, 5, 4, 3, 1, 6], [2, 5, 4, 1, 6, 3], [2, 5, 4, 1, 3, 6], [2, 5, 3, 6, 4, 1], [2, 5, 3, 6, 1, 4], [2, 5, 3, 4, 6, 1], [2, 5, 3, 4, 1, 6], [2, 5, 3, 1, 6, 4], [2, 5, 3, 1, 4, 6], [2, 5, 1, 6, 4, 3], [2, 5, 1, 6, 3, 4], [2, 5, 1, 4, 6, 3], [2, 5, 1, 4, 3, 6], [2, 5, 1, 3, 6, 4], [2, 5, 1, 3, 4, 6], [2, 4, 6, 5, 3, 1], [2, 4, 6, 5, 1, 3], [2, 4, 6, 3, 5, 1], [2, 4, 6, 3, 1, 5], [2, 4, 6, 1, 5, 3], [2, 4, 6, 1, 3, 5], [2, 4, 5, 6, 3, 1], [2, 4, 5, 6, 1, 3], [2, 4, 5, 3, 6, 1], [2, 4, 5, 3, 1, 6], [2, 4, 5, 1, 6, 3], [2, 4, 5, 1, 3, 6], [2, 4, 3, 6, 5, 1], [2, 4, 3, 6, 1, 5], [2, 4, 3, 5, 6, 1], [2, 4, 3, 5, 1, 6], [2, 4, 3, 1, 6, 5], [2, 4, 3, 1, 5, 6], [2, 4, 1, 6, 5, 3], [2, 4, 1, 6, 3, 5], [2, 4, 1, 5, 6, 3], [2, 4, 1, 5, 3, 6], [2, 4, 1, 3, 6, 5], [2, 4, 1, 3, 5, 6], [2, 3, 6, 5, 4, 1], [2, 3, 6, 5, 1, 4], [2, 3, 6, 4, 5, 1], [2, 3, 6, 4, 1, 5], [2, 3, 6, 1, 5, 4], [2, 3, 6, 1, 4, 5], [2, 3, 5, 6, 4, 1], [2, 3, 5, 6, 1, 4], [2, 3, 5, 4, 6, 1], [2, 3, 5, 4, 1, 6], [2, 3, 5, 1, 6, 4], [2, 3, 5, 1, 4, 6], [2, 3, 4, 6, 5, 1], [2, 3, 4, 6, 1, 5], [2, 3, 4, 5, 6, 1], [2, 3, 4, 5, 1, 6], [2, 3, 4, 1, 6, 5], [2, 3, 4, 1, 5, 6], [2, 3, 1, 6, 5, 4], [2, 3, 1, 6, 4, 5], [2, 3, 1, 5, 6, 4], [2, 3, 1, 5, 4, 6], [2, 3, 1, 4, 6, 5], [2, 3, 1, 4, 5, 6], [2, 1, 6, 5, 4, 3], [2, 1, 6, 5, 3, 4], [2, 1, 6, 4, 5, 3], [2, 1, 6, 4, 3, 5], [2, 1, 6, 3, 5, 4], [2, 1, 6, 3, 4, 5], [2, 1, 5, 6, 4, 3], [2, 1, 5, 6, 3, 4], [2, 1, 5, 4, 6, 3], [2, 1, 5, 4, 3, 6], [2, 1, 5, 3, 6, 4], [2, 1, 5, 3, 4, 6], [2, 1, 4, 6, 5, 3], [2, 1, 4, 6, 3, 5], [2, 1, 4, 5, 6, 3], [2, 1, 4, 5, 3, 6], [2, 1, 4, 3, 6, 5], [2, 1, 4, 3, 5, 6], [2, 1, 3, 6, 5, 4], [2, 1, 3, 6, 4, 5], [2, 1, 3, 5, 6, 4], [2, 1, 3, 5, 4, 6], [2, 1, 3, 4, 6, 5], [2, 1, 3, 4, 5, 6], [1, 6, 5, 4, 3, 2], [1, 6, 5, 4, 2, 3], [1, 6, 5, 3, 4, 2], [1, 6, 5, 3, 2, 4], [1, 6, 5, 2, 4, 3], [1, 6, 5, 2, 3, 4], [1, 6, 4, 5, 3, 2], [1, 6, 4, 5, 2, 3], [1, 6, 4, 3, 5, 2], [1, 6, 4, 3, 2, 5], [1, 6, 4, 2, 5, 3], [1, 6, 4, 2, 3, 5], [1, 6, 3, 5, 4, 2], [1, 6, 3, 5, 2, 4], [1, 6, 3, 4, 5, 2], [1, 6, 3, 4, 2, 5], [1, 6, 3, 2, 5, 4], [1, 6, 3, 2, 4, 5], [1, 6, 2, 5, 4, 3], [1, 6, 2, 5, 3, 4], [1, 6, 2, 4, 5, 3], [1, 6, 2, 4, 3, 5], [1, 6, 2, 3, 5, 4], [1, 6, 2, 3, 4, 5], [1, 5, 6, 4, 3, 2], [1, 5, 6, 4, 2, 3], [1, 5, 6, 3, 4, 2], [1, 5, 6, 3, 2, 4], [1, 5, 6, 2, 4, 3], [1, 5, 6, 2, 3, 4], [1, 5, 4, 6, 3, 2], [1, 5, 4, 6, 2, 3], [1, 5, 4, 3, 6, 2], [1, 5, 4, 3, 2, 6], [1, 5, 4, 2, 6, 3], [1, 5, 4, 2, 3, 6], [1, 5, 3, 6, 4, 2], [1, 5, 3, 6, 2, 4], [1, 5, 3, 4, 6, 2], [1, 5, 3, 4, 2, 6], [1, 5, 3, 2, 6, 4], [1, 5, 3, 2, 4, 6], [1, 5, 2, 6, 4, 3], [1, 5, 2, 6, 3, 4], [1, 5, 2, 4, 6, 3], [1, 5, 2, 4, 3, 6], [1, 5, 2, 3, 6, 4], [1, 5, 2, 3, 4, 6], [1, 4, 6, 5, 3, 2], [1, 4, 6, 5, 2, 3], [1, 4, 6, 3, 5, 2], [1, 4, 6, 3, 2, 5], [1, 4, 6, 2, 5, 3], [1, 4, 6, 2, 3, 5], [1, 4, 5, 6, 3, 2], [1, 4, 5, 6, 2, 3], [1, 4, 5, 3, 6, 2], [1, 4, 5, 3, 2, 6], [1, 4, 5, 2, 6, 3], [1, 4, 5, 2, 3, 6], [1, 4, 3, 6, 5, 2], [1, 4, 3, 6, 2, 5], [1, 4, 3, 5, 6, 2], [1, 4, 3, 5, 2, 6], [1, 4, 3, 2, 6, 5], [1, 4, 3, 2, 5, 6], [1, 4, 2, 6, 5, 3], [1, 4, 2, 6, 3, 5], [1, 4, 2, 5, 6, 3], [1, 4, 2, 5, 3, 6], [1, 4, 2, 3, 6, 5], [1, 4, 2, 3, 5, 6], [1, 3, 6, 5, 4, 2], [1, 3, 6, 5, 2, 4], [1, 3, 6, 4, 5, 2], [1, 3, 6, 4, 2, 5], [1, 3, 6, 2, 5, 4], [1, 3, 6, 2, 4, 5], [1, 3, 5, 6, 4, 2], [1, 3, 5, 6, 2, 4], [1, 3, 5, 4, 6, 2], [1, 3, 5, 4, 2, 6], [1, 3, 5, 2, 6, 4], [1, 3, 5, 2, 4, 6], [1, 3, 4, 6, 5, 2], [1, 3, 4, 6, 2, 5], [1, 3, 4, 5, 6, 2], [1, 3, 4, 5, 2, 6], [1, 3, 4, 2, 6, 5], [1, 3, 4, 2, 5, 6], [1, 3, 2, 6, 5, 4], [1, 3, 2, 6, 4, 5], [1, 3, 2, 5, 6, 4], [1, 3, 2, 5, 4, 6], [1, 3, 2, 4, 6, 5], [1, 3, 2, 4, 5, 6], [1, 2, 6, 5, 4, 3], [1, 2, 6, 5, 3, 4], [1, 2, 6, 4, 5, 3], [1, 2, 6, 4, 3, 5], [1, 2, 6, 3, 5, 4], [1, 2, 6, 3, 4, 5], [1, 2, 5, 6, 4, 3], [1, 2, 5, 6, 3, 4], [1, 2, 5, 4, 6, 3], [1, 2, 5, 4, 3, 6], [1, 2, 5, 3, 6, 4], [1, 2, 5, 3, 4, 6], [1, 2, 4, 6, 5, 3], [1, 2, 4, 6, 3, 5], [1, 2, 4, 5, 6, 3], [1, 2, 4, 5, 3, 6], [1, 2, 4, 3, 6, 5], [1, 2, 4, 3, 5, 6], [1, 2, 3, 6, 5, 4], [1, 2, 3, 6, 4, 5], [1, 2, 3, 5, 6, 4], [1, 2, 3, 5, 4, 6], [1, 2, 3, 4, 6, 5], [1, 2, 3, 4, 5, 6]])\n", "comparison": "unordered"}, "public_tests": ["[1,2,3]", "[0,1]", "[1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().permute", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:11+00:00", "tests_total": 60, "tests_dropped": 15, "flags": ["any_order"], "topic_tags": ["array", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def permute(nums)", "container": null, "callable": "permute", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 47, "task_id": "permutations-ii", "difficulty": "Medium", "problem_description": "Given a collection of numbers, nums, that might contain duplicates, return all possible unique permutations in any order.\n\nExample 1:\n\nInput: nums = [1,1,2]\nOutput:\n[[1,1,2],\n [1,2,1],\n [2,1,1]]\n\nExample 2:\n\nInput: nums = [1,2,3]\nOutput: [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n\nConstraints:\n\n- 1 <= nums.length <= 8\n- -10 <= nums[i] <= 10\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[0, 1, 0, 0, 9]), [[0, 0, 0, 1, 9], [0, 0, 0, 9, 1], [0, 0, 1, 0, 9], [0, 0, 1, 9, 0], [0, 0, 9, 0, 1], [0, 0, 9, 1, 0], [0, 1, 0, 0, 9], [0, 1, 0, 9, 0], [0, 1, 9, 0, 0], [0, 9, 0, 0, 1], [0, 9, 0, 1, 0], [0, 9, 1, 0, 0], [1, 0, 0, 0, 9], [1, 0, 0, 9, 0], [1, 0, 9, 0, 0], [1, 9, 0, 0, 0], [9, 0, 0, 0, 1], [9, 0, 0, 1, 0], [9, 0, 1, 0, 0], [9, 1, 0, 0, 0]])\n assert answers_match(candidate(nums=[1, 1, 1, 1]), [[1, 1, 1, 1]])\n assert answers_match(candidate(nums=[1, 1, 1]), [[1, 1, 1]])\n assert answers_match(candidate(nums=[-1, 2, -1, 2]), [[-1, -1, 2, 2], [-1, 2, -1, 2], [-1, 2, 2, -1], [2, -1, -1, 2], [2, -1, 2, -1], [2, 2, -1, -1]])\n assert answers_match(candidate(nums=[3, 3, 0, 3]), [[0, 3, 3, 3], [3, 0, 3, 3], [3, 3, 0, 3], [3, 3, 3, 0]])\n assert answers_match(candidate(nums=[0, 1, 0, 0, 1]), [[0, 0, 0, 1, 1], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 1, 0, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 0], [1, 0, 1, 0, 0], [1, 1, 0, 0, 0]])\n assert answers_match(candidate(nums=[1]), [[1]])\n assert answers_match(candidate(nums=[4, 4, 4]), [[4, 4, 4]])\n assert answers_match(candidate(nums=[1, 2, 2]), [[1, 2, 2], [2, 1, 2], [2, 2, 1]])\n assert answers_match(candidate(nums=[1, 1, 1, 2]), [[1, 1, 1, 2], [1, 1, 2, 1], [1, 2, 1, 1], [2, 1, 1, 1]])\n assert answers_match(candidate(nums=[1, 1, 2]), [[1, 1, 2], [1, 2, 1], [2, 1, 1]])\n assert answers_match(candidate(nums=[7, 7, 7, 7, 7, 7, 7, 7]), [[7, 7, 7, 7, 7, 7, 7, 7]])\n assert answers_match(candidate(nums=[1, -1, 1, 1]), [[-1, 1, 1, 1], [1, -1, 1, 1], [1, 1, -1, 1], [1, 1, 1, -1]])\n assert answers_match(candidate(nums=[2, 2, 2, 1, 1]), [[1, 1, 2, 2, 2], [1, 2, 1, 2, 2], [1, 2, 2, 1, 2], [1, 2, 2, 2, 1], [2, 1, 1, 2, 2], [2, 1, 2, 1, 2], [2, 1, 2, 2, 1], [2, 2, 1, 1, 2], [2, 2, 1, 2, 1], [2, 2, 2, 1, 1]])\n assert answers_match(candidate(nums=[0, 1, 0, 0, 9, 6]), [[0, 0, 0, 1, 6, 9], [0, 0, 0, 1, 9, 6], [0, 0, 0, 6, 1, 9], [0, 0, 0, 6, 9, 1], [0, 0, 0, 9, 1, 6], [0, 0, 0, 9, 6, 1], [0, 0, 1, 0, 6, 9], [0, 0, 1, 0, 9, 6], [0, 0, 1, 6, 0, 9], [0, 0, 1, 6, 9, 0], [0, 0, 1, 9, 0, 6], [0, 0, 1, 9, 6, 0], [0, 0, 6, 0, 1, 9], [0, 0, 6, 0, 9, 1], [0, 0, 6, 1, 0, 9], [0, 0, 6, 1, 9, 0], [0, 0, 6, 9, 0, 1], [0, 0, 6, 9, 1, 0], [0, 0, 9, 0, 1, 6], [0, 0, 9, 0, 6, 1], [0, 0, 9, 1, 0, 6], [0, 0, 9, 1, 6, 0], [0, 0, 9, 6, 0, 1], [0, 0, 9, 6, 1, 0], [0, 1, 0, 0, 6, 9], [0, 1, 0, 0, 9, 6], [0, 1, 0, 6, 0, 9], [0, 1, 0, 6, 9, 0], [0, 1, 0, 9, 0, 6], [0, 1, 0, 9, 6, 0], [0, 1, 6, 0, 0, 9], [0, 1, 6, 0, 9, 0], [0, 1, 6, 9, 0, 0], [0, 1, 9, 0, 0, 6], [0, 1, 9, 0, 6, 0], [0, 1, 9, 6, 0, 0], [0, 6, 0, 0, 1, 9], [0, 6, 0, 0, 9, 1], [0, 6, 0, 1, 0, 9], [0, 6, 0, 1, 9, 0], [0, 6, 0, 9, 0, 1], [0, 6, 0, 9, 1, 0], [0, 6, 1, 0, 0, 9], [0, 6, 1, 0, 9, 0], [0, 6, 1, 9, 0, 0], [0, 6, 9, 0, 0, 1], [0, 6, 9, 0, 1, 0], [0, 6, 9, 1, 0, 0], [0, 9, 0, 0, 1, 6], [0, 9, 0, 0, 6, 1], [0, 9, 0, 1, 0, 6], [0, 9, 0, 1, 6, 0], [0, 9, 0, 6, 0, 1], [0, 9, 0, 6, 1, 0], [0, 9, 1, 0, 0, 6], [0, 9, 1, 0, 6, 0], [0, 9, 1, 6, 0, 0], [0, 9, 6, 0, 0, 1], [0, 9, 6, 0, 1, 0], [0, 9, 6, 1, 0, 0], [1, 0, 0, 0, 6, 9], [1, 0, 0, 0, 9, 6], [1, 0, 0, 6, 0, 9], [1, 0, 0, 6, 9, 0], [1, 0, 0, 9, 0, 6], [1, 0, 0, 9, 6, 0], [1, 0, 6, 0, 0, 9], [1, 0, 6, 0, 9, 0], [1, 0, 6, 9, 0, 0], [1, 0, 9, 0, 0, 6], [1, 0, 9, 0, 6, 0], [1, 0, 9, 6, 0, 0], [1, 6, 0, 0, 0, 9], [1, 6, 0, 0, 9, 0], [1, 6, 0, 9, 0, 0], [1, 6, 9, 0, 0, 0], [1, 9, 0, 0, 0, 6], [1, 9, 0, 0, 6, 0], [1, 9, 0, 6, 0, 0], [1, 9, 6, 0, 0, 0], [6, 0, 0, 0, 1, 9], [6, 0, 0, 0, 9, 1], [6, 0, 0, 1, 0, 9], [6, 0, 0, 1, 9, 0], [6, 0, 0, 9, 0, 1], [6, 0, 0, 9, 1, 0], [6, 0, 1, 0, 0, 9], [6, 0, 1, 0, 9, 0], [6, 0, 1, 9, 0, 0], [6, 0, 9, 0, 0, 1], [6, 0, 9, 0, 1, 0], [6, 0, 9, 1, 0, 0], [6, 1, 0, 0, 0, 9], [6, 1, 0, 0, 9, 0], [6, 1, 0, 9, 0, 0], [6, 1, 9, 0, 0, 0], [6, 9, 0, 0, 0, 1], [6, 9, 0, 0, 1, 0], [6, 9, 0, 1, 0, 0], [6, 9, 1, 0, 0, 0], [9, 0, 0, 0, 1, 6], [9, 0, 0, 0, 6, 1], [9, 0, 0, 1, 0, 6], [9, 0, 0, 1, 6, 0], [9, 0, 0, 6, 0, 1], [9, 0, 0, 6, 1, 0], [9, 0, 1, 0, 0, 6], [9, 0, 1, 0, 6, 0], [9, 0, 1, 6, 0, 0], [9, 0, 6, 0, 0, 1], [9, 0, 6, 0, 1, 0], [9, 0, 6, 1, 0, 0], [9, 1, 0, 0, 0, 6], [9, 1, 0, 0, 6, 0], [9, 1, 0, 6, 0, 0], [9, 1, 6, 0, 0, 0], [9, 6, 0, 0, 0, 1], [9, 6, 0, 0, 1, 0], [9, 6, 0, 1, 0, 0], [9, 6, 1, 0, 0, 0]])\n assert answers_match(candidate(nums=[0, 1, 0, 0, 9, 6, 7]), [[0, 0, 0, 1, 6, 7, 9], [0, 0, 0, 1, 6, 9, 7], [0, 0, 0, 1, 7, 6, 9], [0, 0, 0, 1, 7, 9, 6], [0, 0, 0, 1, 9, 6, 7], [0, 0, 0, 1, 9, 7, 6], [0, 0, 0, 6, 1, 7, 9], [0, 0, 0, 6, 1, 9, 7], [0, 0, 0, 6, 7, 1, 9], [0, 0, 0, 6, 7, 9, 1], [0, 0, 0, 6, 9, 1, 7], [0, 0, 0, 6, 9, 7, 1], [0, 0, 0, 7, 1, 6, 9], [0, 0, 0, 7, 1, 9, 6], [0, 0, 0, 7, 6, 1, 9], [0, 0, 0, 7, 6, 9, 1], [0, 0, 0, 7, 9, 1, 6], [0, 0, 0, 7, 9, 6, 1], [0, 0, 0, 9, 1, 6, 7], [0, 0, 0, 9, 1, 7, 6], [0, 0, 0, 9, 6, 1, 7], [0, 0, 0, 9, 6, 7, 1], [0, 0, 0, 9, 7, 1, 6], [0, 0, 0, 9, 7, 6, 1], [0, 0, 1, 0, 6, 7, 9], [0, 0, 1, 0, 6, 9, 7], [0, 0, 1, 0, 7, 6, 9], [0, 0, 1, 0, 7, 9, 6], [0, 0, 1, 0, 9, 6, 7], [0, 0, 1, 0, 9, 7, 6], [0, 0, 1, 6, 0, 7, 9], [0, 0, 1, 6, 0, 9, 7], [0, 0, 1, 6, 7, 0, 9], [0, 0, 1, 6, 7, 9, 0], [0, 0, 1, 6, 9, 0, 7], [0, 0, 1, 6, 9, 7, 0], [0, 0, 1, 7, 0, 6, 9], [0, 0, 1, 7, 0, 9, 6], [0, 0, 1, 7, 6, 0, 9], [0, 0, 1, 7, 6, 9, 0], [0, 0, 1, 7, 9, 0, 6], [0, 0, 1, 7, 9, 6, 0], [0, 0, 1, 9, 0, 6, 7], [0, 0, 1, 9, 0, 7, 6], [0, 0, 1, 9, 6, 0, 7], [0, 0, 1, 9, 6, 7, 0], [0, 0, 1, 9, 7, 0, 6], [0, 0, 1, 9, 7, 6, 0], [0, 0, 6, 0, 1, 7, 9], [0, 0, 6, 0, 1, 9, 7], [0, 0, 6, 0, 7, 1, 9], [0, 0, 6, 0, 7, 9, 1], [0, 0, 6, 0, 9, 1, 7], [0, 0, 6, 0, 9, 7, 1], [0, 0, 6, 1, 0, 7, 9], [0, 0, 6, 1, 0, 9, 7], [0, 0, 6, 1, 7, 0, 9], [0, 0, 6, 1, 7, 9, 0], [0, 0, 6, 1, 9, 0, 7], [0, 0, 6, 1, 9, 7, 0], [0, 0, 6, 7, 0, 1, 9], [0, 0, 6, 7, 0, 9, 1], [0, 0, 6, 7, 1, 0, 9], [0, 0, 6, 7, 1, 9, 0], [0, 0, 6, 7, 9, 0, 1], [0, 0, 6, 7, 9, 1, 0], [0, 0, 6, 9, 0, 1, 7], [0, 0, 6, 9, 0, 7, 1], [0, 0, 6, 9, 1, 0, 7], [0, 0, 6, 9, 1, 7, 0], [0, 0, 6, 9, 7, 0, 1], [0, 0, 6, 9, 7, 1, 0], [0, 0, 7, 0, 1, 6, 9], [0, 0, 7, 0, 1, 9, 6], [0, 0, 7, 0, 6, 1, 9], [0, 0, 7, 0, 6, 9, 1], [0, 0, 7, 0, 9, 1, 6], [0, 0, 7, 0, 9, 6, 1], [0, 0, 7, 1, 0, 6, 9], [0, 0, 7, 1, 0, 9, 6], [0, 0, 7, 1, 6, 0, 9], [0, 0, 7, 1, 6, 9, 0], [0, 0, 7, 1, 9, 0, 6], [0, 0, 7, 1, 9, 6, 0], [0, 0, 7, 6, 0, 1, 9], [0, 0, 7, 6, 0, 9, 1], [0, 0, 7, 6, 1, 0, 9], [0, 0, 7, 6, 1, 9, 0], [0, 0, 7, 6, 9, 0, 1], [0, 0, 7, 6, 9, 1, 0], [0, 0, 7, 9, 0, 1, 6], [0, 0, 7, 9, 0, 6, 1], [0, 0, 7, 9, 1, 0, 6], [0, 0, 7, 9, 1, 6, 0], [0, 0, 7, 9, 6, 0, 1], [0, 0, 7, 9, 6, 1, 0], [0, 0, 9, 0, 1, 6, 7], [0, 0, 9, 0, 1, 7, 6], [0, 0, 9, 0, 6, 1, 7], [0, 0, 9, 0, 6, 7, 1], [0, 0, 9, 0, 7, 1, 6], [0, 0, 9, 0, 7, 6, 1], [0, 0, 9, 1, 0, 6, 7], [0, 0, 9, 1, 0, 7, 6], [0, 0, 9, 1, 6, 0, 7], [0, 0, 9, 1, 6, 7, 0], [0, 0, 9, 1, 7, 0, 6], [0, 0, 9, 1, 7, 6, 0], [0, 0, 9, 6, 0, 1, 7], [0, 0, 9, 6, 0, 7, 1], [0, 0, 9, 6, 1, 0, 7], [0, 0, 9, 6, 1, 7, 0], [0, 0, 9, 6, 7, 0, 1], [0, 0, 9, 6, 7, 1, 0], [0, 0, 9, 7, 0, 1, 6], [0, 0, 9, 7, 0, 6, 1], [0, 0, 9, 7, 1, 0, 6], [0, 0, 9, 7, 1, 6, 0], [0, 0, 9, 7, 6, 0, 1], [0, 0, 9, 7, 6, 1, 0], [0, 1, 0, 0, 6, 7, 9], [0, 1, 0, 0, 6, 9, 7], [0, 1, 0, 0, 7, 6, 9], [0, 1, 0, 0, 7, 9, 6], [0, 1, 0, 0, 9, 6, 7], [0, 1, 0, 0, 9, 7, 6], [0, 1, 0, 6, 0, 7, 9], [0, 1, 0, 6, 0, 9, 7], [0, 1, 0, 6, 7, 0, 9], [0, 1, 0, 6, 7, 9, 0], [0, 1, 0, 6, 9, 0, 7], [0, 1, 0, 6, 9, 7, 0], [0, 1, 0, 7, 0, 6, 9], [0, 1, 0, 7, 0, 9, 6], [0, 1, 0, 7, 6, 0, 9], [0, 1, 0, 7, 6, 9, 0], [0, 1, 0, 7, 9, 0, 6], [0, 1, 0, 7, 9, 6, 0], [0, 1, 0, 9, 0, 6, 7], [0, 1, 0, 9, 0, 7, 6], [0, 1, 0, 9, 6, 0, 7], [0, 1, 0, 9, 6, 7, 0], [0, 1, 0, 9, 7, 0, 6], [0, 1, 0, 9, 7, 6, 0], [0, 1, 6, 0, 0, 7, 9], [0, 1, 6, 0, 0, 9, 7], [0, 1, 6, 0, 7, 0, 9], [0, 1, 6, 0, 7, 9, 0], [0, 1, 6, 0, 9, 0, 7], [0, 1, 6, 0, 9, 7, 0], [0, 1, 6, 7, 0, 0, 9], [0, 1, 6, 7, 0, 9, 0], [0, 1, 6, 7, 9, 0, 0], [0, 1, 6, 9, 0, 0, 7], [0, 1, 6, 9, 0, 7, 0], [0, 1, 6, 9, 7, 0, 0], [0, 1, 7, 0, 0, 6, 9], [0, 1, 7, 0, 0, 9, 6], [0, 1, 7, 0, 6, 0, 9], [0, 1, 7, 0, 6, 9, 0], [0, 1, 7, 0, 9, 0, 6], [0, 1, 7, 0, 9, 6, 0], [0, 1, 7, 6, 0, 0, 9], [0, 1, 7, 6, 0, 9, 0], [0, 1, 7, 6, 9, 0, 0], [0, 1, 7, 9, 0, 0, 6], [0, 1, 7, 9, 0, 6, 0], [0, 1, 7, 9, 6, 0, 0], [0, 1, 9, 0, 0, 6, 7], [0, 1, 9, 0, 0, 7, 6], [0, 1, 9, 0, 6, 0, 7], [0, 1, 9, 0, 6, 7, 0], [0, 1, 9, 0, 7, 0, 6], [0, 1, 9, 0, 7, 6, 0], [0, 1, 9, 6, 0, 0, 7], [0, 1, 9, 6, 0, 7, 0], [0, 1, 9, 6, 7, 0, 0], [0, 1, 9, 7, 0, 0, 6], [0, 1, 9, 7, 0, 6, 0], [0, 1, 9, 7, 6, 0, 0], [0, 6, 0, 0, 1, 7, 9], [0, 6, 0, 0, 1, 9, 7], [0, 6, 0, 0, 7, 1, 9], [0, 6, 0, 0, 7, 9, 1], [0, 6, 0, 0, 9, 1, 7], [0, 6, 0, 0, 9, 7, 1], [0, 6, 0, 1, 0, 7, 9], [0, 6, 0, 1, 0, 9, 7], [0, 6, 0, 1, 7, 0, 9], [0, 6, 0, 1, 7, 9, 0], [0, 6, 0, 1, 9, 0, 7], [0, 6, 0, 1, 9, 7, 0], [0, 6, 0, 7, 0, 1, 9], [0, 6, 0, 7, 0, 9, 1], [0, 6, 0, 7, 1, 0, 9], [0, 6, 0, 7, 1, 9, 0], [0, 6, 0, 7, 9, 0, 1], [0, 6, 0, 7, 9, 1, 0], [0, 6, 0, 9, 0, 1, 7], [0, 6, 0, 9, 0, 7, 1], [0, 6, 0, 9, 1, 0, 7], [0, 6, 0, 9, 1, 7, 0], [0, 6, 0, 9, 7, 0, 1], [0, 6, 0, 9, 7, 1, 0], [0, 6, 1, 0, 0, 7, 9], [0, 6, 1, 0, 0, 9, 7], [0, 6, 1, 0, 7, 0, 9], [0, 6, 1, 0, 7, 9, 0], [0, 6, 1, 0, 9, 0, 7], [0, 6, 1, 0, 9, 7, 0], [0, 6, 1, 7, 0, 0, 9], [0, 6, 1, 7, 0, 9, 0], [0, 6, 1, 7, 9, 0, 0], [0, 6, 1, 9, 0, 0, 7], [0, 6, 1, 9, 0, 7, 0], [0, 6, 1, 9, 7, 0, 0], [0, 6, 7, 0, 0, 1, 9], [0, 6, 7, 0, 0, 9, 1], [0, 6, 7, 0, 1, 0, 9], [0, 6, 7, 0, 1, 9, 0], [0, 6, 7, 0, 9, 0, 1], [0, 6, 7, 0, 9, 1, 0], [0, 6, 7, 1, 0, 0, 9], [0, 6, 7, 1, 0, 9, 0], [0, 6, 7, 1, 9, 0, 0], [0, 6, 7, 9, 0, 0, 1], [0, 6, 7, 9, 0, 1, 0], [0, 6, 7, 9, 1, 0, 0], [0, 6, 9, 0, 0, 1, 7], [0, 6, 9, 0, 0, 7, 1], [0, 6, 9, 0, 1, 0, 7], [0, 6, 9, 0, 1, 7, 0], [0, 6, 9, 0, 7, 0, 1], [0, 6, 9, 0, 7, 1, 0], [0, 6, 9, 1, 0, 0, 7], [0, 6, 9, 1, 0, 7, 0], [0, 6, 9, 1, 7, 0, 0], [0, 6, 9, 7, 0, 0, 1], [0, 6, 9, 7, 0, 1, 0], [0, 6, 9, 7, 1, 0, 0], [0, 7, 0, 0, 1, 6, 9], [0, 7, 0, 0, 1, 9, 6], [0, 7, 0, 0, 6, 1, 9], [0, 7, 0, 0, 6, 9, 1], [0, 7, 0, 0, 9, 1, 6], [0, 7, 0, 0, 9, 6, 1], [0, 7, 0, 1, 0, 6, 9], [0, 7, 0, 1, 0, 9, 6], [0, 7, 0, 1, 6, 0, 9], [0, 7, 0, 1, 6, 9, 0], [0, 7, 0, 1, 9, 0, 6], [0, 7, 0, 1, 9, 6, 0], [0, 7, 0, 6, 0, 1, 9], [0, 7, 0, 6, 0, 9, 1], [0, 7, 0, 6, 1, 0, 9], [0, 7, 0, 6, 1, 9, 0], [0, 7, 0, 6, 9, 0, 1], [0, 7, 0, 6, 9, 1, 0], [0, 7, 0, 9, 0, 1, 6], [0, 7, 0, 9, 0, 6, 1], [0, 7, 0, 9, 1, 0, 6], [0, 7, 0, 9, 1, 6, 0], [0, 7, 0, 9, 6, 0, 1], [0, 7, 0, 9, 6, 1, 0], [0, 7, 1, 0, 0, 6, 9], [0, 7, 1, 0, 0, 9, 6], [0, 7, 1, 0, 6, 0, 9], [0, 7, 1, 0, 6, 9, 0], [0, 7, 1, 0, 9, 0, 6], [0, 7, 1, 0, 9, 6, 0], [0, 7, 1, 6, 0, 0, 9], [0, 7, 1, 6, 0, 9, 0], [0, 7, 1, 6, 9, 0, 0], [0, 7, 1, 9, 0, 0, 6], [0, 7, 1, 9, 0, 6, 0], [0, 7, 1, 9, 6, 0, 0], [0, 7, 6, 0, 0, 1, 9], [0, 7, 6, 0, 0, 9, 1], [0, 7, 6, 0, 1, 0, 9], [0, 7, 6, 0, 1, 9, 0], [0, 7, 6, 0, 9, 0, 1], [0, 7, 6, 0, 9, 1, 0], [0, 7, 6, 1, 0, 0, 9], [0, 7, 6, 1, 0, 9, 0], [0, 7, 6, 1, 9, 0, 0], [0, 7, 6, 9, 0, 0, 1], [0, 7, 6, 9, 0, 1, 0], [0, 7, 6, 9, 1, 0, 0], [0, 7, 9, 0, 0, 1, 6], [0, 7, 9, 0, 0, 6, 1], [0, 7, 9, 0, 1, 0, 6], [0, 7, 9, 0, 1, 6, 0], [0, 7, 9, 0, 6, 0, 1], [0, 7, 9, 0, 6, 1, 0], [0, 7, 9, 1, 0, 0, 6], [0, 7, 9, 1, 0, 6, 0], [0, 7, 9, 1, 6, 0, 0], [0, 7, 9, 6, 0, 0, 1], [0, 7, 9, 6, 0, 1, 0], [0, 7, 9, 6, 1, 0, 0], [0, 9, 0, 0, 1, 6, 7], [0, 9, 0, 0, 1, 7, 6], [0, 9, 0, 0, 6, 1, 7], [0, 9, 0, 0, 6, 7, 1], [0, 9, 0, 0, 7, 1, 6], [0, 9, 0, 0, 7, 6, 1], [0, 9, 0, 1, 0, 6, 7], [0, 9, 0, 1, 0, 7, 6], [0, 9, 0, 1, 6, 0, 7], [0, 9, 0, 1, 6, 7, 0], [0, 9, 0, 1, 7, 0, 6], [0, 9, 0, 1, 7, 6, 0], [0, 9, 0, 6, 0, 1, 7], [0, 9, 0, 6, 0, 7, 1], [0, 9, 0, 6, 1, 0, 7], [0, 9, 0, 6, 1, 7, 0], [0, 9, 0, 6, 7, 0, 1], [0, 9, 0, 6, 7, 1, 0], [0, 9, 0, 7, 0, 1, 6], [0, 9, 0, 7, 0, 6, 1], [0, 9, 0, 7, 1, 0, 6], [0, 9, 0, 7, 1, 6, 0], [0, 9, 0, 7, 6, 0, 1], [0, 9, 0, 7, 6, 1, 0], [0, 9, 1, 0, 0, 6, 7], [0, 9, 1, 0, 0, 7, 6], [0, 9, 1, 0, 6, 0, 7], [0, 9, 1, 0, 6, 7, 0], [0, 9, 1, 0, 7, 0, 6], [0, 9, 1, 0, 7, 6, 0], [0, 9, 1, 6, 0, 0, 7], [0, 9, 1, 6, 0, 7, 0], [0, 9, 1, 6, 7, 0, 0], [0, 9, 1, 7, 0, 0, 6], [0, 9, 1, 7, 0, 6, 0], [0, 9, 1, 7, 6, 0, 0], [0, 9, 6, 0, 0, 1, 7], [0, 9, 6, 0, 0, 7, 1], [0, 9, 6, 0, 1, 0, 7], [0, 9, 6, 0, 1, 7, 0], [0, 9, 6, 0, 7, 0, 1], [0, 9, 6, 0, 7, 1, 0], [0, 9, 6, 1, 0, 0, 7], [0, 9, 6, 1, 0, 7, 0], [0, 9, 6, 1, 7, 0, 0], [0, 9, 6, 7, 0, 0, 1], [0, 9, 6, 7, 0, 1, 0], [0, 9, 6, 7, 1, 0, 0], [0, 9, 7, 0, 0, 1, 6], [0, 9, 7, 0, 0, 6, 1], [0, 9, 7, 0, 1, 0, 6], [0, 9, 7, 0, 1, 6, 0], [0, 9, 7, 0, 6, 0, 1], [0, 9, 7, 0, 6, 1, 0], [0, 9, 7, 1, 0, 0, 6], [0, 9, 7, 1, 0, 6, 0], [0, 9, 7, 1, 6, 0, 0], [0, 9, 7, 6, 0, 0, 1], [0, 9, 7, 6, 0, 1, 0], [0, 9, 7, 6, 1, 0, 0], [1, 0, 0, 0, 6, 7, 9], [1, 0, 0, 0, 6, 9, 7], [1, 0, 0, 0, 7, 6, 9], [1, 0, 0, 0, 7, 9, 6], [1, 0, 0, 0, 9, 6, 7], [1, 0, 0, 0, 9, 7, 6], [1, 0, 0, 6, 0, 7, 9], [1, 0, 0, 6, 0, 9, 7], [1, 0, 0, 6, 7, 0, 9], [1, 0, 0, 6, 7, 9, 0], [1, 0, 0, 6, 9, 0, 7], [1, 0, 0, 6, 9, 7, 0], [1, 0, 0, 7, 0, 6, 9], [1, 0, 0, 7, 0, 9, 6], [1, 0, 0, 7, 6, 0, 9], [1, 0, 0, 7, 6, 9, 0], [1, 0, 0, 7, 9, 0, 6], [1, 0, 0, 7, 9, 6, 0], [1, 0, 0, 9, 0, 6, 7], [1, 0, 0, 9, 0, 7, 6], [1, 0, 0, 9, 6, 0, 7], [1, 0, 0, 9, 6, 7, 0], [1, 0, 0, 9, 7, 0, 6], [1, 0, 0, 9, 7, 6, 0], [1, 0, 6, 0, 0, 7, 9], [1, 0, 6, 0, 0, 9, 7], [1, 0, 6, 0, 7, 0, 9], [1, 0, 6, 0, 7, 9, 0], [1, 0, 6, 0, 9, 0, 7], [1, 0, 6, 0, 9, 7, 0], [1, 0, 6, 7, 0, 0, 9], [1, 0, 6, 7, 0, 9, 0], [1, 0, 6, 7, 9, 0, 0], [1, 0, 6, 9, 0, 0, 7], [1, 0, 6, 9, 0, 7, 0], [1, 0, 6, 9, 7, 0, 0], [1, 0, 7, 0, 0, 6, 9], [1, 0, 7, 0, 0, 9, 6], [1, 0, 7, 0, 6, 0, 9], [1, 0, 7, 0, 6, 9, 0], [1, 0, 7, 0, 9, 0, 6], [1, 0, 7, 0, 9, 6, 0], [1, 0, 7, 6, 0, 0, 9], [1, 0, 7, 6, 0, 9, 0], [1, 0, 7, 6, 9, 0, 0], [1, 0, 7, 9, 0, 0, 6], [1, 0, 7, 9, 0, 6, 0], [1, 0, 7, 9, 6, 0, 0], [1, 0, 9, 0, 0, 6, 7], [1, 0, 9, 0, 0, 7, 6], [1, 0, 9, 0, 6, 0, 7], [1, 0, 9, 0, 6, 7, 0], [1, 0, 9, 0, 7, 0, 6], [1, 0, 9, 0, 7, 6, 0], [1, 0, 9, 6, 0, 0, 7], [1, 0, 9, 6, 0, 7, 0], [1, 0, 9, 6, 7, 0, 0], [1, 0, 9, 7, 0, 0, 6], [1, 0, 9, 7, 0, 6, 0], [1, 0, 9, 7, 6, 0, 0], [1, 6, 0, 0, 0, 7, 9], [1, 6, 0, 0, 0, 9, 7], [1, 6, 0, 0, 7, 0, 9], [1, 6, 0, 0, 7, 9, 0], [1, 6, 0, 0, 9, 0, 7], [1, 6, 0, 0, 9, 7, 0], [1, 6, 0, 7, 0, 0, 9], [1, 6, 0, 7, 0, 9, 0], [1, 6, 0, 7, 9, 0, 0], [1, 6, 0, 9, 0, 0, 7], [1, 6, 0, 9, 0, 7, 0], [1, 6, 0, 9, 7, 0, 0], [1, 6, 7, 0, 0, 0, 9], [1, 6, 7, 0, 0, 9, 0], [1, 6, 7, 0, 9, 0, 0], [1, 6, 7, 9, 0, 0, 0], [1, 6, 9, 0, 0, 0, 7], [1, 6, 9, 0, 0, 7, 0], [1, 6, 9, 0, 7, 0, 0], [1, 6, 9, 7, 0, 0, 0], [1, 7, 0, 0, 0, 6, 9], [1, 7, 0, 0, 0, 9, 6], [1, 7, 0, 0, 6, 0, 9], [1, 7, 0, 0, 6, 9, 0], [1, 7, 0, 0, 9, 0, 6], [1, 7, 0, 0, 9, 6, 0], [1, 7, 0, 6, 0, 0, 9], [1, 7, 0, 6, 0, 9, 0], [1, 7, 0, 6, 9, 0, 0], [1, 7, 0, 9, 0, 0, 6], [1, 7, 0, 9, 0, 6, 0], [1, 7, 0, 9, 6, 0, 0], [1, 7, 6, 0, 0, 0, 9], [1, 7, 6, 0, 0, 9, 0], [1, 7, 6, 0, 9, 0, 0], [1, 7, 6, 9, 0, 0, 0], [1, 7, 9, 0, 0, 0, 6], [1, 7, 9, 0, 0, 6, 0], [1, 7, 9, 0, 6, 0, 0], [1, 7, 9, 6, 0, 0, 0], [1, 9, 0, 0, 0, 6, 7], [1, 9, 0, 0, 0, 7, 6], [1, 9, 0, 0, 6, 0, 7], [1, 9, 0, 0, 6, 7, 0], [1, 9, 0, 0, 7, 0, 6], [1, 9, 0, 0, 7, 6, 0], [1, 9, 0, 6, 0, 0, 7], [1, 9, 0, 6, 0, 7, 0], [1, 9, 0, 6, 7, 0, 0], [1, 9, 0, 7, 0, 0, 6], [1, 9, 0, 7, 0, 6, 0], [1, 9, 0, 7, 6, 0, 0], [1, 9, 6, 0, 0, 0, 7], [1, 9, 6, 0, 0, 7, 0], [1, 9, 6, 0, 7, 0, 0], [1, 9, 6, 7, 0, 0, 0], [1, 9, 7, 0, 0, 0, 6], [1, 9, 7, 0, 0, 6, 0], [1, 9, 7, 0, 6, 0, 0], [1, 9, 7, 6, 0, 0, 0], [6, 0, 0, 0, 1, 7, 9], [6, 0, 0, 0, 1, 9, 7], [6, 0, 0, 0, 7, 1, 9], [6, 0, 0, 0, 7, 9, 1], [6, 0, 0, 0, 9, 1, 7], [6, 0, 0, 0, 9, 7, 1], [6, 0, 0, 1, 0, 7, 9], [6, 0, 0, 1, 0, 9, 7], [6, 0, 0, 1, 7, 0, 9], [6, 0, 0, 1, 7, 9, 0], [6, 0, 0, 1, 9, 0, 7], [6, 0, 0, 1, 9, 7, 0], [6, 0, 0, 7, 0, 1, 9], [6, 0, 0, 7, 0, 9, 1], [6, 0, 0, 7, 1, 0, 9], [6, 0, 0, 7, 1, 9, 0], [6, 0, 0, 7, 9, 0, 1], [6, 0, 0, 7, 9, 1, 0], [6, 0, 0, 9, 0, 1, 7], [6, 0, 0, 9, 0, 7, 1], [6, 0, 0, 9, 1, 0, 7], [6, 0, 0, 9, 1, 7, 0], [6, 0, 0, 9, 7, 0, 1], [6, 0, 0, 9, 7, 1, 0], [6, 0, 1, 0, 0, 7, 9], [6, 0, 1, 0, 0, 9, 7], [6, 0, 1, 0, 7, 0, 9], [6, 0, 1, 0, 7, 9, 0], [6, 0, 1, 0, 9, 0, 7], [6, 0, 1, 0, 9, 7, 0], [6, 0, 1, 7, 0, 0, 9], [6, 0, 1, 7, 0, 9, 0], [6, 0, 1, 7, 9, 0, 0], [6, 0, 1, 9, 0, 0, 7], [6, 0, 1, 9, 0, 7, 0], [6, 0, 1, 9, 7, 0, 0], [6, 0, 7, 0, 0, 1, 9], [6, 0, 7, 0, 0, 9, 1], [6, 0, 7, 0, 1, 0, 9], [6, 0, 7, 0, 1, 9, 0], [6, 0, 7, 0, 9, 0, 1], [6, 0, 7, 0, 9, 1, 0], [6, 0, 7, 1, 0, 0, 9], [6, 0, 7, 1, 0, 9, 0], [6, 0, 7, 1, 9, 0, 0], [6, 0, 7, 9, 0, 0, 1], [6, 0, 7, 9, 0, 1, 0], [6, 0, 7, 9, 1, 0, 0], [6, 0, 9, 0, 0, 1, 7], [6, 0, 9, 0, 0, 7, 1], [6, 0, 9, 0, 1, 0, 7], [6, 0, 9, 0, 1, 7, 0], [6, 0, 9, 0, 7, 0, 1], [6, 0, 9, 0, 7, 1, 0], [6, 0, 9, 1, 0, 0, 7], [6, 0, 9, 1, 0, 7, 0], [6, 0, 9, 1, 7, 0, 0], [6, 0, 9, 7, 0, 0, 1], [6, 0, 9, 7, 0, 1, 0], [6, 0, 9, 7, 1, 0, 0], [6, 1, 0, 0, 0, 7, 9], [6, 1, 0, 0, 0, 9, 7], [6, 1, 0, 0, 7, 0, 9], [6, 1, 0, 0, 7, 9, 0], [6, 1, 0, 0, 9, 0, 7], [6, 1, 0, 0, 9, 7, 0], [6, 1, 0, 7, 0, 0, 9], [6, 1, 0, 7, 0, 9, 0], [6, 1, 0, 7, 9, 0, 0], [6, 1, 0, 9, 0, 0, 7], [6, 1, 0, 9, 0, 7, 0], [6, 1, 0, 9, 7, 0, 0], [6, 1, 7, 0, 0, 0, 9], [6, 1, 7, 0, 0, 9, 0], [6, 1, 7, 0, 9, 0, 0], [6, 1, 7, 9, 0, 0, 0], [6, 1, 9, 0, 0, 0, 7], [6, 1, 9, 0, 0, 7, 0], [6, 1, 9, 0, 7, 0, 0], [6, 1, 9, 7, 0, 0, 0], [6, 7, 0, 0, 0, 1, 9], [6, 7, 0, 0, 0, 9, 1], [6, 7, 0, 0, 1, 0, 9], [6, 7, 0, 0, 1, 9, 0], [6, 7, 0, 0, 9, 0, 1], [6, 7, 0, 0, 9, 1, 0], [6, 7, 0, 1, 0, 0, 9], [6, 7, 0, 1, 0, 9, 0], [6, 7, 0, 1, 9, 0, 0], [6, 7, 0, 9, 0, 0, 1], [6, 7, 0, 9, 0, 1, 0], [6, 7, 0, 9, 1, 0, 0], [6, 7, 1, 0, 0, 0, 9], [6, 7, 1, 0, 0, 9, 0], [6, 7, 1, 0, 9, 0, 0], [6, 7, 1, 9, 0, 0, 0], [6, 7, 9, 0, 0, 0, 1], [6, 7, 9, 0, 0, 1, 0], [6, 7, 9, 0, 1, 0, 0], [6, 7, 9, 1, 0, 0, 0], [6, 9, 0, 0, 0, 1, 7], [6, 9, 0, 0, 0, 7, 1], [6, 9, 0, 0, 1, 0, 7], [6, 9, 0, 0, 1, 7, 0], [6, 9, 0, 0, 7, 0, 1], [6, 9, 0, 0, 7, 1, 0], [6, 9, 0, 1, 0, 0, 7], [6, 9, 0, 1, 0, 7, 0], [6, 9, 0, 1, 7, 0, 0], [6, 9, 0, 7, 0, 0, 1], [6, 9, 0, 7, 0, 1, 0], [6, 9, 0, 7, 1, 0, 0], [6, 9, 1, 0, 0, 0, 7], [6, 9, 1, 0, 0, 7, 0], [6, 9, 1, 0, 7, 0, 0], [6, 9, 1, 7, 0, 0, 0], [6, 9, 7, 0, 0, 0, 1], [6, 9, 7, 0, 0, 1, 0], [6, 9, 7, 0, 1, 0, 0], [6, 9, 7, 1, 0, 0, 0], [7, 0, 0, 0, 1, 6, 9], [7, 0, 0, 0, 1, 9, 6], [7, 0, 0, 0, 6, 1, 9], [7, 0, 0, 0, 6, 9, 1], [7, 0, 0, 0, 9, 1, 6], [7, 0, 0, 0, 9, 6, 1], [7, 0, 0, 1, 0, 6, 9], [7, 0, 0, 1, 0, 9, 6], [7, 0, 0, 1, 6, 0, 9], [7, 0, 0, 1, 6, 9, 0], [7, 0, 0, 1, 9, 0, 6], [7, 0, 0, 1, 9, 6, 0], [7, 0, 0, 6, 0, 1, 9], [7, 0, 0, 6, 0, 9, 1], [7, 0, 0, 6, 1, 0, 9], [7, 0, 0, 6, 1, 9, 0], [7, 0, 0, 6, 9, 0, 1], [7, 0, 0, 6, 9, 1, 0], [7, 0, 0, 9, 0, 1, 6], [7, 0, 0, 9, 0, 6, 1], [7, 0, 0, 9, 1, 0, 6], [7, 0, 0, 9, 1, 6, 0], [7, 0, 0, 9, 6, 0, 1], [7, 0, 0, 9, 6, 1, 0], [7, 0, 1, 0, 0, 6, 9], [7, 0, 1, 0, 0, 9, 6], [7, 0, 1, 0, 6, 0, 9], [7, 0, 1, 0, 6, 9, 0], [7, 0, 1, 0, 9, 0, 6], [7, 0, 1, 0, 9, 6, 0], [7, 0, 1, 6, 0, 0, 9], [7, 0, 1, 6, 0, 9, 0], [7, 0, 1, 6, 9, 0, 0], [7, 0, 1, 9, 0, 0, 6], [7, 0, 1, 9, 0, 6, 0], [7, 0, 1, 9, 6, 0, 0], [7, 0, 6, 0, 0, 1, 9], [7, 0, 6, 0, 0, 9, 1], [7, 0, 6, 0, 1, 0, 9], [7, 0, 6, 0, 1, 9, 0], [7, 0, 6, 0, 9, 0, 1], [7, 0, 6, 0, 9, 1, 0], [7, 0, 6, 1, 0, 0, 9], [7, 0, 6, 1, 0, 9, 0], [7, 0, 6, 1, 9, 0, 0], [7, 0, 6, 9, 0, 0, 1], [7, 0, 6, 9, 0, 1, 0], [7, 0, 6, 9, 1, 0, 0], [7, 0, 9, 0, 0, 1, 6], [7, 0, 9, 0, 0, 6, 1], [7, 0, 9, 0, 1, 0, 6], [7, 0, 9, 0, 1, 6, 0], [7, 0, 9, 0, 6, 0, 1], [7, 0, 9, 0, 6, 1, 0], [7, 0, 9, 1, 0, 0, 6], [7, 0, 9, 1, 0, 6, 0], [7, 0, 9, 1, 6, 0, 0], [7, 0, 9, 6, 0, 0, 1], [7, 0, 9, 6, 0, 1, 0], [7, 0, 9, 6, 1, 0, 0], [7, 1, 0, 0, 0, 6, 9], [7, 1, 0, 0, 0, 9, 6], [7, 1, 0, 0, 6, 0, 9], [7, 1, 0, 0, 6, 9, 0], [7, 1, 0, 0, 9, 0, 6], [7, 1, 0, 0, 9, 6, 0], [7, 1, 0, 6, 0, 0, 9], [7, 1, 0, 6, 0, 9, 0], [7, 1, 0, 6, 9, 0, 0], [7, 1, 0, 9, 0, 0, 6], [7, 1, 0, 9, 0, 6, 0], [7, 1, 0, 9, 6, 0, 0], [7, 1, 6, 0, 0, 0, 9], [7, 1, 6, 0, 0, 9, 0], [7, 1, 6, 0, 9, 0, 0], [7, 1, 6, 9, 0, 0, 0], [7, 1, 9, 0, 0, 0, 6], [7, 1, 9, 0, 0, 6, 0], [7, 1, 9, 0, 6, 0, 0], [7, 1, 9, 6, 0, 0, 0], [7, 6, 0, 0, 0, 1, 9], [7, 6, 0, 0, 0, 9, 1], [7, 6, 0, 0, 1, 0, 9], [7, 6, 0, 0, 1, 9, 0], [7, 6, 0, 0, 9, 0, 1], [7, 6, 0, 0, 9, 1, 0], [7, 6, 0, 1, 0, 0, 9], [7, 6, 0, 1, 0, 9, 0], [7, 6, 0, 1, 9, 0, 0], [7, 6, 0, 9, 0, 0, 1], [7, 6, 0, 9, 0, 1, 0], [7, 6, 0, 9, 1, 0, 0], [7, 6, 1, 0, 0, 0, 9], [7, 6, 1, 0, 0, 9, 0], [7, 6, 1, 0, 9, 0, 0], [7, 6, 1, 9, 0, 0, 0], [7, 6, 9, 0, 0, 0, 1], [7, 6, 9, 0, 0, 1, 0], [7, 6, 9, 0, 1, 0, 0], [7, 6, 9, 1, 0, 0, 0], [7, 9, 0, 0, 0, 1, 6], [7, 9, 0, 0, 0, 6, 1], [7, 9, 0, 0, 1, 0, 6], [7, 9, 0, 0, 1, 6, 0], [7, 9, 0, 0, 6, 0, 1], [7, 9, 0, 0, 6, 1, 0], [7, 9, 0, 1, 0, 0, 6], [7, 9, 0, 1, 0, 6, 0], [7, 9, 0, 1, 6, 0, 0], [7, 9, 0, 6, 0, 0, 1], [7, 9, 0, 6, 0, 1, 0], [7, 9, 0, 6, 1, 0, 0], [7, 9, 1, 0, 0, 0, 6], [7, 9, 1, 0, 0, 6, 0], [7, 9, 1, 0, 6, 0, 0], [7, 9, 1, 6, 0, 0, 0], [7, 9, 6, 0, 0, 0, 1], [7, 9, 6, 0, 0, 1, 0], [7, 9, 6, 0, 1, 0, 0], [7, 9, 6, 1, 0, 0, 0], [9, 0, 0, 0, 1, 6, 7], [9, 0, 0, 0, 1, 7, 6], [9, 0, 0, 0, 6, 1, 7], [9, 0, 0, 0, 6, 7, 1], [9, 0, 0, 0, 7, 1, 6], [9, 0, 0, 0, 7, 6, 1], [9, 0, 0, 1, 0, 6, 7], [9, 0, 0, 1, 0, 7, 6], [9, 0, 0, 1, 6, 0, 7], [9, 0, 0, 1, 6, 7, 0], [9, 0, 0, 1, 7, 0, 6], [9, 0, 0, 1, 7, 6, 0], [9, 0, 0, 6, 0, 1, 7], [9, 0, 0, 6, 0, 7, 1], [9, 0, 0, 6, 1, 0, 7], [9, 0, 0, 6, 1, 7, 0], [9, 0, 0, 6, 7, 0, 1], [9, 0, 0, 6, 7, 1, 0], [9, 0, 0, 7, 0, 1, 6], [9, 0, 0, 7, 0, 6, 1], [9, 0, 0, 7, 1, 0, 6], [9, 0, 0, 7, 1, 6, 0], [9, 0, 0, 7, 6, 0, 1], [9, 0, 0, 7, 6, 1, 0], [9, 0, 1, 0, 0, 6, 7], [9, 0, 1, 0, 0, 7, 6], [9, 0, 1, 0, 6, 0, 7], [9, 0, 1, 0, 6, 7, 0], [9, 0, 1, 0, 7, 0, 6], [9, 0, 1, 0, 7, 6, 0], [9, 0, 1, 6, 0, 0, 7], [9, 0, 1, 6, 0, 7, 0], [9, 0, 1, 6, 7, 0, 0], [9, 0, 1, 7, 0, 0, 6], [9, 0, 1, 7, 0, 6, 0], [9, 0, 1, 7, 6, 0, 0], [9, 0, 6, 0, 0, 1, 7], [9, 0, 6, 0, 0, 7, 1], [9, 0, 6, 0, 1, 0, 7], [9, 0, 6, 0, 1, 7, 0], [9, 0, 6, 0, 7, 0, 1], [9, 0, 6, 0, 7, 1, 0], [9, 0, 6, 1, 0, 0, 7], [9, 0, 6, 1, 0, 7, 0], [9, 0, 6, 1, 7, 0, 0], [9, 0, 6, 7, 0, 0, 1], [9, 0, 6, 7, 0, 1, 0], [9, 0, 6, 7, 1, 0, 0], [9, 0, 7, 0, 0, 1, 6], [9, 0, 7, 0, 0, 6, 1], [9, 0, 7, 0, 1, 0, 6], [9, 0, 7, 0, 1, 6, 0], [9, 0, 7, 0, 6, 0, 1], [9, 0, 7, 0, 6, 1, 0], [9, 0, 7, 1, 0, 0, 6], [9, 0, 7, 1, 0, 6, 0], [9, 0, 7, 1, 6, 0, 0], [9, 0, 7, 6, 0, 0, 1], [9, 0, 7, 6, 0, 1, 0], [9, 0, 7, 6, 1, 0, 0], [9, 1, 0, 0, 0, 6, 7], [9, 1, 0, 0, 0, 7, 6], [9, 1, 0, 0, 6, 0, 7], [9, 1, 0, 0, 6, 7, 0], [9, 1, 0, 0, 7, 0, 6], [9, 1, 0, 0, 7, 6, 0], [9, 1, 0, 6, 0, 0, 7], [9, 1, 0, 6, 0, 7, 0], [9, 1, 0, 6, 7, 0, 0], [9, 1, 0, 7, 0, 0, 6], [9, 1, 0, 7, 0, 6, 0], [9, 1, 0, 7, 6, 0, 0], [9, 1, 6, 0, 0, 0, 7], [9, 1, 6, 0, 0, 7, 0], [9, 1, 6, 0, 7, 0, 0], [9, 1, 6, 7, 0, 0, 0], [9, 1, 7, 0, 0, 0, 6], [9, 1, 7, 0, 0, 6, 0], [9, 1, 7, 0, 6, 0, 0], [9, 1, 7, 6, 0, 0, 0], [9, 6, 0, 0, 0, 1, 7], [9, 6, 0, 0, 0, 7, 1], [9, 6, 0, 0, 1, 0, 7], [9, 6, 0, 0, 1, 7, 0], [9, 6, 0, 0, 7, 0, 1], [9, 6, 0, 0, 7, 1, 0], [9, 6, 0, 1, 0, 0, 7], [9, 6, 0, 1, 0, 7, 0], [9, 6, 0, 1, 7, 0, 0], [9, 6, 0, 7, 0, 0, 1], [9, 6, 0, 7, 0, 1, 0], [9, 6, 0, 7, 1, 0, 0], [9, 6, 1, 0, 0, 0, 7], [9, 6, 1, 0, 0, 7, 0], [9, 6, 1, 0, 7, 0, 0], [9, 6, 1, 7, 0, 0, 0], [9, 6, 7, 0, 0, 0, 1], [9, 6, 7, 0, 0, 1, 0], [9, 6, 7, 0, 1, 0, 0], [9, 6, 7, 1, 0, 0, 0], [9, 7, 0, 0, 0, 1, 6], [9, 7, 0, 0, 0, 6, 1], [9, 7, 0, 0, 1, 0, 6], [9, 7, 0, 0, 1, 6, 0], [9, 7, 0, 0, 6, 0, 1], [9, 7, 0, 0, 6, 1, 0], [9, 7, 0, 1, 0, 0, 6], [9, 7, 0, 1, 0, 6, 0], [9, 7, 0, 1, 6, 0, 0], [9, 7, 0, 6, 0, 0, 1], [9, 7, 0, 6, 0, 1, 0], [9, 7, 0, 6, 1, 0, 0], [9, 7, 1, 0, 0, 0, 6], [9, 7, 1, 0, 0, 6, 0], [9, 7, 1, 0, 6, 0, 0], [9, 7, 1, 6, 0, 0, 0], [9, 7, 6, 0, 0, 0, 1], [9, 7, 6, 0, 0, 1, 0], [9, 7, 6, 0, 1, 0, 0], [9, 7, 6, 1, 0, 0, 0]])\n assert answers_match(candidate(nums=[1, 2, 3]), [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]])\n assert answers_match(candidate(nums=[-1, 0, 1]), [[-1, 0, 1], [-1, 1, 0], [0, -1, 1], [0, 1, -1], [1, -1, 0], [1, 0, -1]])\n assert answers_match(candidate(nums=[0, 1, 1]), [[0, 1, 1], [1, 0, 1], [1, 1, 0]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0, 0, 0, 0]])\n assert answers_match(candidate(nums=[1, 1, 2, 2]), [[1, 1, 2, 2], [1, 2, 1, 2], [1, 2, 2, 1], [2, 1, 1, 2], [2, 1, 2, 1], [2, 2, 1, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 3, 4, 4, 5]), [[1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 5, 4], [1, 2, 3, 3, 5, 4, 4], [1, 2, 3, 4, 3, 4, 5], [1, 2, 3, 4, 3, 5, 4], [1, 2, 3, 4, 4, 3, 5], [1, 2, 3, 4, 4, 5, 3], [1, 2, 3, 4, 5, 3, 4], [1, 2, 3, 4, 5, 4, 3], [1, 2, 3, 5, 3, 4, 4], [1, 2, 3, 5, 4, 3, 4], [1, 2, 3, 5, 4, 4, 3], [1, 2, 4, 3, 3, 4, 5], [1, 2, 4, 3, 3, 5, 4], [1, 2, 4, 3, 4, 3, 5], [1, 2, 4, 3, 4, 5, 3], [1, 2, 4, 3, 5, 3, 4], [1, 2, 4, 3, 5, 4, 3], [1, 2, 4, 4, 3, 3, 5], [1, 2, 4, 4, 3, 5, 3], [1, 2, 4, 4, 5, 3, 3], [1, 2, 4, 5, 3, 3, 4], [1, 2, 4, 5, 3, 4, 3], [1, 2, 4, 5, 4, 3, 3], [1, 2, 5, 3, 3, 4, 4], [1, 2, 5, 3, 4, 3, 4], [1, 2, 5, 3, 4, 4, 3], [1, 2, 5, 4, 3, 3, 4], [1, 2, 5, 4, 3, 4, 3], [1, 2, 5, 4, 4, 3, 3], [1, 3, 2, 3, 4, 4, 5], [1, 3, 2, 3, 4, 5, 4], [1, 3, 2, 3, 5, 4, 4], [1, 3, 2, 4, 3, 4, 5], [1, 3, 2, 4, 3, 5, 4], [1, 3, 2, 4, 4, 3, 5], [1, 3, 2, 4, 4, 5, 3], [1, 3, 2, 4, 5, 3, 4], [1, 3, 2, 4, 5, 4, 3], [1, 3, 2, 5, 3, 4, 4], [1, 3, 2, 5, 4, 3, 4], [1, 3, 2, 5, 4, 4, 3], [1, 3, 3, 2, 4, 4, 5], [1, 3, 3, 2, 4, 5, 4], [1, 3, 3, 2, 5, 4, 4], [1, 3, 3, 4, 2, 4, 5], [1, 3, 3, 4, 2, 5, 4], [1, 3, 3, 4, 4, 2, 5], [1, 3, 3, 4, 4, 5, 2], [1, 3, 3, 4, 5, 2, 4], [1, 3, 3, 4, 5, 4, 2], [1, 3, 3, 5, 2, 4, 4], [1, 3, 3, 5, 4, 2, 4], [1, 3, 3, 5, 4, 4, 2], [1, 3, 4, 2, 3, 4, 5], [1, 3, 4, 2, 3, 5, 4], [1, 3, 4, 2, 4, 3, 5], [1, 3, 4, 2, 4, 5, 3], [1, 3, 4, 2, 5, 3, 4], [1, 3, 4, 2, 5, 4, 3], [1, 3, 4, 3, 2, 4, 5], [1, 3, 4, 3, 2, 5, 4], [1, 3, 4, 3, 4, 2, 5], [1, 3, 4, 3, 4, 5, 2], [1, 3, 4, 3, 5, 2, 4], [1, 3, 4, 3, 5, 4, 2], [1, 3, 4, 4, 2, 3, 5], [1, 3, 4, 4, 2, 5, 3], [1, 3, 4, 4, 3, 2, 5], [1, 3, 4, 4, 3, 5, 2], [1, 3, 4, 4, 5, 2, 3], [1, 3, 4, 4, 5, 3, 2], [1, 3, 4, 5, 2, 3, 4], [1, 3, 4, 5, 2, 4, 3], [1, 3, 4, 5, 3, 2, 4], [1, 3, 4, 5, 3, 4, 2], [1, 3, 4, 5, 4, 2, 3], [1, 3, 4, 5, 4, 3, 2], [1, 3, 5, 2, 3, 4, 4], [1, 3, 5, 2, 4, 3, 4], [1, 3, 5, 2, 4, 4, 3], [1, 3, 5, 3, 2, 4, 4], [1, 3, 5, 3, 4, 2, 4], [1, 3, 5, 3, 4, 4, 2], [1, 3, 5, 4, 2, 3, 4], [1, 3, 5, 4, 2, 4, 3], [1, 3, 5, 4, 3, 2, 4], [1, 3, 5, 4, 3, 4, 2], [1, 3, 5, 4, 4, 2, 3], [1, 3, 5, 4, 4, 3, 2], [1, 4, 2, 3, 3, 4, 5], [1, 4, 2, 3, 3, 5, 4], [1, 4, 2, 3, 4, 3, 5], [1, 4, 2, 3, 4, 5, 3], [1, 4, 2, 3, 5, 3, 4], [1, 4, 2, 3, 5, 4, 3], [1, 4, 2, 4, 3, 3, 5], [1, 4, 2, 4, 3, 5, 3], [1, 4, 2, 4, 5, 3, 3], [1, 4, 2, 5, 3, 3, 4], [1, 4, 2, 5, 3, 4, 3], [1, 4, 2, 5, 4, 3, 3], [1, 4, 3, 2, 3, 4, 5], [1, 4, 3, 2, 3, 5, 4], [1, 4, 3, 2, 4, 3, 5], [1, 4, 3, 2, 4, 5, 3], [1, 4, 3, 2, 5, 3, 4], [1, 4, 3, 2, 5, 4, 3], [1, 4, 3, 3, 2, 4, 5], [1, 4, 3, 3, 2, 5, 4], [1, 4, 3, 3, 4, 2, 5], [1, 4, 3, 3, 4, 5, 2], [1, 4, 3, 3, 5, 2, 4], [1, 4, 3, 3, 5, 4, 2], [1, 4, 3, 4, 2, 3, 5], [1, 4, 3, 4, 2, 5, 3], [1, 4, 3, 4, 3, 2, 5], [1, 4, 3, 4, 3, 5, 2], [1, 4, 3, 4, 5, 2, 3], [1, 4, 3, 4, 5, 3, 2], [1, 4, 3, 5, 2, 3, 4], [1, 4, 3, 5, 2, 4, 3], [1, 4, 3, 5, 3, 2, 4], [1, 4, 3, 5, 3, 4, 2], [1, 4, 3, 5, 4, 2, 3], [1, 4, 3, 5, 4, 3, 2], [1, 4, 4, 2, 3, 3, 5], [1, 4, 4, 2, 3, 5, 3], [1, 4, 4, 2, 5, 3, 3], [1, 4, 4, 3, 2, 3, 5], [1, 4, 4, 3, 2, 5, 3], [1, 4, 4, 3, 3, 2, 5], [1, 4, 4, 3, 3, 5, 2], [1, 4, 4, 3, 5, 2, 3], [1, 4, 4, 3, 5, 3, 2], [1, 4, 4, 5, 2, 3, 3], [1, 4, 4, 5, 3, 2, 3], [1, 4, 4, 5, 3, 3, 2], [1, 4, 5, 2, 3, 3, 4], [1, 4, 5, 2, 3, 4, 3], [1, 4, 5, 2, 4, 3, 3], [1, 4, 5, 3, 2, 3, 4], [1, 4, 5, 3, 2, 4, 3], [1, 4, 5, 3, 3, 2, 4], [1, 4, 5, 3, 3, 4, 2], [1, 4, 5, 3, 4, 2, 3], [1, 4, 5, 3, 4, 3, 2], [1, 4, 5, 4, 2, 3, 3], [1, 4, 5, 4, 3, 2, 3], [1, 4, 5, 4, 3, 3, 2], [1, 5, 2, 3, 3, 4, 4], [1, 5, 2, 3, 4, 3, 4], [1, 5, 2, 3, 4, 4, 3], [1, 5, 2, 4, 3, 3, 4], [1, 5, 2, 4, 3, 4, 3], [1, 5, 2, 4, 4, 3, 3], [1, 5, 3, 2, 3, 4, 4], [1, 5, 3, 2, 4, 3, 4], [1, 5, 3, 2, 4, 4, 3], [1, 5, 3, 3, 2, 4, 4], [1, 5, 3, 3, 4, 2, 4], [1, 5, 3, 3, 4, 4, 2], [1, 5, 3, 4, 2, 3, 4], [1, 5, 3, 4, 2, 4, 3], [1, 5, 3, 4, 3, 2, 4], [1, 5, 3, 4, 3, 4, 2], [1, 5, 3, 4, 4, 2, 3], [1, 5, 3, 4, 4, 3, 2], [1, 5, 4, 2, 3, 3, 4], [1, 5, 4, 2, 3, 4, 3], [1, 5, 4, 2, 4, 3, 3], [1, 5, 4, 3, 2, 3, 4], [1, 5, 4, 3, 2, 4, 3], [1, 5, 4, 3, 3, 2, 4], [1, 5, 4, 3, 3, 4, 2], [1, 5, 4, 3, 4, 2, 3], [1, 5, 4, 3, 4, 3, 2], [1, 5, 4, 4, 2, 3, 3], [1, 5, 4, 4, 3, 2, 3], [1, 5, 4, 4, 3, 3, 2], [2, 1, 3, 3, 4, 4, 5], [2, 1, 3, 3, 4, 5, 4], [2, 1, 3, 3, 5, 4, 4], [2, 1, 3, 4, 3, 4, 5], [2, 1, 3, 4, 3, 5, 4], [2, 1, 3, 4, 4, 3, 5], [2, 1, 3, 4, 4, 5, 3], [2, 1, 3, 4, 5, 3, 4], [2, 1, 3, 4, 5, 4, 3], [2, 1, 3, 5, 3, 4, 4], [2, 1, 3, 5, 4, 3, 4], [2, 1, 3, 5, 4, 4, 3], [2, 1, 4, 3, 3, 4, 5], [2, 1, 4, 3, 3, 5, 4], [2, 1, 4, 3, 4, 3, 5], [2, 1, 4, 3, 4, 5, 3], [2, 1, 4, 3, 5, 3, 4], [2, 1, 4, 3, 5, 4, 3], [2, 1, 4, 4, 3, 3, 5], [2, 1, 4, 4, 3, 5, 3], [2, 1, 4, 4, 5, 3, 3], [2, 1, 4, 5, 3, 3, 4], [2, 1, 4, 5, 3, 4, 3], [2, 1, 4, 5, 4, 3, 3], [2, 1, 5, 3, 3, 4, 4], [2, 1, 5, 3, 4, 3, 4], [2, 1, 5, 3, 4, 4, 3], [2, 1, 5, 4, 3, 3, 4], [2, 1, 5, 4, 3, 4, 3], [2, 1, 5, 4, 4, 3, 3], [2, 3, 1, 3, 4, 4, 5], [2, 3, 1, 3, 4, 5, 4], [2, 3, 1, 3, 5, 4, 4], [2, 3, 1, 4, 3, 4, 5], [2, 3, 1, 4, 3, 5, 4], [2, 3, 1, 4, 4, 3, 5], [2, 3, 1, 4, 4, 5, 3], [2, 3, 1, 4, 5, 3, 4], [2, 3, 1, 4, 5, 4, 3], [2, 3, 1, 5, 3, 4, 4], [2, 3, 1, 5, 4, 3, 4], [2, 3, 1, 5, 4, 4, 3], [2, 3, 3, 1, 4, 4, 5], [2, 3, 3, 1, 4, 5, 4], [2, 3, 3, 1, 5, 4, 4], [2, 3, 3, 4, 1, 4, 5], [2, 3, 3, 4, 1, 5, 4], [2, 3, 3, 4, 4, 1, 5], [2, 3, 3, 4, 4, 5, 1], [2, 3, 3, 4, 5, 1, 4], [2, 3, 3, 4, 5, 4, 1], [2, 3, 3, 5, 1, 4, 4], [2, 3, 3, 5, 4, 1, 4], [2, 3, 3, 5, 4, 4, 1], [2, 3, 4, 1, 3, 4, 5], [2, 3, 4, 1, 3, 5, 4], [2, 3, 4, 1, 4, 3, 5], [2, 3, 4, 1, 4, 5, 3], [2, 3, 4, 1, 5, 3, 4], [2, 3, 4, 1, 5, 4, 3], [2, 3, 4, 3, 1, 4, 5], [2, 3, 4, 3, 1, 5, 4], [2, 3, 4, 3, 4, 1, 5], [2, 3, 4, 3, 4, 5, 1], [2, 3, 4, 3, 5, 1, 4], [2, 3, 4, 3, 5, 4, 1], [2, 3, 4, 4, 1, 3, 5], [2, 3, 4, 4, 1, 5, 3], [2, 3, 4, 4, 3, 1, 5], [2, 3, 4, 4, 3, 5, 1], [2, 3, 4, 4, 5, 1, 3], [2, 3, 4, 4, 5, 3, 1], [2, 3, 4, 5, 1, 3, 4], [2, 3, 4, 5, 1, 4, 3], [2, 3, 4, 5, 3, 1, 4], [2, 3, 4, 5, 3, 4, 1], [2, 3, 4, 5, 4, 1, 3], [2, 3, 4, 5, 4, 3, 1], [2, 3, 5, 1, 3, 4, 4], [2, 3, 5, 1, 4, 3, 4], [2, 3, 5, 1, 4, 4, 3], [2, 3, 5, 3, 1, 4, 4], [2, 3, 5, 3, 4, 1, 4], [2, 3, 5, 3, 4, 4, 1], [2, 3, 5, 4, 1, 3, 4], [2, 3, 5, 4, 1, 4, 3], [2, 3, 5, 4, 3, 1, 4], [2, 3, 5, 4, 3, 4, 1], [2, 3, 5, 4, 4, 1, 3], [2, 3, 5, 4, 4, 3, 1], [2, 4, 1, 3, 3, 4, 5], [2, 4, 1, 3, 3, 5, 4], [2, 4, 1, 3, 4, 3, 5], [2, 4, 1, 3, 4, 5, 3], [2, 4, 1, 3, 5, 3, 4], [2, 4, 1, 3, 5, 4, 3], [2, 4, 1, 4, 3, 3, 5], [2, 4, 1, 4, 3, 5, 3], [2, 4, 1, 4, 5, 3, 3], [2, 4, 1, 5, 3, 3, 4], [2, 4, 1, 5, 3, 4, 3], [2, 4, 1, 5, 4, 3, 3], [2, 4, 3, 1, 3, 4, 5], [2, 4, 3, 1, 3, 5, 4], [2, 4, 3, 1, 4, 3, 5], [2, 4, 3, 1, 4, 5, 3], [2, 4, 3, 1, 5, 3, 4], [2, 4, 3, 1, 5, 4, 3], [2, 4, 3, 3, 1, 4, 5], [2, 4, 3, 3, 1, 5, 4], [2, 4, 3, 3, 4, 1, 5], [2, 4, 3, 3, 4, 5, 1], [2, 4, 3, 3, 5, 1, 4], [2, 4, 3, 3, 5, 4, 1], [2, 4, 3, 4, 1, 3, 5], [2, 4, 3, 4, 1, 5, 3], [2, 4, 3, 4, 3, 1, 5], [2, 4, 3, 4, 3, 5, 1], [2, 4, 3, 4, 5, 1, 3], [2, 4, 3, 4, 5, 3, 1], [2, 4, 3, 5, 1, 3, 4], [2, 4, 3, 5, 1, 4, 3], [2, 4, 3, 5, 3, 1, 4], [2, 4, 3, 5, 3, 4, 1], [2, 4, 3, 5, 4, 1, 3], [2, 4, 3, 5, 4, 3, 1], [2, 4, 4, 1, 3, 3, 5], [2, 4, 4, 1, 3, 5, 3], [2, 4, 4, 1, 5, 3, 3], [2, 4, 4, 3, 1, 3, 5], [2, 4, 4, 3, 1, 5, 3], [2, 4, 4, 3, 3, 1, 5], [2, 4, 4, 3, 3, 5, 1], [2, 4, 4, 3, 5, 1, 3], [2, 4, 4, 3, 5, 3, 1], [2, 4, 4, 5, 1, 3, 3], [2, 4, 4, 5, 3, 1, 3], [2, 4, 4, 5, 3, 3, 1], [2, 4, 5, 1, 3, 3, 4], [2, 4, 5, 1, 3, 4, 3], [2, 4, 5, 1, 4, 3, 3], [2, 4, 5, 3, 1, 3, 4], [2, 4, 5, 3, 1, 4, 3], [2, 4, 5, 3, 3, 1, 4], [2, 4, 5, 3, 3, 4, 1], [2, 4, 5, 3, 4, 1, 3], [2, 4, 5, 3, 4, 3, 1], [2, 4, 5, 4, 1, 3, 3], [2, 4, 5, 4, 3, 1, 3], [2, 4, 5, 4, 3, 3, 1], [2, 5, 1, 3, 3, 4, 4], [2, 5, 1, 3, 4, 3, 4], [2, 5, 1, 3, 4, 4, 3], [2, 5, 1, 4, 3, 3, 4], [2, 5, 1, 4, 3, 4, 3], [2, 5, 1, 4, 4, 3, 3], [2, 5, 3, 1, 3, 4, 4], [2, 5, 3, 1, 4, 3, 4], [2, 5, 3, 1, 4, 4, 3], [2, 5, 3, 3, 1, 4, 4], [2, 5, 3, 3, 4, 1, 4], [2, 5, 3, 3, 4, 4, 1], [2, 5, 3, 4, 1, 3, 4], [2, 5, 3, 4, 1, 4, 3], [2, 5, 3, 4, 3, 1, 4], [2, 5, 3, 4, 3, 4, 1], [2, 5, 3, 4, 4, 1, 3], [2, 5, 3, 4, 4, 3, 1], [2, 5, 4, 1, 3, 3, 4], [2, 5, 4, 1, 3, 4, 3], [2, 5, 4, 1, 4, 3, 3], [2, 5, 4, 3, 1, 3, 4], [2, 5, 4, 3, 1, 4, 3], [2, 5, 4, 3, 3, 1, 4], [2, 5, 4, 3, 3, 4, 1], [2, 5, 4, 3, 4, 1, 3], [2, 5, 4, 3, 4, 3, 1], [2, 5, 4, 4, 1, 3, 3], [2, 5, 4, 4, 3, 1, 3], [2, 5, 4, 4, 3, 3, 1], [3, 1, 2, 3, 4, 4, 5], [3, 1, 2, 3, 4, 5, 4], [3, 1, 2, 3, 5, 4, 4], [3, 1, 2, 4, 3, 4, 5], [3, 1, 2, 4, 3, 5, 4], [3, 1, 2, 4, 4, 3, 5], [3, 1, 2, 4, 4, 5, 3], [3, 1, 2, 4, 5, 3, 4], [3, 1, 2, 4, 5, 4, 3], [3, 1, 2, 5, 3, 4, 4], [3, 1, 2, 5, 4, 3, 4], [3, 1, 2, 5, 4, 4, 3], [3, 1, 3, 2, 4, 4, 5], [3, 1, 3, 2, 4, 5, 4], [3, 1, 3, 2, 5, 4, 4], [3, 1, 3, 4, 2, 4, 5], [3, 1, 3, 4, 2, 5, 4], [3, 1, 3, 4, 4, 2, 5], [3, 1, 3, 4, 4, 5, 2], [3, 1, 3, 4, 5, 2, 4], [3, 1, 3, 4, 5, 4, 2], [3, 1, 3, 5, 2, 4, 4], [3, 1, 3, 5, 4, 2, 4], [3, 1, 3, 5, 4, 4, 2], [3, 1, 4, 2, 3, 4, 5], [3, 1, 4, 2, 3, 5, 4], [3, 1, 4, 2, 4, 3, 5], [3, 1, 4, 2, 4, 5, 3], [3, 1, 4, 2, 5, 3, 4], [3, 1, 4, 2, 5, 4, 3], [3, 1, 4, 3, 2, 4, 5], [3, 1, 4, 3, 2, 5, 4], [3, 1, 4, 3, 4, 2, 5], [3, 1, 4, 3, 4, 5, 2], [3, 1, 4, 3, 5, 2, 4], [3, 1, 4, 3, 5, 4, 2], [3, 1, 4, 4, 2, 3, 5], [3, 1, 4, 4, 2, 5, 3], [3, 1, 4, 4, 3, 2, 5], [3, 1, 4, 4, 3, 5, 2], [3, 1, 4, 4, 5, 2, 3], [3, 1, 4, 4, 5, 3, 2], [3, 1, 4, 5, 2, 3, 4], [3, 1, 4, 5, 2, 4, 3], [3, 1, 4, 5, 3, 2, 4], [3, 1, 4, 5, 3, 4, 2], [3, 1, 4, 5, 4, 2, 3], [3, 1, 4, 5, 4, 3, 2], [3, 1, 5, 2, 3, 4, 4], [3, 1, 5, 2, 4, 3, 4], [3, 1, 5, 2, 4, 4, 3], [3, 1, 5, 3, 2, 4, 4], [3, 1, 5, 3, 4, 2, 4], [3, 1, 5, 3, 4, 4, 2], [3, 1, 5, 4, 2, 3, 4], [3, 1, 5, 4, 2, 4, 3], [3, 1, 5, 4, 3, 2, 4], [3, 1, 5, 4, 3, 4, 2], [3, 1, 5, 4, 4, 2, 3], [3, 1, 5, 4, 4, 3, 2], [3, 2, 1, 3, 4, 4, 5], [3, 2, 1, 3, 4, 5, 4], [3, 2, 1, 3, 5, 4, 4], [3, 2, 1, 4, 3, 4, 5], [3, 2, 1, 4, 3, 5, 4], [3, 2, 1, 4, 4, 3, 5], [3, 2, 1, 4, 4, 5, 3], [3, 2, 1, 4, 5, 3, 4], [3, 2, 1, 4, 5, 4, 3], [3, 2, 1, 5, 3, 4, 4], [3, 2, 1, 5, 4, 3, 4], [3, 2, 1, 5, 4, 4, 3], [3, 2, 3, 1, 4, 4, 5], [3, 2, 3, 1, 4, 5, 4], [3, 2, 3, 1, 5, 4, 4], [3, 2, 3, 4, 1, 4, 5], [3, 2, 3, 4, 1, 5, 4], [3, 2, 3, 4, 4, 1, 5], [3, 2, 3, 4, 4, 5, 1], [3, 2, 3, 4, 5, 1, 4], [3, 2, 3, 4, 5, 4, 1], [3, 2, 3, 5, 1, 4, 4], [3, 2, 3, 5, 4, 1, 4], [3, 2, 3, 5, 4, 4, 1], [3, 2, 4, 1, 3, 4, 5], [3, 2, 4, 1, 3, 5, 4], [3, 2, 4, 1, 4, 3, 5], [3, 2, 4, 1, 4, 5, 3], [3, 2, 4, 1, 5, 3, 4], [3, 2, 4, 1, 5, 4, 3], [3, 2, 4, 3, 1, 4, 5], [3, 2, 4, 3, 1, 5, 4], [3, 2, 4, 3, 4, 1, 5], [3, 2, 4, 3, 4, 5, 1], [3, 2, 4, 3, 5, 1, 4], [3, 2, 4, 3, 5, 4, 1], [3, 2, 4, 4, 1, 3, 5], [3, 2, 4, 4, 1, 5, 3], [3, 2, 4, 4, 3, 1, 5], [3, 2, 4, 4, 3, 5, 1], [3, 2, 4, 4, 5, 1, 3], [3, 2, 4, 4, 5, 3, 1], [3, 2, 4, 5, 1, 3, 4], [3, 2, 4, 5, 1, 4, 3], [3, 2, 4, 5, 3, 1, 4], [3, 2, 4, 5, 3, 4, 1], [3, 2, 4, 5, 4, 1, 3], [3, 2, 4, 5, 4, 3, 1], [3, 2, 5, 1, 3, 4, 4], [3, 2, 5, 1, 4, 3, 4], [3, 2, 5, 1, 4, 4, 3], [3, 2, 5, 3, 1, 4, 4], [3, 2, 5, 3, 4, 1, 4], [3, 2, 5, 3, 4, 4, 1], [3, 2, 5, 4, 1, 3, 4], [3, 2, 5, 4, 1, 4, 3], [3, 2, 5, 4, 3, 1, 4], [3, 2, 5, 4, 3, 4, 1], [3, 2, 5, 4, 4, 1, 3], [3, 2, 5, 4, 4, 3, 1], [3, 3, 1, 2, 4, 4, 5], [3, 3, 1, 2, 4, 5, 4], [3, 3, 1, 2, 5, 4, 4], [3, 3, 1, 4, 2, 4, 5], [3, 3, 1, 4, 2, 5, 4], [3, 3, 1, 4, 4, 2, 5], [3, 3, 1, 4, 4, 5, 2], [3, 3, 1, 4, 5, 2, 4], [3, 3, 1, 4, 5, 4, 2], [3, 3, 1, 5, 2, 4, 4], [3, 3, 1, 5, 4, 2, 4], [3, 3, 1, 5, 4, 4, 2], [3, 3, 2, 1, 4, 4, 5], [3, 3, 2, 1, 4, 5, 4], [3, 3, 2, 1, 5, 4, 4], [3, 3, 2, 4, 1, 4, 5], [3, 3, 2, 4, 1, 5, 4], [3, 3, 2, 4, 4, 1, 5], [3, 3, 2, 4, 4, 5, 1], [3, 3, 2, 4, 5, 1, 4], [3, 3, 2, 4, 5, 4, 1], [3, 3, 2, 5, 1, 4, 4], [3, 3, 2, 5, 4, 1, 4], [3, 3, 2, 5, 4, 4, 1], [3, 3, 4, 1, 2, 4, 5], [3, 3, 4, 1, 2, 5, 4], [3, 3, 4, 1, 4, 2, 5], [3, 3, 4, 1, 4, 5, 2], [3, 3, 4, 1, 5, 2, 4], [3, 3, 4, 1, 5, 4, 2], [3, 3, 4, 2, 1, 4, 5], [3, 3, 4, 2, 1, 5, 4], [3, 3, 4, 2, 4, 1, 5], [3, 3, 4, 2, 4, 5, 1], [3, 3, 4, 2, 5, 1, 4], [3, 3, 4, 2, 5, 4, 1], [3, 3, 4, 4, 1, 2, 5], [3, 3, 4, 4, 1, 5, 2], [3, 3, 4, 4, 2, 1, 5], [3, 3, 4, 4, 2, 5, 1], [3, 3, 4, 4, 5, 1, 2], [3, 3, 4, 4, 5, 2, 1], [3, 3, 4, 5, 1, 2, 4], [3, 3, 4, 5, 1, 4, 2], [3, 3, 4, 5, 2, 1, 4], [3, 3, 4, 5, 2, 4, 1], [3, 3, 4, 5, 4, 1, 2], [3, 3, 4, 5, 4, 2, 1], [3, 3, 5, 1, 2, 4, 4], [3, 3, 5, 1, 4, 2, 4], [3, 3, 5, 1, 4, 4, 2], [3, 3, 5, 2, 1, 4, 4], [3, 3, 5, 2, 4, 1, 4], [3, 3, 5, 2, 4, 4, 1], [3, 3, 5, 4, 1, 2, 4], [3, 3, 5, 4, 1, 4, 2], [3, 3, 5, 4, 2, 1, 4], [3, 3, 5, 4, 2, 4, 1], [3, 3, 5, 4, 4, 1, 2], [3, 3, 5, 4, 4, 2, 1], [3, 4, 1, 2, 3, 4, 5], [3, 4, 1, 2, 3, 5, 4], [3, 4, 1, 2, 4, 3, 5], [3, 4, 1, 2, 4, 5, 3], [3, 4, 1, 2, 5, 3, 4], [3, 4, 1, 2, 5, 4, 3], [3, 4, 1, 3, 2, 4, 5], [3, 4, 1, 3, 2, 5, 4], [3, 4, 1, 3, 4, 2, 5], [3, 4, 1, 3, 4, 5, 2], [3, 4, 1, 3, 5, 2, 4], [3, 4, 1, 3, 5, 4, 2], [3, 4, 1, 4, 2, 3, 5], [3, 4, 1, 4, 2, 5, 3], [3, 4, 1, 4, 3, 2, 5], [3, 4, 1, 4, 3, 5, 2], [3, 4, 1, 4, 5, 2, 3], [3, 4, 1, 4, 5, 3, 2], [3, 4, 1, 5, 2, 3, 4], [3, 4, 1, 5, 2, 4, 3], [3, 4, 1, 5, 3, 2, 4], [3, 4, 1, 5, 3, 4, 2], [3, 4, 1, 5, 4, 2, 3], [3, 4, 1, 5, 4, 3, 2], [3, 4, 2, 1, 3, 4, 5], [3, 4, 2, 1, 3, 5, 4], [3, 4, 2, 1, 4, 3, 5], [3, 4, 2, 1, 4, 5, 3], [3, 4, 2, 1, 5, 3, 4], [3, 4, 2, 1, 5, 4, 3], [3, 4, 2, 3, 1, 4, 5], [3, 4, 2, 3, 1, 5, 4], [3, 4, 2, 3, 4, 1, 5], [3, 4, 2, 3, 4, 5, 1], [3, 4, 2, 3, 5, 1, 4], [3, 4, 2, 3, 5, 4, 1], [3, 4, 2, 4, 1, 3, 5], [3, 4, 2, 4, 1, 5, 3], [3, 4, 2, 4, 3, 1, 5], [3, 4, 2, 4, 3, 5, 1], [3, 4, 2, 4, 5, 1, 3], [3, 4, 2, 4, 5, 3, 1], [3, 4, 2, 5, 1, 3, 4], [3, 4, 2, 5, 1, 4, 3], [3, 4, 2, 5, 3, 1, 4], [3, 4, 2, 5, 3, 4, 1], [3, 4, 2, 5, 4, 1, 3], [3, 4, 2, 5, 4, 3, 1], [3, 4, 3, 1, 2, 4, 5], [3, 4, 3, 1, 2, 5, 4], [3, 4, 3, 1, 4, 2, 5], [3, 4, 3, 1, 4, 5, 2], [3, 4, 3, 1, 5, 2, 4], [3, 4, 3, 1, 5, 4, 2], [3, 4, 3, 2, 1, 4, 5], [3, 4, 3, 2, 1, 5, 4], [3, 4, 3, 2, 4, 1, 5], [3, 4, 3, 2, 4, 5, 1], [3, 4, 3, 2, 5, 1, 4], [3, 4, 3, 2, 5, 4, 1], [3, 4, 3, 4, 1, 2, 5], [3, 4, 3, 4, 1, 5, 2], [3, 4, 3, 4, 2, 1, 5], [3, 4, 3, 4, 2, 5, 1], [3, 4, 3, 4, 5, 1, 2], [3, 4, 3, 4, 5, 2, 1], [3, 4, 3, 5, 1, 2, 4], [3, 4, 3, 5, 1, 4, 2], [3, 4, 3, 5, 2, 1, 4], [3, 4, 3, 5, 2, 4, 1], [3, 4, 3, 5, 4, 1, 2], [3, 4, 3, 5, 4, 2, 1], [3, 4, 4, 1, 2, 3, 5], [3, 4, 4, 1, 2, 5, 3], [3, 4, 4, 1, 3, 2, 5], [3, 4, 4, 1, 3, 5, 2], [3, 4, 4, 1, 5, 2, 3], [3, 4, 4, 1, 5, 3, 2], [3, 4, 4, 2, 1, 3, 5], [3, 4, 4, 2, 1, 5, 3], [3, 4, 4, 2, 3, 1, 5], [3, 4, 4, 2, 3, 5, 1], [3, 4, 4, 2, 5, 1, 3], [3, 4, 4, 2, 5, 3, 1], [3, 4, 4, 3, 1, 2, 5], [3, 4, 4, 3, 1, 5, 2], [3, 4, 4, 3, 2, 1, 5], [3, 4, 4, 3, 2, 5, 1], [3, 4, 4, 3, 5, 1, 2], [3, 4, 4, 3, 5, 2, 1], [3, 4, 4, 5, 1, 2, 3], [3, 4, 4, 5, 1, 3, 2], [3, 4, 4, 5, 2, 1, 3], [3, 4, 4, 5, 2, 3, 1], [3, 4, 4, 5, 3, 1, 2], [3, 4, 4, 5, 3, 2, 1], [3, 4, 5, 1, 2, 3, 4], [3, 4, 5, 1, 2, 4, 3], [3, 4, 5, 1, 3, 2, 4], [3, 4, 5, 1, 3, 4, 2], [3, 4, 5, 1, 4, 2, 3], [3, 4, 5, 1, 4, 3, 2], [3, 4, 5, 2, 1, 3, 4], [3, 4, 5, 2, 1, 4, 3], [3, 4, 5, 2, 3, 1, 4], [3, 4, 5, 2, 3, 4, 1], [3, 4, 5, 2, 4, 1, 3], [3, 4, 5, 2, 4, 3, 1], [3, 4, 5, 3, 1, 2, 4], [3, 4, 5, 3, 1, 4, 2], [3, 4, 5, 3, 2, 1, 4], [3, 4, 5, 3, 2, 4, 1], [3, 4, 5, 3, 4, 1, 2], [3, 4, 5, 3, 4, 2, 1], [3, 4, 5, 4, 1, 2, 3], [3, 4, 5, 4, 1, 3, 2], [3, 4, 5, 4, 2, 1, 3], [3, 4, 5, 4, 2, 3, 1], [3, 4, 5, 4, 3, 1, 2], [3, 4, 5, 4, 3, 2, 1], [3, 5, 1, 2, 3, 4, 4], [3, 5, 1, 2, 4, 3, 4], [3, 5, 1, 2, 4, 4, 3], [3, 5, 1, 3, 2, 4, 4], [3, 5, 1, 3, 4, 2, 4], [3, 5, 1, 3, 4, 4, 2], [3, 5, 1, 4, 2, 3, 4], [3, 5, 1, 4, 2, 4, 3], [3, 5, 1, 4, 3, 2, 4], [3, 5, 1, 4, 3, 4, 2], [3, 5, 1, 4, 4, 2, 3], [3, 5, 1, 4, 4, 3, 2], [3, 5, 2, 1, 3, 4, 4], [3, 5, 2, 1, 4, 3, 4], [3, 5, 2, 1, 4, 4, 3], [3, 5, 2, 3, 1, 4, 4], [3, 5, 2, 3, 4, 1, 4], [3, 5, 2, 3, 4, 4, 1], [3, 5, 2, 4, 1, 3, 4], [3, 5, 2, 4, 1, 4, 3], [3, 5, 2, 4, 3, 1, 4], [3, 5, 2, 4, 3, 4, 1], [3, 5, 2, 4, 4, 1, 3], [3, 5, 2, 4, 4, 3, 1], [3, 5, 3, 1, 2, 4, 4], [3, 5, 3, 1, 4, 2, 4], [3, 5, 3, 1, 4, 4, 2], [3, 5, 3, 2, 1, 4, 4], [3, 5, 3, 2, 4, 1, 4], [3, 5, 3, 2, 4, 4, 1], [3, 5, 3, 4, 1, 2, 4], [3, 5, 3, 4, 1, 4, 2], [3, 5, 3, 4, 2, 1, 4], [3, 5, 3, 4, 2, 4, 1], [3, 5, 3, 4, 4, 1, 2], [3, 5, 3, 4, 4, 2, 1], [3, 5, 4, 1, 2, 3, 4], [3, 5, 4, 1, 2, 4, 3], [3, 5, 4, 1, 3, 2, 4], [3, 5, 4, 1, 3, 4, 2], [3, 5, 4, 1, 4, 2, 3], [3, 5, 4, 1, 4, 3, 2], [3, 5, 4, 2, 1, 3, 4], [3, 5, 4, 2, 1, 4, 3], [3, 5, 4, 2, 3, 1, 4], [3, 5, 4, 2, 3, 4, 1], [3, 5, 4, 2, 4, 1, 3], [3, 5, 4, 2, 4, 3, 1], [3, 5, 4, 3, 1, 2, 4], [3, 5, 4, 3, 1, 4, 2], [3, 5, 4, 3, 2, 1, 4], [3, 5, 4, 3, 2, 4, 1], [3, 5, 4, 3, 4, 1, 2], [3, 5, 4, 3, 4, 2, 1], [3, 5, 4, 4, 1, 2, 3], [3, 5, 4, 4, 1, 3, 2], [3, 5, 4, 4, 2, 1, 3], [3, 5, 4, 4, 2, 3, 1], [3, 5, 4, 4, 3, 1, 2], [3, 5, 4, 4, 3, 2, 1], [4, 1, 2, 3, 3, 4, 5], [4, 1, 2, 3, 3, 5, 4], [4, 1, 2, 3, 4, 3, 5], [4, 1, 2, 3, 4, 5, 3], [4, 1, 2, 3, 5, 3, 4], [4, 1, 2, 3, 5, 4, 3], [4, 1, 2, 4, 3, 3, 5], [4, 1, 2, 4, 3, 5, 3], [4, 1, 2, 4, 5, 3, 3], [4, 1, 2, 5, 3, 3, 4], [4, 1, 2, 5, 3, 4, 3], [4, 1, 2, 5, 4, 3, 3], [4, 1, 3, 2, 3, 4, 5], [4, 1, 3, 2, 3, 5, 4], [4, 1, 3, 2, 4, 3, 5], [4, 1, 3, 2, 4, 5, 3], [4, 1, 3, 2, 5, 3, 4], [4, 1, 3, 2, 5, 4, 3], [4, 1, 3, 3, 2, 4, 5], [4, 1, 3, 3, 2, 5, 4], [4, 1, 3, 3, 4, 2, 5], [4, 1, 3, 3, 4, 5, 2], [4, 1, 3, 3, 5, 2, 4], [4, 1, 3, 3, 5, 4, 2], [4, 1, 3, 4, 2, 3, 5], [4, 1, 3, 4, 2, 5, 3], [4, 1, 3, 4, 3, 2, 5], [4, 1, 3, 4, 3, 5, 2], [4, 1, 3, 4, 5, 2, 3], [4, 1, 3, 4, 5, 3, 2], [4, 1, 3, 5, 2, 3, 4], [4, 1, 3, 5, 2, 4, 3], [4, 1, 3, 5, 3, 2, 4], [4, 1, 3, 5, 3, 4, 2], [4, 1, 3, 5, 4, 2, 3], [4, 1, 3, 5, 4, 3, 2], [4, 1, 4, 2, 3, 3, 5], [4, 1, 4, 2, 3, 5, 3], [4, 1, 4, 2, 5, 3, 3], [4, 1, 4, 3, 2, 3, 5], [4, 1, 4, 3, 2, 5, 3], [4, 1, 4, 3, 3, 2, 5], [4, 1, 4, 3, 3, 5, 2], [4, 1, 4, 3, 5, 2, 3], [4, 1, 4, 3, 5, 3, 2], [4, 1, 4, 5, 2, 3, 3], [4, 1, 4, 5, 3, 2, 3], [4, 1, 4, 5, 3, 3, 2], [4, 1, 5, 2, 3, 3, 4], [4, 1, 5, 2, 3, 4, 3], [4, 1, 5, 2, 4, 3, 3], [4, 1, 5, 3, 2, 3, 4], [4, 1, 5, 3, 2, 4, 3], [4, 1, 5, 3, 3, 2, 4], [4, 1, 5, 3, 3, 4, 2], [4, 1, 5, 3, 4, 2, 3], [4, 1, 5, 3, 4, 3, 2], [4, 1, 5, 4, 2, 3, 3], [4, 1, 5, 4, 3, 2, 3], [4, 1, 5, 4, 3, 3, 2], [4, 2, 1, 3, 3, 4, 5], [4, 2, 1, 3, 3, 5, 4], [4, 2, 1, 3, 4, 3, 5], [4, 2, 1, 3, 4, 5, 3], [4, 2, 1, 3, 5, 3, 4], [4, 2, 1, 3, 5, 4, 3], [4, 2, 1, 4, 3, 3, 5], [4, 2, 1, 4, 3, 5, 3], [4, 2, 1, 4, 5, 3, 3], [4, 2, 1, 5, 3, 3, 4], [4, 2, 1, 5, 3, 4, 3], [4, 2, 1, 5, 4, 3, 3], [4, 2, 3, 1, 3, 4, 5], [4, 2, 3, 1, 3, 5, 4], [4, 2, 3, 1, 4, 3, 5], [4, 2, 3, 1, 4, 5, 3], [4, 2, 3, 1, 5, 3, 4], [4, 2, 3, 1, 5, 4, 3], [4, 2, 3, 3, 1, 4, 5], [4, 2, 3, 3, 1, 5, 4], [4, 2, 3, 3, 4, 1, 5], [4, 2, 3, 3, 4, 5, 1], [4, 2, 3, 3, 5, 1, 4], [4, 2, 3, 3, 5, 4, 1], [4, 2, 3, 4, 1, 3, 5], [4, 2, 3, 4, 1, 5, 3], [4, 2, 3, 4, 3, 1, 5], [4, 2, 3, 4, 3, 5, 1], [4, 2, 3, 4, 5, 1, 3], [4, 2, 3, 4, 5, 3, 1], [4, 2, 3, 5, 1, 3, 4], [4, 2, 3, 5, 1, 4, 3], [4, 2, 3, 5, 3, 1, 4], [4, 2, 3, 5, 3, 4, 1], [4, 2, 3, 5, 4, 1, 3], [4, 2, 3, 5, 4, 3, 1], [4, 2, 4, 1, 3, 3, 5], [4, 2, 4, 1, 3, 5, 3], [4, 2, 4, 1, 5, 3, 3], [4, 2, 4, 3, 1, 3, 5], [4, 2, 4, 3, 1, 5, 3], [4, 2, 4, 3, 3, 1, 5], [4, 2, 4, 3, 3, 5, 1], [4, 2, 4, 3, 5, 1, 3], [4, 2, 4, 3, 5, 3, 1], [4, 2, 4, 5, 1, 3, 3], [4, 2, 4, 5, 3, 1, 3], [4, 2, 4, 5, 3, 3, 1], [4, 2, 5, 1, 3, 3, 4], [4, 2, 5, 1, 3, 4, 3], [4, 2, 5, 1, 4, 3, 3], [4, 2, 5, 3, 1, 3, 4], [4, 2, 5, 3, 1, 4, 3], [4, 2, 5, 3, 3, 1, 4], [4, 2, 5, 3, 3, 4, 1], [4, 2, 5, 3, 4, 1, 3], [4, 2, 5, 3, 4, 3, 1], [4, 2, 5, 4, 1, 3, 3], [4, 2, 5, 4, 3, 1, 3], [4, 2, 5, 4, 3, 3, 1], [4, 3, 1, 2, 3, 4, 5], [4, 3, 1, 2, 3, 5, 4], [4, 3, 1, 2, 4, 3, 5], [4, 3, 1, 2, 4, 5, 3], [4, 3, 1, 2, 5, 3, 4], [4, 3, 1, 2, 5, 4, 3], [4, 3, 1, 3, 2, 4, 5], [4, 3, 1, 3, 2, 5, 4], [4, 3, 1, 3, 4, 2, 5], [4, 3, 1, 3, 4, 5, 2], [4, 3, 1, 3, 5, 2, 4], [4, 3, 1, 3, 5, 4, 2], [4, 3, 1, 4, 2, 3, 5], [4, 3, 1, 4, 2, 5, 3], [4, 3, 1, 4, 3, 2, 5], [4, 3, 1, 4, 3, 5, 2], [4, 3, 1, 4, 5, 2, 3], [4, 3, 1, 4, 5, 3, 2], [4, 3, 1, 5, 2, 3, 4], [4, 3, 1, 5, 2, 4, 3], [4, 3, 1, 5, 3, 2, 4], [4, 3, 1, 5, 3, 4, 2], [4, 3, 1, 5, 4, 2, 3], [4, 3, 1, 5, 4, 3, 2], [4, 3, 2, 1, 3, 4, 5], [4, 3, 2, 1, 3, 5, 4], [4, 3, 2, 1, 4, 3, 5], [4, 3, 2, 1, 4, 5, 3], [4, 3, 2, 1, 5, 3, 4], [4, 3, 2, 1, 5, 4, 3], [4, 3, 2, 3, 1, 4, 5], [4, 3, 2, 3, 1, 5, 4], [4, 3, 2, 3, 4, 1, 5], [4, 3, 2, 3, 4, 5, 1], [4, 3, 2, 3, 5, 1, 4], [4, 3, 2, 3, 5, 4, 1], [4, 3, 2, 4, 1, 3, 5], [4, 3, 2, 4, 1, 5, 3], [4, 3, 2, 4, 3, 1, 5], [4, 3, 2, 4, 3, 5, 1], [4, 3, 2, 4, 5, 1, 3], [4, 3, 2, 4, 5, 3, 1], [4, 3, 2, 5, 1, 3, 4], [4, 3, 2, 5, 1, 4, 3], [4, 3, 2, 5, 3, 1, 4], [4, 3, 2, 5, 3, 4, 1], [4, 3, 2, 5, 4, 1, 3], [4, 3, 2, 5, 4, 3, 1], [4, 3, 3, 1, 2, 4, 5], [4, 3, 3, 1, 2, 5, 4], [4, 3, 3, 1, 4, 2, 5], [4, 3, 3, 1, 4, 5, 2], [4, 3, 3, 1, 5, 2, 4], [4, 3, 3, 1, 5, 4, 2], [4, 3, 3, 2, 1, 4, 5], [4, 3, 3, 2, 1, 5, 4], [4, 3, 3, 2, 4, 1, 5], [4, 3, 3, 2, 4, 5, 1], [4, 3, 3, 2, 5, 1, 4], [4, 3, 3, 2, 5, 4, 1], [4, 3, 3, 4, 1, 2, 5], [4, 3, 3, 4, 1, 5, 2], [4, 3, 3, 4, 2, 1, 5], [4, 3, 3, 4, 2, 5, 1], [4, 3, 3, 4, 5, 1, 2], [4, 3, 3, 4, 5, 2, 1], [4, 3, 3, 5, 1, 2, 4], [4, 3, 3, 5, 1, 4, 2], [4, 3, 3, 5, 2, 1, 4], [4, 3, 3, 5, 2, 4, 1], [4, 3, 3, 5, 4, 1, 2], [4, 3, 3, 5, 4, 2, 1], [4, 3, 4, 1, 2, 3, 5], [4, 3, 4, 1, 2, 5, 3], [4, 3, 4, 1, 3, 2, 5], [4, 3, 4, 1, 3, 5, 2], [4, 3, 4, 1, 5, 2, 3], [4, 3, 4, 1, 5, 3, 2], [4, 3, 4, 2, 1, 3, 5], [4, 3, 4, 2, 1, 5, 3], [4, 3, 4, 2, 3, 1, 5], [4, 3, 4, 2, 3, 5, 1], [4, 3, 4, 2, 5, 1, 3], [4, 3, 4, 2, 5, 3, 1], [4, 3, 4, 3, 1, 2, 5], [4, 3, 4, 3, 1, 5, 2], [4, 3, 4, 3, 2, 1, 5], [4, 3, 4, 3, 2, 5, 1], [4, 3, 4, 3, 5, 1, 2], [4, 3, 4, 3, 5, 2, 1], [4, 3, 4, 5, 1, 2, 3], [4, 3, 4, 5, 1, 3, 2], [4, 3, 4, 5, 2, 1, 3], [4, 3, 4, 5, 2, 3, 1], [4, 3, 4, 5, 3, 1, 2], [4, 3, 4, 5, 3, 2, 1], [4, 3, 5, 1, 2, 3, 4], [4, 3, 5, 1, 2, 4, 3], [4, 3, 5, 1, 3, 2, 4], [4, 3, 5, 1, 3, 4, 2], [4, 3, 5, 1, 4, 2, 3], [4, 3, 5, 1, 4, 3, 2], [4, 3, 5, 2, 1, 3, 4], [4, 3, 5, 2, 1, 4, 3], [4, 3, 5, 2, 3, 1, 4], [4, 3, 5, 2, 3, 4, 1], [4, 3, 5, 2, 4, 1, 3], [4, 3, 5, 2, 4, 3, 1], [4, 3, 5, 3, 1, 2, 4], [4, 3, 5, 3, 1, 4, 2], [4, 3, 5, 3, 2, 1, 4], [4, 3, 5, 3, 2, 4, 1], [4, 3, 5, 3, 4, 1, 2], [4, 3, 5, 3, 4, 2, 1], [4, 3, 5, 4, 1, 2, 3], [4, 3, 5, 4, 1, 3, 2], [4, 3, 5, 4, 2, 1, 3], [4, 3, 5, 4, 2, 3, 1], [4, 3, 5, 4, 3, 1, 2], [4, 3, 5, 4, 3, 2, 1], [4, 4, 1, 2, 3, 3, 5], [4, 4, 1, 2, 3, 5, 3], [4, 4, 1, 2, 5, 3, 3], [4, 4, 1, 3, 2, 3, 5], [4, 4, 1, 3, 2, 5, 3], [4, 4, 1, 3, 3, 2, 5], [4, 4, 1, 3, 3, 5, 2], [4, 4, 1, 3, 5, 2, 3], [4, 4, 1, 3, 5, 3, 2], [4, 4, 1, 5, 2, 3, 3], [4, 4, 1, 5, 3, 2, 3], [4, 4, 1, 5, 3, 3, 2], [4, 4, 2, 1, 3, 3, 5], [4, 4, 2, 1, 3, 5, 3], [4, 4, 2, 1, 5, 3, 3], [4, 4, 2, 3, 1, 3, 5], [4, 4, 2, 3, 1, 5, 3], [4, 4, 2, 3, 3, 1, 5], [4, 4, 2, 3, 3, 5, 1], [4, 4, 2, 3, 5, 1, 3], [4, 4, 2, 3, 5, 3, 1], [4, 4, 2, 5, 1, 3, 3], [4, 4, 2, 5, 3, 1, 3], [4, 4, 2, 5, 3, 3, 1], [4, 4, 3, 1, 2, 3, 5], [4, 4, 3, 1, 2, 5, 3], [4, 4, 3, 1, 3, 2, 5], [4, 4, 3, 1, 3, 5, 2], [4, 4, 3, 1, 5, 2, 3], [4, 4, 3, 1, 5, 3, 2], [4, 4, 3, 2, 1, 3, 5], [4, 4, 3, 2, 1, 5, 3], [4, 4, 3, 2, 3, 1, 5], [4, 4, 3, 2, 3, 5, 1], [4, 4, 3, 2, 5, 1, 3], [4, 4, 3, 2, 5, 3, 1], [4, 4, 3, 3, 1, 2, 5], [4, 4, 3, 3, 1, 5, 2], [4, 4, 3, 3, 2, 1, 5], [4, 4, 3, 3, 2, 5, 1], [4, 4, 3, 3, 5, 1, 2], [4, 4, 3, 3, 5, 2, 1], [4, 4, 3, 5, 1, 2, 3], [4, 4, 3, 5, 1, 3, 2], [4, 4, 3, 5, 2, 1, 3], [4, 4, 3, 5, 2, 3, 1], [4, 4, 3, 5, 3, 1, 2], [4, 4, 3, 5, 3, 2, 1], [4, 4, 5, 1, 2, 3, 3], [4, 4, 5, 1, 3, 2, 3], [4, 4, 5, 1, 3, 3, 2], [4, 4, 5, 2, 1, 3, 3], [4, 4, 5, 2, 3, 1, 3], [4, 4, 5, 2, 3, 3, 1], [4, 4, 5, 3, 1, 2, 3], [4, 4, 5, 3, 1, 3, 2], [4, 4, 5, 3, 2, 1, 3], [4, 4, 5, 3, 2, 3, 1], [4, 4, 5, 3, 3, 1, 2], [4, 4, 5, 3, 3, 2, 1], [4, 5, 1, 2, 3, 3, 4], [4, 5, 1, 2, 3, 4, 3], [4, 5, 1, 2, 4, 3, 3], [4, 5, 1, 3, 2, 3, 4], [4, 5, 1, 3, 2, 4, 3], [4, 5, 1, 3, 3, 2, 4], [4, 5, 1, 3, 3, 4, 2], [4, 5, 1, 3, 4, 2, 3], [4, 5, 1, 3, 4, 3, 2], [4, 5, 1, 4, 2, 3, 3], [4, 5, 1, 4, 3, 2, 3], [4, 5, 1, 4, 3, 3, 2], [4, 5, 2, 1, 3, 3, 4], [4, 5, 2, 1, 3, 4, 3], [4, 5, 2, 1, 4, 3, 3], [4, 5, 2, 3, 1, 3, 4], [4, 5, 2, 3, 1, 4, 3], [4, 5, 2, 3, 3, 1, 4], [4, 5, 2, 3, 3, 4, 1], [4, 5, 2, 3, 4, 1, 3], [4, 5, 2, 3, 4, 3, 1], [4, 5, 2, 4, 1, 3, 3], [4, 5, 2, 4, 3, 1, 3], [4, 5, 2, 4, 3, 3, 1], [4, 5, 3, 1, 2, 3, 4], [4, 5, 3, 1, 2, 4, 3], [4, 5, 3, 1, 3, 2, 4], [4, 5, 3, 1, 3, 4, 2], [4, 5, 3, 1, 4, 2, 3], [4, 5, 3, 1, 4, 3, 2], [4, 5, 3, 2, 1, 3, 4], [4, 5, 3, 2, 1, 4, 3], [4, 5, 3, 2, 3, 1, 4], [4, 5, 3, 2, 3, 4, 1], [4, 5, 3, 2, 4, 1, 3], [4, 5, 3, 2, 4, 3, 1], [4, 5, 3, 3, 1, 2, 4], [4, 5, 3, 3, 1, 4, 2], [4, 5, 3, 3, 2, 1, 4], [4, 5, 3, 3, 2, 4, 1], [4, 5, 3, 3, 4, 1, 2], [4, 5, 3, 3, 4, 2, 1], [4, 5, 3, 4, 1, 2, 3], [4, 5, 3, 4, 1, 3, 2], [4, 5, 3, 4, 2, 1, 3], [4, 5, 3, 4, 2, 3, 1], [4, 5, 3, 4, 3, 1, 2], [4, 5, 3, 4, 3, 2, 1], [4, 5, 4, 1, 2, 3, 3], [4, 5, 4, 1, 3, 2, 3], [4, 5, 4, 1, 3, 3, 2], [4, 5, 4, 2, 1, 3, 3], [4, 5, 4, 2, 3, 1, 3], [4, 5, 4, 2, 3, 3, 1], [4, 5, 4, 3, 1, 2, 3], [4, 5, 4, 3, 1, 3, 2], [4, 5, 4, 3, 2, 1, 3], [4, 5, 4, 3, 2, 3, 1], [4, 5, 4, 3, 3, 1, 2], [4, 5, 4, 3, 3, 2, 1], [5, 1, 2, 3, 3, 4, 4], [5, 1, 2, 3, 4, 3, 4], [5, 1, 2, 3, 4, 4, 3], [5, 1, 2, 4, 3, 3, 4], [5, 1, 2, 4, 3, 4, 3], [5, 1, 2, 4, 4, 3, 3], [5, 1, 3, 2, 3, 4, 4], [5, 1, 3, 2, 4, 3, 4], [5, 1, 3, 2, 4, 4, 3], [5, 1, 3, 3, 2, 4, 4], [5, 1, 3, 3, 4, 2, 4], [5, 1, 3, 3, 4, 4, 2], [5, 1, 3, 4, 2, 3, 4], [5, 1, 3, 4, 2, 4, 3], [5, 1, 3, 4, 3, 2, 4], [5, 1, 3, 4, 3, 4, 2], [5, 1, 3, 4, 4, 2, 3], [5, 1, 3, 4, 4, 3, 2], [5, 1, 4, 2, 3, 3, 4], [5, 1, 4, 2, 3, 4, 3], [5, 1, 4, 2, 4, 3, 3], [5, 1, 4, 3, 2, 3, 4], [5, 1, 4, 3, 2, 4, 3], [5, 1, 4, 3, 3, 2, 4], [5, 1, 4, 3, 3, 4, 2], [5, 1, 4, 3, 4, 2, 3], [5, 1, 4, 3, 4, 3, 2], [5, 1, 4, 4, 2, 3, 3], [5, 1, 4, 4, 3, 2, 3], [5, 1, 4, 4, 3, 3, 2], [5, 2, 1, 3, 3, 4, 4], [5, 2, 1, 3, 4, 3, 4], [5, 2, 1, 3, 4, 4, 3], [5, 2, 1, 4, 3, 3, 4], [5, 2, 1, 4, 3, 4, 3], [5, 2, 1, 4, 4, 3, 3], [5, 2, 3, 1, 3, 4, 4], [5, 2, 3, 1, 4, 3, 4], [5, 2, 3, 1, 4, 4, 3], [5, 2, 3, 3, 1, 4, 4], [5, 2, 3, 3, 4, 1, 4], [5, 2, 3, 3, 4, 4, 1], [5, 2, 3, 4, 1, 3, 4], [5, 2, 3, 4, 1, 4, 3], [5, 2, 3, 4, 3, 1, 4], [5, 2, 3, 4, 3, 4, 1], [5, 2, 3, 4, 4, 1, 3], [5, 2, 3, 4, 4, 3, 1], [5, 2, 4, 1, 3, 3, 4], [5, 2, 4, 1, 3, 4, 3], [5, 2, 4, 1, 4, 3, 3], [5, 2, 4, 3, 1, 3, 4], [5, 2, 4, 3, 1, 4, 3], [5, 2, 4, 3, 3, 1, 4], [5, 2, 4, 3, 3, 4, 1], [5, 2, 4, 3, 4, 1, 3], [5, 2, 4, 3, 4, 3, 1], [5, 2, 4, 4, 1, 3, 3], [5, 2, 4, 4, 3, 1, 3], [5, 2, 4, 4, 3, 3, 1], [5, 3, 1, 2, 3, 4, 4], [5, 3, 1, 2, 4, 3, 4], [5, 3, 1, 2, 4, 4, 3], [5, 3, 1, 3, 2, 4, 4], [5, 3, 1, 3, 4, 2, 4], [5, 3, 1, 3, 4, 4, 2], [5, 3, 1, 4, 2, 3, 4], [5, 3, 1, 4, 2, 4, 3], [5, 3, 1, 4, 3, 2, 4], [5, 3, 1, 4, 3, 4, 2], [5, 3, 1, 4, 4, 2, 3], [5, 3, 1, 4, 4, 3, 2], [5, 3, 2, 1, 3, 4, 4], [5, 3, 2, 1, 4, 3, 4], [5, 3, 2, 1, 4, 4, 3], [5, 3, 2, 3, 1, 4, 4], [5, 3, 2, 3, 4, 1, 4], [5, 3, 2, 3, 4, 4, 1], [5, 3, 2, 4, 1, 3, 4], [5, 3, 2, 4, 1, 4, 3], [5, 3, 2, 4, 3, 1, 4], [5, 3, 2, 4, 3, 4, 1], [5, 3, 2, 4, 4, 1, 3], [5, 3, 2, 4, 4, 3, 1], [5, 3, 3, 1, 2, 4, 4], [5, 3, 3, 1, 4, 2, 4], [5, 3, 3, 1, 4, 4, 2], [5, 3, 3, 2, 1, 4, 4], [5, 3, 3, 2, 4, 1, 4], [5, 3, 3, 2, 4, 4, 1], [5, 3, 3, 4, 1, 2, 4], [5, 3, 3, 4, 1, 4, 2], [5, 3, 3, 4, 2, 1, 4], [5, 3, 3, 4, 2, 4, 1], [5, 3, 3, 4, 4, 1, 2], [5, 3, 3, 4, 4, 2, 1], [5, 3, 4, 1, 2, 3, 4], [5, 3, 4, 1, 2, 4, 3], [5, 3, 4, 1, 3, 2, 4], [5, 3, 4, 1, 3, 4, 2], [5, 3, 4, 1, 4, 2, 3], [5, 3, 4, 1, 4, 3, 2], [5, 3, 4, 2, 1, 3, 4], [5, 3, 4, 2, 1, 4, 3], [5, 3, 4, 2, 3, 1, 4], [5, 3, 4, 2, 3, 4, 1], [5, 3, 4, 2, 4, 1, 3], [5, 3, 4, 2, 4, 3, 1], [5, 3, 4, 3, 1, 2, 4], [5, 3, 4, 3, 1, 4, 2], [5, 3, 4, 3, 2, 1, 4], [5, 3, 4, 3, 2, 4, 1], [5, 3, 4, 3, 4, 1, 2], [5, 3, 4, 3, 4, 2, 1], [5, 3, 4, 4, 1, 2, 3], [5, 3, 4, 4, 1, 3, 2], [5, 3, 4, 4, 2, 1, 3], [5, 3, 4, 4, 2, 3, 1], [5, 3, 4, 4, 3, 1, 2], [5, 3, 4, 4, 3, 2, 1], [5, 4, 1, 2, 3, 3, 4], [5, 4, 1, 2, 3, 4, 3], [5, 4, 1, 2, 4, 3, 3], [5, 4, 1, 3, 2, 3, 4], [5, 4, 1, 3, 2, 4, 3], [5, 4, 1, 3, 3, 2, 4], [5, 4, 1, 3, 3, 4, 2], [5, 4, 1, 3, 4, 2, 3], [5, 4, 1, 3, 4, 3, 2], [5, 4, 1, 4, 2, 3, 3], [5, 4, 1, 4, 3, 2, 3], [5, 4, 1, 4, 3, 3, 2], [5, 4, 2, 1, 3, 3, 4], [5, 4, 2, 1, 3, 4, 3], [5, 4, 2, 1, 4, 3, 3], [5, 4, 2, 3, 1, 3, 4], [5, 4, 2, 3, 1, 4, 3], [5, 4, 2, 3, 3, 1, 4], [5, 4, 2, 3, 3, 4, 1], [5, 4, 2, 3, 4, 1, 3], [5, 4, 2, 3, 4, 3, 1], [5, 4, 2, 4, 1, 3, 3], [5, 4, 2, 4, 3, 1, 3], [5, 4, 2, 4, 3, 3, 1], [5, 4, 3, 1, 2, 3, 4], [5, 4, 3, 1, 2, 4, 3], [5, 4, 3, 1, 3, 2, 4], [5, 4, 3, 1, 3, 4, 2], [5, 4, 3, 1, 4, 2, 3], [5, 4, 3, 1, 4, 3, 2], [5, 4, 3, 2, 1, 3, 4], [5, 4, 3, 2, 1, 4, 3], [5, 4, 3, 2, 3, 1, 4], [5, 4, 3, 2, 3, 4, 1], [5, 4, 3, 2, 4, 1, 3], [5, 4, 3, 2, 4, 3, 1], [5, 4, 3, 3, 1, 2, 4], [5, 4, 3, 3, 1, 4, 2], [5, 4, 3, 3, 2, 1, 4], [5, 4, 3, 3, 2, 4, 1], [5, 4, 3, 3, 4, 1, 2], [5, 4, 3, 3, 4, 2, 1], [5, 4, 3, 4, 1, 2, 3], [5, 4, 3, 4, 1, 3, 2], [5, 4, 3, 4, 2, 1, 3], [5, 4, 3, 4, 2, 3, 1], [5, 4, 3, 4, 3, 1, 2], [5, 4, 3, 4, 3, 2, 1], [5, 4, 4, 1, 2, 3, 3], [5, 4, 4, 1, 3, 2, 3], [5, 4, 4, 1, 3, 3, 2], [5, 4, 4, 2, 1, 3, 3], [5, 4, 4, 2, 3, 1, 3], [5, 4, 4, 2, 3, 3, 1], [5, 4, 4, 3, 1, 2, 3], [5, 4, 4, 3, 1, 3, 2], [5, 4, 4, 3, 2, 1, 3], [5, 4, 4, 3, 2, 3, 1], [5, 4, 4, 3, 3, 1, 2], [5, 4, 4, 3, 3, 2, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[1, 2, 3, 4], [1, 2, 4, 3], [1, 3, 2, 4], [1, 3, 4, 2], [1, 4, 2, 3], [1, 4, 3, 2], [2, 1, 3, 4], [2, 1, 4, 3], [2, 3, 1, 4], [2, 3, 4, 1], [2, 4, 1, 3], [2, 4, 3, 1], [3, 1, 2, 4], [3, 1, 4, 2], [3, 2, 1, 4], [3, 2, 4, 1], [3, 4, 1, 2], [3, 4, 2, 1], [4, 1, 2, 3], [4, 1, 3, 2], [4, 2, 1, 3], [4, 2, 3, 1], [4, 3, 1, 2], [4, 3, 2, 1]])\n assert answers_match(candidate(nums=[10, 10, 10, 10, 10, 10, 10, 10]), [[10, 10, 10, 10, 10, 10, 10, 10]])\n assert answers_match(candidate(nums=[6, 6, 6, 6, 6, 6, 6]), [[6, 6, 6, 6, 6, 6, 6]])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3]), [[1, 2, 2, 3, 3, 3], [1, 2, 3, 2, 3, 3], [1, 2, 3, 3, 2, 3], [1, 2, 3, 3, 3, 2], [1, 3, 2, 2, 3, 3], [1, 3, 2, 3, 2, 3], [1, 3, 2, 3, 3, 2], [1, 3, 3, 2, 2, 3], [1, 3, 3, 2, 3, 2], [1, 3, 3, 3, 2, 2], [2, 1, 2, 3, 3, 3], [2, 1, 3, 2, 3, 3], [2, 1, 3, 3, 2, 3], [2, 1, 3, 3, 3, 2], [2, 2, 1, 3, 3, 3], [2, 2, 3, 1, 3, 3], [2, 2, 3, 3, 1, 3], [2, 2, 3, 3, 3, 1], [2, 3, 1, 2, 3, 3], [2, 3, 1, 3, 2, 3], [2, 3, 1, 3, 3, 2], [2, 3, 2, 1, 3, 3], [2, 3, 2, 3, 1, 3], [2, 3, 2, 3, 3, 1], [2, 3, 3, 1, 2, 3], [2, 3, 3, 1, 3, 2], [2, 3, 3, 2, 1, 3], [2, 3, 3, 2, 3, 1], [2, 3, 3, 3, 1, 2], [2, 3, 3, 3, 2, 1], [3, 1, 2, 2, 3, 3], [3, 1, 2, 3, 2, 3], [3, 1, 2, 3, 3, 2], [3, 1, 3, 2, 2, 3], [3, 1, 3, 2, 3, 2], [3, 1, 3, 3, 2, 2], [3, 2, 1, 2, 3, 3], [3, 2, 1, 3, 2, 3], [3, 2, 1, 3, 3, 2], [3, 2, 2, 1, 3, 3], [3, 2, 2, 3, 1, 3], [3, 2, 2, 3, 3, 1], [3, 2, 3, 1, 2, 3], [3, 2, 3, 1, 3, 2], [3, 2, 3, 2, 1, 3], [3, 2, 3, 2, 3, 1], [3, 2, 3, 3, 1, 2], [3, 2, 3, 3, 2, 1], [3, 3, 1, 2, 2, 3], [3, 3, 1, 2, 3, 2], [3, 3, 1, 3, 2, 2], [3, 3, 2, 1, 2, 3], [3, 3, 2, 1, 3, 2], [3, 3, 2, 2, 1, 3], [3, 3, 2, 2, 3, 1], [3, 3, 2, 3, 1, 2], [3, 3, 2, 3, 2, 1], [3, 3, 3, 1, 2, 2], [3, 3, 3, 2, 1, 2], [3, 3, 3, 2, 2, 1]])\n assert answers_match(candidate(nums=[6, 6, 6, 6, 6, 6, 6, 6]), [[6, 6, 6, 6, 6, 6, 6, 6]])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 4]), [[1, 2, 2, 3, 4], [1, 2, 2, 4, 3], [1, 2, 3, 2, 4], [1, 2, 3, 4, 2], [1, 2, 4, 2, 3], [1, 2, 4, 3, 2], [1, 3, 2, 2, 4], [1, 3, 2, 4, 2], [1, 3, 4, 2, 2], [1, 4, 2, 2, 3], [1, 4, 2, 3, 2], [1, 4, 3, 2, 2], [2, 1, 2, 3, 4], [2, 1, 2, 4, 3], [2, 1, 3, 2, 4], [2, 1, 3, 4, 2], [2, 1, 4, 2, 3], [2, 1, 4, 3, 2], [2, 2, 1, 3, 4], [2, 2, 1, 4, 3], [2, 2, 3, 1, 4], [2, 2, 3, 4, 1], [2, 2, 4, 1, 3], [2, 2, 4, 3, 1], [2, 3, 1, 2, 4], [2, 3, 1, 4, 2], [2, 3, 2, 1, 4], [2, 3, 2, 4, 1], [2, 3, 4, 1, 2], [2, 3, 4, 2, 1], [2, 4, 1, 2, 3], [2, 4, 1, 3, 2], [2, 4, 2, 1, 3], [2, 4, 2, 3, 1], [2, 4, 3, 1, 2], [2, 4, 3, 2, 1], [3, 1, 2, 2, 4], [3, 1, 2, 4, 2], [3, 1, 4, 2, 2], [3, 2, 1, 2, 4], [3, 2, 1, 4, 2], [3, 2, 2, 1, 4], [3, 2, 2, 4, 1], [3, 2, 4, 1, 2], [3, 2, 4, 2, 1], [3, 4, 1, 2, 2], [3, 4, 2, 1, 2], [3, 4, 2, 2, 1], [4, 1, 2, 2, 3], [4, 1, 2, 3, 2], [4, 1, 3, 2, 2], [4, 2, 1, 2, 3], [4, 2, 1, 3, 2], [4, 2, 2, 1, 3], [4, 2, 2, 3, 1], [4, 2, 3, 1, 2], [4, 2, 3, 2, 1], [4, 3, 1, 2, 2], [4, 3, 2, 1, 2], [4, 3, 2, 2, 1]])\n assert answers_match(candidate(nums=[10, -10, 0, 10, -10]), [[-10, -10, 0, 10, 10], [-10, -10, 10, 0, 10], [-10, -10, 10, 10, 0], [-10, 0, -10, 10, 10], [-10, 0, 10, -10, 10], [-10, 0, 10, 10, -10], [-10, 10, -10, 0, 10], [-10, 10, -10, 10, 0], [-10, 10, 0, -10, 10], [-10, 10, 0, 10, -10], [-10, 10, 10, -10, 0], [-10, 10, 10, 0, -10], [0, -10, -10, 10, 10], [0, -10, 10, -10, 10], [0, -10, 10, 10, -10], [0, 10, -10, -10, 10], [0, 10, -10, 10, -10], [0, 10, 10, -10, -10], [10, -10, -10, 0, 10], [10, -10, -10, 10, 0], [10, -10, 0, -10, 10], [10, -10, 0, 10, -10], [10, -10, 10, -10, 0], [10, -10, 10, 0, -10], [10, 0, -10, -10, 10], [10, 0, -10, 10, -10], [10, 0, 10, -10, -10], [10, 10, -10, -10, 0], [10, 10, -10, 0, -10], [10, 10, 0, -10, -10]])\n assert answers_match(candidate(nums=[8, 8, 8, 8, 8, 8, 8, 8]), [[8, 8, 8, 8, 8, 8, 8, 8]])\n assert answers_match(candidate(nums=[0, 1, 0, 1, 0, 1]), [[0, 0, 0, 1, 1, 1], [0, 0, 1, 0, 1, 1], [0, 0, 1, 1, 0, 1], [0, 0, 1, 1, 1, 0], [0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 1, 0], [0, 1, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0], [0, 1, 1, 1, 0, 0], [1, 0, 0, 0, 1, 1], [1, 0, 0, 1, 0, 1], [1, 0, 0, 1, 1, 0], [1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 1, 0], [1, 0, 1, 1, 0, 0], [1, 1, 0, 0, 0, 1], [1, 1, 0, 0, 1, 0], [1, 1, 0, 1, 0, 0], [1, 1, 1, 0, 0, 0]])\n assert answers_match(candidate(nums=[4, 4, 4, 4, 4]), [[4, 4, 4, 4, 4]])\n assert answers_match(candidate(nums=[0, 1, 0, 1, 0]), [[0, 0, 0, 1, 1], [0, 0, 1, 0, 1], [0, 0, 1, 1, 0], [0, 1, 0, 0, 1], [0, 1, 0, 1, 0], [0, 1, 1, 0, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 0], [1, 0, 1, 0, 0], [1, 1, 0, 0, 0]])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3]), [[1, 1, 2, 2, 3, 3], [1, 1, 2, 3, 2, 3], [1, 1, 2, 3, 3, 2], [1, 1, 3, 2, 2, 3], [1, 1, 3, 2, 3, 2], [1, 1, 3, 3, 2, 2], [1, 2, 1, 2, 3, 3], [1, 2, 1, 3, 2, 3], [1, 2, 1, 3, 3, 2], [1, 2, 2, 1, 3, 3], [1, 2, 2, 3, 1, 3], [1, 2, 2, 3, 3, 1], [1, 2, 3, 1, 2, 3], [1, 2, 3, 1, 3, 2], [1, 2, 3, 2, 1, 3], [1, 2, 3, 2, 3, 1], [1, 2, 3, 3, 1, 2], [1, 2, 3, 3, 2, 1], [1, 3, 1, 2, 2, 3], [1, 3, 1, 2, 3, 2], [1, 3, 1, 3, 2, 2], [1, 3, 2, 1, 2, 3], [1, 3, 2, 1, 3, 2], [1, 3, 2, 2, 1, 3], [1, 3, 2, 2, 3, 1], [1, 3, 2, 3, 1, 2], [1, 3, 2, 3, 2, 1], [1, 3, 3, 1, 2, 2], [1, 3, 3, 2, 1, 2], [1, 3, 3, 2, 2, 1], [2, 1, 1, 2, 3, 3], [2, 1, 1, 3, 2, 3], [2, 1, 1, 3, 3, 2], [2, 1, 2, 1, 3, 3], [2, 1, 2, 3, 1, 3], [2, 1, 2, 3, 3, 1], [2, 1, 3, 1, 2, 3], [2, 1, 3, 1, 3, 2], [2, 1, 3, 2, 1, 3], [2, 1, 3, 2, 3, 1], [2, 1, 3, 3, 1, 2], [2, 1, 3, 3, 2, 1], [2, 2, 1, 1, 3, 3], [2, 2, 1, 3, 1, 3], [2, 2, 1, 3, 3, 1], [2, 2, 3, 1, 1, 3], [2, 2, 3, 1, 3, 1], [2, 2, 3, 3, 1, 1], [2, 3, 1, 1, 2, 3], [2, 3, 1, 1, 3, 2], [2, 3, 1, 2, 1, 3], [2, 3, 1, 2, 3, 1], [2, 3, 1, 3, 1, 2], [2, 3, 1, 3, 2, 1], [2, 3, 2, 1, 1, 3], [2, 3, 2, 1, 3, 1], [2, 3, 2, 3, 1, 1], [2, 3, 3, 1, 1, 2], [2, 3, 3, 1, 2, 1], [2, 3, 3, 2, 1, 1], [3, 1, 1, 2, 2, 3], [3, 1, 1, 2, 3, 2], [3, 1, 1, 3, 2, 2], [3, 1, 2, 1, 2, 3], [3, 1, 2, 1, 3, 2], [3, 1, 2, 2, 1, 3], [3, 1, 2, 2, 3, 1], [3, 1, 2, 3, 1, 2], [3, 1, 2, 3, 2, 1], [3, 1, 3, 1, 2, 2], [3, 1, 3, 2, 1, 2], [3, 1, 3, 2, 2, 1], [3, 2, 1, 1, 2, 3], [3, 2, 1, 1, 3, 2], [3, 2, 1, 2, 1, 3], [3, 2, 1, 2, 3, 1], [3, 2, 1, 3, 1, 2], [3, 2, 1, 3, 2, 1], [3, 2, 2, 1, 1, 3], [3, 2, 2, 1, 3, 1], [3, 2, 2, 3, 1, 1], [3, 2, 3, 1, 1, 2], [3, 2, 3, 1, 2, 1], [3, 2, 3, 2, 1, 1], [3, 3, 1, 1, 2, 2], [3, 3, 1, 2, 1, 2], [3, 3, 1, 2, 2, 1], [3, 3, 2, 1, 1, 2], [3, 3, 2, 1, 2, 1], [3, 3, 2, 2, 1, 1]])\n assert answers_match(candidate(nums=[-10, 10, -10, 10, -10, 10, -10, 10]), [[-10, -10, -10, -10, 10, 10, 10, 10], [-10, -10, -10, 10, -10, 10, 10, 10], [-10, -10, -10, 10, 10, -10, 10, 10], [-10, -10, -10, 10, 10, 10, -10, 10], [-10, -10, -10, 10, 10, 10, 10, -10], [-10, -10, 10, -10, -10, 10, 10, 10], [-10, -10, 10, -10, 10, -10, 10, 10], [-10, -10, 10, -10, 10, 10, -10, 10], [-10, -10, 10, -10, 10, 10, 10, -10], [-10, -10, 10, 10, -10, -10, 10, 10], [-10, -10, 10, 10, -10, 10, -10, 10], [-10, -10, 10, 10, -10, 10, 10, -10], [-10, -10, 10, 10, 10, -10, -10, 10], [-10, -10, 10, 10, 10, -10, 10, -10], [-10, -10, 10, 10, 10, 10, -10, -10], [-10, 10, -10, -10, -10, 10, 10, 10], [-10, 10, -10, -10, 10, -10, 10, 10], [-10, 10, -10, -10, 10, 10, -10, 10], [-10, 10, -10, -10, 10, 10, 10, -10], [-10, 10, -10, 10, -10, -10, 10, 10], [-10, 10, -10, 10, -10, 10, -10, 10], [-10, 10, -10, 10, -10, 10, 10, -10], [-10, 10, -10, 10, 10, -10, -10, 10], [-10, 10, -10, 10, 10, -10, 10, -10], [-10, 10, -10, 10, 10, 10, -10, -10], [-10, 10, 10, -10, -10, -10, 10, 10], [-10, 10, 10, -10, -10, 10, -10, 10], [-10, 10, 10, -10, -10, 10, 10, -10], [-10, 10, 10, -10, 10, -10, -10, 10], [-10, 10, 10, -10, 10, -10, 10, -10], [-10, 10, 10, -10, 10, 10, -10, -10], [-10, 10, 10, 10, -10, -10, -10, 10], [-10, 10, 10, 10, -10, -10, 10, -10], [-10, 10, 10, 10, -10, 10, -10, -10], [-10, 10, 10, 10, 10, -10, -10, -10], [10, -10, -10, -10, -10, 10, 10, 10], [10, -10, -10, -10, 10, -10, 10, 10], [10, -10, -10, -10, 10, 10, -10, 10], [10, -10, -10, -10, 10, 10, 10, -10], [10, -10, -10, 10, -10, -10, 10, 10], [10, -10, -10, 10, -10, 10, -10, 10], [10, -10, -10, 10, -10, 10, 10, -10], [10, -10, -10, 10, 10, -10, -10, 10], [10, -10, -10, 10, 10, -10, 10, -10], [10, -10, -10, 10, 10, 10, -10, -10], [10, -10, 10, -10, -10, -10, 10, 10], [10, -10, 10, -10, -10, 10, -10, 10], [10, -10, 10, -10, -10, 10, 10, -10], [10, -10, 10, -10, 10, -10, -10, 10], [10, -10, 10, -10, 10, -10, 10, -10], [10, -10, 10, -10, 10, 10, -10, -10], [10, -10, 10, 10, -10, -10, -10, 10], [10, -10, 10, 10, -10, -10, 10, -10], [10, -10, 10, 10, -10, 10, -10, -10], [10, -10, 10, 10, 10, -10, -10, -10], [10, 10, -10, -10, -10, -10, 10, 10], [10, 10, -10, -10, -10, 10, -10, 10], [10, 10, -10, -10, -10, 10, 10, -10], [10, 10, -10, -10, 10, -10, -10, 10], [10, 10, -10, -10, 10, -10, 10, -10], [10, 10, -10, -10, 10, 10, -10, -10], [10, 10, -10, 10, -10, -10, -10, 10], [10, 10, -10, 10, -10, -10, 10, -10], [10, 10, -10, 10, -10, 10, -10, -10], [10, 10, -10, 10, 10, -10, -10, -10], [10, 10, 10, -10, -10, -10, -10, 10], [10, 10, 10, -10, -10, -10, 10, -10], [10, 10, 10, -10, -10, 10, -10, -10], [10, 10, 10, -10, 10, -10, -10, -10], [10, 10, 10, 10, -10, -10, -10, -10]])\n assert answers_match(candidate(nums=[7, 0, 7, 0, 7, 0]), [[0, 0, 0, 7, 7, 7], [0, 0, 7, 0, 7, 7], [0, 0, 7, 7, 0, 7], [0, 0, 7, 7, 7, 0], [0, 7, 0, 0, 7, 7], [0, 7, 0, 7, 0, 7], [0, 7, 0, 7, 7, 0], [0, 7, 7, 0, 0, 7], [0, 7, 7, 0, 7, 0], [0, 7, 7, 7, 0, 0], [7, 0, 0, 0, 7, 7], [7, 0, 0, 7, 0, 7], [7, 0, 0, 7, 7, 0], [7, 0, 7, 0, 0, 7], [7, 0, 7, 0, 7, 0], [7, 0, 7, 7, 0, 0], [7, 7, 0, 0, 0, 7], [7, 7, 0, 0, 7, 0], [7, 7, 0, 7, 0, 0], [7, 7, 7, 0, 0, 0]])\n assert answers_match(candidate(nums=[5, 5, 5, 5]), [[5, 5, 5, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6]), [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 6, 5], [1, 2, 3, 5, 4, 6], [1, 2, 3, 5, 6, 4], [1, 2, 3, 6, 4, 5], [1, 2, 3, 6, 5, 4], [1, 2, 4, 3, 5, 6], [1, 2, 4, 3, 6, 5], [1, 2, 4, 5, 3, 6], [1, 2, 4, 5, 6, 3], [1, 2, 4, 6, 3, 5], [1, 2, 4, 6, 5, 3], [1, 2, 5, 3, 4, 6], [1, 2, 5, 3, 6, 4], [1, 2, 5, 4, 3, 6], [1, 2, 5, 4, 6, 3], [1, 2, 5, 6, 3, 4], [1, 2, 5, 6, 4, 3], [1, 2, 6, 3, 4, 5], [1, 2, 6, 3, 5, 4], [1, 2, 6, 4, 3, 5], [1, 2, 6, 4, 5, 3], [1, 2, 6, 5, 3, 4], [1, 2, 6, 5, 4, 3], [1, 3, 2, 4, 5, 6], [1, 3, 2, 4, 6, 5], [1, 3, 2, 5, 4, 6], [1, 3, 2, 5, 6, 4], [1, 3, 2, 6, 4, 5], [1, 3, 2, 6, 5, 4], [1, 3, 4, 2, 5, 6], [1, 3, 4, 2, 6, 5], [1, 3, 4, 5, 2, 6], [1, 3, 4, 5, 6, 2], [1, 3, 4, 6, 2, 5], [1, 3, 4, 6, 5, 2], [1, 3, 5, 2, 4, 6], [1, 3, 5, 2, 6, 4], [1, 3, 5, 4, 2, 6], [1, 3, 5, 4, 6, 2], [1, 3, 5, 6, 2, 4], [1, 3, 5, 6, 4, 2], [1, 3, 6, 2, 4, 5], [1, 3, 6, 2, 5, 4], [1, 3, 6, 4, 2, 5], [1, 3, 6, 4, 5, 2], [1, 3, 6, 5, 2, 4], [1, 3, 6, 5, 4, 2], [1, 4, 2, 3, 5, 6], [1, 4, 2, 3, 6, 5], [1, 4, 2, 5, 3, 6], [1, 4, 2, 5, 6, 3], [1, 4, 2, 6, 3, 5], [1, 4, 2, 6, 5, 3], [1, 4, 3, 2, 5, 6], [1, 4, 3, 2, 6, 5], [1, 4, 3, 5, 2, 6], [1, 4, 3, 5, 6, 2], [1, 4, 3, 6, 2, 5], [1, 4, 3, 6, 5, 2], [1, 4, 5, 2, 3, 6], [1, 4, 5, 2, 6, 3], [1, 4, 5, 3, 2, 6], [1, 4, 5, 3, 6, 2], [1, 4, 5, 6, 2, 3], [1, 4, 5, 6, 3, 2], [1, 4, 6, 2, 3, 5], [1, 4, 6, 2, 5, 3], [1, 4, 6, 3, 2, 5], [1, 4, 6, 3, 5, 2], [1, 4, 6, 5, 2, 3], [1, 4, 6, 5, 3, 2], [1, 5, 2, 3, 4, 6], [1, 5, 2, 3, 6, 4], [1, 5, 2, 4, 3, 6], [1, 5, 2, 4, 6, 3], [1, 5, 2, 6, 3, 4], [1, 5, 2, 6, 4, 3], [1, 5, 3, 2, 4, 6], [1, 5, 3, 2, 6, 4], [1, 5, 3, 4, 2, 6], [1, 5, 3, 4, 6, 2], [1, 5, 3, 6, 2, 4], [1, 5, 3, 6, 4, 2], [1, 5, 4, 2, 3, 6], [1, 5, 4, 2, 6, 3], [1, 5, 4, 3, 2, 6], [1, 5, 4, 3, 6, 2], [1, 5, 4, 6, 2, 3], [1, 5, 4, 6, 3, 2], [1, 5, 6, 2, 3, 4], [1, 5, 6, 2, 4, 3], [1, 5, 6, 3, 2, 4], [1, 5, 6, 3, 4, 2], [1, 5, 6, 4, 2, 3], [1, 5, 6, 4, 3, 2], [1, 6, 2, 3, 4, 5], [1, 6, 2, 3, 5, 4], [1, 6, 2, 4, 3, 5], [1, 6, 2, 4, 5, 3], [1, 6, 2, 5, 3, 4], [1, 6, 2, 5, 4, 3], [1, 6, 3, 2, 4, 5], [1, 6, 3, 2, 5, 4], [1, 6, 3, 4, 2, 5], [1, 6, 3, 4, 5, 2], [1, 6, 3, 5, 2, 4], [1, 6, 3, 5, 4, 2], [1, 6, 4, 2, 3, 5], [1, 6, 4, 2, 5, 3], [1, 6, 4, 3, 2, 5], [1, 6, 4, 3, 5, 2], [1, 6, 4, 5, 2, 3], [1, 6, 4, 5, 3, 2], [1, 6, 5, 2, 3, 4], [1, 6, 5, 2, 4, 3], [1, 6, 5, 3, 2, 4], [1, 6, 5, 3, 4, 2], [1, 6, 5, 4, 2, 3], [1, 6, 5, 4, 3, 2], [2, 1, 3, 4, 5, 6], [2, 1, 3, 4, 6, 5], [2, 1, 3, 5, 4, 6], [2, 1, 3, 5, 6, 4], [2, 1, 3, 6, 4, 5], [2, 1, 3, 6, 5, 4], [2, 1, 4, 3, 5, 6], [2, 1, 4, 3, 6, 5], [2, 1, 4, 5, 3, 6], [2, 1, 4, 5, 6, 3], [2, 1, 4, 6, 3, 5], [2, 1, 4, 6, 5, 3], [2, 1, 5, 3, 4, 6], [2, 1, 5, 3, 6, 4], [2, 1, 5, 4, 3, 6], [2, 1, 5, 4, 6, 3], [2, 1, 5, 6, 3, 4], [2, 1, 5, 6, 4, 3], [2, 1, 6, 3, 4, 5], [2, 1, 6, 3, 5, 4], [2, 1, 6, 4, 3, 5], [2, 1, 6, 4, 5, 3], [2, 1, 6, 5, 3, 4], [2, 1, 6, 5, 4, 3], [2, 3, 1, 4, 5, 6], [2, 3, 1, 4, 6, 5], [2, 3, 1, 5, 4, 6], [2, 3, 1, 5, 6, 4], [2, 3, 1, 6, 4, 5], [2, 3, 1, 6, 5, 4], [2, 3, 4, 1, 5, 6], [2, 3, 4, 1, 6, 5], [2, 3, 4, 5, 1, 6], [2, 3, 4, 5, 6, 1], [2, 3, 4, 6, 1, 5], [2, 3, 4, 6, 5, 1], [2, 3, 5, 1, 4, 6], [2, 3, 5, 1, 6, 4], [2, 3, 5, 4, 1, 6], [2, 3, 5, 4, 6, 1], [2, 3, 5, 6, 1, 4], [2, 3, 5, 6, 4, 1], [2, 3, 6, 1, 4, 5], [2, 3, 6, 1, 5, 4], [2, 3, 6, 4, 1, 5], [2, 3, 6, 4, 5, 1], [2, 3, 6, 5, 1, 4], [2, 3, 6, 5, 4, 1], [2, 4, 1, 3, 5, 6], [2, 4, 1, 3, 6, 5], [2, 4, 1, 5, 3, 6], [2, 4, 1, 5, 6, 3], [2, 4, 1, 6, 3, 5], [2, 4, 1, 6, 5, 3], [2, 4, 3, 1, 5, 6], [2, 4, 3, 1, 6, 5], [2, 4, 3, 5, 1, 6], [2, 4, 3, 5, 6, 1], [2, 4, 3, 6, 1, 5], [2, 4, 3, 6, 5, 1], [2, 4, 5, 1, 3, 6], [2, 4, 5, 1, 6, 3], [2, 4, 5, 3, 1, 6], [2, 4, 5, 3, 6, 1], [2, 4, 5, 6, 1, 3], [2, 4, 5, 6, 3, 1], [2, 4, 6, 1, 3, 5], [2, 4, 6, 1, 5, 3], [2, 4, 6, 3, 1, 5], [2, 4, 6, 3, 5, 1], [2, 4, 6, 5, 1, 3], [2, 4, 6, 5, 3, 1], [2, 5, 1, 3, 4, 6], [2, 5, 1, 3, 6, 4], [2, 5, 1, 4, 3, 6], [2, 5, 1, 4, 6, 3], [2, 5, 1, 6, 3, 4], [2, 5, 1, 6, 4, 3], [2, 5, 3, 1, 4, 6], [2, 5, 3, 1, 6, 4], [2, 5, 3, 4, 1, 6], [2, 5, 3, 4, 6, 1], [2, 5, 3, 6, 1, 4], [2, 5, 3, 6, 4, 1], [2, 5, 4, 1, 3, 6], [2, 5, 4, 1, 6, 3], [2, 5, 4, 3, 1, 6], [2, 5, 4, 3, 6, 1], [2, 5, 4, 6, 1, 3], [2, 5, 4, 6, 3, 1], [2, 5, 6, 1, 3, 4], [2, 5, 6, 1, 4, 3], [2, 5, 6, 3, 1, 4], [2, 5, 6, 3, 4, 1], [2, 5, 6, 4, 1, 3], [2, 5, 6, 4, 3, 1], [2, 6, 1, 3, 4, 5], [2, 6, 1, 3, 5, 4], [2, 6, 1, 4, 3, 5], [2, 6, 1, 4, 5, 3], [2, 6, 1, 5, 3, 4], [2, 6, 1, 5, 4, 3], [2, 6, 3, 1, 4, 5], [2, 6, 3, 1, 5, 4], [2, 6, 3, 4, 1, 5], [2, 6, 3, 4, 5, 1], [2, 6, 3, 5, 1, 4], [2, 6, 3, 5, 4, 1], [2, 6, 4, 1, 3, 5], [2, 6, 4, 1, 5, 3], [2, 6, 4, 3, 1, 5], [2, 6, 4, 3, 5, 1], [2, 6, 4, 5, 1, 3], [2, 6, 4, 5, 3, 1], [2, 6, 5, 1, 3, 4], [2, 6, 5, 1, 4, 3], [2, 6, 5, 3, 1, 4], [2, 6, 5, 3, 4, 1], [2, 6, 5, 4, 1, 3], [2, 6, 5, 4, 3, 1], [3, 1, 2, 4, 5, 6], [3, 1, 2, 4, 6, 5], [3, 1, 2, 5, 4, 6], [3, 1, 2, 5, 6, 4], [3, 1, 2, 6, 4, 5], [3, 1, 2, 6, 5, 4], [3, 1, 4, 2, 5, 6], [3, 1, 4, 2, 6, 5], [3, 1, 4, 5, 2, 6], [3, 1, 4, 5, 6, 2], [3, 1, 4, 6, 2, 5], [3, 1, 4, 6, 5, 2], [3, 1, 5, 2, 4, 6], [3, 1, 5, 2, 6, 4], [3, 1, 5, 4, 2, 6], [3, 1, 5, 4, 6, 2], [3, 1, 5, 6, 2, 4], [3, 1, 5, 6, 4, 2], [3, 1, 6, 2, 4, 5], [3, 1, 6, 2, 5, 4], [3, 1, 6, 4, 2, 5], [3, 1, 6, 4, 5, 2], [3, 1, 6, 5, 2, 4], [3, 1, 6, 5, 4, 2], [3, 2, 1, 4, 5, 6], [3, 2, 1, 4, 6, 5], [3, 2, 1, 5, 4, 6], [3, 2, 1, 5, 6, 4], [3, 2, 1, 6, 4, 5], [3, 2, 1, 6, 5, 4], [3, 2, 4, 1, 5, 6], [3, 2, 4, 1, 6, 5], [3, 2, 4, 5, 1, 6], [3, 2, 4, 5, 6, 1], [3, 2, 4, 6, 1, 5], [3, 2, 4, 6, 5, 1], [3, 2, 5, 1, 4, 6], [3, 2, 5, 1, 6, 4], [3, 2, 5, 4, 1, 6], [3, 2, 5, 4, 6, 1], [3, 2, 5, 6, 1, 4], [3, 2, 5, 6, 4, 1], [3, 2, 6, 1, 4, 5], [3, 2, 6, 1, 5, 4], [3, 2, 6, 4, 1, 5], [3, 2, 6, 4, 5, 1], [3, 2, 6, 5, 1, 4], [3, 2, 6, 5, 4, 1], [3, 4, 1, 2, 5, 6], [3, 4, 1, 2, 6, 5], [3, 4, 1, 5, 2, 6], [3, 4, 1, 5, 6, 2], [3, 4, 1, 6, 2, 5], [3, 4, 1, 6, 5, 2], [3, 4, 2, 1, 5, 6], [3, 4, 2, 1, 6, 5], [3, 4, 2, 5, 1, 6], [3, 4, 2, 5, 6, 1], [3, 4, 2, 6, 1, 5], [3, 4, 2, 6, 5, 1], [3, 4, 5, 1, 2, 6], [3, 4, 5, 1, 6, 2], [3, 4, 5, 2, 1, 6], [3, 4, 5, 2, 6, 1], [3, 4, 5, 6, 1, 2], [3, 4, 5, 6, 2, 1], [3, 4, 6, 1, 2, 5], [3, 4, 6, 1, 5, 2], [3, 4, 6, 2, 1, 5], [3, 4, 6, 2, 5, 1], [3, 4, 6, 5, 1, 2], [3, 4, 6, 5, 2, 1], [3, 5, 1, 2, 4, 6], [3, 5, 1, 2, 6, 4], [3, 5, 1, 4, 2, 6], [3, 5, 1, 4, 6, 2], [3, 5, 1, 6, 2, 4], [3, 5, 1, 6, 4, 2], [3, 5, 2, 1, 4, 6], [3, 5, 2, 1, 6, 4], [3, 5, 2, 4, 1, 6], [3, 5, 2, 4, 6, 1], [3, 5, 2, 6, 1, 4], [3, 5, 2, 6, 4, 1], [3, 5, 4, 1, 2, 6], [3, 5, 4, 1, 6, 2], [3, 5, 4, 2, 1, 6], [3, 5, 4, 2, 6, 1], [3, 5, 4, 6, 1, 2], [3, 5, 4, 6, 2, 1], [3, 5, 6, 1, 2, 4], [3, 5, 6, 1, 4, 2], [3, 5, 6, 2, 1, 4], [3, 5, 6, 2, 4, 1], [3, 5, 6, 4, 1, 2], [3, 5, 6, 4, 2, 1], [3, 6, 1, 2, 4, 5], [3, 6, 1, 2, 5, 4], [3, 6, 1, 4, 2, 5], [3, 6, 1, 4, 5, 2], [3, 6, 1, 5, 2, 4], [3, 6, 1, 5, 4, 2], [3, 6, 2, 1, 4, 5], [3, 6, 2, 1, 5, 4], [3, 6, 2, 4, 1, 5], [3, 6, 2, 4, 5, 1], [3, 6, 2, 5, 1, 4], [3, 6, 2, 5, 4, 1], [3, 6, 4, 1, 2, 5], [3, 6, 4, 1, 5, 2], [3, 6, 4, 2, 1, 5], [3, 6, 4, 2, 5, 1], [3, 6, 4, 5, 1, 2], [3, 6, 4, 5, 2, 1], [3, 6, 5, 1, 2, 4], [3, 6, 5, 1, 4, 2], [3, 6, 5, 2, 1, 4], [3, 6, 5, 2, 4, 1], [3, 6, 5, 4, 1, 2], [3, 6, 5, 4, 2, 1], [4, 1, 2, 3, 5, 6], [4, 1, 2, 3, 6, 5], [4, 1, 2, 5, 3, 6], [4, 1, 2, 5, 6, 3], [4, 1, 2, 6, 3, 5], [4, 1, 2, 6, 5, 3], [4, 1, 3, 2, 5, 6], [4, 1, 3, 2, 6, 5], [4, 1, 3, 5, 2, 6], [4, 1, 3, 5, 6, 2], [4, 1, 3, 6, 2, 5], [4, 1, 3, 6, 5, 2], [4, 1, 5, 2, 3, 6], [4, 1, 5, 2, 6, 3], [4, 1, 5, 3, 2, 6], [4, 1, 5, 3, 6, 2], [4, 1, 5, 6, 2, 3], [4, 1, 5, 6, 3, 2], [4, 1, 6, 2, 3, 5], [4, 1, 6, 2, 5, 3], [4, 1, 6, 3, 2, 5], [4, 1, 6, 3, 5, 2], [4, 1, 6, 5, 2, 3], [4, 1, 6, 5, 3, 2], [4, 2, 1, 3, 5, 6], [4, 2, 1, 3, 6, 5], [4, 2, 1, 5, 3, 6], [4, 2, 1, 5, 6, 3], [4, 2, 1, 6, 3, 5], [4, 2, 1, 6, 5, 3], [4, 2, 3, 1, 5, 6], [4, 2, 3, 1, 6, 5], [4, 2, 3, 5, 1, 6], [4, 2, 3, 5, 6, 1], [4, 2, 3, 6, 1, 5], [4, 2, 3, 6, 5, 1], [4, 2, 5, 1, 3, 6], [4, 2, 5, 1, 6, 3], [4, 2, 5, 3, 1, 6], [4, 2, 5, 3, 6, 1], [4, 2, 5, 6, 1, 3], [4, 2, 5, 6, 3, 1], [4, 2, 6, 1, 3, 5], [4, 2, 6, 1, 5, 3], [4, 2, 6, 3, 1, 5], [4, 2, 6, 3, 5, 1], [4, 2, 6, 5, 1, 3], [4, 2, 6, 5, 3, 1], [4, 3, 1, 2, 5, 6], [4, 3, 1, 2, 6, 5], [4, 3, 1, 5, 2, 6], [4, 3, 1, 5, 6, 2], [4, 3, 1, 6, 2, 5], [4, 3, 1, 6, 5, 2], [4, 3, 2, 1, 5, 6], [4, 3, 2, 1, 6, 5], [4, 3, 2, 5, 1, 6], [4, 3, 2, 5, 6, 1], [4, 3, 2, 6, 1, 5], [4, 3, 2, 6, 5, 1], [4, 3, 5, 1, 2, 6], [4, 3, 5, 1, 6, 2], [4, 3, 5, 2, 1, 6], [4, 3, 5, 2, 6, 1], [4, 3, 5, 6, 1, 2], [4, 3, 5, 6, 2, 1], [4, 3, 6, 1, 2, 5], [4, 3, 6, 1, 5, 2], [4, 3, 6, 2, 1, 5], [4, 3, 6, 2, 5, 1], [4, 3, 6, 5, 1, 2], [4, 3, 6, 5, 2, 1], [4, 5, 1, 2, 3, 6], [4, 5, 1, 2, 6, 3], [4, 5, 1, 3, 2, 6], [4, 5, 1, 3, 6, 2], [4, 5, 1, 6, 2, 3], [4, 5, 1, 6, 3, 2], [4, 5, 2, 1, 3, 6], [4, 5, 2, 1, 6, 3], [4, 5, 2, 3, 1, 6], [4, 5, 2, 3, 6, 1], [4, 5, 2, 6, 1, 3], [4, 5, 2, 6, 3, 1], [4, 5, 3, 1, 2, 6], [4, 5, 3, 1, 6, 2], [4, 5, 3, 2, 1, 6], [4, 5, 3, 2, 6, 1], [4, 5, 3, 6, 1, 2], [4, 5, 3, 6, 2, 1], [4, 5, 6, 1, 2, 3], [4, 5, 6, 1, 3, 2], [4, 5, 6, 2, 1, 3], [4, 5, 6, 2, 3, 1], [4, 5, 6, 3, 1, 2], [4, 5, 6, 3, 2, 1], [4, 6, 1, 2, 3, 5], [4, 6, 1, 2, 5, 3], [4, 6, 1, 3, 2, 5], [4, 6, 1, 3, 5, 2], [4, 6, 1, 5, 2, 3], [4, 6, 1, 5, 3, 2], [4, 6, 2, 1, 3, 5], [4, 6, 2, 1, 5, 3], [4, 6, 2, 3, 1, 5], [4, 6, 2, 3, 5, 1], [4, 6, 2, 5, 1, 3], [4, 6, 2, 5, 3, 1], [4, 6, 3, 1, 2, 5], [4, 6, 3, 1, 5, 2], [4, 6, 3, 2, 1, 5], [4, 6, 3, 2, 5, 1], [4, 6, 3, 5, 1, 2], [4, 6, 3, 5, 2, 1], [4, 6, 5, 1, 2, 3], [4, 6, 5, 1, 3, 2], [4, 6, 5, 2, 1, 3], [4, 6, 5, 2, 3, 1], [4, 6, 5, 3, 1, 2], [4, 6, 5, 3, 2, 1], [5, 1, 2, 3, 4, 6], [5, 1, 2, 3, 6, 4], [5, 1, 2, 4, 3, 6], [5, 1, 2, 4, 6, 3], [5, 1, 2, 6, 3, 4], [5, 1, 2, 6, 4, 3], [5, 1, 3, 2, 4, 6], [5, 1, 3, 2, 6, 4], [5, 1, 3, 4, 2, 6], [5, 1, 3, 4, 6, 2], [5, 1, 3, 6, 2, 4], [5, 1, 3, 6, 4, 2], [5, 1, 4, 2, 3, 6], [5, 1, 4, 2, 6, 3], [5, 1, 4, 3, 2, 6], [5, 1, 4, 3, 6, 2], [5, 1, 4, 6, 2, 3], [5, 1, 4, 6, 3, 2], [5, 1, 6, 2, 3, 4], [5, 1, 6, 2, 4, 3], [5, 1, 6, 3, 2, 4], [5, 1, 6, 3, 4, 2], [5, 1, 6, 4, 2, 3], [5, 1, 6, 4, 3, 2], [5, 2, 1, 3, 4, 6], [5, 2, 1, 3, 6, 4], [5, 2, 1, 4, 3, 6], [5, 2, 1, 4, 6, 3], [5, 2, 1, 6, 3, 4], [5, 2, 1, 6, 4, 3], [5, 2, 3, 1, 4, 6], [5, 2, 3, 1, 6, 4], [5, 2, 3, 4, 1, 6], [5, 2, 3, 4, 6, 1], [5, 2, 3, 6, 1, 4], [5, 2, 3, 6, 4, 1], [5, 2, 4, 1, 3, 6], [5, 2, 4, 1, 6, 3], [5, 2, 4, 3, 1, 6], [5, 2, 4, 3, 6, 1], [5, 2, 4, 6, 1, 3], [5, 2, 4, 6, 3, 1], [5, 2, 6, 1, 3, 4], [5, 2, 6, 1, 4, 3], [5, 2, 6, 3, 1, 4], [5, 2, 6, 3, 4, 1], [5, 2, 6, 4, 1, 3], [5, 2, 6, 4, 3, 1], [5, 3, 1, 2, 4, 6], [5, 3, 1, 2, 6, 4], [5, 3, 1, 4, 2, 6], [5, 3, 1, 4, 6, 2], [5, 3, 1, 6, 2, 4], [5, 3, 1, 6, 4, 2], [5, 3, 2, 1, 4, 6], [5, 3, 2, 1, 6, 4], [5, 3, 2, 4, 1, 6], [5, 3, 2, 4, 6, 1], [5, 3, 2, 6, 1, 4], [5, 3, 2, 6, 4, 1], [5, 3, 4, 1, 2, 6], [5, 3, 4, 1, 6, 2], [5, 3, 4, 2, 1, 6], [5, 3, 4, 2, 6, 1], [5, 3, 4, 6, 1, 2], [5, 3, 4, 6, 2, 1], [5, 3, 6, 1, 2, 4], [5, 3, 6, 1, 4, 2], [5, 3, 6, 2, 1, 4], [5, 3, 6, 2, 4, 1], [5, 3, 6, 4, 1, 2], [5, 3, 6, 4, 2, 1], [5, 4, 1, 2, 3, 6], [5, 4, 1, 2, 6, 3], [5, 4, 1, 3, 2, 6], [5, 4, 1, 3, 6, 2], [5, 4, 1, 6, 2, 3], [5, 4, 1, 6, 3, 2], [5, 4, 2, 1, 3, 6], [5, 4, 2, 1, 6, 3], [5, 4, 2, 3, 1, 6], [5, 4, 2, 3, 6, 1], [5, 4, 2, 6, 1, 3], [5, 4, 2, 6, 3, 1], [5, 4, 3, 1, 2, 6], [5, 4, 3, 1, 6, 2], [5, 4, 3, 2, 1, 6], [5, 4, 3, 2, 6, 1], [5, 4, 3, 6, 1, 2], [5, 4, 3, 6, 2, 1], [5, 4, 6, 1, 2, 3], [5, 4, 6, 1, 3, 2], [5, 4, 6, 2, 1, 3], [5, 4, 6, 2, 3, 1], [5, 4, 6, 3, 1, 2], [5, 4, 6, 3, 2, 1], [5, 6, 1, 2, 3, 4], [5, 6, 1, 2, 4, 3], [5, 6, 1, 3, 2, 4], [5, 6, 1, 3, 4, 2], [5, 6, 1, 4, 2, 3], [5, 6, 1, 4, 3, 2], [5, 6, 2, 1, 3, 4], [5, 6, 2, 1, 4, 3], [5, 6, 2, 3, 1, 4], [5, 6, 2, 3, 4, 1], [5, 6, 2, 4, 1, 3], [5, 6, 2, 4, 3, 1], [5, 6, 3, 1, 2, 4], [5, 6, 3, 1, 4, 2], [5, 6, 3, 2, 1, 4], [5, 6, 3, 2, 4, 1], [5, 6, 3, 4, 1, 2], [5, 6, 3, 4, 2, 1], [5, 6, 4, 1, 2, 3], [5, 6, 4, 1, 3, 2], [5, 6, 4, 2, 1, 3], [5, 6, 4, 2, 3, 1], [5, 6, 4, 3, 1, 2], [5, 6, 4, 3, 2, 1], [6, 1, 2, 3, 4, 5], [6, 1, 2, 3, 5, 4], [6, 1, 2, 4, 3, 5], [6, 1, 2, 4, 5, 3], [6, 1, 2, 5, 3, 4], [6, 1, 2, 5, 4, 3], [6, 1, 3, 2, 4, 5], [6, 1, 3, 2, 5, 4], [6, 1, 3, 4, 2, 5], [6, 1, 3, 4, 5, 2], [6, 1, 3, 5, 2, 4], [6, 1, 3, 5, 4, 2], [6, 1, 4, 2, 3, 5], [6, 1, 4, 2, 5, 3], [6, 1, 4, 3, 2, 5], [6, 1, 4, 3, 5, 2], [6, 1, 4, 5, 2, 3], [6, 1, 4, 5, 3, 2], [6, 1, 5, 2, 3, 4], [6, 1, 5, 2, 4, 3], [6, 1, 5, 3, 2, 4], [6, 1, 5, 3, 4, 2], [6, 1, 5, 4, 2, 3], [6, 1, 5, 4, 3, 2], [6, 2, 1, 3, 4, 5], [6, 2, 1, 3, 5, 4], [6, 2, 1, 4, 3, 5], [6, 2, 1, 4, 5, 3], [6, 2, 1, 5, 3, 4], [6, 2, 1, 5, 4, 3], [6, 2, 3, 1, 4, 5], [6, 2, 3, 1, 5, 4], [6, 2, 3, 4, 1, 5], [6, 2, 3, 4, 5, 1], [6, 2, 3, 5, 1, 4], [6, 2, 3, 5, 4, 1], [6, 2, 4, 1, 3, 5], [6, 2, 4, 1, 5, 3], [6, 2, 4, 3, 1, 5], [6, 2, 4, 3, 5, 1], [6, 2, 4, 5, 1, 3], [6, 2, 4, 5, 3, 1], [6, 2, 5, 1, 3, 4], [6, 2, 5, 1, 4, 3], [6, 2, 5, 3, 1, 4], [6, 2, 5, 3, 4, 1], [6, 2, 5, 4, 1, 3], [6, 2, 5, 4, 3, 1], [6, 3, 1, 2, 4, 5], [6, 3, 1, 2, 5, 4], [6, 3, 1, 4, 2, 5], [6, 3, 1, 4, 5, 2], [6, 3, 1, 5, 2, 4], [6, 3, 1, 5, 4, 2], [6, 3, 2, 1, 4, 5], [6, 3, 2, 1, 5, 4], [6, 3, 2, 4, 1, 5], [6, 3, 2, 4, 5, 1], [6, 3, 2, 5, 1, 4], [6, 3, 2, 5, 4, 1], [6, 3, 4, 1, 2, 5], [6, 3, 4, 1, 5, 2], [6, 3, 4, 2, 1, 5], [6, 3, 4, 2, 5, 1], [6, 3, 4, 5, 1, 2], [6, 3, 4, 5, 2, 1], [6, 3, 5, 1, 2, 4], [6, 3, 5, 1, 4, 2], [6, 3, 5, 2, 1, 4], [6, 3, 5, 2, 4, 1], [6, 3, 5, 4, 1, 2], [6, 3, 5, 4, 2, 1], [6, 4, 1, 2, 3, 5], [6, 4, 1, 2, 5, 3], [6, 4, 1, 3, 2, 5], [6, 4, 1, 3, 5, 2], [6, 4, 1, 5, 2, 3], [6, 4, 1, 5, 3, 2], [6, 4, 2, 1, 3, 5], [6, 4, 2, 1, 5, 3], [6, 4, 2, 3, 1, 5], [6, 4, 2, 3, 5, 1], [6, 4, 2, 5, 1, 3], [6, 4, 2, 5, 3, 1], [6, 4, 3, 1, 2, 5], [6, 4, 3, 1, 5, 2], [6, 4, 3, 2, 1, 5], [6, 4, 3, 2, 5, 1], [6, 4, 3, 5, 1, 2], [6, 4, 3, 5, 2, 1], [6, 4, 5, 1, 2, 3], [6, 4, 5, 1, 3, 2], [6, 4, 5, 2, 1, 3], [6, 4, 5, 2, 3, 1], [6, 4, 5, 3, 1, 2], [6, 4, 5, 3, 2, 1], [6, 5, 1, 2, 3, 4], [6, 5, 1, 2, 4, 3], [6, 5, 1, 3, 2, 4], [6, 5, 1, 3, 4, 2], [6, 5, 1, 4, 2, 3], [6, 5, 1, 4, 3, 2], [6, 5, 2, 1, 3, 4], [6, 5, 2, 1, 4, 3], [6, 5, 2, 3, 1, 4], [6, 5, 2, 3, 4, 1], [6, 5, 2, 4, 1, 3], [6, 5, 2, 4, 3, 1], [6, 5, 3, 1, 2, 4], [6, 5, 3, 1, 4, 2], [6, 5, 3, 2, 1, 4], [6, 5, 3, 2, 4, 1], [6, 5, 3, 4, 1, 2], [6, 5, 3, 4, 2, 1], [6, 5, 4, 1, 2, 3], [6, 5, 4, 1, 3, 2], [6, 5, 4, 2, 1, 3], [6, 5, 4, 2, 3, 1], [6, 5, 4, 3, 1, 2], [6, 5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[-1, -1, 2, 2, -1]), [[-1, -1, -1, 2, 2], [-1, -1, 2, -1, 2], [-1, -1, 2, 2, -1], [-1, 2, -1, -1, 2], [-1, 2, -1, 2, -1], [-1, 2, 2, -1, -1], [2, -1, -1, -1, 2], [2, -1, -1, 2, -1], [2, -1, 2, -1, -1], [2, 2, -1, -1, -1]])\n assert answers_match(candidate(nums=[4, 4, 4, 4]), [[4, 4, 4, 4]])\n assert answers_match(candidate(nums=[5, 1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5, 5], [1, 2, 3, 5, 4, 5], [1, 2, 3, 5, 5, 4], [1, 2, 4, 3, 5, 5], [1, 2, 4, 5, 3, 5], [1, 2, 4, 5, 5, 3], [1, 2, 5, 3, 4, 5], [1, 2, 5, 3, 5, 4], [1, 2, 5, 4, 3, 5], [1, 2, 5, 4, 5, 3], [1, 2, 5, 5, 3, 4], [1, 2, 5, 5, 4, 3], [1, 3, 2, 4, 5, 5], [1, 3, 2, 5, 4, 5], [1, 3, 2, 5, 5, 4], [1, 3, 4, 2, 5, 5], [1, 3, 4, 5, 2, 5], [1, 3, 4, 5, 5, 2], [1, 3, 5, 2, 4, 5], [1, 3, 5, 2, 5, 4], [1, 3, 5, 4, 2, 5], [1, 3, 5, 4, 5, 2], [1, 3, 5, 5, 2, 4], [1, 3, 5, 5, 4, 2], [1, 4, 2, 3, 5, 5], [1, 4, 2, 5, 3, 5], [1, 4, 2, 5, 5, 3], [1, 4, 3, 2, 5, 5], [1, 4, 3, 5, 2, 5], [1, 4, 3, 5, 5, 2], [1, 4, 5, 2, 3, 5], [1, 4, 5, 2, 5, 3], [1, 4, 5, 3, 2, 5], [1, 4, 5, 3, 5, 2], [1, 4, 5, 5, 2, 3], [1, 4, 5, 5, 3, 2], [1, 5, 2, 3, 4, 5], [1, 5, 2, 3, 5, 4], [1, 5, 2, 4, 3, 5], [1, 5, 2, 4, 5, 3], [1, 5, 2, 5, 3, 4], [1, 5, 2, 5, 4, 3], [1, 5, 3, 2, 4, 5], [1, 5, 3, 2, 5, 4], [1, 5, 3, 4, 2, 5], [1, 5, 3, 4, 5, 2], [1, 5, 3, 5, 2, 4], [1, 5, 3, 5, 4, 2], [1, 5, 4, 2, 3, 5], [1, 5, 4, 2, 5, 3], [1, 5, 4, 3, 2, 5], [1, 5, 4, 3, 5, 2], [1, 5, 4, 5, 2, 3], [1, 5, 4, 5, 3, 2], [1, 5, 5, 2, 3, 4], [1, 5, 5, 2, 4, 3], [1, 5, 5, 3, 2, 4], [1, 5, 5, 3, 4, 2], [1, 5, 5, 4, 2, 3], [1, 5, 5, 4, 3, 2], [2, 1, 3, 4, 5, 5], [2, 1, 3, 5, 4, 5], [2, 1, 3, 5, 5, 4], [2, 1, 4, 3, 5, 5], [2, 1, 4, 5, 3, 5], [2, 1, 4, 5, 5, 3], [2, 1, 5, 3, 4, 5], [2, 1, 5, 3, 5, 4], [2, 1, 5, 4, 3, 5], [2, 1, 5, 4, 5, 3], [2, 1, 5, 5, 3, 4], [2, 1, 5, 5, 4, 3], [2, 3, 1, 4, 5, 5], [2, 3, 1, 5, 4, 5], [2, 3, 1, 5, 5, 4], [2, 3, 4, 1, 5, 5], [2, 3, 4, 5, 1, 5], [2, 3, 4, 5, 5, 1], [2, 3, 5, 1, 4, 5], [2, 3, 5, 1, 5, 4], [2, 3, 5, 4, 1, 5], [2, 3, 5, 4, 5, 1], [2, 3, 5, 5, 1, 4], [2, 3, 5, 5, 4, 1], [2, 4, 1, 3, 5, 5], [2, 4, 1, 5, 3, 5], [2, 4, 1, 5, 5, 3], [2, 4, 3, 1, 5, 5], [2, 4, 3, 5, 1, 5], [2, 4, 3, 5, 5, 1], [2, 4, 5, 1, 3, 5], [2, 4, 5, 1, 5, 3], [2, 4, 5, 3, 1, 5], [2, 4, 5, 3, 5, 1], [2, 4, 5, 5, 1, 3], [2, 4, 5, 5, 3, 1], [2, 5, 1, 3, 4, 5], [2, 5, 1, 3, 5, 4], [2, 5, 1, 4, 3, 5], [2, 5, 1, 4, 5, 3], [2, 5, 1, 5, 3, 4], [2, 5, 1, 5, 4, 3], [2, 5, 3, 1, 4, 5], [2, 5, 3, 1, 5, 4], [2, 5, 3, 4, 1, 5], [2, 5, 3, 4, 5, 1], [2, 5, 3, 5, 1, 4], [2, 5, 3, 5, 4, 1], [2, 5, 4, 1, 3, 5], [2, 5, 4, 1, 5, 3], [2, 5, 4, 3, 1, 5], [2, 5, 4, 3, 5, 1], [2, 5, 4, 5, 1, 3], [2, 5, 4, 5, 3, 1], [2, 5, 5, 1, 3, 4], [2, 5, 5, 1, 4, 3], [2, 5, 5, 3, 1, 4], [2, 5, 5, 3, 4, 1], [2, 5, 5, 4, 1, 3], [2, 5, 5, 4, 3, 1], [3, 1, 2, 4, 5, 5], [3, 1, 2, 5, 4, 5], [3, 1, 2, 5, 5, 4], [3, 1, 4, 2, 5, 5], [3, 1, 4, 5, 2, 5], [3, 1, 4, 5, 5, 2], [3, 1, 5, 2, 4, 5], [3, 1, 5, 2, 5, 4], [3, 1, 5, 4, 2, 5], [3, 1, 5, 4, 5, 2], [3, 1, 5, 5, 2, 4], [3, 1, 5, 5, 4, 2], [3, 2, 1, 4, 5, 5], [3, 2, 1, 5, 4, 5], [3, 2, 1, 5, 5, 4], [3, 2, 4, 1, 5, 5], [3, 2, 4, 5, 1, 5], [3, 2, 4, 5, 5, 1], [3, 2, 5, 1, 4, 5], [3, 2, 5, 1, 5, 4], [3, 2, 5, 4, 1, 5], [3, 2, 5, 4, 5, 1], [3, 2, 5, 5, 1, 4], [3, 2, 5, 5, 4, 1], [3, 4, 1, 2, 5, 5], [3, 4, 1, 5, 2, 5], [3, 4, 1, 5, 5, 2], [3, 4, 2, 1, 5, 5], [3, 4, 2, 5, 1, 5], [3, 4, 2, 5, 5, 1], [3, 4, 5, 1, 2, 5], [3, 4, 5, 1, 5, 2], [3, 4, 5, 2, 1, 5], [3, 4, 5, 2, 5, 1], [3, 4, 5, 5, 1, 2], [3, 4, 5, 5, 2, 1], [3, 5, 1, 2, 4, 5], [3, 5, 1, 2, 5, 4], [3, 5, 1, 4, 2, 5], [3, 5, 1, 4, 5, 2], [3, 5, 1, 5, 2, 4], [3, 5, 1, 5, 4, 2], [3, 5, 2, 1, 4, 5], [3, 5, 2, 1, 5, 4], [3, 5, 2, 4, 1, 5], [3, 5, 2, 4, 5, 1], [3, 5, 2, 5, 1, 4], [3, 5, 2, 5, 4, 1], [3, 5, 4, 1, 2, 5], [3, 5, 4, 1, 5, 2], [3, 5, 4, 2, 1, 5], [3, 5, 4, 2, 5, 1], [3, 5, 4, 5, 1, 2], [3, 5, 4, 5, 2, 1], [3, 5, 5, 1, 2, 4], [3, 5, 5, 1, 4, 2], [3, 5, 5, 2, 1, 4], [3, 5, 5, 2, 4, 1], [3, 5, 5, 4, 1, 2], [3, 5, 5, 4, 2, 1], [4, 1, 2, 3, 5, 5], [4, 1, 2, 5, 3, 5], [4, 1, 2, 5, 5, 3], [4, 1, 3, 2, 5, 5], [4, 1, 3, 5, 2, 5], [4, 1, 3, 5, 5, 2], [4, 1, 5, 2, 3, 5], [4, 1, 5, 2, 5, 3], [4, 1, 5, 3, 2, 5], [4, 1, 5, 3, 5, 2], [4, 1, 5, 5, 2, 3], [4, 1, 5, 5, 3, 2], [4, 2, 1, 3, 5, 5], [4, 2, 1, 5, 3, 5], [4, 2, 1, 5, 5, 3], [4, 2, 3, 1, 5, 5], [4, 2, 3, 5, 1, 5], [4, 2, 3, 5, 5, 1], [4, 2, 5, 1, 3, 5], [4, 2, 5, 1, 5, 3], [4, 2, 5, 3, 1, 5], [4, 2, 5, 3, 5, 1], [4, 2, 5, 5, 1, 3], [4, 2, 5, 5, 3, 1], [4, 3, 1, 2, 5, 5], [4, 3, 1, 5, 2, 5], [4, 3, 1, 5, 5, 2], [4, 3, 2, 1, 5, 5], [4, 3, 2, 5, 1, 5], [4, 3, 2, 5, 5, 1], [4, 3, 5, 1, 2, 5], [4, 3, 5, 1, 5, 2], [4, 3, 5, 2, 1, 5], [4, 3, 5, 2, 5, 1], [4, 3, 5, 5, 1, 2], [4, 3, 5, 5, 2, 1], [4, 5, 1, 2, 3, 5], [4, 5, 1, 2, 5, 3], [4, 5, 1, 3, 2, 5], [4, 5, 1, 3, 5, 2], [4, 5, 1, 5, 2, 3], [4, 5, 1, 5, 3, 2], [4, 5, 2, 1, 3, 5], [4, 5, 2, 1, 5, 3], [4, 5, 2, 3, 1, 5], [4, 5, 2, 3, 5, 1], [4, 5, 2, 5, 1, 3], [4, 5, 2, 5, 3, 1], [4, 5, 3, 1, 2, 5], [4, 5, 3, 1, 5, 2], [4, 5, 3, 2, 1, 5], [4, 5, 3, 2, 5, 1], [4, 5, 3, 5, 1, 2], [4, 5, 3, 5, 2, 1], [4, 5, 5, 1, 2, 3], [4, 5, 5, 1, 3, 2], [4, 5, 5, 2, 1, 3], [4, 5, 5, 2, 3, 1], [4, 5, 5, 3, 1, 2], [4, 5, 5, 3, 2, 1], [5, 1, 2, 3, 4, 5], [5, 1, 2, 3, 5, 4], [5, 1, 2, 4, 3, 5], [5, 1, 2, 4, 5, 3], [5, 1, 2, 5, 3, 4], [5, 1, 2, 5, 4, 3], [5, 1, 3, 2, 4, 5], [5, 1, 3, 2, 5, 4], [5, 1, 3, 4, 2, 5], [5, 1, 3, 4, 5, 2], [5, 1, 3, 5, 2, 4], [5, 1, 3, 5, 4, 2], [5, 1, 4, 2, 3, 5], [5, 1, 4, 2, 5, 3], [5, 1, 4, 3, 2, 5], [5, 1, 4, 3, 5, 2], [5, 1, 4, 5, 2, 3], [5, 1, 4, 5, 3, 2], [5, 1, 5, 2, 3, 4], [5, 1, 5, 2, 4, 3], [5, 1, 5, 3, 2, 4], [5, 1, 5, 3, 4, 2], [5, 1, 5, 4, 2, 3], [5, 1, 5, 4, 3, 2], [5, 2, 1, 3, 4, 5], [5, 2, 1, 3, 5, 4], [5, 2, 1, 4, 3, 5], [5, 2, 1, 4, 5, 3], [5, 2, 1, 5, 3, 4], [5, 2, 1, 5, 4, 3], [5, 2, 3, 1, 4, 5], [5, 2, 3, 1, 5, 4], [5, 2, 3, 4, 1, 5], [5, 2, 3, 4, 5, 1], [5, 2, 3, 5, 1, 4], [5, 2, 3, 5, 4, 1], [5, 2, 4, 1, 3, 5], [5, 2, 4, 1, 5, 3], [5, 2, 4, 3, 1, 5], [5, 2, 4, 3, 5, 1], [5, 2, 4, 5, 1, 3], [5, 2, 4, 5, 3, 1], [5, 2, 5, 1, 3, 4], [5, 2, 5, 1, 4, 3], [5, 2, 5, 3, 1, 4], [5, 2, 5, 3, 4, 1], [5, 2, 5, 4, 1, 3], [5, 2, 5, 4, 3, 1], [5, 3, 1, 2, 4, 5], [5, 3, 1, 2, 5, 4], [5, 3, 1, 4, 2, 5], [5, 3, 1, 4, 5, 2], [5, 3, 1, 5, 2, 4], [5, 3, 1, 5, 4, 2], [5, 3, 2, 1, 4, 5], [5, 3, 2, 1, 5, 4], [5, 3, 2, 4, 1, 5], [5, 3, 2, 4, 5, 1], [5, 3, 2, 5, 1, 4], [5, 3, 2, 5, 4, 1], [5, 3, 4, 1, 2, 5], [5, 3, 4, 1, 5, 2], [5, 3, 4, 2, 1, 5], [5, 3, 4, 2, 5, 1], [5, 3, 4, 5, 1, 2], [5, 3, 4, 5, 2, 1], [5, 3, 5, 1, 2, 4], [5, 3, 5, 1, 4, 2], [5, 3, 5, 2, 1, 4], [5, 3, 5, 2, 4, 1], [5, 3, 5, 4, 1, 2], [5, 3, 5, 4, 2, 1], [5, 4, 1, 2, 3, 5], [5, 4, 1, 2, 5, 3], [5, 4, 1, 3, 2, 5], [5, 4, 1, 3, 5, 2], [5, 4, 1, 5, 2, 3], [5, 4, 1, 5, 3, 2], [5, 4, 2, 1, 3, 5], [5, 4, 2, 1, 5, 3], [5, 4, 2, 3, 1, 5], [5, 4, 2, 3, 5, 1], [5, 4, 2, 5, 1, 3], [5, 4, 2, 5, 3, 1], [5, 4, 3, 1, 2, 5], [5, 4, 3, 1, 5, 2], [5, 4, 3, 2, 1, 5], [5, 4, 3, 2, 5, 1], [5, 4, 3, 5, 1, 2], [5, 4, 3, 5, 2, 1], [5, 4, 5, 1, 2, 3], [5, 4, 5, 1, 3, 2], [5, 4, 5, 2, 1, 3], [5, 4, 5, 2, 3, 1], [5, 4, 5, 3, 1, 2], [5, 4, 5, 3, 2, 1], [5, 5, 1, 2, 3, 4], [5, 5, 1, 2, 4, 3], [5, 5, 1, 3, 2, 4], [5, 5, 1, 3, 4, 2], [5, 5, 1, 4, 2, 3], [5, 5, 1, 4, 3, 2], [5, 5, 2, 1, 3, 4], [5, 5, 2, 1, 4, 3], [5, 5, 2, 3, 1, 4], [5, 5, 2, 3, 4, 1], [5, 5, 2, 4, 1, 3], [5, 5, 2, 4, 3, 1], [5, 5, 3, 1, 2, 4], [5, 5, 3, 1, 4, 2], [5, 5, 3, 2, 1, 4], [5, 5, 3, 2, 4, 1], [5, 5, 3, 4, 1, 2], [5, 5, 3, 4, 2, 1], [5, 5, 4, 1, 2, 3], [5, 5, 4, 1, 3, 2], [5, 5, 4, 2, 1, 3], [5, 5, 4, 2, 3, 1], [5, 5, 4, 3, 1, 2], [5, 5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1, 0]), [[0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 5, 4], [0, 1, 2, 4, 3, 5], [0, 1, 2, 4, 5, 3], [0, 1, 2, 5, 3, 4], [0, 1, 2, 5, 4, 3], [0, 1, 3, 2, 4, 5], [0, 1, 3, 2, 5, 4], [0, 1, 3, 4, 2, 5], [0, 1, 3, 4, 5, 2], [0, 1, 3, 5, 2, 4], [0, 1, 3, 5, 4, 2], [0, 1, 4, 2, 3, 5], [0, 1, 4, 2, 5, 3], [0, 1, 4, 3, 2, 5], [0, 1, 4, 3, 5, 2], [0, 1, 4, 5, 2, 3], [0, 1, 4, 5, 3, 2], [0, 1, 5, 2, 3, 4], [0, 1, 5, 2, 4, 3], [0, 1, 5, 3, 2, 4], [0, 1, 5, 3, 4, 2], [0, 1, 5, 4, 2, 3], [0, 1, 5, 4, 3, 2], [0, 2, 1, 3, 4, 5], [0, 2, 1, 3, 5, 4], [0, 2, 1, 4, 3, 5], [0, 2, 1, 4, 5, 3], [0, 2, 1, 5, 3, 4], [0, 2, 1, 5, 4, 3], [0, 2, 3, 1, 4, 5], [0, 2, 3, 1, 5, 4], [0, 2, 3, 4, 1, 5], [0, 2, 3, 4, 5, 1], [0, 2, 3, 5, 1, 4], [0, 2, 3, 5, 4, 1], [0, 2, 4, 1, 3, 5], [0, 2, 4, 1, 5, 3], [0, 2, 4, 3, 1, 5], [0, 2, 4, 3, 5, 1], [0, 2, 4, 5, 1, 3], [0, 2, 4, 5, 3, 1], [0, 2, 5, 1, 3, 4], [0, 2, 5, 1, 4, 3], [0, 2, 5, 3, 1, 4], [0, 2, 5, 3, 4, 1], [0, 2, 5, 4, 1, 3], [0, 2, 5, 4, 3, 1], [0, 3, 1, 2, 4, 5], [0, 3, 1, 2, 5, 4], [0, 3, 1, 4, 2, 5], [0, 3, 1, 4, 5, 2], [0, 3, 1, 5, 2, 4], [0, 3, 1, 5, 4, 2], [0, 3, 2, 1, 4, 5], [0, 3, 2, 1, 5, 4], [0, 3, 2, 4, 1, 5], [0, 3, 2, 4, 5, 1], [0, 3, 2, 5, 1, 4], [0, 3, 2, 5, 4, 1], [0, 3, 4, 1, 2, 5], [0, 3, 4, 1, 5, 2], [0, 3, 4, 2, 1, 5], [0, 3, 4, 2, 5, 1], [0, 3, 4, 5, 1, 2], [0, 3, 4, 5, 2, 1], [0, 3, 5, 1, 2, 4], [0, 3, 5, 1, 4, 2], [0, 3, 5, 2, 1, 4], [0, 3, 5, 2, 4, 1], [0, 3, 5, 4, 1, 2], [0, 3, 5, 4, 2, 1], [0, 4, 1, 2, 3, 5], [0, 4, 1, 2, 5, 3], [0, 4, 1, 3, 2, 5], [0, 4, 1, 3, 5, 2], [0, 4, 1, 5, 2, 3], [0, 4, 1, 5, 3, 2], [0, 4, 2, 1, 3, 5], [0, 4, 2, 1, 5, 3], [0, 4, 2, 3, 1, 5], [0, 4, 2, 3, 5, 1], [0, 4, 2, 5, 1, 3], [0, 4, 2, 5, 3, 1], [0, 4, 3, 1, 2, 5], [0, 4, 3, 1, 5, 2], [0, 4, 3, 2, 1, 5], [0, 4, 3, 2, 5, 1], [0, 4, 3, 5, 1, 2], [0, 4, 3, 5, 2, 1], [0, 4, 5, 1, 2, 3], [0, 4, 5, 1, 3, 2], [0, 4, 5, 2, 1, 3], [0, 4, 5, 2, 3, 1], [0, 4, 5, 3, 1, 2], [0, 4, 5, 3, 2, 1], [0, 5, 1, 2, 3, 4], [0, 5, 1, 2, 4, 3], [0, 5, 1, 3, 2, 4], [0, 5, 1, 3, 4, 2], [0, 5, 1, 4, 2, 3], [0, 5, 1, 4, 3, 2], [0, 5, 2, 1, 3, 4], [0, 5, 2, 1, 4, 3], [0, 5, 2, 3, 1, 4], [0, 5, 2, 3, 4, 1], [0, 5, 2, 4, 1, 3], [0, 5, 2, 4, 3, 1], [0, 5, 3, 1, 2, 4], [0, 5, 3, 1, 4, 2], [0, 5, 3, 2, 1, 4], [0, 5, 3, 2, 4, 1], [0, 5, 3, 4, 1, 2], [0, 5, 3, 4, 2, 1], [0, 5, 4, 1, 2, 3], [0, 5, 4, 1, 3, 2], [0, 5, 4, 2, 1, 3], [0, 5, 4, 2, 3, 1], [0, 5, 4, 3, 1, 2], [0, 5, 4, 3, 2, 1], [1, 0, 2, 3, 4, 5], [1, 0, 2, 3, 5, 4], [1, 0, 2, 4, 3, 5], [1, 0, 2, 4, 5, 3], [1, 0, 2, 5, 3, 4], [1, 0, 2, 5, 4, 3], [1, 0, 3, 2, 4, 5], [1, 0, 3, 2, 5, 4], [1, 0, 3, 4, 2, 5], [1, 0, 3, 4, 5, 2], [1, 0, 3, 5, 2, 4], [1, 0, 3, 5, 4, 2], [1, 0, 4, 2, 3, 5], [1, 0, 4, 2, 5, 3], [1, 0, 4, 3, 2, 5], [1, 0, 4, 3, 5, 2], [1, 0, 4, 5, 2, 3], [1, 0, 4, 5, 3, 2], [1, 0, 5, 2, 3, 4], [1, 0, 5, 2, 4, 3], [1, 0, 5, 3, 2, 4], [1, 0, 5, 3, 4, 2], [1, 0, 5, 4, 2, 3], [1, 0, 5, 4, 3, 2], [1, 2, 0, 3, 4, 5], [1, 2, 0, 3, 5, 4], [1, 2, 0, 4, 3, 5], [1, 2, 0, 4, 5, 3], [1, 2, 0, 5, 3, 4], [1, 2, 0, 5, 4, 3], [1, 2, 3, 0, 4, 5], [1, 2, 3, 0, 5, 4], [1, 2, 3, 4, 0, 5], [1, 2, 3, 4, 5, 0], [1, 2, 3, 5, 0, 4], [1, 2, 3, 5, 4, 0], [1, 2, 4, 0, 3, 5], [1, 2, 4, 0, 5, 3], [1, 2, 4, 3, 0, 5], [1, 2, 4, 3, 5, 0], [1, 2, 4, 5, 0, 3], [1, 2, 4, 5, 3, 0], [1, 2, 5, 0, 3, 4], [1, 2, 5, 0, 4, 3], [1, 2, 5, 3, 0, 4], [1, 2, 5, 3, 4, 0], [1, 2, 5, 4, 0, 3], [1, 2, 5, 4, 3, 0], [1, 3, 0, 2, 4, 5], [1, 3, 0, 2, 5, 4], [1, 3, 0, 4, 2, 5], [1, 3, 0, 4, 5, 2], [1, 3, 0, 5, 2, 4], [1, 3, 0, 5, 4, 2], [1, 3, 2, 0, 4, 5], [1, 3, 2, 0, 5, 4], [1, 3, 2, 4, 0, 5], [1, 3, 2, 4, 5, 0], [1, 3, 2, 5, 0, 4], [1, 3, 2, 5, 4, 0], [1, 3, 4, 0, 2, 5], [1, 3, 4, 0, 5, 2], [1, 3, 4, 2, 0, 5], [1, 3, 4, 2, 5, 0], [1, 3, 4, 5, 0, 2], [1, 3, 4, 5, 2, 0], [1, 3, 5, 0, 2, 4], [1, 3, 5, 0, 4, 2], [1, 3, 5, 2, 0, 4], [1, 3, 5, 2, 4, 0], [1, 3, 5, 4, 0, 2], [1, 3, 5, 4, 2, 0], [1, 4, 0, 2, 3, 5], [1, 4, 0, 2, 5, 3], [1, 4, 0, 3, 2, 5], [1, 4, 0, 3, 5, 2], [1, 4, 0, 5, 2, 3], [1, 4, 0, 5, 3, 2], [1, 4, 2, 0, 3, 5], [1, 4, 2, 0, 5, 3], [1, 4, 2, 3, 0, 5], [1, 4, 2, 3, 5, 0], [1, 4, 2, 5, 0, 3], [1, 4, 2, 5, 3, 0], [1, 4, 3, 0, 2, 5], [1, 4, 3, 0, 5, 2], [1, 4, 3, 2, 0, 5], [1, 4, 3, 2, 5, 0], [1, 4, 3, 5, 0, 2], [1, 4, 3, 5, 2, 0], [1, 4, 5, 0, 2, 3], [1, 4, 5, 0, 3, 2], [1, 4, 5, 2, 0, 3], [1, 4, 5, 2, 3, 0], [1, 4, 5, 3, 0, 2], [1, 4, 5, 3, 2, 0], [1, 5, 0, 2, 3, 4], [1, 5, 0, 2, 4, 3], [1, 5, 0, 3, 2, 4], [1, 5, 0, 3, 4, 2], [1, 5, 0, 4, 2, 3], [1, 5, 0, 4, 3, 2], [1, 5, 2, 0, 3, 4], [1, 5, 2, 0, 4, 3], [1, 5, 2, 3, 0, 4], [1, 5, 2, 3, 4, 0], [1, 5, 2, 4, 0, 3], [1, 5, 2, 4, 3, 0], [1, 5, 3, 0, 2, 4], [1, 5, 3, 0, 4, 2], [1, 5, 3, 2, 0, 4], [1, 5, 3, 2, 4, 0], [1, 5, 3, 4, 0, 2], [1, 5, 3, 4, 2, 0], [1, 5, 4, 0, 2, 3], [1, 5, 4, 0, 3, 2], [1, 5, 4, 2, 0, 3], [1, 5, 4, 2, 3, 0], [1, 5, 4, 3, 0, 2], [1, 5, 4, 3, 2, 0], [2, 0, 1, 3, 4, 5], [2, 0, 1, 3, 5, 4], [2, 0, 1, 4, 3, 5], [2, 0, 1, 4, 5, 3], [2, 0, 1, 5, 3, 4], [2, 0, 1, 5, 4, 3], [2, 0, 3, 1, 4, 5], [2, 0, 3, 1, 5, 4], [2, 0, 3, 4, 1, 5], [2, 0, 3, 4, 5, 1], [2, 0, 3, 5, 1, 4], [2, 0, 3, 5, 4, 1], [2, 0, 4, 1, 3, 5], [2, 0, 4, 1, 5, 3], [2, 0, 4, 3, 1, 5], [2, 0, 4, 3, 5, 1], [2, 0, 4, 5, 1, 3], [2, 0, 4, 5, 3, 1], [2, 0, 5, 1, 3, 4], [2, 0, 5, 1, 4, 3], [2, 0, 5, 3, 1, 4], [2, 0, 5, 3, 4, 1], [2, 0, 5, 4, 1, 3], [2, 0, 5, 4, 3, 1], [2, 1, 0, 3, 4, 5], [2, 1, 0, 3, 5, 4], [2, 1, 0, 4, 3, 5], [2, 1, 0, 4, 5, 3], [2, 1, 0, 5, 3, 4], [2, 1, 0, 5, 4, 3], [2, 1, 3, 0, 4, 5], [2, 1, 3, 0, 5, 4], [2, 1, 3, 4, 0, 5], [2, 1, 3, 4, 5, 0], [2, 1, 3, 5, 0, 4], [2, 1, 3, 5, 4, 0], [2, 1, 4, 0, 3, 5], [2, 1, 4, 0, 5, 3], [2, 1, 4, 3, 0, 5], [2, 1, 4, 3, 5, 0], [2, 1, 4, 5, 0, 3], [2, 1, 4, 5, 3, 0], [2, 1, 5, 0, 3, 4], [2, 1, 5, 0, 4, 3], [2, 1, 5, 3, 0, 4], [2, 1, 5, 3, 4, 0], [2, 1, 5, 4, 0, 3], [2, 1, 5, 4, 3, 0], [2, 3, 0, 1, 4, 5], [2, 3, 0, 1, 5, 4], [2, 3, 0, 4, 1, 5], [2, 3, 0, 4, 5, 1], [2, 3, 0, 5, 1, 4], [2, 3, 0, 5, 4, 1], [2, 3, 1, 0, 4, 5], [2, 3, 1, 0, 5, 4], [2, 3, 1, 4, 0, 5], [2, 3, 1, 4, 5, 0], [2, 3, 1, 5, 0, 4], [2, 3, 1, 5, 4, 0], [2, 3, 4, 0, 1, 5], [2, 3, 4, 0, 5, 1], [2, 3, 4, 1, 0, 5], [2, 3, 4, 1, 5, 0], [2, 3, 4, 5, 0, 1], [2, 3, 4, 5, 1, 0], [2, 3, 5, 0, 1, 4], [2, 3, 5, 0, 4, 1], [2, 3, 5, 1, 0, 4], [2, 3, 5, 1, 4, 0], [2, 3, 5, 4, 0, 1], [2, 3, 5, 4, 1, 0], [2, 4, 0, 1, 3, 5], [2, 4, 0, 1, 5, 3], [2, 4, 0, 3, 1, 5], [2, 4, 0, 3, 5, 1], [2, 4, 0, 5, 1, 3], [2, 4, 0, 5, 3, 1], [2, 4, 1, 0, 3, 5], [2, 4, 1, 0, 5, 3], [2, 4, 1, 3, 0, 5], [2, 4, 1, 3, 5, 0], [2, 4, 1, 5, 0, 3], [2, 4, 1, 5, 3, 0], [2, 4, 3, 0, 1, 5], [2, 4, 3, 0, 5, 1], [2, 4, 3, 1, 0, 5], [2, 4, 3, 1, 5, 0], [2, 4, 3, 5, 0, 1], [2, 4, 3, 5, 1, 0], [2, 4, 5, 0, 1, 3], [2, 4, 5, 0, 3, 1], [2, 4, 5, 1, 0, 3], [2, 4, 5, 1, 3, 0], [2, 4, 5, 3, 0, 1], [2, 4, 5, 3, 1, 0], [2, 5, 0, 1, 3, 4], [2, 5, 0, 1, 4, 3], [2, 5, 0, 3, 1, 4], [2, 5, 0, 3, 4, 1], [2, 5, 0, 4, 1, 3], [2, 5, 0, 4, 3, 1], [2, 5, 1, 0, 3, 4], [2, 5, 1, 0, 4, 3], [2, 5, 1, 3, 0, 4], [2, 5, 1, 3, 4, 0], [2, 5, 1, 4, 0, 3], [2, 5, 1, 4, 3, 0], [2, 5, 3, 0, 1, 4], [2, 5, 3, 0, 4, 1], [2, 5, 3, 1, 0, 4], [2, 5, 3, 1, 4, 0], [2, 5, 3, 4, 0, 1], [2, 5, 3, 4, 1, 0], [2, 5, 4, 0, 1, 3], [2, 5, 4, 0, 3, 1], [2, 5, 4, 1, 0, 3], [2, 5, 4, 1, 3, 0], [2, 5, 4, 3, 0, 1], [2, 5, 4, 3, 1, 0], [3, 0, 1, 2, 4, 5], [3, 0, 1, 2, 5, 4], [3, 0, 1, 4, 2, 5], [3, 0, 1, 4, 5, 2], [3, 0, 1, 5, 2, 4], [3, 0, 1, 5, 4, 2], [3, 0, 2, 1, 4, 5], [3, 0, 2, 1, 5, 4], [3, 0, 2, 4, 1, 5], [3, 0, 2, 4, 5, 1], [3, 0, 2, 5, 1, 4], [3, 0, 2, 5, 4, 1], [3, 0, 4, 1, 2, 5], [3, 0, 4, 1, 5, 2], [3, 0, 4, 2, 1, 5], [3, 0, 4, 2, 5, 1], [3, 0, 4, 5, 1, 2], [3, 0, 4, 5, 2, 1], [3, 0, 5, 1, 2, 4], [3, 0, 5, 1, 4, 2], [3, 0, 5, 2, 1, 4], [3, 0, 5, 2, 4, 1], [3, 0, 5, 4, 1, 2], [3, 0, 5, 4, 2, 1], [3, 1, 0, 2, 4, 5], [3, 1, 0, 2, 5, 4], [3, 1, 0, 4, 2, 5], [3, 1, 0, 4, 5, 2], [3, 1, 0, 5, 2, 4], [3, 1, 0, 5, 4, 2], [3, 1, 2, 0, 4, 5], [3, 1, 2, 0, 5, 4], [3, 1, 2, 4, 0, 5], [3, 1, 2, 4, 5, 0], [3, 1, 2, 5, 0, 4], [3, 1, 2, 5, 4, 0], [3, 1, 4, 0, 2, 5], [3, 1, 4, 0, 5, 2], [3, 1, 4, 2, 0, 5], [3, 1, 4, 2, 5, 0], [3, 1, 4, 5, 0, 2], [3, 1, 4, 5, 2, 0], [3, 1, 5, 0, 2, 4], [3, 1, 5, 0, 4, 2], [3, 1, 5, 2, 0, 4], [3, 1, 5, 2, 4, 0], [3, 1, 5, 4, 0, 2], [3, 1, 5, 4, 2, 0], [3, 2, 0, 1, 4, 5], [3, 2, 0, 1, 5, 4], [3, 2, 0, 4, 1, 5], [3, 2, 0, 4, 5, 1], [3, 2, 0, 5, 1, 4], [3, 2, 0, 5, 4, 1], [3, 2, 1, 0, 4, 5], [3, 2, 1, 0, 5, 4], [3, 2, 1, 4, 0, 5], [3, 2, 1, 4, 5, 0], [3, 2, 1, 5, 0, 4], [3, 2, 1, 5, 4, 0], [3, 2, 4, 0, 1, 5], [3, 2, 4, 0, 5, 1], [3, 2, 4, 1, 0, 5], [3, 2, 4, 1, 5, 0], [3, 2, 4, 5, 0, 1], [3, 2, 4, 5, 1, 0], [3, 2, 5, 0, 1, 4], [3, 2, 5, 0, 4, 1], [3, 2, 5, 1, 0, 4], [3, 2, 5, 1, 4, 0], [3, 2, 5, 4, 0, 1], [3, 2, 5, 4, 1, 0], [3, 4, 0, 1, 2, 5], [3, 4, 0, 1, 5, 2], [3, 4, 0, 2, 1, 5], [3, 4, 0, 2, 5, 1], [3, 4, 0, 5, 1, 2], [3, 4, 0, 5, 2, 1], [3, 4, 1, 0, 2, 5], [3, 4, 1, 0, 5, 2], [3, 4, 1, 2, 0, 5], [3, 4, 1, 2, 5, 0], [3, 4, 1, 5, 0, 2], [3, 4, 1, 5, 2, 0], [3, 4, 2, 0, 1, 5], [3, 4, 2, 0, 5, 1], [3, 4, 2, 1, 0, 5], [3, 4, 2, 1, 5, 0], [3, 4, 2, 5, 0, 1], [3, 4, 2, 5, 1, 0], [3, 4, 5, 0, 1, 2], [3, 4, 5, 0, 2, 1], [3, 4, 5, 1, 0, 2], [3, 4, 5, 1, 2, 0], [3, 4, 5, 2, 0, 1], [3, 4, 5, 2, 1, 0], [3, 5, 0, 1, 2, 4], [3, 5, 0, 1, 4, 2], [3, 5, 0, 2, 1, 4], [3, 5, 0, 2, 4, 1], [3, 5, 0, 4, 1, 2], [3, 5, 0, 4, 2, 1], [3, 5, 1, 0, 2, 4], [3, 5, 1, 0, 4, 2], [3, 5, 1, 2, 0, 4], [3, 5, 1, 2, 4, 0], [3, 5, 1, 4, 0, 2], [3, 5, 1, 4, 2, 0], [3, 5, 2, 0, 1, 4], [3, 5, 2, 0, 4, 1], [3, 5, 2, 1, 0, 4], [3, 5, 2, 1, 4, 0], [3, 5, 2, 4, 0, 1], [3, 5, 2, 4, 1, 0], [3, 5, 4, 0, 1, 2], [3, 5, 4, 0, 2, 1], [3, 5, 4, 1, 0, 2], [3, 5, 4, 1, 2, 0], [3, 5, 4, 2, 0, 1], [3, 5, 4, 2, 1, 0], [4, 0, 1, 2, 3, 5], [4, 0, 1, 2, 5, 3], [4, 0, 1, 3, 2, 5], [4, 0, 1, 3, 5, 2], [4, 0, 1, 5, 2, 3], [4, 0, 1, 5, 3, 2], [4, 0, 2, 1, 3, 5], [4, 0, 2, 1, 5, 3], [4, 0, 2, 3, 1, 5], [4, 0, 2, 3, 5, 1], [4, 0, 2, 5, 1, 3], [4, 0, 2, 5, 3, 1], [4, 0, 3, 1, 2, 5], [4, 0, 3, 1, 5, 2], [4, 0, 3, 2, 1, 5], [4, 0, 3, 2, 5, 1], [4, 0, 3, 5, 1, 2], [4, 0, 3, 5, 2, 1], [4, 0, 5, 1, 2, 3], [4, 0, 5, 1, 3, 2], [4, 0, 5, 2, 1, 3], [4, 0, 5, 2, 3, 1], [4, 0, 5, 3, 1, 2], [4, 0, 5, 3, 2, 1], [4, 1, 0, 2, 3, 5], [4, 1, 0, 2, 5, 3], [4, 1, 0, 3, 2, 5], [4, 1, 0, 3, 5, 2], [4, 1, 0, 5, 2, 3], [4, 1, 0, 5, 3, 2], [4, 1, 2, 0, 3, 5], [4, 1, 2, 0, 5, 3], [4, 1, 2, 3, 0, 5], [4, 1, 2, 3, 5, 0], [4, 1, 2, 5, 0, 3], [4, 1, 2, 5, 3, 0], [4, 1, 3, 0, 2, 5], [4, 1, 3, 0, 5, 2], [4, 1, 3, 2, 0, 5], [4, 1, 3, 2, 5, 0], [4, 1, 3, 5, 0, 2], [4, 1, 3, 5, 2, 0], [4, 1, 5, 0, 2, 3], [4, 1, 5, 0, 3, 2], [4, 1, 5, 2, 0, 3], [4, 1, 5, 2, 3, 0], [4, 1, 5, 3, 0, 2], [4, 1, 5, 3, 2, 0], [4, 2, 0, 1, 3, 5], [4, 2, 0, 1, 5, 3], [4, 2, 0, 3, 1, 5], [4, 2, 0, 3, 5, 1], [4, 2, 0, 5, 1, 3], [4, 2, 0, 5, 3, 1], [4, 2, 1, 0, 3, 5], [4, 2, 1, 0, 5, 3], [4, 2, 1, 3, 0, 5], [4, 2, 1, 3, 5, 0], [4, 2, 1, 5, 0, 3], [4, 2, 1, 5, 3, 0], [4, 2, 3, 0, 1, 5], [4, 2, 3, 0, 5, 1], [4, 2, 3, 1, 0, 5], [4, 2, 3, 1, 5, 0], [4, 2, 3, 5, 0, 1], [4, 2, 3, 5, 1, 0], [4, 2, 5, 0, 1, 3], [4, 2, 5, 0, 3, 1], [4, 2, 5, 1, 0, 3], [4, 2, 5, 1, 3, 0], [4, 2, 5, 3, 0, 1], [4, 2, 5, 3, 1, 0], [4, 3, 0, 1, 2, 5], [4, 3, 0, 1, 5, 2], [4, 3, 0, 2, 1, 5], [4, 3, 0, 2, 5, 1], [4, 3, 0, 5, 1, 2], [4, 3, 0, 5, 2, 1], [4, 3, 1, 0, 2, 5], [4, 3, 1, 0, 5, 2], [4, 3, 1, 2, 0, 5], [4, 3, 1, 2, 5, 0], [4, 3, 1, 5, 0, 2], [4, 3, 1, 5, 2, 0], [4, 3, 2, 0, 1, 5], [4, 3, 2, 0, 5, 1], [4, 3, 2, 1, 0, 5], [4, 3, 2, 1, 5, 0], [4, 3, 2, 5, 0, 1], [4, 3, 2, 5, 1, 0], [4, 3, 5, 0, 1, 2], [4, 3, 5, 0, 2, 1], [4, 3, 5, 1, 0, 2], [4, 3, 5, 1, 2, 0], [4, 3, 5, 2, 0, 1], [4, 3, 5, 2, 1, 0], [4, 5, 0, 1, 2, 3], [4, 5, 0, 1, 3, 2], [4, 5, 0, 2, 1, 3], [4, 5, 0, 2, 3, 1], [4, 5, 0, 3, 1, 2], [4, 5, 0, 3, 2, 1], [4, 5, 1, 0, 2, 3], [4, 5, 1, 0, 3, 2], [4, 5, 1, 2, 0, 3], [4, 5, 1, 2, 3, 0], [4, 5, 1, 3, 0, 2], [4, 5, 1, 3, 2, 0], [4, 5, 2, 0, 1, 3], [4, 5, 2, 0, 3, 1], [4, 5, 2, 1, 0, 3], [4, 5, 2, 1, 3, 0], [4, 5, 2, 3, 0, 1], [4, 5, 2, 3, 1, 0], [4, 5, 3, 0, 1, 2], [4, 5, 3, 0, 2, 1], [4, 5, 3, 1, 0, 2], [4, 5, 3, 1, 2, 0], [4, 5, 3, 2, 0, 1], [4, 5, 3, 2, 1, 0], [5, 0, 1, 2, 3, 4], [5, 0, 1, 2, 4, 3], [5, 0, 1, 3, 2, 4], [5, 0, 1, 3, 4, 2], [5, 0, 1, 4, 2, 3], [5, 0, 1, 4, 3, 2], [5, 0, 2, 1, 3, 4], [5, 0, 2, 1, 4, 3], [5, 0, 2, 3, 1, 4], [5, 0, 2, 3, 4, 1], [5, 0, 2, 4, 1, 3], [5, 0, 2, 4, 3, 1], [5, 0, 3, 1, 2, 4], [5, 0, 3, 1, 4, 2], [5, 0, 3, 2, 1, 4], [5, 0, 3, 2, 4, 1], [5, 0, 3, 4, 1, 2], [5, 0, 3, 4, 2, 1], [5, 0, 4, 1, 2, 3], [5, 0, 4, 1, 3, 2], [5, 0, 4, 2, 1, 3], [5, 0, 4, 2, 3, 1], [5, 0, 4, 3, 1, 2], [5, 0, 4, 3, 2, 1], [5, 1, 0, 2, 3, 4], [5, 1, 0, 2, 4, 3], [5, 1, 0, 3, 2, 4], [5, 1, 0, 3, 4, 2], [5, 1, 0, 4, 2, 3], [5, 1, 0, 4, 3, 2], [5, 1, 2, 0, 3, 4], [5, 1, 2, 0, 4, 3], [5, 1, 2, 3, 0, 4], [5, 1, 2, 3, 4, 0], [5, 1, 2, 4, 0, 3], [5, 1, 2, 4, 3, 0], [5, 1, 3, 0, 2, 4], [5, 1, 3, 0, 4, 2], [5, 1, 3, 2, 0, 4], [5, 1, 3, 2, 4, 0], [5, 1, 3, 4, 0, 2], [5, 1, 3, 4, 2, 0], [5, 1, 4, 0, 2, 3], [5, 1, 4, 0, 3, 2], [5, 1, 4, 2, 0, 3], [5, 1, 4, 2, 3, 0], [5, 1, 4, 3, 0, 2], [5, 1, 4, 3, 2, 0], [5, 2, 0, 1, 3, 4], [5, 2, 0, 1, 4, 3], [5, 2, 0, 3, 1, 4], [5, 2, 0, 3, 4, 1], [5, 2, 0, 4, 1, 3], [5, 2, 0, 4, 3, 1], [5, 2, 1, 0, 3, 4], [5, 2, 1, 0, 4, 3], [5, 2, 1, 3, 0, 4], [5, 2, 1, 3, 4, 0], [5, 2, 1, 4, 0, 3], [5, 2, 1, 4, 3, 0], [5, 2, 3, 0, 1, 4], [5, 2, 3, 0, 4, 1], [5, 2, 3, 1, 0, 4], [5, 2, 3, 1, 4, 0], [5, 2, 3, 4, 0, 1], [5, 2, 3, 4, 1, 0], [5, 2, 4, 0, 1, 3], [5, 2, 4, 0, 3, 1], [5, 2, 4, 1, 0, 3], [5, 2, 4, 1, 3, 0], [5, 2, 4, 3, 0, 1], [5, 2, 4, 3, 1, 0], [5, 3, 0, 1, 2, 4], [5, 3, 0, 1, 4, 2], [5, 3, 0, 2, 1, 4], [5, 3, 0, 2, 4, 1], [5, 3, 0, 4, 1, 2], [5, 3, 0, 4, 2, 1], [5, 3, 1, 0, 2, 4], [5, 3, 1, 0, 4, 2], [5, 3, 1, 2, 0, 4], [5, 3, 1, 2, 4, 0], [5, 3, 1, 4, 0, 2], [5, 3, 1, 4, 2, 0], [5, 3, 2, 0, 1, 4], [5, 3, 2, 0, 4, 1], [5, 3, 2, 1, 0, 4], [5, 3, 2, 1, 4, 0], [5, 3, 2, 4, 0, 1], [5, 3, 2, 4, 1, 0], [5, 3, 4, 0, 1, 2], [5, 3, 4, 0, 2, 1], [5, 3, 4, 1, 0, 2], [5, 3, 4, 1, 2, 0], [5, 3, 4, 2, 0, 1], [5, 3, 4, 2, 1, 0], [5, 4, 0, 1, 2, 3], [5, 4, 0, 1, 3, 2], [5, 4, 0, 2, 1, 3], [5, 4, 0, 2, 3, 1], [5, 4, 0, 3, 1, 2], [5, 4, 0, 3, 2, 1], [5, 4, 1, 0, 2, 3], [5, 4, 1, 0, 3, 2], [5, 4, 1, 2, 0, 3], [5, 4, 1, 2, 3, 0], [5, 4, 1, 3, 0, 2], [5, 4, 1, 3, 2, 0], [5, 4, 2, 0, 1, 3], [5, 4, 2, 0, 3, 1], [5, 4, 2, 1, 0, 3], [5, 4, 2, 1, 3, 0], [5, 4, 2, 3, 0, 1], [5, 4, 2, 3, 1, 0], [5, 4, 3, 0, 1, 2], [5, 4, 3, 0, 2, 1], [5, 4, 3, 1, 0, 2], [5, 4, 3, 1, 2, 0], [5, 4, 3, 2, 0, 1], [5, 4, 3, 2, 1, 0]])\n assert answers_match(candidate(nums=[7, 8, 9, 7, 8, 9]), [[7, 7, 8, 8, 9, 9], [7, 7, 8, 9, 8, 9], [7, 7, 8, 9, 9, 8], [7, 7, 9, 8, 8, 9], [7, 7, 9, 8, 9, 8], [7, 7, 9, 9, 8, 8], [7, 8, 7, 8, 9, 9], [7, 8, 7, 9, 8, 9], [7, 8, 7, 9, 9, 8], [7, 8, 8, 7, 9, 9], [7, 8, 8, 9, 7, 9], [7, 8, 8, 9, 9, 7], [7, 8, 9, 7, 8, 9], [7, 8, 9, 7, 9, 8], [7, 8, 9, 8, 7, 9], [7, 8, 9, 8, 9, 7], [7, 8, 9, 9, 7, 8], [7, 8, 9, 9, 8, 7], [7, 9, 7, 8, 8, 9], [7, 9, 7, 8, 9, 8], [7, 9, 7, 9, 8, 8], [7, 9, 8, 7, 8, 9], [7, 9, 8, 7, 9, 8], [7, 9, 8, 8, 7, 9], [7, 9, 8, 8, 9, 7], [7, 9, 8, 9, 7, 8], [7, 9, 8, 9, 8, 7], [7, 9, 9, 7, 8, 8], [7, 9, 9, 8, 7, 8], [7, 9, 9, 8, 8, 7], [8, 7, 7, 8, 9, 9], [8, 7, 7, 9, 8, 9], [8, 7, 7, 9, 9, 8], [8, 7, 8, 7, 9, 9], [8, 7, 8, 9, 7, 9], [8, 7, 8, 9, 9, 7], [8, 7, 9, 7, 8, 9], [8, 7, 9, 7, 9, 8], [8, 7, 9, 8, 7, 9], [8, 7, 9, 8, 9, 7], [8, 7, 9, 9, 7, 8], [8, 7, 9, 9, 8, 7], [8, 8, 7, 7, 9, 9], [8, 8, 7, 9, 7, 9], [8, 8, 7, 9, 9, 7], [8, 8, 9, 7, 7, 9], [8, 8, 9, 7, 9, 7], [8, 8, 9, 9, 7, 7], [8, 9, 7, 7, 8, 9], [8, 9, 7, 7, 9, 8], [8, 9, 7, 8, 7, 9], [8, 9, 7, 8, 9, 7], [8, 9, 7, 9, 7, 8], [8, 9, 7, 9, 8, 7], [8, 9, 8, 7, 7, 9], [8, 9, 8, 7, 9, 7], [8, 9, 8, 9, 7, 7], [8, 9, 9, 7, 7, 8], [8, 9, 9, 7, 8, 7], [8, 9, 9, 8, 7, 7], [9, 7, 7, 8, 8, 9], [9, 7, 7, 8, 9, 8], [9, 7, 7, 9, 8, 8], [9, 7, 8, 7, 8, 9], [9, 7, 8, 7, 9, 8], [9, 7, 8, 8, 7, 9], [9, 7, 8, 8, 9, 7], [9, 7, 8, 9, 7, 8], [9, 7, 8, 9, 8, 7], [9, 7, 9, 7, 8, 8], [9, 7, 9, 8, 7, 8], [9, 7, 9, 8, 8, 7], [9, 8, 7, 7, 8, 9], [9, 8, 7, 7, 9, 8], [9, 8, 7, 8, 7, 9], [9, 8, 7, 8, 9, 7], [9, 8, 7, 9, 7, 8], [9, 8, 7, 9, 8, 7], [9, 8, 8, 7, 7, 9], [9, 8, 8, 7, 9, 7], [9, 8, 8, 9, 7, 7], [9, 8, 9, 7, 7, 8], [9, 8, 9, 7, 8, 7], [9, 8, 9, 8, 7, 7], [9, 9, 7, 7, 8, 8], [9, 9, 7, 8, 7, 8], [9, 9, 7, 8, 8, 7], [9, 9, 8, 7, 7, 8], [9, 9, 8, 7, 8, 7], [9, 9, 8, 8, 7, 7]])\n assert answers_match(candidate(nums=[10, -10, 0, 10, -10]), [[-10, -10, 0, 10, 10], [-10, -10, 10, 0, 10], [-10, -10, 10, 10, 0], [-10, 0, -10, 10, 10], [-10, 0, 10, -10, 10], [-10, 0, 10, 10, -10], [-10, 10, -10, 0, 10], [-10, 10, -10, 10, 0], [-10, 10, 0, -10, 10], [-10, 10, 0, 10, -10], [-10, 10, 10, -10, 0], [-10, 10, 10, 0, -10], [0, -10, -10, 10, 10], [0, -10, 10, -10, 10], [0, -10, 10, 10, -10], [0, 10, -10, -10, 10], [0, 10, -10, 10, -10], [0, 10, 10, -10, -10], [10, -10, -10, 0, 10], [10, -10, -10, 10, 0], [10, -10, 0, -10, 10], [10, -10, 0, 10, -10], [10, -10, 10, -10, 0], [10, -10, 10, 0, -10], [10, 0, -10, -10, 10], [10, 0, -10, 10, -10], [10, 0, 10, -10, -10], [10, 10, -10, -10, 0], [10, 10, -10, 0, -10], [10, 10, 0, -10, -10]])\n assert answers_match(candidate(nums=[2, 2, 3, 3, 4, 4, 5]), [[2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 5, 4], [2, 2, 3, 3, 5, 4, 4], [2, 2, 3, 4, 3, 4, 5], [2, 2, 3, 4, 3, 5, 4], [2, 2, 3, 4, 4, 3, 5], [2, 2, 3, 4, 4, 5, 3], [2, 2, 3, 4, 5, 3, 4], [2, 2, 3, 4, 5, 4, 3], [2, 2, 3, 5, 3, 4, 4], [2, 2, 3, 5, 4, 3, 4], [2, 2, 3, 5, 4, 4, 3], [2, 2, 4, 3, 3, 4, 5], [2, 2, 4, 3, 3, 5, 4], [2, 2, 4, 3, 4, 3, 5], [2, 2, 4, 3, 4, 5, 3], [2, 2, 4, 3, 5, 3, 4], [2, 2, 4, 3, 5, 4, 3], [2, 2, 4, 4, 3, 3, 5], [2, 2, 4, 4, 3, 5, 3], [2, 2, 4, 4, 5, 3, 3], [2, 2, 4, 5, 3, 3, 4], [2, 2, 4, 5, 3, 4, 3], [2, 2, 4, 5, 4, 3, 3], [2, 2, 5, 3, 3, 4, 4], [2, 2, 5, 3, 4, 3, 4], [2, 2, 5, 3, 4, 4, 3], [2, 2, 5, 4, 3, 3, 4], [2, 2, 5, 4, 3, 4, 3], [2, 2, 5, 4, 4, 3, 3], [2, 3, 2, 3, 4, 4, 5], [2, 3, 2, 3, 4, 5, 4], [2, 3, 2, 3, 5, 4, 4], [2, 3, 2, 4, 3, 4, 5], [2, 3, 2, 4, 3, 5, 4], [2, 3, 2, 4, 4, 3, 5], [2, 3, 2, 4, 4, 5, 3], [2, 3, 2, 4, 5, 3, 4], [2, 3, 2, 4, 5, 4, 3], [2, 3, 2, 5, 3, 4, 4], [2, 3, 2, 5, 4, 3, 4], [2, 3, 2, 5, 4, 4, 3], [2, 3, 3, 2, 4, 4, 5], [2, 3, 3, 2, 4, 5, 4], [2, 3, 3, 2, 5, 4, 4], [2, 3, 3, 4, 2, 4, 5], [2, 3, 3, 4, 2, 5, 4], [2, 3, 3, 4, 4, 2, 5], [2, 3, 3, 4, 4, 5, 2], [2, 3, 3, 4, 5, 2, 4], [2, 3, 3, 4, 5, 4, 2], [2, 3, 3, 5, 2, 4, 4], [2, 3, 3, 5, 4, 2, 4], [2, 3, 3, 5, 4, 4, 2], [2, 3, 4, 2, 3, 4, 5], [2, 3, 4, 2, 3, 5, 4], [2, 3, 4, 2, 4, 3, 5], [2, 3, 4, 2, 4, 5, 3], [2, 3, 4, 2, 5, 3, 4], [2, 3, 4, 2, 5, 4, 3], [2, 3, 4, 3, 2, 4, 5], [2, 3, 4, 3, 2, 5, 4], [2, 3, 4, 3, 4, 2, 5], [2, 3, 4, 3, 4, 5, 2], [2, 3, 4, 3, 5, 2, 4], [2, 3, 4, 3, 5, 4, 2], [2, 3, 4, 4, 2, 3, 5], [2, 3, 4, 4, 2, 5, 3], [2, 3, 4, 4, 3, 2, 5], [2, 3, 4, 4, 3, 5, 2], [2, 3, 4, 4, 5, 2, 3], [2, 3, 4, 4, 5, 3, 2], [2, 3, 4, 5, 2, 3, 4], [2, 3, 4, 5, 2, 4, 3], [2, 3, 4, 5, 3, 2, 4], [2, 3, 4, 5, 3, 4, 2], [2, 3, 4, 5, 4, 2, 3], [2, 3, 4, 5, 4, 3, 2], [2, 3, 5, 2, 3, 4, 4], [2, 3, 5, 2, 4, 3, 4], [2, 3, 5, 2, 4, 4, 3], [2, 3, 5, 3, 2, 4, 4], [2, 3, 5, 3, 4, 2, 4], [2, 3, 5, 3, 4, 4, 2], [2, 3, 5, 4, 2, 3, 4], [2, 3, 5, 4, 2, 4, 3], [2, 3, 5, 4, 3, 2, 4], [2, 3, 5, 4, 3, 4, 2], [2, 3, 5, 4, 4, 2, 3], [2, 3, 5, 4, 4, 3, 2], [2, 4, 2, 3, 3, 4, 5], [2, 4, 2, 3, 3, 5, 4], [2, 4, 2, 3, 4, 3, 5], [2, 4, 2, 3, 4, 5, 3], [2, 4, 2, 3, 5, 3, 4], [2, 4, 2, 3, 5, 4, 3], [2, 4, 2, 4, 3, 3, 5], [2, 4, 2, 4, 3, 5, 3], [2, 4, 2, 4, 5, 3, 3], [2, 4, 2, 5, 3, 3, 4], [2, 4, 2, 5, 3, 4, 3], [2, 4, 2, 5, 4, 3, 3], [2, 4, 3, 2, 3, 4, 5], [2, 4, 3, 2, 3, 5, 4], [2, 4, 3, 2, 4, 3, 5], [2, 4, 3, 2, 4, 5, 3], [2, 4, 3, 2, 5, 3, 4], [2, 4, 3, 2, 5, 4, 3], [2, 4, 3, 3, 2, 4, 5], [2, 4, 3, 3, 2, 5, 4], [2, 4, 3, 3, 4, 2, 5], [2, 4, 3, 3, 4, 5, 2], [2, 4, 3, 3, 5, 2, 4], [2, 4, 3, 3, 5, 4, 2], [2, 4, 3, 4, 2, 3, 5], [2, 4, 3, 4, 2, 5, 3], [2, 4, 3, 4, 3, 2, 5], [2, 4, 3, 4, 3, 5, 2], [2, 4, 3, 4, 5, 2, 3], [2, 4, 3, 4, 5, 3, 2], [2, 4, 3, 5, 2, 3, 4], [2, 4, 3, 5, 2, 4, 3], [2, 4, 3, 5, 3, 2, 4], [2, 4, 3, 5, 3, 4, 2], [2, 4, 3, 5, 4, 2, 3], [2, 4, 3, 5, 4, 3, 2], [2, 4, 4, 2, 3, 3, 5], [2, 4, 4, 2, 3, 5, 3], [2, 4, 4, 2, 5, 3, 3], [2, 4, 4, 3, 2, 3, 5], [2, 4, 4, 3, 2, 5, 3], [2, 4, 4, 3, 3, 2, 5], [2, 4, 4, 3, 3, 5, 2], [2, 4, 4, 3, 5, 2, 3], [2, 4, 4, 3, 5, 3, 2], [2, 4, 4, 5, 2, 3, 3], [2, 4, 4, 5, 3, 2, 3], [2, 4, 4, 5, 3, 3, 2], [2, 4, 5, 2, 3, 3, 4], [2, 4, 5, 2, 3, 4, 3], [2, 4, 5, 2, 4, 3, 3], [2, 4, 5, 3, 2, 3, 4], [2, 4, 5, 3, 2, 4, 3], [2, 4, 5, 3, 3, 2, 4], [2, 4, 5, 3, 3, 4, 2], [2, 4, 5, 3, 4, 2, 3], [2, 4, 5, 3, 4, 3, 2], [2, 4, 5, 4, 2, 3, 3], [2, 4, 5, 4, 3, 2, 3], [2, 4, 5, 4, 3, 3, 2], [2, 5, 2, 3, 3, 4, 4], [2, 5, 2, 3, 4, 3, 4], [2, 5, 2, 3, 4, 4, 3], [2, 5, 2, 4, 3, 3, 4], [2, 5, 2, 4, 3, 4, 3], [2, 5, 2, 4, 4, 3, 3], [2, 5, 3, 2, 3, 4, 4], [2, 5, 3, 2, 4, 3, 4], [2, 5, 3, 2, 4, 4, 3], [2, 5, 3, 3, 2, 4, 4], [2, 5, 3, 3, 4, 2, 4], [2, 5, 3, 3, 4, 4, 2], [2, 5, 3, 4, 2, 3, 4], [2, 5, 3, 4, 2, 4, 3], [2, 5, 3, 4, 3, 2, 4], [2, 5, 3, 4, 3, 4, 2], [2, 5, 3, 4, 4, 2, 3], [2, 5, 3, 4, 4, 3, 2], [2, 5, 4, 2, 3, 3, 4], [2, 5, 4, 2, 3, 4, 3], [2, 5, 4, 2, 4, 3, 3], [2, 5, 4, 3, 2, 3, 4], [2, 5, 4, 3, 2, 4, 3], [2, 5, 4, 3, 3, 2, 4], [2, 5, 4, 3, 3, 4, 2], [2, 5, 4, 3, 4, 2, 3], [2, 5, 4, 3, 4, 3, 2], [2, 5, 4, 4, 2, 3, 3], [2, 5, 4, 4, 3, 2, 3], [2, 5, 4, 4, 3, 3, 2], [3, 2, 2, 3, 4, 4, 5], [3, 2, 2, 3, 4, 5, 4], [3, 2, 2, 3, 5, 4, 4], [3, 2, 2, 4, 3, 4, 5], [3, 2, 2, 4, 3, 5, 4], [3, 2, 2, 4, 4, 3, 5], [3, 2, 2, 4, 4, 5, 3], [3, 2, 2, 4, 5, 3, 4], [3, 2, 2, 4, 5, 4, 3], [3, 2, 2, 5, 3, 4, 4], [3, 2, 2, 5, 4, 3, 4], [3, 2, 2, 5, 4, 4, 3], [3, 2, 3, 2, 4, 4, 5], [3, 2, 3, 2, 4, 5, 4], [3, 2, 3, 2, 5, 4, 4], [3, 2, 3, 4, 2, 4, 5], [3, 2, 3, 4, 2, 5, 4], [3, 2, 3, 4, 4, 2, 5], [3, 2, 3, 4, 4, 5, 2], [3, 2, 3, 4, 5, 2, 4], [3, 2, 3, 4, 5, 4, 2], [3, 2, 3, 5, 2, 4, 4], [3, 2, 3, 5, 4, 2, 4], [3, 2, 3, 5, 4, 4, 2], [3, 2, 4, 2, 3, 4, 5], [3, 2, 4, 2, 3, 5, 4], [3, 2, 4, 2, 4, 3, 5], [3, 2, 4, 2, 4, 5, 3], [3, 2, 4, 2, 5, 3, 4], [3, 2, 4, 2, 5, 4, 3], [3, 2, 4, 3, 2, 4, 5], [3, 2, 4, 3, 2, 5, 4], [3, 2, 4, 3, 4, 2, 5], [3, 2, 4, 3, 4, 5, 2], [3, 2, 4, 3, 5, 2, 4], [3, 2, 4, 3, 5, 4, 2], [3, 2, 4, 4, 2, 3, 5], [3, 2, 4, 4, 2, 5, 3], [3, 2, 4, 4, 3, 2, 5], [3, 2, 4, 4, 3, 5, 2], [3, 2, 4, 4, 5, 2, 3], [3, 2, 4, 4, 5, 3, 2], [3, 2, 4, 5, 2, 3, 4], [3, 2, 4, 5, 2, 4, 3], [3, 2, 4, 5, 3, 2, 4], [3, 2, 4, 5, 3, 4, 2], [3, 2, 4, 5, 4, 2, 3], [3, 2, 4, 5, 4, 3, 2], [3, 2, 5, 2, 3, 4, 4], [3, 2, 5, 2, 4, 3, 4], [3, 2, 5, 2, 4, 4, 3], [3, 2, 5, 3, 2, 4, 4], [3, 2, 5, 3, 4, 2, 4], [3, 2, 5, 3, 4, 4, 2], [3, 2, 5, 4, 2, 3, 4], [3, 2, 5, 4, 2, 4, 3], [3, 2, 5, 4, 3, 2, 4], [3, 2, 5, 4, 3, 4, 2], [3, 2, 5, 4, 4, 2, 3], [3, 2, 5, 4, 4, 3, 2], [3, 3, 2, 2, 4, 4, 5], [3, 3, 2, 2, 4, 5, 4], [3, 3, 2, 2, 5, 4, 4], [3, 3, 2, 4, 2, 4, 5], [3, 3, 2, 4, 2, 5, 4], [3, 3, 2, 4, 4, 2, 5], [3, 3, 2, 4, 4, 5, 2], [3, 3, 2, 4, 5, 2, 4], [3, 3, 2, 4, 5, 4, 2], [3, 3, 2, 5, 2, 4, 4], [3, 3, 2, 5, 4, 2, 4], [3, 3, 2, 5, 4, 4, 2], [3, 3, 4, 2, 2, 4, 5], [3, 3, 4, 2, 2, 5, 4], [3, 3, 4, 2, 4, 2, 5], [3, 3, 4, 2, 4, 5, 2], [3, 3, 4, 2, 5, 2, 4], [3, 3, 4, 2, 5, 4, 2], [3, 3, 4, 4, 2, 2, 5], [3, 3, 4, 4, 2, 5, 2], [3, 3, 4, 4, 5, 2, 2], [3, 3, 4, 5, 2, 2, 4], [3, 3, 4, 5, 2, 4, 2], [3, 3, 4, 5, 4, 2, 2], [3, 3, 5, 2, 2, 4, 4], [3, 3, 5, 2, 4, 2, 4], [3, 3, 5, 2, 4, 4, 2], [3, 3, 5, 4, 2, 2, 4], [3, 3, 5, 4, 2, 4, 2], [3, 3, 5, 4, 4, 2, 2], [3, 4, 2, 2, 3, 4, 5], [3, 4, 2, 2, 3, 5, 4], [3, 4, 2, 2, 4, 3, 5], [3, 4, 2, 2, 4, 5, 3], [3, 4, 2, 2, 5, 3, 4], [3, 4, 2, 2, 5, 4, 3], [3, 4, 2, 3, 2, 4, 5], [3, 4, 2, 3, 2, 5, 4], [3, 4, 2, 3, 4, 2, 5], [3, 4, 2, 3, 4, 5, 2], [3, 4, 2, 3, 5, 2, 4], [3, 4, 2, 3, 5, 4, 2], [3, 4, 2, 4, 2, 3, 5], [3, 4, 2, 4, 2, 5, 3], [3, 4, 2, 4, 3, 2, 5], [3, 4, 2, 4, 3, 5, 2], [3, 4, 2, 4, 5, 2, 3], [3, 4, 2, 4, 5, 3, 2], [3, 4, 2, 5, 2, 3, 4], [3, 4, 2, 5, 2, 4, 3], [3, 4, 2, 5, 3, 2, 4], [3, 4, 2, 5, 3, 4, 2], [3, 4, 2, 5, 4, 2, 3], [3, 4, 2, 5, 4, 3, 2], [3, 4, 3, 2, 2, 4, 5], [3, 4, 3, 2, 2, 5, 4], [3, 4, 3, 2, 4, 2, 5], [3, 4, 3, 2, 4, 5, 2], [3, 4, 3, 2, 5, 2, 4], [3, 4, 3, 2, 5, 4, 2], [3, 4, 3, 4, 2, 2, 5], [3, 4, 3, 4, 2, 5, 2], [3, 4, 3, 4, 5, 2, 2], [3, 4, 3, 5, 2, 2, 4], [3, 4, 3, 5, 2, 4, 2], [3, 4, 3, 5, 4, 2, 2], [3, 4, 4, 2, 2, 3, 5], [3, 4, 4, 2, 2, 5, 3], [3, 4, 4, 2, 3, 2, 5], [3, 4, 4, 2, 3, 5, 2], [3, 4, 4, 2, 5, 2, 3], [3, 4, 4, 2, 5, 3, 2], [3, 4, 4, 3, 2, 2, 5], [3, 4, 4, 3, 2, 5, 2], [3, 4, 4, 3, 5, 2, 2], [3, 4, 4, 5, 2, 2, 3], [3, 4, 4, 5, 2, 3, 2], [3, 4, 4, 5, 3, 2, 2], [3, 4, 5, 2, 2, 3, 4], [3, 4, 5, 2, 2, 4, 3], [3, 4, 5, 2, 3, 2, 4], [3, 4, 5, 2, 3, 4, 2], [3, 4, 5, 2, 4, 2, 3], [3, 4, 5, 2, 4, 3, 2], [3, 4, 5, 3, 2, 2, 4], [3, 4, 5, 3, 2, 4, 2], [3, 4, 5, 3, 4, 2, 2], [3, 4, 5, 4, 2, 2, 3], [3, 4, 5, 4, 2, 3, 2], [3, 4, 5, 4, 3, 2, 2], [3, 5, 2, 2, 3, 4, 4], [3, 5, 2, 2, 4, 3, 4], [3, 5, 2, 2, 4, 4, 3], [3, 5, 2, 3, 2, 4, 4], [3, 5, 2, 3, 4, 2, 4], [3, 5, 2, 3, 4, 4, 2], [3, 5, 2, 4, 2, 3, 4], [3, 5, 2, 4, 2, 4, 3], [3, 5, 2, 4, 3, 2, 4], [3, 5, 2, 4, 3, 4, 2], [3, 5, 2, 4, 4, 2, 3], [3, 5, 2, 4, 4, 3, 2], [3, 5, 3, 2, 2, 4, 4], [3, 5, 3, 2, 4, 2, 4], [3, 5, 3, 2, 4, 4, 2], [3, 5, 3, 4, 2, 2, 4], [3, 5, 3, 4, 2, 4, 2], [3, 5, 3, 4, 4, 2, 2], [3, 5, 4, 2, 2, 3, 4], [3, 5, 4, 2, 2, 4, 3], [3, 5, 4, 2, 3, 2, 4], [3, 5, 4, 2, 3, 4, 2], [3, 5, 4, 2, 4, 2, 3], [3, 5, 4, 2, 4, 3, 2], [3, 5, 4, 3, 2, 2, 4], [3, 5, 4, 3, 2, 4, 2], [3, 5, 4, 3, 4, 2, 2], [3, 5, 4, 4, 2, 2, 3], [3, 5, 4, 4, 2, 3, 2], [3, 5, 4, 4, 3, 2, 2], [4, 2, 2, 3, 3, 4, 5], [4, 2, 2, 3, 3, 5, 4], [4, 2, 2, 3, 4, 3, 5], [4, 2, 2, 3, 4, 5, 3], [4, 2, 2, 3, 5, 3, 4], [4, 2, 2, 3, 5, 4, 3], [4, 2, 2, 4, 3, 3, 5], [4, 2, 2, 4, 3, 5, 3], [4, 2, 2, 4, 5, 3, 3], [4, 2, 2, 5, 3, 3, 4], [4, 2, 2, 5, 3, 4, 3], [4, 2, 2, 5, 4, 3, 3], [4, 2, 3, 2, 3, 4, 5], [4, 2, 3, 2, 3, 5, 4], [4, 2, 3, 2, 4, 3, 5], [4, 2, 3, 2, 4, 5, 3], [4, 2, 3, 2, 5, 3, 4], [4, 2, 3, 2, 5, 4, 3], [4, 2, 3, 3, 2, 4, 5], [4, 2, 3, 3, 2, 5, 4], [4, 2, 3, 3, 4, 2, 5], [4, 2, 3, 3, 4, 5, 2], [4, 2, 3, 3, 5, 2, 4], [4, 2, 3, 3, 5, 4, 2], [4, 2, 3, 4, 2, 3, 5], [4, 2, 3, 4, 2, 5, 3], [4, 2, 3, 4, 3, 2, 5], [4, 2, 3, 4, 3, 5, 2], [4, 2, 3, 4, 5, 2, 3], [4, 2, 3, 4, 5, 3, 2], [4, 2, 3, 5, 2, 3, 4], [4, 2, 3, 5, 2, 4, 3], [4, 2, 3, 5, 3, 2, 4], [4, 2, 3, 5, 3, 4, 2], [4, 2, 3, 5, 4, 2, 3], [4, 2, 3, 5, 4, 3, 2], [4, 2, 4, 2, 3, 3, 5], [4, 2, 4, 2, 3, 5, 3], [4, 2, 4, 2, 5, 3, 3], [4, 2, 4, 3, 2, 3, 5], [4, 2, 4, 3, 2, 5, 3], [4, 2, 4, 3, 3, 2, 5], [4, 2, 4, 3, 3, 5, 2], [4, 2, 4, 3, 5, 2, 3], [4, 2, 4, 3, 5, 3, 2], [4, 2, 4, 5, 2, 3, 3], [4, 2, 4, 5, 3, 2, 3], [4, 2, 4, 5, 3, 3, 2], [4, 2, 5, 2, 3, 3, 4], [4, 2, 5, 2, 3, 4, 3], [4, 2, 5, 2, 4, 3, 3], [4, 2, 5, 3, 2, 3, 4], [4, 2, 5, 3, 2, 4, 3], [4, 2, 5, 3, 3, 2, 4], [4, 2, 5, 3, 3, 4, 2], [4, 2, 5, 3, 4, 2, 3], [4, 2, 5, 3, 4, 3, 2], [4, 2, 5, 4, 2, 3, 3], [4, 2, 5, 4, 3, 2, 3], [4, 2, 5, 4, 3, 3, 2], [4, 3, 2, 2, 3, 4, 5], [4, 3, 2, 2, 3, 5, 4], [4, 3, 2, 2, 4, 3, 5], [4, 3, 2, 2, 4, 5, 3], [4, 3, 2, 2, 5, 3, 4], [4, 3, 2, 2, 5, 4, 3], [4, 3, 2, 3, 2, 4, 5], [4, 3, 2, 3, 2, 5, 4], [4, 3, 2, 3, 4, 2, 5], [4, 3, 2, 3, 4, 5, 2], [4, 3, 2, 3, 5, 2, 4], [4, 3, 2, 3, 5, 4, 2], [4, 3, 2, 4, 2, 3, 5], [4, 3, 2, 4, 2, 5, 3], [4, 3, 2, 4, 3, 2, 5], [4, 3, 2, 4, 3, 5, 2], [4, 3, 2, 4, 5, 2, 3], [4, 3, 2, 4, 5, 3, 2], [4, 3, 2, 5, 2, 3, 4], [4, 3, 2, 5, 2, 4, 3], [4, 3, 2, 5, 3, 2, 4], [4, 3, 2, 5, 3, 4, 2], [4, 3, 2, 5, 4, 2, 3], [4, 3, 2, 5, 4, 3, 2], [4, 3, 3, 2, 2, 4, 5], [4, 3, 3, 2, 2, 5, 4], [4, 3, 3, 2, 4, 2, 5], [4, 3, 3, 2, 4, 5, 2], [4, 3, 3, 2, 5, 2, 4], [4, 3, 3, 2, 5, 4, 2], [4, 3, 3, 4, 2, 2, 5], [4, 3, 3, 4, 2, 5, 2], [4, 3, 3, 4, 5, 2, 2], [4, 3, 3, 5, 2, 2, 4], [4, 3, 3, 5, 2, 4, 2], [4, 3, 3, 5, 4, 2, 2], [4, 3, 4, 2, 2, 3, 5], [4, 3, 4, 2, 2, 5, 3], [4, 3, 4, 2, 3, 2, 5], [4, 3, 4, 2, 3, 5, 2], [4, 3, 4, 2, 5, 2, 3], [4, 3, 4, 2, 5, 3, 2], [4, 3, 4, 3, 2, 2, 5], [4, 3, 4, 3, 2, 5, 2], [4, 3, 4, 3, 5, 2, 2], [4, 3, 4, 5, 2, 2, 3], [4, 3, 4, 5, 2, 3, 2], [4, 3, 4, 5, 3, 2, 2], [4, 3, 5, 2, 2, 3, 4], [4, 3, 5, 2, 2, 4, 3], [4, 3, 5, 2, 3, 2, 4], [4, 3, 5, 2, 3, 4, 2], [4, 3, 5, 2, 4, 2, 3], [4, 3, 5, 2, 4, 3, 2], [4, 3, 5, 3, 2, 2, 4], [4, 3, 5, 3, 2, 4, 2], [4, 3, 5, 3, 4, 2, 2], [4, 3, 5, 4, 2, 2, 3], [4, 3, 5, 4, 2, 3, 2], [4, 3, 5, 4, 3, 2, 2], [4, 4, 2, 2, 3, 3, 5], [4, 4, 2, 2, 3, 5, 3], [4, 4, 2, 2, 5, 3, 3], [4, 4, 2, 3, 2, 3, 5], [4, 4, 2, 3, 2, 5, 3], [4, 4, 2, 3, 3, 2, 5], [4, 4, 2, 3, 3, 5, 2], [4, 4, 2, 3, 5, 2, 3], [4, 4, 2, 3, 5, 3, 2], [4, 4, 2, 5, 2, 3, 3], [4, 4, 2, 5, 3, 2, 3], [4, 4, 2, 5, 3, 3, 2], [4, 4, 3, 2, 2, 3, 5], [4, 4, 3, 2, 2, 5, 3], [4, 4, 3, 2, 3, 2, 5], [4, 4, 3, 2, 3, 5, 2], [4, 4, 3, 2, 5, 2, 3], [4, 4, 3, 2, 5, 3, 2], [4, 4, 3, 3, 2, 2, 5], [4, 4, 3, 3, 2, 5, 2], [4, 4, 3, 3, 5, 2, 2], [4, 4, 3, 5, 2, 2, 3], [4, 4, 3, 5, 2, 3, 2], [4, 4, 3, 5, 3, 2, 2], [4, 4, 5, 2, 2, 3, 3], [4, 4, 5, 2, 3, 2, 3], [4, 4, 5, 2, 3, 3, 2], [4, 4, 5, 3, 2, 2, 3], [4, 4, 5, 3, 2, 3, 2], [4, 4, 5, 3, 3, 2, 2], [4, 5, 2, 2, 3, 3, 4], [4, 5, 2, 2, 3, 4, 3], [4, 5, 2, 2, 4, 3, 3], [4, 5, 2, 3, 2, 3, 4], [4, 5, 2, 3, 2, 4, 3], [4, 5, 2, 3, 3, 2, 4], [4, 5, 2, 3, 3, 4, 2], [4, 5, 2, 3, 4, 2, 3], [4, 5, 2, 3, 4, 3, 2], [4, 5, 2, 4, 2, 3, 3], [4, 5, 2, 4, 3, 2, 3], [4, 5, 2, 4, 3, 3, 2], [4, 5, 3, 2, 2, 3, 4], [4, 5, 3, 2, 2, 4, 3], [4, 5, 3, 2, 3, 2, 4], [4, 5, 3, 2, 3, 4, 2], [4, 5, 3, 2, 4, 2, 3], [4, 5, 3, 2, 4, 3, 2], [4, 5, 3, 3, 2, 2, 4], [4, 5, 3, 3, 2, 4, 2], [4, 5, 3, 3, 4, 2, 2], [4, 5, 3, 4, 2, 2, 3], [4, 5, 3, 4, 2, 3, 2], [4, 5, 3, 4, 3, 2, 2], [4, 5, 4, 2, 2, 3, 3], [4, 5, 4, 2, 3, 2, 3], [4, 5, 4, 2, 3, 3, 2], [4, 5, 4, 3, 2, 2, 3], [4, 5, 4, 3, 2, 3, 2], [4, 5, 4, 3, 3, 2, 2], [5, 2, 2, 3, 3, 4, 4], [5, 2, 2, 3, 4, 3, 4], [5, 2, 2, 3, 4, 4, 3], [5, 2, 2, 4, 3, 3, 4], [5, 2, 2, 4, 3, 4, 3], [5, 2, 2, 4, 4, 3, 3], [5, 2, 3, 2, 3, 4, 4], [5, 2, 3, 2, 4, 3, 4], [5, 2, 3, 2, 4, 4, 3], [5, 2, 3, 3, 2, 4, 4], [5, 2, 3, 3, 4, 2, 4], [5, 2, 3, 3, 4, 4, 2], [5, 2, 3, 4, 2, 3, 4], [5, 2, 3, 4, 2, 4, 3], [5, 2, 3, 4, 3, 2, 4], [5, 2, 3, 4, 3, 4, 2], [5, 2, 3, 4, 4, 2, 3], [5, 2, 3, 4, 4, 3, 2], [5, 2, 4, 2, 3, 3, 4], [5, 2, 4, 2, 3, 4, 3], [5, 2, 4, 2, 4, 3, 3], [5, 2, 4, 3, 2, 3, 4], [5, 2, 4, 3, 2, 4, 3], [5, 2, 4, 3, 3, 2, 4], [5, 2, 4, 3, 3, 4, 2], [5, 2, 4, 3, 4, 2, 3], [5, 2, 4, 3, 4, 3, 2], [5, 2, 4, 4, 2, 3, 3], [5, 2, 4, 4, 3, 2, 3], [5, 2, 4, 4, 3, 3, 2], [5, 3, 2, 2, 3, 4, 4], [5, 3, 2, 2, 4, 3, 4], [5, 3, 2, 2, 4, 4, 3], [5, 3, 2, 3, 2, 4, 4], [5, 3, 2, 3, 4, 2, 4], [5, 3, 2, 3, 4, 4, 2], [5, 3, 2, 4, 2, 3, 4], [5, 3, 2, 4, 2, 4, 3], [5, 3, 2, 4, 3, 2, 4], [5, 3, 2, 4, 3, 4, 2], [5, 3, 2, 4, 4, 2, 3], [5, 3, 2, 4, 4, 3, 2], [5, 3, 3, 2, 2, 4, 4], [5, 3, 3, 2, 4, 2, 4], [5, 3, 3, 2, 4, 4, 2], [5, 3, 3, 4, 2, 2, 4], [5, 3, 3, 4, 2, 4, 2], [5, 3, 3, 4, 4, 2, 2], [5, 3, 4, 2, 2, 3, 4], [5, 3, 4, 2, 2, 4, 3], [5, 3, 4, 2, 3, 2, 4], [5, 3, 4, 2, 3, 4, 2], [5, 3, 4, 2, 4, 2, 3], [5, 3, 4, 2, 4, 3, 2], [5, 3, 4, 3, 2, 2, 4], [5, 3, 4, 3, 2, 4, 2], [5, 3, 4, 3, 4, 2, 2], [5, 3, 4, 4, 2, 2, 3], [5, 3, 4, 4, 2, 3, 2], [5, 3, 4, 4, 3, 2, 2], [5, 4, 2, 2, 3, 3, 4], [5, 4, 2, 2, 3, 4, 3], [5, 4, 2, 2, 4, 3, 3], [5, 4, 2, 3, 2, 3, 4], [5, 4, 2, 3, 2, 4, 3], [5, 4, 2, 3, 3, 2, 4], [5, 4, 2, 3, 3, 4, 2], [5, 4, 2, 3, 4, 2, 3], [5, 4, 2, 3, 4, 3, 2], [5, 4, 2, 4, 2, 3, 3], [5, 4, 2, 4, 3, 2, 3], [5, 4, 2, 4, 3, 3, 2], [5, 4, 3, 2, 2, 3, 4], [5, 4, 3, 2, 2, 4, 3], [5, 4, 3, 2, 3, 2, 4], [5, 4, 3, 2, 3, 4, 2], [5, 4, 3, 2, 4, 2, 3], [5, 4, 3, 2, 4, 3, 2], [5, 4, 3, 3, 2, 2, 4], [5, 4, 3, 3, 2, 4, 2], [5, 4, 3, 3, 4, 2, 2], [5, 4, 3, 4, 2, 2, 3], [5, 4, 3, 4, 2, 3, 2], [5, 4, 3, 4, 3, 2, 2], [5, 4, 4, 2, 2, 3, 3], [5, 4, 4, 2, 3, 2, 3], [5, 4, 4, 2, 3, 3, 2], [5, 4, 4, 3, 2, 2, 3], [5, 4, 4, 3, 2, 3, 2], [5, 4, 4, 3, 3, 2, 2]])\n assert answers_match(candidate(nums=[4, 4, 4, 4]), [[4, 4, 4, 4]])\n assert answers_match(candidate(nums=[0, -1, 1, -2, 2]), [[-2, -1, 0, 1, 2], [-2, -1, 0, 2, 1], [-2, -1, 1, 0, 2], [-2, -1, 1, 2, 0], [-2, -1, 2, 0, 1], [-2, -1, 2, 1, 0], [-2, 0, -1, 1, 2], [-2, 0, -1, 2, 1], [-2, 0, 1, -1, 2], [-2, 0, 1, 2, -1], [-2, 0, 2, -1, 1], [-2, 0, 2, 1, -1], [-2, 1, -1, 0, 2], [-2, 1, -1, 2, 0], [-2, 1, 0, -1, 2], [-2, 1, 0, 2, -1], [-2, 1, 2, -1, 0], [-2, 1, 2, 0, -1], [-2, 2, -1, 0, 1], [-2, 2, -1, 1, 0], [-2, 2, 0, -1, 1], [-2, 2, 0, 1, -1], [-2, 2, 1, -1, 0], [-2, 2, 1, 0, -1], [-1, -2, 0, 1, 2], [-1, -2, 0, 2, 1], [-1, -2, 1, 0, 2], [-1, -2, 1, 2, 0], [-1, -2, 2, 0, 1], [-1, -2, 2, 1, 0], [-1, 0, -2, 1, 2], [-1, 0, -2, 2, 1], [-1, 0, 1, -2, 2], [-1, 0, 1, 2, -2], [-1, 0, 2, -2, 1], [-1, 0, 2, 1, -2], [-1, 1, -2, 0, 2], [-1, 1, -2, 2, 0], [-1, 1, 0, -2, 2], [-1, 1, 0, 2, -2], [-1, 1, 2, -2, 0], [-1, 1, 2, 0, -2], [-1, 2, -2, 0, 1], [-1, 2, -2, 1, 0], [-1, 2, 0, -2, 1], [-1, 2, 0, 1, -2], [-1, 2, 1, -2, 0], [-1, 2, 1, 0, -2], [0, -2, -1, 1, 2], [0, -2, -1, 2, 1], [0, -2, 1, -1, 2], [0, -2, 1, 2, -1], [0, -2, 2, -1, 1], [0, -2, 2, 1, -1], [0, -1, -2, 1, 2], [0, -1, -2, 2, 1], [0, -1, 1, -2, 2], [0, -1, 1, 2, -2], [0, -1, 2, -2, 1], [0, -1, 2, 1, -2], [0, 1, -2, -1, 2], [0, 1, -2, 2, -1], [0, 1, -1, -2, 2], [0, 1, -1, 2, -2], [0, 1, 2, -2, -1], [0, 1, 2, -1, -2], [0, 2, -2, -1, 1], [0, 2, -2, 1, -1], [0, 2, -1, -2, 1], [0, 2, -1, 1, -2], [0, 2, 1, -2, -1], [0, 2, 1, -1, -2], [1, -2, -1, 0, 2], [1, -2, -1, 2, 0], [1, -2, 0, -1, 2], [1, -2, 0, 2, -1], [1, -2, 2, -1, 0], [1, -2, 2, 0, -1], [1, -1, -2, 0, 2], [1, -1, -2, 2, 0], [1, -1, 0, -2, 2], [1, -1, 0, 2, -2], [1, -1, 2, -2, 0], [1, -1, 2, 0, -2], [1, 0, -2, -1, 2], [1, 0, -2, 2, -1], [1, 0, -1, -2, 2], [1, 0, -1, 2, -2], [1, 0, 2, -2, -1], [1, 0, 2, -1, -2], [1, 2, -2, -1, 0], [1, 2, -2, 0, -1], [1, 2, -1, -2, 0], [1, 2, -1, 0, -2], [1, 2, 0, -2, -1], [1, 2, 0, -1, -2], [2, -2, -1, 0, 1], [2, -2, -1, 1, 0], [2, -2, 0, -1, 1], [2, -2, 0, 1, -1], [2, -2, 1, -1, 0], [2, -2, 1, 0, -1], [2, -1, -2, 0, 1], [2, -1, -2, 1, 0], [2, -1, 0, -2, 1], [2, -1, 0, 1, -2], [2, -1, 1, -2, 0], [2, -1, 1, 0, -2], [2, 0, -2, -1, 1], [2, 0, -2, 1, -1], [2, 0, -1, -2, 1], [2, 0, -1, 1, -2], [2, 0, 1, -2, -1], [2, 0, 1, -1, -2], [2, 1, -2, -1, 0], [2, 1, -2, 0, -1], [2, 1, -1, -2, 0], [2, 1, -1, 0, -2], [2, 1, 0, -2, -1], [2, 1, 0, -1, -2]])\n assert answers_match(candidate(nums=[5, 5, 6, 7, 7]), [[5, 5, 6, 7, 7], [5, 5, 7, 6, 7], [5, 5, 7, 7, 6], [5, 6, 5, 7, 7], [5, 6, 7, 5, 7], [5, 6, 7, 7, 5], [5, 7, 5, 6, 7], [5, 7, 5, 7, 6], [5, 7, 6, 5, 7], [5, 7, 6, 7, 5], [5, 7, 7, 5, 6], [5, 7, 7, 6, 5], [6, 5, 5, 7, 7], [6, 5, 7, 5, 7], [6, 5, 7, 7, 5], [6, 7, 5, 5, 7], [6, 7, 5, 7, 5], [6, 7, 7, 5, 5], [7, 5, 5, 6, 7], [7, 5, 5, 7, 6], [7, 5, 6, 5, 7], [7, 5, 6, 7, 5], [7, 5, 7, 5, 6], [7, 5, 7, 6, 5], [7, 6, 5, 5, 7], [7, 6, 5, 7, 5], [7, 6, 7, 5, 5], [7, 7, 5, 5, 6], [7, 7, 5, 6, 5], [7, 7, 6, 5, 5]])\n assert answers_match(candidate(nums=[5, 5, 6, 7, 8]), [[5, 5, 6, 7, 8], [5, 5, 6, 8, 7], [5, 5, 7, 6, 8], [5, 5, 7, 8, 6], [5, 5, 8, 6, 7], [5, 5, 8, 7, 6], [5, 6, 5, 7, 8], [5, 6, 5, 8, 7], [5, 6, 7, 5, 8], [5, 6, 7, 8, 5], [5, 6, 8, 5, 7], [5, 6, 8, 7, 5], [5, 7, 5, 6, 8], [5, 7, 5, 8, 6], [5, 7, 6, 5, 8], [5, 7, 6, 8, 5], [5, 7, 8, 5, 6], [5, 7, 8, 6, 5], [5, 8, 5, 6, 7], [5, 8, 5, 7, 6], [5, 8, 6, 5, 7], [5, 8, 6, 7, 5], [5, 8, 7, 5, 6], [5, 8, 7, 6, 5], [6, 5, 5, 7, 8], [6, 5, 5, 8, 7], [6, 5, 7, 5, 8], [6, 5, 7, 8, 5], [6, 5, 8, 5, 7], [6, 5, 8, 7, 5], [6, 7, 5, 5, 8], [6, 7, 5, 8, 5], [6, 7, 8, 5, 5], [6, 8, 5, 5, 7], [6, 8, 5, 7, 5], [6, 8, 7, 5, 5], [7, 5, 5, 6, 8], [7, 5, 5, 8, 6], [7, 5, 6, 5, 8], [7, 5, 6, 8, 5], [7, 5, 8, 5, 6], [7, 5, 8, 6, 5], [7, 6, 5, 5, 8], [7, 6, 5, 8, 5], [7, 6, 8, 5, 5], [7, 8, 5, 5, 6], [7, 8, 5, 6, 5], [7, 8, 6, 5, 5], [8, 5, 5, 6, 7], [8, 5, 5, 7, 6], [8, 5, 6, 5, 7], [8, 5, 6, 7, 5], [8, 5, 7, 5, 6], [8, 5, 7, 6, 5], [8, 6, 5, 5, 7], [8, 6, 5, 7, 5], [8, 6, 7, 5, 5], [8, 7, 5, 5, 6], [8, 7, 5, 6, 5], [8, 7, 6, 5, 5]])\n assert answers_match(candidate(nums=[8, 8, 8, 8, 8, 8, 8, 8]), [[8, 8, 8, 8, 8, 8, 8, 8]])\n assert answers_match(candidate(nums=[0, -1, 1, 0, -1]), [[-1, -1, 0, 0, 1], [-1, -1, 0, 1, 0], [-1, -1, 1, 0, 0], [-1, 0, -1, 0, 1], [-1, 0, -1, 1, 0], [-1, 0, 0, -1, 1], [-1, 0, 0, 1, -1], [-1, 0, 1, -1, 0], [-1, 0, 1, 0, -1], [-1, 1, -1, 0, 0], [-1, 1, 0, -1, 0], [-1, 1, 0, 0, -1], [0, -1, -1, 0, 1], [0, -1, -1, 1, 0], [0, -1, 0, -1, 1], [0, -1, 0, 1, -1], [0, -1, 1, -1, 0], [0, -1, 1, 0, -1], [0, 0, -1, -1, 1], [0, 0, -1, 1, -1], [0, 0, 1, -1, -1], [0, 1, -1, -1, 0], [0, 1, -1, 0, -1], [0, 1, 0, -1, -1], [1, -1, -1, 0, 0], [1, -1, 0, -1, 0], [1, -1, 0, 0, -1], [1, 0, -1, -1, 0], [1, 0, -1, 0, -1], [1, 0, 0, -1, -1]])\n assert answers_match(candidate(nums=[-5, -5, -5, -5, -5]), [[-5, -5, -5, -5, -5]])\n assert answers_match(candidate(nums=[7, 3, 3, 7, 3, 3, 7]), [[3, 3, 3, 3, 7, 7, 7], [3, 3, 3, 7, 3, 7, 7], [3, 3, 3, 7, 7, 3, 7], [3, 3, 3, 7, 7, 7, 3], [3, 3, 7, 3, 3, 7, 7], [3, 3, 7, 3, 7, 3, 7], [3, 3, 7, 3, 7, 7, 3], [3, 3, 7, 7, 3, 3, 7], [3, 3, 7, 7, 3, 7, 3], [3, 3, 7, 7, 7, 3, 3], [3, 7, 3, 3, 3, 7, 7], [3, 7, 3, 3, 7, 3, 7], [3, 7, 3, 3, 7, 7, 3], [3, 7, 3, 7, 3, 3, 7], [3, 7, 3, 7, 3, 7, 3], [3, 7, 3, 7, 7, 3, 3], [3, 7, 7, 3, 3, 3, 7], [3, 7, 7, 3, 3, 7, 3], [3, 7, 7, 3, 7, 3, 3], [3, 7, 7, 7, 3, 3, 3], [7, 3, 3, 3, 3, 7, 7], [7, 3, 3, 3, 7, 3, 7], [7, 3, 3, 3, 7, 7, 3], [7, 3, 3, 7, 3, 3, 7], [7, 3, 3, 7, 3, 7, 3], [7, 3, 3, 7, 7, 3, 3], [7, 3, 7, 3, 3, 3, 7], [7, 3, 7, 3, 3, 7, 3], [7, 3, 7, 3, 7, 3, 3], [7, 3, 7, 7, 3, 3, 3], [7, 7, 3, 3, 3, 3, 7], [7, 7, 3, 3, 3, 7, 3], [7, 7, 3, 3, 7, 3, 3], [7, 7, 3, 7, 3, 3, 3], [7, 7, 7, 3, 3, 3, 3]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1]), [[1, 1, 1, 1, 1, 1, 1, 1]])\n assert answers_match(candidate(nums=[0, 1, -1, 0, 1, -1]), [[-1, -1, 0, 0, 1, 1], [-1, -1, 0, 1, 0, 1], [-1, -1, 0, 1, 1, 0], [-1, -1, 1, 0, 0, 1], [-1, -1, 1, 0, 1, 0], [-1, -1, 1, 1, 0, 0], [-1, 0, -1, 0, 1, 1], [-1, 0, -1, 1, 0, 1], [-1, 0, -1, 1, 1, 0], [-1, 0, 0, -1, 1, 1], [-1, 0, 0, 1, -1, 1], [-1, 0, 0, 1, 1, -1], [-1, 0, 1, -1, 0, 1], [-1, 0, 1, -1, 1, 0], [-1, 0, 1, 0, -1, 1], [-1, 0, 1, 0, 1, -1], [-1, 0, 1, 1, -1, 0], [-1, 0, 1, 1, 0, -1], [-1, 1, -1, 0, 0, 1], [-1, 1, -1, 0, 1, 0], [-1, 1, -1, 1, 0, 0], [-1, 1, 0, -1, 0, 1], [-1, 1, 0, -1, 1, 0], [-1, 1, 0, 0, -1, 1], [-1, 1, 0, 0, 1, -1], [-1, 1, 0, 1, -1, 0], [-1, 1, 0, 1, 0, -1], [-1, 1, 1, -1, 0, 0], [-1, 1, 1, 0, -1, 0], [-1, 1, 1, 0, 0, -1], [0, -1, -1, 0, 1, 1], [0, -1, -1, 1, 0, 1], [0, -1, -1, 1, 1, 0], [0, -1, 0, -1, 1, 1], [0, -1, 0, 1, -1, 1], [0, -1, 0, 1, 1, -1], [0, -1, 1, -1, 0, 1], [0, -1, 1, -1, 1, 0], [0, -1, 1, 0, -1, 1], [0, -1, 1, 0, 1, -1], [0, -1, 1, 1, -1, 0], [0, -1, 1, 1, 0, -1], [0, 0, -1, -1, 1, 1], [0, 0, -1, 1, -1, 1], [0, 0, -1, 1, 1, -1], [0, 0, 1, -1, -1, 1], [0, 0, 1, -1, 1, -1], [0, 0, 1, 1, -1, -1], [0, 1, -1, -1, 0, 1], [0, 1, -1, -1, 1, 0], [0, 1, -1, 0, -1, 1], [0, 1, -1, 0, 1, -1], [0, 1, -1, 1, -1, 0], [0, 1, -1, 1, 0, -1], [0, 1, 0, -1, -1, 1], [0, 1, 0, -1, 1, -1], [0, 1, 0, 1, -1, -1], [0, 1, 1, -1, -1, 0], [0, 1, 1, -1, 0, -1], [0, 1, 1, 0, -1, -1], [1, -1, -1, 0, 0, 1], [1, -1, -1, 0, 1, 0], [1, -1, -1, 1, 0, 0], [1, -1, 0, -1, 0, 1], [1, -1, 0, -1, 1, 0], [1, -1, 0, 0, -1, 1], [1, -1, 0, 0, 1, -1], [1, -1, 0, 1, -1, 0], [1, -1, 0, 1, 0, -1], [1, -1, 1, -1, 0, 0], [1, -1, 1, 0, -1, 0], [1, -1, 1, 0, 0, -1], [1, 0, -1, -1, 0, 1], [1, 0, -1, -1, 1, 0], [1, 0, -1, 0, -1, 1], [1, 0, -1, 0, 1, -1], [1, 0, -1, 1, -1, 0], [1, 0, -1, 1, 0, -1], [1, 0, 0, -1, -1, 1], [1, 0, 0, -1, 1, -1], [1, 0, 0, 1, -1, -1], [1, 0, 1, -1, -1, 0], [1, 0, 1, -1, 0, -1], [1, 0, 1, 0, -1, -1], [1, 1, -1, -1, 0, 0], [1, 1, -1, 0, -1, 0], [1, 1, -1, 0, 0, -1], [1, 1, 0, -1, -1, 0], [1, 1, 0, -1, 0, -1], [1, 1, 0, 0, -1, -1]])\n assert answers_match(candidate(nums=[-1, -2, -3, -2, -1]), [[-3, -2, -2, -1, -1], [-3, -2, -1, -2, -1], [-3, -2, -1, -1, -2], [-3, -1, -2, -2, -1], [-3, -1, -2, -1, -2], [-3, -1, -1, -2, -2], [-2, -3, -2, -1, -1], [-2, -3, -1, -2, -1], [-2, -3, -1, -1, -2], [-2, -2, -3, -1, -1], [-2, -2, -1, -3, -1], [-2, -2, -1, -1, -3], [-2, -1, -3, -2, -1], [-2, -1, -3, -1, -2], [-2, -1, -2, -3, -1], [-2, -1, -2, -1, -3], [-2, -1, -1, -3, -2], [-2, -1, -1, -2, -3], [-1, -3, -2, -2, -1], [-1, -3, -2, -1, -2], [-1, -3, -1, -2, -2], [-1, -2, -3, -2, -1], [-1, -2, -3, -1, -2], [-1, -2, -2, -3, -1], [-1, -2, -2, -1, -3], [-1, -2, -1, -3, -2], [-1, -2, -1, -2, -3], [-1, -1, -3, -2, -2], [-1, -1, -2, -3, -2], [-1, -1, -2, -2, -3]])\n assert answers_match(candidate(nums=[7, 1, 1, 2, 2, 3, 3]), [[1, 1, 2, 2, 3, 3, 7], [1, 1, 2, 2, 3, 7, 3], [1, 1, 2, 2, 7, 3, 3], [1, 1, 2, 3, 2, 3, 7], [1, 1, 2, 3, 2, 7, 3], [1, 1, 2, 3, 3, 2, 7], [1, 1, 2, 3, 3, 7, 2], [1, 1, 2, 3, 7, 2, 3], [1, 1, 2, 3, 7, 3, 2], [1, 1, 2, 7, 2, 3, 3], [1, 1, 2, 7, 3, 2, 3], [1, 1, 2, 7, 3, 3, 2], [1, 1, 3, 2, 2, 3, 7], [1, 1, 3, 2, 2, 7, 3], [1, 1, 3, 2, 3, 2, 7], [1, 1, 3, 2, 3, 7, 2], [1, 1, 3, 2, 7, 2, 3], [1, 1, 3, 2, 7, 3, 2], [1, 1, 3, 3, 2, 2, 7], [1, 1, 3, 3, 2, 7, 2], [1, 1, 3, 3, 7, 2, 2], [1, 1, 3, 7, 2, 2, 3], [1, 1, 3, 7, 2, 3, 2], [1, 1, 3, 7, 3, 2, 2], [1, 1, 7, 2, 2, 3, 3], [1, 1, 7, 2, 3, 2, 3], [1, 1, 7, 2, 3, 3, 2], [1, 1, 7, 3, 2, 2, 3], [1, 1, 7, 3, 2, 3, 2], [1, 1, 7, 3, 3, 2, 2], [1, 2, 1, 2, 3, 3, 7], [1, 2, 1, 2, 3, 7, 3], [1, 2, 1, 2, 7, 3, 3], [1, 2, 1, 3, 2, 3, 7], [1, 2, 1, 3, 2, 7, 3], [1, 2, 1, 3, 3, 2, 7], [1, 2, 1, 3, 3, 7, 2], [1, 2, 1, 3, 7, 2, 3], [1, 2, 1, 3, 7, 3, 2], [1, 2, 1, 7, 2, 3, 3], [1, 2, 1, 7, 3, 2, 3], [1, 2, 1, 7, 3, 3, 2], [1, 2, 2, 1, 3, 3, 7], [1, 2, 2, 1, 3, 7, 3], [1, 2, 2, 1, 7, 3, 3], [1, 2, 2, 3, 1, 3, 7], [1, 2, 2, 3, 1, 7, 3], [1, 2, 2, 3, 3, 1, 7], [1, 2, 2, 3, 3, 7, 1], [1, 2, 2, 3, 7, 1, 3], [1, 2, 2, 3, 7, 3, 1], [1, 2, 2, 7, 1, 3, 3], [1, 2, 2, 7, 3, 1, 3], [1, 2, 2, 7, 3, 3, 1], [1, 2, 3, 1, 2, 3, 7], [1, 2, 3, 1, 2, 7, 3], [1, 2, 3, 1, 3, 2, 7], [1, 2, 3, 1, 3, 7, 2], [1, 2, 3, 1, 7, 2, 3], [1, 2, 3, 1, 7, 3, 2], [1, 2, 3, 2, 1, 3, 7], [1, 2, 3, 2, 1, 7, 3], [1, 2, 3, 2, 3, 1, 7], [1, 2, 3, 2, 3, 7, 1], [1, 2, 3, 2, 7, 1, 3], [1, 2, 3, 2, 7, 3, 1], [1, 2, 3, 3, 1, 2, 7], [1, 2, 3, 3, 1, 7, 2], [1, 2, 3, 3, 2, 1, 7], [1, 2, 3, 3, 2, 7, 1], [1, 2, 3, 3, 7, 1, 2], [1, 2, 3, 3, 7, 2, 1], [1, 2, 3, 7, 1, 2, 3], [1, 2, 3, 7, 1, 3, 2], [1, 2, 3, 7, 2, 1, 3], [1, 2, 3, 7, 2, 3, 1], [1, 2, 3, 7, 3, 1, 2], [1, 2, 3, 7, 3, 2, 1], [1, 2, 7, 1, 2, 3, 3], [1, 2, 7, 1, 3, 2, 3], [1, 2, 7, 1, 3, 3, 2], [1, 2, 7, 2, 1, 3, 3], [1, 2, 7, 2, 3, 1, 3], [1, 2, 7, 2, 3, 3, 1], [1, 2, 7, 3, 1, 2, 3], [1, 2, 7, 3, 1, 3, 2], [1, 2, 7, 3, 2, 1, 3], [1, 2, 7, 3, 2, 3, 1], [1, 2, 7, 3, 3, 1, 2], [1, 2, 7, 3, 3, 2, 1], [1, 3, 1, 2, 2, 3, 7], [1, 3, 1, 2, 2, 7, 3], [1, 3, 1, 2, 3, 2, 7], [1, 3, 1, 2, 3, 7, 2], [1, 3, 1, 2, 7, 2, 3], [1, 3, 1, 2, 7, 3, 2], [1, 3, 1, 3, 2, 2, 7], [1, 3, 1, 3, 2, 7, 2], [1, 3, 1, 3, 7, 2, 2], [1, 3, 1, 7, 2, 2, 3], [1, 3, 1, 7, 2, 3, 2], [1, 3, 1, 7, 3, 2, 2], [1, 3, 2, 1, 2, 3, 7], [1, 3, 2, 1, 2, 7, 3], [1, 3, 2, 1, 3, 2, 7], [1, 3, 2, 1, 3, 7, 2], [1, 3, 2, 1, 7, 2, 3], [1, 3, 2, 1, 7, 3, 2], [1, 3, 2, 2, 1, 3, 7], [1, 3, 2, 2, 1, 7, 3], [1, 3, 2, 2, 3, 1, 7], [1, 3, 2, 2, 3, 7, 1], [1, 3, 2, 2, 7, 1, 3], [1, 3, 2, 2, 7, 3, 1], [1, 3, 2, 3, 1, 2, 7], [1, 3, 2, 3, 1, 7, 2], [1, 3, 2, 3, 2, 1, 7], [1, 3, 2, 3, 2, 7, 1], [1, 3, 2, 3, 7, 1, 2], [1, 3, 2, 3, 7, 2, 1], [1, 3, 2, 7, 1, 2, 3], [1, 3, 2, 7, 1, 3, 2], [1, 3, 2, 7, 2, 1, 3], [1, 3, 2, 7, 2, 3, 1], [1, 3, 2, 7, 3, 1, 2], [1, 3, 2, 7, 3, 2, 1], [1, 3, 3, 1, 2, 2, 7], [1, 3, 3, 1, 2, 7, 2], [1, 3, 3, 1, 7, 2, 2], [1, 3, 3, 2, 1, 2, 7], [1, 3, 3, 2, 1, 7, 2], [1, 3, 3, 2, 2, 1, 7], [1, 3, 3, 2, 2, 7, 1], [1, 3, 3, 2, 7, 1, 2], [1, 3, 3, 2, 7, 2, 1], [1, 3, 3, 7, 1, 2, 2], [1, 3, 3, 7, 2, 1, 2], [1, 3, 3, 7, 2, 2, 1], [1, 3, 7, 1, 2, 2, 3], [1, 3, 7, 1, 2, 3, 2], [1, 3, 7, 1, 3, 2, 2], [1, 3, 7, 2, 1, 2, 3], [1, 3, 7, 2, 1, 3, 2], [1, 3, 7, 2, 2, 1, 3], [1, 3, 7, 2, 2, 3, 1], [1, 3, 7, 2, 3, 1, 2], [1, 3, 7, 2, 3, 2, 1], [1, 3, 7, 3, 1, 2, 2], [1, 3, 7, 3, 2, 1, 2], [1, 3, 7, 3, 2, 2, 1], [1, 7, 1, 2, 2, 3, 3], [1, 7, 1, 2, 3, 2, 3], [1, 7, 1, 2, 3, 3, 2], [1, 7, 1, 3, 2, 2, 3], [1, 7, 1, 3, 2, 3, 2], [1, 7, 1, 3, 3, 2, 2], [1, 7, 2, 1, 2, 3, 3], [1, 7, 2, 1, 3, 2, 3], [1, 7, 2, 1, 3, 3, 2], [1, 7, 2, 2, 1, 3, 3], [1, 7, 2, 2, 3, 1, 3], [1, 7, 2, 2, 3, 3, 1], [1, 7, 2, 3, 1, 2, 3], [1, 7, 2, 3, 1, 3, 2], [1, 7, 2, 3, 2, 1, 3], [1, 7, 2, 3, 2, 3, 1], [1, 7, 2, 3, 3, 1, 2], [1, 7, 2, 3, 3, 2, 1], [1, 7, 3, 1, 2, 2, 3], [1, 7, 3, 1, 2, 3, 2], [1, 7, 3, 1, 3, 2, 2], [1, 7, 3, 2, 1, 2, 3], [1, 7, 3, 2, 1, 3, 2], [1, 7, 3, 2, 2, 1, 3], [1, 7, 3, 2, 2, 3, 1], [1, 7, 3, 2, 3, 1, 2], [1, 7, 3, 2, 3, 2, 1], [1, 7, 3, 3, 1, 2, 2], [1, 7, 3, 3, 2, 1, 2], [1, 7, 3, 3, 2, 2, 1], [2, 1, 1, 2, 3, 3, 7], [2, 1, 1, 2, 3, 7, 3], [2, 1, 1, 2, 7, 3, 3], [2, 1, 1, 3, 2, 3, 7], [2, 1, 1, 3, 2, 7, 3], [2, 1, 1, 3, 3, 2, 7], [2, 1, 1, 3, 3, 7, 2], [2, 1, 1, 3, 7, 2, 3], [2, 1, 1, 3, 7, 3, 2], [2, 1, 1, 7, 2, 3, 3], [2, 1, 1, 7, 3, 2, 3], [2, 1, 1, 7, 3, 3, 2], [2, 1, 2, 1, 3, 3, 7], [2, 1, 2, 1, 3, 7, 3], [2, 1, 2, 1, 7, 3, 3], [2, 1, 2, 3, 1, 3, 7], [2, 1, 2, 3, 1, 7, 3], [2, 1, 2, 3, 3, 1, 7], [2, 1, 2, 3, 3, 7, 1], [2, 1, 2, 3, 7, 1, 3], [2, 1, 2, 3, 7, 3, 1], [2, 1, 2, 7, 1, 3, 3], [2, 1, 2, 7, 3, 1, 3], [2, 1, 2, 7, 3, 3, 1], [2, 1, 3, 1, 2, 3, 7], [2, 1, 3, 1, 2, 7, 3], [2, 1, 3, 1, 3, 2, 7], [2, 1, 3, 1, 3, 7, 2], [2, 1, 3, 1, 7, 2, 3], [2, 1, 3, 1, 7, 3, 2], [2, 1, 3, 2, 1, 3, 7], [2, 1, 3, 2, 1, 7, 3], [2, 1, 3, 2, 3, 1, 7], [2, 1, 3, 2, 3, 7, 1], [2, 1, 3, 2, 7, 1, 3], [2, 1, 3, 2, 7, 3, 1], [2, 1, 3, 3, 1, 2, 7], [2, 1, 3, 3, 1, 7, 2], [2, 1, 3, 3, 2, 1, 7], [2, 1, 3, 3, 2, 7, 1], [2, 1, 3, 3, 7, 1, 2], [2, 1, 3, 3, 7, 2, 1], [2, 1, 3, 7, 1, 2, 3], [2, 1, 3, 7, 1, 3, 2], [2, 1, 3, 7, 2, 1, 3], [2, 1, 3, 7, 2, 3, 1], [2, 1, 3, 7, 3, 1, 2], [2, 1, 3, 7, 3, 2, 1], [2, 1, 7, 1, 2, 3, 3], [2, 1, 7, 1, 3, 2, 3], [2, 1, 7, 1, 3, 3, 2], [2, 1, 7, 2, 1, 3, 3], [2, 1, 7, 2, 3, 1, 3], [2, 1, 7, 2, 3, 3, 1], [2, 1, 7, 3, 1, 2, 3], [2, 1, 7, 3, 1, 3, 2], [2, 1, 7, 3, 2, 1, 3], [2, 1, 7, 3, 2, 3, 1], [2, 1, 7, 3, 3, 1, 2], [2, 1, 7, 3, 3, 2, 1], [2, 2, 1, 1, 3, 3, 7], [2, 2, 1, 1, 3, 7, 3], [2, 2, 1, 1, 7, 3, 3], [2, 2, 1, 3, 1, 3, 7], [2, 2, 1, 3, 1, 7, 3], [2, 2, 1, 3, 3, 1, 7], [2, 2, 1, 3, 3, 7, 1], [2, 2, 1, 3, 7, 1, 3], [2, 2, 1, 3, 7, 3, 1], [2, 2, 1, 7, 1, 3, 3], [2, 2, 1, 7, 3, 1, 3], [2, 2, 1, 7, 3, 3, 1], [2, 2, 3, 1, 1, 3, 7], [2, 2, 3, 1, 1, 7, 3], [2, 2, 3, 1, 3, 1, 7], [2, 2, 3, 1, 3, 7, 1], [2, 2, 3, 1, 7, 1, 3], [2, 2, 3, 1, 7, 3, 1], [2, 2, 3, 3, 1, 1, 7], [2, 2, 3, 3, 1, 7, 1], [2, 2, 3, 3, 7, 1, 1], [2, 2, 3, 7, 1, 1, 3], [2, 2, 3, 7, 1, 3, 1], [2, 2, 3, 7, 3, 1, 1], [2, 2, 7, 1, 1, 3, 3], [2, 2, 7, 1, 3, 1, 3], [2, 2, 7, 1, 3, 3, 1], [2, 2, 7, 3, 1, 1, 3], [2, 2, 7, 3, 1, 3, 1], [2, 2, 7, 3, 3, 1, 1], [2, 3, 1, 1, 2, 3, 7], [2, 3, 1, 1, 2, 7, 3], [2, 3, 1, 1, 3, 2, 7], [2, 3, 1, 1, 3, 7, 2], [2, 3, 1, 1, 7, 2, 3], [2, 3, 1, 1, 7, 3, 2], [2, 3, 1, 2, 1, 3, 7], [2, 3, 1, 2, 1, 7, 3], [2, 3, 1, 2, 3, 1, 7], [2, 3, 1, 2, 3, 7, 1], [2, 3, 1, 2, 7, 1, 3], [2, 3, 1, 2, 7, 3, 1], [2, 3, 1, 3, 1, 2, 7], [2, 3, 1, 3, 1, 7, 2], [2, 3, 1, 3, 2, 1, 7], [2, 3, 1, 3, 2, 7, 1], [2, 3, 1, 3, 7, 1, 2], [2, 3, 1, 3, 7, 2, 1], [2, 3, 1, 7, 1, 2, 3], [2, 3, 1, 7, 1, 3, 2], [2, 3, 1, 7, 2, 1, 3], [2, 3, 1, 7, 2, 3, 1], [2, 3, 1, 7, 3, 1, 2], [2, 3, 1, 7, 3, 2, 1], [2, 3, 2, 1, 1, 3, 7], [2, 3, 2, 1, 1, 7, 3], [2, 3, 2, 1, 3, 1, 7], [2, 3, 2, 1, 3, 7, 1], [2, 3, 2, 1, 7, 1, 3], [2, 3, 2, 1, 7, 3, 1], [2, 3, 2, 3, 1, 1, 7], [2, 3, 2, 3, 1, 7, 1], [2, 3, 2, 3, 7, 1, 1], [2, 3, 2, 7, 1, 1, 3], [2, 3, 2, 7, 1, 3, 1], [2, 3, 2, 7, 3, 1, 1], [2, 3, 3, 1, 1, 2, 7], [2, 3, 3, 1, 1, 7, 2], [2, 3, 3, 1, 2, 1, 7], [2, 3, 3, 1, 2, 7, 1], [2, 3, 3, 1, 7, 1, 2], [2, 3, 3, 1, 7, 2, 1], [2, 3, 3, 2, 1, 1, 7], [2, 3, 3, 2, 1, 7, 1], [2, 3, 3, 2, 7, 1, 1], [2, 3, 3, 7, 1, 1, 2], [2, 3, 3, 7, 1, 2, 1], [2, 3, 3, 7, 2, 1, 1], [2, 3, 7, 1, 1, 2, 3], [2, 3, 7, 1, 1, 3, 2], [2, 3, 7, 1, 2, 1, 3], [2, 3, 7, 1, 2, 3, 1], [2, 3, 7, 1, 3, 1, 2], [2, 3, 7, 1, 3, 2, 1], [2, 3, 7, 2, 1, 1, 3], [2, 3, 7, 2, 1, 3, 1], [2, 3, 7, 2, 3, 1, 1], [2, 3, 7, 3, 1, 1, 2], [2, 3, 7, 3, 1, 2, 1], [2, 3, 7, 3, 2, 1, 1], [2, 7, 1, 1, 2, 3, 3], [2, 7, 1, 1, 3, 2, 3], [2, 7, 1, 1, 3, 3, 2], [2, 7, 1, 2, 1, 3, 3], [2, 7, 1, 2, 3, 1, 3], [2, 7, 1, 2, 3, 3, 1], [2, 7, 1, 3, 1, 2, 3], [2, 7, 1, 3, 1, 3, 2], [2, 7, 1, 3, 2, 1, 3], [2, 7, 1, 3, 2, 3, 1], [2, 7, 1, 3, 3, 1, 2], [2, 7, 1, 3, 3, 2, 1], [2, 7, 2, 1, 1, 3, 3], [2, 7, 2, 1, 3, 1, 3], [2, 7, 2, 1, 3, 3, 1], [2, 7, 2, 3, 1, 1, 3], [2, 7, 2, 3, 1, 3, 1], [2, 7, 2, 3, 3, 1, 1], [2, 7, 3, 1, 1, 2, 3], [2, 7, 3, 1, 1, 3, 2], [2, 7, 3, 1, 2, 1, 3], [2, 7, 3, 1, 2, 3, 1], [2, 7, 3, 1, 3, 1, 2], [2, 7, 3, 1, 3, 2, 1], [2, 7, 3, 2, 1, 1, 3], [2, 7, 3, 2, 1, 3, 1], [2, 7, 3, 2, 3, 1, 1], [2, 7, 3, 3, 1, 1, 2], [2, 7, 3, 3, 1, 2, 1], [2, 7, 3, 3, 2, 1, 1], [3, 1, 1, 2, 2, 3, 7], [3, 1, 1, 2, 2, 7, 3], [3, 1, 1, 2, 3, 2, 7], [3, 1, 1, 2, 3, 7, 2], [3, 1, 1, 2, 7, 2, 3], [3, 1, 1, 2, 7, 3, 2], [3, 1, 1, 3, 2, 2, 7], [3, 1, 1, 3, 2, 7, 2], [3, 1, 1, 3, 7, 2, 2], [3, 1, 1, 7, 2, 2, 3], [3, 1, 1, 7, 2, 3, 2], [3, 1, 1, 7, 3, 2, 2], [3, 1, 2, 1, 2, 3, 7], [3, 1, 2, 1, 2, 7, 3], [3, 1, 2, 1, 3, 2, 7], [3, 1, 2, 1, 3, 7, 2], [3, 1, 2, 1, 7, 2, 3], [3, 1, 2, 1, 7, 3, 2], [3, 1, 2, 2, 1, 3, 7], [3, 1, 2, 2, 1, 7, 3], [3, 1, 2, 2, 3, 1, 7], [3, 1, 2, 2, 3, 7, 1], [3, 1, 2, 2, 7, 1, 3], [3, 1, 2, 2, 7, 3, 1], [3, 1, 2, 3, 1, 2, 7], [3, 1, 2, 3, 1, 7, 2], [3, 1, 2, 3, 2, 1, 7], [3, 1, 2, 3, 2, 7, 1], [3, 1, 2, 3, 7, 1, 2], [3, 1, 2, 3, 7, 2, 1], [3, 1, 2, 7, 1, 2, 3], [3, 1, 2, 7, 1, 3, 2], [3, 1, 2, 7, 2, 1, 3], [3, 1, 2, 7, 2, 3, 1], [3, 1, 2, 7, 3, 1, 2], [3, 1, 2, 7, 3, 2, 1], [3, 1, 3, 1, 2, 2, 7], [3, 1, 3, 1, 2, 7, 2], [3, 1, 3, 1, 7, 2, 2], [3, 1, 3, 2, 1, 2, 7], [3, 1, 3, 2, 1, 7, 2], [3, 1, 3, 2, 2, 1, 7], [3, 1, 3, 2, 2, 7, 1], [3, 1, 3, 2, 7, 1, 2], [3, 1, 3, 2, 7, 2, 1], [3, 1, 3, 7, 1, 2, 2], [3, 1, 3, 7, 2, 1, 2], [3, 1, 3, 7, 2, 2, 1], [3, 1, 7, 1, 2, 2, 3], [3, 1, 7, 1, 2, 3, 2], [3, 1, 7, 1, 3, 2, 2], [3, 1, 7, 2, 1, 2, 3], [3, 1, 7, 2, 1, 3, 2], [3, 1, 7, 2, 2, 1, 3], [3, 1, 7, 2, 2, 3, 1], [3, 1, 7, 2, 3, 1, 2], [3, 1, 7, 2, 3, 2, 1], [3, 1, 7, 3, 1, 2, 2], [3, 1, 7, 3, 2, 1, 2], [3, 1, 7, 3, 2, 2, 1], [3, 2, 1, 1, 2, 3, 7], [3, 2, 1, 1, 2, 7, 3], [3, 2, 1, 1, 3, 2, 7], [3, 2, 1, 1, 3, 7, 2], [3, 2, 1, 1, 7, 2, 3], [3, 2, 1, 1, 7, 3, 2], [3, 2, 1, 2, 1, 3, 7], [3, 2, 1, 2, 1, 7, 3], [3, 2, 1, 2, 3, 1, 7], [3, 2, 1, 2, 3, 7, 1], [3, 2, 1, 2, 7, 1, 3], [3, 2, 1, 2, 7, 3, 1], [3, 2, 1, 3, 1, 2, 7], [3, 2, 1, 3, 1, 7, 2], [3, 2, 1, 3, 2, 1, 7], [3, 2, 1, 3, 2, 7, 1], [3, 2, 1, 3, 7, 1, 2], [3, 2, 1, 3, 7, 2, 1], [3, 2, 1, 7, 1, 2, 3], [3, 2, 1, 7, 1, 3, 2], [3, 2, 1, 7, 2, 1, 3], [3, 2, 1, 7, 2, 3, 1], [3, 2, 1, 7, 3, 1, 2], [3, 2, 1, 7, 3, 2, 1], [3, 2, 2, 1, 1, 3, 7], [3, 2, 2, 1, 1, 7, 3], [3, 2, 2, 1, 3, 1, 7], [3, 2, 2, 1, 3, 7, 1], [3, 2, 2, 1, 7, 1, 3], [3, 2, 2, 1, 7, 3, 1], [3, 2, 2, 3, 1, 1, 7], [3, 2, 2, 3, 1, 7, 1], [3, 2, 2, 3, 7, 1, 1], [3, 2, 2, 7, 1, 1, 3], [3, 2, 2, 7, 1, 3, 1], [3, 2, 2, 7, 3, 1, 1], [3, 2, 3, 1, 1, 2, 7], [3, 2, 3, 1, 1, 7, 2], [3, 2, 3, 1, 2, 1, 7], [3, 2, 3, 1, 2, 7, 1], [3, 2, 3, 1, 7, 1, 2], [3, 2, 3, 1, 7, 2, 1], [3, 2, 3, 2, 1, 1, 7], [3, 2, 3, 2, 1, 7, 1], [3, 2, 3, 2, 7, 1, 1], [3, 2, 3, 7, 1, 1, 2], [3, 2, 3, 7, 1, 2, 1], [3, 2, 3, 7, 2, 1, 1], [3, 2, 7, 1, 1, 2, 3], [3, 2, 7, 1, 1, 3, 2], [3, 2, 7, 1, 2, 1, 3], [3, 2, 7, 1, 2, 3, 1], [3, 2, 7, 1, 3, 1, 2], [3, 2, 7, 1, 3, 2, 1], [3, 2, 7, 2, 1, 1, 3], [3, 2, 7, 2, 1, 3, 1], [3, 2, 7, 2, 3, 1, 1], [3, 2, 7, 3, 1, 1, 2], [3, 2, 7, 3, 1, 2, 1], [3, 2, 7, 3, 2, 1, 1], [3, 3, 1, 1, 2, 2, 7], [3, 3, 1, 1, 2, 7, 2], [3, 3, 1, 1, 7, 2, 2], [3, 3, 1, 2, 1, 2, 7], [3, 3, 1, 2, 1, 7, 2], [3, 3, 1, 2, 2, 1, 7], [3, 3, 1, 2, 2, 7, 1], [3, 3, 1, 2, 7, 1, 2], [3, 3, 1, 2, 7, 2, 1], [3, 3, 1, 7, 1, 2, 2], [3, 3, 1, 7, 2, 1, 2], [3, 3, 1, 7, 2, 2, 1], [3, 3, 2, 1, 1, 2, 7], [3, 3, 2, 1, 1, 7, 2], [3, 3, 2, 1, 2, 1, 7], [3, 3, 2, 1, 2, 7, 1], [3, 3, 2, 1, 7, 1, 2], [3, 3, 2, 1, 7, 2, 1], [3, 3, 2, 2, 1, 1, 7], [3, 3, 2, 2, 1, 7, 1], [3, 3, 2, 2, 7, 1, 1], [3, 3, 2, 7, 1, 1, 2], [3, 3, 2, 7, 1, 2, 1], [3, 3, 2, 7, 2, 1, 1], [3, 3, 7, 1, 1, 2, 2], [3, 3, 7, 1, 2, 1, 2], [3, 3, 7, 1, 2, 2, 1], [3, 3, 7, 2, 1, 1, 2], [3, 3, 7, 2, 1, 2, 1], [3, 3, 7, 2, 2, 1, 1], [3, 7, 1, 1, 2, 2, 3], [3, 7, 1, 1, 2, 3, 2], [3, 7, 1, 1, 3, 2, 2], [3, 7, 1, 2, 1, 2, 3], [3, 7, 1, 2, 1, 3, 2], [3, 7, 1, 2, 2, 1, 3], [3, 7, 1, 2, 2, 3, 1], [3, 7, 1, 2, 3, 1, 2], [3, 7, 1, 2, 3, 2, 1], [3, 7, 1, 3, 1, 2, 2], [3, 7, 1, 3, 2, 1, 2], [3, 7, 1, 3, 2, 2, 1], [3, 7, 2, 1, 1, 2, 3], [3, 7, 2, 1, 1, 3, 2], [3, 7, 2, 1, 2, 1, 3], [3, 7, 2, 1, 2, 3, 1], [3, 7, 2, 1, 3, 1, 2], [3, 7, 2, 1, 3, 2, 1], [3, 7, 2, 2, 1, 1, 3], [3, 7, 2, 2, 1, 3, 1], [3, 7, 2, 2, 3, 1, 1], [3, 7, 2, 3, 1, 1, 2], [3, 7, 2, 3, 1, 2, 1], [3, 7, 2, 3, 2, 1, 1], [3, 7, 3, 1, 1, 2, 2], [3, 7, 3, 1, 2, 1, 2], [3, 7, 3, 1, 2, 2, 1], [3, 7, 3, 2, 1, 1, 2], [3, 7, 3, 2, 1, 2, 1], [3, 7, 3, 2, 2, 1, 1], [7, 1, 1, 2, 2, 3, 3], [7, 1, 1, 2, 3, 2, 3], [7, 1, 1, 2, 3, 3, 2], [7, 1, 1, 3, 2, 2, 3], [7, 1, 1, 3, 2, 3, 2], [7, 1, 1, 3, 3, 2, 2], [7, 1, 2, 1, 2, 3, 3], [7, 1, 2, 1, 3, 2, 3], [7, 1, 2, 1, 3, 3, 2], [7, 1, 2, 2, 1, 3, 3], [7, 1, 2, 2, 3, 1, 3], [7, 1, 2, 2, 3, 3, 1], [7, 1, 2, 3, 1, 2, 3], [7, 1, 2, 3, 1, 3, 2], [7, 1, 2, 3, 2, 1, 3], [7, 1, 2, 3, 2, 3, 1], [7, 1, 2, 3, 3, 1, 2], [7, 1, 2, 3, 3, 2, 1], [7, 1, 3, 1, 2, 2, 3], [7, 1, 3, 1, 2, 3, 2], [7, 1, 3, 1, 3, 2, 2], [7, 1, 3, 2, 1, 2, 3], [7, 1, 3, 2, 1, 3, 2], [7, 1, 3, 2, 2, 1, 3], [7, 1, 3, 2, 2, 3, 1], [7, 1, 3, 2, 3, 1, 2], [7, 1, 3, 2, 3, 2, 1], [7, 1, 3, 3, 1, 2, 2], [7, 1, 3, 3, 2, 1, 2], [7, 1, 3, 3, 2, 2, 1], [7, 2, 1, 1, 2, 3, 3], [7, 2, 1, 1, 3, 2, 3], [7, 2, 1, 1, 3, 3, 2], [7, 2, 1, 2, 1, 3, 3], [7, 2, 1, 2, 3, 1, 3], [7, 2, 1, 2, 3, 3, 1], [7, 2, 1, 3, 1, 2, 3], [7, 2, 1, 3, 1, 3, 2], [7, 2, 1, 3, 2, 1, 3], [7, 2, 1, 3, 2, 3, 1], [7, 2, 1, 3, 3, 1, 2], [7, 2, 1, 3, 3, 2, 1], [7, 2, 2, 1, 1, 3, 3], [7, 2, 2, 1, 3, 1, 3], [7, 2, 2, 1, 3, 3, 1], [7, 2, 2, 3, 1, 1, 3], [7, 2, 2, 3, 1, 3, 1], [7, 2, 2, 3, 3, 1, 1], [7, 2, 3, 1, 1, 2, 3], [7, 2, 3, 1, 1, 3, 2], [7, 2, 3, 1, 2, 1, 3], [7, 2, 3, 1, 2, 3, 1], [7, 2, 3, 1, 3, 1, 2], [7, 2, 3, 1, 3, 2, 1], [7, 2, 3, 2, 1, 1, 3], [7, 2, 3, 2, 1, 3, 1], [7, 2, 3, 2, 3, 1, 1], [7, 2, 3, 3, 1, 1, 2], [7, 2, 3, 3, 1, 2, 1], [7, 2, 3, 3, 2, 1, 1], [7, 3, 1, 1, 2, 2, 3], [7, 3, 1, 1, 2, 3, 2], [7, 3, 1, 1, 3, 2, 2], [7, 3, 1, 2, 1, 2, 3], [7, 3, 1, 2, 1, 3, 2], [7, 3, 1, 2, 2, 1, 3], [7, 3, 1, 2, 2, 3, 1], [7, 3, 1, 2, 3, 1, 2], [7, 3, 1, 2, 3, 2, 1], [7, 3, 1, 3, 1, 2, 2], [7, 3, 1, 3, 2, 1, 2], [7, 3, 1, 3, 2, 2, 1], [7, 3, 2, 1, 1, 2, 3], [7, 3, 2, 1, 1, 3, 2], [7, 3, 2, 1, 2, 1, 3], [7, 3, 2, 1, 2, 3, 1], [7, 3, 2, 1, 3, 1, 2], [7, 3, 2, 1, 3, 2, 1], [7, 3, 2, 2, 1, 1, 3], [7, 3, 2, 2, 1, 3, 1], [7, 3, 2, 2, 3, 1, 1], [7, 3, 2, 3, 1, 1, 2], [7, 3, 2, 3, 1, 2, 1], [7, 3, 2, 3, 2, 1, 1], [7, 3, 3, 1, 1, 2, 2], [7, 3, 3, 1, 2, 1, 2], [7, 3, 3, 1, 2, 2, 1], [7, 3, 3, 2, 1, 1, 2], [7, 3, 3, 2, 1, 2, 1], [7, 3, 3, 2, 2, 1, 1]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 2, 2, 2, 2]), [[1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 2, 1, 2, 2, 2], [1, 1, 1, 2, 2, 1, 2, 2], [1, 1, 1, 2, 2, 2, 1, 2], [1, 1, 1, 2, 2, 2, 2, 1], [1, 1, 2, 1, 1, 2, 2, 2], [1, 1, 2, 1, 2, 1, 2, 2], [1, 1, 2, 1, 2, 2, 1, 2], [1, 1, 2, 1, 2, 2, 2, 1], [1, 1, 2, 2, 1, 1, 2, 2], [1, 1, 2, 2, 1, 2, 1, 2], [1, 1, 2, 2, 1, 2, 2, 1], [1, 1, 2, 2, 2, 1, 1, 2], [1, 1, 2, 2, 2, 1, 2, 1], [1, 1, 2, 2, 2, 2, 1, 1], [1, 2, 1, 1, 1, 2, 2, 2], [1, 2, 1, 1, 2, 1, 2, 2], [1, 2, 1, 1, 2, 2, 1, 2], [1, 2, 1, 1, 2, 2, 2, 1], [1, 2, 1, 2, 1, 1, 2, 2], [1, 2, 1, 2, 1, 2, 1, 2], [1, 2, 1, 2, 1, 2, 2, 1], [1, 2, 1, 2, 2, 1, 1, 2], [1, 2, 1, 2, 2, 1, 2, 1], [1, 2, 1, 2, 2, 2, 1, 1], [1, 2, 2, 1, 1, 1, 2, 2], [1, 2, 2, 1, 1, 2, 1, 2], [1, 2, 2, 1, 1, 2, 2, 1], [1, 2, 2, 1, 2, 1, 1, 2], [1, 2, 2, 1, 2, 1, 2, 1], [1, 2, 2, 1, 2, 2, 1, 1], [1, 2, 2, 2, 1, 1, 1, 2], [1, 2, 2, 2, 1, 1, 2, 1], [1, 2, 2, 2, 1, 2, 1, 1], [1, 2, 2, 2, 2, 1, 1, 1], [2, 1, 1, 1, 1, 2, 2, 2], [2, 1, 1, 1, 2, 1, 2, 2], [2, 1, 1, 1, 2, 2, 1, 2], [2, 1, 1, 1, 2, 2, 2, 1], [2, 1, 1, 2, 1, 1, 2, 2], [2, 1, 1, 2, 1, 2, 1, 2], [2, 1, 1, 2, 1, 2, 2, 1], [2, 1, 1, 2, 2, 1, 1, 2], [2, 1, 1, 2, 2, 1, 2, 1], [2, 1, 1, 2, 2, 2, 1, 1], [2, 1, 2, 1, 1, 1, 2, 2], [2, 1, 2, 1, 1, 2, 1, 2], [2, 1, 2, 1, 1, 2, 2, 1], [2, 1, 2, 1, 2, 1, 1, 2], [2, 1, 2, 1, 2, 1, 2, 1], [2, 1, 2, 1, 2, 2, 1, 1], [2, 1, 2, 2, 1, 1, 1, 2], [2, 1, 2, 2, 1, 1, 2, 1], [2, 1, 2, 2, 1, 2, 1, 1], [2, 1, 2, 2, 2, 1, 1, 1], [2, 2, 1, 1, 1, 1, 2, 2], [2, 2, 1, 1, 1, 2, 1, 2], [2, 2, 1, 1, 1, 2, 2, 1], [2, 2, 1, 1, 2, 1, 1, 2], [2, 2, 1, 1, 2, 1, 2, 1], [2, 2, 1, 1, 2, 2, 1, 1], [2, 2, 1, 2, 1, 1, 1, 2], [2, 2, 1, 2, 1, 1, 2, 1], [2, 2, 1, 2, 1, 2, 1, 1], [2, 2, 1, 2, 2, 1, 1, 1], [2, 2, 2, 1, 1, 1, 1, 2], [2, 2, 2, 1, 1, 1, 2, 1], [2, 2, 2, 1, 1, 2, 1, 1], [2, 2, 2, 1, 2, 1, 1, 1], [2, 2, 2, 2, 1, 1, 1, 1]])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2]), [[1, 1, 1, 2, 2], [1, 1, 2, 1, 2], [1, 1, 2, 2, 1], [1, 2, 1, 1, 2], [1, 2, 1, 2, 1], [1, 2, 2, 1, 1], [2, 1, 1, 1, 2], [2, 1, 1, 2, 1], [2, 1, 2, 1, 1], [2, 2, 1, 1, 1]])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 3]), [[1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 3, 2], [1, 1, 1, 3, 2, 2], [1, 1, 2, 1, 2, 3], [1, 1, 2, 1, 3, 2], [1, 1, 2, 2, 1, 3], [1, 1, 2, 2, 3, 1], [1, 1, 2, 3, 1, 2], [1, 1, 2, 3, 2, 1], [1, 1, 3, 1, 2, 2], [1, 1, 3, 2, 1, 2], [1, 1, 3, 2, 2, 1], [1, 2, 1, 1, 2, 3], [1, 2, 1, 1, 3, 2], [1, 2, 1, 2, 1, 3], [1, 2, 1, 2, 3, 1], [1, 2, 1, 3, 1, 2], [1, 2, 1, 3, 2, 1], [1, 2, 2, 1, 1, 3], [1, 2, 2, 1, 3, 1], [1, 2, 2, 3, 1, 1], [1, 2, 3, 1, 1, 2], [1, 2, 3, 1, 2, 1], [1, 2, 3, 2, 1, 1], [1, 3, 1, 1, 2, 2], [1, 3, 1, 2, 1, 2], [1, 3, 1, 2, 2, 1], [1, 3, 2, 1, 1, 2], [1, 3, 2, 1, 2, 1], [1, 3, 2, 2, 1, 1], [2, 1, 1, 1, 2, 3], [2, 1, 1, 1, 3, 2], [2, 1, 1, 2, 1, 3], [2, 1, 1, 2, 3, 1], [2, 1, 1, 3, 1, 2], [2, 1, 1, 3, 2, 1], [2, 1, 2, 1, 1, 3], [2, 1, 2, 1, 3, 1], [2, 1, 2, 3, 1, 1], [2, 1, 3, 1, 1, 2], [2, 1, 3, 1, 2, 1], [2, 1, 3, 2, 1, 1], [2, 2, 1, 1, 1, 3], [2, 2, 1, 1, 3, 1], [2, 2, 1, 3, 1, 1], [2, 2, 3, 1, 1, 1], [2, 3, 1, 1, 1, 2], [2, 3, 1, 1, 2, 1], [2, 3, 1, 2, 1, 1], [2, 3, 2, 1, 1, 1], [3, 1, 1, 1, 2, 2], [3, 1, 1, 2, 1, 2], [3, 1, 1, 2, 2, 1], [3, 1, 2, 1, 1, 2], [3, 1, 2, 1, 2, 1], [3, 1, 2, 2, 1, 1], [3, 2, 1, 1, 1, 2], [3, 2, 1, 1, 2, 1], [3, 2, 1, 2, 1, 1], [3, 2, 2, 1, 1, 1]])\n assert answers_match(candidate(nums=[10, -10, 0, 5, -5, 5]), [[-10, -5, 0, 5, 5, 10], [-10, -5, 0, 5, 10, 5], [-10, -5, 0, 10, 5, 5], [-10, -5, 5, 0, 5, 10], [-10, -5, 5, 0, 10, 5], [-10, -5, 5, 5, 0, 10], [-10, -5, 5, 5, 10, 0], [-10, -5, 5, 10, 0, 5], [-10, -5, 5, 10, 5, 0], [-10, -5, 10, 0, 5, 5], [-10, -5, 10, 5, 0, 5], [-10, -5, 10, 5, 5, 0], [-10, 0, -5, 5, 5, 10], [-10, 0, -5, 5, 10, 5], [-10, 0, -5, 10, 5, 5], [-10, 0, 5, -5, 5, 10], [-10, 0, 5, -5, 10, 5], [-10, 0, 5, 5, -5, 10], [-10, 0, 5, 5, 10, -5], [-10, 0, 5, 10, -5, 5], [-10, 0, 5, 10, 5, -5], [-10, 0, 10, -5, 5, 5], [-10, 0, 10, 5, -5, 5], [-10, 0, 10, 5, 5, -5], [-10, 5, -5, 0, 5, 10], [-10, 5, -5, 0, 10, 5], [-10, 5, -5, 5, 0, 10], [-10, 5, -5, 5, 10, 0], [-10, 5, -5, 10, 0, 5], [-10, 5, -5, 10, 5, 0], [-10, 5, 0, -5, 5, 10], [-10, 5, 0, -5, 10, 5], [-10, 5, 0, 5, -5, 10], [-10, 5, 0, 5, 10, -5], [-10, 5, 0, 10, -5, 5], [-10, 5, 0, 10, 5, -5], [-10, 5, 5, -5, 0, 10], [-10, 5, 5, -5, 10, 0], [-10, 5, 5, 0, -5, 10], [-10, 5, 5, 0, 10, -5], [-10, 5, 5, 10, -5, 0], [-10, 5, 5, 10, 0, -5], [-10, 5, 10, -5, 0, 5], [-10, 5, 10, -5, 5, 0], [-10, 5, 10, 0, -5, 5], [-10, 5, 10, 0, 5, -5], [-10, 5, 10, 5, -5, 0], [-10, 5, 10, 5, 0, -5], [-10, 10, -5, 0, 5, 5], [-10, 10, -5, 5, 0, 5], [-10, 10, -5, 5, 5, 0], [-10, 10, 0, -5, 5, 5], [-10, 10, 0, 5, -5, 5], [-10, 10, 0, 5, 5, -5], [-10, 10, 5, -5, 0, 5], [-10, 10, 5, -5, 5, 0], [-10, 10, 5, 0, -5, 5], [-10, 10, 5, 0, 5, -5], [-10, 10, 5, 5, -5, 0], [-10, 10, 5, 5, 0, -5], [-5, -10, 0, 5, 5, 10], [-5, -10, 0, 5, 10, 5], [-5, -10, 0, 10, 5, 5], [-5, -10, 5, 0, 5, 10], [-5, -10, 5, 0, 10, 5], [-5, -10, 5, 5, 0, 10], [-5, -10, 5, 5, 10, 0], [-5, -10, 5, 10, 0, 5], [-5, -10, 5, 10, 5, 0], [-5, -10, 10, 0, 5, 5], [-5, -10, 10, 5, 0, 5], [-5, -10, 10, 5, 5, 0], [-5, 0, -10, 5, 5, 10], [-5, 0, -10, 5, 10, 5], [-5, 0, -10, 10, 5, 5], [-5, 0, 5, -10, 5, 10], [-5, 0, 5, -10, 10, 5], [-5, 0, 5, 5, -10, 10], [-5, 0, 5, 5, 10, -10], [-5, 0, 5, 10, -10, 5], [-5, 0, 5, 10, 5, -10], [-5, 0, 10, -10, 5, 5], [-5, 0, 10, 5, -10, 5], [-5, 0, 10, 5, 5, -10], [-5, 5, -10, 0, 5, 10], [-5, 5, -10, 0, 10, 5], [-5, 5, -10, 5, 0, 10], [-5, 5, -10, 5, 10, 0], [-5, 5, -10, 10, 0, 5], [-5, 5, -10, 10, 5, 0], [-5, 5, 0, -10, 5, 10], [-5, 5, 0, -10, 10, 5], [-5, 5, 0, 5, -10, 10], [-5, 5, 0, 5, 10, -10], [-5, 5, 0, 10, -10, 5], [-5, 5, 0, 10, 5, -10], [-5, 5, 5, -10, 0, 10], [-5, 5, 5, -10, 10, 0], [-5, 5, 5, 0, -10, 10], [-5, 5, 5, 0, 10, -10], [-5, 5, 5, 10, -10, 0], [-5, 5, 5, 10, 0, -10], [-5, 5, 10, -10, 0, 5], [-5, 5, 10, -10, 5, 0], [-5, 5, 10, 0, -10, 5], [-5, 5, 10, 0, 5, -10], [-5, 5, 10, 5, -10, 0], [-5, 5, 10, 5, 0, -10], [-5, 10, -10, 0, 5, 5], [-5, 10, -10, 5, 0, 5], [-5, 10, -10, 5, 5, 0], [-5, 10, 0, -10, 5, 5], [-5, 10, 0, 5, -10, 5], [-5, 10, 0, 5, 5, -10], [-5, 10, 5, -10, 0, 5], [-5, 10, 5, -10, 5, 0], [-5, 10, 5, 0, -10, 5], [-5, 10, 5, 0, 5, -10], [-5, 10, 5, 5, -10, 0], [-5, 10, 5, 5, 0, -10], [0, -10, -5, 5, 5, 10], [0, -10, -5, 5, 10, 5], [0, -10, -5, 10, 5, 5], [0, -10, 5, -5, 5, 10], [0, -10, 5, -5, 10, 5], [0, -10, 5, 5, -5, 10], [0, -10, 5, 5, 10, -5], [0, -10, 5, 10, -5, 5], [0, -10, 5, 10, 5, -5], [0, -10, 10, -5, 5, 5], [0, -10, 10, 5, -5, 5], [0, -10, 10, 5, 5, -5], [0, -5, -10, 5, 5, 10], [0, -5, -10, 5, 10, 5], [0, -5, -10, 10, 5, 5], [0, -5, 5, -10, 5, 10], [0, -5, 5, -10, 10, 5], [0, -5, 5, 5, -10, 10], [0, -5, 5, 5, 10, -10], [0, -5, 5, 10, -10, 5], [0, -5, 5, 10, 5, -10], [0, -5, 10, -10, 5, 5], [0, -5, 10, 5, -10, 5], [0, -5, 10, 5, 5, -10], [0, 5, -10, -5, 5, 10], [0, 5, -10, -5, 10, 5], [0, 5, -10, 5, -5, 10], [0, 5, -10, 5, 10, -5], [0, 5, -10, 10, -5, 5], [0, 5, -10, 10, 5, -5], [0, 5, -5, -10, 5, 10], [0, 5, -5, -10, 10, 5], [0, 5, -5, 5, -10, 10], [0, 5, -5, 5, 10, -10], [0, 5, -5, 10, -10, 5], [0, 5, -5, 10, 5, -10], [0, 5, 5, -10, -5, 10], [0, 5, 5, -10, 10, -5], [0, 5, 5, -5, -10, 10], [0, 5, 5, -5, 10, -10], [0, 5, 5, 10, -10, -5], [0, 5, 5, 10, -5, -10], [0, 5, 10, -10, -5, 5], [0, 5, 10, -10, 5, -5], [0, 5, 10, -5, -10, 5], [0, 5, 10, -5, 5, -10], [0, 5, 10, 5, -10, -5], [0, 5, 10, 5, -5, -10], [0, 10, -10, -5, 5, 5], [0, 10, -10, 5, -5, 5], [0, 10, -10, 5, 5, -5], [0, 10, -5, -10, 5, 5], [0, 10, -5, 5, -10, 5], [0, 10, -5, 5, 5, -10], [0, 10, 5, -10, -5, 5], [0, 10, 5, -10, 5, -5], [0, 10, 5, -5, -10, 5], [0, 10, 5, -5, 5, -10], [0, 10, 5, 5, -10, -5], [0, 10, 5, 5, -5, -10], [5, -10, -5, 0, 5, 10], [5, -10, -5, 0, 10, 5], [5, -10, -5, 5, 0, 10], [5, -10, -5, 5, 10, 0], [5, -10, -5, 10, 0, 5], [5, -10, -5, 10, 5, 0], [5, -10, 0, -5, 5, 10], [5, -10, 0, -5, 10, 5], [5, -10, 0, 5, -5, 10], [5, -10, 0, 5, 10, -5], [5, -10, 0, 10, -5, 5], [5, -10, 0, 10, 5, -5], [5, -10, 5, -5, 0, 10], [5, -10, 5, -5, 10, 0], [5, -10, 5, 0, -5, 10], [5, -10, 5, 0, 10, -5], [5, -10, 5, 10, -5, 0], [5, -10, 5, 10, 0, -5], [5, -10, 10, -5, 0, 5], [5, -10, 10, -5, 5, 0], [5, -10, 10, 0, -5, 5], [5, -10, 10, 0, 5, -5], [5, -10, 10, 5, -5, 0], [5, -10, 10, 5, 0, -5], [5, -5, -10, 0, 5, 10], [5, -5, -10, 0, 10, 5], [5, -5, -10, 5, 0, 10], [5, -5, -10, 5, 10, 0], [5, -5, -10, 10, 0, 5], [5, -5, -10, 10, 5, 0], [5, -5, 0, -10, 5, 10], [5, -5, 0, -10, 10, 5], [5, -5, 0, 5, -10, 10], [5, -5, 0, 5, 10, -10], [5, -5, 0, 10, -10, 5], [5, -5, 0, 10, 5, -10], [5, -5, 5, -10, 0, 10], [5, -5, 5, -10, 10, 0], [5, -5, 5, 0, -10, 10], [5, -5, 5, 0, 10, -10], [5, -5, 5, 10, -10, 0], [5, -5, 5, 10, 0, -10], [5, -5, 10, -10, 0, 5], [5, -5, 10, -10, 5, 0], [5, -5, 10, 0, -10, 5], [5, -5, 10, 0, 5, -10], [5, -5, 10, 5, -10, 0], [5, -5, 10, 5, 0, -10], [5, 0, -10, -5, 5, 10], [5, 0, -10, -5, 10, 5], [5, 0, -10, 5, -5, 10], [5, 0, -10, 5, 10, -5], [5, 0, -10, 10, -5, 5], [5, 0, -10, 10, 5, -5], [5, 0, -5, -10, 5, 10], [5, 0, -5, -10, 10, 5], [5, 0, -5, 5, -10, 10], [5, 0, -5, 5, 10, -10], [5, 0, -5, 10, -10, 5], [5, 0, -5, 10, 5, -10], [5, 0, 5, -10, -5, 10], [5, 0, 5, -10, 10, -5], [5, 0, 5, -5, -10, 10], [5, 0, 5, -5, 10, -10], [5, 0, 5, 10, -10, -5], [5, 0, 5, 10, -5, -10], [5, 0, 10, -10, -5, 5], [5, 0, 10, -10, 5, -5], [5, 0, 10, -5, -10, 5], [5, 0, 10, -5, 5, -10], [5, 0, 10, 5, -10, -5], [5, 0, 10, 5, -5, -10], [5, 5, -10, -5, 0, 10], [5, 5, -10, -5, 10, 0], [5, 5, -10, 0, -5, 10], [5, 5, -10, 0, 10, -5], [5, 5, -10, 10, -5, 0], [5, 5, -10, 10, 0, -5], [5, 5, -5, -10, 0, 10], [5, 5, -5, -10, 10, 0], [5, 5, -5, 0, -10, 10], [5, 5, -5, 0, 10, -10], [5, 5, -5, 10, -10, 0], [5, 5, -5, 10, 0, -10], [5, 5, 0, -10, -5, 10], [5, 5, 0, -10, 10, -5], [5, 5, 0, -5, -10, 10], [5, 5, 0, -5, 10, -10], [5, 5, 0, 10, -10, -5], [5, 5, 0, 10, -5, -10], [5, 5, 10, -10, -5, 0], [5, 5, 10, -10, 0, -5], [5, 5, 10, -5, -10, 0], [5, 5, 10, -5, 0, -10], [5, 5, 10, 0, -10, -5], [5, 5, 10, 0, -5, -10], [5, 10, -10, -5, 0, 5], [5, 10, -10, -5, 5, 0], [5, 10, -10, 0, -5, 5], [5, 10, -10, 0, 5, -5], [5, 10, -10, 5, -5, 0], [5, 10, -10, 5, 0, -5], [5, 10, -5, -10, 0, 5], [5, 10, -5, -10, 5, 0], [5, 10, -5, 0, -10, 5], [5, 10, -5, 0, 5, -10], [5, 10, -5, 5, -10, 0], [5, 10, -5, 5, 0, -10], [5, 10, 0, -10, -5, 5], [5, 10, 0, -10, 5, -5], [5, 10, 0, -5, -10, 5], [5, 10, 0, -5, 5, -10], [5, 10, 0, 5, -10, -5], [5, 10, 0, 5, -5, -10], [5, 10, 5, -10, -5, 0], [5, 10, 5, -10, 0, -5], [5, 10, 5, -5, -10, 0], [5, 10, 5, -5, 0, -10], [5, 10, 5, 0, -10, -5], [5, 10, 5, 0, -5, -10], [10, -10, -5, 0, 5, 5], [10, -10, -5, 5, 0, 5], [10, -10, -5, 5, 5, 0], [10, -10, 0, -5, 5, 5], [10, -10, 0, 5, -5, 5], [10, -10, 0, 5, 5, -5], [10, -10, 5, -5, 0, 5], [10, -10, 5, -5, 5, 0], [10, -10, 5, 0, -5, 5], [10, -10, 5, 0, 5, -5], [10, -10, 5, 5, -5, 0], [10, -10, 5, 5, 0, -5], [10, -5, -10, 0, 5, 5], [10, -5, -10, 5, 0, 5], [10, -5, -10, 5, 5, 0], [10, -5, 0, -10, 5, 5], [10, -5, 0, 5, -10, 5], [10, -5, 0, 5, 5, -10], [10, -5, 5, -10, 0, 5], [10, -5, 5, -10, 5, 0], [10, -5, 5, 0, -10, 5], [10, -5, 5, 0, 5, -10], [10, -5, 5, 5, -10, 0], [10, -5, 5, 5, 0, -10], [10, 0, -10, -5, 5, 5], [10, 0, -10, 5, -5, 5], [10, 0, -10, 5, 5, -5], [10, 0, -5, -10, 5, 5], [10, 0, -5, 5, -10, 5], [10, 0, -5, 5, 5, -10], [10, 0, 5, -10, -5, 5], [10, 0, 5, -10, 5, -5], [10, 0, 5, -5, -10, 5], [10, 0, 5, -5, 5, -10], [10, 0, 5, 5, -10, -5], [10, 0, 5, 5, -5, -10], [10, 5, -10, -5, 0, 5], [10, 5, -10, -5, 5, 0], [10, 5, -10, 0, -5, 5], [10, 5, -10, 0, 5, -5], [10, 5, -10, 5, -5, 0], [10, 5, -10, 5, 0, -5], [10, 5, -5, -10, 0, 5], [10, 5, -5, -10, 5, 0], [10, 5, -5, 0, -10, 5], [10, 5, -5, 0, 5, -10], [10, 5, -5, 5, -10, 0], [10, 5, -5, 5, 0, -10], [10, 5, 0, -10, -5, 5], [10, 5, 0, -10, 5, -5], [10, 5, 0, -5, -10, 5], [10, 5, 0, -5, 5, -10], [10, 5, 0, 5, -10, -5], [10, 5, 0, 5, -5, -10], [10, 5, 5, -10, -5, 0], [10, 5, 5, -10, 0, -5], [10, 5, 5, -5, -10, 0], [10, 5, 5, -5, 0, -10], [10, 5, 5, 0, -10, -5], [10, 5, 5, 0, -5, -10]])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[1, 2, 3, 4], [1, 2, 4, 3], [1, 3, 2, 4], [1, 3, 4, 2], [1, 4, 2, 3], [1, 4, 3, 2], [2, 1, 3, 4], [2, 1, 4, 3], [2, 3, 1, 4], [2, 3, 4, 1], [2, 4, 1, 3], [2, 4, 3, 1], [3, 1, 2, 4], [3, 1, 4, 2], [3, 2, 1, 4], [3, 2, 4, 1], [3, 4, 1, 2], [3, 4, 2, 1], [4, 1, 2, 3], [4, 1, 3, 2], [4, 2, 1, 3], [4, 2, 3, 1], [4, 3, 1, 2], [4, 3, 2, 1]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5], [1, 2, 3, 5, 4], [1, 2, 4, 3, 5], [1, 2, 4, 5, 3], [1, 2, 5, 3, 4], [1, 2, 5, 4, 3], [1, 3, 2, 4, 5], [1, 3, 2, 5, 4], [1, 3, 4, 2, 5], [1, 3, 4, 5, 2], [1, 3, 5, 2, 4], [1, 3, 5, 4, 2], [1, 4, 2, 3, 5], [1, 4, 2, 5, 3], [1, 4, 3, 2, 5], [1, 4, 3, 5, 2], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 2, 3, 4], [1, 5, 2, 4, 3], [1, 5, 3, 2, 4], [1, 5, 3, 4, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2], [2, 1, 3, 4, 5], [2, 1, 3, 5, 4], [2, 1, 4, 3, 5], [2, 1, 4, 5, 3], [2, 1, 5, 3, 4], [2, 1, 5, 4, 3], [2, 3, 1, 4, 5], [2, 3, 1, 5, 4], [2, 3, 4, 1, 5], [2, 3, 4, 5, 1], [2, 3, 5, 1, 4], [2, 3, 5, 4, 1], [2, 4, 1, 3, 5], [2, 4, 1, 5, 3], [2, 4, 3, 1, 5], [2, 4, 3, 5, 1], [2, 4, 5, 1, 3], [2, 4, 5, 3, 1], [2, 5, 1, 3, 4], [2, 5, 1, 4, 3], [2, 5, 3, 1, 4], [2, 5, 3, 4, 1], [2, 5, 4, 1, 3], [2, 5, 4, 3, 1], [3, 1, 2, 4, 5], [3, 1, 2, 5, 4], [3, 1, 4, 2, 5], [3, 1, 4, 5, 2], [3, 1, 5, 2, 4], [3, 1, 5, 4, 2], [3, 2, 1, 4, 5], [3, 2, 1, 5, 4], [3, 2, 4, 1, 5], [3, 2, 4, 5, 1], [3, 2, 5, 1, 4], [3, 2, 5, 4, 1], [3, 4, 1, 2, 5], [3, 4, 1, 5, 2], [3, 4, 2, 1, 5], [3, 4, 2, 5, 1], [3, 4, 5, 1, 2], [3, 4, 5, 2, 1], [3, 5, 1, 2, 4], [3, 5, 1, 4, 2], [3, 5, 2, 1, 4], [3, 5, 2, 4, 1], [3, 5, 4, 1, 2], [3, 5, 4, 2, 1], [4, 1, 2, 3, 5], [4, 1, 2, 5, 3], [4, 1, 3, 2, 5], [4, 1, 3, 5, 2], [4, 1, 5, 2, 3], [4, 1, 5, 3, 2], [4, 2, 1, 3, 5], [4, 2, 1, 5, 3], [4, 2, 3, 1, 5], [4, 2, 3, 5, 1], [4, 2, 5, 1, 3], [4, 2, 5, 3, 1], [4, 3, 1, 2, 5], [4, 3, 1, 5, 2], [4, 3, 2, 1, 5], [4, 3, 2, 5, 1], [4, 3, 5, 1, 2], [4, 3, 5, 2, 1], [4, 5, 1, 2, 3], [4, 5, 1, 3, 2], [4, 5, 2, 1, 3], [4, 5, 2, 3, 1], [4, 5, 3, 1, 2], [4, 5, 3, 2, 1], [5, 1, 2, 3, 4], [5, 1, 2, 4, 3], [5, 1, 3, 2, 4], [5, 1, 3, 4, 2], [5, 1, 4, 2, 3], [5, 1, 4, 3, 2], [5, 2, 1, 3, 4], [5, 2, 1, 4, 3], [5, 2, 3, 1, 4], [5, 2, 3, 4, 1], [5, 2, 4, 1, 3], [5, 2, 4, 3, 1], [5, 3, 1, 2, 4], [5, 3, 1, 4, 2], [5, 3, 2, 1, 4], [5, 3, 2, 4, 1], [5, 3, 4, 1, 2], [5, 3, 4, 2, 1], [5, 4, 1, 2, 3], [5, 4, 1, 3, 2], [5, 4, 2, 1, 3], [5, 4, 2, 3, 1], [5, 4, 3, 1, 2], [5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[-10, 10, -10, 10, 0, 0]), [[-10, -10, 0, 0, 10, 10], [-10, -10, 0, 10, 0, 10], [-10, -10, 0, 10, 10, 0], [-10, -10, 10, 0, 0, 10], [-10, -10, 10, 0, 10, 0], [-10, -10, 10, 10, 0, 0], [-10, 0, -10, 0, 10, 10], [-10, 0, -10, 10, 0, 10], [-10, 0, -10, 10, 10, 0], [-10, 0, 0, -10, 10, 10], [-10, 0, 0, 10, -10, 10], [-10, 0, 0, 10, 10, -10], [-10, 0, 10, -10, 0, 10], [-10, 0, 10, -10, 10, 0], [-10, 0, 10, 0, -10, 10], [-10, 0, 10, 0, 10, -10], [-10, 0, 10, 10, -10, 0], [-10, 0, 10, 10, 0, -10], [-10, 10, -10, 0, 0, 10], [-10, 10, -10, 0, 10, 0], [-10, 10, -10, 10, 0, 0], [-10, 10, 0, -10, 0, 10], [-10, 10, 0, -10, 10, 0], [-10, 10, 0, 0, -10, 10], [-10, 10, 0, 0, 10, -10], [-10, 10, 0, 10, -10, 0], [-10, 10, 0, 10, 0, -10], [-10, 10, 10, -10, 0, 0], [-10, 10, 10, 0, -10, 0], [-10, 10, 10, 0, 0, -10], [0, -10, -10, 0, 10, 10], [0, -10, -10, 10, 0, 10], [0, -10, -10, 10, 10, 0], [0, -10, 0, -10, 10, 10], [0, -10, 0, 10, -10, 10], [0, -10, 0, 10, 10, -10], [0, -10, 10, -10, 0, 10], [0, -10, 10, -10, 10, 0], [0, -10, 10, 0, -10, 10], [0, -10, 10, 0, 10, -10], [0, -10, 10, 10, -10, 0], [0, -10, 10, 10, 0, -10], [0, 0, -10, -10, 10, 10], [0, 0, -10, 10, -10, 10], [0, 0, -10, 10, 10, -10], [0, 0, 10, -10, -10, 10], [0, 0, 10, -10, 10, -10], [0, 0, 10, 10, -10, -10], [0, 10, -10, -10, 0, 10], [0, 10, -10, -10, 10, 0], [0, 10, -10, 0, -10, 10], [0, 10, -10, 0, 10, -10], [0, 10, -10, 10, -10, 0], [0, 10, -10, 10, 0, -10], [0, 10, 0, -10, -10, 10], [0, 10, 0, -10, 10, -10], [0, 10, 0, 10, -10, -10], [0, 10, 10, -10, -10, 0], [0, 10, 10, -10, 0, -10], [0, 10, 10, 0, -10, -10], [10, -10, -10, 0, 0, 10], [10, -10, -10, 0, 10, 0], [10, -10, -10, 10, 0, 0], [10, -10, 0, -10, 0, 10], [10, -10, 0, -10, 10, 0], [10, -10, 0, 0, -10, 10], [10, -10, 0, 0, 10, -10], [10, -10, 0, 10, -10, 0], [10, -10, 0, 10, 0, -10], [10, -10, 10, -10, 0, 0], [10, -10, 10, 0, -10, 0], [10, -10, 10, 0, 0, -10], [10, 0, -10, -10, 0, 10], [10, 0, -10, -10, 10, 0], [10, 0, -10, 0, -10, 10], [10, 0, -10, 0, 10, -10], [10, 0, -10, 10, -10, 0], [10, 0, -10, 10, 0, -10], [10, 0, 0, -10, -10, 10], [10, 0, 0, -10, 10, -10], [10, 0, 0, 10, -10, -10], [10, 0, 10, -10, -10, 0], [10, 0, 10, -10, 0, -10], [10, 0, 10, 0, -10, -10], [10, 10, -10, -10, 0, 0], [10, 10, -10, 0, -10, 0], [10, 10, -10, 0, 0, -10], [10, 10, 0, -10, -10, 0], [10, 10, 0, -10, 0, -10], [10, 10, 0, 0, -10, -10]])\n assert answers_match(candidate(nums=[0, -1, 1, -1, 0]), [[-1, -1, 0, 0, 1], [-1, -1, 0, 1, 0], [-1, -1, 1, 0, 0], [-1, 0, -1, 0, 1], [-1, 0, -1, 1, 0], [-1, 0, 0, -1, 1], [-1, 0, 0, 1, -1], [-1, 0, 1, -1, 0], [-1, 0, 1, 0, -1], [-1, 1, -1, 0, 0], [-1, 1, 0, -1, 0], [-1, 1, 0, 0, -1], [0, -1, -1, 0, 1], [0, -1, -1, 1, 0], [0, -1, 0, -1, 1], [0, -1, 0, 1, -1], [0, -1, 1, -1, 0], [0, -1, 1, 0, -1], [0, 0, -1, -1, 1], [0, 0, -1, 1, -1], [0, 0, 1, -1, -1], [0, 1, -1, -1, 0], [0, 1, -1, 0, -1], [0, 1, 0, -1, -1], [1, -1, -1, 0, 0], [1, -1, 0, -1, 0], [1, -1, 0, 0, -1], [1, 0, -1, -1, 0], [1, 0, -1, 0, -1], [1, 0, 0, -1, -1]])\n assert answers_match(candidate(nums=[10, -10, 10, -10, 10]), [[-10, -10, 10, 10, 10], [-10, 10, -10, 10, 10], [-10, 10, 10, -10, 10], [-10, 10, 10, 10, -10], [10, -10, -10, 10, 10], [10, -10, 10, -10, 10], [10, -10, 10, 10, -10], [10, 10, -10, -10, 10], [10, 10, -10, 10, -10], [10, 10, 10, -10, -10]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5, 5]])\n assert answers_match(candidate(nums=[4, 4, 4, 1, 4]), [[1, 4, 4, 4, 4], [4, 1, 4, 4, 4], [4, 4, 1, 4, 4], [4, 4, 4, 1, 4], [4, 4, 4, 4, 1]])\n assert answers_match(candidate(nums=[-1, 0, 1, -1, 0, 1]), [[-1, -1, 0, 0, 1, 1], [-1, -1, 0, 1, 0, 1], [-1, -1, 0, 1, 1, 0], [-1, -1, 1, 0, 0, 1], [-1, -1, 1, 0, 1, 0], [-1, -1, 1, 1, 0, 0], [-1, 0, -1, 0, 1, 1], [-1, 0, -1, 1, 0, 1], [-1, 0, -1, 1, 1, 0], [-1, 0, 0, -1, 1, 1], [-1, 0, 0, 1, -1, 1], [-1, 0, 0, 1, 1, -1], [-1, 0, 1, -1, 0, 1], [-1, 0, 1, -1, 1, 0], [-1, 0, 1, 0, -1, 1], [-1, 0, 1, 0, 1, -1], [-1, 0, 1, 1, -1, 0], [-1, 0, 1, 1, 0, -1], [-1, 1, -1, 0, 0, 1], [-1, 1, -1, 0, 1, 0], [-1, 1, -1, 1, 0, 0], [-1, 1, 0, -1, 0, 1], [-1, 1, 0, -1, 1, 0], [-1, 1, 0, 0, -1, 1], [-1, 1, 0, 0, 1, -1], [-1, 1, 0, 1, -1, 0], [-1, 1, 0, 1, 0, -1], [-1, 1, 1, -1, 0, 0], [-1, 1, 1, 0, -1, 0], [-1, 1, 1, 0, 0, -1], [0, -1, -1, 0, 1, 1], [0, -1, -1, 1, 0, 1], [0, -1, -1, 1, 1, 0], [0, -1, 0, -1, 1, 1], [0, -1, 0, 1, -1, 1], [0, -1, 0, 1, 1, -1], [0, -1, 1, -1, 0, 1], [0, -1, 1, -1, 1, 0], [0, -1, 1, 0, -1, 1], [0, -1, 1, 0, 1, -1], [0, -1, 1, 1, -1, 0], [0, -1, 1, 1, 0, -1], [0, 0, -1, -1, 1, 1], [0, 0, -1, 1, -1, 1], [0, 0, -1, 1, 1, -1], [0, 0, 1, -1, -1, 1], [0, 0, 1, -1, 1, -1], [0, 0, 1, 1, -1, -1], [0, 1, -1, -1, 0, 1], [0, 1, -1, -1, 1, 0], [0, 1, -1, 0, -1, 1], [0, 1, -1, 0, 1, -1], [0, 1, -1, 1, -1, 0], [0, 1, -1, 1, 0, -1], [0, 1, 0, -1, -1, 1], [0, 1, 0, -1, 1, -1], [0, 1, 0, 1, -1, -1], [0, 1, 1, -1, -1, 0], [0, 1, 1, -1, 0, -1], [0, 1, 1, 0, -1, -1], [1, -1, -1, 0, 0, 1], [1, -1, -1, 0, 1, 0], [1, -1, -1, 1, 0, 0], [1, -1, 0, -1, 0, 1], [1, -1, 0, -1, 1, 0], [1, -1, 0, 0, -1, 1], [1, -1, 0, 0, 1, -1], [1, -1, 0, 1, -1, 0], [1, -1, 0, 1, 0, -1], [1, -1, 1, -1, 0, 0], [1, -1, 1, 0, -1, 0], [1, -1, 1, 0, 0, -1], [1, 0, -1, -1, 0, 1], [1, 0, -1, -1, 1, 0], [1, 0, -1, 0, -1, 1], [1, 0, -1, 0, 1, -1], [1, 0, -1, 1, -1, 0], [1, 0, -1, 1, 0, -1], [1, 0, 0, -1, -1, 1], [1, 0, 0, -1, 1, -1], [1, 0, 0, 1, -1, -1], [1, 0, 1, -1, -1, 0], [1, 0, 1, -1, 0, -1], [1, 0, 1, 0, -1, -1], [1, 1, -1, -1, 0, 0], [1, 1, -1, 0, -1, 0], [1, 1, -1, 0, 0, -1], [1, 1, 0, -1, -1, 0], [1, 1, 0, -1, 0, -1], [1, 1, 0, 0, -1, -1]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5, 5, 5]])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3]), [[1, 1, 2, 2, 3, 3], [1, 1, 2, 3, 2, 3], [1, 1, 2, 3, 3, 2], [1, 1, 3, 2, 2, 3], [1, 1, 3, 2, 3, 2], [1, 1, 3, 3, 2, 2], [1, 2, 1, 2, 3, 3], [1, 2, 1, 3, 2, 3], [1, 2, 1, 3, 3, 2], [1, 2, 2, 1, 3, 3], [1, 2, 2, 3, 1, 3], [1, 2, 2, 3, 3, 1], [1, 2, 3, 1, 2, 3], [1, 2, 3, 1, 3, 2], [1, 2, 3, 2, 1, 3], [1, 2, 3, 2, 3, 1], [1, 2, 3, 3, 1, 2], [1, 2, 3, 3, 2, 1], [1, 3, 1, 2, 2, 3], [1, 3, 1, 2, 3, 2], [1, 3, 1, 3, 2, 2], [1, 3, 2, 1, 2, 3], [1, 3, 2, 1, 3, 2], [1, 3, 2, 2, 1, 3], [1, 3, 2, 2, 3, 1], [1, 3, 2, 3, 1, 2], [1, 3, 2, 3, 2, 1], [1, 3, 3, 1, 2, 2], [1, 3, 3, 2, 1, 2], [1, 3, 3, 2, 2, 1], [2, 1, 1, 2, 3, 3], [2, 1, 1, 3, 2, 3], [2, 1, 1, 3, 3, 2], [2, 1, 2, 1, 3, 3], [2, 1, 2, 3, 1, 3], [2, 1, 2, 3, 3, 1], [2, 1, 3, 1, 2, 3], [2, 1, 3, 1, 3, 2], [2, 1, 3, 2, 1, 3], [2, 1, 3, 2, 3, 1], [2, 1, 3, 3, 1, 2], [2, 1, 3, 3, 2, 1], [2, 2, 1, 1, 3, 3], [2, 2, 1, 3, 1, 3], [2, 2, 1, 3, 3, 1], [2, 2, 3, 1, 1, 3], [2, 2, 3, 1, 3, 1], [2, 2, 3, 3, 1, 1], [2, 3, 1, 1, 2, 3], [2, 3, 1, 1, 3, 2], [2, 3, 1, 2, 1, 3], [2, 3, 1, 2, 3, 1], [2, 3, 1, 3, 1, 2], [2, 3, 1, 3, 2, 1], [2, 3, 2, 1, 1, 3], [2, 3, 2, 1, 3, 1], [2, 3, 2, 3, 1, 1], [2, 3, 3, 1, 1, 2], [2, 3, 3, 1, 2, 1], [2, 3, 3, 2, 1, 1], [3, 1, 1, 2, 2, 3], [3, 1, 1, 2, 3, 2], [3, 1, 1, 3, 2, 2], [3, 1, 2, 1, 2, 3], [3, 1, 2, 1, 3, 2], [3, 1, 2, 2, 1, 3], [3, 1, 2, 2, 3, 1], [3, 1, 2, 3, 1, 2], [3, 1, 2, 3, 2, 1], [3, 1, 3, 1, 2, 2], [3, 1, 3, 2, 1, 2], [3, 1, 3, 2, 2, 1], [3, 2, 1, 1, 2, 3], [3, 2, 1, 1, 3, 2], [3, 2, 1, 2, 1, 3], [3, 2, 1, 2, 3, 1], [3, 2, 1, 3, 1, 2], [3, 2, 1, 3, 2, 1], [3, 2, 2, 1, 1, 3], [3, 2, 2, 1, 3, 1], [3, 2, 2, 3, 1, 1], [3, 2, 3, 1, 1, 2], [3, 2, 3, 1, 2, 1], [3, 2, 3, 2, 1, 1], [3, 3, 1, 1, 2, 2], [3, 3, 1, 2, 1, 2], [3, 3, 1, 2, 2, 1], [3, 3, 2, 1, 1, 2], [3, 3, 2, 1, 2, 1], [3, 3, 2, 2, 1, 1]])\n", "comparison": "unordered"}, "public_tests": ["[1,1,2]", "[1,2,3]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().permuteUnique", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:13+00:00", "tests_total": 73, "tests_dropped": 1, "flags": ["any_order"], "topic_tags": ["array", "backtracking", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def permute_unique(nums)", "container": null, "callable": "permute_unique", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 49, "task_id": "group-anagrams", "difficulty": "Medium", "problem_description": "Given an array of strings strs, group the anagrams together. You can return the answer in any order.\n\nExample 1:\n\nInput: strs = [\"eat\",\"tea\",\"tan\",\"ate\",\"nat\",\"bat\"]\nOutput: [[\"bat\"],[\"nat\",\"tan\"],[\"ate\",\"eat\",\"tea\"]]\nExplanation:\n- There is no string in strs that can be rearranged to form \"bat\".\n- The strings \"nat\" and \"tan\" are anagrams as they can be rearranged to form each other.\n- The strings \"ate\", \"eat\", and \"tea\" are anagrams as they can be rearranged to form each other.\n\nExample 2:\n\nInput: strs = [\"\"]\nOutput: [[\"\"]]\n\nExample 3:\n\nInput: strs = [\"a\"]\nOutput: [[\"a\"]]\n\nConstraints:\n\n- 1 <= strs.length <= 10^4\n- 0 <= strs[i].length <= 100\n- strs[i] consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The groups, and the items inside each group, may come in any order.\"\"\"\n def canonical(groups):\n return sorted((sorted(g, key=repr) if isinstance(g, list) else g for g in groups), key=repr)\n if isinstance(result, list) and isinstance(expected, list):\n return canonical(result) == canonical(expected)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(strs=['a', 'b', 'c', 'd', 'e']), [['a'], ['b'], ['c'], ['d'], ['e']])\n assert answers_match(candidate(strs=['abc', 'bca', 'cab', 'xyz', 'zyx', 'yxz']), [['abc', 'bca', 'cab'], ['xyz', 'zyx', 'yxz']])\n assert answers_match(candidate(strs=['abc', 'def', 'ghi', 'jkl']), [['abc'], ['def'], ['ghi'], ['jkl']])\n assert answers_match(candidate(strs=['abc', 'acb', 'bac', 'bca', 'cab', 'cba']), [['abc', 'acb', 'bac', 'bca', 'cab', 'cba']])\n assert answers_match(candidate(strs=['eat', 'tea', 'tan', 'ate', 'nat', 'bat']), [['eat', 'tea', 'ate'], ['tan', 'nat'], ['bat']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist']), [['listen', 'silent', 'enlist']])\n assert answers_match(candidate(strs=['a']), [['a']])\n assert answers_match(candidate(strs=['aabb', 'bbaa', 'abab', 'baab', 'baba', 'abba', 'aaaa', 'bbbb']), [['aabb', 'bbaa', 'abab', 'baab', 'baba', 'abba'], ['aaaa'], ['bbbb']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl']), [['listen', 'silent', 'enlist'], ['google', 'gooegl']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'rat', 'tar', 'art']), [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['rat', 'tar', 'art']])\n assert answers_match(candidate(strs=['abc', 'bac', 'cab', 'bca', 'acb', 'cba']), [['abc', 'bac', 'cab', 'bca', 'acb', 'cba']])\n assert answers_match(candidate(strs=['dormitory', 'dirtyroom', 'conversation', 'voicesranton', 'listen', 'silent']), [['dormitory', 'dirtyroom'], ['conversation', 'voicesranton'], ['listen', 'silent']])\n assert answers_match(candidate(strs=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']), [['a'], ['b'], ['c'], ['d'], ['e'], ['f'], ['g'], ['h'], ['i'], ['j']])\n assert answers_match(candidate(strs=['hello', 'world', 'hold', 'olelh', 'dlrow', 'owrld']), [['hello', 'olelh'], ['world', 'dlrow', 'owrld'], ['hold']])\n assert answers_match(candidate(strs=['dormitory', 'dirtyroom', 'conversation', 'voicesranton', 'schoolmaster', 'theclassroom']), [['dormitory', 'dirtyroom'], ['conversation', 'voicesranton'], ['schoolmaster', 'theclassroom']])\n assert answers_match(candidate(strs=['hello', 'bello', 'olelh', 'world', 'dlrow', 'dlorw', 'droll']), [['hello', 'olelh'], ['bello'], ['world', 'dlrow', 'dlorw'], ['droll']])\n assert answers_match(candidate(strs=['']), [['']])\n assert answers_match(candidate(strs=['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'cba', 'bca', 'bac', 'acb', 'cab', 'abc']), [['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba'], ['cba', 'bca', 'bac', 'acb', 'cab', 'abc']])\n assert answers_match(candidate(strs=['abc', 'abcd', 'abdc', 'bacd', 'badc', 'cabd', 'cadb', 'dcba', 'dcab', 'abcd', 'abdc', 'bacd', 'badc', 'cabd', 'cadb', 'dcba', 'dcab', 'abcd', 'abdc', 'bacd', 'badc', 'cabd', 'cadb', 'dcba', 'dcab']), [['abc'], ['abcd', 'abdc', 'bacd', 'badc', 'cabd', 'cadb', 'dcba', 'dcab', 'abcd', 'abdc', 'bacd', 'badc', 'cabd', 'cadb', 'dcba', 'dcab', 'abcd', 'abdc', 'bacd', 'badc', 'cabd', 'cadb', 'dcba', 'dcab']])\n assert answers_match(candidate(strs=['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl', 'qrstuvwxyzaabcdefghijklmnop', 'hgfedcbazyxwvutsrqponmlkjijklmnopqrstuvwxyzabcde']), [['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl'], ['qrstuvwxyzaabcdefghijklmnop'], ['hgfedcbazyxwvutsrqponmlkjijklmnopqrstuvwxyzabcde']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'child', 'brink', 'drink', 'crimp', 'crimp', 'stick', 'smirk', 'smirk', 'smith', 'tinsy', 'stint']), [['dusty', 'study'], ['night', 'thing'], ['child'], ['brink'], ['drink'], ['crimp', 'crimp'], ['stick'], ['smirk', 'smirk'], ['smith'], ['tinsy'], ['stint']])\n assert answers_match(candidate(strs=['aabb', 'abab', 'baba', 'baab', 'abba', 'bbaa', 'aabb', 'abab', 'baba', 'baab', 'abba', 'bbaa']), [['aabb', 'abab', 'baba', 'baab', 'abba', 'bbaa', 'aabb', 'abab', 'baba', 'baab', 'abba', 'bbaa']])\n assert answers_match(candidate(strs=['apple', 'pepal', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe', 'appel', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe']), [['apple', 'pepal', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe', 'appel', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe', 'ppale', 'pplea', 'ppela', 'elppa', 'ppael', 'palpe']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'delta', 'tigon', 'state', 'taste', 'date', 'rated']), [['dusty', 'study'], ['night', 'thing'], ['delta'], ['tigon'], ['state', 'taste'], ['date'], ['rated']])\n assert answers_match(candidate(strs=['aabbcc', 'abcabc', 'baccab', 'acbbac', 'cabbaa', 'aabbcc', 'abcabc']), [['aabbcc', 'abcabc', 'baccab', 'acbbac', 'aabbcc', 'abcabc'], ['cabbaa']])\n assert answers_match(candidate(strs=['rat', 'car', 'tar', 'arc', 'cat', 'tac', 'act', 'rat', 'car', 'tar', 'arc', 'cat', 'tac', 'act']), [['rat', 'tar', 'rat', 'tar'], ['car', 'arc', 'car', 'arc'], ['cat', 'tac', 'act', 'cat', 'tac', 'act']])\n assert answers_match(candidate(strs=['aabbcc', 'abcabc', 'bcaabc', 'cababc', 'aabbcc', 'ccbaab', 'abcabc', 'baccab', 'bacabc', 'cababc', 'abcabc']), [['aabbcc', 'abcabc', 'bcaabc', 'cababc', 'aabbcc', 'ccbaab', 'abcabc', 'baccab', 'bacabc', 'cababc', 'abcabc']])\n assert answers_match(candidate(strs=['aabb', 'abab', 'bbaa', 'abba', 'baab', 'aaba', 'baba', 'bbba', 'baaa', 'aaaa', 'bbbb']), [['aabb', 'abab', 'bbaa', 'abba', 'baab', 'baba'], ['aaba', 'baaa'], ['bbba'], ['aaaa'], ['bbbb']])\n assert answers_match(candidate(strs=['ab', 'ba', 'ac', 'ca', 'ad', 'da', 'bc', 'cb', 'ef', 'fe', 'gh', 'hg', 'ij', 'ji', 'kl', 'lk', 'mnop', 'nopm', 'opmn', 'pmno', 'qrst', 'srqt', 'tqrs', 'qrst', 'stqr', 'qrstuv', 'rstquv', 'tsrquv', 'uvqrst', 'vqrstu', 'wxyz', 'xyzw', 'yzwx', 'zwxy']), [['ab', 'ba'], ['ac', 'ca'], ['ad', 'da'], ['bc', 'cb'], ['ef', 'fe'], ['gh', 'hg'], ['ij', 'ji'], ['kl', 'lk'], ['mnop', 'nopm', 'opmn', 'pmno'], ['qrst', 'srqt', 'tqrs', 'qrst', 'stqr'], ['qrstuv', 'rstquv', 'tsrquv', 'uvqrst', 'vqrstu'], ['wxyz', 'xyzw', 'yzwx', 'zwxy']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'rat', 'tar', 'art', 'arc', 'car', 'arc']), [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['rat', 'tar', 'art'], ['arc', 'car', 'arc']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'abc', 'cab', 'bac', 'bca', 'acb', 'cba']), [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['abc', 'cab', 'bac', 'bca', 'acb', 'cba']])\n assert answers_match(candidate(strs=['zzzz', 'zazaz', 'zzzzz', 'zz', 'z', 'za', 'az', 'zzzz', 'zazaz', 'zzzzz', 'zz', 'z', 'za', 'az']), [['zzzz', 'zzzz'], ['zazaz', 'zazaz'], ['zzzzz', 'zzzzz'], ['zz', 'zz'], ['z', 'z'], ['za', 'az', 'za', 'az']])\n assert answers_match(candidate(strs=['aabb', 'bbaa', 'abab', 'abba', 'baab', 'baba', 'aaaa', 'bbbb', 'aabbcc', 'ccbaab', 'aabbc', 'abbac', 'abc', 'acb', 'bac', 'bca', 'cab', 'cba', 'zzz', 'zzzz', 'zzzzz']), [['aabb', 'bbaa', 'abab', 'abba', 'baab', 'baba'], ['aaaa'], ['bbbb'], ['aabbcc', 'ccbaab'], ['aabbc', 'abbac'], ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'], ['zzz'], ['zzzz'], ['zzzzz']])\n assert answers_match(candidate(strs=['aabbcc', 'abcabc', 'bcaabc', 'cababc', 'aabbcc', 'ccbaab', 'abcabc', 'baccab', 'bacabc', 'cababc', 'abcabc', 'xyz', 'zyx', 'yzx', 'zyx', 'xyz', 'yzx', 'zyx', 'xyz', 'zyx', 'yzx', 'zyx', 'xyz', 'yzx', 'zyx', 'xyz', 'zyx', 'yzx', 'zyx', 'xyz', 'yzx', 'zyx', 'xyz']), [['aabbcc', 'abcabc', 'bcaabc', 'cababc', 'aabbcc', 'ccbaab', 'abcabc', 'baccab', 'bacabc', 'cababc', 'abcabc'], ['xyz', 'zyx', 'yzx', 'zyx', 'xyz', 'yzx', 'zyx', 'xyz', 'zyx', 'yzx', 'zyx', 'xyz', 'yzx', 'zyx', 'xyz', 'zyx', 'yzx', 'zyx', 'xyz', 'yzx', 'zyx', 'xyz']])\n assert answers_match(candidate(strs=['abcde', 'edcba', 'bcdea', 'decba', 'bacde', 'cabde', 'eabcd', 'acbde', 'dbcea', 'adbce']), [['abcde', 'edcba', 'bcdea', 'decba', 'bacde', 'cabde', 'eabcd', 'acbde', 'dbcea', 'adbce']])\n assert answers_match(candidate(strs=['abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed']), [['abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed', 'abcde', 'edcba', 'bcdea', 'decba', 'edbac', 'acbed']])\n assert answers_match(candidate(strs=['abcd', 'dcba', 'adbc', 'cbad', 'abcd', 'bcda', 'abcd', 'dcba', 'adbc', 'cbad', 'abcd', 'bcda', 'abcd', 'dcba', 'adbc', 'cbad', 'abcd', 'bcda', 'abcd', 'dcba']), [['abcd', 'dcba', 'adbc', 'cbad', 'abcd', 'bcda', 'abcd', 'dcba', 'adbc', 'cbad', 'abcd', 'bcda', 'abcd', 'dcba', 'adbc', 'cbad', 'abcd', 'bcda', 'abcd', 'dcba']])\n assert answers_match(candidate(strs=['abcd', 'dcba', 'cabd', 'badc', 'dacb', 'cdab', 'bcad', 'bcda', 'acbd', 'cadb', 'acdb', 'abdc']), [['abcd', 'dcba', 'cabd', 'badc', 'dacb', 'cdab', 'bcad', 'bcda', 'acbd', 'cadb', 'acdb', 'abdc']])\n assert answers_match(candidate(strs=['dormitory', 'dirtyroom', 'listen', 'silent', 'enlist', 'google', 'gooegl', 'abc', 'cab', 'bac', 'bca', 'acb', 'cba', 'zzz', 'zzzz', 'zzzzz', 'zzzzzz']), [['dormitory', 'dirtyroom'], ['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['abc', 'cab', 'bac', 'bca', 'acb', 'cba'], ['zzz'], ['zzzz'], ['zzzzz'], ['zzzzzz']])\n assert answers_match(candidate(strs=['abcd', 'dcba', 'abcd', 'cdab', 'bdac', 'cabd', 'bacd', 'abcd', 'dcba', 'abcd']), [['abcd', 'dcba', 'abcd', 'cdab', 'bdac', 'cabd', 'bacd', 'abcd', 'dcba', 'abcd']])\n assert answers_match(candidate(strs=['aabb', 'abab', 'bbaa', 'abba', 'aaaa', 'aaab', 'baaa', 'baba', 'abba', 'aabb', 'abab', 'bbaa', 'aaaa']), [['aabb', 'abab', 'bbaa', 'abba', 'baba', 'abba', 'aabb', 'abab', 'bbaa'], ['aaaa', 'aaaa'], ['aaab', 'baaa']])\n assert answers_match(candidate(strs=['abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb', 'abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb', 'abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb', 'abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb']), [['abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb', 'abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb', 'abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb', 'abcd', 'dcba', 'adcb', 'cbad', 'bdac', 'cabd', 'bacd', 'acbd', 'dbca', 'bcad', 'cadb']])\n assert answers_match(candidate(strs=['anagram', 'nagaram', 'margana', 'anagrama', 'anagram', 'anagram', 'granama', 'nagaramm']), [['anagram', 'nagaram', 'margana', 'anagram', 'anagram', 'granama'], ['anagrama'], ['nagaramm']])\n assert answers_match(candidate(strs=['aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc', 'aaa', 'bbb', 'ccc']), [['aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa', 'aaa'], ['bbb', 'bbb', 'bbb', 'bbb', 'bbb', 'bbb', 'bbb', 'bbb'], ['ccc', 'ccc', 'ccc', 'ccc', 'ccc', 'ccc', 'ccc', 'ccc']])\n assert answers_match(candidate(strs=['aabb', 'bbaa', 'abab', 'baba', 'abba', 'baab', 'abc', 'bac', 'bca', 'acb', 'cba', 'zzz', 'zzzz', 'zzzzz', 'zzzzzz', 'zzzzzzz', 'zzzzzzzz', 'zzzzzzzzz']), [['aabb', 'bbaa', 'abab', 'baba', 'abba', 'baab'], ['abc', 'bac', 'bca', 'acb', 'cba'], ['zzz'], ['zzzz'], ['zzzzz'], ['zzzzzz'], ['zzzzzzz'], ['zzzzzzzz'], ['zzzzzzzzz']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'gnhit', 'inthe', 'night', 'thing', 'night', 'thing', 'night']), [['dusty', 'study'], ['night', 'thing', 'gnhit', 'night', 'thing', 'night', 'thing', 'night'], ['inthe']])\n assert answers_match(candidate(strs=['aabbcc', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac']), [['aabbcc', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac', 'abcabc', 'bcaacb', 'cababc', 'bcacab', 'bacbac', 'aabbcc', 'aabbcc', 'aabcbc', 'bcaabc', 'abacbc', 'babcac']])\n assert answers_match(candidate(strs=['aabbcc', 'abcabc', 'bcaabc', 'cababc', 'abccba', 'acbbac', 'baccab', 'bcacab', 'bacbac', 'acbacb', 'bacbac', 'bacbac', 'bacbac', 'bacbac', 'bacbac']), [['aabbcc', 'abcabc', 'bcaabc', 'cababc', 'abccba', 'acbbac', 'baccab', 'bcacab', 'bacbac', 'acbacb', 'bacbac', 'bacbac', 'bacbac', 'bacbac', 'bacbac']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'eight', 'gnite', 'inthe', 'front', 'trofn', 'gnhet', 'gfno', 'gnfoe', 'thingo', 'niothg', 'ightn']), [['dusty', 'study'], ['night', 'thing', 'ightn'], ['eight'], ['gnite'], ['inthe'], ['front', 'trofn'], ['gnhet'], ['gfno'], ['gnfoe'], ['thingo', 'niothg']])\n assert answers_match(candidate(strs=['rat', 'car', 'tar', 'arc', 'arc', 'rta', 'cat', 'tac', 'act', 'cta', 'tca', 'atc']), [['rat', 'tar', 'rta'], ['car', 'arc', 'arc'], ['cat', 'tac', 'act', 'cta', 'tca', 'atc']])\n assert answers_match(candidate(strs=['abcde', 'edcba', 'fghij', 'jihgf', 'mnopq', 'qponm', 'rstuv', 'vutsr', 'wxyz', 'zyxw', 'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee', 'zzzzz']), [['abcde', 'edcba'], ['fghij', 'jihgf'], ['mnopq', 'qponm'], ['rstuv', 'vutsr'], ['wxyz', 'zyxw'], ['aaaaa'], ['bbbbb'], ['ccccc'], ['ddddd'], ['eeeee'], ['zzzzz']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'inlets', 'banana', 'anabna', 'xyz', 'zyx']), [['listen', 'silent', 'enlist', 'inlets'], ['google', 'gooegl'], ['banana', 'anabna'], ['xyz', 'zyx']])\n assert answers_match(candidate(strs=['abcd', 'dcba', 'abcd', 'abcd', 'dcba', 'abcd', 'dcba', 'abcd', 'abcd']), [['abcd', 'dcba', 'abcd', 'abcd', 'dcba', 'abcd', 'dcba', 'abcd', 'abcd']])\n assert answers_match(candidate(strs=['zzzz', 'zzz', 'zz', 'z', 'aaaa', 'aaa', 'aa', 'a', 'bbbb', 'bbb', 'bb', 'b', 'cccc', 'ccc', 'cc', 'c', 'dddd', 'ddd', 'dd', 'd', 'eeee', 'eee', 'ee', 'e']), [['zzzz'], ['zzz'], ['zz'], ['z'], ['aaaa'], ['aaa'], ['aa'], ['a'], ['bbbb'], ['bbb'], ['bb'], ['b'], ['cccc'], ['ccc'], ['cc'], ['c'], ['dddd'], ['ddd'], ['dd'], ['d'], ['eeee'], ['eee'], ['ee'], ['e']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'rat', 'tar', 'art', 'elbow', 'below']), [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['rat', 'tar', 'art'], ['elbow', 'below']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'abc', 'cab', 'bac']), [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['abc', 'cab', 'bac']])\n assert answers_match(candidate(strs=['xyz', 'zyx', 'yxz', 'xzy', 'zyx', 'yzy', 'xyx', 'xxy', 'xyy', 'yxx', 'yyx', 'yyy', 'xxx']), [['xyz', 'zyx', 'yxz', 'xzy', 'zyx'], ['yzy'], ['xyx', 'xxy', 'yxx'], ['xyy', 'yyx'], ['yyy'], ['xxx']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'enlist', 'google', 'gogole', 'inlets', 'abc', 'cba', 'bac', 'zyx', 'xyz', 'xyzzyx', 'zyxzyx']), [['dusty', 'study'], ['night', 'thing'], ['enlist', 'inlets'], ['google', 'gogole'], ['abc', 'cba', 'bac'], ['zyx', 'xyz'], ['xyzzyx', 'zyxzyx']])\n assert answers_match(candidate(strs=['hello', 'ohell', 'lohel', 'ollhe', 'elohl', '', '', '', 'a', 'a', 'a', 'a', 'a']), [['hello', 'ohell', 'lohel', 'ollhe', 'elohl'], ['', '', ''], ['a', 'a', 'a', 'a', 'a']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'rat', 'tar', 'art', 'rom', 'mor', 'arm', 'rmo']), [['listen', 'silent', 'enlist'], ['google', 'gooegl'], ['rat', 'tar', 'art'], ['rom', 'mor', 'rmo'], ['arm']])\n assert answers_match(candidate(strs=['aabbcc', 'abcabc', 'aabbbc', 'aacbbc', 'aabcc', 'abcacb', 'abacbc', 'bbaacc', 'abccba', 'bcaacb']), [['aabbcc', 'abcabc', 'aacbbc', 'abcacb', 'abacbc', 'bbaacc', 'abccba', 'bcaacb'], ['aabbbc'], ['aabcc']])\n assert answers_match(candidate(strs=['listen', 'silent', 'enlist', 'google', 'gooegl', 'inlets', 'banana']), [['listen', 'silent', 'enlist', 'inlets'], ['google', 'gooegl'], ['banana']])\n assert answers_match(candidate(strs=['abcde', 'edcba', 'bcdea', 'decab', 'cabed', 'edbac', 'baced', 'deabc', 'ebadc', 'acbed']), [['abcde', 'edcba', 'bcdea', 'decab', 'cabed', 'edbac', 'baced', 'deabc', 'ebadc', 'acbed']])\n assert answers_match(candidate(strs=['abc', 'bcd', 'cab', 'bac', 'bca', 'cba', 'xyz', 'zyx', 'yxz', 'zy', 'yz', 'z', 'a', 'b', 'c']), [['abc', 'cab', 'bac', 'bca', 'cba'], ['bcd'], ['xyz', 'zyx', 'yxz'], ['zy', 'yz'], ['z'], ['a'], ['b'], ['c']])\n assert answers_match(candidate(strs=['a', 'b', 'c', 'aa', 'bb', 'cc', 'aaa', 'bbb', 'ccc', 'aaaa', 'bbbb', 'cccc']), [['a'], ['b'], ['c'], ['aa'], ['bb'], ['cc'], ['aaa'], ['bbb'], ['ccc'], ['aaaa'], ['bbbb'], ['cccc']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'inhti', 'ytsud', 'ytsdu', 'gnith', 'dusty', 'study', 'night', 'thing', 'inhti', 'ytsud', 'ytsdu', 'gnith', 'dusty', 'study', 'night', 'thing', 'inhti', 'ytsud', 'ytsdu', 'gnith', 'dusty', 'study', 'night', 'thing', 'inhti', 'ytsud', 'ytsdu', 'gnith']), [['dusty', 'study', 'ytsud', 'ytsdu', 'dusty', 'study', 'ytsud', 'ytsdu', 'dusty', 'study', 'ytsud', 'ytsdu', 'dusty', 'study', 'ytsud', 'ytsdu'], ['night', 'thing', 'gnith', 'night', 'thing', 'gnith', 'night', 'thing', 'gnith', 'night', 'thing', 'gnith'], ['inhti', 'inhti', 'inhti', 'inhti']])\n assert answers_match(candidate(strs=['ab', 'ba', 'abc', 'cba', 'bac', 'bca', 'cab', 'acb', 'abc', 'cba', 'bac', 'bca', 'cab', 'acb']), [['ab', 'ba'], ['abc', 'cba', 'bac', 'bca', 'cab', 'acb', 'abc', 'cba', 'bac', 'bca', 'cab', 'acb']])\n assert answers_match(candidate(strs=['dusty', 'study', 'night', 'thing', 'sight', 'fling', 'tying', 'sting', 'dusty']), [['dusty', 'study', 'dusty'], ['night', 'thing'], ['sight'], ['fling'], ['tying'], ['sting']])\n", "comparison": "unordered_groups"}, "public_tests": ["[\"eat\",\"tea\",\"tan\",\"ate\",\"nat\",\"bat\"]", "[\"\"]", "[\"a\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["strs"], "leetcode_dataset_entry_point": "Solution().groupAnagrams", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:18+00:00", "tests_total": 69, "tests_dropped": 1, "flags": ["unordered_groups"], "topic_tags": ["array", "hash-table", "string", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def group_anagrams(strs)", "container": null, "callable": "group_anagrams", "parameters": [{"name": "strs", "type": "String[]"}], "return_type": "String[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 50, "task_id": "powx-n", "difficulty": "Medium", "problem_description": "Implement pow(x, n), which calculates x raised to the power n (i.e., x^n).\n\nExample 1:\n\nInput: x = 2.00000, n = 10\nOutput: 1024.00000\n\nExample 2:\n\nInput: x = 2.10000, n = 3\nOutput: 9.26100\n\nExample 3:\n\nInput: x = 2.00000, n = -2\nOutput: 0.25000\nExplanation: 2^-2 = 1/2^2 = 1/4 = 0.25\n\nConstraints:\n\n- -100.0 < x < 100.0\n- -2^31 <= n <= 2^31-1\n- n is an integer.\n- Either x is not zero or n > 0.\n- -10^4 <= x^n <= 10^4\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"Decimal answers are accepted within 1e-5 (absolute or relative), as on LeetCode.\"\"\"\n import math\n if isinstance(result, list) and isinstance(expected, list):\n return len(result) == len(expected) and all(answers_match(r, e) for r, e in zip(result, expected))\n numbers = (int, float)\n if isinstance(result, numbers) and isinstance(expected, numbers) and not isinstance(result, bool):\n return math.isclose(result, expected, rel_tol=1e-5, abs_tol=1e-5)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(x=3.0, n=0), 1)\n assert answers_match(candidate(x=10.0, n=-3), 0.001)\n assert answers_match(candidate(x=5.0, n=1), 5.0)\n assert answers_match(candidate(x=2.0, n=-2), 0.25)\n assert answers_match(candidate(x=0.1, n=2), 0.010000000000000002)\n assert answers_match(candidate(x=1.5, n=5), 7.59375)\n assert answers_match(candidate(x=2.1, n=3), 9.261000000000001)\n assert answers_match(candidate(x=2.0, n=-1), 0.5)\n assert answers_match(candidate(x=0.5, n=4), 0.0625)\n assert answers_match(candidate(x=2.0, n=10), 1024.0)\n assert answers_match(candidate(x=0.99, n=100), 0.3660323412732289)\n assert answers_match(candidate(x=1.0, n=-1000000), 1.0)\n assert answers_match(candidate(x=2.5, n=-5), 0.01024)\n assert answers_match(candidate(x=10.0, n=5), 100000.0)\n assert answers_match(candidate(x=-1.0, n=2147483647), -1.0)\n assert answers_match(candidate(x=-2.0, n=12), 4096.0)\n assert answers_match(candidate(x=1.23456, n=789), 1.5963462056225718e+72)\n assert answers_match(candidate(x=3.14, n=7), 3009.5913952479914)\n assert answers_match(candidate(x=-2.0, n=-3), -0.125)\n assert answers_match(candidate(x=-1.0, n=1000001), -1.0)\n assert answers_match(candidate(x=0.1, n=10), 1.0000000000000011e-10)\n assert answers_match(candidate(x=0.1, n=20), 1.0000000000000022e-20)\n assert answers_match(candidate(x=0.99999, n=-10000), 1.1051714706643663)\n assert answers_match(candidate(x=-1.5, n=2), 2.25)\n assert answers_match(candidate(x=-0.5, n=4), 0.0625)\n assert answers_match(candidate(x=-0.5, n=6), 0.015625)\n assert answers_match(candidate(x=-1.0, n=-2147483648), 1.0)\n assert answers_match(candidate(x=9.87654, n=-321), 0.0)\n assert answers_match(candidate(x=2.5, n=100), 6.223015277861143e+39)\n assert answers_match(candidate(x=10.0, n=10), 10000000000.0)\n assert answers_match(candidate(x=1.0, n=1000000), 1.0)\n assert answers_match(candidate(x=5.0, n=-3), 0.008)\n assert answers_match(candidate(x=1.0, n=-2147483648), 1.0)\n assert answers_match(candidate(x=1.0, n=0), 1)\n assert answers_match(candidate(x=99.99999, n=10), 9.999990000004497e+19)\n assert answers_match(candidate(x=-0.5, n=8), 0.00390625)\n assert answers_match(candidate(x=2.0, n=-1000), 9.332636185032189e-302)\n assert answers_match(candidate(x=2.0, n=0), 1)\n assert answers_match(candidate(x=2.5, n=-3), 0.064)\n assert answers_match(candidate(x=0.99999, n=1000), 0.990049784246398)\n assert answers_match(candidate(x=-3.0, n=4), 81.0)\n assert answers_match(candidate(x=-3.0, n=-3), -0.037037037037037035)\n assert answers_match(candidate(x=0.1, n=-5), 99999.99999999994)\n assert answers_match(candidate(x=2.5, n=20), 90949470.17729282)\n assert answers_match(candidate(x=1.00001, n=-1000000), 4.5402199796741926e-05)\n assert answers_match(candidate(x=0.1, n=-3), 999.9999999999998)\n assert answers_match(candidate(x=-0.5, n=3), -0.125)\n assert answers_match(candidate(x=1.73205, n=12), 728.9959212545092)\n assert answers_match(candidate(x=10.0, n=1), 10.0)\n assert answers_match(candidate(x=-2.0, n=4), 16.0)\n assert answers_match(candidate(x=0.1, n=100), 1.0000000000000108e-100)\n assert answers_match(candidate(x=1e-05, n=10000), 0.0)\n assert answers_match(candidate(x=0.0, n=0), 1)\n assert answers_match(candidate(x=0.5, n=-5), 32.0)\n assert answers_match(candidate(x=3.0, n=20), 3486784401.0)\n assert answers_match(candidate(x=3.0, n=15), 14348907.0)\n assert answers_match(candidate(x=1.00001, n=1000), 1.0100501165820832)\n assert answers_match(candidate(x=10.0, n=100), 1.0000000000000002e+100)\n assert answers_match(candidate(x=2.0, n=-2147483648), 0.0)\n assert answers_match(candidate(x=1e-05, n=1000000), 0.0)\n assert answers_match(candidate(x=-1.0, n=2147483646), 1.0)\n assert answers_match(candidate(x=1.5, n=20), 3325.256730079651)\n assert answers_match(candidate(x=-2.0, n=3), -8.0)\n assert answers_match(candidate(x=1.2, n=-5), 0.4018775720164609)\n assert answers_match(candidate(x=0.1, n=-10), 9999999999.999989)\n assert answers_match(candidate(x=1.0, n=-1000), 1.0)\n assert answers_match(candidate(x=-2.0, n=11), -2048.0)\n assert answers_match(candidate(x=3.5, n=15), 144884079.28292847)\n assert answers_match(candidate(x=0.5, n=-10), 1024.0)\n assert answers_match(candidate(x=1.41421, n=50), 33550206.11671562)\n assert answers_match(candidate(x=3.0, n=13), 1594323.0)\n assert answers_match(candidate(x=0.99999, n=1000000), 4.539765980992338e-05)\n assert answers_match(candidate(x=5.0, n=0), 1)\n assert answers_match(candidate(x=2.0, n=-10), 0.0009765625)\n assert answers_match(candidate(x=1.0, n=-5), 1.0)\n assert answers_match(candidate(x=1.00001, n=-1000), 0.9900498832512471)\n assert answers_match(candidate(x=-1.5, n=5), -7.59375)\n assert answers_match(candidate(x=1.0, n=2147483647), 1.0)\n", "comparison": "float"}, "public_tests": ["2.00000\n10", "2.10000\n3", "2.00000\n-2"], "hints": [], "metadata": {"canonical_parameter_names": ["x", "n"], "leetcode_dataset_entry_point": "Solution().myPow", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:20+00:00", "tests_total": 83, "tests_dropped": 5, "flags": ["decimal_answer"], "topic_tags": ["math", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def my_pow(x, n)", "container": null, "callable": "my_pow", "parameters": [{"name": "x", "type": "Float"}, {"name": "n", "type": "Integer"}], "return_type": "Float", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 53, "task_id": "maximum-subarray", "difficulty": "Medium", "problem_description": "Given an integer array nums, find the subarray with the largest sum, and return its sum.\n\nExample 1:\n\nInput: nums = [-2,1,-3,4,-1,2,1,-5,4]\nOutput: 6\nExplanation: The subarray [4,-1,2,1] has the largest sum 6.\n\nExample 2:\n\nInput: nums = [1]\nOutput: 1\nExplanation: The subarray [1] has the largest sum 1.\n\nExample 3:\n\nInput: nums = [5,4,-1,7,8]\nOutput: 23\nExplanation: The subarray [5,4,-1,7,8] has the largest sum 23.\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -10^4 <= nums[i] <= 10^4\n\nFollow up: If you have figured out the O(n) solution, try coding another solution using the divide and conquer approach, which is more subtle.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 1, 2, 3, 4, 5]) == 15\n assert candidate(nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4, 7]) == 12\n assert candidate(nums = [10000, -10000, 10000, -10000, 10000]) == 10000\n assert candidate(nums = [100, -1, 50, -1, 100]) == 248\n assert candidate(nums = [0, -3, 5, -2, 1, 3, -1, 2, -4, 2]) == 8\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [0, -3, 5, -2, 1, 3, -1, 2, -4, 2, 3]) == 9\n assert candidate(nums = [-5, -4, -3, -2, -1]) == -1\n assert candidate(nums = [-1, 0, -2, 0, -3, 0, -4, 0]) == 0\n assert candidate(nums = [1, -2, 3, 5, -3, 2]) == 8\n assert candidate(nums = [-2, 0, -1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5]) == 15\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4]) == 4\n assert candidate(nums = [10000, -10000, 10000]) == 10000\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [-1, -2, -3, -4]) == -1\n assert candidate(nums = [-10000, 10000]) == 10000\n assert candidate(nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4]) == 6\n assert candidate(nums = [-10000, 10000, -10000, 10000, -10000, 10000]) == 10000\n assert candidate(nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4, 1, 2, 3]) == 11\n assert candidate(nums = [5, 4, -1, 7, 8]) == 23\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == 5\n assert candidate(nums = [5, -1, 3, -2, 4, -3, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == 11\n assert candidate(nums = [100, -1, -2, -3, 100, -1, -2, -3]) == 194\n assert candidate(nums = [-10, -20, -30, -40, -50, -60]) == -10\n assert candidate(nums = [5, -2, -3, 4, -1, -2, 1, 5, -3]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, -15, 6, 7, 8, 9, 10, -25, 11, 12, 13, 14, 15]) == 80\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15]) == 15\n assert candidate(nums = [10, -1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17, 18, -19]) == 19\n assert candidate(nums = [100, -100, 50, -50, 75, -75, 25, -25, 0, 0, 0]) == 100\n assert candidate(nums = [1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0]) == 1\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 55\n assert candidate(nums = [2, 3, -2, 5, -3, 4, -1, 2, 1, -5, 4, -6, 7, 8, -9, 10, 11, -12]) == 31\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000]) == 10000\n assert candidate(nums = [1, -3, 2, 1, -1, 3, -2, 3, 4, -5, 2, 1, -1, 2, 3, -4, 5, -6, 7, -8]) == 14\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 100]) == 100\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5, 6, 7, 8, 9, 10]) == 40\n assert candidate(nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4, 6, -1, 2, -1, 4, -3]) == 15\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == 1\n assert candidate(nums = [-21, 22, -23, 24, -25, 26, -27, 28, -29, 30, -31, 32, -33, 34, -35, 36, -37, 38, -39, 40]) == 40\n assert candidate(nums = [100, -1, 2, -3, -4, 5, 6, 7, -8, 9, 10, -11, 12, 13, -14]) == 137\n assert candidate(nums = [100, -100, 100, -100, 100, -100, 100, -100, 100, -100]) == 100\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50]) == 50\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9]) == 9\n assert candidate(nums = [10, -20, 30, -40, 50, -60, 70, -80, 90, -100, 110, -120, 130, -140, 150]) == 150\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == 45\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 20]) == 55\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5, 1, 2, 3, 4, 5]) == 15\n assert candidate(nums = [10, -5, 10, -5, 10, -5, 10, -5, 10, -5, 10, -5, 10, -5, 10, -5, 10, -5, 10, -5]) == 55\n assert candidate(nums = [5, 4, -1, 7, 8, -20, 15, -10, 25, -5, 10, -30, 40, -50, 60]) == 60\n assert candidate(nums = [-1, 0, 1, 2, -1, 0, 1, 2, -1, 0, 1, 2, -1, 0, 1, 2, -1, 0, 1, 2]) == 11\n assert candidate(nums = [-2, -3, -1, -5, -4]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5, 1, 2, 3, 4, 5]) == 15\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 3\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, 7, 8, 9, 10, 11, -1, -2, -3, -4]) == 45\n assert candidate(nums = [-1000, 500, -300, 200, -100, 50, -25, 12, -6, 3, -1]) == 500\n assert candidate(nums = [-10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10000]) == 10000\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5, 10]) == 15\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, -15, 6, 7, 8, 9, 10]) == 40\n assert candidate(nums = [-10, 0, -1, 3, 4, -5, 1, 2, -1, -2, 3, 4, -5, 6, 7, -8, 9, 10]) == 28\n assert candidate(nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4, -2, 3, 4, -1, 2, 1, -5, 4]) == 12\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == -1\n assert candidate(nums = [10000, -5000, 5000, -5000, 5000, -5000, 5000, -5000, 5000, -5000]) == 10000\n assert candidate(nums = [5, 4, -1, 7, 8, -10, 12, 3, 4, -15, 20, -21, 22]) == 38\n assert candidate(nums = [1, 2, 3, 4, -10, 10, 20, -5, 5]) == 30\n assert candidate(nums = [-2, -3, -1, -5, -4, -6, -3, -1, -2]) == -1\n assert candidate(nums = [-2, -3, 4, -1, -2, 1, 5, -3, 4, -1, 2, 1, -5, 4]) == 10\n assert candidate(nums = [1000, -500, 200, -100, 50, -25, 12, -6, 3, -1, 0, -2, 1, 3, -1, 2]) == 1000\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 100]) == 100\n assert candidate(nums = [-10, -20, -30, -40, -50, 100, -1, -2, -3]) == 100\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125]) == 1000\n assert candidate(nums = [-1, 0, -2, 0, -3, 0, -4, 0, -5, 0, -6, 0, -7, 0, -8, 0]) == 0\n assert candidate(nums = [1, 2, 3, -6, 1, 2, 3, 4, -10, 5, 6, 7, 8]) == 26\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991]) == -9991\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == 10\n assert candidate(nums = [1000, -500, 200, -300, 100, -200, 50, -10, 5, 1]) == 1000\n assert candidate(nums = [1, 2, 3, -6, 1, 2, 3, 4, 5, -10, 1, 2, 3, 4, 5, 6, 7]) == 33\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125, 62, -62, 31, -31, 15, -15]) == 1000\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == -1\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 100]) == 100\n assert candidate(nums = [100, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 100\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15]) == 15\n assert candidate(nums = [10, 20, 30, 40, 50, -100, 60, 70, 80, 90, 100]) == 450\n assert candidate(nums = [-1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2]) == 8\n assert candidate(nums = [100, -1, -2, -3, 100]) == 194\n assert candidate(nums = [-2, 1, -3, 4, -1, 2, 1, -5, 4, 6, -1, 2, -1, 2, 3]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 210\n assert candidate(nums = [100, -1, -2, -3, 100, -1, -2, -3, 100]) == 288\n assert candidate(nums = [1, 2, 3, 4, 5, -15, 6, 7, 8, 9, 10, -25, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 170\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5, 10, 20, 30, -10, -20, -30]) == 60\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 210\n assert candidate(nums = [0, -1, -2, -3, -4, -5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, 6, 7, 8, 9, 10]) == 65\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20]) == 19\n", "comparison": "exact"}, "public_tests": ["[-2,1,-3,4,-1,2,1,-5,4]", "[1]", "[5,4,-1,7,8]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxSubArray", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:26+00:00", "tests_total": 98, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "divide-and-conquer", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_sub_array(nums)", "container": null, "callable": "max_sub_array", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 54, "task_id": "spiral-matrix", "difficulty": "Medium", "problem_description": "Given an m x n matrix, return all elements of the matrix in spiral order.\n\nExample 1:\n\nInput: matrix = [[1,2,3],[4,5,6],[7,8,9]]\nOutput: [1,2,3,6,9,8,7,4,5]\n\nExample 2:\n\nInput: matrix = [[1,2,3,4],[5,6,7,8],[9,10,11,12]]\nOutput: [1,2,3,4,8,12,11,10,9,5,6,7]\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= m, n <= 10\n- -100 <= matrix[i][j] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[1], [2], [3], [4], [5]]) == [1, 2, 3, 4, 5]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(matrix = [[7], [9], [3]]) == [7, 9, 3]\n assert candidate(matrix = [[1]]) == [1]\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]) == [1, 2, 4, 6, 8, 10, 9, 7, 5, 3]\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]) == [1, 2, 3, 4, 5, 10, 9, 8, 7, 6]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]]) == [1, 2, 3, 4, 5, 6, 12, 18, 17, 16, 15, 14, 13, 7, 8, 9, 10, 11]\n assert candidate(matrix = [[1, 2], [3, 4]]) == [1, 2, 4, 3]\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [1, 2, 3, 6, 9, 8, 7, 4, 5]\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6]]) == [1, 2, 3, 6, 5, 4]\n assert candidate(matrix = [[7]]) == [7]\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) == [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == [1, 2, 3, 4, 5, 10, 15, 20, 19, 18, 17, 16, 11, 6, 7, 8, 9, 14, 13, 12]\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]) == [1, 2, 3, 6, 9, 12, 11, 10, 7, 4, 5, 8]\n assert candidate(matrix = [[1, 2, 3], [6, 9, 8], [7, 4, 5]]) == [1, 2, 3, 8, 5, 4, 7, 6, 9]\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]]) == [1, 2, 3, 4, 5, 10, 15, 14, 13, 12, 11, 6, 7, 8, 9]\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25], [26, 27, 28, 29, 30]]) == [1, 2, 3, 4, 5, 10, 15, 20, 25, 30, 29, 28, 27, 26, 21, 16, 11, 6, 7, 8, 9, 14, 19, 24, 23, 22, 17, 12, 13, 18]\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == [1, 2, 3, 4, 5, 10, 15, 20, 25, 24, 23, 22, 21, 16, 11, 6, 7, 8, 9, 14, 19, 18, 17, 12, 13]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32], [33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48], [49, 50, 51, 52, 53, 54, 55, 56], [57, 58, 59, 60, 61, 62, 63, 64]]) == [1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 40, 48, 56, 64, 63, 62, 61, 60, 59, 58, 57, 49, 41, 33, 25, 17, 9, 10, 11, 12, 13, 14, 15, 23, 31, 39, 47, 55, 54, 53, 52, 51, 50, 42, 34, 26, 18, 19, 20, 21, 22, 30, 38, 46, 45, 44, 43, 35, 27, 28, 29, 37, 36]\n assert candidate(matrix = [[-1, 2, -3, 4, -5], [6, -7, 8, -9, 10], [-11, 12, -13, 14, -15], [16, -17, 18, -19, 20]]) == [-1, 2, -3, 4, -5, 10, -15, 20, -19, 18, -17, 16, -11, 6, -7, 8, -9, 14, -13, 12]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 81, 71, 61, 51, 41, 31, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 29, 39, 49, 59, 69, 79, 89, 88, 87, 86, 85, 84, 83, 82, 72, 62, 52, 42, 32, 22, 23, 24, 25, 26, 27, 28, 38, 48, 58, 68, 78, 77, 76, 75, 74, 73, 63, 53, 43, 33, 34, 35, 36, 37, 47, 57, 67, 66, 65, 64, 54, 44, 45, 46, 56, 55]\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], [17, 18, 19, 20], [21, 22, 23, 24]]) == [1, 2, 3, 4, 8, 12, 16, 20, 24, 23, 22, 21, 17, 13, 9, 5, 6, 7, 11, 15, 19, 18, 14, 10]\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]) == [1, 2, 4, 6, 8, 10, 12, 14, 16, 15, 13, 11, 9, 7, 5, 3]\n assert candidate(matrix = [[1, 0, 0, 1], [0, 1, 1, 0], [0, 1, 1, 0], [1, 0, 0, 1]]) == [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1]\n assert candidate(matrix = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9], [-10, -11, -12]]) == [-1, -2, -3, -6, -9, -12, -11, -10, -7, -4, -5, -8]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36]]) == [1, 2, 3, 4, 5, 6, 12, 18, 24, 30, 36, 35, 34, 33, 32, 31, 25, 19, 13, 7, 8, 9, 10, 11, 17, 23, 29, 28, 27, 26, 20, 14, 15, 16, 22, 21]\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], [17, 18, 19, 20]]) == [1, 2, 3, 4, 8, 12, 16, 20, 19, 18, 17, 13, 9, 5, 6, 7, 11, 15, 14, 10]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24]]) == [1, 2, 3, 4, 5, 6, 12, 18, 24, 23, 22, 21, 20, 19, 13, 7, 8, 9, 10, 11, 17, 16, 15, 14]\n assert candidate(matrix = [[0, -1, -2, -3, -4], [-5, -6, -7, -8, -9], [-10, -11, -12, -13, -14], [-15, -16, -17, -18, -19], [-20, -21, -22, -23, -24]]) == [0, -1, -2, -3, -4, -9, -14, -19, -24, -23, -22, -21, -20, -15, -10, -5, -6, -7, -8, -13, -18, -17, -16, -11, -12]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 41, 31, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 29, 39, 49, 48, 47, 46, 45, 44, 43, 42, 32, 22, 23, 24, 25, 26, 27, 28, 38, 37, 36, 35, 34, 33]\n assert candidate(matrix = [[-100, 100, -50, 50], [-20, 20, -30, 30], [-40, 40, -60, 60], [-70, 70, -80, 80]]) == [-100, 100, -50, 50, 30, 60, 80, -80, 70, -70, -40, -20, 20, -30, -60, 40]\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]) == [1, 2, 4, 6, 8, 10, 12, 11, 9, 7, 5, 3]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32], [33, 34, 35, 36, 37, 38, 39, 40]]) == [1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 40, 39, 38, 37, 36, 35, 34, 33, 25, 17, 9, 10, 11, 12, 13, 14, 15, 23, 31, 30, 29, 28, 27, 26, 18, 19, 20, 21, 22]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 27, 36, 45, 54, 53, 52, 51, 50, 49, 48, 47, 46, 37, 28, 19, 10, 11, 12, 13, 14, 15, 16, 17, 26, 35, 44, 43, 42, 41, 40, 39, 38, 29, 20, 21, 22, 23, 24, 25, 34, 33, 32, 31, 30]\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], [17, 18, 19, 20], [21, 22, 23, 24], [25, 26, 27, 28], [29, 30, 31, 32], [33, 34, 35, 36], [37, 38, 39, 40]]) == [1, 2, 3, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 39, 38, 37, 33, 29, 25, 21, 17, 13, 9, 5, 6, 7, 11, 15, 19, 23, 27, 31, 35, 34, 30, 26, 22, 18, 14, 10]\n assert candidate(matrix = [[-1, -2, -3, -4], [-2, -3, -4, -5], [-3, -4, -5, -6], [-4, -5, -6, -7]]) == [-1, -2, -3, -4, -5, -6, -7, -6, -5, -4, -3, -2, -3, -4, -5, -4]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28], [29, 30, 31, 32, 33, 34, 35], [36, 37, 38, 39, 40, 41, 42]]) == [1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 35, 42, 41, 40, 39, 38, 37, 36, 29, 22, 15, 8, 9, 10, 11, 12, 13, 20, 27, 34, 33, 32, 31, 30, 23, 16, 17, 18, 19, 26, 25, 24]\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]) == [1, 2, 3, 6, 9, 12, 15, 14, 13, 10, 7, 4, 5, 8, 11]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54], [55, 56, 57, 58, 59, 60, 61, 62, 63], [64, 65, 66, 67, 68, 69, 70, 71, 72], [73, 74, 75, 76, 77, 78, 79, 80, 81]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 18, 27, 36, 45, 54, 63, 72, 81, 80, 79, 78, 77, 76, 75, 74, 73, 64, 55, 46, 37, 28, 19, 10, 11, 12, 13, 14, 15, 16, 17, 26, 35, 44, 53, 62, 71, 70, 69, 68, 67, 66, 65, 56, 47, 38, 29, 20, 21, 22, 23, 24, 25, 34, 43, 52, 61, 60, 59, 58, 57, 48, 39, 30, 31, 32, 33, 42, 51, 50, 49, 40, 41]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32]]) == [1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 31, 30, 29, 28, 27, 26, 25, 17, 9, 10, 11, 12, 13, 14, 15, 23, 22, 21, 20, 19, 18]\n assert candidate(matrix = [[-1, 2, -3, 4, -5], [6, -7, 8, -9, 10], [11, -12, 13, -14, 15], [16, -17, 18, -19, 20]]) == [-1, 2, -3, 4, -5, 10, 15, 20, -19, 18, -17, 16, 11, 6, -7, 8, -9, -14, 13, -12]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30]]) == [1, 2, 3, 4, 5, 6, 12, 18, 24, 30, 29, 28, 27, 26, 25, 19, 13, 7, 8, 9, 10, 11, 17, 23, 22, 21, 20, 14, 15, 16]\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18]]) == [1, 2, 3, 6, 9, 12, 15, 18, 17, 16, 13, 10, 7, 4, 5, 8, 11, 14]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28]]) == [1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 27, 26, 25, 24, 23, 22, 15, 8, 9, 10, 11, 12, 13, 20, 19, 18, 17, 16]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 29, 28, 27, 26, 25, 24, 23, 22]\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 19, 17, 15, 13, 11, 9, 7, 5, 3]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 31, 21, 11, 12, 13, 14, 15, 16, 17, 18, 19, 29, 39, 38, 37, 36, 35, 34, 33, 32, 22, 23, 24, 25, 26, 27, 28]\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28], [29, 30, 31, 32, 33, 34, 35], [36, 37, 38, 39, 40, 41, 42], [43, 44, 45, 46, 47, 48, 49]]) == [1, 2, 3, 4, 5, 6, 7, 14, 21, 28, 35, 42, 49, 48, 47, 46, 45, 44, 43, 36, 29, 22, 15, 8, 9, 10, 11, 12, 13, 20, 27, 34, 41, 40, 39, 38, 37, 30, 23, 16, 17, 18, 19, 26, 33, 32, 31, 24, 25]\n", "comparison": "exact"}, "public_tests": ["[[1,2,3],[4,5,6],[7,8,9]]", "[[1,2,3,4],[5,6,7,8],[9,10,11,12]]"], "hints": ["Well for some problems, the best way really is to come up with some algorithms for simulation. Basically, you need to simulate what the problem asks us to do.", "We go boundary by boundary and move inwards. That is the essential operation. First row, last column, last row, first column, and then we move inwards by 1 and repeat. That's all. That is all the simulation that we need.", "Think about when you want to switch the progress on one of the indexes. If you progress on i out of [i, j], you'll shift in the same column. Similarly, by changing values for j, you'd be shifting in the same row. Also, keep track of the end of a boundary so that you can move inwards and then keep repeating. It's always best to simulate edge cases like a single column or a single row to see if anything breaks or not."], "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().spiralOrder", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:29+00:00", "tests_total": 53, "tests_dropped": 4, "flags": ["has_images"], "topic_tags": ["array", "matrix", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def spiral_order(matrix)", "container": null, "callable": "spiral_order", "parameters": [{"name": "matrix", "type": "Integer[][]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 55, "task_id": "jump-game", "difficulty": "Medium", "problem_description": "You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position.\n\nReturn true if you can reach the last index, or false otherwise.\n\nExample 1:\n\nInput: nums = [2,3,1,1,4]\nOutput: true\nExplanation: Jump 1 step from index 0 to 1, then 3 steps to the last index.\n\nExample 2:\n\nInput: nums = [3,2,1,0,4]\nOutput: false\nExplanation: You will always arrive at index 3 no matter what. Its maximum jump length is 0, which makes it impossible to reach the last index.\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- 0 <= nums[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [2, 5, 0, 0]) == True\n assert candidate(nums = [1, 1, 1, 1, 1]) == True\n assert candidate(nums = [0]) == True\n assert candidate(nums = [5, 0, 0, 0, 0]) == True\n assert candidate(nums = [1, 2, 3]) == True\n assert candidate(nums = [2, 3, 1, 1, 4]) == True\n assert candidate(nums = [3, 2, 1, 0, 4]) == False\n assert candidate(nums = [1, 0, 1, 0]) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == True\n assert candidate(nums = [1, 2, 3, 4, 5]) == True\n assert candidate(nums = [5, 9, 4, 2, 1]) == True\n assert candidate(nums = [2, 0, 0]) == True\n assert candidate(nums = [9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == False\n assert candidate(nums = [1, 3, 2, 1, 0, 4]) == False\n assert candidate(nums = [2, 3, 1, 1, 4, 2, 3, 1, 1, 1]) == True\n assert candidate(nums = [4, 2, 0, 0, 1, 1, 4, 4, 0, 4]) == True\n assert candidate(nums = [3, 0, 8, 2, 0, 0, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0]) == False\n assert candidate(nums = [1, 0, 3, 4, 5, 0]) == False\n assert candidate(nums = [2, 5, 0, 0, 1, 1, 1, 1, 0, 2]) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [10, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == True\n assert candidate(nums = [3, 0, 8, 2, 0, 0, 1]) == True\n assert candidate(nums = [2, 0, 0, 0, 1, 0]) == False\n assert candidate(nums = [2, 3, 0, 1, 4]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == True\n assert candidate(nums = [3, 2, 1, 3, 4, 2, 1, 0, 0, 0, 0]) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == True\n assert candidate(nums = [2, 5, 0, 1, 3, 2, 1]) == True\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == False\n assert candidate(nums = [1, 3, 2, 0, 0, 0, 0, 0, 0, 1]) == False\n assert candidate(nums = [10, 0, 0, 0, 0, 0, 0, 0, 0, 9]) == True\n assert candidate(nums = [0, 2, 3, 1, 4, 2, 2, 1, 0, 1]) == False\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == True\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == False\n assert candidate(nums = [5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0]) == False\n assert candidate(nums = [3, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == False\n assert candidate(nums = [1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [4, 3, 2, 1, 0, 0, 0, 0, 0]) == False\n assert candidate(nums = [2, 0, 0, 0, 1]) == False\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == True\n assert candidate(nums = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == False\n assert candidate(nums = [9, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == True\n assert candidate(nums = [1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0]) == False\n assert candidate(nums = [3, 2, 1, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == False\n assert candidate(nums = [1, 2, 0, 2, 0, 1, 0, 0, 1, 0]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]) == False\n assert candidate(nums = [2, 3, 1, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == False\n assert candidate(nums = [10, 2, 14, 1, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6]) == True\n assert candidate(nums = [2, 0, 2, 0, 1, 1]) == True\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == False\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == False\n assert candidate(nums = [2, 3, 1, 1, 4, 2, 1, 0, 1, 3, 1, 0, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 0, 0, 1]) == True\n assert candidate(nums = [0, 2, 3]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]) == True\n assert candidate(nums = [1, 1, 2, 2, 1, 1, 1, 1, 1, 0, 0]) == False\n assert candidate(nums = [4, 2, 0, 0, 1, 1, 4, 0, 0, 0, 1]) == True\n assert candidate(nums = [2, 5, 0, 0, 0, 0, 4, 1, 1, 1, 1]) == True\n", "comparison": "exact"}, "public_tests": ["[2,3,1,1,4]", "[3,2,1,0,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().canJump", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:31+00:00", "tests_total": 66, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def can_jump(nums)", "container": null, "callable": "can_jump", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 56, "task_id": "merge-intervals", "difficulty": "Medium", "problem_description": "Given an array of intervals where intervals[i] = [start_i, end_i], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.\n\nExample 1:\n\nInput: intervals = [[1,3],[2,6],[8,10],[15,18]]\nOutput: [[1,6],[8,10],[15,18]]\nExplanation: Since intervals [1,3] and [2,6] overlap, merge them into [1,6].\n\nExample 2:\n\nInput: intervals = [[1,4],[4,5]]\nOutput: [[1,5]]\nExplanation: Intervals [1,4] and [4,5] are considered overlapping.\n\nExample 3:\n\nInput: intervals = [[4,7],[1,4]]\nOutput: [[1,7]]\nExplanation: Intervals [1,4] and [4,7] are considered overlapping.\n\nConstraints:\n\n- 1 <= intervals.length <= 10^4\n- intervals[i].length == 2\n- 0 <= start_i <= end_i <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5]]) == [[1, 5]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16], [4, 9]]) == [[1, 2], [3, 10], [12, 16]]\n assert candidate(intervals = [[1, 3], [2, 6], [8, 10], [15, 18]]) == [[1, 6], [8, 10], [15, 18]]\n assert candidate(intervals = [[1, 3], [2, 5], [4, 8], [10, 12]]) == [[1, 8], [10, 12]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6]]) == [[1, 2], [3, 4], [5, 6]]\n assert candidate(intervals = [[1, 10], [2, 6], [9, 12]]) == [[1, 12]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3]]) == [[1, 1], [2, 2], [3, 3]]\n assert candidate(intervals = [[2, 3], [2, 2], [3, 3], [1, 3], [5, 7], [2, 2], [4, 6]]) == [[1, 3], [4, 7]]\n assert candidate(intervals = [[1, 4], [2, 3]]) == [[1, 4]]\n assert candidate(intervals = [[2, 3], [4, 5], [6, 7], [8, 9], [1, 10]]) == [[1, 10]]\n assert candidate(intervals = [[1, 10], [2, 6], [3, 5], [7, 9]]) == [[1, 10]]\n assert candidate(intervals = [[1, 10], [10, 20], [20, 30]]) == [[1, 30]]\n assert candidate(intervals = [[1, 3], [2, 2], [3, 4], [5, 7], [5, 9], [8, 10]]) == [[1, 4], [5, 10]]\n assert candidate(intervals = [[1, 2], [3, 10], [12, 16], [10, 19], [20, 24]]) == [[1, 2], [3, 19], [20, 24]]\n assert candidate(intervals = [[1, 4], [4, 5]]) == [[1, 5]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[0, 0], [1, 2], [2, 3], [4, 5]]) == [[0, 0], [1, 3], [4, 5]]\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21]]) == [[1, 21]]\n assert candidate(intervals = [[1, 10], [11, 20], [21, 30], [31, 40], [15, 25]]) == [[1, 10], [11, 30], [31, 40]]\n assert candidate(intervals = [[1, 2], [3, 5], [4, 6], [7, 8], [9, 11], [10, 12], [13, 15]]) == [[1, 2], [3, 6], [7, 8], [9, 12], [13, 15]]\n assert candidate(intervals = [[1, 3], [5, 19], [11, 15], [2, 4], [8, 10], [7, 13]]) == [[1, 4], [5, 19]]\n assert candidate(intervals = [[1, 10], [10, 20], [20, 30], [30, 40], [40, 50]]) == [[1, 50]]\n assert candidate(intervals = [[5, 15], [20, 30], [10, 25], [35, 45], [40, 50]]) == [[5, 30], [35, 50]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [2, 4], [6, 8], [10, 12], [14, 16], [18, 20]]) == [[1, 4], [5, 8], [9, 12], [13, 16], [17, 20]]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [[1, 10]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [1, 11], [6, 16], [11, 21], [16, 26], [21, 31], [26, 36], [31, 41], [36, 46], [41, 51], [46, 56]]) == [[1, 56]]\n assert candidate(intervals = [[1, 1000], [100, 200], [200, 300], [300, 400], [400, 500], [500, 600], [600, 700], [700, 800], [800, 900], [900, 1000]]) == [[1, 1000]]\n assert candidate(intervals = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30]]) == [[1, 30]]\n assert candidate(intervals = [[1, 100], [50, 60], [60, 70], [10, 20], [80, 90], [90, 100], [20, 30]]) == [[1, 100]]\n assert candidate(intervals = [[3, 6], [1, 2], [15, 18], [8, 10], [4, 5], [11, 13]]) == [[1, 2], [3, 6], [8, 10], [11, 13], [15, 18]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [21, 22], [23, 24], [25, 26], [27, 28], [29, 30], [1, 30]]) == [[1, 30]]\n assert candidate(intervals = [[1, 5], [6, 10], [11, 15], [16, 20], [21, 25], [22, 27], [28, 30]]) == [[1, 5], [6, 10], [11, 15], [16, 20], [21, 27], [28, 30]]\n assert candidate(intervals = [[1, 3], [3, 7], [8, 12], [12, 15], [16, 20], [19, 25], [25, 30], [30, 35]]) == [[1, 7], [8, 15], [16, 35]]\n assert candidate(intervals = [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]) == [[1, 2]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50], [1, 100]]) == [[1, 100]]\n assert candidate(intervals = [[1, 1000], [500, 600], [700, 800], [850, 900], [950, 1050]]) == [[1, 1050]]\n assert candidate(intervals = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92], [10, 91]]) == [[1, 100]]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [1, 6]]) == [[1, 25]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [1, 4], [3, 6], [5, 8], [7, 10], [1, 6], [3, 8], [5, 10], [1, 8], [3, 10], [1, 10]]) == [[1, 10]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 9], [10, 15], [14, 20], [21, 25]]) == [[1, 2], [3, 5], [6, 9], [10, 20], [21, 25]]\n assert candidate(intervals = [[5, 8], [8, 10], [10, 12], [12, 14], [14, 16], [16, 18]]) == [[5, 18]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [1, 10]]) == [[1, 10]]\n assert candidate(intervals = [[1, 3], [5, 8], [4, 7], [9, 11], [12, 15], [13, 17]]) == [[1, 3], [4, 8], [9, 11], [12, 17]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [12, 13], [14, 15], [16, 17], [18, 19], [20, 21], [22, 23], [24, 25], [26, 27], [28, 29], [30, 31], [32, 33], [34, 35], [36, 37], [38, 39], [40, 41], [42, 43], [44, 45], [46, 47], [48, 49], [50, 51]]) == [[1, 2], [4, 5], [7, 8], [10, 11], [12, 13], [14, 15], [16, 17], [18, 19], [20, 21], [22, 23], [24, 25], [26, 27], [28, 29], [30, 31], [32, 33], [34, 35], [36, 37], [38, 39], [40, 41], [42, 43], [44, 45], [46, 47], [48, 49], [50, 51]]\n assert candidate(intervals = [[100, 200], [150, 250], [200, 300], [250, 350], [300, 400], [50, 150], [100, 200], [150, 250], [200, 300], [250, 350]]) == [[50, 400]]\n assert candidate(intervals = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40]]) == [[1, 40]]\n assert candidate(intervals = [[1, 1000], [200, 400], [500, 600], [300, 700], [800, 900], [100, 300]]) == [[1, 1000]]\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [5, 15], [25, 35]]) == [[5, 35]]\n assert candidate(intervals = [[1, 100], [50, 75], [25, 50], [75, 100], [1, 50], [50, 100]]) == [[1, 100]]\n assert candidate(intervals = [[10, 20], [20, 30], [30, 40], [15, 25], [25, 35], [35, 45], [1, 10]]) == [[1, 45]]\n assert candidate(intervals = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [2, 10], [3, 9], [4, 8], [5, 7], [6, 6]]) == [[1, 10]]\n assert candidate(intervals = [[1, 100], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11], [12, 13], [14, 15], [16, 17], [18, 19], [20, 21], [22, 23], [24, 25], [26, 27], [28, 29], [30, 31], [32, 33], [34, 35], [36, 37], [38, 39], [40, 41], [42, 43], [44, 45], [46, 47], [48, 49], [50, 51], [52, 53], [54, 55], [56, 57], [58, 59], [60, 61], [62, 63], [64, 65], [66, 67], [68, 69], [70, 71], [72, 73], [74, 75], [76, 77], [78, 79], [80, 81], [82, 83], [84, 85], [86, 87], [88, 89], [90, 91], [92, 93], [94, 95], [96, 97], [98, 99]]) == [[1, 100]]\n assert candidate(intervals = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]\n assert candidate(intervals = [[2, 5], [10, 12], [7, 9], [1, 3], [14, 16]]) == [[1, 5], [7, 9], [10, 12], [14, 16]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [1, 10], [2, 9], [3, 8], [4, 7], [5, 6]]) == [[1, 10]]\n assert candidate(intervals = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25], [1, 25]]) == [[1, 25]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]\n assert candidate(intervals = [[0, 4], [2, 6], [5, 7], [8, 10], [11, 13], [12, 16], [15, 18]]) == [[0, 7], [8, 10], [11, 18]]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40]]) == [[5, 40]]\n assert candidate(intervals = [[100, 200], [150, 250], [200, 300], [250, 350], [300, 400], [350, 450]]) == [[100, 450]]\n assert candidate(intervals = [[1, 100], [50, 60], [60, 70], [80, 90], [90, 100]]) == [[1, 100]]\n assert candidate(intervals = [[1, 100], [50, 150], [100, 200], [250, 350], [300, 375]]) == [[1, 200], [250, 375]]\n assert candidate(intervals = [[1, 4], [2, 6], [8, 10], [15, 18], [16, 20], [21, 25]]) == [[1, 6], [8, 10], [15, 20], [21, 25]]\n assert candidate(intervals = [[1, 5], [5, 9], [9, 13], [13, 17], [17, 21], [21, 25], [25, 29], [29, 33], [33, 37], [37, 41], [41, 45], [45, 49], [49, 53], [53, 57], [57, 61], [61, 65], [65, 69], [69, 73], [73, 77], [77, 81], [81, 85], [85, 89], [89, 93], [93, 97], [97, 101]]) == [[1, 101]]\n assert candidate(intervals = [[1, 100], [50, 75], [25, 60], [70, 80], [65, 90], [10, 50]]) == [[1, 100]]\n assert candidate(intervals = [[100, 200], [200, 300], [300, 400], [150, 250], [250, 350], [350, 450], [10, 110]]) == [[10, 450]]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10]]) == [[1, 10]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50], [50, 55], [55, 60]]) == [[5, 60]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 9], [11, 13], [14, 17], [18, 20], [19, 22]]) == [[1, 2], [3, 5], [6, 9], [11, 13], [14, 17], [18, 22]]\n assert candidate(intervals = [[1, 5], [5, 9], [9, 13], [13, 17], [17, 21], [1, 3], [3, 6], [6, 9], [9, 12], [12, 15], [15, 18], [18, 21]]) == [[1, 21]]\n assert candidate(intervals = [[1, 50], [51, 100], [101, 150], [151, 200], [201, 250], [251, 300], [301, 350], [351, 400]]) == [[1, 50], [51, 100], [101, 150], [151, 200], [201, 250], [251, 300], [301, 350], [351, 400]]\n assert candidate(intervals = [[1, 3], [3, 7], [8, 10], [12, 15], [14, 17], [18, 20], [21, 22]]) == [[1, 7], [8, 10], [12, 17], [18, 20], [21, 22]]\n assert candidate(intervals = [[1, 4], [2, 5], [3, 6], [4, 7], [5, 8], [6, 9]]) == [[1, 9]]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35]]) == [[5, 35]]\n assert candidate(intervals = [[1, 10], [10, 20], [20, 30], [30, 40], [40, 50], [1, 50]]) == [[1, 50]]\n assert candidate(intervals = [[5, 10], [15, 20], [10, 15], [25, 30], [30, 35], [20, 25]]) == [[5, 35]]\n assert candidate(intervals = [[1, 100], [50, 150], [25, 75], [125, 200], [76, 124]]) == [[1, 200]]\n assert candidate(intervals = [[1, 1000], [2, 999], [3, 998], [4, 997], [5, 996], [6, 995], [7, 994], [8, 993], [9, 992], [10, 991], [11, 990], [12, 989]]) == [[1, 1000]]\n assert candidate(intervals = [[1, 5], [2, 3], [4, 8], [7, 10], [11, 15], [14, 18], [17, 21], [20, 24], [23, 27], [26, 30], [29, 33], [32, 36], [35, 39], [38, 42], [41, 45], [44, 48], [47, 51], [46, 50], [45, 49], [44, 48], [43, 47], [42, 46], [41, 45], [40, 44], [39, 43], [38, 42], [37, 41], [36, 40], [35, 39], [34, 38], [33, 37], [32, 36], [31, 35], [30, 34], [29, 33], [28, 32], [27, 31], [26, 30], [25, 29], [24, 28], [23, 27], [22, 26], [21, 25], [20, 24], [19, 23], [18, 22], [17, 21], [16, 20], [15, 19], [14, 18], [13, 17], [12, 16], [11, 15], [10, 14], [9, 13], [8, 12], [7, 11], [6, 10], [5, 9], [4, 8], [3, 7], [2, 6], [1, 5]]) == [[1, 51]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [1, 20]]) == [[1, 20]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 5], [2, 4], [3, 6], [4, 8], [5, 10]]) == [[1, 10]]\n assert candidate(intervals = [[5, 10], [15, 20], [10, 15], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50], [5, 45]]) == [[5, 50]]\n assert candidate(intervals = [[1, 3], [5, 7], [2, 4], [6, 8]]) == [[1, 4], [5, 8]]\n assert candidate(intervals = [[1, 1000], [1001, 2000], [2001, 3000], [3001, 4000], [4001, 5000]]) == [[1, 1000], [1001, 2000], [2001, 3000], [3001, 4000], [4001, 5000]]\n assert candidate(intervals = [[1, 10], [11, 20], [21, 30], [31, 40], [41, 50], [51, 60], [61, 70], [71, 80], [81, 90], [91, 100], [1, 100], [5, 95], [15, 90], [25, 85], [35, 80]]) == [[1, 100]]\n assert candidate(intervals = [[1, 5], [2, 3], [4, 10], [11, 15], [14, 20]]) == [[1, 10], [11, 20]]\n assert candidate(intervals = [[8, 10], [1, 3], [2, 6], [15, 18], [10, 15]]) == [[1, 6], [8, 18]]\n assert candidate(intervals = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [1, 100], [5, 95], [15, 90], [25, 85], [35, 80]]) == [[1, 100]]\n", "comparison": "exact"}, "public_tests": ["[[1,3],[2,6],[8,10],[15,18]]", "[[1,4],[4,5]]", "[[4,7],[1,4]]"], "hints": [], "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().merge", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:33+00:00", "tests_total": 91, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "sorting", "quicksort"]}, "language": "ruby", "interface": {"raw_signature": "def merge(intervals)", "container": null, "callable": "merge", "parameters": [{"name": "intervals", "type": "Integer[][]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 57, "task_id": "insert-interval", "difficulty": "Medium", "problem_description": "You are given an array of non-overlapping intervals intervals where intervals[i] = [start_i, end_i] represent the start and the end of the i^th interval and intervals is sorted in ascending order by start_i. You are also given an interval newInterval = [start, end] that represents the start and end of another interval.\n\nTwo intervals are considered overlapping if they share at least one point.\n\nInsert newInterval into intervals such that intervals is still sorted in ascending order by start_i and intervals still does not have any overlapping intervals (merge overlapping intervals if necessary).\n\nReturn intervals after the insertion.\n\nNote that you don't need to modify intervals in-place. You can make a new array and return it.\n\nExample 1:\n\nInput: intervals = [[1,3],[6,9]], newInterval = [2,5]\nOutput: [[1,5],[6,9]]\n\nExample 2:\n\nInput: intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]\nOutput: [[1,2],[3,10],[12,16]]\nExplanation: Because the new interval [4,8] overlaps with [3,5],[6,7],[8,10].\n\nConstraints:\n\n- 0 <= intervals.length <= 10^4\n- intervals[i].length == 2\n- 0 <= start_i <= end_i <= 10^5\n- intervals is sorted by start_i in ascending order.\n- newInterval.length == 2\n- 0 <= start <= end <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(intervals = [[1, 5]],newInterval = [2, 3]) == [[1, 5]]\n assert candidate(intervals = [[1, 5]],newInterval = [0, 3]) == [[0, 5]]\n assert candidate(intervals = [[1, 2], [3, 10], [12, 16]],newInterval = [10, 11]) == [[1, 2], [3, 11], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8]],newInterval = [1, 8]) == [[1, 8]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [13, 14]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 3], [5, 7]],newInterval = [4, 4]) == [[1, 3], [4, 4], [5, 7]]\n assert candidate(intervals = [],newInterval = [5, 7]) == [[5, 7]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8]],newInterval = [0, 9]) == [[0, 9]]\n assert candidate(intervals = [[1, 3], [6, 9]],newInterval = [10, 12]) == [[1, 3], [6, 9], [10, 12]]\n assert candidate(intervals = [[1, 3], [5, 7]],newInterval = [4, 6]) == [[1, 3], [4, 7]]\n assert candidate(intervals = [[1, 5]],newInterval = [0, 0]) == [[0, 0], [1, 5]]\n assert candidate(intervals = [[1, 5]],newInterval = [6, 8]) == [[1, 5], [6, 8]]\n assert candidate(intervals = [[1, 3], [6, 9]],newInterval = [2, 5]) == [[1, 5], [6, 9]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [4, 8]) == [[1, 2], [3, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [5, 6], [9, 10], [14, 15], [19, 20]],newInterval = [3, 18]) == [[1, 2], [3, 18], [19, 20]]\n assert candidate(intervals = [[1, 3], [8, 10], [15, 17]],newInterval = [4, 6]) == [[1, 3], [4, 6], [8, 10], [15, 17]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [1, 3]) == [[1, 4], [5, 6], [7, 8], [9, 10]]\n assert candidate(intervals = [[1, 5], [10, 15], [20, 25], [30, 35]],newInterval = [6, 14]) == [[1, 5], [6, 15], [20, 25], [30, 35]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8]],newInterval = [3, 3]) == [[1, 2], [3, 3], [4, 5], [7, 8]]\n assert candidate(intervals = [[2, 3], [5, 6], [8, 9], [11, 12], [14, 15]],newInterval = [7, 13]) == [[2, 3], [5, 6], [7, 13], [14, 15]]\n assert candidate(intervals = [],newInterval = [0, 0]) == [[0, 0]]\n assert candidate(intervals = [[1, 3], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [14, 16]) == [[1, 3], [4, 6], [8, 10], [12, 18]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [2, 16]) == [[1, 16], [17, 19]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [1, 18]) == [[1, 18], [19, 20]]\n assert candidate(intervals = [[1, 4], [7, 10], [12, 16], [20, 24]],newInterval = [5, 18]) == [[1, 4], [5, 18], [20, 24]]\n assert candidate(intervals = [[1, 2], [6, 7], [11, 12]],newInterval = [5, 6]) == [[1, 2], [5, 7], [11, 12]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [0, 20]) == [[0, 20]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [0, 20]) == [[0, 20]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [4, 11]) == [[1, 3], [4, 11], [12, 14], [16, 18]]\n assert candidate(intervals = [[1, 4], [9, 10], [11, 12], [13, 14]],newInterval = [5, 13]) == [[1, 4], [5, 14]]\n assert candidate(intervals = [[0, 2], [3, 6], [8, 10], [12, 14], [16, 19]],newInterval = [1, 18]) == [[0, 19]]\n assert candidate(intervals = [[1, 2]],newInterval = [3, 4]) == [[1, 2], [3, 4]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14]],newInterval = [1, 14]) == [[1, 14]]\n assert candidate(intervals = [[5, 10], [15, 20], [25, 30], [35, 40]],newInterval = [22, 28]) == [[5, 10], [15, 20], [22, 30], [35, 40]]\n assert candidate(intervals = [[1, 3], [8, 10], [15, 17], [20, 22]],newInterval = [4, 9]) == [[1, 3], [4, 10], [15, 17], [20, 22]]\n assert candidate(intervals = [[1, 2], [3, 6], [8, 10], [12, 15]],newInterval = [7, 9]) == [[1, 2], [3, 6], [7, 10], [12, 15]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [11, 15]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 15]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [2, 18]) == [[1, 19]]\n assert candidate(intervals = [[1, 2], [4, 7], [8, 10], [12, 15], [17, 20]],newInterval = [3, 18]) == [[1, 2], [3, 20]]\n assert candidate(intervals = [[1, 100], [200, 300], [400, 500]],newInterval = [150, 250]) == [[1, 100], [150, 300], [400, 500]]\n assert candidate(intervals = [[1, 5], [10, 15], [20, 25], [30, 35]],newInterval = [5, 30]) == [[1, 35]]\n assert candidate(intervals = [[1, 3], [5, 8], [10, 15], [16, 20]],newInterval = [4, 18]) == [[1, 3], [4, 20]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16], [19, 20]],newInterval = [10, 19]) == [[1, 2], [3, 5], [6, 7], [8, 20]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [2, 16]) == [[1, 16]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [17, 20]) == [[1, 3], [5, 7], [8, 10], [12, 14], [16, 20]]\n assert candidate(intervals = [[1, 3], [6, 9], [12, 15], [18, 21], [24, 27]],newInterval = [5, 20]) == [[1, 3], [5, 21], [24, 27]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [8, 14]) == [[1, 3], [5, 7], [8, 15], [17, 19]]\n assert candidate(intervals = [[1, 2], [5, 6], [9, 10], [13, 14], [17, 18]],newInterval = [3, 15]) == [[1, 2], [3, 15], [17, 18]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [17, 20]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16], [17, 20]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [7, 15]) == [[1, 2], [3, 5], [6, 16]]\n assert candidate(intervals = [],newInterval = [1, 5]) == [[1, 5]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [0, 15]) == [[0, 15]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14]],newInterval = [4, 11]) == [[1, 3], [4, 11], [12, 14]]\n assert candidate(intervals = [[1, 10], [20, 30], [40, 50]],newInterval = [15, 25]) == [[1, 10], [15, 30], [40, 50]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [3, 12]) == [[1, 2], [3, 16]]\n assert candidate(intervals = [[1, 10000]],newInterval = [5000, 15000]) == [[1, 15000]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 8], [9, 10], [12, 14], [16, 18]],newInterval = [3, 13]) == [[1, 2], [3, 14], [16, 18]]\n assert candidate(intervals = [[1, 5], [10, 15], [20, 25], [30, 35]],newInterval = [18, 22]) == [[1, 5], [10, 15], [18, 25], [30, 35]]\n assert candidate(intervals = [[5, 7], [10, 12], [15, 17], [20, 22]],newInterval = [8, 19]) == [[5, 7], [8, 19], [20, 22]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [3, 17]) == [[1, 2], [3, 18], [19, 20]]\n assert candidate(intervals = [[3, 5], [10, 12], [15, 18]],newInterval = [6, 11]) == [[3, 5], [6, 12], [15, 18]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [1, 3]) == [[1, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [0, 0]) == [[0, 0], [1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]],newInterval = [0, 6]) == [[0, 6]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [3, 5]) == [[1, 2], [3, 6], [8, 10], [12, 14], [16, 18]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [10, 11]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 11]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [2, 9]) == [[1, 10]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18], [20, 22], [24, 26], [28, 30]],newInterval = [3, 27]) == [[1, 2], [3, 27], [28, 30]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [0, 17]) == [[0, 17]]\n assert candidate(intervals = [[1, 2], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [3, 12]) == [[1, 2], [3, 12], [13, 15], [17, 19]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [5, 10]) == [[1, 2], [3, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [6, 12]) == [[1, 2], [3, 5], [6, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]],newInterval = [1, 12]) == [[1, 12]]\n assert candidate(intervals = [[1, 5], [6, 10], [11, 15], [16, 20]],newInterval = [1, 20]) == [[1, 20]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [18, 20]) == [[1, 3], [5, 7], [8, 10], [12, 14], [16, 20]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [7, 13]) == [[1, 2], [3, 4], [5, 6], [7, 14], [15, 16], [17, 18], [19, 20]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18], [20, 22], [24, 26], [28, 30]],newInterval = [5, 25]) == [[1, 2], [4, 26], [28, 30]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15]],newInterval = [2, 14]) == [[1, 15]]\n assert candidate(intervals = [[1, 2], [3, 4], [7, 9], [11, 13], [15, 17], [19, 21]],newInterval = [5, 16]) == [[1, 2], [3, 4], [5, 17], [19, 21]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [5, 9]) == [[1, 2], [4, 10], [12, 14], [16, 18]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [15, 20]],newInterval = [4, 10]) == [[1, 3], [4, 11], [15, 20]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [6, 9]) == [[1, 3], [5, 11], [13, 15], [17, 19]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [1, 9]) == [[1, 10], [12, 16]]\n assert candidate(intervals = [[1, 4], [6, 8], [10, 12], [14, 16]],newInterval = [5, 15]) == [[1, 4], [5, 16]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18], [20, 22], [24, 26], [28, 30]],newInterval = [1, 30]) == [[1, 30]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 9], [11, 13], [15, 17], [19, 21]],newInterval = [4, 18]) == [[1, 2], [3, 18], [19, 21]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14], [16, 17], [19, 20]],newInterval = [3, 19]) == [[1, 2], [3, 20]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14], [16, 17], [19, 20]],newInterval = [6, 18]) == [[1, 2], [4, 5], [6, 18], [19, 20]]\n assert candidate(intervals = [[1, 5], [10, 15], [20, 25], [30, 35], [40, 45]],newInterval = [22, 33]) == [[1, 5], [10, 15], [20, 35], [40, 45]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 7], [9, 10]],newInterval = [3, 8]) == [[1, 2], [3, 8], [9, 10]]\n assert candidate(intervals = [[1, 3], [5, 6], [7, 8], [11, 12], [13, 14]],newInterval = [2, 10]) == [[1, 10], [11, 12], [13, 14]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [14, 16]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8]],newInterval = [5, 7]) == [[1, 2], [4, 8]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [4, 10]) == [[1, 3], [4, 11], [13, 15], [17, 19]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [15, 17]) == [[1, 3], [5, 7], [8, 10], [12, 14], [15, 18]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [2, 19]) == [[1, 20]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 7], [9, 10], [12, 13]],newInterval = [3, 8]) == [[1, 2], [3, 8], [9, 10], [12, 13]]\n assert candidate(intervals = [[1, 10], [15, 20], [25, 30], [35, 40]],newInterval = [12, 28]) == [[1, 10], [12, 30], [35, 40]]\n assert candidate(intervals = [[1, 100]],newInterval = [50, 50]) == [[1, 100]]\n assert candidate(intervals = [[1, 10], [15, 20], [25, 30]],newInterval = [11, 19]) == [[1, 10], [11, 20], [25, 30]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [0, 1]) == [[0, 3], [5, 7], [8, 10], [12, 14], [16, 18]]\n assert candidate(intervals = [[1, 2]],newInterval = [0, 0]) == [[0, 0], [1, 2]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [0, 0]) == [[0, 0], [1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [0, 11]) == [[0, 11]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [5, 13]) == [[1, 2], [4, 14], [16, 18]]\n assert candidate(intervals = [[1, 3], [6, 9], [11, 12], [15, 18], [20, 22]],newInterval = [13, 16]) == [[1, 3], [6, 9], [11, 12], [13, 18], [20, 22]]\n assert candidate(intervals = [[1, 5], [10, 15], [20, 25]],newInterval = [6, 19]) == [[1, 5], [6, 19], [20, 25]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [15, 16]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14]],newInterval = [3, 12]) == [[1, 2], [3, 12], [13, 14]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [0, 1]) == [[0, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [10, 11]) == [[1, 2], [3, 5], [6, 7], [8, 11], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [10, 10]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [11, 12]) == [[1, 3], [5, 7], [8, 10], [11, 14], [16, 18]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [11, 12]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]\n assert candidate(intervals = [[1, 3], [5, 7], [10, 12], [15, 18]],newInterval = [6, 11]) == [[1, 3], [5, 12], [15, 18]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 7], [9, 10], [12, 13]],newInterval = [3, 11]) == [[1, 2], [3, 11], [12, 13]]\n assert candidate(intervals = [[1, 2]],newInterval = [2, 2]) == [[1, 2]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [15, 18]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 18]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 12], [15, 18]],newInterval = [4, 11]) == [[1, 3], [4, 12], [15, 18]]\n assert candidate(intervals = [[1, 10], [14, 20], [22, 30], [32, 40]],newInterval = [12, 28]) == [[1, 10], [12, 30], [32, 40]]\n assert candidate(intervals = [[1, 2], [10, 15], [20, 25], [30, 35]],newInterval = [5, 19]) == [[1, 2], [5, 19], [20, 25], [30, 35]]\n assert candidate(intervals = [[1, 50]],newInterval = [25, 75]) == [[1, 75]]\n assert candidate(intervals = [[1, 2], [4, 10], [15, 20], [25, 30]],newInterval = [5, 18]) == [[1, 2], [4, 20], [25, 30]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [19, 20]) == [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18], [19, 20]]\n assert candidate(intervals = [[1, 2], [4, 5], [8, 9], [12, 13], [16, 17], [20, 21]],newInterval = [6, 14]) == [[1, 2], [4, 5], [6, 14], [16, 17], [20, 21]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [5, 15]) == [[1, 2], [3, 16]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 7], [9, 10], [12, 13]],newInterval = [5, 9]) == [[1, 2], [4, 10], [12, 13]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [11, 11]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 11]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 7], [8, 9], [10, 11]],newInterval = [5, 6]) == [[1, 2], [4, 7], [8, 9], [10, 11]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [17, 20]) == [[1, 2], [4, 6], [8, 10], [12, 14], [16, 20]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [12, 13]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [0, 1]) == [[0, 2], [3, 4], [5, 6], [7, 8], [9, 10]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [9, 11]) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 12], [13, 14], [15, 16], [17, 18], [19, 20]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [10, 18]) == [[1, 2], [3, 5], [6, 7], [8, 18]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [11, 12]],newInterval = [3, 10]) == [[1, 2], [3, 10], [11, 12]]\n assert candidate(intervals = [[1, 3], [5, 7], [8, 10], [12, 14], [16, 18]],newInterval = [14, 15]) == [[1, 3], [5, 7], [8, 10], [12, 15], [16, 18]]\n assert candidate(intervals = [[1, 2], [6, 7], [11, 12]],newInterval = [3, 5]) == [[1, 2], [3, 5], [6, 7], [11, 12]]\n assert candidate(intervals = [[1, 2], [5, 10], [15, 20], [25, 30], [35, 40]],newInterval = [0, 45]) == [[0, 45]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19]],newInterval = [0, 20]) == [[0, 20]]\n assert candidate(intervals = [[1, 3], [6, 10], [14, 16], [19, 22], [24, 26]],newInterval = [11, 15]) == [[1, 3], [6, 10], [11, 16], [19, 22], [24, 26]]\n assert candidate(intervals = [],newInterval = [1, 2]) == [[1, 2]]\n assert candidate(intervals = [[1, 3], [5, 6], [8, 10], [12, 14], [16, 18]],newInterval = [7, 13]) == [[1, 3], [5, 6], [7, 14], [16, 18]]\n assert candidate(intervals = [[1, 2], [6, 7], [11, 12]],newInterval = [1, 17]) == [[1, 17]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 12], [14, 16], [18, 20]],newInterval = [3, 17]) == [[1, 2], [3, 17], [18, 20]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14]],newInterval = [3, 7]) == [[1, 2], [3, 7], [8, 10], [12, 14]]\n assert candidate(intervals = [[1, 2], [4, 5], [8, 10], [12, 14], [16, 18]],newInterval = [6, 11]) == [[1, 2], [4, 5], [6, 11], [12, 14], [16, 18]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [1, 20]) == [[1, 20]]\n assert candidate(intervals = [[1, 3], [5, 7], [9, 11], [13, 15], [17, 19], [21, 23], [25, 27], [29, 31]],newInterval = [4, 29]) == [[1, 3], [4, 31]]\n assert candidate(intervals = [[1, 5], [10, 15], [20, 25], [30, 35], [40, 45]],newInterval = [26, 34]) == [[1, 5], [10, 15], [20, 25], [26, 35], [40, 45]]\n assert candidate(intervals = [[0, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [3, 15]) == [[0, 2], [3, 15], [16, 18]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [9, 15]) == [[1, 2], [4, 6], [8, 15], [16, 18]]\n assert candidate(intervals = [[1, 3], [6, 9], [13, 17], [20, 24], [27, 30]],newInterval = [11, 22]) == [[1, 3], [6, 9], [11, 24], [27, 30]]\n assert candidate(intervals = [[1, 3], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [2, 4]) == [[1, 6], [8, 10], [12, 14], [16, 18]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8]],newInterval = [0, 1]) == [[0, 2], [4, 5], [7, 8]]\n assert candidate(intervals = [[1, 2], [5, 8], [10, 15], [20, 25]],newInterval = [3, 23]) == [[1, 2], [3, 25]]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14], [16, 17]],newInterval = [3, 12]) == [[1, 2], [3, 12], [13, 14], [16, 17]]\n assert candidate(intervals = [[1, 2], [4, 5], [6, 10], [12, 18], [20, 25]],newInterval = [3, 11]) == [[1, 2], [3, 11], [12, 18], [20, 25]]\n assert candidate(intervals = [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]],newInterval = [16, 16]) == [[1, 2], [3, 5], [6, 7], [8, 10], [12, 16]]\n assert candidate(intervals = [[1, 2], [4, 6], [8, 10], [12, 14], [16, 18]],newInterval = [15, 17]) == [[1, 2], [4, 6], [8, 10], [12, 14], [15, 18]]\n assert candidate(intervals = [[1, 3], [6, 9], [12, 15], [18, 21], [24, 27]],newInterval = [10, 25]) == [[1, 3], [6, 9], [10, 27]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],newInterval = [8, 10]) == [[1, 2], [3, 4], [5, 6], [7, 10]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]],newInterval = [0, 16]) == [[0, 16]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]],newInterval = [5, 15]) == [[1, 2], [3, 4], [5, 16], [17, 18], [19, 20]]\n assert candidate(intervals = [[1, 3], [6, 9], [13, 17], [20, 24], [27, 30], [33, 37], [40, 45]],newInterval = [11, 34]) == [[1, 3], [6, 9], [11, 37], [40, 45]]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]],newInterval = [1, 16]) == [[1, 16]]\n assert candidate(intervals = [[1, 2]],newInterval = [0, 3]) == [[0, 3]]\n", "comparison": "exact"}, "public_tests": ["[[1,3],[6,9]]\n[2,5]", "[[1,2],[3,5],[6,7],[8,10],[12,16]]\n[4,8]"], "hints": ["Intervals Array is sorted. Can you use Binary Search to find the correct position to insert the new Interval.?", "Can you try merging the overlapping intervals while inserting the new interval?", "This can be done by comparing the end of the last interval with the start of the new interval and vice versa."], "metadata": {"canonical_parameter_names": ["intervals", "newInterval"], "leetcode_dataset_entry_point": "Solution().insert", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:35+00:00", "tests_total": 166, "tests_dropped": 0, "flags": [], "topic_tags": ["array"]}, "language": "ruby", "interface": {"raw_signature": "def insert(intervals, new_interval)", "container": null, "callable": "insert", "parameters": [{"name": "intervals", "type": "Integer[][]"}, {"name": "new_interval", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 59, "task_id": "spiral-matrix-ii", "difficulty": "Medium", "problem_description": "Given a positive integer n, generate an n x n matrix filled with elements from 1 to n^2 in spiral order.\n\nExample 1:\n\nInput: n = 3\nOutput: [[1,2,3],[8,9,4],[7,6,5]]\n\nExample 2:\n\nInput: n = 1\nOutput: [[1]]\n\nConstraints:\n\n- 1 <= n <= 20\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == [[1, 2, 3], [8, 9, 4], [7, 6, 5]]\n assert candidate(n = 15) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 16], [55, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 70, 17], [54, 103, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 116, 71, 18], [53, 102, 143, 176, 177, 178, 179, 180, 181, 182, 183, 154, 117, 72, 19], [52, 101, 142, 175, 200, 201, 202, 203, 204, 205, 184, 155, 118, 73, 20], [51, 100, 141, 174, 199, 216, 217, 218, 219, 206, 185, 156, 119, 74, 21], [50, 99, 140, 173, 198, 215, 224, 225, 220, 207, 186, 157, 120, 75, 22], [49, 98, 139, 172, 197, 214, 223, 222, 221, 208, 187, 158, 121, 76, 23], [48, 97, 138, 171, 196, 213, 212, 211, 210, 209, 188, 159, 122, 77, 24], [47, 96, 137, 170, 195, 194, 193, 192, 191, 190, 189, 160, 123, 78, 25], [46, 95, 136, 169, 168, 167, 166, 165, 164, 163, 162, 161, 124, 79, 26], [45, 94, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 80, 27], [44, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 28], [43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29]]\n assert candidate(n = 4) == [[1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7]]\n assert candidate(n = 20) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 21], [75, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 95, 22], [74, 143, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 161, 96, 23], [73, 142, 203, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 219, 162, 97, 24], [72, 141, 202, 255, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 269, 220, 163, 98, 25], [71, 140, 201, 254, 299, 336, 337, 338, 339, 340, 341, 342, 343, 344, 311, 270, 221, 164, 99, 26], [70, 139, 200, 253, 298, 335, 364, 365, 366, 367, 368, 369, 370, 345, 312, 271, 222, 165, 100, 27], [69, 138, 199, 252, 297, 334, 363, 384, 385, 386, 387, 388, 371, 346, 313, 272, 223, 166, 101, 28], [68, 137, 198, 251, 296, 333, 362, 383, 396, 397, 398, 389, 372, 347, 314, 273, 224, 167, 102, 29], [67, 136, 197, 250, 295, 332, 361, 382, 395, 400, 399, 390, 373, 348, 315, 274, 225, 168, 103, 30], [66, 135, 196, 249, 294, 331, 360, 381, 394, 393, 392, 391, 374, 349, 316, 275, 226, 169, 104, 31], [65, 134, 195, 248, 293, 330, 359, 380, 379, 378, 377, 376, 375, 350, 317, 276, 227, 170, 105, 32], [64, 133, 194, 247, 292, 329, 358, 357, 356, 355, 354, 353, 352, 351, 318, 277, 228, 171, 106, 33], [63, 132, 193, 246, 291, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 278, 229, 172, 107, 34], [62, 131, 192, 245, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 230, 173, 108, 35], [61, 130, 191, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 174, 109, 36], [60, 129, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 110, 37], [59, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 38], [58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39]]\n assert candidate(n = 2) == [[1, 2], [4, 3]]\n assert candidate(n = 1) == [[1]]\n assert candidate(n = 10) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [36, 37, 38, 39, 40, 41, 42, 43, 44, 11], [35, 64, 65, 66, 67, 68, 69, 70, 45, 12], [34, 63, 84, 85, 86, 87, 88, 71, 46, 13], [33, 62, 83, 96, 97, 98, 89, 72, 47, 14], [32, 61, 82, 95, 100, 99, 90, 73, 48, 15], [31, 60, 81, 94, 93, 92, 91, 74, 49, 16], [30, 59, 80, 79, 78, 77, 76, 75, 50, 17], [29, 58, 57, 56, 55, 54, 53, 52, 51, 18], [28, 27, 26, 25, 24, 23, 22, 21, 20, 19]]\n assert candidate(n = 5) == [[1, 2, 3, 4, 5], [16, 17, 18, 19, 6], [15, 24, 25, 20, 7], [14, 23, 22, 21, 8], [13, 12, 11, 10, 9]]\n assert candidate(n = 12) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 13], [43, 80, 81, 82, 83, 84, 85, 86, 87, 88, 55, 14], [42, 79, 108, 109, 110, 111, 112, 113, 114, 89, 56, 15], [41, 78, 107, 128, 129, 130, 131, 132, 115, 90, 57, 16], [40, 77, 106, 127, 140, 141, 142, 133, 116, 91, 58, 17], [39, 76, 105, 126, 139, 144, 143, 134, 117, 92, 59, 18], [38, 75, 104, 125, 138, 137, 136, 135, 118, 93, 60, 19], [37, 74, 103, 124, 123, 122, 121, 120, 119, 94, 61, 20], [36, 73, 102, 101, 100, 99, 98, 97, 96, 95, 62, 21], [35, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 22], [34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23]]\n assert candidate(n = 16) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], [60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 17], [59, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 75, 18], [58, 111, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 125, 76, 19], [57, 110, 155, 192, 193, 194, 195, 196, 197, 198, 199, 200, 167, 126, 77, 20], [56, 109, 154, 191, 220, 221, 222, 223, 224, 225, 226, 201, 168, 127, 78, 21], [55, 108, 153, 190, 219, 240, 241, 242, 243, 244, 227, 202, 169, 128, 79, 22], [54, 107, 152, 189, 218, 239, 252, 253, 254, 245, 228, 203, 170, 129, 80, 23], [53, 106, 151, 188, 217, 238, 251, 256, 255, 246, 229, 204, 171, 130, 81, 24], [52, 105, 150, 187, 216, 237, 250, 249, 248, 247, 230, 205, 172, 131, 82, 25], [51, 104, 149, 186, 215, 236, 235, 234, 233, 232, 231, 206, 173, 132, 83, 26], [50, 103, 148, 185, 214, 213, 212, 211, 210, 209, 208, 207, 174, 133, 84, 27], [49, 102, 147, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 134, 85, 28], [48, 101, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 86, 29], [47, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 30], [46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31]]\n assert candidate(n = 17) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], [64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 18], [63, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 80, 19], [62, 119, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 134, 81, 20], [61, 118, 167, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 180, 135, 82, 21], [60, 117, 166, 207, 240, 241, 242, 243, 244, 245, 246, 247, 218, 181, 136, 83, 22], [59, 116, 165, 206, 239, 264, 265, 266, 267, 268, 269, 248, 219, 182, 137, 84, 23], [58, 115, 164, 205, 238, 263, 280, 281, 282, 283, 270, 249, 220, 183, 138, 85, 24], [57, 114, 163, 204, 237, 262, 279, 288, 289, 284, 271, 250, 221, 184, 139, 86, 25], [56, 113, 162, 203, 236, 261, 278, 287, 286, 285, 272, 251, 222, 185, 140, 87, 26], [55, 112, 161, 202, 235, 260, 277, 276, 275, 274, 273, 252, 223, 186, 141, 88, 27], [54, 111, 160, 201, 234, 259, 258, 257, 256, 255, 254, 253, 224, 187, 142, 89, 28], [53, 110, 159, 200, 233, 232, 231, 230, 229, 228, 227, 226, 225, 188, 143, 90, 29], [52, 109, 158, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 144, 91, 30], [51, 108, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 92, 31], [50, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 32], [49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33]]\n assert candidate(n = 8) == [[1, 2, 3, 4, 5, 6, 7, 8], [28, 29, 30, 31, 32, 33, 34, 9], [27, 48, 49, 50, 51, 52, 35, 10], [26, 47, 60, 61, 62, 53, 36, 11], [25, 46, 59, 64, 63, 54, 37, 12], [24, 45, 58, 57, 56, 55, 38, 13], [23, 44, 43, 42, 41, 40, 39, 14], [22, 21, 20, 19, 18, 17, 16, 15]]\n assert candidate(n = 18) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18], [68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 19], [67, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 85, 20], [66, 127, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 143, 86, 21], [65, 126, 179, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 193, 144, 87, 22], [64, 125, 178, 223, 260, 261, 262, 263, 264, 265, 266, 267, 268, 235, 194, 145, 88, 23], [63, 124, 177, 222, 259, 288, 289, 290, 291, 292, 293, 294, 269, 236, 195, 146, 89, 24], [62, 123, 176, 221, 258, 287, 308, 309, 310, 311, 312, 295, 270, 237, 196, 147, 90, 25], [61, 122, 175, 220, 257, 286, 307, 320, 321, 322, 313, 296, 271, 238, 197, 148, 91, 26], [60, 121, 174, 219, 256, 285, 306, 319, 324, 323, 314, 297, 272, 239, 198, 149, 92, 27], [59, 120, 173, 218, 255, 284, 305, 318, 317, 316, 315, 298, 273, 240, 199, 150, 93, 28], [58, 119, 172, 217, 254, 283, 304, 303, 302, 301, 300, 299, 274, 241, 200, 151, 94, 29], [57, 118, 171, 216, 253, 282, 281, 280, 279, 278, 277, 276, 275, 242, 201, 152, 95, 30], [56, 117, 170, 215, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 202, 153, 96, 31], [55, 116, 169, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 154, 97, 32], [54, 115, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 98, 33], [53, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 34], [52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35]]\n assert candidate(n = 19) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 20], [71, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 90, 21], [70, 135, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 152, 91, 22], [69, 134, 191, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 206, 153, 92, 23], [68, 133, 190, 239, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 252, 207, 154, 93, 24], [67, 132, 189, 238, 279, 312, 313, 314, 315, 316, 317, 318, 319, 290, 253, 208, 155, 94, 25], [66, 131, 188, 237, 278, 311, 336, 337, 338, 339, 340, 341, 320, 291, 254, 209, 156, 95, 26], [65, 130, 187, 236, 277, 310, 335, 352, 353, 354, 355, 342, 321, 292, 255, 210, 157, 96, 27], [64, 129, 186, 235, 276, 309, 334, 351, 360, 361, 356, 343, 322, 293, 256, 211, 158, 97, 28], [63, 128, 185, 234, 275, 308, 333, 350, 359, 358, 357, 344, 323, 294, 257, 212, 159, 98, 29], [62, 127, 184, 233, 274, 307, 332, 349, 348, 347, 346, 345, 324, 295, 258, 213, 160, 99, 30], [61, 126, 183, 232, 273, 306, 331, 330, 329, 328, 327, 326, 325, 296, 259, 214, 161, 100, 31], [60, 125, 182, 231, 272, 305, 304, 303, 302, 301, 300, 299, 298, 297, 260, 215, 162, 101, 32], [59, 124, 181, 230, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 216, 163, 102, 33], [58, 123, 180, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 164, 103, 34], [57, 122, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 104, 35], [56, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 36], [55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37]]\n assert candidate(n = 11) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 12], [39, 72, 73, 74, 75, 76, 77, 78, 79, 50, 13], [38, 71, 96, 97, 98, 99, 100, 101, 80, 51, 14], [37, 70, 95, 112, 113, 114, 115, 102, 81, 52, 15], [36, 69, 94, 111, 120, 121, 116, 103, 82, 53, 16], [35, 68, 93, 110, 119, 118, 117, 104, 83, 54, 17], [34, 67, 92, 109, 108, 107, 106, 105, 84, 55, 18], [33, 66, 91, 90, 89, 88, 87, 86, 85, 56, 19], [32, 65, 64, 63, 62, 61, 60, 59, 58, 57, 20], [31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21]]\n assert candidate(n = 14) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], [52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 15], [51, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 65, 16], [50, 95, 132, 133, 134, 135, 136, 137, 138, 139, 140, 107, 66, 17], [49, 94, 131, 160, 161, 162, 163, 164, 165, 166, 141, 108, 67, 18], [48, 93, 130, 159, 180, 181, 182, 183, 184, 167, 142, 109, 68, 19], [47, 92, 129, 158, 179, 192, 193, 194, 185, 168, 143, 110, 69, 20], [46, 91, 128, 157, 178, 191, 196, 195, 186, 169, 144, 111, 70, 21], [45, 90, 127, 156, 177, 190, 189, 188, 187, 170, 145, 112, 71, 22], [44, 89, 126, 155, 176, 175, 174, 173, 172, 171, 146, 113, 72, 23], [43, 88, 125, 154, 153, 152, 151, 150, 149, 148, 147, 114, 73, 24], [42, 87, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 74, 25], [41, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 26], [40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27]]\n assert candidate(n = 9) == [[1, 2, 3, 4, 5, 6, 7, 8, 9], [32, 33, 34, 35, 36, 37, 38, 39, 10], [31, 56, 57, 58, 59, 60, 61, 40, 11], [30, 55, 72, 73, 74, 75, 62, 41, 12], [29, 54, 71, 80, 81, 76, 63, 42, 13], [28, 53, 70, 79, 78, 77, 64, 43, 14], [27, 52, 69, 68, 67, 66, 65, 44, 15], [26, 51, 50, 49, 48, 47, 46, 45, 16], [25, 24, 23, 22, 21, 20, 19, 18, 17]]\n assert candidate(n = 6) == [[1, 2, 3, 4, 5, 6], [20, 21, 22, 23, 24, 7], [19, 32, 33, 34, 25, 8], [18, 31, 36, 35, 26, 9], [17, 30, 29, 28, 27, 10], [16, 15, 14, 13, 12, 11]]\n assert candidate(n = 7) == [[1, 2, 3, 4, 5, 6, 7], [24, 25, 26, 27, 28, 29, 8], [23, 40, 41, 42, 43, 30, 9], [22, 39, 48, 49, 44, 31, 10], [21, 38, 47, 46, 45, 32, 11], [20, 37, 36, 35, 34, 33, 12], [19, 18, 17, 16, 15, 14, 13]]\n assert candidate(n = 13) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 14], [47, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 60, 15], [46, 87, 120, 121, 122, 123, 124, 125, 126, 127, 98, 61, 16], [45, 86, 119, 144, 145, 146, 147, 148, 149, 128, 99, 62, 17], [44, 85, 118, 143, 160, 161, 162, 163, 150, 129, 100, 63, 18], [43, 84, 117, 142, 159, 168, 169, 164, 151, 130, 101, 64, 19], [42, 83, 116, 141, 158, 167, 166, 165, 152, 131, 102, 65, 20], [41, 82, 115, 140, 157, 156, 155, 154, 153, 132, 103, 66, 21], [40, 81, 114, 139, 138, 137, 136, 135, 134, 133, 104, 67, 22], [39, 80, 113, 112, 111, 110, 109, 108, 107, 106, 105, 68, 23], [38, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 24], [37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25]]\n", "comparison": "exact"}, "public_tests": ["3", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().generateMatrix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:40+00:00", "tests_total": 20, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "matrix", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def generate_matrix(n)", "container": null, "callable": "generate_matrix", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 60, "task_id": "permutation-sequence", "difficulty": "Hard", "problem_description": "The set [1, 2, 3, ..., n] contains a total of n! unique permutations.\n\nBy listing and labeling all of the permutations in order, we get the following sequence for n = 3:\n\n1. \"123\"\n2. \"132\"\n3. \"213\"\n4. \"231\"\n5. \"312\"\n6. \"321\"\n\nGiven n and k, return the k^th permutation sequence.\n\nExample 1:\n\nInput: n = 3, k = 3\nOutput: \"213\"\n\nExample 2:\n\nInput: n = 4, k = 9\nOutput: \"2314\"\n\nExample 3:\n\nInput: n = 3, k = 1\nOutput: \"123\"\n\nConstraints:\n\n- 1 <= n <= 9\n- 1 <= k <= n!\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3,k = 1) == \"123\"\n assert candidate(n = 8,k = 40320) == \"87654321\"\n assert candidate(n = 4,k = 9) == \"2314\"\n assert candidate(n = 9,k = 362880) == \"987654321\"\n assert candidate(n = 5,k = 10) == \"13452\"\n assert candidate(n = 3,k = 3) == \"213\"\n assert candidate(n = 2,k = 1) == \"12\"\n assert candidate(n = 2,k = 2) == \"21\"\n assert candidate(n = 6,k = 720) == \"654321\"\n assert candidate(n = 7,k = 5040) == \"7654321\"\n assert candidate(n = 5,k = 1) == \"12345\"\n assert candidate(n = 5,k = 120) == \"54321\"\n assert candidate(n = 9,k = 362879) == \"987654312\"\n assert candidate(n = 5,k = 60) == \"32541\"\n assert candidate(n = 8,k = 25921) == \"62134578\"\n assert candidate(n = 4,k = 11) == \"2413\"\n assert candidate(n = 9,k = 181440) == \"549876321\"\n assert candidate(n = 6,k = 399) == \"425316\"\n assert candidate(n = 7,k = 1) == \"1234567\"\n assert candidate(n = 8,k = 30240) == \"68754321\"\n assert candidate(n = 6,k = 359) == \"365412\"\n assert candidate(n = 5,k = 119) == \"54312\"\n assert candidate(n = 4,k = 19) == \"4123\"\n assert candidate(n = 6,k = 719) == \"654312\"\n assert candidate(n = 8,k = 1) == \"12345678\"\n assert candidate(n = 8,k = 20161) == \"51234678\"\n assert candidate(n = 9,k = 123456) == \"416589732\"\n assert candidate(n = 8,k = 40321) == \"1234567\"\n assert candidate(n = 8,k = 20160) == \"48765321\"\n assert candidate(n = 6,k = 100) == \"162453\"\n assert candidate(n = 6,k = 360) == \"365421\"\n assert candidate(n = 4,k = 15) == \"3214\"\n assert candidate(n = 9,k = 270000) == \"764985321\"\n assert candidate(n = 9,k = 100000) == \"358926471\"\n assert candidate(n = 7,k = 2521) == \"4512367\"\n assert candidate(n = 7,k = 3500) == \"5716243\"\n assert candidate(n = 9,k = 50000) == \"239574186\"\n assert candidate(n = 9,k = 326592) == \"917548632\"\n assert candidate(n = 7,k = 5041) == \"123456\"\n assert candidate(n = 9,k = 274567) == \"784315269\"\n assert candidate(n = 6,k = 391) == \"423156\"\n assert candidate(n = 6,k = 500) == \"516243\"\n assert candidate(n = 6,k = 1) == \"123456\"\n assert candidate(n = 8,k = 25000) == \"58624371\"\n assert candidate(n = 8,k = 12345) == \"35184627\"\n assert candidate(n = 9,k = 181441) == \"561234789\"\n assert candidate(n = 4,k = 24) == \"4321\"\n assert candidate(n = 7,k = 5000) == \"7642153\"\n assert candidate(n = 7,k = 1000) == \"2436571\"\n assert candidate(n = 5,k = 24) == \"15432\"\n assert candidate(n = 7,k = 2520) == \"4376521\"\n assert candidate(n = 4,k = 4) == \"1342\"\n assert candidate(n = 4,k = 10) == \"2341\"\n assert candidate(n = 5,k = 100) == \"51342\"\n assert candidate(n = 9,k = 98765) == \"357214968\"\n assert candidate(n = 7,k = 5039) == \"7654312\"\n assert candidate(n = 6,k = 397) == \"425136\"\n assert candidate(n = 6,k = 361) == \"412356\"\n", "comparison": "exact"}, "public_tests": ["3\n3", "4\n9", "3\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().getPermutation", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:42+00:00", "tests_total": 58, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def get_permutation(n, k)", "container": null, "callable": "get_permutation", "parameters": [{"name": "n", "type": "Integer"}, {"name": "k", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 62, "task_id": "unique-paths", "difficulty": "Medium", "problem_description": "There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n - 1]). The robot can only move either down or right at any point in time.\n\nGiven the two integers m and n, return the number of possible unique paths that the robot can take to reach the bottom-right corner.\n\nThe test cases are generated so that the answer will be less than or equal to 2 * 10^9.\n\nExample 1:\n\nInput: m = 3, n = 7\nOutput: 28\n\nExample 2:\n\nInput: m = 3, n = 2\nOutput: 3\nExplanation: From the top-left corner, there are a total of 3 ways to reach the bottom-right corner:\n1. Right -> Down -> Down\n2. Down -> Down -> Right\n3. Down -> Right -> Down\n\nConstraints:\n\n- 1 <= m, n <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(m = 1,n = 100) == 1\n assert candidate(m = 3,n = 7) == 28\n assert candidate(m = 5,n = 5) == 70\n assert candidate(m = 10,n = 10) == 48620\n assert candidate(m = 5,n = 3) == 15\n assert candidate(m = 1,n = 1) == 1\n assert candidate(m = 3,n = 2) == 3\n assert candidate(m = 100,n = 1) == 1\n assert candidate(m = 5,n = 95) == 3612280\n assert candidate(m = 15,n = 15) == 40116600\n assert candidate(m = 1,n = 50) == 1\n assert candidate(m = 100,n = 5) == 4421275\n assert candidate(m = 40,n = 10) == 1677106640\n assert candidate(m = 5,n = 8) == 330\n assert candidate(m = 99,n = 1) == 1\n assert candidate(m = 5,n = 100) == 4421275\n assert candidate(m = 99,n = 2) == 99\n assert candidate(m = 2,n = 99) == 99\n assert candidate(m = 1,n = 99) == 1\n assert candidate(m = 50,n = 2) == 50\n assert candidate(m = 15,n = 5) == 3060\n assert candidate(m = 15,n = 20) == 818809200\n assert candidate(m = 2,n = 50) == 50\n assert candidate(m = 50,n = 1) == 1\n", "comparison": "exact"}, "public_tests": ["3\n7", "3\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["m", "n"], "leetcode_dataset_entry_point": "Solution().uniquePaths", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:47+00:00", "tests_total": 55, "tests_dropped": 31, "flags": ["has_images"], "topic_tags": ["math", "dynamic-programming", "combinatorics"]}, "language": "ruby", "interface": {"raw_signature": "def unique_paths(m, n)", "container": null, "callable": "unique_paths", "parameters": [{"name": "m", "type": "Integer"}, {"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 63, "task_id": "unique-paths-ii", "difficulty": "Medium", "problem_description": "You are given an m x n integer array grid. There is a robot initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m - 1][n - 1]). The robot can only move either down or right at any point in time.\n\nAn obstacle and space are marked as 1 or 0 respectively in grid. A path that the robot takes cannot include any square that is an obstacle.\n\nReturn the number of possible unique paths that the robot can take to reach the bottom-right corner.\n\nThe testcases are generated so that the answer will be less than or equal to 2 * 10^9.\n\nExample 1:\n\nInput: obstacleGrid = [[0,0,0],[0,1,0],[0,0,0]]\nOutput: 2\nExplanation: There is one obstacle in the middle of the 3x3 grid above.\nThere are two ways to reach the bottom-right corner:\n1. Right -> Right -> Down -> Down\n2. Down -> Down -> Right -> Right\n\nExample 2:\n\nInput: obstacleGrid = [[0,1],[0,0]]\nOutput: 1\n\nConstraints:\n\n- m == obstacleGrid.length\n- n == obstacleGrid[i].length\n- 1 <= m, n <= 100\n- obstacleGrid[i][j] is 0 or 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(obstacleGrid = [[1, 0], [0, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]) == 17\n assert candidate(obstacleGrid = [[0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0], [0, 1, 0, 0]]) == 7\n assert candidate(obstacleGrid = [[0, 1, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 0]]) == 7\n assert candidate(obstacleGrid = [[1]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) == 6\n assert candidate(obstacleGrid = [[0, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0]]) == 4\n assert candidate(obstacleGrid = [[0, 0, 1, 0], [0, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0]]) == 7\n assert candidate(obstacleGrid = [[0]]) == 1\n assert candidate(obstacleGrid = [[0, 0, 0], [0, 1, 0], [0, 0, 0]]) == 2\n assert candidate(obstacleGrid = [[0, 0], [0, 0]]) == 2\n assert candidate(obstacleGrid = [[0, 0], [0, 1]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) == 11\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 35\n assert candidate(obstacleGrid = [[0, 1], [0, 0]]) == 1\n assert candidate(obstacleGrid = [[0, 0], [1, 0]]) == 1\n assert candidate(obstacleGrid = [[0, 0, 0], [0, 0, 0], [0, 0, 1]]) == 0\n assert candidate(obstacleGrid = [[0, 0], [1, 1], [0, 0]]) == 0\n assert candidate(obstacleGrid = [[1, 0, 0], [0, 1, 0], [0, 0, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) == 8\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 86\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 1, 0]]) == 11\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [1, 1, 1, 1, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 1\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0]]) == 87\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0], [0, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 35\n assert candidate(obstacleGrid = [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [1, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 24\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 1, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0]]) == 303\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0]]) == 13\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 53\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 26\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 33\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 540\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 1078\n assert candidate(obstacleGrid = [[0, 0, 0, 1], [0, 1, 0, 0], [0, 0, 1, 0], [1, 0, 0, 0]]) == 2\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0]]) == 231\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 252\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 282\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 77\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]) == 25\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 47\n assert candidate(obstacleGrid = [[0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 1, 0]]) == 4\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0]]) == 101\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0], [0, 0, 0, 1, 0], [1, 1, 1, 1, 0], [0, 0, 0, 0, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0]]) == 14\n assert candidate(obstacleGrid = [[0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 38\n assert candidate(obstacleGrid = [[0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 1058\n assert candidate(obstacleGrid = [[0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 0]]) == 5\n assert candidate(obstacleGrid = [[0, 1, 1, 1, 0], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0]]) == 3\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0]]) == 19\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 133\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 400\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 68\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 2\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 25\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 1871\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0], [0, 0, 0, 0, 0], [0, 0, 0, 1, 0]]) == 5\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 264\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0], [0, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 0]]) == 15\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 1, 0]]) == 10\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0]]) == 72\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 239\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]]) == 161\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 9446\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 4\n assert candidate(obstacleGrid = [[0, 1, 0, 0, 0], [0, 1, 0, 1, 0], [0, 0, 0, 1, 0], [1, 1, 0, 0, 0], [0, 0, 0, 0, 0]]) == 3\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]) == 7\n assert candidate(obstacleGrid = [[0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0]]) == 3\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0]]) == 850\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0]]) == 14\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 6\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0]]) == 24\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 1], [0, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]) == 17\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0]]) == 37\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 3225\n assert candidate(obstacleGrid = [[0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0]]) == 16\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0]]) == 24\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]) == 5\n assert candidate(obstacleGrid = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0]]) == 11\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 27\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]]) == 190\n assert candidate(obstacleGrid = [[0, 1, 0, 1, 0], [1, 0, 0, 0, 1], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0]]) == 0\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 2513\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]) == 39\n assert candidate(obstacleGrid = [[0, 1, 0, 1, 0], [0, 0, 0, 0, 0], [1, 0, 0, 0, 1], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]) == 7\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 20\n assert candidate(obstacleGrid = [[0, 1, 0, 0, 0], [0, 1, 0, 1, 0], [0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 0, 0, 0, 0]]) == 2\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 0]]) == 18\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 4588\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 53812\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0]]) == 72\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 184756\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 34\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 167\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 37\n assert candidate(obstacleGrid = [[0, 0, 0, 1, 0], [0, 0, 0, 0, 0], [1, 0, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 20\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0]]) == 20\n assert candidate(obstacleGrid = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1]]) == 0\n", "comparison": "exact"}, "public_tests": ["[[0,0,0],[0,1,0],[0,0,0]]", "[[0,1],[0,0]]"], "hints": ["Use dynamic programming since, from each cell, you can move to the right or down.", "assume dp[i][j] is the number of unique paths to reach (i, j). dp[i][j] = dp[i][j -1] + dp[i - 1][j]. Be careful when you encounter an obstacle. set its value in dp to 0."], "metadata": {"canonical_parameter_names": ["obstacleGrid"], "leetcode_dataset_entry_point": "Solution().uniquePathsWithObstacles", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:49+00:00", "tests_total": 102, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def unique_paths_with_obstacles(obstacle_grid)", "container": null, "callable": "unique_paths_with_obstacles", "parameters": [{"name": "obstacle_grid", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 64, "task_id": "minimum-path-sum", "difficulty": "Medium", "problem_description": "Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path.\n\nNote: You can only move either down or right at any point in time.\n\nExample 1:\n\nInput: grid = [[1,3,1],[1,5,1],[4,2,1]]\nOutput: 7\nExplanation: Because the path 1 → 3 → 1 → 1 → 1 minimizes the sum.\n\nExample 2:\n\nInput: grid = [[1,2,3],[4,5,6]]\nOutput: 12\n\nConstraints:\n\n- m == grid.length\n- n == grid[i].length\n- 1 <= m, n <= 200\n- 0 <= grid[i][j] <= 200\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(grid = [[1, 2, 3], [4, 5, 6]]) == 12\n assert candidate(grid = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == 60\n assert candidate(grid = [[10, 15, 20], [25, 30, 35], [40, 45, 50]]) == 130\n assert candidate(grid = [[1]]) == 1\n assert candidate(grid = [[7]]) == 7\n assert candidate(grid = [[1, 2], [3, 4]]) == 7\n assert candidate(grid = [[1, 2], [3, 4], [5, 6]]) == 13\n assert candidate(grid = [[1, 3, 1], [1, 5, 1], [4, 2, 1]]) == 7\n assert candidate(grid = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) == 30\n assert candidate(grid = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [1, 1, 1, 1, 1], [9, 7, 5, 3, 1]]) == 9\n assert candidate(grid = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 3, 1, 5, 1], [2, 1, 2, 3, 4]]) == 17\n assert candidate(grid = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]) == 48\n assert candidate(grid = [[9, 1, 4, 3, 2], [1, 2, 5, 6, 7], [3, 6, 8, 5, 4], [2, 5, 7, 8, 1], [6, 7, 8, 9, 10]]) == 41\n assert candidate(grid = [[5, 9, 6], [11, 5, 2], [3, 12, 4], [15, 7, 8]]) == 33\n assert candidate(grid = [[7, 1, 3, 4, 2], [5, 6, 7, 2, 1], [3, 2, 1, 5, 6], [4, 3, 2, 1, 5], [6, 7, 8, 9, 1]]) == 26\n assert candidate(grid = [[10, 20, 30, 40], [20, 30, 40, 50], [30, 40, 50, 60], [40, 50, 60, 70]]) == 280\n assert candidate(grid = [[50, 40, 30, 20, 10], [45, 41, 36, 31, 21], [40, 35, 30, 25, 15], [35, 30, 25, 20, 10], [30, 25, 20, 15, 5]]) == 201\n assert candidate(grid = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]) == 46\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [1, 2, 3, 4, 5, 1], [1, 3, 5, 7, 9, 1], [1, 5, 9, 13, 17, 1], [1, 7, 15, 21, 28, 1], [1, 1, 1, 1, 1, 1]]) == 11\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 14\n assert candidate(grid = [[5, 3, 2, 1], [1, 2, 10, 1], [4, 3, 2, 20], [7, 1, 6, 5]]) == 23\n assert candidate(grid = [[1, 5, 7, 9, 11], [2, 4, 6, 8, 10], [10, 8, 6, 4, 2], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20]]) == 64\n assert candidate(grid = [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]) == 2\n assert candidate(grid = [[9, 5, 4, 9, 6, 5, 6, 9, 8], [2, 9, 4, 7, 6, 7, 5, 7, 5], [5, 9, 9, 3, 8, 4, 7, 8, 5], [8, 4, 5, 9, 6, 7, 4, 9, 5], [6, 4, 3, 2, 7, 1, 8, 9, 5], [2, 9, 1, 5, 4, 8, 9, 1, 5], [9, 5, 5, 1, 3, 5, 1, 3, 5], [2, 9, 3, 8, 7, 5, 9, 2, 1], [9, 5, 1, 5, 3, 5, 6, 9, 5]]) == 62\n assert candidate(grid = [[1, 9, 9, 9, 9, 9, 9], [1, 1, 9, 9, 9, 9, 9], [1, 1, 1, 9, 9, 9, 9], [1, 1, 1, 1, 9, 9, 9], [1, 1, 1, 1, 1, 9, 9], [1, 1, 1, 1, 1, 1, 9], [1, 1, 1, 1, 1, 1, 1]]) == 13\n assert candidate(grid = [[9, 8, 7, 6, 5], [4, 3, 2, 1, 0], [9, 8, 7, 6, 5], [4, 3, 2, 1, 0], [9, 8, 7, 6, 5]]) == 29\n assert candidate(grid = [[0, 1, 2, 3, 4], [4, 3, 2, 1, 0], [0, 1, 2, 3, 4], [4, 3, 2, 1, 0], [0, 1, 2, 3, 4]]) == 14\n assert candidate(grid = [[1, 2, 3], [6, 5, 4], [7, 8, 9]]) == 19\n assert candidate(grid = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]) == 33\n assert candidate(grid = [[1, 3, 5, 7, 9, 11], [2, 4, 6, 8, 10, 12], [13, 15, 17, 19, 21, 23], [24, 22, 20, 18, 16, 14]]) == 80\n assert candidate(grid = [[9, 1, 4, 8, 7], [6, 5, 3, 2, 1], [9, 1, 4, 8, 7], [6, 5, 3, 2, 1], [9, 1, 4, 8, 7]]) == 33\n assert candidate(grid = [[20, 30, 40], [5, 15, 25], [10, 20, 30], [1, 2, 3]]) == 41\n assert candidate(grid = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]]) == 75\n assert candidate(grid = [[0, 1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1, 0], [1, 3, 5, 7, 9, 11, 13], [13, 11, 9, 7, 5, 3, 1], [0, 2, 4, 6, 8, 10, 12]]) == 38\n assert candidate(grid = [[9, 8, 7, 6, 5], [4, 3, 2, 1, 0], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [9, 8, 7, 6, 5]]) == 37\n assert candidate(grid = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) == 9\n assert candidate(grid = [[10, 15, 20, 25], [30, 35, 40, 45], [50, 55, 60, 65], [70, 75, 80, 85], [90, 95, 100, 105]]) == 370\n assert candidate(grid = [[1, 3, 20, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]]) == 11\n assert candidate(grid = [[7, 5, 12, 6, 8], [9, 6, 10, 3, 7], [8, 15, 4, 2, 9], [7, 11, 12, 5, 3], [6, 10, 7, 4, 8]]) == 49\n assert candidate(grid = [[7, 1, 3, 4, 1], [2, 1, 3, 1, 1], [1, 5, 1, 2, 2], [3, 2, 4, 3, 2], [4, 1, 5, 2, 3]]) == 21\n assert candidate(grid = [[1, 4, 5, 2, 3], [1, 2, 8, 9, 3], [3, 7, 6, 2, 1], [5, 5, 4, 2, 3]]) == 22\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 3, 4, 3, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]]) == 13\n assert candidate(grid = [[1, 3, 5, 7, 9, 11, 13], [2, 4, 6, 8, 10, 12, 14], [13, 11, 9, 7, 5, 3, 1], [14, 12, 10, 8, 6, 4, 2], [15, 17, 19, 21, 23, 25, 27]]) == 66\n assert candidate(grid = [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6]]) == 26\n assert candidate(grid = [[1, 5, 3], [2, 9, 4], [5, 6, 7], [8, 9, 10]]) == 30\n assert candidate(grid = [[5, 4, 3, 2, 1], [4, 3, 2, 1, 5], [3, 2, 1, 5, 4], [2, 1, 5, 4, 3], [1, 5, 4, 3, 2]]) == 29\n assert candidate(grid = [[1, 9, 1, 9, 1, 9], [9, 1, 9, 1, 9, 1], [1, 9, 1, 9, 1, 9], [9, 1, 9, 1, 9, 1], [1, 9, 1, 9, 1, 9]]) == 50\n assert candidate(grid = [[1, 3, 1, 5], [2, 1, 2, 1], [5, 3, 1, 1], [4, 2, 1, 1]]) == 9\n assert candidate(grid = [[0, 3, 1, 2, 9], [3, 4, 1, 3, 8], [5, 6, 7, 8, 9], [1, 9, 8, 7, 6], [9, 8, 7, 6, 5]]) == 34\n assert candidate(grid = [[200, 0, 0, 0], [0, 200, 0, 0], [0, 0, 200, 0], [0, 0, 0, 200]]) == 400\n assert candidate(grid = [[1, 1, 1, 1, 1], [1, 2, 2, 2, 1], [1, 2, 3, 2, 1], [1, 2, 2, 2, 1], [1, 1, 1, 1, 1]]) == 9\n assert candidate(grid = [[1], [1], [1], [1], [1]]) == 5\n assert candidate(grid = [[10, 3, 12, 5, 8], [7, 4, 6, 9, 2], [1, 14, 11, 13, 7], [15, 8, 10, 4, 12], [9, 6, 3, 16, 5]]) == 58\n assert candidate(grid = [[9, 1, 4, 8, 7], [6, 3, 5, 9, 2], [2, 8, 0, 1, 5], [3, 6, 9, 4, 6], [6, 8, 2, 4, 0]]) == 27\n assert candidate(grid = [[2, 1, 2, 5, 1, 2], [5, 2, 3, 1, 3, 5], [1, 1, 2, 1, 2, 1], [2, 1, 1, 1, 1, 1], [1, 1, 2, 3, 1, 1]]) == 12\n assert candidate(grid = [[5, 3, 2, 1], [6, 7, 8, 9], [1, 2, 3, 4], [5, 4, 3, 2]]) == 22\n assert candidate(grid = [[1, 2, 5], [3, 1, 1], [1, 5, 1]]) == 6\n assert candidate(grid = [[1, 9, 9, 9, 9], [1, 1, 9, 9, 9], [1, 1, 1, 9, 9], [1, 1, 1, 1, 9], [1, 1, 1, 1, 1]]) == 9\n assert candidate(grid = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 3, 5, 7, 9], [9, 7, 5, 3, 1], [2, 4, 6, 8, 10]]) == 32\n assert candidate(grid = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) == 0\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == 11\n assert candidate(grid = [[10, 33, 14, 7, 24], [13, 4, 7, 6, 23], [6, 15, 66, 3, 18], [8, 41, 9, 12, 32], [1, 5, 3, 9, 20]]) == 75\n assert candidate(grid = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == 85\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 12\n assert candidate(grid = [[1, 3, 8, 7, 3, 6], [1, 1, 7, 1, 2, 8], [4, 9, 10, 5, 1, 6], [6, 7, 2, 8, 2, 5], [3, 4, 9, 1, 8, 4]]) == 25\n assert candidate(grid = [[1, 3, 1, 1], [1, 5, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]) == 7\n assert candidate(grid = [[1, 9, 1, 9, 1, 9, 1], [9, 1, 9, 1, 9, 1, 9], [1, 9, 1, 9, 1, 9, 1], [9, 1, 9, 1, 9, 1, 9], [1, 9, 1, 9, 1, 9, 1], [9, 1, 9, 1, 9, 1, 9], [1, 9, 1, 9, 1, 9, 1]]) == 61\n assert candidate(grid = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [3, 5, 7, 9, 11], [4, 6, 8, 10, 12], [5, 7, 9, 11, 13]]) == 55\n assert candidate(grid = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 0\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == 10\n assert candidate(grid = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]) == 7\n assert candidate(grid = [[10, 11, 12, 13], [14, 15, 16, 17], [18, 19, 20, 21], [22, 23, 24, 25]]) == 109\n assert candidate(grid = [[7, 8, 9, 10, 11, 12], [6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12]]) == 46\n assert candidate(grid = [[5, 3, 2, 7], [8, 6, 4, 3], [1, 2, 6, 5], [9, 7, 4, 8]]) == 30\n", "comparison": "exact"}, "public_tests": ["[[1,3,1],[1,5,1],[4,2,1]]", "[[1,2,3],[4,5,6]]"], "hints": [], "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().minPathSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:51+00:00", "tests_total": 77, "tests_dropped": 3, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def min_path_sum(grid)", "container": null, "callable": "min_path_sum", "parameters": [{"name": "grid", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 65, "task_id": "valid-number", "difficulty": "Hard", "problem_description": "Given a string s, return whether s is a valid number.\nFor example, all the following are valid numbers: \"2\", \"0089\", \"-0.1\", \"+3.14\", \"4.\", \"-.9\", \"2e10\", \"-90E3\", \"3e+7\", \"+6e-1\", \"53.5e93\", \"-123.456e789\", while the following are not valid numbers: \"abc\", \"1a\", \"1e\", \"e3\", \"99e2.5\", \"--6\", \"-+3\", \"95a54e53\".\n\nFormally, a valid number is defined using one of the following definitions:\n\n1. An integer number followed by an optional exponent.\n2. A decimal number followed by an optional exponent.\n\nAn integer number is defined with an optional sign '-' or '+' followed by digits.\n\nA decimal number is defined with an optional sign '-' or '+' followed by one of the following definitions:\n\n1. Digits followed by a dot '.'.\n2. Digits followed by a dot '.' followed by digits.\n3. A dot '.' followed by digits.\n\nAn exponent is defined with an exponent notation 'e' or 'E' followed by an integer number.\n\nThe digits are defined as one or more digits.\n\nExample 1:\n\nInput: s = \"0\"\nOutput: true\n\nExample 2:\n\nInput: s = \"e\"\nOutput: false\n\nExample 3:\n\nInput: s = \".\"\nOutput: false\n\nConstraints:\n\n- 1 <= s.length <= 20\n- s consists of only English letters (both uppercase and lowercase), digits (0-9), plus '+', minus '-', or dot '.'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"0089\") == True\n assert candidate(s = \"-123.456e789\") == True\n assert candidate(s = \"95a54e53\") == False\n assert candidate(s = \"e3\") == False\n assert candidate(s = \"4.\") == True\n assert candidate(s = \"2e10\") == True\n assert candidate(s = \"1a\") == False\n assert candidate(s = \"-+3\") == False\n assert candidate(s = \"0\") == True\n assert candidate(s = \"99e2.5\") == False\n assert candidate(s = \".\") == False\n assert candidate(s = \"-.9\") == True\n assert candidate(s = \"3e+7\") == True\n assert candidate(s = \"-90E3\") == True\n assert candidate(s = \"+3.14\") == True\n assert candidate(s = \"abc\") == False\n assert candidate(s = \"+6e-1\") == True\n assert candidate(s = \"53.5e93\") == True\n assert candidate(s = \"-0.1\") == True\n assert candidate(s = \"2\") == True\n assert candidate(s = \"1e\") == False\n assert candidate(s = \"--6\") == False\n assert candidate(s = \"e\") == False\n assert candidate(s = \"-.e+1\") == False\n assert candidate(s = \"e+10\") == False\n assert candidate(s = \"1..\") == False\n assert candidate(s = \"-e\") == False\n assert candidate(s = \"1+1e1\") == False\n assert candidate(s = \"1e+1.e-\") == False\n assert candidate(s = \"1.2.3\") == False\n assert candidate(s = \"1E1E1\") == False\n assert candidate(s = \"1.2e+2e3\") == False\n assert candidate(s = \"--123\") == False\n assert candidate(s = \"-1.0e+0\") == True\n assert candidate(s = \".1e10\") == True\n assert candidate(s = \"1e+308\") == True\n assert candidate(s = \"-e1\") == False\n assert candidate(s = \"1.e2.e3\") == False\n assert candidate(s = \"e.1\") == False\n assert candidate(s = \"1e+1.e+2e3\") == False\n assert candidate(s = \"1.e+2e+3e-4\") == False\n assert candidate(s = \"1e+1.e+.3\") == False\n assert candidate(s = \"0.000001\") == True\n assert candidate(s = \"1.0e+0\") == True\n assert candidate(s = \"1.e+2e+3e+4\") == False\n assert candidate(s = \"1.e2.3\") == False\n assert candidate(s = \"0.000000001\") == True\n assert candidate(s = \"-00000.00000E+00000\") == True\n assert candidate(s = \"1e1000\") == True\n assert candidate(s = \"1e+1.e\") == False\n assert candidate(s = \"1e+1.e+\") == False\n assert candidate(s = \"1.2e-+3\") == False\n assert candidate(s = \"1e+1.e-2\") == False\n assert candidate(s = \"1e+1.e+2.3e4\") == False\n assert candidate(s = \"1e+1.e2.3\") == False\n assert candidate(s = \"1e+1.e+1.e2e\") == False\n assert candidate(s = \"2.e5\") == True\n assert candidate(s = \"3.14159E+0\") == True\n assert candidate(s = \"1.2e2.3\") == False\n assert candidate(s = \"-6.02214076E+23\") == True\n assert candidate(s = \"+0E-0\") == True\n assert candidate(s = \"1e+1.e+2\") == False\n assert candidate(s = \"1.e+2e3\") == False\n assert candidate(s = \"1.e-+2\") == False\n assert candidate(s = \"-0.e-1\") == True\n assert candidate(s = \"-1.2.3e4\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5\") == False\n assert candidate(s = \"1.e+2e-3\") == False\n assert candidate(s = \"+\") == False\n assert candidate(s = \"e10\") == False\n assert candidate(s = \"1e+1e\") == False\n assert candidate(s = \"9.87654321E+123\") == True\n assert candidate(s = \"e-\") == False\n assert candidate(s = \".0e-0\") == True\n assert candidate(s = \"-1.e2\") == True\n assert candidate(s = \"1e-e\") == False\n assert candidate(s = \"+.e+2\") == False\n assert candidate(s = \"1e+-\") == False\n assert candidate(s = \"-+3.14159\") == False\n assert candidate(s = \"1..2\") == False\n assert candidate(s = \"-0.0001\") == True\n assert candidate(s = \"0e0\") == True\n assert candidate(s = \"-1e-99\") == True\n assert candidate(s = \"1e+1.e+1.e+2.3e4\") == False\n assert candidate(s = \"1.e+2e+3\") == False\n assert candidate(s = \"-1.e-1000\") == True\n assert candidate(s = \".000000000000000000\") == True\n assert candidate(s = \"1e+1.e+1.e+\") == False\n assert candidate(s = \"1.2e-3.2\") == False\n assert candidate(s = \"1e+1.e+1.e+.3\") == False\n assert candidate(s = \"e-.\") == False\n assert candidate(s = \"-1e-20\") == True\n assert candidate(s = \"1e+99\") == True\n assert candidate(s = \"1e+1.e2\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e+7\") == False\n assert candidate(s = \"6.02214076E+23\") == True\n assert candidate(s = \"e.e\") == False\n assert candidate(s = \"-1E-10\") == True\n assert candidate(s = \".e1\") == False\n assert candidate(s = \"+1.e+2\") == True\n assert candidate(s = \"1e+1.e+-\") == False\n assert candidate(s = \"2e0\") == True\n assert candidate(s = \"e+\") == False\n assert candidate(s = \"-e-\") == False\n assert candidate(s = \"+.e\") == False\n assert candidate(s = \"1e+1.e+1.e+1.e+.3\") == False\n assert candidate(s = \"-9.e-10\") == True\n assert candidate(s = \"1e+1.e+1.e+1.e2\") == False\n assert candidate(s = \"1e+1.e+1.e+1.e+2\") == False\n assert candidate(s = \".1234567890e+123\") == True\n assert candidate(s = \"1e2.3\") == False\n assert candidate(s = \"1e+1.e+1.e\") == False\n assert candidate(s = \"123.456e+789.0\") == False\n assert candidate(s = \"-3.14159E+0\") == True\n assert candidate(s = \"1e+1e-1\") == False\n assert candidate(s = \"1e+2+3\") == False\n assert candidate(s = \"-.\") == False\n assert candidate(s = \"1e+1.e+1.e+2e3\") == False\n assert candidate(s = \"+.e+1\") == False\n assert candidate(s = \"0e-0\") == True\n assert candidate(s = \"1E+10\") == True\n assert candidate(s = \"1.0e+10\") == True\n assert candidate(s = \"1e+1.e+1.e-\") == False\n assert candidate(s = \"+1.2.3\") == False\n assert candidate(s = \"12345678901234567890\") == True\n assert candidate(s = \".0e1\") == True\n assert candidate(s = \"1e+1.e+1.e+-\") == False\n assert candidate(s = \"0.e+0\") == True\n assert candidate(s = \"+0000.0000E-0000\") == True\n assert candidate(s = \"1e+1.e+1e2\") == False\n assert candidate(s = \"e+-\") == False\n assert candidate(s = \"+.e-1\") == False\n assert candidate(s = \"1e+1.e+1.e+1e2\") == False\n assert candidate(s = \"1e+e\") == False\n assert candidate(s = \"1e+.2\") == False\n assert candidate(s = \"+.123E+45\") == True\n assert candidate(s = \"+.8\") == True\n assert candidate(s = \"1e0\") == True\n assert candidate(s = \"1E+20\") == True\n assert candidate(s = \"-00.000000e-0000\") == True\n assert candidate(s = \"1e-+2\") == False\n assert candidate(s = \"5.\") == True\n assert candidate(s = \"0000123.000456\") == True\n assert candidate(s = \"1e+1.e+1.e-2\") == False\n assert candidate(s = \".e\") == False\n assert candidate(s = \"1e+1.e+1.e+1.e-2\") == False\n assert candidate(s = \"1e2+3\") == False\n assert candidate(s = \"1e+2e\") == False\n assert candidate(s = \"e+e\") == False\n assert candidate(s = \"e-1\") == False\n assert candidate(s = \"1e+1.2\") == False\n assert candidate(s = \".0e+0\") == True\n assert candidate(s = \"123e\") == False\n assert candidate(s = \"1e+1.e+1.e+1.e2e\") == False\n assert candidate(s = \"1e-0\") == True\n assert candidate(s = \"0.E-00000\") == True\n assert candidate(s = \"1.e+2e+3e+4e+5e-6\") == False\n assert candidate(s = \".0000000000000000001\") == True\n assert candidate(s = \"0.000000000000000001\") == True\n assert candidate(s = \"1e++2\") == False\n assert candidate(s = \"1e2e3\") == False\n assert candidate(s = \"1e+1.e+1.e+1.e\") == False\n assert candidate(s = \".0\") == True\n assert candidate(s = \"00000.00000e+00000\") == True\n assert candidate(s = \"1e.+2\") == False\n assert candidate(s = \"1.234567890123456789\") == True\n assert candidate(s = \"1e+1.e+1.e+1.e+2.3e4\") == False\n assert candidate(s = \"1.e+1\") == True\n assert candidate(s = \"+.e+\") == False\n assert candidate(s = \"1e--2\") == False\n assert candidate(s = \"1.e+2e+3e+4e-5\") == False\n assert candidate(s = \"e.\") == False\n assert candidate(s = \"123.456.789\") == False\n assert candidate(s = \"1.e-1\") == True\n assert candidate(s = \"1.2e+2.e3\") == False\n assert candidate(s = \"-.e-1\") == False\n assert candidate(s = \".e-10\") == False\n assert candidate(s = \"0.e-0\") == True\n assert candidate(s = \"1e-+\") == False\n assert candidate(s = \"+.0\") == True\n assert candidate(s = \"1e+1e+2\") == False\n assert candidate(s = \"1.e+2e+3e+4e+5e+6\") == False\n assert candidate(s = \"00000.00000e-00000\") == True\n assert candidate(s = \"1.e+2.3\") == False\n assert candidate(s = \"+1e-10\") == True\n assert candidate(s = \"1e+-2\") == False\n assert candidate(s = \"1e.e\") == False\n assert candidate(s = \"1e+1.e+1.e2\") == False\n assert candidate(s = \"1e+1.e+1.e+2\") == False\n assert candidate(s = \"1e-.2\") == False\n assert candidate(s = \"00000000000000000000\") == True\n assert candidate(s = \"1.2e-3e2\") == False\n assert candidate(s = \".e-\") == False\n assert candidate(s = \"1.23.45\") == False\n assert candidate(s = \"1.e+2.e3\") == False\n assert candidate(s = \"3.141592653589793\") == True\n assert candidate(s = \"123E123E123\") == False\n assert candidate(s = \"-9.87654321E-123\") == True\n assert candidate(s = \"+0.E+0\") == True\n assert candidate(s = \"123e-456\") == True\n assert candidate(s = \"-9.87654321e-987\") == True\n assert candidate(s = \"-\") == False\n assert candidate(s = \"0e+0\") == True\n assert candidate(s = \"1.234E+10\") == True\n assert candidate(s = \"1e-308\") == True\n assert candidate(s = \"1e-+1\") == False\n assert candidate(s = \"000000.000000e0000\") == True\n assert candidate(s = \"1.0E+1.0\") == False\n assert candidate(s = \"000000000\") == True\n assert candidate(s = \"1.e\") == False\n assert candidate(s = \"-.e-2\") == False\n assert candidate(s = \"1.e+-2\") == False\n assert candidate(s = \"+-123\") == False\n assert candidate(s = \"1.2e+2.3\") == False\n assert candidate(s = \"e1\") == False\n assert candidate(s = \"1.234e+10\") == True\n assert candidate(s = \"1.e+2e+3e+4e+5e+6e-7\") == False\n assert candidate(s = \".1234567890\") == True\n assert candidate(s = \"1.e+\") == False\n assert candidate(s = \"9.9e99\") == True\n assert candidate(s = \"123.e+10\") == True\n assert candidate(s = \"1.e+2.3e4\") == False\n assert candidate(s = \"1e+\") == False\n assert candidate(s = \"1e.-2\") == False\n assert candidate(s = \"1.e+.3\") == False\n assert candidate(s = \"3.14159E-10\") == True\n assert candidate(s = \"0e-5\") == True\n assert candidate(s = \"-0000.0000E+0000\") == True\n assert candidate(s = \".e+\") == False\n assert candidate(s = \"e+1e2\") == False\n assert candidate(s = \"1e+1.e2e\") == False\n assert candidate(s = \"+.\") == False\n assert candidate(s = \"1e+1.e+1.e+1.e+2e3\") == False\n assert candidate(s = \"+.1e1\") == True\n assert candidate(s = \"0.0000001e+10\") == True\n assert candidate(s = \"1.2.3.4\") == False\n assert candidate(s = \"2e-300\") == True\n assert candidate(s = \"-1.e-2\") == True\n assert candidate(s = \"4.2e\") == False\n", "comparison": "exact"}, "public_tests": ["\"0\"", "\"e\"", "\".\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().isNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:54+00:00", "tests_total": 306, "tests_dropped": 67, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def is_number(s)", "container": null, "callable": "is_number", "parameters": [{"name": "s", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 66, "task_id": "plus-one", "difficulty": "Easy", "problem_description": "You are given a large integer represented as an integer array digits, where each digits[i] is the i^th digit of the integer. The digits are ordered from most significant to least significant in left-to-right order. The large integer does not contain any leading 0's.\n\nIncrement the large integer by one and return the resulting array of digits.\n\nExample 1:\n\nInput: digits = [1,2,3]\nOutput: [1,2,4]\nExplanation: The array represents the integer 123.\nIncrementing by one gives 123 + 1 = 124.\nThus, the result should be [1,2,4].\n\nExample 2:\n\nInput: digits = [4,3,2,1]\nOutput: [4,3,2,2]\nExplanation: The array represents the integer 4321.\nIncrementing by one gives 4321 + 1 = 4322.\nThus, the result should be [4,3,2,2].\n\nExample 3:\n\nInput: digits = [9]\nOutput: [1,0]\nExplanation: The array represents the integer 9.\nIncrementing by one gives 9 + 1 = 10.\nThus, the result should be [1,0].\n\nConstraints:\n\n- 1 <= digits.length <= 100\n- 0 <= digits[i] <= 9\n- digits does not contain any leading 0's.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(digits = [5, 8, 9, 9, 9]) == [5, 9, 0, 0, 0]\n assert candidate(digits = [2, 0, 0, 0, 0]) == [2, 0, 0, 0, 1]\n assert candidate(digits = [1, 0, 0, 0]) == [1, 0, 0, 1]\n assert candidate(digits = [1, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [2, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 2, 3]) == [1, 2, 4]\n assert candidate(digits = [1, 2, 9]) == [1, 3, 0]\n assert candidate(digits = [9]) == [1, 0]\n assert candidate(digits = [2, 9, 9]) == [3, 0, 0]\n assert candidate(digits = [5, 6, 7, 8, 9]) == [5, 6, 7, 9, 0]\n assert candidate(digits = [4, 3, 2, 1]) == [4, 3, 2, 2]\n assert candidate(digits = [0]) == [1]\n assert candidate(digits = [1, 0, 0]) == [1, 0, 1]\n assert candidate(digits = [1, 9, 9, 9, 9]) == [2, 0, 0, 0, 0]\n assert candidate(digits = [5, 6, 8, 6, 9, 9, 4, 9, 3, 9]) == [5, 6, 8, 6, 9, 9, 4, 9, 4, 0]\n assert candidate(digits = [0, 0, 0, 1]) == [0, 0, 0, 2]\n assert candidate(digits = [9, 9, 9]) == [1, 0, 0, 0]\n assert candidate(digits = [1, 9, 9]) == [2, 0, 0]\n assert candidate(digits = [8, 9, 9, 9]) == [9, 0, 0, 0]\n assert candidate(digits = [1, 8, 6, 4, 5, 2, 3, 7, 9, 1]) == [1, 8, 6, 4, 5, 2, 3, 7, 9, 2]\n assert candidate(digits = [1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7]\n assert candidate(digits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 2]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5]) == [5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 6]\n assert candidate(digits = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [8, 9, 9, 9, 9, 9, 9, 9, 9, 8, 9]) == [8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0]\n assert candidate(digits = [9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [1, 8, 7, 6, 5, 4, 3, 2, 1, 1]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 9, 0]\n assert candidate(digits = [3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3]) == [3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 4]\n assert candidate(digits = [0, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [2, 4, 9, 9, 9, 9, 9, 9, 9, 9]) == [2, 5, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [9, 0, 9, 0, 9, 0, 9, 0, 9, 0]) == [9, 0, 9, 0, 9, 0, 9, 0, 9, 1]\n assert candidate(digits = [0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1]\n assert candidate(digits = [2, 5, 9, 9, 9, 9, 9]) == [2, 6, 0, 0, 0, 0, 0]\n assert candidate(digits = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 0]\n assert candidate(digits = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [5, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3]) == [4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 4]\n assert candidate(digits = [8, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [9, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [2, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [3, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 9]) == [1, 2, 3, 4, 5, 6, 7, 9, 0, 0]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [1, 2, 3, 4, 5, 6, 7, 9, 0]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9]) == [8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 9, 0]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]\n assert candidate(digits = [2, 4, 6, 8, 0, 1, 3, 5, 7, 9]) == [2, 4, 6, 8, 0, 1, 3, 5, 8, 0]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4]\n assert candidate(digits = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == [1, 0, 1, 0, 1, 0, 1, 0, 1, 1]\n assert candidate(digits = [1, 0, 0, 0, 0]) == [1, 0, 0, 0, 1]\n assert candidate(digits = [1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8]\n assert candidate(digits = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [7, 8, 9, 9, 9, 9, 9, 9, 9, 8, 7]) == [7, 8, 9, 9, 9, 9, 9, 9, 9, 8, 8]\n assert candidate(digits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]\n assert candidate(digits = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(digits = [5, 9, 5, 9, 5, 9, 5, 9, 5, 9]) == [5, 9, 5, 9, 5, 9, 5, 9, 6, 0]\n assert candidate(digits = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 1]\n assert candidate(digits = [0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0]) == [0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1]\n assert candidate(digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]\n assert candidate(digits = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7, 7, 7, 7, 7, 7, 7, 7, 7, 8]\n", "comparison": "exact"}, "public_tests": ["[1,2,3]", "[4,3,2,1]", "[9]"], "hints": [], "metadata": {"canonical_parameter_names": ["digits"], "leetcode_dataset_entry_point": "Solution().plusOne", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:56+00:00", "tests_total": 77, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "math"]}, "language": "ruby", "interface": {"raw_signature": "def plus_one(digits)", "container": null, "callable": "plus_one", "parameters": [{"name": "digits", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 67, "task_id": "add-binary", "difficulty": "Easy", "problem_description": "Given two binary strings a and b, return their sum as a binary string.\n\nExample 1:\n\nInput: a = \"11\", b = \"1\"\nOutput: \"100\"\n\nExample 2:\n\nInput: a = \"1010\", b = \"1011\"\nOutput: \"10101\"\n\nConstraints:\n\n- 1 <= a.length, b.length <= 10^4\n- a and b consist only of '0' or '1' characters.\n- Each string does not contain leading zeros except for the zero itself.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(a = \"11\",b = \"1\") == \"100\"\n assert candidate(a = \"1101001\",b = \"1000111\") == \"10110000\"\n assert candidate(a = \"1101\",b = \"1001\") == \"10110\"\n assert candidate(a = \"1000000000000000000000000000000\",b = \"1\") == \"1000000000000000000000000000001\"\n assert candidate(a = \"1000\",b = \"1100\") == \"10100\"\n assert candidate(a = \"1111\",b = \"1\") == \"10000\"\n assert candidate(a = \"1\",b = \"11111111\") == \"100000000\"\n assert candidate(a = \"110010\",b = \"100111\") == \"1011001\"\n assert candidate(a = \"1111\",b = \"1111\") == \"11110\"\n assert candidate(a = \"111\",b = \"111\") == \"1110\"\n assert candidate(a = \"0\",b = \"101010\") == \"101010\"\n assert candidate(a = \"1\",b = \"1\") == \"10\"\n assert candidate(a = \"1001\",b = \"10\") == \"1011\"\n assert candidate(a = \"1010\",b = \"1011\") == \"10101\"\n assert candidate(a = \"0\",b = \"0\") == \"0\"\n assert candidate(a = \"1\",b = \"0\") == \"1\"\n assert candidate(a = \"1100101\",b = \"100010\") == \"10000111\"\n assert candidate(a = \"1111111111\",b = \"1111111111\") == \"11111111110\"\n assert candidate(a = \"11111111111111111111\",b = \"10101010101010101010\") == \"110101010101010101001\"\n assert candidate(a = \"11111111111111111111\",b = \"1\") == \"100000000000000000000\"\n assert candidate(a = \"1001001001001001001001001001001001001001001001001001001001001001001001001001\",b = \"1111111111111111111111111111111111111111111111111111111111111111111111111111\") == \"11001001001001001001001001001001001001001001001001001001001001001001001001000\"\n assert candidate(a = \"1101100101\",b = \"1010011011\") == \"11000000000\"\n assert candidate(a = \"11111111111111111111111111111111\",b = \"1\") == \"100000000000000000000000000000000\"\n assert candidate(a = \"1010101010101010101010101010101010101010101010101010\",b = \"1010101010101010101010101010101010101010101010101010\") == \"10101010101010101010101010101010101010101010101010100\"\n assert candidate(a = \"11111111111111111111\",b = \"11111111111111111111\") == \"111111111111111111110\"\n assert candidate(a = \"10101010101010101010\",b = \"01010101010101010101\") == \"11111111111111111111\"\n assert candidate(a = \"11110000000000000000\",b = \"11110000000000000000\") == \"111100000000000000000\"\n assert candidate(a = \"11011010101110110001110011100001111111011000111100111101\",b = \"11101010101110110001110011100001111111011000111100111100\") == \"111000101011101100011100111000011111110110001111001111001\"\n assert candidate(a = \"1\",b = \"1111111111111111111111111111111\") == \"10000000000000000000000000000000\"\n assert candidate(a = \"1100110011001100110011001100110011001100110011001100\",b = \"1\") == \"1100110011001100110011001100110011001100110011001101\"\n assert candidate(a = \"1010101010\",b = \"1010101010\") == \"10101010100\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111111111111111\",b = \"1000000000000000000000000000000000000000000000000000000000000000\") == \"10111111111111111111111111111111111111111111111111111111111111111\"\n assert candidate(a = \"100000000000000000000000000000000\",b = \"100000000000000000000000000000000\") == \"1000000000000000000000000000000000\"\n assert candidate(a = \"10000000000000000000000000000000\",b = \"1\") == \"10000000000000000000000000000001\"\n assert candidate(a = \"10000000000000000000000000000000000000000000000000000000000000000\",b = \"1\") == \"10000000000000000000000000000000000000000000000000000000000000001\"\n assert candidate(a = \"1010101010101010101010101010\",b = \"0101010101010101010101010101\") == \"1111111111111111111111111111\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111111111111111\",b = \"10\") == \"10000000000000000000000000000000000000000000000000000000000000001\"\n assert candidate(a = \"10110110110110110110\",b = \"10011001100110011001\") == \"101010000011101001111\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111111111111111\",b = \"1111111111111111111111111111111111111111111111111111111111111111\") == \"11111111111111111111111111111111111111111111111111111111111111110\"\n assert candidate(a = \"1\",b = \"10000000000000000000000000000000\") == \"10000000000000000000000000000001\"\n assert candidate(a = \"1010101010101010101010101010101\",b = \"1010101010101010101010101010101\") == \"10101010101010101010101010101010\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111111111111111\",b = \"1\") == \"10000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(a = \"10101010101010101010101010101010\",b = \"1\") == \"10101010101010101010101010101011\"\n assert candidate(a = \"11100001110001110001110001110001\",b = \"11110000111100001111000011110000\") == \"111010010101110000000110101100001\"\n assert candidate(a = \"1\",b = \"11111111111111111111111111111111\") == \"100000000000000000000000000000000\"\n assert candidate(a = \"11000000000000000000000000000000\",b = \"11000000000000000000000000000000\") == \"110000000000000000000000000000000\"\n assert candidate(a = \"1101010101010101010101010101010101010101010101010101010101010101\",b = \"1010101010101010101010101010101010101010101010101010101010101010\") == \"10111111111111111111111111111111111111111111111111111111111111111\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111111111111111\",b = \"1000000000000000000000000000000000000000000000000000000000000001\") == \"11000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(a = \"11001100110011001100\",b = \"11110000111100001111\") == \"110111101101111011011\"\n assert candidate(a = \"11011011011011011011011011011011\",b = \"10101010101010101010101010101010\") == \"110000110000110000110000110000101\"\n assert candidate(a = \"10101010101010101010101010101010\",b = \"11111111111111111111111111111111\") == \"110101010101010101010101010101001\"\n assert candidate(a = \"10101010101010101010101010101010\",b = \"101010101010101010101010101010101\") == \"111111111111111111111111111111111\"\n assert candidate(a = \"1111111111111111111111111111110\",b = \"1\") == \"1111111111111111111111111111111\"\n assert candidate(a = \"1\",b = \"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\") == \"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001\"\n assert candidate(a = \"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\",b = \"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\") == \"1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010100\"\n assert candidate(a = \"111111111111111111111111111111111\",b = \"1\") == \"1000000000000000000000000000000000\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111\",b = \"1\") == \"10000000000000000000000000000000000000000000000000000\"\n assert candidate(a = \"1010101010101010\",b = \"0101010101010101\") == \"1111111111111111\"\n assert candidate(a = \"10000000000000000000000000000000\",b = \"11111111111111111111111111111111\") == \"101111111111111111111111111111111\"\n assert candidate(a = \"10010010010010010010010010010010\",b = \"10010010010010010010010010010010\") == \"100100100100100100100100100100100\"\n assert candidate(a = \"1010101010101010101010101010101010101010101010101010101010101010\",b = \"1010101010101010101010101010101010101010101010101010101010101010\") == \"10101010101010101010101010101010101010101010101010101010101010100\"\n assert candidate(a = \"1111000011110000\",b = \"0000111100001111\") == \"1111111111111111\"\n assert candidate(a = \"10000000000000000000\",b = \"11111111111111111111\") == \"101111111111111111111\"\n assert candidate(a = \"1000000000000000000000000000000000000000000000000000000000000000\",b = \"1000000000000000000000000000000000000000000000000000000000000001\") == \"10000000000000000000000000000000000000000000000000000000000000001\"\n assert candidate(a = \"110011001100110011001100\",b = \"001100110011001100110011\") == \"111111111111111111111111\"\n assert candidate(a = \"11001100110011001100110011001100\",b = \"11001100110011001100110011001100\") == \"110011001100110011001100110011000\"\n assert candidate(a = \"10011100111001110011100111001110\",b = \"11100011100011100011100011100011\") == \"110000000011101010111001010110001\"\n assert candidate(a = \"11000000000000000000000000000000\",b = \"1\") == \"11000000000000000000000000000001\"\n assert candidate(a = \"10000000000000000000\",b = \"10000000000000000000\") == \"100000000000000000000\"\n assert candidate(a = \"1110001110001110\",b = \"0001110001110001\") == \"1111111111111111\"\n assert candidate(a = \"11001100110011001100110011001100110011001100110011001100110011001100\",b = \"1010101010101010101010101010101010101010101010101010101010101010101\") == \"100100010001000100010001000100010001000100010001000100010001000100001\"\n assert candidate(a = \"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\",b = \"1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111\") == \"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110\"\n assert candidate(a = \"11001100110011001100\",b = \"11001100110011001100\") == \"110011001100110011000\"\n assert candidate(a = \"11111111111111111111111111111111\",b = \"11111111111111111111111111111111\") == \"111111111111111111111111111111110\"\n assert candidate(a = \"10101010101010101010\",b = \"10101010101010101010\") == \"101010101010101010100\"\n assert candidate(a = \"11011011011011011011\",b = \"10010010010010010010\") == \"101101101101101101101\"\n assert candidate(a = \"1\",b = \"1100000000000000000000000000000000000000000000000000000000000000\") == \"1100000000000000000000000000000000000000000000000000000000000001\"\n assert candidate(a = \"1100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110011001100110\",b = \"10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\") == \"1100110011100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010001000100010000\"\n assert candidate(a = \"10110110110110110110\",b = \"01001001001001001001\") == \"11111111111111111111\"\n assert candidate(a = \"1000000000000000000000000000000\",b = \"1000000000000000000000000000000\") == \"10000000000000000000000000000000\"\n assert candidate(a = \"11100011100011100011100011100011\",b = \"11100011100011100011100011100011\") == \"111000111000111000111000111000110\"\n assert candidate(a = \"10101010101010101010101010101010\",b = \"10101010101010101010101010101010\") == \"101010101010101010101010101010100\"\n assert candidate(a = \"11010101010101010101\",b = \"10101010101010101010\") == \"101111111111111111111\"\n assert candidate(a = \"10101010101010101010101010101010101010101010101010101010101010101\",b = \"10101010101010101010101010101010101010101010101010101010101010101\") == \"101010101010101010101010101010101010101010101010101010101010101010\"\n assert candidate(a = \"1111111111\",b = \"1\") == \"10000000000\"\n assert candidate(a = \"1101010101010101010101010101010101010101010101010101010101010101\",b = \"1010101010101010101010101010101010101010101010101010101010101011\") == \"11000000000000000000000000000000000000000000000000000000000000000\"\n", "comparison": "exact"}, "public_tests": ["\"11\"\n\"1\"", "\"1010\"\n\"1011\""], "hints": [], "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().addBinary", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:37:58+00:00", "tests_total": 86, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "bit-manipulation", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def add_binary(a, b)", "container": null, "callable": "add_binary", "parameters": [{"name": "a", "type": "String"}, {"name": "b", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 68, "task_id": "text-justification", "difficulty": "Hard", "problem_description": "Given an array of strings words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified.\n\nYou should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces ' ' when necessary so that each line has exactly maxWidth characters.\n\nExtra spaces between words should be distributed as evenly as possible. If the number of spaces on a line does not divide evenly between words, the empty slots on the left will be assigned more spaces than the slots on the right.\n\nFor the last line of text, it should be left-justified, and no extra space is inserted between words.\n\nNote:\n\n- A word is defined as a character sequence consisting of non-space characters only.\n- Each word's length is guaranteed to be greater than 0 and not exceed maxWidth.\n- The input array words contains at least one word.\n\nExample 1:\n\nInput: words = [\"This\", \"is\", \"an\", \"example\", \"of\", \"text\", \"justification.\"], maxWidth = 16\nOutput:\n[\n \"This is an\",\n \"example of text\",\n \"justification. \"\n]\n\nExample 2:\n\nInput: words = [\"What\",\"must\",\"be\",\"acknowledgment\",\"shall\",\"be\"], maxWidth = 16\nOutput:\n[\n \"What must be\",\n \"acknowledgment \",\n \"shall be \"\n]\nExplanation: Note that the last line is \"shall be \" instead of \"shall be\", because the last line must be left-justified instead of fully-justified.\nNote that the second line is also left-justified because it contains only one word.\n\nExample 3:\n\nInput: words = [\"Science\",\"is\",\"what\",\"we\",\"understand\",\"well\",\"enough\",\"to\",\"explain\",\"to\",\"a\",\"computer.\",\"Art\",\"is\",\"everything\",\"else\",\"we\",\"do\"], maxWidth = 20\nOutput:\n[\n \"Science is what we\",\n \"understand well\",\n \"enough to explain to\",\n \"a computer. Art is\",\n \"everything else we\",\n \"do \"\n]\n\nConstraints:\n\n- 1 <= words.length <= 300\n- 1 <= words[i].length <= 20\n- words[i] consists of only English letters and symbols.\n- 1 <= maxWidth <= 100\n- words[i].length <= maxWidth\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['Try', 'your', 'best', 'to', 'be', 'like', 'them', 'at', 'best', 'you', 'can', 'be', 'like', 'them.'],maxWidth = 20) == ['Try your best to be', 'like them at best', 'you can be like', 'them. ']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e'],maxWidth = 3) == ['a b', 'c d', 'e ']\n assert candidate(words = ['What', 'must', 'be', 'acknowledgment', 'shall', 'be'],maxWidth = 16) == ['What must be', 'acknowledgment ', 'shall be ']\n assert candidate(words = ['Listen', 'to', 'many', 'people', 'so', 'that', 'you', 'can', 'speak', 'to', 'none.'],maxWidth = 15) == ['Listen to many', 'people so that', 'you can speak', 'to none. ']\n assert candidate(words = ['short', 'longwordhere', 'longwordhere', 'short'],maxWidth = 20) == ['short longwordhere', 'longwordhere short ']\n assert candidate(words = ['a'],maxWidth = 2) == ['a ']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e'],maxWidth = 3) == ['a b', 'c d', 'e ']\n assert candidate(words = ['Science', 'is', 'what', 'we', 'understand', 'well', 'enough', 'to', 'explain', 'to', 'a', 'computer.', 'Art', 'is', 'everything', 'else', 'we', 'do'],maxWidth = 20) == ['Science is what we', 'understand well', 'enough to explain to', 'a computer. Art is', 'everything else we', 'do ']\n assert candidate(words = ['Listen', 'to', 'many', 'people', 'so', 'you', 'can', 'speak', 'to', 'all', 'people'],maxWidth = 7) == ['Listen ', 'to many', 'people ', 'so you', 'can ', 'speak ', 'to all', 'people ']\n assert candidate(words = ['This', 'is', 'an', 'example', 'of', 'text', 'justification.'],maxWidth = 16) == ['This is an', 'example of text', 'justification. ']\n assert candidate(words = ['Lorem', 'ipsum', 'dolor', 'sit', 'amet,', 'consectetur', 'adipiscing', 'elit.', 'Vestibulum', 'bibendum', 'porttitor', 'diam,'],maxWidth = 20) == ['Lorem ipsum dolor', 'sit amet,', 'consectetur ', 'adipiscing elit.', 'Vestibulum bibendum', 'porttitor diam, ']\n assert candidate(words = ['Even', 'though', 'the', 'path', 'may', 'seem', 'long', 'and', 'difficult.'],maxWidth = 18) == ['Even though the', 'path may seem long', 'and difficult. ']\n assert candidate(words = ['Longer', 'words', 'and', 'evenlongerwords', 'are', 'here'],maxWidth = 25) == ['Longer words and', 'evenlongerwords are here ']\n assert candidate(words = ['Pack', 'my', 'box', 'with', 'five', 'dozen', 'liquor', 'jugs'],maxWidth = 20) == ['Pack my box with', 'five dozen liquor', 'jugs ']\n assert candidate(words = ['In', 'the', 'middle', 'of', 'the', 'night', 'the', 'old', 'owl', 'wisely', 'spread', 'his', 'wings'],maxWidth = 35) == ['In the middle of the night the old', 'owl wisely spread his wings ']\n assert candidate(words = ['Do', 'what', 'you', 'can', 'with', 'all', 'you', 'have,', 'wherever', 'you', 'are.'],maxWidth = 23) == ['Do what you can with', 'all you have, wherever', 'you are. ']\n assert candidate(words = ['Keep', 'your', 'face', 'always', 'toward', 'the', 'sunset.'],maxWidth = 21) == ['Keep your face always', 'toward the sunset. ']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't'],maxWidth = 5) == ['a b c', 'd e f', 'g h i', 'j k l', 'm n o', 'p q r', 's t ']\n assert candidate(words = ['Look', 'into', 'the', 'distance', 'where', 'you', 'can', 'see', 'the', 'futuristic', 'cityscape'],maxWidth = 35) == ['Look into the distance where you', 'can see the futuristic cityscape ']\n assert candidate(words = ['Why', 'do', 'we', 'fall', 'ape', 'not', 'to', 'rise'],maxWidth = 8) == ['Why do', 'we fall', 'ape not', 'to rise ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be', 'that', 'is', 'the', 'question'],maxWidth = 12) == ['To be or not', 'to be that', 'is the', 'question ']\n assert candidate(words = ['Listen', 'to', 'many,', 'speak', 'to', 'a', 'few.'],maxWidth = 15) == ['Listen to many,', 'speak to a few.']\n assert candidate(words = ['Success', 'is', 'not', 'final,', 'failure', 'is', 'not', 'fatal:', 'It', 'is', 'the', 'courage', 'to', 'continue', 'that', 'counts.'],maxWidth = 25) == ['Success is not final,', 'failure is not fatal: It', 'is the courage to', 'continue that counts. ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be', 'that', 'is', 'the', 'question'],maxWidth = 15) == ['To be or not to', 'be that is the', 'question ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be,that', 'is', 'the', 'question:'],maxWidth = 10) == ['To be or', 'not to', 'be,that is', 'the ', 'question: ']\n assert candidate(words = ['Python', 'programming', 'is', 'fun,and', 'effective.'],maxWidth = 25) == ['Python programming is', 'fun,and effective. ']\n assert candidate(words = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'],maxWidth = 5) == ['A B C', 'D E F', 'G H I', 'J ']\n assert candidate(words = ['Programming', 'is', 'not', 'about', 'what', 'you', 'know;', 'it', 'is', 'about', 'what', 'you', 'can', 'figure', 'out.'],maxWidth = 25) == ['Programming is not about', 'what you know; it is', 'about what you can figure', 'out. ']\n assert candidate(words = ['One', 'ring', 'to', 'rule', 'them', 'all,', 'One', 'ring', 'to', 'find', 'them.'],maxWidth = 18) == ['One ring to rule', 'them all, One ring', 'to find them. ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be,', 'that', 'is', 'the', 'question:'],maxWidth = 25) == ['To be or not to be, that', 'is the question: ']\n assert candidate(words = ['Left', 'justified', 'line'],maxWidth = 30) == ['Left justified line ']\n assert candidate(words = ['In', 'order', 'to', 'write', 'about', 'life,', 'one', 'must', 'live', 'it.'],maxWidth = 22) == ['In order to write', 'about life, one must', 'live it. ']\n assert candidate(words = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog'],maxWidth = 20) == ['The quick brown fox', 'jumps over the lazy', 'dog ']\n assert candidate(words = ['Sometimes', 'the', 'wisest', 'course', 'requires', 'a', 'great', 'deal', 'of', 'courage'],maxWidth = 25) == ['Sometimes the wisest', 'course requires a great', 'deal of courage ']\n assert candidate(words = ['The', 'only', 'way', 'to', 'do', 'great', 'work', 'is', 'to', 'love', 'what', 'you', 'do.'],maxWidth = 25) == ['The only way to do great', 'work is to love what you', 'do. ']\n assert candidate(words = ['How', 'much', 'wood', 'would', 'a', 'woodchuck', 'chuck', 'if', 'a', 'woodchuck', 'could', 'chuck', 'wood'],maxWidth = 20) == ['How much wood would', 'a woodchuck chuck if', 'a woodchuck could', 'chuck wood ']\n assert candidate(words = ['Sometimes', 'you', 'have', 'to', 'run', 'before', 'you', 'can', 'walk'],maxWidth = 20) == ['Sometimes you have', 'to run before you', 'can walk ']\n assert candidate(words = ['So', 'musing', 'on', 'the', 'marvel', 'of', 'this', 'theatre,'],maxWidth = 25) == ['So musing on the marvel', 'of this theatre, ']\n assert candidate(words = ['Knowledge', 'is', 'a', 'treasure,', 'and', 'practice', 'is', 'the', 'key', 'to', 'mastering', 'it.'],maxWidth = 28) == ['Knowledge is a treasure, and', 'practice is the key to', 'mastering it. ']\n assert candidate(words = ['Do', 'not', 'wait', 'to', 'strike', 'till', 'the', 'iron', 'is', 'hot;', 'but', 'make', 'it', 'hot', 'by', 'striking.'],maxWidth = 22) == ['Do not wait to strike', 'till the iron is hot;', 'but make it hot by', 'striking. ']\n assert candidate(words = ['Just', 'one', 'word'],maxWidth = 50) == ['Just one word ']\n assert candidate(words = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog.'],maxWidth = 15) == ['The quick brown', 'fox jumps over', 'the lazy dog. ']\n assert candidate(words = ['Lorem', 'ipsum', 'dolor', 'sit', 'amet,', 'consectetur', 'adipiscing', 'elit'],maxWidth = 20) == ['Lorem ipsum dolor', 'sit amet,', 'consectetur ', 'adipiscing elit ']\n assert candidate(words = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog'],maxWidth = 15) == ['The quick brown', 'fox jumps over', 'the lazy dog ']\n assert candidate(words = ['a', 'very', 'long', 'sentence', 'that', 'needs', 'to', 'be', 'formatted', 'correctly', 'with', 'various', 'spaces'],maxWidth = 10) == ['a very', 'long ', 'sentence ', 'that needs', 'to be', 'formatted ', 'correctly ', 'with ', 'various ', 'spaces ']\n assert candidate(words = ['Lorem', 'ipsum', 'dolor', 'sit', 'amet,', 'consectetur', 'adipiscing', 'elit.'],maxWidth = 12) == ['Lorem ipsum', 'dolor sit', 'amet, ', 'consectetur ', 'adipiscing ', 'elit. ']\n assert candidate(words = ['There', 'is', 'no', 'royal', 'road', 'to', 'learning.'],maxWidth = 20) == ['There is no royal', 'road to learning. ']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'],maxWidth = 5) == ['a b c', 'd e f', 'g h i', 'j k l', 'm n o']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be', 'that', 'is', 'the', 'question'],maxWidth = 15) == ['To be or not to', 'be that is the', 'question ']\n assert candidate(words = ['A', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog.'],maxWidth = 15) == ['A quick brown', 'fox jumps over', 'the lazy dog. ']\n assert candidate(words = ['Short', 'words', 'only'],maxWidth = 5) == ['Short', 'words', 'only ']\n assert candidate(words = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],maxWidth = 5) == ['A B C', 'D E F', 'G H I', 'J K L', 'M N O', 'P Q R', 'S T U', 'V W X', 'Y Z ']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'],maxWidth = 6) == ['a b c', 'd e f', 'g h i', 'j k l', 'm n o', 'p q r', 's t u', 'v w x', 'y z ']\n assert candidate(words = ['The', 'best', 'way', 'to', 'predict', 'the', 'future', 'is', 'to', 'create', 'it.'],maxWidth = 20) == ['The best way to', 'predict the future', 'is to create it. ']\n assert candidate(words = ['SingleWord'],maxWidth = 10) == ['SingleWord']\n assert candidate(words = ['Failure', 'is', 'not', 'the', 'opposite', 'of', 'success;', 'it', 'is', 'part', 'of', 'success.'],maxWidth = 30) == ['Failure is not the opposite of', 'success; it is part of', 'success. ']\n assert candidate(words = ['Lorem', 'ipsum', 'dolor', 'sit', 'amet,', 'consectetur', 'adipiscing', 'elit.'],maxWidth = 20) == ['Lorem ipsum dolor', 'sit amet,', 'consectetur ', 'adipiscing elit. ']\n assert candidate(words = ['Listen', 'to', 'many,', 'speak', 'to', 'a', 'few.'],maxWidth = 6) == ['Listen', 'to ', 'many, ', 'speak ', 'to a', 'few. ']\n assert candidate(words = ['Equal', 'space', 'distribution'],maxWidth = 20) == ['Equal space', 'distribution ']\n assert candidate(words = ['Lorem', 'ipsum', 'dolor', 'sit', 'amet,', 'consectetur', 'adipiscing', 'elit.'],maxWidth = 20) == ['Lorem ipsum dolor', 'sit amet,', 'consectetur ', 'adipiscing elit. ']\n assert candidate(words = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],maxWidth = 5) == ['A B C', 'D E F', 'G H I', 'J K L', 'M N O', 'P Q R', 'S T U', 'V W X', 'Y Z ']\n assert candidate(words = ['A', 'brave', 'new', 'world,'],maxWidth = 30) == ['A brave new world, ']\n assert candidate(words = ['Listen', 'to', 'the', 'wind.', 'It', 'is', 'talking', 'to', 'you.'],maxWidth = 20) == ['Listen to the wind.', 'It is talking to', 'you. ']\n assert candidate(words = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T'],maxWidth = 20) == ['A B C D E F G H I J', 'K L M N O P Q R S T ']\n assert candidate(words = ['Let', 'us', 'hope', 'it', 'will', 'never', 'come', 'to', 'war'],maxWidth = 15) == ['Let us hope it', 'will never come', 'to war ']\n assert candidate(words = ['Equal', 'rights', 'for', 'all'],maxWidth = 10) == ['Equal ', 'rights for', 'all ']\n assert candidate(words = ['all', 'the', 'world', 'is', 'a', 'stage', 'and', 'all', 'the', 'men', 'and', 'women', 'merely', 'players'],maxWidth = 25) == ['all the world is a stage', 'and all the men and women', 'merely players ']\n assert candidate(words = ['One', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten'],maxWidth = 12) == ['One two', 'three four', 'five six', 'seven eight', 'nine ten ']\n assert candidate(words = ['It', 'is', 'during', 'our', 'darkest', 'hours', 'that', 'we', 'must', 'trust', 'in', 'the', 'light.'],maxWidth = 24) == ['It is during our darkest', 'hours that we must trust', 'in the light. ']\n assert candidate(words = ['Once', 'upon', 'a', 'time', 'in', 'a', 'land', 'far', 'far', 'away'],maxWidth = 25) == ['Once upon a time in a', 'land far far away ']\n assert candidate(words = ['Sometimes', 'we', 'have', 'to', 'let', 'go', 'of', 'the', 'past,to', 'move', 'forward.'],maxWidth = 22) == ['Sometimes we have to', 'let go of the past,to', 'move forward. ']\n assert candidate(words = ['A', 'journey', 'of', 'a', 'thousand', 'miles', 'begins', 'with', 'a', 'single', 'step'],maxWidth = 30) == ['A journey of a thousand miles', 'begins with a single step ']\n assert candidate(words = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog'],maxWidth = 10) == ['The quick', 'brown fox', 'jumps over', 'the lazy', 'dog ']\n assert candidate(words = ['One', 'two', 'three', 'four', 'five', 'six', 'seven'],maxWidth = 10) == ['One two', 'three four', 'five six', 'seven ']\n assert candidate(words = ['Short', 'words', 'only'],maxWidth = 10) == ['Short ', 'words only']\n assert candidate(words = ['Life', 'is', 'either', 'a', 'great', 'adventure', 'or', 'nothing.'],maxWidth = 19) == ['Life is either a', 'great adventure or', 'nothing. ']\n assert candidate(words = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog'],maxWidth = 20) == ['The quick brown fox', 'jumps over the lazy', 'dog ']\n assert candidate(words = ['Justification', 'is', 'a', 'bit', 'tricky,', 'especially', 'when', 'the', 'words', 'are', 'short.', 'Here', 'we', 'go.'],maxWidth = 20) == ['Justification is a', 'bit tricky,', 'especially when the', 'words are short.', 'Here we go. ']\n assert candidate(words = ['Here', 'is', 'a', 'longer', 'word', 'that', 'will', 'require', 'some', 'additional', 'spaces', 'to', 'justify'],maxWidth = 30) == ['Here is a longer word that', 'will require some additional', 'spaces to justify ']\n assert candidate(words = ['It', 'is', 'a', 'truth', 'universally', 'acknowledged', 'that', 'a', 'single', 'man', 'in', 'possession', 'of', 'a', 'good', 'fortune'],maxWidth = 20) == ['It is a truth', 'universally ', 'acknowledged that a', 'single man in', 'possession of a good', 'fortune ']\n assert candidate(words = ['If', 'you', 'set', 'your', 'goals', 'beyond', 'your', 'abilities,', 'you', 'will', 'never', 'achieve', 'them.'],maxWidth = 25) == ['If you set your goals', 'beyond your abilities,', 'you will never achieve', 'them. ']\n assert candidate(words = ['The', 'world', 'is', 'a', 'book', 'and', 'those', 'who', 'do', 'not', 'travel', 'read', 'only', 'one', 'page.'],maxWidth = 25) == ['The world is a book and', 'those who do not travel', 'read only one page. ']\n assert candidate(words = ['Every', 'great', 'developer', 'you', 'know', 'got', 'where', 'he', 'is', 'by', 'solving', 'problems', 'they', 'were', 'uncomfortable', 'solving', 'before.'],maxWidth = 40) == ['Every great developer you know got where', 'he is by solving problems they were', 'uncomfortable solving before. ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be', 'that', 'is', 'the', 'question'],maxWidth = 25) == ['To be or not to be that', 'is the question ']\n assert candidate(words = ['Once', 'upon', 'a', 'time', 'in', 'a', 'land', 'far', 'far', 'away'],maxWidth = 22) == ['Once upon a time in a', 'land far far away ']\n assert candidate(words = ['I', 'have', 'a', 'dream'],maxWidth = 10) == ['I have a', 'dream ']\n assert candidate(words = ['Programming', 'is', 'the', 'art', 'of', 'telling', 'another', 'person', 'what', 'to', 'do', 'in', 'a', 'language', 'that', 'the', 'other', 'person', 'can', 'understand'],maxWidth = 60) == ['Programming is the art of telling another person what to do', 'in a language that the other person can understand ']\n assert candidate(words = ['One', 'small', 'step', 'for', 'man', 'one', 'giants', 'leap', 'for', 'mankind'],maxWidth = 30) == ['One small step for man one', 'giants leap for mankind ']\n assert candidate(words = ['This', 'is', 'a', 'test', 'for', 'justification', 'algorithm', 'to', 'see', 'how', 'it', 'works', 'with', 'longer', 'texts'],maxWidth = 25) == ['This is a test for', 'justification algorithm', 'to see how it works with', 'longer texts ']\n assert candidate(words = ['All', 'the', 'world’s', 'a', 'stage,', 'And', 'all', 'the', 'men', 'and', 'women', 'merely', 'players.'],maxWidth = 20) == ['All the world’s a', 'stage, And all the', 'men and women merely', 'players. ']\n assert candidate(words = ['Continuous', 'learning', 'is', 'the', 'only', 'way', 'to', 'remain', 'relevant', 'in', 'the', 'fast-paced', 'world', 'of', 'technology.'],maxWidth = 40) == ['Continuous learning is the only way to', 'remain relevant in the fast-paced world', 'of technology. ']\n assert candidate(words = ['The', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog'],maxWidth = 10) == ['The quick', 'brown fox', 'jumps over', 'the lazy', 'dog ']\n assert candidate(words = ['The', 'best', 'time', 'of', 'our', 'lives', 'The', 'worst', 'time', 'of', 'our', 'lives'],maxWidth = 20) == ['The best time of our', 'lives The worst time', 'of our lives ']\n assert candidate(words = ['A', 'simple', 'sentence.'],maxWidth = 20) == ['A simple sentence. ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be', 'that', 'is', 'the', 'question'],maxWidth = 20) == ['To be or not to be', 'that is the question']\n assert candidate(words = ['Believe', 'you', 'can', 'and', 'you', 're', 'halfway', 'there.'],maxWidth = 15) == ['Believe you can', 'and you re', 'halfway there. ']\n assert candidate(words = ['To', 'be', 'or', 'not', 'to', 'be,', 'that', 'is', 'the', 'question:'],maxWidth = 10) == ['To be or', 'not to be,', 'that is', 'the ', 'question: ']\n assert candidate(words = ['This', 'is', 'an', 'example', 'of', 'a', 'longer', 'text', 'that', 'will', 'be', 'used', 'to', 'test', 'the', 'algorithm'],maxWidth = 15) == ['This is an', 'example of a', 'longer text', 'that will be', 'used to test', 'the algorithm ']\n assert candidate(words = ['One', 'Two', 'Three', 'Four', 'Five'],maxWidth = 10) == ['One Two', 'Three Four', 'Five ']\n assert candidate(words = ['Many', 'spaces', 'should', 'go', 'here'],maxWidth = 23) == ['Many spaces should go', 'here ']\n assert candidate(words = ['Pack', 'my', 'box', 'with', 'five', 'dozen', 'liquor', 'jugs.'],maxWidth = 20) == ['Pack my box with', 'five dozen liquor', 'jugs. ']\n", "comparison": "exact"}, "public_tests": ["[\"This\", \"is\", \"an\", \"example\", \"of\", \"text\", \"justification.\"]\n16", "[\"What\",\"must\",\"be\",\"acknowledgment\",\"shall\",\"be\"]\n16", "[\"Science\",\"is\",\"what\",\"we\",\"understand\",\"well\",\"enough\",\"to\",\"explain\",\"to\",\"a\",\"computer.\",\"Art\",\"is\",\"everything\",\"else\",\"we\",\"do\"]\n20"], "hints": [], "metadata": {"canonical_parameter_names": ["words", "maxWidth"], "leetcode_dataset_entry_point": "Solution().fullJustify", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:00+00:00", "tests_total": 108, "tests_dropped": 7, "flags": [], "topic_tags": ["array", "string", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def full_justify(words, max_width)", "container": null, "callable": "full_justify", "parameters": [{"name": "words", "type": "String[]"}, {"name": "max_width", "type": "Integer"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 69, "task_id": "sqrtx", "difficulty": "Easy", "problem_description": "Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned integer should be non-negative as well.\n\nYou must not use any built-in exponent function or operator.\n\n- For example, do not use pow(x, 0.5) in c++ or x ** 0.5 in python.\n\nExample 1:\n\nInput: x = 4\nOutput: 2\nExplanation: The square root of 4 is 2, so we return 2.\n\nExample 2:\n\nInput: x = 8\nOutput: 2\nExplanation: The square root of 8 is 2.82842..., and since we round it down to the nearest integer, 2 is returned.\n\nConstraints:\n\n- 0 <= x <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(x = 2147483647) == 46340\n assert candidate(x = 26) == 5\n assert candidate(x = 4) == 2\n assert candidate(x = 1) == 1\n assert candidate(x = 25) == 5\n assert candidate(x = 0) == 0\n assert candidate(x = 101) == 10\n assert candidate(x = 100) == 10\n assert candidate(x = 8) == 2\n assert candidate(x = 1025) == 32\n assert candidate(x = 10) == 3\n assert candidate(x = 16384) == 128\n assert candidate(x = 1000) == 31\n assert candidate(x = 1524157875) == 39040\n assert candidate(x = 2147483646) == 46340\n assert candidate(x = 99) == 9\n assert candidate(x = 225) == 15\n assert candidate(x = 1522756) == 1234\n assert candidate(x = 17) == 4\n assert candidate(x = 2147395600) == 46340\n assert candidate(x = 15) == 3\n assert candidate(x = 16777215) == 4095\n assert candidate(x = 1000000) == 1000\n assert candidate(x = 1000000001) == 31622\n assert candidate(x = 169) == 13\n assert candidate(x = 150) == 12\n assert candidate(x = 2) == 1\n assert candidate(x = 10000) == 100\n assert candidate(x = 361) == 19\n assert candidate(x = 30) == 5\n assert candidate(x = 987654321) == 31426\n assert candidate(x = 999999999) == 31622\n assert candidate(x = 499999999) == 22360\n assert candidate(x = 2048) == 45\n assert candidate(x = 1024) == 32\n assert candidate(x = 1048575) == 1023\n assert candidate(x = 16777216) == 4096\n assert candidate(x = 256) == 16\n assert candidate(x = 131072) == 362\n assert candidate(x = 2097152) == 1448\n assert candidate(x = 441) == 21\n assert candidate(x = 1048576) == 1024\n assert candidate(x = 65536) == 256\n assert candidate(x = 10000000) == 3162\n assert candidate(x = 49) == 7\n assert candidate(x = 144) == 12\n assert candidate(x = 121) == 11\n assert candidate(x = 4096) == 64\n assert candidate(x = 196) == 14\n assert candidate(x = 123456789) == 11111\n assert candidate(x = 289) == 17\n assert candidate(x = 324) == 18\n assert candidate(x = 24) == 4\n assert candidate(x = 16) == 4\n assert candidate(x = 1000000000) == 31622\n assert candidate(x = 3) == 1\n", "comparison": "exact"}, "public_tests": ["4", "8"], "hints": ["Try exploring all integers. (Credits: @annujoshi)", "Use the sorted property of integers to reduced the search space. (Credits: @annujoshi)"], "metadata": {"canonical_parameter_names": ["x"], "leetcode_dataset_entry_point": "Solution().mySqrt", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:02+00:00", "tests_total": 67, "tests_dropped": 11, "flags": [], "topic_tags": ["math", "binary-search", "newtons-method"]}, "language": "ruby", "interface": {"raw_signature": "def my_sqrt(x)", "container": null, "callable": "my_sqrt", "parameters": [{"name": "x", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 70, "task_id": "climbing-stairs", "difficulty": "Easy", "problem_description": "You are climbing a staircase. It takes n steps to reach the top.\n\nEach time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?\n\nExample 1:\n\nInput: n = 2\nOutput: 2\nExplanation: There are two ways to climb to the top.\n1. 1 step + 1 step\n2. 2 steps\n\nExample 2:\n\nInput: n = 3\nOutput: 3\nExplanation: There are three ways to climb to the top.\n1. 1 step + 1 step + 1 step\n2. 1 step + 2 steps\n3. 2 steps + 1 step\n\nConstraints:\n\n- 1 <= n <= 45\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == 3\n assert candidate(n = 45) == 1836311903\n assert candidate(n = 4) == 5\n assert candidate(n = 20) == 10946\n assert candidate(n = 2) == 2\n assert candidate(n = 1) == 1\n assert candidate(n = 10) == 89\n assert candidate(n = 5) == 8\n assert candidate(n = 30) == 1346269\n assert candidate(n = 15) == 987\n assert candidate(n = 40) == 165580141\n assert candidate(n = 12) == 233\n assert candidate(n = 35) == 14930352\n assert candidate(n = 18) == 4181\n assert candidate(n = 7) == 21\n assert candidate(n = 25) == 121393\n", "comparison": "exact"}, "public_tests": ["2", "3"], "hints": ["To reach nth step, what could have been your previous steps? (Think about the step sizes)"], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().climbStairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:05+00:00", "tests_total": 16, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "dynamic-programming", "memoization"]}, "language": "ruby", "interface": {"raw_signature": "def climb_stairs(n)", "container": null, "callable": "climb_stairs", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 71, "task_id": "simplify-path", "difficulty": "Medium", "problem_description": "You are given an absolute path for a Unix-style file system, which always begins with a slash '/'. Your task is to transform this absolute path into its simplified canonical path.\n\nThe rules of a Unix-style file system are as follows:\n\n- A single period '.' represents the current directory.\n- A double period '..' represents the previous/parent directory.\n- Multiple consecutive slashes such as '//' and '///' are treated as a single slash '/'.\n- Any sequence of periods that does not match the rules above should be treated as a valid directory or file name. For example, '...' and '....' are valid directory or file names.\n\nThe simplified canonical path should follow these rules:\n\n- The path must start with a single slash '/'.\n- Directories within the path must be separated by exactly one slash '/'.\n- The path must not end with a slash '/', unless it is the root directory.\n- The path must not have any single or double periods ('.' and '..') used to denote current or parent directories.\n\nReturn the simplified canonical path.\n\nExample 1:\n\nInput: path = \"/home/\"\nOutput: \"/home\"\nExplanation:\nThe trailing slash should be removed.\n\nExample 2:\n\nInput: path = \"/home//foo/\"\nOutput: \"/home/foo\"\nExplanation:\nMultiple consecutive slashes are replaced by a single one.\n\nExample 3:\n\nInput: path = \"/home/user/Documents/../Pictures\"\nOutput: \"/home/user/Pictures\"\nExplanation:\nA double period \"..\" refers to the directory up a level (the parent directory).\n\nExample 4:\n\nInput: path = \"/../\"\nOutput: \"/\"\nExplanation:\nGoing one level up from the root directory is not possible.\n\nExample 5:\n\nInput: path = \"/.../a/../b/c/../d/./\"\nOutput: \"/.../b/d\"\nExplanation:\n\"...\" is a valid name for a directory in this problem.\n\nConstraints:\n\n- 1 <= path.length <= 3000\n- path consists of English letters, digits, period '.', slash '/' or '_'.\n- path is a valid absolute Unix path.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(path = \"/.../a/../b/c/../d/./\") == \"/.../b/d\"\n assert candidate(path = \"/a/../../b/../c///.//\") == \"/c\"\n assert candidate(path = \"/a/b/c/d/e/f/g/../../..\") == \"/a/b/c/d\"\n assert candidate(path = \"/a/b/c/d/e/../../..//f/\") == \"/a/b/f\"\n assert candidate(path = \"/a/b/c/../\") == \"/a/b\"\n assert candidate(path = \"/a/b/c/d/e/../../../..///f/\") == \"/a/f\"\n assert candidate(path = \"/a/b/c/d/e/../../../\") == \"/a/b\"\n assert candidate(path = \"/a/b/c/d/\") == \"/a/b/c/d\"\n assert candidate(path = \"/a/b/c/d/e/../../../../f/\") == \"/a/f\"\n assert candidate(path = \"/a/b/c/d/../../..\") == \"/a\"\n assert candidate(path = \"/a//b////c/d//././/..\") == \"/a/b/c\"\n assert candidate(path = \"/home/\") == \"/home\"\n assert candidate(path = \"/a/b/c/d/e/./../../f/\") == \"/a/b/c/f\"\n assert candidate(path = \"/a/..\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/..\") == \"/a/b/c/d/e/f\"\n assert candidate(path = \"/a/b/c/../../d/e/\") == \"/a/d/e\"\n assert candidate(path = \"/a/b/c/d/e/f/..\") == \"/a/b/c/d/e\"\n assert candidate(path = \"/a/b/c/d/e/f/g/../..\") == \"/a/b/c/d/e\"\n assert candidate(path = \"/a/b/c/../../\") == \"/a\"\n assert candidate(path = \"/a/./b/../c/../../d/../../../e/../../../../f/\") == \"/f\"\n assert candidate(path = \"/home/user/Documents/../Pictures\") == \"/home/user/Pictures\"\n assert candidate(path = \"/a/./b/../../c/\") == \"/c\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/f/g\") == \"/a/b/c/d/e/f/g\"\n assert candidate(path = \"/a/b/c/d/e/../../..///f/\") == \"/a/b/f\"\n assert candidate(path = \"/a/./b/./c/./d/\") == \"/a/b/c/d\"\n assert candidate(path = \"/home//foo/\") == \"/home/foo\"\n assert candidate(path = \"/a/./b/./c/./\") == \"/a/b/c\"\n assert candidate(path = \"/a/b/c/./././\") == \"/a/b/c\"\n assert candidate(path = \"/a/b/c/d/e/../../../..//f/\") == \"/a/f\"\n assert candidate(path = \"/../\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../.././..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../..//\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../\") == \"/\"\n assert candidate(path = \"/home/user/.../a/b/../../c/d/./e/f/../g/h/i/j/k/l/m/n/o/p/../../../q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../\") == \"/home/user/.../c/d/e/g/h/i/j/k/l/m\"\n assert candidate(path = \"/..////../home/user/Documents\") == \"/home/user/Documents\"\n assert candidate(path = \"/valid/./..../name/./with/./multiple/./dots/./in/./it\") == \"/valid/..../name/with/multiple/dots/in/it\"\n assert candidate(path = \"/a/b/c/d/./e/../../f/g/\") == \"/a/b/c/f/g\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../...\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/...\"\n assert candidate(path = \"/valid/directory/name/./with/./multiple/./dots/./in/./it\") == \"/valid/directory/name/with/multiple/dots/in/it\"\n assert candidate(path = \"/x/y/z/..../...../......./........\") == \"/x/y/z/..../...../......./........\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../...\") == \"/a/b/c/d/e/f/g/h/i/j/...\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../..////\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../..\") == \"/a/b/c/d/e/f/g/h/i\"\n assert candidate(path = \"/.../a/b/c/d/e/./f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/../../../\") == \"/.../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/home/user/../../../var/log/../../usr/local/bin/\") == \"/usr/local/bin\"\n assert candidate(path = \"/home/user/./././Documents/\") == \"/home/user/Documents\"\n assert candidate(path = \"/home/user/.../Documents/.../Pictures/././../Videos\") == \"/home/user/.../Documents/.../Videos\"\n assert candidate(path = \"/x/y/z/....//....//....//....\") == \"/x/y/z/..../..../..../....\"\n assert candidate(path = \"/home/user////....///.....///home/./../..///\") == \"/home/user/....\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./\") == \"/home/user/Pictures\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../...\") == \"/a/b/c/d/e/f/...\"\n assert candidate(path = \"/start/..//end\") == \"/end\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/..///./../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/a/b/c/././../d/e/f/..\") == \"/a/b/d/e\"\n assert candidate(path = \"/home/user////....///.....///home\") == \"/home/user/..../...../home\"\n assert candidate(path = \"/a/./b/./c/./d/./e/./f/./g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y\"\n assert candidate(path = \"/home/user/.../Documents/././../Pictures/././..///\") == \"/home/user/...\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../.././..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../..///\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../..//////\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m\"\n assert candidate(path = \"/one/two/three/../../../four/five/six/../../seven\") == \"/four/seven\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./../Videos/./../Music/./../Downloads/./../Documents/./../Pictures/./../Videos\") == \"/home/user/Videos\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../.././..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../...\") == \"/...\"\n assert candidate(path = \"/a/./b/./c/./d/./e/./f/./g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../...\") == \"/a/b/c/d/e/f/g/h/i/j/k/...\"\n assert candidate(path = \"/...../a/b/../../c/d/e/f/../g/h\") == \"/...../c/d/e/g/h\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../../..\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/././\") == \"/a/b/c/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/valid/./name/./with/./multiple/./dots/./in/./..../it\") == \"/valid/name/with/multiple/dots/in/..../it\"\n assert candidate(path = \"/user/./home/./.././..././....\") == \"/user/.../....\"\n assert candidate(path = \"/home/user////....///.....///home/./../..\") == \"/home/user/....\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/./\") == \"/a/b/c/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/../../../../e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/.../d/e/f/../../g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/../../../../z\") == \"/a/b/c/.../d/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/z\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./../Videos/./../Music/./../Downloads/./../\") == \"/home/user\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/..///././././..///\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x\"\n assert candidate(path = \"/home/user//...///....//.....//home\") == \"/home/user/.../..../...../home\"\n assert candidate(path = \"/a/b/c/d/e/f/g/../../../..//../m/n/o/p/\") == \"/a/b/m/n/o/p\"\n assert candidate(path = \"/home/user/.../Documents/././../Pictures/././..///././././..\") == \"/home/user\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../...\") == \"/...\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../...\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/...\"\n assert candidate(path = \"/....\") == \"/....\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../..///u/\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../..\") == \"/a/b/c/d/e/f/g\"\n assert candidate(path = \"/a/./b/./c/./d/./e\") == \"/a/b/c/d/e\"\n assert candidate(path = \"/many/../../dots/../../../in/../../../../path/../../../../../root\") == \"/root\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../..\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/./f/g/././h/./i/./j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/home////user/..///Documents///\") == \"/home/Documents\"\n assert candidate(path = \"/home/user/.../a/b/../../c/d/./e/f/../g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/home/user/.../c/d/e/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/f/g/../../../../../../\") == \"/a\"\n assert candidate(path = \"/a/b/c/d/e/f/g/../../.././../../\") == \"/a/b\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/../../\") == \"/a/b/c/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x\"\n assert candidate(path = \"/.../a/b/c/d/e/./f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/../../\") == \"/.../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/home/user////....///.....///home/./../..///./../..///./../..\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./../Videos/./../Music/./../Downloads/./../Documents/./../\") == \"/home/user\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../...\") == \"/a/b/...\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../../...\") == \"/...\"\n assert candidate(path = \"/home/user/.../a/b/../../c/d/./e/f/../g/h/i/j/k/l/m/n/o/p/../../../q/r/s/t/u/v/w/x/y/z/../../../../\") == \"/home/user/.../c/d/e/g/h/i/j/k/l/m/q/r/s/t/u/v\"\n assert candidate(path = \"/home/user////....///.....///home/./../..///./..\") == \"/home/user\"\n assert candidate(path = \"/x/y/z/../../../../w/x/y\") == \"/w/x/y\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./../Videos/./../Music/./../Downloads/./../Documents/./../Pictures\") == \"/home/user/Pictures\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../\") == \"/a/b/c/d\"\n assert candidate(path = \"/home/user////....///.....///home/./..\") == \"/home/user/..../.....\"\n assert candidate(path = \"/x/y/z/../../w/../../v/..///u/\") == \"/u\"\n assert candidate(path = \"/home/user/././././././././././././././././././././././././././././././././\") == \"/home/user\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p\"\n assert candidate(path = \"/home/user/.../Documents/../Pictures/./../Videos\") == \"/home/user/.../Videos\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/.../d/e/f/../../g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/../../z\") == \"/a/b/c/.../d/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/z\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/../../h/i/../../j/k/../../l/m/../../n/o/p/../../q/r/s/t/../../u/v/w/x/../../y/z\") == \"/a/b/c/n/q/r/u/v/y/z\"\n assert candidate(path = \"/user/..///////...///////\") == \"/...\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/././././..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../..\") == \"/a/b/c\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/nested/../../deep/../../..\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/././././..//..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/./.././..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v\"\n assert candidate(path = \"/usr/local/../../local/bin/../../../bin\") == \"/bin\"\n assert candidate(path = \"/a/b/c/.../d/e/f/../../g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/.../d/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/../../d/e/../../f/g/h/../../../i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/var/log/../log/./error.log\") == \"/var/log/error.log\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../...\") == \"/a/b/c/d/e/f/g/...\"\n assert candidate(path = \"/valid/./name/./with/./multiple/./dots/./..../in/./it\") == \"/valid/name/with/multiple/dots/..../in/it\"\n assert candidate(path = \"/a/b/c/d/e/f/g/./.././h/i/j/k/l/..\") == \"/a/b/c/d/e/f/h/i/j/k\"\n assert candidate(path = \"/multiple/////slashes/are/here/./../still/reduced\") == \"/multiple/slashes/are/still/reduced\"\n assert candidate(path = \"/home/user/.../a/b/../../c/d/./e/f/../g/h/i/j/k/l/m/n/o/p/../../../q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/home/user/.../c/d/e/g/h/i/j/k/l/m/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/foo/./bar/./baz/../qux/../.././quux\") == \"/foo/quux\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/./././././././././././././././././././././././././././././././././.././././././././././././././././././././././././././././././././././././././././.\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y\"\n assert candidate(path = \"/home/user/.../Documents/././../Pictures/././..\") == \"/home/user/...\"\n assert candidate(path = \"/home/user////....///.....///home/./../..///./../..\") == \"/home\"\n assert candidate(path = \"/home/user/.../Documents/.../Pictures/././../Videos///\") == \"/home/user/.../Documents/.../Videos\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/./\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../\") == \"/a/b\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j\"\n assert candidate(path = \"/.../a/b/c/d/e/./f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/../\") == \"/.../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../...\") == \"/a/b/c/...\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./../Videos/./../Music/./../Downloads/./../Documents/./../Pictures/./../Videos/./../Music/./../Downloads\") == \"/home/user/Downloads\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/./i/../../j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/f/g/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/valid/./name/./with/./multiple/./..../dots/./in/./it\") == \"/valid/name/with/multiple/..../dots/in/it\"\n assert candidate(path = \"/a/b/c/././././././d/e/f/../g/h/i/j/k/l/m/n/o/p/../../../q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/g/h/i/j/k/l/m/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/././h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z\") == \"/a/b/c/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/home/user/../../../../../../\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p\"\n assert candidate(path = \"/.../a/./b/./c/./d/./e\") == \"/.../a/b/c/d/e\"\n assert candidate(path = \"/a/b/c/d/e/f/g/./.././.././../../\") == \"/a/b/c\"\n assert candidate(path = \"/a/b/c/../../d/e/../../f/g/h/./../\") == \"/a/f/g\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../...\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/...\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/..////..////..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l\"\n assert candidate(path = \"/home/user////....///.....///home/./../..///./../..///./..\") == \"/\"\n assert candidate(path = \"/x/y/z/../../../../../../../../../\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../..\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../../../../../\") == \"/\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/../../../\") == \"/a/b/c/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w\"\n assert candidate(path = \"/trailing/./slashes/./should/./be/./removed\") == \"/trailing/slashes/should/be/removed\"\n assert candidate(path = \"/home/user/../../root///\") == \"/root\"\n assert candidate(path = \"/a/b/c/./../../d/e/./f/../g\") == \"/a/d/e/g\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h\"\n assert candidate(path = \"/home/user/./Documents/../Pictures/./Vacation/../../Pictures\") == \"/home/user/Pictures\"\n assert candidate(path = \"/x/y/z/./././././././\") == \"/x/y/z\"\n assert candidate(path = \"/x/y/z/....//....//....//....//a/b/c/d\") == \"/x/y/z/..../..../..../..../a/b/c/d\"\n assert candidate(path = \"/a/b/c/d/e/../../f/g/./h/./i/./j/./k/./l/./m/./n/./o/./p/./q/./r/./s/./t/./u/./v/./w/./x/./y/./z/../\") == \"/a/b/c/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y\"\n assert candidate(path = \"/a/b/c/d/././././e/f/g/../././h\") == \"/a/b/c/d/e/f/h\"\n assert candidate(path = \"/home/user////....///.....///home/./../..///./../..///\") == \"/home\"\n assert candidate(path = \"/home/user/./Documents/./../Pictures/./../Videos/./../Music/./../Downloads/./../Documents/./../Pictures/./../Videos/./../Music\") == \"/home/user/Music\"\n assert candidate(path = \"/user//.///...///file\") == \"/user/.../file\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../..\") == \"/a/b/c/d/e\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../..////////\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\") == \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../\") == \"/a/b/c/d/e/f\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../..///..\") == \"/a/b/c/d/e/f/g/h/i/j/k/l\"\n assert candidate(path = \"/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/../../../../../../../../../../../../../../../../../../../../../../../../..\") == \"/a\"\n", "comparison": "exact"}, "public_tests": ["\"/home/\"", "\"/home//foo/\"", "\"/home/user/Documents/../Pictures\"", "\"/../\"", "\"/.../a/../b/c/../d/./\""], "hints": [], "metadata": {"canonical_parameter_names": ["path"], "leetcode_dataset_entry_point": "Solution().simplifyPath", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:07+00:00", "tests_total": 198, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "stack"]}, "language": "ruby", "interface": {"raw_signature": "def simplify_path(path)", "container": null, "callable": "simplify_path", "parameters": [{"name": "path", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 72, "task_id": "edit-distance", "difficulty": "Medium", "problem_description": "Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2.\n\nYou have the following three operations permitted on a word:\n\n- Insert a character\n- Delete a character\n- Replace a character\n\nExample 1:\n\nInput: word1 = \"horse\", word2 = \"ros\"\nOutput: 3\nExplanation:\nhorse -> rorse (replace 'h' with 'r')\nrorse -> rose (remove 'r')\nrose -> ros (remove 'e')\n\nExample 2:\n\nInput: word1 = \"intention\", word2 = \"execution\"\nOutput: 5\nExplanation:\nintention -> inention (remove 't')\ninention -> enention (replace 'i' with 'e')\nenention -> exention (replace 'n' with 'x')\nexention -> exection (replace 'n' with 'c')\nexection -> execution (insert 'u')\n\nConstraints:\n\n- 0 <= word1.length, word2.length <= 500\n- word1 and word2 consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(word1 = \"park\",word2 = \"spake\") == 3\n assert candidate(word1 = \"algorithm\",word2 = \"altruistic\") == 6\n assert candidate(word1 = \"abc\",word2 = \"\") == 3\n assert candidate(word1 = \"horse\",word2 = \"ros\") == 3\n assert candidate(word1 = \"a\",word2 = \"b\") == 1\n assert candidate(word1 = \"kitten\",word2 = \"sitting\") == 3\n assert candidate(word1 = \"a\",word2 = \"a\") == 0\n assert candidate(word1 = \"a\",word2 = \"\") == 1\n assert candidate(word1 = \"abcdefghij\",word2 = \"jihgfedcba\") == 10\n assert candidate(word1 = \"\",word2 = \"a\") == 1\n assert candidate(word1 = \"\",word2 = \"abc\") == 3\n assert candidate(word1 = \"abc\",word2 = \"abc\") == 0\n assert candidate(word1 = \"intention\",word2 = \"execution\") == 5\n assert candidate(word1 = \"abcd\",word2 = \"dcba\") == 4\n assert candidate(word1 = \"\",word2 = \"\") == 0\n assert candidate(word1 = \"abc\",word2 = \"def\") == 3\n assert candidate(word1 = \"flaw\",word2 = \"lawn\") == 2\n assert candidate(word1 = \"example\",word2 = \"samples\") == 3\n assert candidate(word1 = \"abbreviation\",word2 = \"acceleration\") == 6\n assert candidate(word1 = \"abcdefghijklmnopqrstuvwxyz\",word2 = \"zyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(word1 = \"acknowledgment\",word2 = \"acknowledge\") == 3\n assert candidate(word1 = \"xylophone\",word2 = \"xylophone\") == 0\n assert candidate(word1 = \"dynamic\",word2 = \"programming\") == 8\n assert candidate(word1 = \"embarrassing\",word2 = \"aberration\") == 7\n assert candidate(word1 = \"supercalifragilisticexpialidocious\",word2 = \"supercalifragilisticexpialidociousness\") == 4\n assert candidate(word1 = \"sequential\",word2 = \"sequentialization\") == 7\n assert candidate(word1 = \"algorithm\",word2 = \"alligator\") == 6\n assert candidate(word1 = \"distance\",word2 = \"distinction\") == 5\n assert candidate(word1 = \"irreversible\",word2 = \"reversible\") == 2\n assert candidate(word1 = \"serendipity\",word2 = \"inspiration\") == 10\n assert candidate(word1 = \"karolin\",word2 = \"kathrin\") == 3\n assert candidate(word1 = \"representative\",word2 = \"reproductive\") == 6\n assert candidate(word1 = \"congratulations\",word2 = \"congratulate\") == 4\n assert candidate(word1 = \"supercalifragilisticexpialidocious\",word2 = \"pseudopseudohypoparathyroidism\") == 30\n assert candidate(word1 = \"qwerty\",word2 = \"azerty\") == 2\n assert candidate(word1 = \"mississippi\",word2 = \"mispelling\") == 7\n assert candidate(word1 = \"levenshtein\",word2 = \"levenshtein\") == 0\n assert candidate(word1 = \"sequential\",word2 = \"concurrent\") == 9\n assert candidate(word1 = \"psychological\",word2 = \"psychologist\") == 3\n assert candidate(word1 = \"interpretation\",word2 = \"interpretive\") == 4\n assert candidate(word1 = \"transient\",word2 = \"transitory\") == 4\n assert candidate(word1 = \"abcdefgh\",word2 = \"xyz\") == 8\n assert candidate(word1 = \"algorithmic\",word2 = \"algebraic\") == 6\n assert candidate(word1 = \"transformation\",word2 = \"transfiguration\") == 4\n assert candidate(word1 = \"edit\",word2 = \"editing\") == 3\n assert candidate(word1 = \"levenshtein\",word2 = \"levenschtein\") == 1\n assert candidate(word1 = \"abracadabra\",word2 = \"barbarian\") == 8\n assert candidate(word1 = \"encyclopedia\",word2 = \"encyclopedic\") == 1\n assert candidate(word1 = \"transformation\",word2 = \"transmogrification\") == 6\n assert candidate(word1 = \"complexity\",word2 = \"simplicity\") == 4\n assert candidate(word1 = \"transformation\",word2 = \"transformation\") == 0\n assert candidate(word1 = \"transformation\",word2 = \"transform\") == 5\n assert candidate(word1 = \"abcdexyz\",word2 = \"abcd\") == 4\n assert candidate(word1 = \"zoology\",word2 = \"botany\") == 5\n assert candidate(word1 = \"computation\",word2 = \"computational\") == 2\n assert candidate(word1 = \"pharmaceuticals\",word2 = \"pharmacology\") == 8\n assert candidate(word1 = \"distance\",word2 = \"difference\") == 5\n assert candidate(word1 = \"reciprocal\",word2 = \"perpendicular\") == 10\n assert candidate(word1 = \"development\",word2 = \"evolution\") == 7\n assert candidate(word1 = \"amplification\",word2 = \"attenuation\") == 7\n assert candidate(word1 = \"thermodynamics\",word2 = \"thermodynamic\") == 1\n assert candidate(word1 = \"metamorphosis\",word2 = \"metaphysics\") == 5\n assert candidate(word1 = \"quantum\",word2 = \"quark\") == 4\n assert candidate(word1 = \"repetition\",word2 = \"repetitions\") == 1\n assert candidate(word1 = \"transform\",word2 = \"transformation\") == 5\n assert candidate(word1 = \"sequence\",word2 = \"consequence\") == 3\n assert candidate(word1 = \"abbreviation\",word2 = \"contraction\") == 8\n assert candidate(word1 = \"development\",word2 = \"independently\") == 9\n assert candidate(word1 = \"distance\",word2 = \"distant\") == 2\n assert candidate(word1 = \"mississippi\",word2 = \"mississipi\") == 1\n assert candidate(word1 = \"biographical\",word2 = \"biographies\") == 3\n assert candidate(word1 = \"optimization\",word2 = \"maximization\") == 3\n assert candidate(word1 = \"photosynthesis\",word2 = \"photosynthetic\") == 2\n assert candidate(word1 = \"supercalifragilisticexpialidocious\",word2 = \"pneumonoultramicroscopicsilicovolcanoconiosis\") == 31\n assert candidate(word1 = \"algorithm\",word2 = \"altruism\") == 5\n assert candidate(word1 = \"representation\",word2 = \"representative\") == 2\n assert candidate(word1 = \"reptile\",word2 = \"reptilian\") == 3\n assert candidate(word1 = \"abacaxi\",word2 = \"abacax\") == 1\n assert candidate(word1 = \"mississippi\",word2 = \"misisippi\") == 2\n assert candidate(word1 = \"electrical\",word2 = \"electronic\") == 4\n assert candidate(word1 = \"photograph\",word2 = \"photography\") == 1\n assert candidate(word1 = \"python\",word2 = \"typhon\") == 2\n assert candidate(word1 = \"kayak\",word2 = \"racecar\") == 5\n assert candidate(word1 = \"optimization\",word2 = \"minimization\") == 3\n assert candidate(word1 = \"biological\",word2 = \"biographic\") == 7\n assert candidate(word1 = \"congratulations\",word2 = \"congratulations\") == 0\n assert candidate(word1 = \"photography\",word2 = \"photomontage\") == 7\n assert candidate(word1 = \"babble\",word2 = \"bubble\") == 1\n assert candidate(word1 = \"transformation\",word2 = \"transmute\") == 7\n assert candidate(word1 = \"supercalifragilisticexpialidocious\",word2 = \"antidisestablishmentarianism\") == 26\n assert candidate(word1 = \"semantically\",word2 = \"syntactically\") == 4\n assert candidate(word1 = \"synchronous\",word2 = \"asynchronous\") == 1\n assert candidate(word1 = \"evolution\",word2 = \"revolution\") == 1\n assert candidate(word1 = \"abcdefghij\",word2 = \"zyxwvutsrqponmlkjihgfedcba\") == 25\n assert candidate(word1 = \"misunderstanding\",word2 = \"understanding\") == 3\n assert candidate(word1 = \"combinatorics\",word2 = \"computation\") == 7\n assert candidate(word1 = \"electromagnetic\",word2 = \"electroencephalography\") == 13\n assert candidate(word1 = \"permutation\",word2 = \"combination\") == 6\n assert candidate(word1 = \"subsequence\",word2 = \"supersequence\") == 3\n assert candidate(word1 = \"lumberjack\",word2 = \"lumbersome\") == 4\n assert candidate(word1 = \"optimization\",word2 = \"information\") == 7\n assert candidate(word1 = \"interpolation\",word2 = \"interpretation\") == 3\n assert candidate(word1 = \"magnificent\",word2 = \"magnanimous\") == 6\n assert candidate(word1 = \"xylophone\",word2 = \"xylography\") == 6\n assert candidate(word1 = \"biochemistry\",word2 = \"bioinformatics\") == 10\n assert candidate(word1 = \"exaggeration\",word2 = \"aggrandizement\") == 10\n assert candidate(word1 = \"abcde\",word2 = \"fghij\") == 5\n assert candidate(word1 = \"mississippi\",word2 = \"mispell\") == 8\n assert candidate(word1 = \"interpolation\",word2 = \"internationalization\") == 8\n assert candidate(word1 = \"entomology\",word2 = \"herpetology\") == 5\n assert candidate(word1 = \"interference\",word2 = \"interferometer\") == 5\n assert candidate(word1 = \"communication\",word2 = \"communism\") == 6\n assert candidate(word1 = \"characterization\",word2 = \"categorization\") == 6\n assert candidate(word1 = \"abracadabra\",word2 = \"cabracadabara\") == 2\n assert candidate(word1 = \"transformation\",word2 = \"transference\") == 7\n assert candidate(word1 = \"decomposition\",word2 = \"discombobulation\") == 7\n assert candidate(word1 = \"intermediate\",word2 = \"interim\") == 6\n assert candidate(word1 = \"interpolation\",word2 = \"intrapolation\") == 2\n assert candidate(word1 = \"visualization\",word2 = \"representation\") == 9\n assert candidate(word1 = \"abbreviation\",word2 = \"elision\") == 7\n assert candidate(word1 = \"metamorphism\",word2 = \"metempsychosis\") == 8\n assert candidate(word1 = \"encyclopedia\",word2 = \"encyclopedia\") == 0\n assert candidate(word1 = \"interdisciplinary\",word2 = \"transdisciplinary\") == 5\n assert candidate(word1 = \"unbelievable\",word2 = \"believable\") == 2\n assert candidate(word1 = \"abracadabra\",word2 = \"cadabra\") == 4\n assert candidate(word1 = \"hydrostatic\",word2 = \"hydrodynamics\") == 5\n assert candidate(word1 = \"parallel\",word2 = \"perpendicular\") == 10\n assert candidate(word1 = \"administration\",word2 = \"administrative\") == 2\n assert candidate(word1 = \"cosmology\",word2 = \"cosmonautics\") == 7\n assert candidate(word1 = \"development\",word2 = \"develpoment\") == 2\n assert candidate(word1 = \"photosynthesis\",word2 = \"photography\") == 8\n assert candidate(word1 = \"biochemistry\",word2 = \"biological\") == 8\n", "comparison": "exact"}, "public_tests": ["\"horse\"\n\"ros\"", "\"intention\"\n\"execution\""], "hints": [], "metadata": {"canonical_parameter_names": ["word1", "word2"], "leetcode_dataset_entry_point": "Solution().minDistance", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:09+00:00", "tests_total": 132, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def min_distance(word1, word2)", "container": null, "callable": "min_distance", "parameters": [{"name": "word1", "type": "String"}, {"name": "word2", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 74, "task_id": "search-a-2d-matrix", "difficulty": "Medium", "problem_description": "You are given an m x n integer matrix matrix with the following two properties:\n\n- Each row is sorted in non-decreasing order.\n- The first integer of each row is greater than the last integer of the previous row.\n\nGiven an integer target, return true if target is in matrix or false otherwise.\n\nYou must write a solution in O(log(m * n)) time complexity.\n\nExample 1:\n\nInput: matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3\nOutput: true\n\nExample 2:\n\nInput: matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 13\nOutput: false\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= m, n <= 100\n- -10^4 <= matrix[i][j], target <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20]],target = 10) == True\n assert candidate(matrix = [[-10, -5, -3], [0, 3, 10], [15, 20, 25]],target = 3) == True\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [7, 8, 11, 13], [15, 16, 18, 20]],target = 0) == True\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],target = 5) == True\n assert candidate(matrix = [[1]],target = 1) == True\n assert candidate(matrix = [[-10, -8, -6, -4], [-3, -1, 1, 3], [5, 7, 9, 11]],target = 10) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]],target = 0) == False\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [7, 8, 11, 13], [15, 16, 18, 20]],target = 20) == True\n assert candidate(matrix = [[-10, -8, -6, -4], [-3, -1, 1, 3], [5, 7, 9, 11]],target = -5) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],target = 8) == True\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 13) == False\n assert candidate(matrix = [[1]],target = 2) == False\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [8, 9, 10, 12]],target = -3) == True\n assert candidate(matrix = [[1, 3, 5, 7]],target = 5) == True\n assert candidate(matrix = [[-10, -5, -3], [0, 3, 10], [15, 20, 25]],target = 1) == False\n assert candidate(matrix = [[1, 3, 5]],target = 5) == True\n assert candidate(matrix = [[-10, -5, -3, -2], [-1, 0, 2, 3], [4, 5, 7, 8]],target = 11) == False\n assert candidate(matrix = [[1]],target = 0) == False\n assert candidate(matrix = [[1, 3]],target = 3) == True\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [7, 8, 11, 13], [15, 16, 18, 20]],target = -10) == True\n assert candidate(matrix = [[1, 3, 5, 7]],target = 8) == False\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],target = 10) == False\n assert candidate(matrix = [[-10, -5, -3, -2], [-1, 0, 2, 3], [4, 5, 7, 8]],target = -3) == True\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],target = 0) == False\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [8, 9, 10, 12]],target = 15) == False\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [7, 8, 11, 13], [15, 16, 18, 20]],target = 21) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 3) == True\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [7, 8, 11, 13], [15, 16, 18, 20]],target = 11) == True\n assert candidate(matrix = [[-10, -5, -3, -1], [0, 2, 3, 5], [7, 8, 11, 13], [15, 16, 18, 20]],target = -11) == False\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6]],target = 6) == True\n assert candidate(matrix = [[1, 3, 5]],target = 6) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 60) == True\n assert candidate(matrix = [[1, 3]],target = 1) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]],target = 10) == True\n assert candidate(matrix = [[1, 3]],target = 2) == False\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6]],target = 7) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 1) == True\n assert candidate(matrix = [[-1000, -950, -900, -850], [-800, -750, -700, -650], [-600, -550, -500, -450], [-400, -350, -300, -250], [-200, -150, -100, -50]],target = -325) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60], [61, 62, 63, 64], [65, 66, 67, 68]],target = 1) == True\n assert candidate(matrix = [[1, 3, 5], [7, 9, 11], [13, 15, 17]],target = 18) == False\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-4, -2, 2, 4, 8], [6, 7, 12, 13, 14], [15, 16, 18, 19, 20], [21, 22, 23, 24, 25]],target = 12) == True\n assert candidate(matrix = [[-1, 0, 1, 2, 3], [4, 5, 6, 7, 8], [9, 10, 11, 12, 13], [14, 15, 16, 17, 18], [19, 20, 21, 22, 23]],target = 0) == True\n assert candidate(matrix = [[10, 20, 30, 40, 50], [60, 70, 80, 90, 100], [110, 120, 130, 140, 150], [160, 170, 180, 190, 200]],target = 150) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15], [17, 19, 21, 23, 25, 27, 29, 31], [33, 35, 37, 39, 41, 43, 45, 47], [49, 51, 53, 55, 57, 59, 61, 63]],target = 62) == False\n assert candidate(matrix = [[-10000]],target = -10000) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]],target = 25) == True\n assert candidate(matrix = [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25, 26, 27, 28, 29]],target = 20) == True\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60], [61, 62, 63, 64], [65, 66, 67, 68]],target = 35) == False\n assert candidate(matrix = [[-100, -90, -80, -70], [-60, -50, -40, -30], [-20, -10, 0, 10], [20, 30, 40, 50]],target = 5) == False\n assert candidate(matrix = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],target = 0) == False\n assert candidate(matrix = [[-100, -99, -98, -97, -96], [-95, -94, -93, -92, -91], [-90, -89, -88, -87, -86], [-85, -84, -83, -82, -81], [-80, -79, -78, -77, -76]],target = -88) == True\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],target = 10) == True\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 61) == False\n assert candidate(matrix = [[-4, -3, -2, -1, 0], [1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]],target = -2) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 5) == False\n assert candidate(matrix = [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15], [16, 19, 22, 25, 28], [17, 20, 23, 26, 29]],target = 18) == False\n assert candidate(matrix = [[1, 3, 5, 7], [9, 11, 13, 15], [17, 19, 21, 23], [25, 27, 29, 31], [33, 35, 37, 39], [41, 43, 45, 47], [49, 51, 53, 55], [57, 59, 61, 63]],target = 64) == False\n assert candidate(matrix = [[-100, -90, -80, -70], [-60, -50, -40, -30], [-20, -10, 0, 10], [20, 30, 40, 50]],target = -55) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29], [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59], [61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89], [91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119]],target = 119) == True\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9]],target = -6) == False\n assert candidate(matrix = [[-1, 0, 3, 5, 9, 12], [13, 18, 20, 23, 28, 31], [32, 34, 36, 39, 42, 45], [46, 48, 51, 54, 57, 60]],target = 61) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 5) == False\n assert candidate(matrix = [[-100, -90, -80, -70], [-60, -50, -40, -30], [-20, -10, 0, 10], [20, 30, 40, 50]],target = -45) == False\n assert candidate(matrix = [[-100, -99, -98, -97, -96], [-95, -94, -93, -92, -91], [-90, -89, -88, -87, -86], [-85, -84, -83, -82, -81], [-80, -79, -78, -77, -76]],target = -83) == True\n assert candidate(matrix = [[-5, -2, -1], [0, 3, 5], [8, 9, 10]],target = -3) == False\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], [17, 18, 19, 20]],target = 1) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 20) == False\n assert candidate(matrix = [[1, 3, 5], [7, 9, 11], [13, 15, 17]],target = 14) == False\n assert candidate(matrix = [[-1000, -999, -998, -997, -996], [-995, -994, -993, -992, -991], [-990, -989, -988, -987, -986], [-985, -984, -983, -982, -981], [-980, -979, -978, -977, -976]],target = -987) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [11, 13, 15, 17, 19], [21, 23, 25, 27, 29], [31, 33, 35, 37, 39], [41, 43, 45, 47, 49]],target = 38) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 20) == False\n assert candidate(matrix = [[-1000, -999, -998, -997, -996], [-995, -994, -993, -992, -991], [-990, -989, -988, -987, -986]],target = -987) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30]],target = 15) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [11, 13, 15, 17, 19], [21, 23, 25, 27, 29], [31, 33, 35, 37, 39], [41, 43, 45, 47, 49]],target = 0) == False\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18], [19, 20, 21], [22, 23, 24], [25, 26, 27], [28, 29, 30], [31, 32, 33]],target = 17) == True\n assert candidate(matrix = [[-100, -99, -98, -97], [-96, -95, -94, -93], [-92, -91, -90, -89], [-88, -87, -86, -85]],target = -90) == True\n assert candidate(matrix = [[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1]],target = -1) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [11, 13, 15, 17, 19], [21, 23, 25, 27, 29], [31, 33, 35, 37, 39]],target = 20) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11], [13, 15, 17, 19, 21, 23], [25, 27, 29, 31, 33, 35], [37, 39, 41, 43, 45, 47], [49, 51, 53, 55, 57, 59]],target = 30) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 25) == False\n assert candidate(matrix = [[10, 11, 12, 13, 14, 15]],target = 15) == True\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9]],target = 10) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]],target = 27) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 13) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]],target = 31) == False\n assert candidate(matrix = [[-100, -90, -80, -70, -60], [-50, -40, -30, -20, -10], [0, 10, 20, 30, 40], [50, 60, 70, 80, 90], [100, 110, 120, 130, 140]],target = -35) == False\n assert candidate(matrix = [[-1, 0, 3, 5, 9, 12], [13, 18, 20, 23, 28, 31], [32, 34, 36, 39, 42, 45], [46, 48, 51, 54, 57, 60]],target = 45) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45]],target = 22) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40]],target = 25) == True\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 35) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60], [61, 62, 63, 64], [65, 66, 67, 68]],target = 68) == True\n assert candidate(matrix = [[-100, -98, -95, -93], [-88, -86, -82, -80], [-74, -70, -66, -62], [-58, -54, -50, -46]],target = -66) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 26) == False\n assert candidate(matrix = [[1, 5, 9, 13], [17, 21, 25, 29], [33, 37, 41, 45], [49, 53, 57, 61]],target = 18) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60], [61, 62, 63, 64], [65, 66, 67, 68], [69, 70, 71, 72]],target = 67) == True\n assert candidate(matrix = [[-5, -2, -1], [0, 3, 5], [8, 9, 10]],target = 11) == False\n assert candidate(matrix = [[-100, -90, -80, -70], [-60, -50, -40, -30], [-20, -10, 0, 10], [20, 30, 40, 50]],target = 0) == True\n assert candidate(matrix = [[-10000, -9999, -9998, -9997], [-9996, -9995, -9994, -9993], [-9992, -9991, -9990, -9989], [-9988, -9987, -9986, -9985]],target = -9990) == True\n assert candidate(matrix = [[-10, -9, -8, -7, -6], [-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]],target = -5) == True\n assert candidate(matrix = [[-100, -99, -98, -97, -96], [-95, -94, -93, -92, -91], [-90, -89, -88, -87, -86], [-85, -84, -83, -82, -81], [-80, -79, -78, -77, -76]],target = 0) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 0) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 13) == True\n assert candidate(matrix = [[-10, -8, -6, -4, -2], [0, 2, 4, 6, 8], [10, 12, 14, 16, 18], [20, 22, 24, 26, 28], [30, 32, 34, 36, 38]],target = -5) == False\n assert candidate(matrix = [[10], [11], [12], [13], [14], [15]],target = 15) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [21, 23, 25, 27, 29, 31, 33, 35, 37, 39], [41, 43, 45, 47, 49, 51, 53, 55, 57, 59], [61, 63, 65, 67, 69, 71, 73, 75, 77, 79]],target = 40) == False\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],target = 1) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]],target = 51) == False\n assert candidate(matrix = [[-1000, -500, -250, -100], [-50, -25, -10, 0], [5, 10, 25, 50], [100, 250, 500, 1000]],target = 0) == True\n assert candidate(matrix = [[-1, 0, 3, 5, 9, 12], [13, 18, 20, 23, 28, 31], [32, 34, 36, 39, 42, 45], [46, 48, 51, 54, 57, 60]],target = -2) == False\n assert candidate(matrix = [[1], [2], [3]],target = 2) == True\n assert candidate(matrix = [[-5, -3, -1, 1, 3], [5, 7, 9, 11, 13], [15, 17, 19, 21, 23], [25, 27, 29, 31, 33], [35, 37, 39, 41, 43]],target = 42) == False\n assert candidate(matrix = [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39], [40, 41, 42, 43, 44, 45, 46, 47, 48, 49], [50, 51, 52, 53, 54, 55, 56, 57, 58, 59], [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], [70, 71, 72, 73, 74, 75, 76, 77, 78, 79], [80, 81, 82, 83, 84, 85, 86, 87, 88, 89]],target = 75) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [11, 13, 15, 17, 19], [21, 23, 25, 27, 29], [31, 33, 35, 37, 39], [41, 43, 45, 47, 49]],target = 50) == False\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9]],target = -1) == True\n assert candidate(matrix = [[1, 5, 9, 13, 17, 21], [25, 29, 33, 37, 41, 45], [49, 53, 57, 61, 65, 69], [73, 77, 81, 85, 89, 93], [97, 101, 105, 109, 113, 117]],target = 97) == True\n assert candidate(matrix = [[-9999, -9997, -9995, -9993], [-9991, -9989, -9987, -9985], [-9983, -9981, -9979, -9977], [-9975, -9973, -9971, -9969]],target = -9996) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],target = 5) == True\n assert candidate(matrix = [[-1000, -500, -250, -100], [-50, -25, -10, 0], [5, 10, 25, 50], [100, 250, 500, 1000]],target = -300) == False\n assert candidate(matrix = [[10000]],target = 10000) == True\n assert candidate(matrix = [[1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009], [1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019], [1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029], [1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039]],target = 1025) == True\n assert candidate(matrix = [[1, 2, 3]],target = 2) == True\n assert candidate(matrix = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],target = -5) == False\n assert candidate(matrix = [[-10000, -9999, -9998], [-9997, -9996, -9995], [-9994, -9993, -9992], [-9991, -9990, -9989], [-9988, -9987, -9986]],target = -9992) == True\n assert candidate(matrix = [[-1000, -500, -250, -100], [-50, -25, -10, 0], [5, 10, 25, 50], [100, 250, 500, 1000]],target = 2000) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],target = 11) == False\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60], [70, 71, 72, 73]],target = 70) == True\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],target = 18) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24], [25, 26, 27, 28, 29]],target = 29) == True\n assert candidate(matrix = [[-10000, -9000, -8000, -7000], [-6000, -5000, -4000, -3000], [-2000, -1000, 0, 1000], [2000, 3000, 4000, 5000]],target = -5000) == True\n assert candidate(matrix = [[-1, 1, 3], [5, 7, 9], [11, 13, 15]],target = 0) == False\n assert candidate(matrix = [[-1000, -900, -800], [-700, -600, -500], [-400, -300, -200], [-100, -50, 0], [50, 100, 150]],target = -450) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]],target = 42) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30]],target = 25) == True\n assert candidate(matrix = [[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4], [5, 6, 7, 8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32, 33, 34]],target = 17) == True\n assert candidate(matrix = [[-3, -2, -1, 0, 1, 2, 3], [4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17], [18, 19, 20, 21, 22, 23, 24]],target = 13) == True\n assert candidate(matrix = [[-1000, -999, -998, -997, -996], [-995, -994, -993, -992, -991], [-990, -989, -988, -987, -986], [-985, -984, -983, -982, -981]],target = -993) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13], [15, 17, 19, 21, 23, 25, 27], [29, 31, 33, 35, 37, 39, 41]],target = 28) == False\n assert candidate(matrix = [[-50, -49, -48, -47, -46], [-45, -44, -43, -42, -41], [-40, -39, -38, -37, -36], [-35, -34, -33, -32, -31], [-30, -29, -28, -27, -26]],target = -33) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 31) == False\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9]],target = 9) == True\n assert candidate(matrix = [[-100, -90, -80, -70], [-60, -50, -40, -30], [-20, -10, 0, 10], [20, 30, 40, 50]],target = -101) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 26) == False\n", "comparison": "exact"}, "public_tests": ["[[1,3,5,7],[10,11,16,20],[23,30,34,60]]\n3", "[[1,3,5,7],[10,11,16,20],[23,30,34,60]]\n13"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix", "target"], "leetcode_dataset_entry_point": "Solution().searchMatrix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:13+00:00", "tests_total": 143, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["array", "binary-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def search_matrix(matrix, target)", "container": null, "callable": "search_matrix", "parameters": [{"name": "matrix", "type": "Integer[][]"}, {"name": "target", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 76, "task_id": "minimum-window-substring", "difficulty": "Hard", "problem_description": "Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string \"\".\n\nThe testcases will be generated such that the answer is unique.\n\nExample 1:\n\nInput: s = \"ADOBECODEBANC\", t = \"ABC\"\nOutput: \"BANC\"\nExplanation: The minimum window substring \"BANC\" includes 'A', 'B', and 'C' from string t.\n\nExample 2:\n\nInput: s = \"a\", t = \"a\"\nOutput: \"a\"\nExplanation: The entire string s is the minimum window.\n\nExample 3:\n\nInput: s = \"a\", t = \"aa\"\nOutput: \"\"\nExplanation: Both 'a's from t must be included in the window.\nSince the largest window of s only has one 'a', return empty string.\n\nConstraints:\n\n- m == s.length\n- n == t.length\n- 1 <= m, n <= 10^5\n- s and t consist of uppercase and lowercase English letters.\n\nFollow up: Could you find an algorithm that runs in O(m + n) time?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"acbbaca\",t = \"aba\") == \"baca\"\n assert candidate(s = \"aabbcc\",t = \"abc\") == \"abbc\"\n assert candidate(s = \"aaaaaaa\",t = \"aa\") == \"aa\"\n assert candidate(s = \"a\",t = \"aa\") == \"\"\n assert candidate(s = \"abcd\",t = \"bd\") == \"bcd\"\n assert candidate(s = \"ab\",t = \"b\") == \"b\"\n assert candidate(s = \"aa\",t = \"aa\") == \"aa\"\n assert candidate(s = \"ADOBECODEBANC\",t = \"ABC\") == \"BANC\"\n assert candidate(s = \"fgrheahtfeqcrha\",t = \"harf\") == \"fgrhea\"\n assert candidate(s = \"aaaaaaaaaaaabbbbbcdd\",t = \"abcdd\") == \"abbbbbcdd\"\n assert candidate(s = \"abcde\",t = \"f\") == \"\"\n assert candidate(s = \"ab\",t = \"a\") == \"a\"\n assert candidate(s = \"abababab\",t = \"abab\") == \"abab\"\n assert candidate(s = \"a\",t = \"a\") == \"a\"\n assert candidate(s = \"aafffrbb\",t = \"ffab\") == \"afffrb\"\n assert candidate(s = \"bba\",t = \"ab\") == \"ba\"\n assert candidate(s = \"cbbbaaaaabbbcccccbbaa\",t = \"aaabbbccc\") == \"aaabbbccc\"\n assert candidate(s = \"abcabcabc\",t = \"abc\") == \"abc\"\n assert candidate(s = \"cabwefgewcwaefgcf\",t = \"cae\") == \"cwae\"\n assert candidate(s = \"abcabcabc\",t = \"aaa\") == \"abcabca\"\n assert candidate(s = \"abc\",t = \"abc\") == \"abc\"\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",t = \"aaaaaaaaaaaaaaaaaaaaaaaaa\") == \"aaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"zjwsxeyrhtlnejzjwsxeyrhtlnej\",t = \"nejxyz\") == \"nejzjwsxey\"\n assert candidate(s = \"abcdefghijk\",t = \"jihgfedcba\") == \"abcdefghij\"\n assert candidate(s = \"abacabadabacaba\",t = \"abc\") == \"bac\"\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\",t = \"cba\") == \"abc\"\n assert candidate(s = \"aabbccddeeffgghhii\",t = \"abcdefghi\") == \"abbccddeeffgghhi\"\n assert candidate(s = \"aaaaaaaaaabbbbbbcccccc\",t = \"abc\") == \"abbbbbbc\"\n assert candidate(s = \"mississippi\",t = \"issip\") == \"issip\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzz\",t = \"zzz\") == \"zzz\"\n assert candidate(s = \"xyxzyxzyxzyxzyx\",t = \"xzy\") == \"yxz\"\n assert candidate(s = \"abcdefg\",t = \"zyxwvutsrqponmlkjihgfedcba\") == \"\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zyxwvutsrqponmlkjihgfedcba\") == \"abbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz\"\n assert candidate(s = \"xyzxzyzxzyzzyzyxzyzyxzyzyx\",t = \"xyzzyxzyzyzx\") == \"xyzxzyzxzyzzy\"\n assert candidate(s = \"aaabbbaaabbbccc\",t = \"aabbcc\") == \"aabbbcc\"\n assert candidate(s = \"zzzzzzzzzzz\",t = \"z\") == \"z\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"abcdef\") == \"abbccddeef\"\n assert candidate(s = \"aabbccddeeffgghhii\",t = \"aabbccddeeffgghhii\") == \"aabbccddeeffgghhii\"\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabcabc\",t = \"aabbcc\") == \"abcabc\"\n assert candidate(s = \"bbaabbbbbaabbbbaaabbbbaaabbababababab\",t = \"bbbbaaaa\") == \"aabbbbaa\"\n assert candidate(s = \"mississippi\",t = \"issi\") == \"issi\"\n assert candidate(s = \"aaabbcccccccdddeee\",t = \"abcde\") == \"abbcccccccddde\"\n assert candidate(s = \"zxcvbnmasdfghjklqwertyuiop\",t = \"opq\") == \"qwertyuiop\"\n assert candidate(s = \"aaaaaaaaaaaabbbbbbcccccccc\",t = \"abc\") == \"abbbbbbc\"\n assert candidate(s = \"abcabcabcabcabcabc\",t = \"cba\") == \"abc\"\n assert candidate(s = \"xyzzxyzzxyzz\",t = \"xyz\") == \"xyz\"\n assert candidate(s = \"aaaaaaaaaaaabbbbbbbbbbbcccccccccc\",t = \"abc\") == \"abbbbbbbbbbbc\"\n assert candidate(s = \"xyzzzyxzyxzyxzyxzy\",t = \"zyxzyxz\") == \"xyzzzyx\"\n assert candidate(s = \"ababababababab\",t = \"abba\") == \"abab\"\n assert candidate(s = \"abcdabcdeabcdf\",t = \"abcfed\") == \"eabcdf\"\n assert candidate(s = \"abababababababababab\",t = \"aabbcc\") == \"\"\n assert candidate(s = \"abcdefg\",t = \"xyz\") == \"\"\n assert candidate(s = \"aabbccddeeffgghhii\",t = \"aabbcc\") == \"aabbcc\"\n assert candidate(s = \"ababcabcabcabcabcabcabcabcabcabcabcabc\",t = \"abcabcabc\") == \"abcabcabc\"\n assert candidate(s = \"hellohellohello\",t = \"lle\") == \"ell\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"zyxwvutsrqponmlkjihgfedcba\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"sadjhasjhdjahsjdhasjhadsjhsahjdahjdsjahjdhasjdhajsdhasjdhajsdjasdhasjdhsa\",t = \"hasjdh\") == \"hasjhd\"\n assert candidate(s = \"bancbbancbbanc\",t = \"abc\") == \"banc\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzzzzzzzzzzzzzzzzzz\",t = \"abcdefghijklmnopqrstuvwxyz\") == \"abbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz\"\n assert candidate(s = \"thisisaverylongstringthatweneedtolookinto\",t = \"tin\") == \"int\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzz\") == \"zzzzzzzz\"\n assert candidate(s = \"bbaaaaaaabbbbcccc\",t = \"aabbbccc\") == \"aabbbbccc\"\n assert candidate(s = \"abababababababab\",t = \"abab\") == \"abab\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"mnopqrstuvwxyz\") == \"mnnooppqqrrssttuuvvwwxxyyz\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm\",t = \"qwertyuiopzxcvbnm\") == \"zxcvbnmqwertyuiop\"\n assert candidate(s = \"xyzzyxzyzyxzyzxzyzxzyxzyzyxzyx\",t = \"xyz\") == \"xyz\"\n assert candidate(s = \"abcbacbacbacbacbacbacbacbacbacbacbacbacbacbac\",t = \"acbcba\") == \"abcbac\"\n assert candidate(s = \"abccbaacz\",t = \"abc\") == \"abc\"\n assert candidate(s = \"abracadabra\",t = \"rac\") == \"rac\"\n assert candidate(s = \"aaaaaaaaaabbbbbbbbbbcccccccccc\",t = \"abc\") == \"abbbbbbbbbbc\"\n assert candidate(s = \"bbaaacccaaaabbbccc\",t = \"aabbbccc\") == \"aabbbccc\"\n assert candidate(s = \"bancancode\",t = \"abc\") == \"banc\"\n assert candidate(s = \"abcdefgabcdefg\",t = \"abcd\") == \"abcd\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\",t = \"qwertyuiop\") == \"qwertyuiop\"\n assert candidate(s = \"aaaaaaaaaa\",t = \"aaa\") == \"aaa\"\n assert candidate(s = \"ababababababababababababababababababab\",t = \"aba\") == \"aba\"\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbcccccccccccccccccccccccccccccccccc\",t = \"abc\") == \"abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbc\"\n assert candidate(s = \"abcdeffeghijk\",t = \"efg\") == \"feg\"\n assert candidate(s = \"abcabcabcabcabc\",t = \"cba\") == \"abc\"\n", "comparison": "exact"}, "public_tests": ["\"ADOBECODEBANC\"\n\"ABC\"", "\"a\"\n\"a\"", "\"a\"\n\"aa\""], "hints": ["Use two pointers to create a window of letters in s, which would have all the characters from t.", "Expand the right pointer until all the characters of t are covered.", "Once all the characters are covered, move the left pointer and ensure that all the characters are still covered to minimize the subarray size.", "Continue expanding the right and left pointers until you reach the end of s."], "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().minWindow", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:18+00:00", "tests_total": 80, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "string", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def min_window(s, t)", "container": null, "callable": "min_window", "parameters": [{"name": "s", "type": "String"}, {"name": "t", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 77, "task_id": "combinations", "difficulty": "Medium", "problem_description": "Given two integers n and k, return all possible combinations of k numbers chosen from the range [1, n].\n\nYou may return the answer in any order.\n\nExample 1:\n\nInput: n = 4, k = 2\nOutput: [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]\nExplanation: There are 4 choose 2 = 6 total combinations.\nNote that combinations are unordered, i.e., [1,2] and [2,1] are considered to be the same combination.\n\nExample 2:\n\nInput: n = 1, k = 1\nOutput: [[1]]\nExplanation: There is 1 choose 1 = 1 total combination.\n\nConstraints:\n\n- 1 <= n <= 20\n- 1 <= k <= n\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(n=10, k=5), [[1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 9, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 9, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 9, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 9, 10], [1, 2, 8, 9, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 9, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 9, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 9, 10], [1, 3, 8, 9, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 9, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 9, 10], [1, 4, 8, 9, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 9, 10], [1, 5, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 9, 10], [1, 6, 8, 9, 10], [1, 7, 8, 9, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 9, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 9, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 9, 10], [2, 3, 8, 9, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 9, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 9, 10], [2, 4, 8, 9, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 9, 10], [2, 5, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 9, 10], [2, 6, 8, 9, 10], [2, 7, 8, 9, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 9, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 9, 10], [3, 4, 8, 9, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 9, 10], [3, 5, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 9, 10], [3, 6, 8, 9, 10], [3, 7, 8, 9, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 9, 10], [4, 5, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 9, 10], [4, 6, 8, 9, 10], [4, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 9, 10], [5, 6, 8, 9, 10], [5, 7, 8, 9, 10], [6, 7, 8, 9, 10]])\n assert answers_match(candidate(n=6, k=4), [[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 4, 5], [1, 2, 4, 6], [1, 2, 5, 6], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 5, 6], [1, 4, 5, 6], [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 5, 6], [2, 4, 5, 6], [3, 4, 5, 6]])\n assert answers_match(candidate(n=1, k=1), [[1]])\n assert answers_match(candidate(n=4, k=2), [[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]])\n assert answers_match(candidate(n=6, k=1), [[1], [2], [3], [4], [5], [6]])\n assert answers_match(candidate(n=5, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 3, 4], [1, 3, 5], [1, 4, 5], [2, 3, 4], [2, 3, 5], [2, 4, 5], [3, 4, 5]])\n assert answers_match(candidate(n=9, k=4), [[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3, 8], [1, 2, 3, 9], [1, 2, 4, 5], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4, 8], [1, 2, 4, 9], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5, 8], [1, 2, 5, 9], [1, 2, 6, 7], [1, 2, 6, 8], [1, 2, 6, 9], [1, 2, 7, 8], [1, 2, 7, 9], [1, 2, 8, 9], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4, 8], [1, 3, 4, 9], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5, 8], [1, 3, 5, 9], [1, 3, 6, 7], [1, 3, 6, 8], [1, 3, 6, 9], [1, 3, 7, 8], [1, 3, 7, 9], [1, 3, 8, 9], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5, 8], [1, 4, 5, 9], [1, 4, 6, 7], [1, 4, 6, 8], [1, 4, 6, 9], [1, 4, 7, 8], [1, 4, 7, 9], [1, 4, 8, 9], [1, 5, 6, 7], [1, 5, 6, 8], [1, 5, 6, 9], [1, 5, 7, 8], [1, 5, 7, 9], [1, 5, 8, 9], [1, 6, 7, 8], [1, 6, 7, 9], [1, 6, 8, 9], [1, 7, 8, 9], [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4, 8], [2, 3, 4, 9], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5, 8], [2, 3, 5, 9], [2, 3, 6, 7], [2, 3, 6, 8], [2, 3, 6, 9], [2, 3, 7, 8], [2, 3, 7, 9], [2, 3, 8, 9], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5, 8], [2, 4, 5, 9], [2, 4, 6, 7], [2, 4, 6, 8], [2, 4, 6, 9], [2, 4, 7, 8], [2, 4, 7, 9], [2, 4, 8, 9], [2, 5, 6, 7], [2, 5, 6, 8], [2, 5, 6, 9], [2, 5, 7, 8], [2, 5, 7, 9], [2, 5, 8, 9], [2, 6, 7, 8], [2, 6, 7, 9], [2, 6, 8, 9], [2, 7, 8, 9], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5, 8], [3, 4, 5, 9], [3, 4, 6, 7], [3, 4, 6, 8], [3, 4, 6, 9], [3, 4, 7, 8], [3, 4, 7, 9], [3, 4, 8, 9], [3, 5, 6, 7], [3, 5, 6, 8], [3, 5, 6, 9], [3, 5, 7, 8], [3, 5, 7, 9], [3, 5, 8, 9], [3, 6, 7, 8], [3, 6, 7, 9], [3, 6, 8, 9], [3, 7, 8, 9], [4, 5, 6, 7], [4, 5, 6, 8], [4, 5, 6, 9], [4, 5, 7, 8], [4, 5, 7, 9], [4, 5, 8, 9], [4, 6, 7, 8], [4, 6, 7, 9], [4, 6, 8, 9], [4, 7, 8, 9], [5, 6, 7, 8], [5, 6, 7, 9], [5, 6, 8, 9], [5, 7, 8, 9], [6, 7, 8, 9]])\n assert answers_match(candidate(n=17, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 2, 10], [1, 2, 11], [1, 2, 12], [1, 2, 13], [1, 2, 14], [1, 2, 15], [1, 2, 16], [1, 2, 17], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 3, 10], [1, 3, 11], [1, 3, 12], [1, 3, 13], [1, 3, 14], [1, 3, 15], [1, 3, 16], [1, 3, 17], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 4, 10], [1, 4, 11], [1, 4, 12], [1, 4, 13], [1, 4, 14], [1, 4, 15], [1, 4, 16], [1, 4, 17], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], [1, 5, 10], [1, 5, 11], [1, 5, 12], [1, 5, 13], [1, 5, 14], [1, 5, 15], [1, 5, 16], [1, 5, 17], [1, 6, 7], [1, 6, 8], [1, 6, 9], [1, 6, 10], [1, 6, 11], [1, 6, 12], [1, 6, 13], [1, 6, 14], [1, 6, 15], [1, 6, 16], [1, 6, 17], [1, 7, 8], [1, 7, 9], [1, 7, 10], [1, 7, 11], [1, 7, 12], [1, 7, 13], [1, 7, 14], [1, 7, 15], [1, 7, 16], [1, 7, 17], [1, 8, 9], [1, 8, 10], [1, 8, 11], [1, 8, 12], [1, 8, 13], [1, 8, 14], [1, 8, 15], [1, 8, 16], [1, 8, 17], [1, 9, 10], [1, 9, 11], [1, 9, 12], [1, 9, 13], [1, 9, 14], [1, 9, 15], [1, 9, 16], [1, 9, 17], [1, 10, 11], [1, 10, 12], [1, 10, 13], [1, 10, 14], [1, 10, 15], [1, 10, 16], [1, 10, 17], [1, 11, 12], [1, 11, 13], [1, 11, 14], [1, 11, 15], [1, 11, 16], [1, 11, 17], [1, 12, 13], [1, 12, 14], [1, 12, 15], [1, 12, 16], [1, 12, 17], [1, 13, 14], [1, 13, 15], [1, 13, 16], [1, 13, 17], [1, 14, 15], [1, 14, 16], [1, 14, 17], [1, 15, 16], [1, 15, 17], [1, 16, 17], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], [2, 3, 10], [2, 3, 11], [2, 3, 12], [2, 3, 13], [2, 3, 14], [2, 3, 15], [2, 3, 16], [2, 3, 17], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], [2, 4, 9], [2, 4, 10], [2, 4, 11], [2, 4, 12], [2, 4, 13], [2, 4, 14], [2, 4, 15], [2, 4, 16], [2, 4, 17], [2, 5, 6], [2, 5, 7], [2, 5, 8], [2, 5, 9], [2, 5, 10], [2, 5, 11], [2, 5, 12], [2, 5, 13], [2, 5, 14], [2, 5, 15], [2, 5, 16], [2, 5, 17], [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 6, 10], [2, 6, 11], [2, 6, 12], [2, 6, 13], [2, 6, 14], [2, 6, 15], [2, 6, 16], [2, 6, 17], [2, 7, 8], [2, 7, 9], [2, 7, 10], [2, 7, 11], [2, 7, 12], [2, 7, 13], [2, 7, 14], [2, 7, 15], [2, 7, 16], [2, 7, 17], [2, 8, 9], [2, 8, 10], [2, 8, 11], [2, 8, 12], [2, 8, 13], [2, 8, 14], [2, 8, 15], [2, 8, 16], [2, 8, 17], [2, 9, 10], [2, 9, 11], [2, 9, 12], [2, 9, 13], [2, 9, 14], [2, 9, 15], [2, 9, 16], [2, 9, 17], [2, 10, 11], [2, 10, 12], [2, 10, 13], [2, 10, 14], [2, 10, 15], [2, 10, 16], [2, 10, 17], [2, 11, 12], [2, 11, 13], [2, 11, 14], [2, 11, 15], [2, 11, 16], [2, 11, 17], [2, 12, 13], [2, 12, 14], [2, 12, 15], [2, 12, 16], [2, 12, 17], [2, 13, 14], [2, 13, 15], [2, 13, 16], [2, 13, 17], [2, 14, 15], [2, 14, 16], [2, 14, 17], [2, 15, 16], [2, 15, 17], [2, 16, 17], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 4, 10], [3, 4, 11], [3, 4, 12], [3, 4, 13], [3, 4, 14], [3, 4, 15], [3, 4, 16], [3, 4, 17], [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 5, 10], [3, 5, 11], [3, 5, 12], [3, 5, 13], [3, 5, 14], [3, 5, 15], [3, 5, 16], [3, 5, 17], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 6, 10], [3, 6, 11], [3, 6, 12], [3, 6, 13], [3, 6, 14], [3, 6, 15], [3, 6, 16], [3, 6, 17], [3, 7, 8], [3, 7, 9], [3, 7, 10], [3, 7, 11], [3, 7, 12], [3, 7, 13], [3, 7, 14], [3, 7, 15], [3, 7, 16], [3, 7, 17], [3, 8, 9], [3, 8, 10], [3, 8, 11], [3, 8, 12], [3, 8, 13], [3, 8, 14], [3, 8, 15], [3, 8, 16], [3, 8, 17], [3, 9, 10], [3, 9, 11], [3, 9, 12], [3, 9, 13], [3, 9, 14], [3, 9, 15], [3, 9, 16], [3, 9, 17], [3, 10, 11], [3, 10, 12], [3, 10, 13], [3, 10, 14], [3, 10, 15], [3, 10, 16], [3, 10, 17], [3, 11, 12], [3, 11, 13], [3, 11, 14], [3, 11, 15], [3, 11, 16], [3, 11, 17], [3, 12, 13], [3, 12, 14], [3, 12, 15], [3, 12, 16], [3, 12, 17], [3, 13, 14], [3, 13, 15], [3, 13, 16], [3, 13, 17], [3, 14, 15], [3, 14, 16], [3, 14, 17], [3, 15, 16], [3, 15, 17], [3, 16, 17], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 5, 10], [4, 5, 11], [4, 5, 12], [4, 5, 13], [4, 5, 14], [4, 5, 15], [4, 5, 16], [4, 5, 17], [4, 6, 7], [4, 6, 8], [4, 6, 9], [4, 6, 10], [4, 6, 11], [4, 6, 12], [4, 6, 13], [4, 6, 14], [4, 6, 15], [4, 6, 16], [4, 6, 17], [4, 7, 8], [4, 7, 9], [4, 7, 10], [4, 7, 11], [4, 7, 12], [4, 7, 13], [4, 7, 14], [4, 7, 15], [4, 7, 16], [4, 7, 17], [4, 8, 9], [4, 8, 10], [4, 8, 11], [4, 8, 12], [4, 8, 13], [4, 8, 14], [4, 8, 15], [4, 8, 16], [4, 8, 17], [4, 9, 10], [4, 9, 11], [4, 9, 12], [4, 9, 13], [4, 9, 14], [4, 9, 15], [4, 9, 16], [4, 9, 17], [4, 10, 11], [4, 10, 12], [4, 10, 13], [4, 10, 14], [4, 10, 15], [4, 10, 16], [4, 10, 17], [4, 11, 12], [4, 11, 13], [4, 11, 14], [4, 11, 15], [4, 11, 16], [4, 11, 17], [4, 12, 13], [4, 12, 14], [4, 12, 15], [4, 12, 16], [4, 12, 17], [4, 13, 14], [4, 13, 15], [4, 13, 16], [4, 13, 17], [4, 14, 15], [4, 14, 16], [4, 14, 17], [4, 15, 16], [4, 15, 17], [4, 16, 17], [5, 6, 7], [5, 6, 8], [5, 6, 9], [5, 6, 10], [5, 6, 11], [5, 6, 12], [5, 6, 13], [5, 6, 14], [5, 6, 15], [5, 6, 16], [5, 6, 17], [5, 7, 8], [5, 7, 9], [5, 7, 10], [5, 7, 11], [5, 7, 12], [5, 7, 13], [5, 7, 14], [5, 7, 15], [5, 7, 16], [5, 7, 17], [5, 8, 9], [5, 8, 10], [5, 8, 11], [5, 8, 12], [5, 8, 13], [5, 8, 14], [5, 8, 15], [5, 8, 16], [5, 8, 17], [5, 9, 10], [5, 9, 11], [5, 9, 12], [5, 9, 13], [5, 9, 14], [5, 9, 15], [5, 9, 16], [5, 9, 17], [5, 10, 11], [5, 10, 12], [5, 10, 13], [5, 10, 14], [5, 10, 15], [5, 10, 16], [5, 10, 17], [5, 11, 12], [5, 11, 13], [5, 11, 14], [5, 11, 15], [5, 11, 16], [5, 11, 17], [5, 12, 13], [5, 12, 14], [5, 12, 15], [5, 12, 16], [5, 12, 17], [5, 13, 14], [5, 13, 15], [5, 13, 16], [5, 13, 17], [5, 14, 15], [5, 14, 16], [5, 14, 17], [5, 15, 16], [5, 15, 17], [5, 16, 17], [6, 7, 8], [6, 7, 9], [6, 7, 10], [6, 7, 11], [6, 7, 12], [6, 7, 13], [6, 7, 14], [6, 7, 15], [6, 7, 16], [6, 7, 17], [6, 8, 9], [6, 8, 10], [6, 8, 11], [6, 8, 12], [6, 8, 13], [6, 8, 14], [6, 8, 15], [6, 8, 16], [6, 8, 17], [6, 9, 10], [6, 9, 11], [6, 9, 12], [6, 9, 13], [6, 9, 14], [6, 9, 15], [6, 9, 16], [6, 9, 17], [6, 10, 11], [6, 10, 12], [6, 10, 13], [6, 10, 14], [6, 10, 15], [6, 10, 16], [6, 10, 17], [6, 11, 12], [6, 11, 13], [6, 11, 14], [6, 11, 15], [6, 11, 16], [6, 11, 17], [6, 12, 13], [6, 12, 14], [6, 12, 15], [6, 12, 16], [6, 12, 17], [6, 13, 14], [6, 13, 15], [6, 13, 16], [6, 13, 17], [6, 14, 15], [6, 14, 16], [6, 14, 17], [6, 15, 16], [6, 15, 17], [6, 16, 17], [7, 8, 9], [7, 8, 10], [7, 8, 11], [7, 8, 12], [7, 8, 13], [7, 8, 14], [7, 8, 15], [7, 8, 16], [7, 8, 17], [7, 9, 10], [7, 9, 11], [7, 9, 12], [7, 9, 13], [7, 9, 14], [7, 9, 15], [7, 9, 16], [7, 9, 17], [7, 10, 11], [7, 10, 12], [7, 10, 13], [7, 10, 14], [7, 10, 15], [7, 10, 16], [7, 10, 17], [7, 11, 12], [7, 11, 13], [7, 11, 14], [7, 11, 15], [7, 11, 16], [7, 11, 17], [7, 12, 13], [7, 12, 14], [7, 12, 15], [7, 12, 16], [7, 12, 17], [7, 13, 14], [7, 13, 15], [7, 13, 16], [7, 13, 17], [7, 14, 15], [7, 14, 16], [7, 14, 17], [7, 15, 16], [7, 15, 17], [7, 16, 17], [8, 9, 10], [8, 9, 11], [8, 9, 12], [8, 9, 13], [8, 9, 14], [8, 9, 15], [8, 9, 16], [8, 9, 17], [8, 10, 11], [8, 10, 12], [8, 10, 13], [8, 10, 14], [8, 10, 15], [8, 10, 16], [8, 10, 17], [8, 11, 12], [8, 11, 13], [8, 11, 14], [8, 11, 15], [8, 11, 16], [8, 11, 17], [8, 12, 13], [8, 12, 14], [8, 12, 15], [8, 12, 16], [8, 12, 17], [8, 13, 14], [8, 13, 15], [8, 13, 16], [8, 13, 17], [8, 14, 15], [8, 14, 16], [8, 14, 17], [8, 15, 16], [8, 15, 17], [8, 16, 17], [9, 10, 11], [9, 10, 12], [9, 10, 13], [9, 10, 14], [9, 10, 15], [9, 10, 16], [9, 10, 17], [9, 11, 12], [9, 11, 13], [9, 11, 14], [9, 11, 15], [9, 11, 16], [9, 11, 17], [9, 12, 13], [9, 12, 14], [9, 12, 15], [9, 12, 16], [9, 12, 17], [9, 13, 14], [9, 13, 15], [9, 13, 16], [9, 13, 17], [9, 14, 15], [9, 14, 16], [9, 14, 17], [9, 15, 16], [9, 15, 17], [9, 16, 17], [10, 11, 12], [10, 11, 13], [10, 11, 14], [10, 11, 15], [10, 11, 16], [10, 11, 17], [10, 12, 13], [10, 12, 14], [10, 12, 15], [10, 12, 16], [10, 12, 17], [10, 13, 14], [10, 13, 15], [10, 13, 16], [10, 13, 17], [10, 14, 15], [10, 14, 16], [10, 14, 17], [10, 15, 16], [10, 15, 17], [10, 16, 17], [11, 12, 13], [11, 12, 14], [11, 12, 15], [11, 12, 16], [11, 12, 17], [11, 13, 14], [11, 13, 15], [11, 13, 16], [11, 13, 17], [11, 14, 15], [11, 14, 16], [11, 14, 17], [11, 15, 16], [11, 15, 17], [11, 16, 17], [12, 13, 14], [12, 13, 15], [12, 13, 16], [12, 13, 17], [12, 14, 15], [12, 14, 16], [12, 14, 17], [12, 15, 16], [12, 15, 17], [12, 16, 17], [13, 14, 15], [13, 14, 16], [13, 14, 17], [13, 15, 16], [13, 15, 17], [13, 16, 17], [14, 15, 16], [14, 15, 17], [14, 16, 17], [15, 16, 17]])\n assert answers_match(candidate(n=9, k=5), [[1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9], [1, 2, 3, 8, 9], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9], [1, 2, 4, 8, 9], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9], [1, 2, 5, 8, 9], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9], [1, 2, 6, 8, 9], [1, 2, 7, 8, 9], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9], [1, 3, 4, 8, 9], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9], [1, 3, 5, 8, 9], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9], [1, 3, 6, 8, 9], [1, 3, 7, 8, 9], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9], [1, 4, 5, 8, 9], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9], [1, 4, 6, 8, 9], [1, 4, 7, 8, 9], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9], [1, 5, 6, 8, 9], [1, 5, 7, 8, 9], [1, 6, 7, 8, 9], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9], [2, 3, 4, 8, 9], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9], [2, 3, 5, 8, 9], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9], [2, 3, 6, 8, 9], [2, 3, 7, 8, 9], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9], [2, 4, 5, 8, 9], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9], [2, 4, 6, 8, 9], [2, 4, 7, 8, 9], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9], [2, 5, 6, 8, 9], [2, 5, 7, 8, 9], [2, 6, 7, 8, 9], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9], [3, 4, 5, 8, 9], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9], [3, 4, 6, 8, 9], [3, 4, 7, 8, 9], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9], [3, 5, 6, 8, 9], [3, 5, 7, 8, 9], [3, 6, 7, 8, 9], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9], [4, 5, 6, 8, 9], [4, 5, 7, 8, 9], [4, 6, 7, 8, 9], [5, 6, 7, 8, 9]])\n assert answers_match(candidate(n=9, k=9), [[1, 2, 3, 4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(n=13, k=2), [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11], [1, 12], [1, 13], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11], [2, 12], [2, 13], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [3, 13], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12], [4, 13], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10], [5, 11], [5, 12], [5, 13], [6, 7], [6, 8], [6, 9], [6, 10], [6, 11], [6, 12], [6, 13], [7, 8], [7, 9], [7, 10], [7, 11], [7, 12], [7, 13], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13], [9, 10], [9, 11], [9, 12], [9, 13], [10, 11], [10, 12], [10, 13], [11, 12], [11, 13], [12, 13]])\n assert answers_match(candidate(n=11, k=10), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], [1, 2, 3, 4, 5, 6, 7, 9, 10, 11], [1, 2, 3, 4, 5, 6, 8, 9, 10, 11], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11], [1, 2, 3, 4, 6, 7, 8, 9, 10, 11], [1, 2, 3, 5, 6, 7, 8, 9, 10, 11], [1, 2, 4, 5, 6, 7, 8, 9, 10, 11], [1, 3, 4, 5, 6, 7, 8, 9, 10, 11], [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]])\n assert answers_match(candidate(n=7, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 5, 6], [1, 5, 7], [1, 6, 7], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 5, 6], [2, 5, 7], [2, 6, 7], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 5, 6], [3, 5, 7], [3, 6, 7], [4, 5, 6], [4, 5, 7], [4, 6, 7], [5, 6, 7]])\n assert answers_match(candidate(n=9, k=8), [[1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(n=15, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 2, 10], [1, 2, 11], [1, 2, 12], [1, 2, 13], [1, 2, 14], [1, 2, 15], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 3, 10], [1, 3, 11], [1, 3, 12], [1, 3, 13], [1, 3, 14], [1, 3, 15], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 4, 10], [1, 4, 11], [1, 4, 12], [1, 4, 13], [1, 4, 14], [1, 4, 15], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], [1, 5, 10], [1, 5, 11], [1, 5, 12], [1, 5, 13], [1, 5, 14], [1, 5, 15], [1, 6, 7], [1, 6, 8], [1, 6, 9], [1, 6, 10], [1, 6, 11], [1, 6, 12], [1, 6, 13], [1, 6, 14], [1, 6, 15], [1, 7, 8], [1, 7, 9], [1, 7, 10], [1, 7, 11], [1, 7, 12], [1, 7, 13], [1, 7, 14], [1, 7, 15], [1, 8, 9], [1, 8, 10], [1, 8, 11], [1, 8, 12], [1, 8, 13], [1, 8, 14], [1, 8, 15], [1, 9, 10], [1, 9, 11], [1, 9, 12], [1, 9, 13], [1, 9, 14], [1, 9, 15], [1, 10, 11], [1, 10, 12], [1, 10, 13], [1, 10, 14], [1, 10, 15], [1, 11, 12], [1, 11, 13], [1, 11, 14], [1, 11, 15], [1, 12, 13], [1, 12, 14], [1, 12, 15], [1, 13, 14], [1, 13, 15], [1, 14, 15], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], [2, 3, 10], [2, 3, 11], [2, 3, 12], [2, 3, 13], [2, 3, 14], [2, 3, 15], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], [2, 4, 9], [2, 4, 10], [2, 4, 11], [2, 4, 12], [2, 4, 13], [2, 4, 14], [2, 4, 15], [2, 5, 6], [2, 5, 7], [2, 5, 8], [2, 5, 9], [2, 5, 10], [2, 5, 11], [2, 5, 12], [2, 5, 13], [2, 5, 14], [2, 5, 15], [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 6, 10], [2, 6, 11], [2, 6, 12], [2, 6, 13], [2, 6, 14], [2, 6, 15], [2, 7, 8], [2, 7, 9], [2, 7, 10], [2, 7, 11], [2, 7, 12], [2, 7, 13], [2, 7, 14], [2, 7, 15], [2, 8, 9], [2, 8, 10], [2, 8, 11], [2, 8, 12], [2, 8, 13], [2, 8, 14], [2, 8, 15], [2, 9, 10], [2, 9, 11], [2, 9, 12], [2, 9, 13], [2, 9, 14], [2, 9, 15], [2, 10, 11], [2, 10, 12], [2, 10, 13], [2, 10, 14], [2, 10, 15], [2, 11, 12], [2, 11, 13], [2, 11, 14], [2, 11, 15], [2, 12, 13], [2, 12, 14], [2, 12, 15], [2, 13, 14], [2, 13, 15], [2, 14, 15], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 4, 10], [3, 4, 11], [3, 4, 12], [3, 4, 13], [3, 4, 14], [3, 4, 15], [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 5, 10], [3, 5, 11], [3, 5, 12], [3, 5, 13], [3, 5, 14], [3, 5, 15], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 6, 10], [3, 6, 11], [3, 6, 12], [3, 6, 13], [3, 6, 14], [3, 6, 15], [3, 7, 8], [3, 7, 9], [3, 7, 10], [3, 7, 11], [3, 7, 12], [3, 7, 13], [3, 7, 14], [3, 7, 15], [3, 8, 9], [3, 8, 10], [3, 8, 11], [3, 8, 12], [3, 8, 13], [3, 8, 14], [3, 8, 15], [3, 9, 10], [3, 9, 11], [3, 9, 12], [3, 9, 13], [3, 9, 14], [3, 9, 15], [3, 10, 11], [3, 10, 12], [3, 10, 13], [3, 10, 14], [3, 10, 15], [3, 11, 12], [3, 11, 13], [3, 11, 14], [3, 11, 15], [3, 12, 13], [3, 12, 14], [3, 12, 15], [3, 13, 14], [3, 13, 15], [3, 14, 15], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 5, 10], [4, 5, 11], [4, 5, 12], [4, 5, 13], [4, 5, 14], [4, 5, 15], [4, 6, 7], [4, 6, 8], [4, 6, 9], [4, 6, 10], [4, 6, 11], [4, 6, 12], [4, 6, 13], [4, 6, 14], [4, 6, 15], [4, 7, 8], [4, 7, 9], [4, 7, 10], [4, 7, 11], [4, 7, 12], [4, 7, 13], [4, 7, 14], [4, 7, 15], [4, 8, 9], [4, 8, 10], [4, 8, 11], [4, 8, 12], [4, 8, 13], [4, 8, 14], [4, 8, 15], [4, 9, 10], [4, 9, 11], [4, 9, 12], [4, 9, 13], [4, 9, 14], [4, 9, 15], [4, 10, 11], [4, 10, 12], [4, 10, 13], [4, 10, 14], [4, 10, 15], [4, 11, 12], [4, 11, 13], [4, 11, 14], [4, 11, 15], [4, 12, 13], [4, 12, 14], [4, 12, 15], [4, 13, 14], [4, 13, 15], [4, 14, 15], [5, 6, 7], [5, 6, 8], [5, 6, 9], [5, 6, 10], [5, 6, 11], [5, 6, 12], [5, 6, 13], [5, 6, 14], [5, 6, 15], [5, 7, 8], [5, 7, 9], [5, 7, 10], [5, 7, 11], [5, 7, 12], [5, 7, 13], [5, 7, 14], [5, 7, 15], [5, 8, 9], [5, 8, 10], [5, 8, 11], [5, 8, 12], [5, 8, 13], [5, 8, 14], [5, 8, 15], [5, 9, 10], [5, 9, 11], [5, 9, 12], [5, 9, 13], [5, 9, 14], [5, 9, 15], [5, 10, 11], [5, 10, 12], [5, 10, 13], [5, 10, 14], [5, 10, 15], [5, 11, 12], [5, 11, 13], [5, 11, 14], [5, 11, 15], [5, 12, 13], [5, 12, 14], [5, 12, 15], [5, 13, 14], [5, 13, 15], [5, 14, 15], [6, 7, 8], [6, 7, 9], [6, 7, 10], [6, 7, 11], [6, 7, 12], [6, 7, 13], [6, 7, 14], [6, 7, 15], [6, 8, 9], [6, 8, 10], [6, 8, 11], [6, 8, 12], [6, 8, 13], [6, 8, 14], [6, 8, 15], [6, 9, 10], [6, 9, 11], [6, 9, 12], [6, 9, 13], [6, 9, 14], [6, 9, 15], [6, 10, 11], [6, 10, 12], [6, 10, 13], [6, 10, 14], [6, 10, 15], [6, 11, 12], [6, 11, 13], [6, 11, 14], [6, 11, 15], [6, 12, 13], [6, 12, 14], [6, 12, 15], [6, 13, 14], [6, 13, 15], [6, 14, 15], [7, 8, 9], [7, 8, 10], [7, 8, 11], [7, 8, 12], [7, 8, 13], [7, 8, 14], [7, 8, 15], [7, 9, 10], [7, 9, 11], [7, 9, 12], [7, 9, 13], [7, 9, 14], [7, 9, 15], [7, 10, 11], [7, 10, 12], [7, 10, 13], [7, 10, 14], [7, 10, 15], [7, 11, 12], [7, 11, 13], [7, 11, 14], [7, 11, 15], [7, 12, 13], [7, 12, 14], [7, 12, 15], [7, 13, 14], [7, 13, 15], [7, 14, 15], [8, 9, 10], [8, 9, 11], [8, 9, 12], [8, 9, 13], [8, 9, 14], [8, 9, 15], [8, 10, 11], [8, 10, 12], [8, 10, 13], [8, 10, 14], [8, 10, 15], [8, 11, 12], [8, 11, 13], [8, 11, 14], [8, 11, 15], [8, 12, 13], [8, 12, 14], [8, 12, 15], [8, 13, 14], [8, 13, 15], [8, 14, 15], [9, 10, 11], [9, 10, 12], [9, 10, 13], [9, 10, 14], [9, 10, 15], [9, 11, 12], [9, 11, 13], [9, 11, 14], [9, 11, 15], [9, 12, 13], [9, 12, 14], [9, 12, 15], [9, 13, 14], [9, 13, 15], [9, 14, 15], [10, 11, 12], [10, 11, 13], [10, 11, 14], [10, 11, 15], [10, 12, 13], [10, 12, 14], [10, 12, 15], [10, 13, 14], [10, 13, 15], [10, 14, 15], [11, 12, 13], [11, 12, 14], [11, 12, 15], [11, 13, 14], [11, 13, 15], [11, 14, 15], [12, 13, 14], [12, 13, 15], [12, 14, 15], [13, 14, 15]])\n assert answers_match(candidate(n=8, k=6), [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 7, 8], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 7, 8], [1, 2, 3, 6, 7, 8], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 7, 8], [1, 2, 4, 6, 7, 8], [1, 2, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 7, 8], [1, 3, 4, 6, 7, 8], [1, 3, 5, 6, 7, 8], [1, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 7, 8], [2, 3, 4, 6, 7, 8], [2, 3, 5, 6, 7, 8], [2, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 8]])\n assert answers_match(candidate(n=10, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 2, 10], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 3, 10], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 4, 10], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], [1, 5, 10], [1, 6, 7], [1, 6, 8], [1, 6, 9], [1, 6, 10], [1, 7, 8], [1, 7, 9], [1, 7, 10], [1, 8, 9], [1, 8, 10], [1, 9, 10], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], [2, 3, 10], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], [2, 4, 9], [2, 4, 10], [2, 5, 6], [2, 5, 7], [2, 5, 8], [2, 5, 9], [2, 5, 10], [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 6, 10], [2, 7, 8], [2, 7, 9], [2, 7, 10], [2, 8, 9], [2, 8, 10], [2, 9, 10], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 4, 10], [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 5, 10], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 6, 10], [3, 7, 8], [3, 7, 9], [3, 7, 10], [3, 8, 9], [3, 8, 10], [3, 9, 10], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 5, 10], [4, 6, 7], [4, 6, 8], [4, 6, 9], [4, 6, 10], [4, 7, 8], [4, 7, 9], [4, 7, 10], [4, 8, 9], [4, 8, 10], [4, 9, 10], [5, 6, 7], [5, 6, 8], [5, 6, 9], [5, 6, 10], [5, 7, 8], [5, 7, 9], [5, 7, 10], [5, 8, 9], [5, 8, 10], [5, 9, 10], [6, 7, 8], [6, 7, 9], [6, 7, 10], [6, 8, 9], [6, 8, 10], [6, 9, 10], [7, 8, 9], [7, 8, 10], [7, 9, 10], [8, 9, 10]])\n assert answers_match(candidate(n=10, k=9), [[1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert answers_match(candidate(n=13, k=10), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 12], [1, 2, 3, 4, 5, 6, 7, 8, 9, 13], [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 10, 12], [1, 2, 3, 4, 5, 6, 7, 8, 10, 13], [1, 2, 3, 4, 5, 6, 7, 8, 11, 12], [1, 2, 3, 4, 5, 6, 7, 8, 11, 13], [1, 2, 3, 4, 5, 6, 7, 8, 12, 13], [1, 2, 3, 4, 5, 6, 7, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 9, 10, 12], [1, 2, 3, 4, 5, 6, 7, 9, 10, 13], [1, 2, 3, 4, 5, 6, 7, 9, 11, 12], [1, 2, 3, 4, 5, 6, 7, 9, 11, 13], [1, 2, 3, 4, 5, 6, 7, 9, 12, 13], [1, 2, 3, 4, 5, 6, 7, 10, 11, 12], [1, 2, 3, 4, 5, 6, 7, 10, 11, 13], [1, 2, 3, 4, 5, 6, 7, 10, 12, 13], [1, 2, 3, 4, 5, 6, 7, 11, 12, 13], [1, 2, 3, 4, 5, 6, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 8, 9, 10, 12], [1, 2, 3, 4, 5, 6, 8, 9, 10, 13], [1, 2, 3, 4, 5, 6, 8, 9, 11, 12], [1, 2, 3, 4, 5, 6, 8, 9, 11, 13], [1, 2, 3, 4, 5, 6, 8, 9, 12, 13], [1, 2, 3, 4, 5, 6, 8, 10, 11, 12], [1, 2, 3, 4, 5, 6, 8, 10, 11, 13], [1, 2, 3, 4, 5, 6, 8, 10, 12, 13], [1, 2, 3, 4, 5, 6, 8, 11, 12, 13], [1, 2, 3, 4, 5, 6, 9, 10, 11, 12], [1, 2, 3, 4, 5, 6, 9, 10, 11, 13], [1, 2, 3, 4, 5, 6, 9, 10, 12, 13], [1, 2, 3, 4, 5, 6, 9, 11, 12, 13], [1, 2, 3, 4, 5, 6, 10, 11, 12, 13], [1, 2, 3, 4, 5, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 7, 8, 9, 10, 12], [1, 2, 3, 4, 5, 7, 8, 9, 10, 13], [1, 2, 3, 4, 5, 7, 8, 9, 11, 12], [1, 2, 3, 4, 5, 7, 8, 9, 11, 13], [1, 2, 3, 4, 5, 7, 8, 9, 12, 13], [1, 2, 3, 4, 5, 7, 8, 10, 11, 12], [1, 2, 3, 4, 5, 7, 8, 10, 11, 13], [1, 2, 3, 4, 5, 7, 8, 10, 12, 13], [1, 2, 3, 4, 5, 7, 8, 11, 12, 13], [1, 2, 3, 4, 5, 7, 9, 10, 11, 12], [1, 2, 3, 4, 5, 7, 9, 10, 11, 13], [1, 2, 3, 4, 5, 7, 9, 10, 12, 13], [1, 2, 3, 4, 5, 7, 9, 11, 12, 13], [1, 2, 3, 4, 5, 7, 10, 11, 12, 13], [1, 2, 3, 4, 5, 8, 9, 10, 11, 12], [1, 2, 3, 4, 5, 8, 9, 10, 11, 13], [1, 2, 3, 4, 5, 8, 9, 10, 12, 13], [1, 2, 3, 4, 5, 8, 9, 11, 12, 13], [1, 2, 3, 4, 5, 8, 10, 11, 12, 13], [1, 2, 3, 4, 5, 9, 10, 11, 12, 13], [1, 2, 3, 4, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 6, 7, 8, 9, 10, 12], [1, 2, 3, 4, 6, 7, 8, 9, 10, 13], [1, 2, 3, 4, 6, 7, 8, 9, 11, 12], [1, 2, 3, 4, 6, 7, 8, 9, 11, 13], [1, 2, 3, 4, 6, 7, 8, 9, 12, 13], [1, 2, 3, 4, 6, 7, 8, 10, 11, 12], [1, 2, 3, 4, 6, 7, 8, 10, 11, 13], [1, 2, 3, 4, 6, 7, 8, 10, 12, 13], [1, 2, 3, 4, 6, 7, 8, 11, 12, 13], [1, 2, 3, 4, 6, 7, 9, 10, 11, 12], [1, 2, 3, 4, 6, 7, 9, 10, 11, 13], [1, 2, 3, 4, 6, 7, 9, 10, 12, 13], [1, 2, 3, 4, 6, 7, 9, 11, 12, 13], [1, 2, 3, 4, 6, 7, 10, 11, 12, 13], [1, 2, 3, 4, 6, 8, 9, 10, 11, 12], [1, 2, 3, 4, 6, 8, 9, 10, 11, 13], [1, 2, 3, 4, 6, 8, 9, 10, 12, 13], [1, 2, 3, 4, 6, 8, 9, 11, 12, 13], [1, 2, 3, 4, 6, 8, 10, 11, 12, 13], [1, 2, 3, 4, 6, 9, 10, 11, 12, 13], [1, 2, 3, 4, 7, 8, 9, 10, 11, 12], [1, 2, 3, 4, 7, 8, 9, 10, 11, 13], [1, 2, 3, 4, 7, 8, 9, 10, 12, 13], [1, 2, 3, 4, 7, 8, 9, 11, 12, 13], [1, 2, 3, 4, 7, 8, 10, 11, 12, 13], [1, 2, 3, 4, 7, 9, 10, 11, 12, 13], [1, 2, 3, 4, 8, 9, 10, 11, 12, 13], [1, 2, 3, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 5, 6, 7, 8, 9, 10, 12], [1, 2, 3, 5, 6, 7, 8, 9, 10, 13], [1, 2, 3, 5, 6, 7, 8, 9, 11, 12], [1, 2, 3, 5, 6, 7, 8, 9, 11, 13], [1, 2, 3, 5, 6, 7, 8, 9, 12, 13], [1, 2, 3, 5, 6, 7, 8, 10, 11, 12], [1, 2, 3, 5, 6, 7, 8, 10, 11, 13], [1, 2, 3, 5, 6, 7, 8, 10, 12, 13], [1, 2, 3, 5, 6, 7, 8, 11, 12, 13], [1, 2, 3, 5, 6, 7, 9, 10, 11, 12], [1, 2, 3, 5, 6, 7, 9, 10, 11, 13], [1, 2, 3, 5, 6, 7, 9, 10, 12, 13], [1, 2, 3, 5, 6, 7, 9, 11, 12, 13], [1, 2, 3, 5, 6, 7, 10, 11, 12, 13], [1, 2, 3, 5, 6, 8, 9, 10, 11, 12], [1, 2, 3, 5, 6, 8, 9, 10, 11, 13], [1, 2, 3, 5, 6, 8, 9, 10, 12, 13], [1, 2, 3, 5, 6, 8, 9, 11, 12, 13], [1, 2, 3, 5, 6, 8, 10, 11, 12, 13], [1, 2, 3, 5, 6, 9, 10, 11, 12, 13], [1, 2, 3, 5, 7, 8, 9, 10, 11, 12], [1, 2, 3, 5, 7, 8, 9, 10, 11, 13], [1, 2, 3, 5, 7, 8, 9, 10, 12, 13], [1, 2, 3, 5, 7, 8, 9, 11, 12, 13], [1, 2, 3, 5, 7, 8, 10, 11, 12, 13], [1, 2, 3, 5, 7, 9, 10, 11, 12, 13], [1, 2, 3, 5, 8, 9, 10, 11, 12, 13], [1, 2, 3, 6, 7, 8, 9, 10, 11, 12], [1, 2, 3, 6, 7, 8, 9, 10, 11, 13], [1, 2, 3, 6, 7, 8, 9, 10, 12, 13], [1, 2, 3, 6, 7, 8, 9, 11, 12, 13], [1, 2, 3, 6, 7, 8, 10, 11, 12, 13], [1, 2, 3, 6, 7, 9, 10, 11, 12, 13], [1, 2, 3, 6, 8, 9, 10, 11, 12, 13], [1, 2, 3, 7, 8, 9, 10, 11, 12, 13], [1, 2, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 4, 5, 6, 7, 8, 9, 10, 12], [1, 2, 4, 5, 6, 7, 8, 9, 10, 13], [1, 2, 4, 5, 6, 7, 8, 9, 11, 12], [1, 2, 4, 5, 6, 7, 8, 9, 11, 13], [1, 2, 4, 5, 6, 7, 8, 9, 12, 13], [1, 2, 4, 5, 6, 7, 8, 10, 11, 12], [1, 2, 4, 5, 6, 7, 8, 10, 11, 13], [1, 2, 4, 5, 6, 7, 8, 10, 12, 13], [1, 2, 4, 5, 6, 7, 8, 11, 12, 13], [1, 2, 4, 5, 6, 7, 9, 10, 11, 12], [1, 2, 4, 5, 6, 7, 9, 10, 11, 13], [1, 2, 4, 5, 6, 7, 9, 10, 12, 13], [1, 2, 4, 5, 6, 7, 9, 11, 12, 13], [1, 2, 4, 5, 6, 7, 10, 11, 12, 13], [1, 2, 4, 5, 6, 8, 9, 10, 11, 12], [1, 2, 4, 5, 6, 8, 9, 10, 11, 13], [1, 2, 4, 5, 6, 8, 9, 10, 12, 13], [1, 2, 4, 5, 6, 8, 9, 11, 12, 13], [1, 2, 4, 5, 6, 8, 10, 11, 12, 13], [1, 2, 4, 5, 6, 9, 10, 11, 12, 13], [1, 2, 4, 5, 7, 8, 9, 10, 11, 12], [1, 2, 4, 5, 7, 8, 9, 10, 11, 13], [1, 2, 4, 5, 7, 8, 9, 10, 12, 13], [1, 2, 4, 5, 7, 8, 9, 11, 12, 13], [1, 2, 4, 5, 7, 8, 10, 11, 12, 13], [1, 2, 4, 5, 7, 9, 10, 11, 12, 13], [1, 2, 4, 5, 8, 9, 10, 11, 12, 13], [1, 2, 4, 6, 7, 8, 9, 10, 11, 12], [1, 2, 4, 6, 7, 8, 9, 10, 11, 13], [1, 2, 4, 6, 7, 8, 9, 10, 12, 13], [1, 2, 4, 6, 7, 8, 9, 11, 12, 13], [1, 2, 4, 6, 7, 8, 10, 11, 12, 13], [1, 2, 4, 6, 7, 9, 10, 11, 12, 13], [1, 2, 4, 6, 8, 9, 10, 11, 12, 13], [1, 2, 4, 7, 8, 9, 10, 11, 12, 13], [1, 2, 5, 6, 7, 8, 9, 10, 11, 12], [1, 2, 5, 6, 7, 8, 9, 10, 11, 13], [1, 2, 5, 6, 7, 8, 9, 10, 12, 13], [1, 2, 5, 6, 7, 8, 9, 11, 12, 13], [1, 2, 5, 6, 7, 8, 10, 11, 12, 13], [1, 2, 5, 6, 7, 9, 10, 11, 12, 13], [1, 2, 5, 6, 8, 9, 10, 11, 12, 13], [1, 2, 5, 7, 8, 9, 10, 11, 12, 13], [1, 2, 6, 7, 8, 9, 10, 11, 12, 13], [1, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 3, 4, 5, 6, 7, 8, 9, 10, 12], [1, 3, 4, 5, 6, 7, 8, 9, 10, 13], [1, 3, 4, 5, 6, 7, 8, 9, 11, 12], [1, 3, 4, 5, 6, 7, 8, 9, 11, 13], [1, 3, 4, 5, 6, 7, 8, 9, 12, 13], [1, 3, 4, 5, 6, 7, 8, 10, 11, 12], [1, 3, 4, 5, 6, 7, 8, 10, 11, 13], [1, 3, 4, 5, 6, 7, 8, 10, 12, 13], [1, 3, 4, 5, 6, 7, 8, 11, 12, 13], [1, 3, 4, 5, 6, 7, 9, 10, 11, 12], [1, 3, 4, 5, 6, 7, 9, 10, 11, 13], [1, 3, 4, 5, 6, 7, 9, 10, 12, 13], [1, 3, 4, 5, 6, 7, 9, 11, 12, 13], [1, 3, 4, 5, 6, 7, 10, 11, 12, 13], [1, 3, 4, 5, 6, 8, 9, 10, 11, 12], [1, 3, 4, 5, 6, 8, 9, 10, 11, 13], [1, 3, 4, 5, 6, 8, 9, 10, 12, 13], [1, 3, 4, 5, 6, 8, 9, 11, 12, 13], [1, 3, 4, 5, 6, 8, 10, 11, 12, 13], [1, 3, 4, 5, 6, 9, 10, 11, 12, 13], [1, 3, 4, 5, 7, 8, 9, 10, 11, 12], [1, 3, 4, 5, 7, 8, 9, 10, 11, 13], [1, 3, 4, 5, 7, 8, 9, 10, 12, 13], [1, 3, 4, 5, 7, 8, 9, 11, 12, 13], [1, 3, 4, 5, 7, 8, 10, 11, 12, 13], [1, 3, 4, 5, 7, 9, 10, 11, 12, 13], [1, 3, 4, 5, 8, 9, 10, 11, 12, 13], [1, 3, 4, 6, 7, 8, 9, 10, 11, 12], [1, 3, 4, 6, 7, 8, 9, 10, 11, 13], [1, 3, 4, 6, 7, 8, 9, 10, 12, 13], [1, 3, 4, 6, 7, 8, 9, 11, 12, 13], [1, 3, 4, 6, 7, 8, 10, 11, 12, 13], [1, 3, 4, 6, 7, 9, 10, 11, 12, 13], [1, 3, 4, 6, 8, 9, 10, 11, 12, 13], [1, 3, 4, 7, 8, 9, 10, 11, 12, 13], [1, 3, 5, 6, 7, 8, 9, 10, 11, 12], [1, 3, 5, 6, 7, 8, 9, 10, 11, 13], [1, 3, 5, 6, 7, 8, 9, 10, 12, 13], [1, 3, 5, 6, 7, 8, 9, 11, 12, 13], [1, 3, 5, 6, 7, 8, 10, 11, 12, 13], [1, 3, 5, 6, 7, 9, 10, 11, 12, 13], [1, 3, 5, 6, 8, 9, 10, 11, 12, 13], [1, 3, 5, 7, 8, 9, 10, 11, 12, 13], [1, 3, 6, 7, 8, 9, 10, 11, 12, 13], [1, 4, 5, 6, 7, 8, 9, 10, 11, 12], [1, 4, 5, 6, 7, 8, 9, 10, 11, 13], [1, 4, 5, 6, 7, 8, 9, 10, 12, 13], [1, 4, 5, 6, 7, 8, 9, 11, 12, 13], [1, 4, 5, 6, 7, 8, 10, 11, 12, 13], [1, 4, 5, 6, 7, 9, 10, 11, 12, 13], [1, 4, 5, 6, 8, 9, 10, 11, 12, 13], [1, 4, 5, 7, 8, 9, 10, 11, 12, 13], [1, 4, 6, 7, 8, 9, 10, 11, 12, 13], [1, 5, 6, 7, 8, 9, 10, 11, 12, 13], [2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [2, 3, 4, 5, 6, 7, 8, 9, 10, 12], [2, 3, 4, 5, 6, 7, 8, 9, 10, 13], [2, 3, 4, 5, 6, 7, 8, 9, 11, 12], [2, 3, 4, 5, 6, 7, 8, 9, 11, 13], [2, 3, 4, 5, 6, 7, 8, 9, 12, 13], [2, 3, 4, 5, 6, 7, 8, 10, 11, 12], [2, 3, 4, 5, 6, 7, 8, 10, 11, 13], [2, 3, 4, 5, 6, 7, 8, 10, 12, 13], [2, 3, 4, 5, 6, 7, 8, 11, 12, 13], [2, 3, 4, 5, 6, 7, 9, 10, 11, 12], [2, 3, 4, 5, 6, 7, 9, 10, 11, 13], [2, 3, 4, 5, 6, 7, 9, 10, 12, 13], [2, 3, 4, 5, 6, 7, 9, 11, 12, 13], [2, 3, 4, 5, 6, 7, 10, 11, 12, 13], [2, 3, 4, 5, 6, 8, 9, 10, 11, 12], [2, 3, 4, 5, 6, 8, 9, 10, 11, 13], [2, 3, 4, 5, 6, 8, 9, 10, 12, 13], [2, 3, 4, 5, 6, 8, 9, 11, 12, 13], [2, 3, 4, 5, 6, 8, 10, 11, 12, 13], [2, 3, 4, 5, 6, 9, 10, 11, 12, 13], [2, 3, 4, 5, 7, 8, 9, 10, 11, 12], [2, 3, 4, 5, 7, 8, 9, 10, 11, 13], [2, 3, 4, 5, 7, 8, 9, 10, 12, 13], [2, 3, 4, 5, 7, 8, 9, 11, 12, 13], [2, 3, 4, 5, 7, 8, 10, 11, 12, 13], [2, 3, 4, 5, 7, 9, 10, 11, 12, 13], [2, 3, 4, 5, 8, 9, 10, 11, 12, 13], [2, 3, 4, 6, 7, 8, 9, 10, 11, 12], [2, 3, 4, 6, 7, 8, 9, 10, 11, 13], [2, 3, 4, 6, 7, 8, 9, 10, 12, 13], [2, 3, 4, 6, 7, 8, 9, 11, 12, 13], [2, 3, 4, 6, 7, 8, 10, 11, 12, 13], [2, 3, 4, 6, 7, 9, 10, 11, 12, 13], [2, 3, 4, 6, 8, 9, 10, 11, 12, 13], [2, 3, 4, 7, 8, 9, 10, 11, 12, 13], [2, 3, 5, 6, 7, 8, 9, 10, 11, 12], [2, 3, 5, 6, 7, 8, 9, 10, 11, 13], [2, 3, 5, 6, 7, 8, 9, 10, 12, 13], [2, 3, 5, 6, 7, 8, 9, 11, 12, 13], [2, 3, 5, 6, 7, 8, 10, 11, 12, 13], [2, 3, 5, 6, 7, 9, 10, 11, 12, 13], [2, 3, 5, 6, 8, 9, 10, 11, 12, 13], [2, 3, 5, 7, 8, 9, 10, 11, 12, 13], [2, 3, 6, 7, 8, 9, 10, 11, 12, 13], [2, 4, 5, 6, 7, 8, 9, 10, 11, 12], [2, 4, 5, 6, 7, 8, 9, 10, 11, 13], [2, 4, 5, 6, 7, 8, 9, 10, 12, 13], [2, 4, 5, 6, 7, 8, 9, 11, 12, 13], [2, 4, 5, 6, 7, 8, 10, 11, 12, 13], [2, 4, 5, 6, 7, 9, 10, 11, 12, 13], [2, 4, 5, 6, 8, 9, 10, 11, 12, 13], [2, 4, 5, 7, 8, 9, 10, 11, 12, 13], [2, 4, 6, 7, 8, 9, 10, 11, 12, 13], [2, 5, 6, 7, 8, 9, 10, 11, 12, 13], [3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [3, 4, 5, 6, 7, 8, 9, 10, 11, 13], [3, 4, 5, 6, 7, 8, 9, 10, 12, 13], [3, 4, 5, 6, 7, 8, 9, 11, 12, 13], [3, 4, 5, 6, 7, 8, 10, 11, 12, 13], [3, 4, 5, 6, 7, 9, 10, 11, 12, 13], [3, 4, 5, 6, 8, 9, 10, 11, 12, 13], [3, 4, 5, 7, 8, 9, 10, 11, 12, 13], [3, 4, 6, 7, 8, 9, 10, 11, 12, 13], [3, 5, 6, 7, 8, 9, 10, 11, 12, 13], [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]])\n assert answers_match(candidate(n=14, k=2), [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11], [1, 12], [1, 13], [1, 14], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11], [2, 12], [2, 13], [2, 14], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [3, 13], [3, 14], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12], [4, 13], [4, 14], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10], [5, 11], [5, 12], [5, 13], [5, 14], [6, 7], [6, 8], [6, 9], [6, 10], [6, 11], [6, 12], [6, 13], [6, 14], [7, 8], [7, 9], [7, 10], [7, 11], [7, 12], [7, 13], [7, 14], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13], [8, 14], [9, 10], [9, 11], [9, 12], [9, 13], [9, 14], [10, 11], [10, 12], [10, 13], [10, 14], [11, 12], [11, 13], [11, 14], [12, 13], [12, 14], [13, 14]])\n assert answers_match(candidate(n=7, k=2), [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [3, 4], [3, 5], [3, 6], [3, 7], [4, 5], [4, 6], [4, 7], [5, 6], [5, 7], [6, 7]])\n assert answers_match(candidate(n=17, k=2), [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11], [1, 12], [1, 13], [1, 14], [1, 15], [1, 16], [1, 17], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11], [2, 12], [2, 13], [2, 14], [2, 15], [2, 16], [2, 17], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [3, 13], [3, 14], [3, 15], [3, 16], [3, 17], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [4, 10], [4, 11], [4, 12], [4, 13], [4, 14], [4, 15], [4, 16], [4, 17], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10], [5, 11], [5, 12], [5, 13], [5, 14], [5, 15], [5, 16], [5, 17], [6, 7], [6, 8], [6, 9], [6, 10], [6, 11], [6, 12], [6, 13], [6, 14], [6, 15], [6, 16], [6, 17], [7, 8], [7, 9], [7, 10], [7, 11], [7, 12], [7, 13], [7, 14], [7, 15], [7, 16], [7, 17], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13], [8, 14], [8, 15], [8, 16], [8, 17], [9, 10], [9, 11], [9, 12], [9, 13], [9, 14], [9, 15], [9, 16], [9, 17], [10, 11], [10, 12], [10, 13], [10, 14], [10, 15], [10, 16], [10, 17], [11, 12], [11, 13], [11, 14], [11, 15], [11, 16], [11, 17], [12, 13], [12, 14], [12, 15], [12, 16], [12, 17], [13, 14], [13, 15], [13, 16], [13, 17], [14, 15], [14, 16], [14, 17], [15, 16], [15, 17], [16, 17]])\n assert answers_match(candidate(n=12, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 2, 10], [1, 2, 11], [1, 2, 12], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 3, 10], [1, 3, 11], [1, 3, 12], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 4, 10], [1, 4, 11], [1, 4, 12], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], [1, 5, 10], [1, 5, 11], [1, 5, 12], [1, 6, 7], [1, 6, 8], [1, 6, 9], [1, 6, 10], [1, 6, 11], [1, 6, 12], [1, 7, 8], [1, 7, 9], [1, 7, 10], [1, 7, 11], [1, 7, 12], [1, 8, 9], [1, 8, 10], [1, 8, 11], [1, 8, 12], [1, 9, 10], [1, 9, 11], [1, 9, 12], [1, 10, 11], [1, 10, 12], [1, 11, 12], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], [2, 3, 10], [2, 3, 11], [2, 3, 12], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], [2, 4, 9], [2, 4, 10], [2, 4, 11], [2, 4, 12], [2, 5, 6], [2, 5, 7], [2, 5, 8], [2, 5, 9], [2, 5, 10], [2, 5, 11], [2, 5, 12], [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 6, 10], [2, 6, 11], [2, 6, 12], [2, 7, 8], [2, 7, 9], [2, 7, 10], [2, 7, 11], [2, 7, 12], [2, 8, 9], [2, 8, 10], [2, 8, 11], [2, 8, 12], [2, 9, 10], [2, 9, 11], [2, 9, 12], [2, 10, 11], [2, 10, 12], [2, 11, 12], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 4, 10], [3, 4, 11], [3, 4, 12], [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 5, 10], [3, 5, 11], [3, 5, 12], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 6, 10], [3, 6, 11], [3, 6, 12], [3, 7, 8], [3, 7, 9], [3, 7, 10], [3, 7, 11], [3, 7, 12], [3, 8, 9], [3, 8, 10], [3, 8, 11], [3, 8, 12], [3, 9, 10], [3, 9, 11], [3, 9, 12], [3, 10, 11], [3, 10, 12], [3, 11, 12], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 5, 10], [4, 5, 11], [4, 5, 12], [4, 6, 7], [4, 6, 8], [4, 6, 9], [4, 6, 10], [4, 6, 11], [4, 6, 12], [4, 7, 8], [4, 7, 9], [4, 7, 10], [4, 7, 11], [4, 7, 12], [4, 8, 9], [4, 8, 10], [4, 8, 11], [4, 8, 12], [4, 9, 10], [4, 9, 11], [4, 9, 12], [4, 10, 11], [4, 10, 12], [4, 11, 12], [5, 6, 7], [5, 6, 8], [5, 6, 9], [5, 6, 10], [5, 6, 11], [5, 6, 12], [5, 7, 8], [5, 7, 9], [5, 7, 10], [5, 7, 11], [5, 7, 12], [5, 8, 9], [5, 8, 10], [5, 8, 11], [5, 8, 12], [5, 9, 10], [5, 9, 11], [5, 9, 12], [5, 10, 11], [5, 10, 12], [5, 11, 12], [6, 7, 8], [6, 7, 9], [6, 7, 10], [6, 7, 11], [6, 7, 12], [6, 8, 9], [6, 8, 10], [6, 8, 11], [6, 8, 12], [6, 9, 10], [6, 9, 11], [6, 9, 12], [6, 10, 11], [6, 10, 12], [6, 11, 12], [7, 8, 9], [7, 8, 10], [7, 8, 11], [7, 8, 12], [7, 9, 10], [7, 9, 11], [7, 9, 12], [7, 10, 11], [7, 10, 12], [7, 11, 12], [8, 9, 10], [8, 9, 11], [8, 9, 12], [8, 10, 11], [8, 10, 12], [8, 11, 12], [9, 10, 11], [9, 10, 12], [9, 11, 12], [10, 11, 12]])\n assert answers_match(candidate(n=11, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 2, 9], [1, 2, 10], [1, 2, 11], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 3, 9], [1, 3, 10], [1, 3, 11], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 4, 9], [1, 4, 10], [1, 4, 11], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 5, 9], [1, 5, 10], [1, 5, 11], [1, 6, 7], [1, 6, 8], [1, 6, 9], [1, 6, 10], [1, 6, 11], [1, 7, 8], [1, 7, 9], [1, 7, 10], [1, 7, 11], [1, 8, 9], [1, 8, 10], [1, 8, 11], [1, 9, 10], [1, 9, 11], [1, 10, 11], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 3, 9], [2, 3, 10], [2, 3, 11], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], [2, 4, 9], [2, 4, 10], [2, 4, 11], [2, 5, 6], [2, 5, 7], [2, 5, 8], [2, 5, 9], [2, 5, 10], [2, 5, 11], [2, 6, 7], [2, 6, 8], [2, 6, 9], [2, 6, 10], [2, 6, 11], [2, 7, 8], [2, 7, 9], [2, 7, 10], [2, 7, 11], [2, 8, 9], [2, 8, 10], [2, 8, 11], [2, 9, 10], [2, 9, 11], [2, 10, 11], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 4, 8], [3, 4, 9], [3, 4, 10], [3, 4, 11], [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 5, 9], [3, 5, 10], [3, 5, 11], [3, 6, 7], [3, 6, 8], [3, 6, 9], [3, 6, 10], [3, 6, 11], [3, 7, 8], [3, 7, 9], [3, 7, 10], [3, 7, 11], [3, 8, 9], [3, 8, 10], [3, 8, 11], [3, 9, 10], [3, 9, 11], [3, 10, 11], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 5, 9], [4, 5, 10], [4, 5, 11], [4, 6, 7], [4, 6, 8], [4, 6, 9], [4, 6, 10], [4, 6, 11], [4, 7, 8], [4, 7, 9], [4, 7, 10], [4, 7, 11], [4, 8, 9], [4, 8, 10], [4, 8, 11], [4, 9, 10], [4, 9, 11], [4, 10, 11], [5, 6, 7], [5, 6, 8], [5, 6, 9], [5, 6, 10], [5, 6, 11], [5, 7, 8], [5, 7, 9], [5, 7, 10], [5, 7, 11], [5, 8, 9], [5, 8, 10], [5, 8, 11], [5, 9, 10], [5, 9, 11], [5, 10, 11], [6, 7, 8], [6, 7, 9], [6, 7, 10], [6, 7, 11], [6, 8, 9], [6, 8, 10], [6, 8, 11], [6, 9, 10], [6, 9, 11], [6, 10, 11], [7, 8, 9], [7, 8, 10], [7, 8, 11], [7, 9, 10], [7, 9, 11], [7, 10, 11], [8, 9, 10], [8, 9, 11], [8, 10, 11], [9, 10, 11]])\n assert answers_match(candidate(n=8, k=3), [[1, 2, 3], [1, 2, 4], [1, 2, 5], [1, 2, 6], [1, 2, 7], [1, 2, 8], [1, 3, 4], [1, 3, 5], [1, 3, 6], [1, 3, 7], [1, 3, 8], [1, 4, 5], [1, 4, 6], [1, 4, 7], [1, 4, 8], [1, 5, 6], [1, 5, 7], [1, 5, 8], [1, 6, 7], [1, 6, 8], [1, 7, 8], [2, 3, 4], [2, 3, 5], [2, 3, 6], [2, 3, 7], [2, 3, 8], [2, 4, 5], [2, 4, 6], [2, 4, 7], [2, 4, 8], [2, 5, 6], [2, 5, 7], [2, 5, 8], [2, 6, 7], [2, 6, 8], [2, 7, 8], [3, 4, 5], [3, 4, 6], [3, 4, 7], [3, 4, 8], [3, 5, 6], [3, 5, 7], [3, 5, 8], [3, 6, 7], [3, 6, 8], [3, 7, 8], [4, 5, 6], [4, 5, 7], [4, 5, 8], [4, 6, 7], [4, 6, 8], [4, 7, 8], [5, 6, 7], [5, 6, 8], [5, 7, 8], [6, 7, 8]])\n assert answers_match(candidate(n=8, k=4), [[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3, 8], [1, 2, 4, 5], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4, 8], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5, 8], [1, 2, 6, 7], [1, 2, 6, 8], [1, 2, 7, 8], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4, 8], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5, 8], [1, 3, 6, 7], [1, 3, 6, 8], [1, 3, 7, 8], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5, 8], [1, 4, 6, 7], [1, 4, 6, 8], [1, 4, 7, 8], [1, 5, 6, 7], [1, 5, 6, 8], [1, 5, 7, 8], [1, 6, 7, 8], [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4, 8], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5, 8], [2, 3, 6, 7], [2, 3, 6, 8], [2, 3, 7, 8], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5, 8], [2, 4, 6, 7], [2, 4, 6, 8], [2, 4, 7, 8], [2, 5, 6, 7], [2, 5, 6, 8], [2, 5, 7, 8], [2, 6, 7, 8], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5, 8], [3, 4, 6, 7], [3, 4, 6, 8], [3, 4, 7, 8], [3, 5, 6, 7], [3, 5, 6, 8], [3, 5, 7, 8], [3, 6, 7, 8], [4, 5, 6, 7], [4, 5, 6, 8], [4, 5, 7, 8], [4, 6, 7, 8], [5, 6, 7, 8]])\n assert answers_match(candidate(n=13, k=5), [[1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4, 11], [1, 2, 3, 4, 12], [1, 2, 3, 4, 13], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5, 11], [1, 2, 3, 5, 12], [1, 2, 3, 5, 13], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6, 11], [1, 2, 3, 6, 12], [1, 2, 3, 6, 13], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7, 11], [1, 2, 3, 7, 12], [1, 2, 3, 7, 13], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8, 11], [1, 2, 3, 8, 12], [1, 2, 3, 8, 13], [1, 2, 3, 9, 10], [1, 2, 3, 9, 11], [1, 2, 3, 9, 12], [1, 2, 3, 9, 13], [1, 2, 3, 10, 11], [1, 2, 3, 10, 12], [1, 2, 3, 10, 13], [1, 2, 3, 11, 12], [1, 2, 3, 11, 13], [1, 2, 3, 12, 13], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5, 11], [1, 2, 4, 5, 12], [1, 2, 4, 5, 13], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6, 11], [1, 2, 4, 6, 12], [1, 2, 4, 6, 13], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7, 11], [1, 2, 4, 7, 12], [1, 2, 4, 7, 13], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8, 11], [1, 2, 4, 8, 12], [1, 2, 4, 8, 13], [1, 2, 4, 9, 10], [1, 2, 4, 9, 11], [1, 2, 4, 9, 12], [1, 2, 4, 9, 13], [1, 2, 4, 10, 11], [1, 2, 4, 10, 12], [1, 2, 4, 10, 13], [1, 2, 4, 11, 12], [1, 2, 4, 11, 13], [1, 2, 4, 12, 13], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6, 11], [1, 2, 5, 6, 12], [1, 2, 5, 6, 13], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7, 11], [1, 2, 5, 7, 12], [1, 2, 5, 7, 13], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8, 11], [1, 2, 5, 8, 12], [1, 2, 5, 8, 13], [1, 2, 5, 9, 10], [1, 2, 5, 9, 11], [1, 2, 5, 9, 12], [1, 2, 5, 9, 13], [1, 2, 5, 10, 11], [1, 2, 5, 10, 12], [1, 2, 5, 10, 13], [1, 2, 5, 11, 12], [1, 2, 5, 11, 13], [1, 2, 5, 12, 13], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7, 11], [1, 2, 6, 7, 12], [1, 2, 6, 7, 13], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8, 11], [1, 2, 6, 8, 12], [1, 2, 6, 8, 13], [1, 2, 6, 9, 10], [1, 2, 6, 9, 11], [1, 2, 6, 9, 12], [1, 2, 6, 9, 13], [1, 2, 6, 10, 11], [1, 2, 6, 10, 12], [1, 2, 6, 10, 13], [1, 2, 6, 11, 12], [1, 2, 6, 11, 13], [1, 2, 6, 12, 13], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8, 11], [1, 2, 7, 8, 12], [1, 2, 7, 8, 13], [1, 2, 7, 9, 10], [1, 2, 7, 9, 11], [1, 2, 7, 9, 12], [1, 2, 7, 9, 13], [1, 2, 7, 10, 11], [1, 2, 7, 10, 12], [1, 2, 7, 10, 13], [1, 2, 7, 11, 12], [1, 2, 7, 11, 13], [1, 2, 7, 12, 13], [1, 2, 8, 9, 10], [1, 2, 8, 9, 11], [1, 2, 8, 9, 12], [1, 2, 8, 9, 13], [1, 2, 8, 10, 11], [1, 2, 8, 10, 12], [1, 2, 8, 10, 13], [1, 2, 8, 11, 12], [1, 2, 8, 11, 13], [1, 2, 8, 12, 13], [1, 2, 9, 10, 11], [1, 2, 9, 10, 12], [1, 2, 9, 10, 13], [1, 2, 9, 11, 12], [1, 2, 9, 11, 13], [1, 2, 9, 12, 13], [1, 2, 10, 11, 12], [1, 2, 10, 11, 13], [1, 2, 10, 12, 13], [1, 2, 11, 12, 13], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5, 11], [1, 3, 4, 5, 12], [1, 3, 4, 5, 13], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6, 11], [1, 3, 4, 6, 12], [1, 3, 4, 6, 13], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7, 11], [1, 3, 4, 7, 12], [1, 3, 4, 7, 13], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8, 11], [1, 3, 4, 8, 12], [1, 3, 4, 8, 13], [1, 3, 4, 9, 10], [1, 3, 4, 9, 11], [1, 3, 4, 9, 12], [1, 3, 4, 9, 13], [1, 3, 4, 10, 11], [1, 3, 4, 10, 12], [1, 3, 4, 10, 13], [1, 3, 4, 11, 12], [1, 3, 4, 11, 13], [1, 3, 4, 12, 13], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6, 11], [1, 3, 5, 6, 12], [1, 3, 5, 6, 13], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7, 11], [1, 3, 5, 7, 12], [1, 3, 5, 7, 13], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8, 11], [1, 3, 5, 8, 12], [1, 3, 5, 8, 13], [1, 3, 5, 9, 10], [1, 3, 5, 9, 11], [1, 3, 5, 9, 12], [1, 3, 5, 9, 13], [1, 3, 5, 10, 11], [1, 3, 5, 10, 12], [1, 3, 5, 10, 13], [1, 3, 5, 11, 12], [1, 3, 5, 11, 13], [1, 3, 5, 12, 13], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7, 11], [1, 3, 6, 7, 12], [1, 3, 6, 7, 13], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8, 11], [1, 3, 6, 8, 12], [1, 3, 6, 8, 13], [1, 3, 6, 9, 10], [1, 3, 6, 9, 11], [1, 3, 6, 9, 12], [1, 3, 6, 9, 13], [1, 3, 6, 10, 11], [1, 3, 6, 10, 12], [1, 3, 6, 10, 13], [1, 3, 6, 11, 12], [1, 3, 6, 11, 13], [1, 3, 6, 12, 13], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8, 11], [1, 3, 7, 8, 12], [1, 3, 7, 8, 13], [1, 3, 7, 9, 10], [1, 3, 7, 9, 11], [1, 3, 7, 9, 12], [1, 3, 7, 9, 13], [1, 3, 7, 10, 11], [1, 3, 7, 10, 12], [1, 3, 7, 10, 13], [1, 3, 7, 11, 12], [1, 3, 7, 11, 13], [1, 3, 7, 12, 13], [1, 3, 8, 9, 10], [1, 3, 8, 9, 11], [1, 3, 8, 9, 12], [1, 3, 8, 9, 13], [1, 3, 8, 10, 11], [1, 3, 8, 10, 12], [1, 3, 8, 10, 13], [1, 3, 8, 11, 12], [1, 3, 8, 11, 13], [1, 3, 8, 12, 13], [1, 3, 9, 10, 11], [1, 3, 9, 10, 12], [1, 3, 9, 10, 13], [1, 3, 9, 11, 12], [1, 3, 9, 11, 13], [1, 3, 9, 12, 13], [1, 3, 10, 11, 12], [1, 3, 10, 11, 13], [1, 3, 10, 12, 13], [1, 3, 11, 12, 13], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6, 11], [1, 4, 5, 6, 12], [1, 4, 5, 6, 13], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7, 11], [1, 4, 5, 7, 12], [1, 4, 5, 7, 13], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8, 11], [1, 4, 5, 8, 12], [1, 4, 5, 8, 13], [1, 4, 5, 9, 10], [1, 4, 5, 9, 11], [1, 4, 5, 9, 12], [1, 4, 5, 9, 13], [1, 4, 5, 10, 11], [1, 4, 5, 10, 12], [1, 4, 5, 10, 13], [1, 4, 5, 11, 12], [1, 4, 5, 11, 13], [1, 4, 5, 12, 13], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7, 11], [1, 4, 6, 7, 12], [1, 4, 6, 7, 13], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8, 11], [1, 4, 6, 8, 12], [1, 4, 6, 8, 13], [1, 4, 6, 9, 10], [1, 4, 6, 9, 11], [1, 4, 6, 9, 12], [1, 4, 6, 9, 13], [1, 4, 6, 10, 11], [1, 4, 6, 10, 12], [1, 4, 6, 10, 13], [1, 4, 6, 11, 12], [1, 4, 6, 11, 13], [1, 4, 6, 12, 13], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8, 11], [1, 4, 7, 8, 12], [1, 4, 7, 8, 13], [1, 4, 7, 9, 10], [1, 4, 7, 9, 11], [1, 4, 7, 9, 12], [1, 4, 7, 9, 13], [1, 4, 7, 10, 11], [1, 4, 7, 10, 12], [1, 4, 7, 10, 13], [1, 4, 7, 11, 12], [1, 4, 7, 11, 13], [1, 4, 7, 12, 13], [1, 4, 8, 9, 10], [1, 4, 8, 9, 11], [1, 4, 8, 9, 12], [1, 4, 8, 9, 13], [1, 4, 8, 10, 11], [1, 4, 8, 10, 12], [1, 4, 8, 10, 13], [1, 4, 8, 11, 12], [1, 4, 8, 11, 13], [1, 4, 8, 12, 13], [1, 4, 9, 10, 11], [1, 4, 9, 10, 12], [1, 4, 9, 10, 13], [1, 4, 9, 11, 12], [1, 4, 9, 11, 13], [1, 4, 9, 12, 13], [1, 4, 10, 11, 12], [1, 4, 10, 11, 13], [1, 4, 10, 12, 13], [1, 4, 11, 12, 13], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7, 11], [1, 5, 6, 7, 12], [1, 5, 6, 7, 13], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8, 11], [1, 5, 6, 8, 12], [1, 5, 6, 8, 13], [1, 5, 6, 9, 10], [1, 5, 6, 9, 11], [1, 5, 6, 9, 12], [1, 5, 6, 9, 13], [1, 5, 6, 10, 11], [1, 5, 6, 10, 12], [1, 5, 6, 10, 13], [1, 5, 6, 11, 12], [1, 5, 6, 11, 13], [1, 5, 6, 12, 13], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8, 11], [1, 5, 7, 8, 12], [1, 5, 7, 8, 13], [1, 5, 7, 9, 10], [1, 5, 7, 9, 11], [1, 5, 7, 9, 12], [1, 5, 7, 9, 13], [1, 5, 7, 10, 11], [1, 5, 7, 10, 12], [1, 5, 7, 10, 13], [1, 5, 7, 11, 12], [1, 5, 7, 11, 13], [1, 5, 7, 12, 13], [1, 5, 8, 9, 10], [1, 5, 8, 9, 11], [1, 5, 8, 9, 12], [1, 5, 8, 9, 13], [1, 5, 8, 10, 11], [1, 5, 8, 10, 12], [1, 5, 8, 10, 13], [1, 5, 8, 11, 12], [1, 5, 8, 11, 13], [1, 5, 8, 12, 13], [1, 5, 9, 10, 11], [1, 5, 9, 10, 12], [1, 5, 9, 10, 13], [1, 5, 9, 11, 12], [1, 5, 9, 11, 13], [1, 5, 9, 12, 13], [1, 5, 10, 11, 12], [1, 5, 10, 11, 13], [1, 5, 10, 12, 13], [1, 5, 11, 12, 13], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8, 11], [1, 6, 7, 8, 12], [1, 6, 7, 8, 13], [1, 6, 7, 9, 10], [1, 6, 7, 9, 11], [1, 6, 7, 9, 12], [1, 6, 7, 9, 13], [1, 6, 7, 10, 11], [1, 6, 7, 10, 12], [1, 6, 7, 10, 13], [1, 6, 7, 11, 12], [1, 6, 7, 11, 13], [1, 6, 7, 12, 13], [1, 6, 8, 9, 10], [1, 6, 8, 9, 11], [1, 6, 8, 9, 12], [1, 6, 8, 9, 13], [1, 6, 8, 10, 11], [1, 6, 8, 10, 12], [1, 6, 8, 10, 13], [1, 6, 8, 11, 12], [1, 6, 8, 11, 13], [1, 6, 8, 12, 13], [1, 6, 9, 10, 11], [1, 6, 9, 10, 12], [1, 6, 9, 10, 13], [1, 6, 9, 11, 12], [1, 6, 9, 11, 13], [1, 6, 9, 12, 13], [1, 6, 10, 11, 12], [1, 6, 10, 11, 13], [1, 6, 10, 12, 13], [1, 6, 11, 12, 13], [1, 7, 8, 9, 10], [1, 7, 8, 9, 11], [1, 7, 8, 9, 12], [1, 7, 8, 9, 13], [1, 7, 8, 10, 11], [1, 7, 8, 10, 12], [1, 7, 8, 10, 13], [1, 7, 8, 11, 12], [1, 7, 8, 11, 13], [1, 7, 8, 12, 13], [1, 7, 9, 10, 11], [1, 7, 9, 10, 12], [1, 7, 9, 10, 13], [1, 7, 9, 11, 12], [1, 7, 9, 11, 13], [1, 7, 9, 12, 13], [1, 7, 10, 11, 12], [1, 7, 10, 11, 13], [1, 7, 10, 12, 13], [1, 7, 11, 12, 13], [1, 8, 9, 10, 11], [1, 8, 9, 10, 12], [1, 8, 9, 10, 13], [1, 8, 9, 11, 12], [1, 8, 9, 11, 13], [1, 8, 9, 12, 13], [1, 8, 10, 11, 12], [1, 8, 10, 11, 13], [1, 8, 10, 12, 13], [1, 8, 11, 12, 13], [1, 9, 10, 11, 12], [1, 9, 10, 11, 13], [1, 9, 10, 12, 13], [1, 9, 11, 12, 13], [1, 10, 11, 12, 13], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5, 11], [2, 3, 4, 5, 12], [2, 3, 4, 5, 13], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6, 11], [2, 3, 4, 6, 12], [2, 3, 4, 6, 13], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7, 11], [2, 3, 4, 7, 12], [2, 3, 4, 7, 13], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8, 11], [2, 3, 4, 8, 12], [2, 3, 4, 8, 13], [2, 3, 4, 9, 10], [2, 3, 4, 9, 11], [2, 3, 4, 9, 12], [2, 3, 4, 9, 13], [2, 3, 4, 10, 11], [2, 3, 4, 10, 12], [2, 3, 4, 10, 13], [2, 3, 4, 11, 12], [2, 3, 4, 11, 13], [2, 3, 4, 12, 13], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6, 11], [2, 3, 5, 6, 12], [2, 3, 5, 6, 13], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7, 11], [2, 3, 5, 7, 12], [2, 3, 5, 7, 13], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8, 11], [2, 3, 5, 8, 12], [2, 3, 5, 8, 13], [2, 3, 5, 9, 10], [2, 3, 5, 9, 11], [2, 3, 5, 9, 12], [2, 3, 5, 9, 13], [2, 3, 5, 10, 11], [2, 3, 5, 10, 12], [2, 3, 5, 10, 13], [2, 3, 5, 11, 12], [2, 3, 5, 11, 13], [2, 3, 5, 12, 13], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7, 11], [2, 3, 6, 7, 12], [2, 3, 6, 7, 13], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8, 11], [2, 3, 6, 8, 12], [2, 3, 6, 8, 13], [2, 3, 6, 9, 10], [2, 3, 6, 9, 11], [2, 3, 6, 9, 12], [2, 3, 6, 9, 13], [2, 3, 6, 10, 11], [2, 3, 6, 10, 12], [2, 3, 6, 10, 13], [2, 3, 6, 11, 12], [2, 3, 6, 11, 13], [2, 3, 6, 12, 13], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8, 11], [2, 3, 7, 8, 12], [2, 3, 7, 8, 13], [2, 3, 7, 9, 10], [2, 3, 7, 9, 11], [2, 3, 7, 9, 12], [2, 3, 7, 9, 13], [2, 3, 7, 10, 11], [2, 3, 7, 10, 12], [2, 3, 7, 10, 13], [2, 3, 7, 11, 12], [2, 3, 7, 11, 13], [2, 3, 7, 12, 13], [2, 3, 8, 9, 10], [2, 3, 8, 9, 11], [2, 3, 8, 9, 12], [2, 3, 8, 9, 13], [2, 3, 8, 10, 11], [2, 3, 8, 10, 12], [2, 3, 8, 10, 13], [2, 3, 8, 11, 12], [2, 3, 8, 11, 13], [2, 3, 8, 12, 13], [2, 3, 9, 10, 11], [2, 3, 9, 10, 12], [2, 3, 9, 10, 13], [2, 3, 9, 11, 12], [2, 3, 9, 11, 13], [2, 3, 9, 12, 13], [2, 3, 10, 11, 12], [2, 3, 10, 11, 13], [2, 3, 10, 12, 13], [2, 3, 11, 12, 13], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6, 11], [2, 4, 5, 6, 12], [2, 4, 5, 6, 13], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7, 11], [2, 4, 5, 7, 12], [2, 4, 5, 7, 13], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8, 11], [2, 4, 5, 8, 12], [2, 4, 5, 8, 13], [2, 4, 5, 9, 10], [2, 4, 5, 9, 11], [2, 4, 5, 9, 12], [2, 4, 5, 9, 13], [2, 4, 5, 10, 11], [2, 4, 5, 10, 12], [2, 4, 5, 10, 13], [2, 4, 5, 11, 12], [2, 4, 5, 11, 13], [2, 4, 5, 12, 13], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7, 11], [2, 4, 6, 7, 12], [2, 4, 6, 7, 13], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8, 11], [2, 4, 6, 8, 12], [2, 4, 6, 8, 13], [2, 4, 6, 9, 10], [2, 4, 6, 9, 11], [2, 4, 6, 9, 12], [2, 4, 6, 9, 13], [2, 4, 6, 10, 11], [2, 4, 6, 10, 12], [2, 4, 6, 10, 13], [2, 4, 6, 11, 12], [2, 4, 6, 11, 13], [2, 4, 6, 12, 13], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8, 11], [2, 4, 7, 8, 12], [2, 4, 7, 8, 13], [2, 4, 7, 9, 10], [2, 4, 7, 9, 11], [2, 4, 7, 9, 12], [2, 4, 7, 9, 13], [2, 4, 7, 10, 11], [2, 4, 7, 10, 12], [2, 4, 7, 10, 13], [2, 4, 7, 11, 12], [2, 4, 7, 11, 13], [2, 4, 7, 12, 13], [2, 4, 8, 9, 10], [2, 4, 8, 9, 11], [2, 4, 8, 9, 12], [2, 4, 8, 9, 13], [2, 4, 8, 10, 11], [2, 4, 8, 10, 12], [2, 4, 8, 10, 13], [2, 4, 8, 11, 12], [2, 4, 8, 11, 13], [2, 4, 8, 12, 13], [2, 4, 9, 10, 11], [2, 4, 9, 10, 12], [2, 4, 9, 10, 13], [2, 4, 9, 11, 12], [2, 4, 9, 11, 13], [2, 4, 9, 12, 13], [2, 4, 10, 11, 12], [2, 4, 10, 11, 13], [2, 4, 10, 12, 13], [2, 4, 11, 12, 13], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7, 11], [2, 5, 6, 7, 12], [2, 5, 6, 7, 13], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8, 11], [2, 5, 6, 8, 12], [2, 5, 6, 8, 13], [2, 5, 6, 9, 10], [2, 5, 6, 9, 11], [2, 5, 6, 9, 12], [2, 5, 6, 9, 13], [2, 5, 6, 10, 11], [2, 5, 6, 10, 12], [2, 5, 6, 10, 13], [2, 5, 6, 11, 12], [2, 5, 6, 11, 13], [2, 5, 6, 12, 13], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8, 11], [2, 5, 7, 8, 12], [2, 5, 7, 8, 13], [2, 5, 7, 9, 10], [2, 5, 7, 9, 11], [2, 5, 7, 9, 12], [2, 5, 7, 9, 13], [2, 5, 7, 10, 11], [2, 5, 7, 10, 12], [2, 5, 7, 10, 13], [2, 5, 7, 11, 12], [2, 5, 7, 11, 13], [2, 5, 7, 12, 13], [2, 5, 8, 9, 10], [2, 5, 8, 9, 11], [2, 5, 8, 9, 12], [2, 5, 8, 9, 13], [2, 5, 8, 10, 11], [2, 5, 8, 10, 12], [2, 5, 8, 10, 13], [2, 5, 8, 11, 12], [2, 5, 8, 11, 13], [2, 5, 8, 12, 13], [2, 5, 9, 10, 11], [2, 5, 9, 10, 12], [2, 5, 9, 10, 13], [2, 5, 9, 11, 12], [2, 5, 9, 11, 13], [2, 5, 9, 12, 13], [2, 5, 10, 11, 12], [2, 5, 10, 11, 13], [2, 5, 10, 12, 13], [2, 5, 11, 12, 13], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8, 11], [2, 6, 7, 8, 12], [2, 6, 7, 8, 13], [2, 6, 7, 9, 10], [2, 6, 7, 9, 11], [2, 6, 7, 9, 12], [2, 6, 7, 9, 13], [2, 6, 7, 10, 11], [2, 6, 7, 10, 12], [2, 6, 7, 10, 13], [2, 6, 7, 11, 12], [2, 6, 7, 11, 13], [2, 6, 7, 12, 13], [2, 6, 8, 9, 10], [2, 6, 8, 9, 11], [2, 6, 8, 9, 12], [2, 6, 8, 9, 13], [2, 6, 8, 10, 11], [2, 6, 8, 10, 12], [2, 6, 8, 10, 13], [2, 6, 8, 11, 12], [2, 6, 8, 11, 13], [2, 6, 8, 12, 13], [2, 6, 9, 10, 11], [2, 6, 9, 10, 12], [2, 6, 9, 10, 13], [2, 6, 9, 11, 12], [2, 6, 9, 11, 13], [2, 6, 9, 12, 13], [2, 6, 10, 11, 12], [2, 6, 10, 11, 13], [2, 6, 10, 12, 13], [2, 6, 11, 12, 13], [2, 7, 8, 9, 10], [2, 7, 8, 9, 11], [2, 7, 8, 9, 12], [2, 7, 8, 9, 13], [2, 7, 8, 10, 11], [2, 7, 8, 10, 12], [2, 7, 8, 10, 13], [2, 7, 8, 11, 12], [2, 7, 8, 11, 13], [2, 7, 8, 12, 13], [2, 7, 9, 10, 11], [2, 7, 9, 10, 12], [2, 7, 9, 10, 13], [2, 7, 9, 11, 12], [2, 7, 9, 11, 13], [2, 7, 9, 12, 13], [2, 7, 10, 11, 12], [2, 7, 10, 11, 13], [2, 7, 10, 12, 13], [2, 7, 11, 12, 13], [2, 8, 9, 10, 11], [2, 8, 9, 10, 12], [2, 8, 9, 10, 13], [2, 8, 9, 11, 12], [2, 8, 9, 11, 13], [2, 8, 9, 12, 13], [2, 8, 10, 11, 12], [2, 8, 10, 11, 13], [2, 8, 10, 12, 13], [2, 8, 11, 12, 13], [2, 9, 10, 11, 12], [2, 9, 10, 11, 13], [2, 9, 10, 12, 13], [2, 9, 11, 12, 13], [2, 10, 11, 12, 13], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6, 11], [3, 4, 5, 6, 12], [3, 4, 5, 6, 13], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7, 11], [3, 4, 5, 7, 12], [3, 4, 5, 7, 13], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8, 11], [3, 4, 5, 8, 12], [3, 4, 5, 8, 13], [3, 4, 5, 9, 10], [3, 4, 5, 9, 11], [3, 4, 5, 9, 12], [3, 4, 5, 9, 13], [3, 4, 5, 10, 11], [3, 4, 5, 10, 12], [3, 4, 5, 10, 13], [3, 4, 5, 11, 12], [3, 4, 5, 11, 13], [3, 4, 5, 12, 13], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7, 11], [3, 4, 6, 7, 12], [3, 4, 6, 7, 13], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8, 11], [3, 4, 6, 8, 12], [3, 4, 6, 8, 13], [3, 4, 6, 9, 10], [3, 4, 6, 9, 11], [3, 4, 6, 9, 12], [3, 4, 6, 9, 13], [3, 4, 6, 10, 11], [3, 4, 6, 10, 12], [3, 4, 6, 10, 13], [3, 4, 6, 11, 12], [3, 4, 6, 11, 13], [3, 4, 6, 12, 13], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8, 11], [3, 4, 7, 8, 12], [3, 4, 7, 8, 13], [3, 4, 7, 9, 10], [3, 4, 7, 9, 11], [3, 4, 7, 9, 12], [3, 4, 7, 9, 13], [3, 4, 7, 10, 11], [3, 4, 7, 10, 12], [3, 4, 7, 10, 13], [3, 4, 7, 11, 12], [3, 4, 7, 11, 13], [3, 4, 7, 12, 13], [3, 4, 8, 9, 10], [3, 4, 8, 9, 11], [3, 4, 8, 9, 12], [3, 4, 8, 9, 13], [3, 4, 8, 10, 11], [3, 4, 8, 10, 12], [3, 4, 8, 10, 13], [3, 4, 8, 11, 12], [3, 4, 8, 11, 13], [3, 4, 8, 12, 13], [3, 4, 9, 10, 11], [3, 4, 9, 10, 12], [3, 4, 9, 10, 13], [3, 4, 9, 11, 12], [3, 4, 9, 11, 13], [3, 4, 9, 12, 13], [3, 4, 10, 11, 12], [3, 4, 10, 11, 13], [3, 4, 10, 12, 13], [3, 4, 11, 12, 13], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7, 11], [3, 5, 6, 7, 12], [3, 5, 6, 7, 13], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8, 11], [3, 5, 6, 8, 12], [3, 5, 6, 8, 13], [3, 5, 6, 9, 10], [3, 5, 6, 9, 11], [3, 5, 6, 9, 12], [3, 5, 6, 9, 13], [3, 5, 6, 10, 11], [3, 5, 6, 10, 12], [3, 5, 6, 10, 13], [3, 5, 6, 11, 12], [3, 5, 6, 11, 13], [3, 5, 6, 12, 13], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8, 11], [3, 5, 7, 8, 12], [3, 5, 7, 8, 13], [3, 5, 7, 9, 10], [3, 5, 7, 9, 11], [3, 5, 7, 9, 12], [3, 5, 7, 9, 13], [3, 5, 7, 10, 11], [3, 5, 7, 10, 12], [3, 5, 7, 10, 13], [3, 5, 7, 11, 12], [3, 5, 7, 11, 13], [3, 5, 7, 12, 13], [3, 5, 8, 9, 10], [3, 5, 8, 9, 11], [3, 5, 8, 9, 12], [3, 5, 8, 9, 13], [3, 5, 8, 10, 11], [3, 5, 8, 10, 12], [3, 5, 8, 10, 13], [3, 5, 8, 11, 12], [3, 5, 8, 11, 13], [3, 5, 8, 12, 13], [3, 5, 9, 10, 11], [3, 5, 9, 10, 12], [3, 5, 9, 10, 13], [3, 5, 9, 11, 12], [3, 5, 9, 11, 13], [3, 5, 9, 12, 13], [3, 5, 10, 11, 12], [3, 5, 10, 11, 13], [3, 5, 10, 12, 13], [3, 5, 11, 12, 13], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8, 11], [3, 6, 7, 8, 12], [3, 6, 7, 8, 13], [3, 6, 7, 9, 10], [3, 6, 7, 9, 11], [3, 6, 7, 9, 12], [3, 6, 7, 9, 13], [3, 6, 7, 10, 11], [3, 6, 7, 10, 12], [3, 6, 7, 10, 13], [3, 6, 7, 11, 12], [3, 6, 7, 11, 13], [3, 6, 7, 12, 13], [3, 6, 8, 9, 10], [3, 6, 8, 9, 11], [3, 6, 8, 9, 12], [3, 6, 8, 9, 13], [3, 6, 8, 10, 11], [3, 6, 8, 10, 12], [3, 6, 8, 10, 13], [3, 6, 8, 11, 12], [3, 6, 8, 11, 13], [3, 6, 8, 12, 13], [3, 6, 9, 10, 11], [3, 6, 9, 10, 12], [3, 6, 9, 10, 13], [3, 6, 9, 11, 12], [3, 6, 9, 11, 13], [3, 6, 9, 12, 13], [3, 6, 10, 11, 12], [3, 6, 10, 11, 13], [3, 6, 10, 12, 13], [3, 6, 11, 12, 13], [3, 7, 8, 9, 10], [3, 7, 8, 9, 11], [3, 7, 8, 9, 12], [3, 7, 8, 9, 13], [3, 7, 8, 10, 11], [3, 7, 8, 10, 12], [3, 7, 8, 10, 13], [3, 7, 8, 11, 12], [3, 7, 8, 11, 13], [3, 7, 8, 12, 13], [3, 7, 9, 10, 11], [3, 7, 9, 10, 12], [3, 7, 9, 10, 13], [3, 7, 9, 11, 12], [3, 7, 9, 11, 13], [3, 7, 9, 12, 13], [3, 7, 10, 11, 12], [3, 7, 10, 11, 13], [3, 7, 10, 12, 13], [3, 7, 11, 12, 13], [3, 8, 9, 10, 11], [3, 8, 9, 10, 12], [3, 8, 9, 10, 13], [3, 8, 9, 11, 12], [3, 8, 9, 11, 13], [3, 8, 9, 12, 13], [3, 8, 10, 11, 12], [3, 8, 10, 11, 13], [3, 8, 10, 12, 13], [3, 8, 11, 12, 13], [3, 9, 10, 11, 12], [3, 9, 10, 11, 13], [3, 9, 10, 12, 13], [3, 9, 11, 12, 13], [3, 10, 11, 12, 13], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7, 11], [4, 5, 6, 7, 12], [4, 5, 6, 7, 13], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8, 11], [4, 5, 6, 8, 12], [4, 5, 6, 8, 13], [4, 5, 6, 9, 10], [4, 5, 6, 9, 11], [4, 5, 6, 9, 12], [4, 5, 6, 9, 13], [4, 5, 6, 10, 11], [4, 5, 6, 10, 12], [4, 5, 6, 10, 13], [4, 5, 6, 11, 12], [4, 5, 6, 11, 13], [4, 5, 6, 12, 13], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8, 11], [4, 5, 7, 8, 12], [4, 5, 7, 8, 13], [4, 5, 7, 9, 10], [4, 5, 7, 9, 11], [4, 5, 7, 9, 12], [4, 5, 7, 9, 13], [4, 5, 7, 10, 11], [4, 5, 7, 10, 12], [4, 5, 7, 10, 13], [4, 5, 7, 11, 12], [4, 5, 7, 11, 13], [4, 5, 7, 12, 13], [4, 5, 8, 9, 10], [4, 5, 8, 9, 11], [4, 5, 8, 9, 12], [4, 5, 8, 9, 13], [4, 5, 8, 10, 11], [4, 5, 8, 10, 12], [4, 5, 8, 10, 13], [4, 5, 8, 11, 12], [4, 5, 8, 11, 13], [4, 5, 8, 12, 13], [4, 5, 9, 10, 11], [4, 5, 9, 10, 12], [4, 5, 9, 10, 13], [4, 5, 9, 11, 12], [4, 5, 9, 11, 13], [4, 5, 9, 12, 13], [4, 5, 10, 11, 12], [4, 5, 10, 11, 13], [4, 5, 10, 12, 13], [4, 5, 11, 12, 13], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8, 11], [4, 6, 7, 8, 12], [4, 6, 7, 8, 13], [4, 6, 7, 9, 10], [4, 6, 7, 9, 11], [4, 6, 7, 9, 12], [4, 6, 7, 9, 13], [4, 6, 7, 10, 11], [4, 6, 7, 10, 12], [4, 6, 7, 10, 13], [4, 6, 7, 11, 12], [4, 6, 7, 11, 13], [4, 6, 7, 12, 13], [4, 6, 8, 9, 10], [4, 6, 8, 9, 11], [4, 6, 8, 9, 12], [4, 6, 8, 9, 13], [4, 6, 8, 10, 11], [4, 6, 8, 10, 12], [4, 6, 8, 10, 13], [4, 6, 8, 11, 12], [4, 6, 8, 11, 13], [4, 6, 8, 12, 13], [4, 6, 9, 10, 11], [4, 6, 9, 10, 12], [4, 6, 9, 10, 13], [4, 6, 9, 11, 12], [4, 6, 9, 11, 13], [4, 6, 9, 12, 13], [4, 6, 10, 11, 12], [4, 6, 10, 11, 13], [4, 6, 10, 12, 13], [4, 6, 11, 12, 13], [4, 7, 8, 9, 10], [4, 7, 8, 9, 11], [4, 7, 8, 9, 12], [4, 7, 8, 9, 13], [4, 7, 8, 10, 11], [4, 7, 8, 10, 12], [4, 7, 8, 10, 13], [4, 7, 8, 11, 12], [4, 7, 8, 11, 13], [4, 7, 8, 12, 13], [4, 7, 9, 10, 11], [4, 7, 9, 10, 12], [4, 7, 9, 10, 13], [4, 7, 9, 11, 12], [4, 7, 9, 11, 13], [4, 7, 9, 12, 13], [4, 7, 10, 11, 12], [4, 7, 10, 11, 13], [4, 7, 10, 12, 13], [4, 7, 11, 12, 13], [4, 8, 9, 10, 11], [4, 8, 9, 10, 12], [4, 8, 9, 10, 13], [4, 8, 9, 11, 12], [4, 8, 9, 11, 13], [4, 8, 9, 12, 13], [4, 8, 10, 11, 12], [4, 8, 10, 11, 13], [4, 8, 10, 12, 13], [4, 8, 11, 12, 13], [4, 9, 10, 11, 12], [4, 9, 10, 11, 13], [4, 9, 10, 12, 13], [4, 9, 11, 12, 13], [4, 10, 11, 12, 13], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8, 11], [5, 6, 7, 8, 12], [5, 6, 7, 8, 13], [5, 6, 7, 9, 10], [5, 6, 7, 9, 11], [5, 6, 7, 9, 12], [5, 6, 7, 9, 13], [5, 6, 7, 10, 11], [5, 6, 7, 10, 12], [5, 6, 7, 10, 13], [5, 6, 7, 11, 12], [5, 6, 7, 11, 13], [5, 6, 7, 12, 13], [5, 6, 8, 9, 10], [5, 6, 8, 9, 11], [5, 6, 8, 9, 12], [5, 6, 8, 9, 13], [5, 6, 8, 10, 11], [5, 6, 8, 10, 12], [5, 6, 8, 10, 13], [5, 6, 8, 11, 12], [5, 6, 8, 11, 13], [5, 6, 8, 12, 13], [5, 6, 9, 10, 11], [5, 6, 9, 10, 12], [5, 6, 9, 10, 13], [5, 6, 9, 11, 12], [5, 6, 9, 11, 13], [5, 6, 9, 12, 13], [5, 6, 10, 11, 12], [5, 6, 10, 11, 13], [5, 6, 10, 12, 13], [5, 6, 11, 12, 13], [5, 7, 8, 9, 10], [5, 7, 8, 9, 11], [5, 7, 8, 9, 12], [5, 7, 8, 9, 13], [5, 7, 8, 10, 11], [5, 7, 8, 10, 12], [5, 7, 8, 10, 13], [5, 7, 8, 11, 12], [5, 7, 8, 11, 13], [5, 7, 8, 12, 13], [5, 7, 9, 10, 11], [5, 7, 9, 10, 12], [5, 7, 9, 10, 13], [5, 7, 9, 11, 12], [5, 7, 9, 11, 13], [5, 7, 9, 12, 13], [5, 7, 10, 11, 12], [5, 7, 10, 11, 13], [5, 7, 10, 12, 13], [5, 7, 11, 12, 13], [5, 8, 9, 10, 11], [5, 8, 9, 10, 12], [5, 8, 9, 10, 13], [5, 8, 9, 11, 12], [5, 8, 9, 11, 13], [5, 8, 9, 12, 13], [5, 8, 10, 11, 12], [5, 8, 10, 11, 13], [5, 8, 10, 12, 13], [5, 8, 11, 12, 13], [5, 9, 10, 11, 12], [5, 9, 10, 11, 13], [5, 9, 10, 12, 13], [5, 9, 11, 12, 13], [5, 10, 11, 12, 13], [6, 7, 8, 9, 10], [6, 7, 8, 9, 11], [6, 7, 8, 9, 12], [6, 7, 8, 9, 13], [6, 7, 8, 10, 11], [6, 7, 8, 10, 12], [6, 7, 8, 10, 13], [6, 7, 8, 11, 12], [6, 7, 8, 11, 13], [6, 7, 8, 12, 13], [6, 7, 9, 10, 11], [6, 7, 9, 10, 12], [6, 7, 9, 10, 13], [6, 7, 9, 11, 12], [6, 7, 9, 11, 13], [6, 7, 9, 12, 13], [6, 7, 10, 11, 12], [6, 7, 10, 11, 13], [6, 7, 10, 12, 13], [6, 7, 11, 12, 13], [6, 8, 9, 10, 11], [6, 8, 9, 10, 12], [6, 8, 9, 10, 13], [6, 8, 9, 11, 12], [6, 8, 9, 11, 13], [6, 8, 9, 12, 13], [6, 8, 10, 11, 12], [6, 8, 10, 11, 13], [6, 8, 10, 12, 13], [6, 8, 11, 12, 13], [6, 9, 10, 11, 12], [6, 9, 10, 11, 13], [6, 9, 10, 12, 13], [6, 9, 11, 12, 13], [6, 10, 11, 12, 13], [7, 8, 9, 10, 11], [7, 8, 9, 10, 12], [7, 8, 9, 10, 13], [7, 8, 9, 11, 12], [7, 8, 9, 11, 13], [7, 8, 9, 12, 13], [7, 8, 10, 11, 12], [7, 8, 10, 11, 13], [7, 8, 10, 12, 13], [7, 8, 11, 12, 13], [7, 9, 10, 11, 12], [7, 9, 10, 11, 13], [7, 9, 10, 12, 13], [7, 9, 11, 12, 13], [7, 10, 11, 12, 13], [8, 9, 10, 11, 12], [8, 9, 10, 11, 13], [8, 9, 10, 12, 13], [8, 9, 11, 12, 13], [8, 10, 11, 12, 13], [9, 10, 11, 12, 13]])\n assert answers_match(candidate(n=8, k=5), [[1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8], [1, 2, 3, 7, 8], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8], [1, 2, 4, 7, 8], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8], [1, 2, 5, 7, 8], [1, 2, 6, 7, 8], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8], [1, 3, 4, 7, 8], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8], [1, 3, 5, 7, 8], [1, 3, 6, 7, 8], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8], [1, 4, 5, 7, 8], [1, 4, 6, 7, 8], [1, 5, 6, 7, 8], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8], [2, 3, 4, 7, 8], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8], [2, 3, 5, 7, 8], [2, 3, 6, 7, 8], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8], [2, 4, 5, 7, 8], [2, 4, 6, 7, 8], [2, 5, 6, 7, 8], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8], [3, 4, 5, 7, 8], [3, 4, 6, 7, 8], [3, 5, 6, 7, 8], [4, 5, 6, 7, 8]])\n assert answers_match(candidate(n=9, k=2), [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [3, 9], [4, 5], [4, 6], [4, 7], [4, 8], [4, 9], [5, 6], [5, 7], [5, 8], [5, 9], [6, 7], [6, 8], [6, 9], [7, 8], [7, 9], [8, 9]])\n assert answers_match(candidate(n=7, k=5), [[1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 6, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 6, 7], [1, 2, 5, 6, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 6, 7], [1, 3, 5, 6, 7], [1, 4, 5, 6, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 6, 7], [2, 3, 5, 6, 7], [2, 4, 5, 6, 7], [3, 4, 5, 6, 7]])\n assert answers_match(candidate(n=11, k=6), [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5, 11], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6, 11], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7, 11], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8, 11], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 10, 11], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6, 11], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7, 11], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9, 11], [1, 2, 3, 5, 10, 11], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8, 11], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9, 11], [1, 2, 3, 6, 10, 11], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8, 11], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9, 11], [1, 2, 3, 7, 10, 11], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9, 11], [1, 2, 3, 8, 10, 11], [1, 2, 3, 9, 10, 11], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6, 11], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8, 11], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9, 11], [1, 2, 4, 5, 10, 11], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7, 11], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8, 11], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9, 11], [1, 2, 4, 6, 10, 11], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8, 11], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9, 11], [1, 2, 4, 7, 10, 11], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9, 11], [1, 2, 4, 8, 10, 11], [1, 2, 4, 9, 10, 11], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7, 11], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8, 11], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9, 11], [1, 2, 5, 6, 10, 11], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8, 11], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9, 11], [1, 2, 5, 7, 10, 11], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9, 11], [1, 2, 5, 8, 10, 11], [1, 2, 5, 9, 10, 11], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8, 11], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9, 11], [1, 2, 6, 7, 10, 11], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9, 11], [1, 2, 6, 8, 10, 11], [1, 2, 6, 9, 10, 11], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9, 11], [1, 2, 7, 8, 10, 11], [1, 2, 7, 9, 10, 11], [1, 2, 8, 9, 10, 11], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7, 11], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8, 11], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9, 11], [1, 3, 4, 5, 10, 11], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7, 11], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8, 11], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9, 11], [1, 3, 4, 6, 10, 11], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8, 11], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9, 11], [1, 3, 4, 7, 10, 11], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9, 11], [1, 3, 4, 8, 10, 11], [1, 3, 4, 9, 10, 11], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7, 11], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8, 11], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9, 11], [1, 3, 5, 6, 10, 11], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8, 11], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9, 11], [1, 3, 5, 7, 10, 11], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9, 11], [1, 3, 5, 8, 10, 11], [1, 3, 5, 9, 10, 11], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8, 11], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9, 11], [1, 3, 6, 7, 10, 11], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9, 11], [1, 3, 6, 8, 10, 11], [1, 3, 6, 9, 10, 11], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9, 11], [1, 3, 7, 8, 10, 11], [1, 3, 7, 9, 10, 11], [1, 3, 8, 9, 10, 11], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7, 11], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8, 11], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9, 11], [1, 4, 5, 6, 10, 11], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8, 11], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9, 11], [1, 4, 5, 7, 10, 11], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9, 11], [1, 4, 5, 8, 10, 11], [1, 4, 5, 9, 10, 11], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8, 11], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9, 11], [1, 4, 6, 7, 10, 11], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9, 11], [1, 4, 6, 8, 10, 11], [1, 4, 6, 9, 10, 11], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9, 11], [1, 4, 7, 8, 10, 11], [1, 4, 7, 9, 10, 11], [1, 4, 8, 9, 10, 11], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8, 11], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9, 11], [1, 5, 6, 7, 10, 11], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9, 11], [1, 5, 6, 8, 10, 11], [1, 5, 6, 9, 10, 11], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9, 11], [1, 5, 7, 8, 10, 11], [1, 5, 7, 9, 10, 11], [1, 5, 8, 9, 10, 11], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9, 11], [1, 6, 7, 8, 10, 11], [1, 6, 7, 9, 10, 11], [1, 6, 8, 9, 10, 11], [1, 7, 8, 9, 10, 11], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6, 11], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7, 11], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8, 11], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9, 11], [2, 3, 4, 5, 10, 11], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7, 11], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8, 11], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9, 11], [2, 3, 4, 6, 10, 11], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8, 11], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9, 11], [2, 3, 4, 7, 10, 11], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9, 11], [2, 3, 4, 8, 10, 11], [2, 3, 4, 9, 10, 11], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7, 11], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8, 11], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9, 11], [2, 3, 5, 6, 10, 11], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8, 11], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9, 11], [2, 3, 5, 7, 10, 11], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9, 11], [2, 3, 5, 8, 10, 11], [2, 3, 5, 9, 10, 11], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8, 11], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9, 11], [2, 3, 6, 7, 10, 11], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9, 11], [2, 3, 6, 8, 10, 11], [2, 3, 6, 9, 10, 11], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9, 11], [2, 3, 7, 8, 10, 11], [2, 3, 7, 9, 10, 11], [2, 3, 8, 9, 10, 11], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7, 11], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8, 11], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9, 11], [2, 4, 5, 6, 10, 11], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8, 11], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9, 11], [2, 4, 5, 7, 10, 11], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9, 11], [2, 4, 5, 8, 10, 11], [2, 4, 5, 9, 10, 11], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8, 11], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9, 11], [2, 4, 6, 7, 10, 11], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9, 11], [2, 4, 6, 8, 10, 11], [2, 4, 6, 9, 10, 11], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9, 11], [2, 4, 7, 8, 10, 11], [2, 4, 7, 9, 10, 11], [2, 4, 8, 9, 10, 11], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8, 11], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9, 11], [2, 5, 6, 7, 10, 11], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9, 11], [2, 5, 6, 8, 10, 11], [2, 5, 6, 9, 10, 11], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9, 11], [2, 5, 7, 8, 10, 11], [2, 5, 7, 9, 10, 11], [2, 5, 8, 9, 10, 11], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9, 11], [2, 6, 7, 8, 10, 11], [2, 6, 7, 9, 10, 11], [2, 6, 8, 9, 10, 11], [2, 7, 8, 9, 10, 11], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7, 11], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8, 11], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9, 11], [3, 4, 5, 6, 10, 11], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8, 11], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9, 11], [3, 4, 5, 7, 10, 11], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9, 11], [3, 4, 5, 8, 10, 11], [3, 4, 5, 9, 10, 11], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8, 11], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9, 11], [3, 4, 6, 7, 10, 11], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9, 11], [3, 4, 6, 8, 10, 11], [3, 4, 6, 9, 10, 11], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9, 11], [3, 4, 7, 8, 10, 11], [3, 4, 7, 9, 10, 11], [3, 4, 8, 9, 10, 11], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8, 11], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9, 11], [3, 5, 6, 7, 10, 11], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9, 11], [3, 5, 6, 8, 10, 11], [3, 5, 6, 9, 10, 11], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9, 11], [3, 5, 7, 8, 10, 11], [3, 5, 7, 9, 10, 11], [3, 5, 8, 9, 10, 11], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9, 11], [3, 6, 7, 8, 10, 11], [3, 6, 7, 9, 10, 11], [3, 6, 8, 9, 10, 11], [3, 7, 8, 9, 10, 11], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8, 11], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9, 11], [4, 5, 6, 7, 10, 11], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9, 11], [4, 5, 6, 8, 10, 11], [4, 5, 6, 9, 10, 11], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9, 11], [4, 5, 7, 8, 10, 11], [4, 5, 7, 9, 10, 11], [4, 5, 8, 9, 10, 11], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9, 11], [4, 6, 7, 8, 10, 11], [4, 6, 7, 9, 10, 11], [4, 6, 8, 9, 10, 11], [4, 7, 8, 9, 10, 11], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 11], [5, 6, 7, 8, 10, 11], [5, 6, 7, 9, 10, 11], [5, 6, 8, 9, 10, 11], [5, 7, 8, 9, 10, 11], [6, 7, 8, 9, 10, 11]])\n assert answers_match(candidate(n=16, k=4), [[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3, 8], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3, 11], [1, 2, 3, 12], [1, 2, 3, 13], [1, 2, 3, 14], [1, 2, 3, 15], [1, 2, 3, 16], [1, 2, 4, 5], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4, 8], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4, 11], [1, 2, 4, 12], [1, 2, 4, 13], [1, 2, 4, 14], [1, 2, 4, 15], [1, 2, 4, 16], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5, 8], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5, 11], [1, 2, 5, 12], [1, 2, 5, 13], [1, 2, 5, 14], [1, 2, 5, 15], [1, 2, 5, 16], [1, 2, 6, 7], [1, 2, 6, 8], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6, 11], [1, 2, 6, 12], [1, 2, 6, 13], [1, 2, 6, 14], [1, 2, 6, 15], [1, 2, 6, 16], [1, 2, 7, 8], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7, 11], [1, 2, 7, 12], [1, 2, 7, 13], [1, 2, 7, 14], [1, 2, 7, 15], [1, 2, 7, 16], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8, 11], [1, 2, 8, 12], [1, 2, 8, 13], [1, 2, 8, 14], [1, 2, 8, 15], [1, 2, 8, 16], [1, 2, 9, 10], [1, 2, 9, 11], [1, 2, 9, 12], [1, 2, 9, 13], [1, 2, 9, 14], [1, 2, 9, 15], [1, 2, 9, 16], [1, 2, 10, 11], [1, 2, 10, 12], [1, 2, 10, 13], [1, 2, 10, 14], [1, 2, 10, 15], [1, 2, 10, 16], [1, 2, 11, 12], [1, 2, 11, 13], [1, 2, 11, 14], [1, 2, 11, 15], [1, 2, 11, 16], [1, 2, 12, 13], [1, 2, 12, 14], [1, 2, 12, 15], [1, 2, 12, 16], [1, 2, 13, 14], [1, 2, 13, 15], [1, 2, 13, 16], [1, 2, 14, 15], [1, 2, 14, 16], [1, 2, 15, 16], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4, 8], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4, 11], [1, 3, 4, 12], [1, 3, 4, 13], [1, 3, 4, 14], [1, 3, 4, 15], [1, 3, 4, 16], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5, 8], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5, 11], [1, 3, 5, 12], [1, 3, 5, 13], [1, 3, 5, 14], [1, 3, 5, 15], [1, 3, 5, 16], [1, 3, 6, 7], [1, 3, 6, 8], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6, 11], [1, 3, 6, 12], [1, 3, 6, 13], [1, 3, 6, 14], [1, 3, 6, 15], [1, 3, 6, 16], [1, 3, 7, 8], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7, 11], [1, 3, 7, 12], [1, 3, 7, 13], [1, 3, 7, 14], [1, 3, 7, 15], [1, 3, 7, 16], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8, 11], [1, 3, 8, 12], [1, 3, 8, 13], [1, 3, 8, 14], [1, 3, 8, 15], [1, 3, 8, 16], [1, 3, 9, 10], [1, 3, 9, 11], [1, 3, 9, 12], [1, 3, 9, 13], [1, 3, 9, 14], [1, 3, 9, 15], [1, 3, 9, 16], [1, 3, 10, 11], [1, 3, 10, 12], [1, 3, 10, 13], [1, 3, 10, 14], [1, 3, 10, 15], [1, 3, 10, 16], [1, 3, 11, 12], [1, 3, 11, 13], [1, 3, 11, 14], [1, 3, 11, 15], [1, 3, 11, 16], [1, 3, 12, 13], [1, 3, 12, 14], [1, 3, 12, 15], [1, 3, 12, 16], [1, 3, 13, 14], [1, 3, 13, 15], [1, 3, 13, 16], [1, 3, 14, 15], [1, 3, 14, 16], [1, 3, 15, 16], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5, 8], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5, 11], [1, 4, 5, 12], [1, 4, 5, 13], [1, 4, 5, 14], [1, 4, 5, 15], [1, 4, 5, 16], [1, 4, 6, 7], [1, 4, 6, 8], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6, 11], [1, 4, 6, 12], [1, 4, 6, 13], [1, 4, 6, 14], [1, 4, 6, 15], [1, 4, 6, 16], [1, 4, 7, 8], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7, 11], [1, 4, 7, 12], [1, 4, 7, 13], [1, 4, 7, 14], [1, 4, 7, 15], [1, 4, 7, 16], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8, 11], [1, 4, 8, 12], [1, 4, 8, 13], [1, 4, 8, 14], [1, 4, 8, 15], [1, 4, 8, 16], [1, 4, 9, 10], [1, 4, 9, 11], [1, 4, 9, 12], [1, 4, 9, 13], [1, 4, 9, 14], [1, 4, 9, 15], [1, 4, 9, 16], [1, 4, 10, 11], [1, 4, 10, 12], [1, 4, 10, 13], [1, 4, 10, 14], [1, 4, 10, 15], [1, 4, 10, 16], [1, 4, 11, 12], [1, 4, 11, 13], [1, 4, 11, 14], [1, 4, 11, 15], [1, 4, 11, 16], [1, 4, 12, 13], [1, 4, 12, 14], [1, 4, 12, 15], [1, 4, 12, 16], [1, 4, 13, 14], [1, 4, 13, 15], [1, 4, 13, 16], [1, 4, 14, 15], [1, 4, 14, 16], [1, 4, 15, 16], [1, 5, 6, 7], [1, 5, 6, 8], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6, 11], [1, 5, 6, 12], [1, 5, 6, 13], [1, 5, 6, 14], [1, 5, 6, 15], [1, 5, 6, 16], [1, 5, 7, 8], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7, 11], [1, 5, 7, 12], [1, 5, 7, 13], [1, 5, 7, 14], [1, 5, 7, 15], [1, 5, 7, 16], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8, 11], [1, 5, 8, 12], [1, 5, 8, 13], [1, 5, 8, 14], [1, 5, 8, 15], [1, 5, 8, 16], [1, 5, 9, 10], [1, 5, 9, 11], [1, 5, 9, 12], [1, 5, 9, 13], [1, 5, 9, 14], [1, 5, 9, 15], [1, 5, 9, 16], [1, 5, 10, 11], [1, 5, 10, 12], [1, 5, 10, 13], [1, 5, 10, 14], [1, 5, 10, 15], [1, 5, 10, 16], [1, 5, 11, 12], [1, 5, 11, 13], [1, 5, 11, 14], [1, 5, 11, 15], [1, 5, 11, 16], [1, 5, 12, 13], [1, 5, 12, 14], [1, 5, 12, 15], [1, 5, 12, 16], [1, 5, 13, 14], [1, 5, 13, 15], [1, 5, 13, 16], [1, 5, 14, 15], [1, 5, 14, 16], [1, 5, 15, 16], [1, 6, 7, 8], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7, 11], [1, 6, 7, 12], [1, 6, 7, 13], [1, 6, 7, 14], [1, 6, 7, 15], [1, 6, 7, 16], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8, 11], [1, 6, 8, 12], [1, 6, 8, 13], [1, 6, 8, 14], [1, 6, 8, 15], [1, 6, 8, 16], [1, 6, 9, 10], [1, 6, 9, 11], [1, 6, 9, 12], [1, 6, 9, 13], [1, 6, 9, 14], [1, 6, 9, 15], [1, 6, 9, 16], [1, 6, 10, 11], [1, 6, 10, 12], [1, 6, 10, 13], [1, 6, 10, 14], [1, 6, 10, 15], [1, 6, 10, 16], [1, 6, 11, 12], [1, 6, 11, 13], [1, 6, 11, 14], [1, 6, 11, 15], [1, 6, 11, 16], [1, 6, 12, 13], [1, 6, 12, 14], [1, 6, 12, 15], [1, 6, 12, 16], [1, 6, 13, 14], [1, 6, 13, 15], [1, 6, 13, 16], [1, 6, 14, 15], [1, 6, 14, 16], [1, 6, 15, 16], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8, 11], [1, 7, 8, 12], [1, 7, 8, 13], [1, 7, 8, 14], [1, 7, 8, 15], [1, 7, 8, 16], [1, 7, 9, 10], [1, 7, 9, 11], [1, 7, 9, 12], [1, 7, 9, 13], [1, 7, 9, 14], [1, 7, 9, 15], [1, 7, 9, 16], [1, 7, 10, 11], [1, 7, 10, 12], [1, 7, 10, 13], [1, 7, 10, 14], [1, 7, 10, 15], [1, 7, 10, 16], [1, 7, 11, 12], [1, 7, 11, 13], [1, 7, 11, 14], [1, 7, 11, 15], [1, 7, 11, 16], [1, 7, 12, 13], [1, 7, 12, 14], [1, 7, 12, 15], [1, 7, 12, 16], [1, 7, 13, 14], [1, 7, 13, 15], [1, 7, 13, 16], [1, 7, 14, 15], [1, 7, 14, 16], [1, 7, 15, 16], [1, 8, 9, 10], [1, 8, 9, 11], [1, 8, 9, 12], [1, 8, 9, 13], [1, 8, 9, 14], [1, 8, 9, 15], [1, 8, 9, 16], [1, 8, 10, 11], [1, 8, 10, 12], [1, 8, 10, 13], [1, 8, 10, 14], [1, 8, 10, 15], [1, 8, 10, 16], [1, 8, 11, 12], [1, 8, 11, 13], [1, 8, 11, 14], [1, 8, 11, 15], [1, 8, 11, 16], [1, 8, 12, 13], [1, 8, 12, 14], [1, 8, 12, 15], [1, 8, 12, 16], [1, 8, 13, 14], [1, 8, 13, 15], [1, 8, 13, 16], [1, 8, 14, 15], [1, 8, 14, 16], [1, 8, 15, 16], [1, 9, 10, 11], [1, 9, 10, 12], [1, 9, 10, 13], [1, 9, 10, 14], [1, 9, 10, 15], [1, 9, 10, 16], [1, 9, 11, 12], [1, 9, 11, 13], [1, 9, 11, 14], [1, 9, 11, 15], [1, 9, 11, 16], [1, 9, 12, 13], [1, 9, 12, 14], [1, 9, 12, 15], [1, 9, 12, 16], [1, 9, 13, 14], [1, 9, 13, 15], [1, 9, 13, 16], [1, 9, 14, 15], [1, 9, 14, 16], [1, 9, 15, 16], [1, 10, 11, 12], [1, 10, 11, 13], [1, 10, 11, 14], [1, 10, 11, 15], [1, 10, 11, 16], [1, 10, 12, 13], [1, 10, 12, 14], [1, 10, 12, 15], [1, 10, 12, 16], [1, 10, 13, 14], [1, 10, 13, 15], [1, 10, 13, 16], [1, 10, 14, 15], [1, 10, 14, 16], [1, 10, 15, 16], [1, 11, 12, 13], [1, 11, 12, 14], [1, 11, 12, 15], [1, 11, 12, 16], [1, 11, 13, 14], [1, 11, 13, 15], [1, 11, 13, 16], [1, 11, 14, 15], [1, 11, 14, 16], [1, 11, 15, 16], [1, 12, 13, 14], [1, 12, 13, 15], [1, 12, 13, 16], [1, 12, 14, 15], [1, 12, 14, 16], [1, 12, 15, 16], [1, 13, 14, 15], [1, 13, 14, 16], [1, 13, 15, 16], [1, 14, 15, 16], [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4, 8], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4, 11], [2, 3, 4, 12], [2, 3, 4, 13], [2, 3, 4, 14], [2, 3, 4, 15], [2, 3, 4, 16], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5, 8], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5, 11], [2, 3, 5, 12], [2, 3, 5, 13], [2, 3, 5, 14], [2, 3, 5, 15], [2, 3, 5, 16], [2, 3, 6, 7], [2, 3, 6, 8], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6, 11], [2, 3, 6, 12], [2, 3, 6, 13], [2, 3, 6, 14], [2, 3, 6, 15], [2, 3, 6, 16], [2, 3, 7, 8], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7, 11], [2, 3, 7, 12], [2, 3, 7, 13], [2, 3, 7, 14], [2, 3, 7, 15], [2, 3, 7, 16], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8, 11], [2, 3, 8, 12], [2, 3, 8, 13], [2, 3, 8, 14], [2, 3, 8, 15], [2, 3, 8, 16], [2, 3, 9, 10], [2, 3, 9, 11], [2, 3, 9, 12], [2, 3, 9, 13], [2, 3, 9, 14], [2, 3, 9, 15], [2, 3, 9, 16], [2, 3, 10, 11], [2, 3, 10, 12], [2, 3, 10, 13], [2, 3, 10, 14], [2, 3, 10, 15], [2, 3, 10, 16], [2, 3, 11, 12], [2, 3, 11, 13], [2, 3, 11, 14], [2, 3, 11, 15], [2, 3, 11, 16], [2, 3, 12, 13], [2, 3, 12, 14], [2, 3, 12, 15], [2, 3, 12, 16], [2, 3, 13, 14], [2, 3, 13, 15], [2, 3, 13, 16], [2, 3, 14, 15], [2, 3, 14, 16], [2, 3, 15, 16], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5, 8], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5, 11], [2, 4, 5, 12], [2, 4, 5, 13], [2, 4, 5, 14], [2, 4, 5, 15], [2, 4, 5, 16], [2, 4, 6, 7], [2, 4, 6, 8], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6, 11], [2, 4, 6, 12], [2, 4, 6, 13], [2, 4, 6, 14], [2, 4, 6, 15], [2, 4, 6, 16], [2, 4, 7, 8], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7, 11], [2, 4, 7, 12], [2, 4, 7, 13], [2, 4, 7, 14], [2, 4, 7, 15], [2, 4, 7, 16], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8, 11], [2, 4, 8, 12], [2, 4, 8, 13], [2, 4, 8, 14], [2, 4, 8, 15], [2, 4, 8, 16], [2, 4, 9, 10], [2, 4, 9, 11], [2, 4, 9, 12], [2, 4, 9, 13], [2, 4, 9, 14], [2, 4, 9, 15], [2, 4, 9, 16], [2, 4, 10, 11], [2, 4, 10, 12], [2, 4, 10, 13], [2, 4, 10, 14], [2, 4, 10, 15], [2, 4, 10, 16], [2, 4, 11, 12], [2, 4, 11, 13], [2, 4, 11, 14], [2, 4, 11, 15], [2, 4, 11, 16], [2, 4, 12, 13], [2, 4, 12, 14], [2, 4, 12, 15], [2, 4, 12, 16], [2, 4, 13, 14], [2, 4, 13, 15], [2, 4, 13, 16], [2, 4, 14, 15], [2, 4, 14, 16], [2, 4, 15, 16], [2, 5, 6, 7], [2, 5, 6, 8], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6, 11], [2, 5, 6, 12], [2, 5, 6, 13], [2, 5, 6, 14], [2, 5, 6, 15], [2, 5, 6, 16], [2, 5, 7, 8], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7, 11], [2, 5, 7, 12], [2, 5, 7, 13], [2, 5, 7, 14], [2, 5, 7, 15], [2, 5, 7, 16], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8, 11], [2, 5, 8, 12], [2, 5, 8, 13], [2, 5, 8, 14], [2, 5, 8, 15], [2, 5, 8, 16], [2, 5, 9, 10], [2, 5, 9, 11], [2, 5, 9, 12], [2, 5, 9, 13], [2, 5, 9, 14], [2, 5, 9, 15], [2, 5, 9, 16], [2, 5, 10, 11], [2, 5, 10, 12], [2, 5, 10, 13], [2, 5, 10, 14], [2, 5, 10, 15], [2, 5, 10, 16], [2, 5, 11, 12], [2, 5, 11, 13], [2, 5, 11, 14], [2, 5, 11, 15], [2, 5, 11, 16], [2, 5, 12, 13], [2, 5, 12, 14], [2, 5, 12, 15], [2, 5, 12, 16], [2, 5, 13, 14], [2, 5, 13, 15], [2, 5, 13, 16], [2, 5, 14, 15], [2, 5, 14, 16], [2, 5, 15, 16], [2, 6, 7, 8], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7, 11], [2, 6, 7, 12], [2, 6, 7, 13], [2, 6, 7, 14], [2, 6, 7, 15], [2, 6, 7, 16], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8, 11], [2, 6, 8, 12], [2, 6, 8, 13], [2, 6, 8, 14], [2, 6, 8, 15], [2, 6, 8, 16], [2, 6, 9, 10], [2, 6, 9, 11], [2, 6, 9, 12], [2, 6, 9, 13], [2, 6, 9, 14], [2, 6, 9, 15], [2, 6, 9, 16], [2, 6, 10, 11], [2, 6, 10, 12], [2, 6, 10, 13], [2, 6, 10, 14], [2, 6, 10, 15], [2, 6, 10, 16], [2, 6, 11, 12], [2, 6, 11, 13], [2, 6, 11, 14], [2, 6, 11, 15], [2, 6, 11, 16], [2, 6, 12, 13], [2, 6, 12, 14], [2, 6, 12, 15], [2, 6, 12, 16], [2, 6, 13, 14], [2, 6, 13, 15], [2, 6, 13, 16], [2, 6, 14, 15], [2, 6, 14, 16], [2, 6, 15, 16], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8, 11], [2, 7, 8, 12], [2, 7, 8, 13], [2, 7, 8, 14], [2, 7, 8, 15], [2, 7, 8, 16], [2, 7, 9, 10], [2, 7, 9, 11], [2, 7, 9, 12], [2, 7, 9, 13], [2, 7, 9, 14], [2, 7, 9, 15], [2, 7, 9, 16], [2, 7, 10, 11], [2, 7, 10, 12], [2, 7, 10, 13], [2, 7, 10, 14], [2, 7, 10, 15], [2, 7, 10, 16], [2, 7, 11, 12], [2, 7, 11, 13], [2, 7, 11, 14], [2, 7, 11, 15], [2, 7, 11, 16], [2, 7, 12, 13], [2, 7, 12, 14], [2, 7, 12, 15], [2, 7, 12, 16], [2, 7, 13, 14], [2, 7, 13, 15], [2, 7, 13, 16], [2, 7, 14, 15], [2, 7, 14, 16], [2, 7, 15, 16], [2, 8, 9, 10], [2, 8, 9, 11], [2, 8, 9, 12], [2, 8, 9, 13], [2, 8, 9, 14], [2, 8, 9, 15], [2, 8, 9, 16], [2, 8, 10, 11], [2, 8, 10, 12], [2, 8, 10, 13], [2, 8, 10, 14], [2, 8, 10, 15], [2, 8, 10, 16], [2, 8, 11, 12], [2, 8, 11, 13], [2, 8, 11, 14], [2, 8, 11, 15], [2, 8, 11, 16], [2, 8, 12, 13], [2, 8, 12, 14], [2, 8, 12, 15], [2, 8, 12, 16], [2, 8, 13, 14], [2, 8, 13, 15], [2, 8, 13, 16], [2, 8, 14, 15], [2, 8, 14, 16], [2, 8, 15, 16], [2, 9, 10, 11], [2, 9, 10, 12], [2, 9, 10, 13], [2, 9, 10, 14], [2, 9, 10, 15], [2, 9, 10, 16], [2, 9, 11, 12], [2, 9, 11, 13], [2, 9, 11, 14], [2, 9, 11, 15], [2, 9, 11, 16], [2, 9, 12, 13], [2, 9, 12, 14], [2, 9, 12, 15], [2, 9, 12, 16], [2, 9, 13, 14], [2, 9, 13, 15], [2, 9, 13, 16], [2, 9, 14, 15], [2, 9, 14, 16], [2, 9, 15, 16], [2, 10, 11, 12], [2, 10, 11, 13], [2, 10, 11, 14], [2, 10, 11, 15], [2, 10, 11, 16], [2, 10, 12, 13], [2, 10, 12, 14], [2, 10, 12, 15], [2, 10, 12, 16], [2, 10, 13, 14], [2, 10, 13, 15], [2, 10, 13, 16], [2, 10, 14, 15], [2, 10, 14, 16], [2, 10, 15, 16], [2, 11, 12, 13], [2, 11, 12, 14], [2, 11, 12, 15], [2, 11, 12, 16], [2, 11, 13, 14], [2, 11, 13, 15], [2, 11, 13, 16], [2, 11, 14, 15], [2, 11, 14, 16], [2, 11, 15, 16], [2, 12, 13, 14], [2, 12, 13, 15], [2, 12, 13, 16], [2, 12, 14, 15], [2, 12, 14, 16], [2, 12, 15, 16], [2, 13, 14, 15], [2, 13, 14, 16], [2, 13, 15, 16], [2, 14, 15, 16], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5, 8], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5, 11], [3, 4, 5, 12], [3, 4, 5, 13], [3, 4, 5, 14], [3, 4, 5, 15], [3, 4, 5, 16], [3, 4, 6, 7], [3, 4, 6, 8], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6, 11], [3, 4, 6, 12], [3, 4, 6, 13], [3, 4, 6, 14], [3, 4, 6, 15], [3, 4, 6, 16], [3, 4, 7, 8], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7, 11], [3, 4, 7, 12], [3, 4, 7, 13], [3, 4, 7, 14], [3, 4, 7, 15], [3, 4, 7, 16], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8, 11], [3, 4, 8, 12], [3, 4, 8, 13], [3, 4, 8, 14], [3, 4, 8, 15], [3, 4, 8, 16], [3, 4, 9, 10], [3, 4, 9, 11], [3, 4, 9, 12], [3, 4, 9, 13], [3, 4, 9, 14], [3, 4, 9, 15], [3, 4, 9, 16], [3, 4, 10, 11], [3, 4, 10, 12], [3, 4, 10, 13], [3, 4, 10, 14], [3, 4, 10, 15], [3, 4, 10, 16], [3, 4, 11, 12], [3, 4, 11, 13], [3, 4, 11, 14], [3, 4, 11, 15], [3, 4, 11, 16], [3, 4, 12, 13], [3, 4, 12, 14], [3, 4, 12, 15], [3, 4, 12, 16], [3, 4, 13, 14], [3, 4, 13, 15], [3, 4, 13, 16], [3, 4, 14, 15], [3, 4, 14, 16], [3, 4, 15, 16], [3, 5, 6, 7], [3, 5, 6, 8], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6, 11], [3, 5, 6, 12], [3, 5, 6, 13], [3, 5, 6, 14], [3, 5, 6, 15], [3, 5, 6, 16], [3, 5, 7, 8], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7, 11], [3, 5, 7, 12], [3, 5, 7, 13], [3, 5, 7, 14], [3, 5, 7, 15], [3, 5, 7, 16], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8, 11], [3, 5, 8, 12], [3, 5, 8, 13], [3, 5, 8, 14], [3, 5, 8, 15], [3, 5, 8, 16], [3, 5, 9, 10], [3, 5, 9, 11], [3, 5, 9, 12], [3, 5, 9, 13], [3, 5, 9, 14], [3, 5, 9, 15], [3, 5, 9, 16], [3, 5, 10, 11], [3, 5, 10, 12], [3, 5, 10, 13], [3, 5, 10, 14], [3, 5, 10, 15], [3, 5, 10, 16], [3, 5, 11, 12], [3, 5, 11, 13], [3, 5, 11, 14], [3, 5, 11, 15], [3, 5, 11, 16], [3, 5, 12, 13], [3, 5, 12, 14], [3, 5, 12, 15], [3, 5, 12, 16], [3, 5, 13, 14], [3, 5, 13, 15], [3, 5, 13, 16], [3, 5, 14, 15], [3, 5, 14, 16], [3, 5, 15, 16], [3, 6, 7, 8], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7, 11], [3, 6, 7, 12], [3, 6, 7, 13], [3, 6, 7, 14], [3, 6, 7, 15], [3, 6, 7, 16], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8, 11], [3, 6, 8, 12], [3, 6, 8, 13], [3, 6, 8, 14], [3, 6, 8, 15], [3, 6, 8, 16], [3, 6, 9, 10], [3, 6, 9, 11], [3, 6, 9, 12], [3, 6, 9, 13], [3, 6, 9, 14], [3, 6, 9, 15], [3, 6, 9, 16], [3, 6, 10, 11], [3, 6, 10, 12], [3, 6, 10, 13], [3, 6, 10, 14], [3, 6, 10, 15], [3, 6, 10, 16], [3, 6, 11, 12], [3, 6, 11, 13], [3, 6, 11, 14], [3, 6, 11, 15], [3, 6, 11, 16], [3, 6, 12, 13], [3, 6, 12, 14], [3, 6, 12, 15], [3, 6, 12, 16], [3, 6, 13, 14], [3, 6, 13, 15], [3, 6, 13, 16], [3, 6, 14, 15], [3, 6, 14, 16], [3, 6, 15, 16], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8, 11], [3, 7, 8, 12], [3, 7, 8, 13], [3, 7, 8, 14], [3, 7, 8, 15], [3, 7, 8, 16], [3, 7, 9, 10], [3, 7, 9, 11], [3, 7, 9, 12], [3, 7, 9, 13], [3, 7, 9, 14], [3, 7, 9, 15], [3, 7, 9, 16], [3, 7, 10, 11], [3, 7, 10, 12], [3, 7, 10, 13], [3, 7, 10, 14], [3, 7, 10, 15], [3, 7, 10, 16], [3, 7, 11, 12], [3, 7, 11, 13], [3, 7, 11, 14], [3, 7, 11, 15], [3, 7, 11, 16], [3, 7, 12, 13], [3, 7, 12, 14], [3, 7, 12, 15], [3, 7, 12, 16], [3, 7, 13, 14], [3, 7, 13, 15], [3, 7, 13, 16], [3, 7, 14, 15], [3, 7, 14, 16], [3, 7, 15, 16], [3, 8, 9, 10], [3, 8, 9, 11], [3, 8, 9, 12], [3, 8, 9, 13], [3, 8, 9, 14], [3, 8, 9, 15], [3, 8, 9, 16], [3, 8, 10, 11], [3, 8, 10, 12], [3, 8, 10, 13], [3, 8, 10, 14], [3, 8, 10, 15], [3, 8, 10, 16], [3, 8, 11, 12], [3, 8, 11, 13], [3, 8, 11, 14], [3, 8, 11, 15], [3, 8, 11, 16], [3, 8, 12, 13], [3, 8, 12, 14], [3, 8, 12, 15], [3, 8, 12, 16], [3, 8, 13, 14], [3, 8, 13, 15], [3, 8, 13, 16], [3, 8, 14, 15], [3, 8, 14, 16], [3, 8, 15, 16], [3, 9, 10, 11], [3, 9, 10, 12], [3, 9, 10, 13], [3, 9, 10, 14], [3, 9, 10, 15], [3, 9, 10, 16], [3, 9, 11, 12], [3, 9, 11, 13], [3, 9, 11, 14], [3, 9, 11, 15], [3, 9, 11, 16], [3, 9, 12, 13], [3, 9, 12, 14], [3, 9, 12, 15], [3, 9, 12, 16], [3, 9, 13, 14], [3, 9, 13, 15], [3, 9, 13, 16], [3, 9, 14, 15], [3, 9, 14, 16], [3, 9, 15, 16], [3, 10, 11, 12], [3, 10, 11, 13], [3, 10, 11, 14], [3, 10, 11, 15], [3, 10, 11, 16], [3, 10, 12, 13], [3, 10, 12, 14], [3, 10, 12, 15], [3, 10, 12, 16], [3, 10, 13, 14], [3, 10, 13, 15], [3, 10, 13, 16], [3, 10, 14, 15], [3, 10, 14, 16], [3, 10, 15, 16], [3, 11, 12, 13], [3, 11, 12, 14], [3, 11, 12, 15], [3, 11, 12, 16], [3, 11, 13, 14], [3, 11, 13, 15], [3, 11, 13, 16], [3, 11, 14, 15], [3, 11, 14, 16], [3, 11, 15, 16], [3, 12, 13, 14], [3, 12, 13, 15], [3, 12, 13, 16], [3, 12, 14, 15], [3, 12, 14, 16], [3, 12, 15, 16], [3, 13, 14, 15], [3, 13, 14, 16], [3, 13, 15, 16], [3, 14, 15, 16], [4, 5, 6, 7], [4, 5, 6, 8], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6, 11], [4, 5, 6, 12], [4, 5, 6, 13], [4, 5, 6, 14], [4, 5, 6, 15], [4, 5, 6, 16], [4, 5, 7, 8], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7, 11], [4, 5, 7, 12], [4, 5, 7, 13], [4, 5, 7, 14], [4, 5, 7, 15], [4, 5, 7, 16], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8, 11], [4, 5, 8, 12], [4, 5, 8, 13], [4, 5, 8, 14], [4, 5, 8, 15], [4, 5, 8, 16], [4, 5, 9, 10], [4, 5, 9, 11], [4, 5, 9, 12], [4, 5, 9, 13], [4, 5, 9, 14], [4, 5, 9, 15], [4, 5, 9, 16], [4, 5, 10, 11], [4, 5, 10, 12], [4, 5, 10, 13], [4, 5, 10, 14], [4, 5, 10, 15], [4, 5, 10, 16], [4, 5, 11, 12], [4, 5, 11, 13], [4, 5, 11, 14], [4, 5, 11, 15], [4, 5, 11, 16], [4, 5, 12, 13], [4, 5, 12, 14], [4, 5, 12, 15], [4, 5, 12, 16], [4, 5, 13, 14], [4, 5, 13, 15], [4, 5, 13, 16], [4, 5, 14, 15], [4, 5, 14, 16], [4, 5, 15, 16], [4, 6, 7, 8], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7, 11], [4, 6, 7, 12], [4, 6, 7, 13], [4, 6, 7, 14], [4, 6, 7, 15], [4, 6, 7, 16], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8, 11], [4, 6, 8, 12], [4, 6, 8, 13], [4, 6, 8, 14], [4, 6, 8, 15], [4, 6, 8, 16], [4, 6, 9, 10], [4, 6, 9, 11], [4, 6, 9, 12], [4, 6, 9, 13], [4, 6, 9, 14], [4, 6, 9, 15], [4, 6, 9, 16], [4, 6, 10, 11], [4, 6, 10, 12], [4, 6, 10, 13], [4, 6, 10, 14], [4, 6, 10, 15], [4, 6, 10, 16], [4, 6, 11, 12], [4, 6, 11, 13], [4, 6, 11, 14], [4, 6, 11, 15], [4, 6, 11, 16], [4, 6, 12, 13], [4, 6, 12, 14], [4, 6, 12, 15], [4, 6, 12, 16], [4, 6, 13, 14], [4, 6, 13, 15], [4, 6, 13, 16], [4, 6, 14, 15], [4, 6, 14, 16], [4, 6, 15, 16], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8, 11], [4, 7, 8, 12], [4, 7, 8, 13], [4, 7, 8, 14], [4, 7, 8, 15], [4, 7, 8, 16], [4, 7, 9, 10], [4, 7, 9, 11], [4, 7, 9, 12], [4, 7, 9, 13], [4, 7, 9, 14], [4, 7, 9, 15], [4, 7, 9, 16], [4, 7, 10, 11], [4, 7, 10, 12], [4, 7, 10, 13], [4, 7, 10, 14], [4, 7, 10, 15], [4, 7, 10, 16], [4, 7, 11, 12], [4, 7, 11, 13], [4, 7, 11, 14], [4, 7, 11, 15], [4, 7, 11, 16], [4, 7, 12, 13], [4, 7, 12, 14], [4, 7, 12, 15], [4, 7, 12, 16], [4, 7, 13, 14], [4, 7, 13, 15], [4, 7, 13, 16], [4, 7, 14, 15], [4, 7, 14, 16], [4, 7, 15, 16], [4, 8, 9, 10], [4, 8, 9, 11], [4, 8, 9, 12], [4, 8, 9, 13], [4, 8, 9, 14], [4, 8, 9, 15], [4, 8, 9, 16], [4, 8, 10, 11], [4, 8, 10, 12], [4, 8, 10, 13], [4, 8, 10, 14], [4, 8, 10, 15], [4, 8, 10, 16], [4, 8, 11, 12], [4, 8, 11, 13], [4, 8, 11, 14], [4, 8, 11, 15], [4, 8, 11, 16], [4, 8, 12, 13], [4, 8, 12, 14], [4, 8, 12, 15], [4, 8, 12, 16], [4, 8, 13, 14], [4, 8, 13, 15], [4, 8, 13, 16], [4, 8, 14, 15], [4, 8, 14, 16], [4, 8, 15, 16], [4, 9, 10, 11], [4, 9, 10, 12], [4, 9, 10, 13], [4, 9, 10, 14], [4, 9, 10, 15], [4, 9, 10, 16], [4, 9, 11, 12], [4, 9, 11, 13], [4, 9, 11, 14], [4, 9, 11, 15], [4, 9, 11, 16], [4, 9, 12, 13], [4, 9, 12, 14], [4, 9, 12, 15], [4, 9, 12, 16], [4, 9, 13, 14], [4, 9, 13, 15], [4, 9, 13, 16], [4, 9, 14, 15], [4, 9, 14, 16], [4, 9, 15, 16], [4, 10, 11, 12], [4, 10, 11, 13], [4, 10, 11, 14], [4, 10, 11, 15], [4, 10, 11, 16], [4, 10, 12, 13], [4, 10, 12, 14], [4, 10, 12, 15], [4, 10, 12, 16], [4, 10, 13, 14], [4, 10, 13, 15], [4, 10, 13, 16], [4, 10, 14, 15], [4, 10, 14, 16], [4, 10, 15, 16], [4, 11, 12, 13], [4, 11, 12, 14], [4, 11, 12, 15], [4, 11, 12, 16], [4, 11, 13, 14], [4, 11, 13, 15], [4, 11, 13, 16], [4, 11, 14, 15], [4, 11, 14, 16], [4, 11, 15, 16], [4, 12, 13, 14], [4, 12, 13, 15], [4, 12, 13, 16], [4, 12, 14, 15], [4, 12, 14, 16], [4, 12, 15, 16], [4, 13, 14, 15], [4, 13, 14, 16], [4, 13, 15, 16], [4, 14, 15, 16], [5, 6, 7, 8], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7, 11], [5, 6, 7, 12], [5, 6, 7, 13], [5, 6, 7, 14], [5, 6, 7, 15], [5, 6, 7, 16], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8, 11], [5, 6, 8, 12], [5, 6, 8, 13], [5, 6, 8, 14], [5, 6, 8, 15], [5, 6, 8, 16], [5, 6, 9, 10], [5, 6, 9, 11], [5, 6, 9, 12], [5, 6, 9, 13], [5, 6, 9, 14], [5, 6, 9, 15], [5, 6, 9, 16], [5, 6, 10, 11], [5, 6, 10, 12], [5, 6, 10, 13], [5, 6, 10, 14], [5, 6, 10, 15], [5, 6, 10, 16], [5, 6, 11, 12], [5, 6, 11, 13], [5, 6, 11, 14], [5, 6, 11, 15], [5, 6, 11, 16], [5, 6, 12, 13], [5, 6, 12, 14], [5, 6, 12, 15], [5, 6, 12, 16], [5, 6, 13, 14], [5, 6, 13, 15], [5, 6, 13, 16], [5, 6, 14, 15], [5, 6, 14, 16], [5, 6, 15, 16], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8, 11], [5, 7, 8, 12], [5, 7, 8, 13], [5, 7, 8, 14], [5, 7, 8, 15], [5, 7, 8, 16], [5, 7, 9, 10], [5, 7, 9, 11], [5, 7, 9, 12], [5, 7, 9, 13], [5, 7, 9, 14], [5, 7, 9, 15], [5, 7, 9, 16], [5, 7, 10, 11], [5, 7, 10, 12], [5, 7, 10, 13], [5, 7, 10, 14], [5, 7, 10, 15], [5, 7, 10, 16], [5, 7, 11, 12], [5, 7, 11, 13], [5, 7, 11, 14], [5, 7, 11, 15], [5, 7, 11, 16], [5, 7, 12, 13], [5, 7, 12, 14], [5, 7, 12, 15], [5, 7, 12, 16], [5, 7, 13, 14], [5, 7, 13, 15], [5, 7, 13, 16], [5, 7, 14, 15], [5, 7, 14, 16], [5, 7, 15, 16], [5, 8, 9, 10], [5, 8, 9, 11], [5, 8, 9, 12], [5, 8, 9, 13], [5, 8, 9, 14], [5, 8, 9, 15], [5, 8, 9, 16], [5, 8, 10, 11], [5, 8, 10, 12], [5, 8, 10, 13], [5, 8, 10, 14], [5, 8, 10, 15], [5, 8, 10, 16], [5, 8, 11, 12], [5, 8, 11, 13], [5, 8, 11, 14], [5, 8, 11, 15], [5, 8, 11, 16], [5, 8, 12, 13], [5, 8, 12, 14], [5, 8, 12, 15], [5, 8, 12, 16], [5, 8, 13, 14], [5, 8, 13, 15], [5, 8, 13, 16], [5, 8, 14, 15], [5, 8, 14, 16], [5, 8, 15, 16], [5, 9, 10, 11], [5, 9, 10, 12], [5, 9, 10, 13], [5, 9, 10, 14], [5, 9, 10, 15], [5, 9, 10, 16], [5, 9, 11, 12], [5, 9, 11, 13], [5, 9, 11, 14], [5, 9, 11, 15], [5, 9, 11, 16], [5, 9, 12, 13], [5, 9, 12, 14], [5, 9, 12, 15], [5, 9, 12, 16], [5, 9, 13, 14], [5, 9, 13, 15], [5, 9, 13, 16], [5, 9, 14, 15], [5, 9, 14, 16], [5, 9, 15, 16], [5, 10, 11, 12], [5, 10, 11, 13], [5, 10, 11, 14], [5, 10, 11, 15], [5, 10, 11, 16], [5, 10, 12, 13], [5, 10, 12, 14], [5, 10, 12, 15], [5, 10, 12, 16], [5, 10, 13, 14], [5, 10, 13, 15], [5, 10, 13, 16], [5, 10, 14, 15], [5, 10, 14, 16], [5, 10, 15, 16], [5, 11, 12, 13], [5, 11, 12, 14], [5, 11, 12, 15], [5, 11, 12, 16], [5, 11, 13, 14], [5, 11, 13, 15], [5, 11, 13, 16], [5, 11, 14, 15], [5, 11, 14, 16], [5, 11, 15, 16], [5, 12, 13, 14], [5, 12, 13, 15], [5, 12, 13, 16], [5, 12, 14, 15], [5, 12, 14, 16], [5, 12, 15, 16], [5, 13, 14, 15], [5, 13, 14, 16], [5, 13, 15, 16], [5, 14, 15, 16], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8, 11], [6, 7, 8, 12], [6, 7, 8, 13], [6, 7, 8, 14], [6, 7, 8, 15], [6, 7, 8, 16], [6, 7, 9, 10], [6, 7, 9, 11], [6, 7, 9, 12], [6, 7, 9, 13], [6, 7, 9, 14], [6, 7, 9, 15], [6, 7, 9, 16], [6, 7, 10, 11], [6, 7, 10, 12], [6, 7, 10, 13], [6, 7, 10, 14], [6, 7, 10, 15], [6, 7, 10, 16], [6, 7, 11, 12], [6, 7, 11, 13], [6, 7, 11, 14], [6, 7, 11, 15], [6, 7, 11, 16], [6, 7, 12, 13], [6, 7, 12, 14], [6, 7, 12, 15], [6, 7, 12, 16], [6, 7, 13, 14], [6, 7, 13, 15], [6, 7, 13, 16], [6, 7, 14, 15], [6, 7, 14, 16], [6, 7, 15, 16], [6, 8, 9, 10], [6, 8, 9, 11], [6, 8, 9, 12], [6, 8, 9, 13], [6, 8, 9, 14], [6, 8, 9, 15], [6, 8, 9, 16], [6, 8, 10, 11], [6, 8, 10, 12], [6, 8, 10, 13], [6, 8, 10, 14], [6, 8, 10, 15], [6, 8, 10, 16], [6, 8, 11, 12], [6, 8, 11, 13], [6, 8, 11, 14], [6, 8, 11, 15], [6, 8, 11, 16], [6, 8, 12, 13], [6, 8, 12, 14], [6, 8, 12, 15], [6, 8, 12, 16], [6, 8, 13, 14], [6, 8, 13, 15], [6, 8, 13, 16], [6, 8, 14, 15], [6, 8, 14, 16], [6, 8, 15, 16], [6, 9, 10, 11], [6, 9, 10, 12], [6, 9, 10, 13], [6, 9, 10, 14], [6, 9, 10, 15], [6, 9, 10, 16], [6, 9, 11, 12], [6, 9, 11, 13], [6, 9, 11, 14], [6, 9, 11, 15], [6, 9, 11, 16], [6, 9, 12, 13], [6, 9, 12, 14], [6, 9, 12, 15], [6, 9, 12, 16], [6, 9, 13, 14], [6, 9, 13, 15], [6, 9, 13, 16], [6, 9, 14, 15], [6, 9, 14, 16], [6, 9, 15, 16], [6, 10, 11, 12], [6, 10, 11, 13], [6, 10, 11, 14], [6, 10, 11, 15], [6, 10, 11, 16], [6, 10, 12, 13], [6, 10, 12, 14], [6, 10, 12, 15], [6, 10, 12, 16], [6, 10, 13, 14], [6, 10, 13, 15], [6, 10, 13, 16], [6, 10, 14, 15], [6, 10, 14, 16], [6, 10, 15, 16], [6, 11, 12, 13], [6, 11, 12, 14], [6, 11, 12, 15], [6, 11, 12, 16], [6, 11, 13, 14], [6, 11, 13, 15], [6, 11, 13, 16], [6, 11, 14, 15], [6, 11, 14, 16], [6, 11, 15, 16], [6, 12, 13, 14], [6, 12, 13, 15], [6, 12, 13, 16], [6, 12, 14, 15], [6, 12, 14, 16], [6, 12, 15, 16], [6, 13, 14, 15], [6, 13, 14, 16], [6, 13, 15, 16], [6, 14, 15, 16], [7, 8, 9, 10], [7, 8, 9, 11], [7, 8, 9, 12], [7, 8, 9, 13], [7, 8, 9, 14], [7, 8, 9, 15], [7, 8, 9, 16], [7, 8, 10, 11], [7, 8, 10, 12], [7, 8, 10, 13], [7, 8, 10, 14], [7, 8, 10, 15], [7, 8, 10, 16], [7, 8, 11, 12], [7, 8, 11, 13], [7, 8, 11, 14], [7, 8, 11, 15], [7, 8, 11, 16], [7, 8, 12, 13], [7, 8, 12, 14], [7, 8, 12, 15], [7, 8, 12, 16], [7, 8, 13, 14], [7, 8, 13, 15], [7, 8, 13, 16], [7, 8, 14, 15], [7, 8, 14, 16], [7, 8, 15, 16], [7, 9, 10, 11], [7, 9, 10, 12], [7, 9, 10, 13], [7, 9, 10, 14], [7, 9, 10, 15], [7, 9, 10, 16], [7, 9, 11, 12], [7, 9, 11, 13], [7, 9, 11, 14], [7, 9, 11, 15], [7, 9, 11, 16], [7, 9, 12, 13], [7, 9, 12, 14], [7, 9, 12, 15], [7, 9, 12, 16], [7, 9, 13, 14], [7, 9, 13, 15], [7, 9, 13, 16], [7, 9, 14, 15], [7, 9, 14, 16], [7, 9, 15, 16], [7, 10, 11, 12], [7, 10, 11, 13], [7, 10, 11, 14], [7, 10, 11, 15], [7, 10, 11, 16], [7, 10, 12, 13], [7, 10, 12, 14], [7, 10, 12, 15], [7, 10, 12, 16], [7, 10, 13, 14], [7, 10, 13, 15], [7, 10, 13, 16], [7, 10, 14, 15], [7, 10, 14, 16], [7, 10, 15, 16], [7, 11, 12, 13], [7, 11, 12, 14], [7, 11, 12, 15], [7, 11, 12, 16], [7, 11, 13, 14], [7, 11, 13, 15], [7, 11, 13, 16], [7, 11, 14, 15], [7, 11, 14, 16], [7, 11, 15, 16], [7, 12, 13, 14], [7, 12, 13, 15], [7, 12, 13, 16], [7, 12, 14, 15], [7, 12, 14, 16], [7, 12, 15, 16], [7, 13, 14, 15], [7, 13, 14, 16], [7, 13, 15, 16], [7, 14, 15, 16], [8, 9, 10, 11], [8, 9, 10, 12], [8, 9, 10, 13], [8, 9, 10, 14], [8, 9, 10, 15], [8, 9, 10, 16], [8, 9, 11, 12], [8, 9, 11, 13], [8, 9, 11, 14], [8, 9, 11, 15], [8, 9, 11, 16], [8, 9, 12, 13], [8, 9, 12, 14], [8, 9, 12, 15], [8, 9, 12, 16], [8, 9, 13, 14], [8, 9, 13, 15], [8, 9, 13, 16], [8, 9, 14, 15], [8, 9, 14, 16], [8, 9, 15, 16], [8, 10, 11, 12], [8, 10, 11, 13], [8, 10, 11, 14], [8, 10, 11, 15], [8, 10, 11, 16], [8, 10, 12, 13], [8, 10, 12, 14], [8, 10, 12, 15], [8, 10, 12, 16], [8, 10, 13, 14], [8, 10, 13, 15], [8, 10, 13, 16], [8, 10, 14, 15], [8, 10, 14, 16], [8, 10, 15, 16], [8, 11, 12, 13], [8, 11, 12, 14], [8, 11, 12, 15], [8, 11, 12, 16], [8, 11, 13, 14], [8, 11, 13, 15], [8, 11, 13, 16], [8, 11, 14, 15], [8, 11, 14, 16], [8, 11, 15, 16], [8, 12, 13, 14], [8, 12, 13, 15], [8, 12, 13, 16], [8, 12, 14, 15], [8, 12, 14, 16], [8, 12, 15, 16], [8, 13, 14, 15], [8, 13, 14, 16], [8, 13, 15, 16], [8, 14, 15, 16], [9, 10, 11, 12], [9, 10, 11, 13], [9, 10, 11, 14], [9, 10, 11, 15], [9, 10, 11, 16], [9, 10, 12, 13], [9, 10, 12, 14], [9, 10, 12, 15], [9, 10, 12, 16], [9, 10, 13, 14], [9, 10, 13, 15], [9, 10, 13, 16], [9, 10, 14, 15], [9, 10, 14, 16], [9, 10, 15, 16], [9, 11, 12, 13], [9, 11, 12, 14], [9, 11, 12, 15], [9, 11, 12, 16], [9, 11, 13, 14], [9, 11, 13, 15], [9, 11, 13, 16], [9, 11, 14, 15], [9, 11, 14, 16], [9, 11, 15, 16], [9, 12, 13, 14], [9, 12, 13, 15], [9, 12, 13, 16], [9, 12, 14, 15], [9, 12, 14, 16], [9, 12, 15, 16], [9, 13, 14, 15], [9, 13, 14, 16], [9, 13, 15, 16], [9, 14, 15, 16], [10, 11, 12, 13], [10, 11, 12, 14], [10, 11, 12, 15], [10, 11, 12, 16], [10, 11, 13, 14], [10, 11, 13, 15], [10, 11, 13, 16], [10, 11, 14, 15], [10, 11, 14, 16], [10, 11, 15, 16], [10, 12, 13, 14], [10, 12, 13, 15], [10, 12, 13, 16], [10, 12, 14, 15], [10, 12, 14, 16], [10, 12, 15, 16], [10, 13, 14, 15], [10, 13, 14, 16], [10, 13, 15, 16], [10, 14, 15, 16], [11, 12, 13, 14], [11, 12, 13, 15], [11, 12, 13, 16], [11, 12, 14, 15], [11, 12, 14, 16], [11, 12, 15, 16], [11, 13, 14, 15], [11, 13, 14, 16], [11, 13, 15, 16], [11, 14, 15, 16], [12, 13, 14, 15], [12, 13, 14, 16], [12, 13, 15, 16], [12, 14, 15, 16], [13, 14, 15, 16]])\n assert answers_match(candidate(n=12, k=4), [[1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3, 8], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3, 11], [1, 2, 3, 12], [1, 2, 4, 5], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4, 8], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4, 11], [1, 2, 4, 12], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5, 8], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5, 11], [1, 2, 5, 12], [1, 2, 6, 7], [1, 2, 6, 8], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6, 11], [1, 2, 6, 12], [1, 2, 7, 8], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7, 11], [1, 2, 7, 12], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8, 11], [1, 2, 8, 12], [1, 2, 9, 10], [1, 2, 9, 11], [1, 2, 9, 12], [1, 2, 10, 11], [1, 2, 10, 12], [1, 2, 11, 12], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4, 8], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4, 11], [1, 3, 4, 12], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5, 8], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5, 11], [1, 3, 5, 12], [1, 3, 6, 7], [1, 3, 6, 8], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6, 11], [1, 3, 6, 12], [1, 3, 7, 8], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7, 11], [1, 3, 7, 12], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8, 11], [1, 3, 8, 12], [1, 3, 9, 10], [1, 3, 9, 11], [1, 3, 9, 12], [1, 3, 10, 11], [1, 3, 10, 12], [1, 3, 11, 12], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5, 8], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5, 11], [1, 4, 5, 12], [1, 4, 6, 7], [1, 4, 6, 8], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6, 11], [1, 4, 6, 12], [1, 4, 7, 8], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7, 11], [1, 4, 7, 12], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8, 11], [1, 4, 8, 12], [1, 4, 9, 10], [1, 4, 9, 11], [1, 4, 9, 12], [1, 4, 10, 11], [1, 4, 10, 12], [1, 4, 11, 12], [1, 5, 6, 7], [1, 5, 6, 8], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6, 11], [1, 5, 6, 12], [1, 5, 7, 8], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7, 11], [1, 5, 7, 12], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8, 11], [1, 5, 8, 12], [1, 5, 9, 10], [1, 5, 9, 11], [1, 5, 9, 12], [1, 5, 10, 11], [1, 5, 10, 12], [1, 5, 11, 12], [1, 6, 7, 8], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7, 11], [1, 6, 7, 12], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8, 11], [1, 6, 8, 12], [1, 6, 9, 10], [1, 6, 9, 11], [1, 6, 9, 12], [1, 6, 10, 11], [1, 6, 10, 12], [1, 6, 11, 12], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8, 11], [1, 7, 8, 12], [1, 7, 9, 10], [1, 7, 9, 11], [1, 7, 9, 12], [1, 7, 10, 11], [1, 7, 10, 12], [1, 7, 11, 12], [1, 8, 9, 10], [1, 8, 9, 11], [1, 8, 9, 12], [1, 8, 10, 11], [1, 8, 10, 12], [1, 8, 11, 12], [1, 9, 10, 11], [1, 9, 10, 12], [1, 9, 11, 12], [1, 10, 11, 12], [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4, 8], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4, 11], [2, 3, 4, 12], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5, 8], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5, 11], [2, 3, 5, 12], [2, 3, 6, 7], [2, 3, 6, 8], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6, 11], [2, 3, 6, 12], [2, 3, 7, 8], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7, 11], [2, 3, 7, 12], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8, 11], [2, 3, 8, 12], [2, 3, 9, 10], [2, 3, 9, 11], [2, 3, 9, 12], [2, 3, 10, 11], [2, 3, 10, 12], [2, 3, 11, 12], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5, 8], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5, 11], [2, 4, 5, 12], [2, 4, 6, 7], [2, 4, 6, 8], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6, 11], [2, 4, 6, 12], [2, 4, 7, 8], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7, 11], [2, 4, 7, 12], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8, 11], [2, 4, 8, 12], [2, 4, 9, 10], [2, 4, 9, 11], [2, 4, 9, 12], [2, 4, 10, 11], [2, 4, 10, 12], [2, 4, 11, 12], [2, 5, 6, 7], [2, 5, 6, 8], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6, 11], [2, 5, 6, 12], [2, 5, 7, 8], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7, 11], [2, 5, 7, 12], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8, 11], [2, 5, 8, 12], [2, 5, 9, 10], [2, 5, 9, 11], [2, 5, 9, 12], [2, 5, 10, 11], [2, 5, 10, 12], [2, 5, 11, 12], [2, 6, 7, 8], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7, 11], [2, 6, 7, 12], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8, 11], [2, 6, 8, 12], [2, 6, 9, 10], [2, 6, 9, 11], [2, 6, 9, 12], [2, 6, 10, 11], [2, 6, 10, 12], [2, 6, 11, 12], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8, 11], [2, 7, 8, 12], [2, 7, 9, 10], [2, 7, 9, 11], [2, 7, 9, 12], [2, 7, 10, 11], [2, 7, 10, 12], [2, 7, 11, 12], [2, 8, 9, 10], [2, 8, 9, 11], [2, 8, 9, 12], [2, 8, 10, 11], [2, 8, 10, 12], [2, 8, 11, 12], [2, 9, 10, 11], [2, 9, 10, 12], [2, 9, 11, 12], [2, 10, 11, 12], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5, 8], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5, 11], [3, 4, 5, 12], [3, 4, 6, 7], [3, 4, 6, 8], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6, 11], [3, 4, 6, 12], [3, 4, 7, 8], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7, 11], [3, 4, 7, 12], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8, 11], [3, 4, 8, 12], [3, 4, 9, 10], [3, 4, 9, 11], [3, 4, 9, 12], [3, 4, 10, 11], [3, 4, 10, 12], [3, 4, 11, 12], [3, 5, 6, 7], [3, 5, 6, 8], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6, 11], [3, 5, 6, 12], [3, 5, 7, 8], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7, 11], [3, 5, 7, 12], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8, 11], [3, 5, 8, 12], [3, 5, 9, 10], [3, 5, 9, 11], [3, 5, 9, 12], [3, 5, 10, 11], [3, 5, 10, 12], [3, 5, 11, 12], [3, 6, 7, 8], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7, 11], [3, 6, 7, 12], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8, 11], [3, 6, 8, 12], [3, 6, 9, 10], [3, 6, 9, 11], [3, 6, 9, 12], [3, 6, 10, 11], [3, 6, 10, 12], [3, 6, 11, 12], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8, 11], [3, 7, 8, 12], [3, 7, 9, 10], [3, 7, 9, 11], [3, 7, 9, 12], [3, 7, 10, 11], [3, 7, 10, 12], [3, 7, 11, 12], [3, 8, 9, 10], [3, 8, 9, 11], [3, 8, 9, 12], [3, 8, 10, 11], [3, 8, 10, 12], [3, 8, 11, 12], [3, 9, 10, 11], [3, 9, 10, 12], [3, 9, 11, 12], [3, 10, 11, 12], [4, 5, 6, 7], [4, 5, 6, 8], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6, 11], [4, 5, 6, 12], [4, 5, 7, 8], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7, 11], [4, 5, 7, 12], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8, 11], [4, 5, 8, 12], [4, 5, 9, 10], [4, 5, 9, 11], [4, 5, 9, 12], [4, 5, 10, 11], [4, 5, 10, 12], [4, 5, 11, 12], [4, 6, 7, 8], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7, 11], [4, 6, 7, 12], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8, 11], [4, 6, 8, 12], [4, 6, 9, 10], [4, 6, 9, 11], [4, 6, 9, 12], [4, 6, 10, 11], [4, 6, 10, 12], [4, 6, 11, 12], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8, 11], [4, 7, 8, 12], [4, 7, 9, 10], [4, 7, 9, 11], [4, 7, 9, 12], [4, 7, 10, 11], [4, 7, 10, 12], [4, 7, 11, 12], [4, 8, 9, 10], [4, 8, 9, 11], [4, 8, 9, 12], [4, 8, 10, 11], [4, 8, 10, 12], [4, 8, 11, 12], [4, 9, 10, 11], [4, 9, 10, 12], [4, 9, 11, 12], [4, 10, 11, 12], [5, 6, 7, 8], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7, 11], [5, 6, 7, 12], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8, 11], [5, 6, 8, 12], [5, 6, 9, 10], [5, 6, 9, 11], [5, 6, 9, 12], [5, 6, 10, 11], [5, 6, 10, 12], [5, 6, 11, 12], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8, 11], [5, 7, 8, 12], [5, 7, 9, 10], [5, 7, 9, 11], [5, 7, 9, 12], [5, 7, 10, 11], [5, 7, 10, 12], [5, 7, 11, 12], [5, 8, 9, 10], [5, 8, 9, 11], [5, 8, 9, 12], [5, 8, 10, 11], [5, 8, 10, 12], [5, 8, 11, 12], [5, 9, 10, 11], [5, 9, 10, 12], [5, 9, 11, 12], [5, 10, 11, 12], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8, 11], [6, 7, 8, 12], [6, 7, 9, 10], [6, 7, 9, 11], [6, 7, 9, 12], [6, 7, 10, 11], [6, 7, 10, 12], [6, 7, 11, 12], [6, 8, 9, 10], [6, 8, 9, 11], [6, 8, 9, 12], [6, 8, 10, 11], [6, 8, 10, 12], [6, 8, 11, 12], [6, 9, 10, 11], [6, 9, 10, 12], [6, 9, 11, 12], [6, 10, 11, 12], [7, 8, 9, 10], [7, 8, 9, 11], [7, 8, 9, 12], [7, 8, 10, 11], [7, 8, 10, 12], [7, 8, 11, 12], [7, 9, 10, 11], [7, 9, 10, 12], [7, 9, 11, 12], [7, 10, 11, 12], [8, 9, 10, 11], [8, 9, 10, 12], [8, 9, 11, 12], [8, 10, 11, 12], [9, 10, 11, 12]])\n assert answers_match(candidate(n=12, k=6), [[1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5, 11], [1, 2, 3, 4, 5, 12], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6, 11], [1, 2, 3, 4, 6, 12], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7, 11], [1, 2, 3, 4, 7, 12], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8, 11], [1, 2, 3, 4, 8, 12], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9, 11], [1, 2, 3, 4, 9, 12], [1, 2, 3, 4, 10, 11], [1, 2, 3, 4, 10, 12], [1, 2, 3, 4, 11, 12], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6, 11], [1, 2, 3, 5, 6, 12], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7, 11], [1, 2, 3, 5, 7, 12], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8, 11], [1, 2, 3, 5, 8, 12], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9, 11], [1, 2, 3, 5, 9, 12], [1, 2, 3, 5, 10, 11], [1, 2, 3, 5, 10, 12], [1, 2, 3, 5, 11, 12], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7, 11], [1, 2, 3, 6, 7, 12], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8, 11], [1, 2, 3, 6, 8, 12], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9, 11], [1, 2, 3, 6, 9, 12], [1, 2, 3, 6, 10, 11], [1, 2, 3, 6, 10, 12], [1, 2, 3, 6, 11, 12], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8, 11], [1, 2, 3, 7, 8, 12], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9, 11], [1, 2, 3, 7, 9, 12], [1, 2, 3, 7, 10, 11], [1, 2, 3, 7, 10, 12], [1, 2, 3, 7, 11, 12], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9, 11], [1, 2, 3, 8, 9, 12], [1, 2, 3, 8, 10, 11], [1, 2, 3, 8, 10, 12], [1, 2, 3, 8, 11, 12], [1, 2, 3, 9, 10, 11], [1, 2, 3, 9, 10, 12], [1, 2, 3, 9, 11, 12], [1, 2, 3, 10, 11, 12], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6, 11], [1, 2, 4, 5, 6, 12], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7, 11], [1, 2, 4, 5, 7, 12], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8, 11], [1, 2, 4, 5, 8, 12], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9, 11], [1, 2, 4, 5, 9, 12], [1, 2, 4, 5, 10, 11], [1, 2, 4, 5, 10, 12], [1, 2, 4, 5, 11, 12], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7, 11], [1, 2, 4, 6, 7, 12], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8, 11], [1, 2, 4, 6, 8, 12], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9, 11], [1, 2, 4, 6, 9, 12], [1, 2, 4, 6, 10, 11], [1, 2, 4, 6, 10, 12], [1, 2, 4, 6, 11, 12], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8, 11], [1, 2, 4, 7, 8, 12], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9, 11], [1, 2, 4, 7, 9, 12], [1, 2, 4, 7, 10, 11], [1, 2, 4, 7, 10, 12], [1, 2, 4, 7, 11, 12], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9, 11], [1, 2, 4, 8, 9, 12], [1, 2, 4, 8, 10, 11], [1, 2, 4, 8, 10, 12], [1, 2, 4, 8, 11, 12], [1, 2, 4, 9, 10, 11], [1, 2, 4, 9, 10, 12], [1, 2, 4, 9, 11, 12], [1, 2, 4, 10, 11, 12], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7, 11], [1, 2, 5, 6, 7, 12], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8, 11], [1, 2, 5, 6, 8, 12], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9, 11], [1, 2, 5, 6, 9, 12], [1, 2, 5, 6, 10, 11], [1, 2, 5, 6, 10, 12], [1, 2, 5, 6, 11, 12], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8, 11], [1, 2, 5, 7, 8, 12], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9, 11], [1, 2, 5, 7, 9, 12], [1, 2, 5, 7, 10, 11], [1, 2, 5, 7, 10, 12], [1, 2, 5, 7, 11, 12], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9, 11], [1, 2, 5, 8, 9, 12], [1, 2, 5, 8, 10, 11], [1, 2, 5, 8, 10, 12], [1, 2, 5, 8, 11, 12], [1, 2, 5, 9, 10, 11], [1, 2, 5, 9, 10, 12], [1, 2, 5, 9, 11, 12], [1, 2, 5, 10, 11, 12], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8, 11], [1, 2, 6, 7, 8, 12], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9, 11], [1, 2, 6, 7, 9, 12], [1, 2, 6, 7, 10, 11], [1, 2, 6, 7, 10, 12], [1, 2, 6, 7, 11, 12], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9, 11], [1, 2, 6, 8, 9, 12], [1, 2, 6, 8, 10, 11], [1, 2, 6, 8, 10, 12], [1, 2, 6, 8, 11, 12], [1, 2, 6, 9, 10, 11], [1, 2, 6, 9, 10, 12], [1, 2, 6, 9, 11, 12], [1, 2, 6, 10, 11, 12], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9, 11], [1, 2, 7, 8, 9, 12], [1, 2, 7, 8, 10, 11], [1, 2, 7, 8, 10, 12], [1, 2, 7, 8, 11, 12], [1, 2, 7, 9, 10, 11], [1, 2, 7, 9, 10, 12], [1, 2, 7, 9, 11, 12], [1, 2, 7, 10, 11, 12], [1, 2, 8, 9, 10, 11], [1, 2, 8, 9, 10, 12], [1, 2, 8, 9, 11, 12], [1, 2, 8, 10, 11, 12], [1, 2, 9, 10, 11, 12], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6, 11], [1, 3, 4, 5, 6, 12], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7, 11], [1, 3, 4, 5, 7, 12], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8, 11], [1, 3, 4, 5, 8, 12], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9, 11], [1, 3, 4, 5, 9, 12], [1, 3, 4, 5, 10, 11], [1, 3, 4, 5, 10, 12], [1, 3, 4, 5, 11, 12], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7, 11], [1, 3, 4, 6, 7, 12], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8, 11], [1, 3, 4, 6, 8, 12], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9, 11], [1, 3, 4, 6, 9, 12], [1, 3, 4, 6, 10, 11], [1, 3, 4, 6, 10, 12], [1, 3, 4, 6, 11, 12], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8, 11], [1, 3, 4, 7, 8, 12], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9, 11], [1, 3, 4, 7, 9, 12], [1, 3, 4, 7, 10, 11], [1, 3, 4, 7, 10, 12], [1, 3, 4, 7, 11, 12], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9, 11], [1, 3, 4, 8, 9, 12], [1, 3, 4, 8, 10, 11], [1, 3, 4, 8, 10, 12], [1, 3, 4, 8, 11, 12], [1, 3, 4, 9, 10, 11], [1, 3, 4, 9, 10, 12], [1, 3, 4, 9, 11, 12], [1, 3, 4, 10, 11, 12], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7, 11], [1, 3, 5, 6, 7, 12], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8, 11], [1, 3, 5, 6, 8, 12], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9, 11], [1, 3, 5, 6, 9, 12], [1, 3, 5, 6, 10, 11], [1, 3, 5, 6, 10, 12], [1, 3, 5, 6, 11, 12], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8, 11], [1, 3, 5, 7, 8, 12], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9, 11], [1, 3, 5, 7, 9, 12], [1, 3, 5, 7, 10, 11], [1, 3, 5, 7, 10, 12], [1, 3, 5, 7, 11, 12], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9, 11], [1, 3, 5, 8, 9, 12], [1, 3, 5, 8, 10, 11], [1, 3, 5, 8, 10, 12], [1, 3, 5, 8, 11, 12], [1, 3, 5, 9, 10, 11], [1, 3, 5, 9, 10, 12], [1, 3, 5, 9, 11, 12], [1, 3, 5, 10, 11, 12], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8, 11], [1, 3, 6, 7, 8, 12], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9, 11], [1, 3, 6, 7, 9, 12], [1, 3, 6, 7, 10, 11], [1, 3, 6, 7, 10, 12], [1, 3, 6, 7, 11, 12], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9, 11], [1, 3, 6, 8, 9, 12], [1, 3, 6, 8, 10, 11], [1, 3, 6, 8, 10, 12], [1, 3, 6, 8, 11, 12], [1, 3, 6, 9, 10, 11], [1, 3, 6, 9, 10, 12], [1, 3, 6, 9, 11, 12], [1, 3, 6, 10, 11, 12], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9, 11], [1, 3, 7, 8, 9, 12], [1, 3, 7, 8, 10, 11], [1, 3, 7, 8, 10, 12], [1, 3, 7, 8, 11, 12], [1, 3, 7, 9, 10, 11], [1, 3, 7, 9, 10, 12], [1, 3, 7, 9, 11, 12], [1, 3, 7, 10, 11, 12], [1, 3, 8, 9, 10, 11], [1, 3, 8, 9, 10, 12], [1, 3, 8, 9, 11, 12], [1, 3, 8, 10, 11, 12], [1, 3, 9, 10, 11, 12], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7, 11], [1, 4, 5, 6, 7, 12], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8, 11], [1, 4, 5, 6, 8, 12], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9, 11], [1, 4, 5, 6, 9, 12], [1, 4, 5, 6, 10, 11], [1, 4, 5, 6, 10, 12], [1, 4, 5, 6, 11, 12], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8, 11], [1, 4, 5, 7, 8, 12], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9, 11], [1, 4, 5, 7, 9, 12], [1, 4, 5, 7, 10, 11], [1, 4, 5, 7, 10, 12], [1, 4, 5, 7, 11, 12], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9, 11], [1, 4, 5, 8, 9, 12], [1, 4, 5, 8, 10, 11], [1, 4, 5, 8, 10, 12], [1, 4, 5, 8, 11, 12], [1, 4, 5, 9, 10, 11], [1, 4, 5, 9, 10, 12], [1, 4, 5, 9, 11, 12], [1, 4, 5, 10, 11, 12], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8, 11], [1, 4, 6, 7, 8, 12], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9, 11], [1, 4, 6, 7, 9, 12], [1, 4, 6, 7, 10, 11], [1, 4, 6, 7, 10, 12], [1, 4, 6, 7, 11, 12], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9, 11], [1, 4, 6, 8, 9, 12], [1, 4, 6, 8, 10, 11], [1, 4, 6, 8, 10, 12], [1, 4, 6, 8, 11, 12], [1, 4, 6, 9, 10, 11], [1, 4, 6, 9, 10, 12], [1, 4, 6, 9, 11, 12], [1, 4, 6, 10, 11, 12], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9, 11], [1, 4, 7, 8, 9, 12], [1, 4, 7, 8, 10, 11], [1, 4, 7, 8, 10, 12], [1, 4, 7, 8, 11, 12], [1, 4, 7, 9, 10, 11], [1, 4, 7, 9, 10, 12], [1, 4, 7, 9, 11, 12], [1, 4, 7, 10, 11, 12], [1, 4, 8, 9, 10, 11], [1, 4, 8, 9, 10, 12], [1, 4, 8, 9, 11, 12], [1, 4, 8, 10, 11, 12], [1, 4, 9, 10, 11, 12], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8, 11], [1, 5, 6, 7, 8, 12], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9, 11], [1, 5, 6, 7, 9, 12], [1, 5, 6, 7, 10, 11], [1, 5, 6, 7, 10, 12], [1, 5, 6, 7, 11, 12], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9, 11], [1, 5, 6, 8, 9, 12], [1, 5, 6, 8, 10, 11], [1, 5, 6, 8, 10, 12], [1, 5, 6, 8, 11, 12], [1, 5, 6, 9, 10, 11], [1, 5, 6, 9, 10, 12], [1, 5, 6, 9, 11, 12], [1, 5, 6, 10, 11, 12], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9, 11], [1, 5, 7, 8, 9, 12], [1, 5, 7, 8, 10, 11], [1, 5, 7, 8, 10, 12], [1, 5, 7, 8, 11, 12], [1, 5, 7, 9, 10, 11], [1, 5, 7, 9, 10, 12], [1, 5, 7, 9, 11, 12], [1, 5, 7, 10, 11, 12], [1, 5, 8, 9, 10, 11], [1, 5, 8, 9, 10, 12], [1, 5, 8, 9, 11, 12], [1, 5, 8, 10, 11, 12], [1, 5, 9, 10, 11, 12], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9, 11], [1, 6, 7, 8, 9, 12], [1, 6, 7, 8, 10, 11], [1, 6, 7, 8, 10, 12], [1, 6, 7, 8, 11, 12], [1, 6, 7, 9, 10, 11], [1, 6, 7, 9, 10, 12], [1, 6, 7, 9, 11, 12], [1, 6, 7, 10, 11, 12], [1, 6, 8, 9, 10, 11], [1, 6, 8, 9, 10, 12], [1, 6, 8, 9, 11, 12], [1, 6, 8, 10, 11, 12], [1, 6, 9, 10, 11, 12], [1, 7, 8, 9, 10, 11], [1, 7, 8, 9, 10, 12], [1, 7, 8, 9, 11, 12], [1, 7, 8, 10, 11, 12], [1, 7, 9, 10, 11, 12], [1, 8, 9, 10, 11, 12], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6, 11], [2, 3, 4, 5, 6, 12], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7, 11], [2, 3, 4, 5, 7, 12], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8, 11], [2, 3, 4, 5, 8, 12], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9, 11], [2, 3, 4, 5, 9, 12], [2, 3, 4, 5, 10, 11], [2, 3, 4, 5, 10, 12], [2, 3, 4, 5, 11, 12], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7, 11], [2, 3, 4, 6, 7, 12], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8, 11], [2, 3, 4, 6, 8, 12], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9, 11], [2, 3, 4, 6, 9, 12], [2, 3, 4, 6, 10, 11], [2, 3, 4, 6, 10, 12], [2, 3, 4, 6, 11, 12], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8, 11], [2, 3, 4, 7, 8, 12], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9, 11], [2, 3, 4, 7, 9, 12], [2, 3, 4, 7, 10, 11], [2, 3, 4, 7, 10, 12], [2, 3, 4, 7, 11, 12], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9, 11], [2, 3, 4, 8, 9, 12], [2, 3, 4, 8, 10, 11], [2, 3, 4, 8, 10, 12], [2, 3, 4, 8, 11, 12], [2, 3, 4, 9, 10, 11], [2, 3, 4, 9, 10, 12], [2, 3, 4, 9, 11, 12], [2, 3, 4, 10, 11, 12], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7, 11], [2, 3, 5, 6, 7, 12], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8, 11], [2, 3, 5, 6, 8, 12], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9, 11], [2, 3, 5, 6, 9, 12], [2, 3, 5, 6, 10, 11], [2, 3, 5, 6, 10, 12], [2, 3, 5, 6, 11, 12], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8, 11], [2, 3, 5, 7, 8, 12], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9, 11], [2, 3, 5, 7, 9, 12], [2, 3, 5, 7, 10, 11], [2, 3, 5, 7, 10, 12], [2, 3, 5, 7, 11, 12], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9, 11], [2, 3, 5, 8, 9, 12], [2, 3, 5, 8, 10, 11], [2, 3, 5, 8, 10, 12], [2, 3, 5, 8, 11, 12], [2, 3, 5, 9, 10, 11], [2, 3, 5, 9, 10, 12], [2, 3, 5, 9, 11, 12], [2, 3, 5, 10, 11, 12], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8, 11], [2, 3, 6, 7, 8, 12], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9, 11], [2, 3, 6, 7, 9, 12], [2, 3, 6, 7, 10, 11], [2, 3, 6, 7, 10, 12], [2, 3, 6, 7, 11, 12], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9, 11], [2, 3, 6, 8, 9, 12], [2, 3, 6, 8, 10, 11], [2, 3, 6, 8, 10, 12], [2, 3, 6, 8, 11, 12], [2, 3, 6, 9, 10, 11], [2, 3, 6, 9, 10, 12], [2, 3, 6, 9, 11, 12], [2, 3, 6, 10, 11, 12], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9, 11], [2, 3, 7, 8, 9, 12], [2, 3, 7, 8, 10, 11], [2, 3, 7, 8, 10, 12], [2, 3, 7, 8, 11, 12], [2, 3, 7, 9, 10, 11], [2, 3, 7, 9, 10, 12], [2, 3, 7, 9, 11, 12], [2, 3, 7, 10, 11, 12], [2, 3, 8, 9, 10, 11], [2, 3, 8, 9, 10, 12], [2, 3, 8, 9, 11, 12], [2, 3, 8, 10, 11, 12], [2, 3, 9, 10, 11, 12], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7, 11], [2, 4, 5, 6, 7, 12], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8, 11], [2, 4, 5, 6, 8, 12], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9, 11], [2, 4, 5, 6, 9, 12], [2, 4, 5, 6, 10, 11], [2, 4, 5, 6, 10, 12], [2, 4, 5, 6, 11, 12], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8, 11], [2, 4, 5, 7, 8, 12], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9, 11], [2, 4, 5, 7, 9, 12], [2, 4, 5, 7, 10, 11], [2, 4, 5, 7, 10, 12], [2, 4, 5, 7, 11, 12], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9, 11], [2, 4, 5, 8, 9, 12], [2, 4, 5, 8, 10, 11], [2, 4, 5, 8, 10, 12], [2, 4, 5, 8, 11, 12], [2, 4, 5, 9, 10, 11], [2, 4, 5, 9, 10, 12], [2, 4, 5, 9, 11, 12], [2, 4, 5, 10, 11, 12], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8, 11], [2, 4, 6, 7, 8, 12], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9, 11], [2, 4, 6, 7, 9, 12], [2, 4, 6, 7, 10, 11], [2, 4, 6, 7, 10, 12], [2, 4, 6, 7, 11, 12], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9, 11], [2, 4, 6, 8, 9, 12], [2, 4, 6, 8, 10, 11], [2, 4, 6, 8, 10, 12], [2, 4, 6, 8, 11, 12], [2, 4, 6, 9, 10, 11], [2, 4, 6, 9, 10, 12], [2, 4, 6, 9, 11, 12], [2, 4, 6, 10, 11, 12], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9, 11], [2, 4, 7, 8, 9, 12], [2, 4, 7, 8, 10, 11], [2, 4, 7, 8, 10, 12], [2, 4, 7, 8, 11, 12], [2, 4, 7, 9, 10, 11], [2, 4, 7, 9, 10, 12], [2, 4, 7, 9, 11, 12], [2, 4, 7, 10, 11, 12], [2, 4, 8, 9, 10, 11], [2, 4, 8, 9, 10, 12], [2, 4, 8, 9, 11, 12], [2, 4, 8, 10, 11, 12], [2, 4, 9, 10, 11, 12], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8, 11], [2, 5, 6, 7, 8, 12], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9, 11], [2, 5, 6, 7, 9, 12], [2, 5, 6, 7, 10, 11], [2, 5, 6, 7, 10, 12], [2, 5, 6, 7, 11, 12], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9, 11], [2, 5, 6, 8, 9, 12], [2, 5, 6, 8, 10, 11], [2, 5, 6, 8, 10, 12], [2, 5, 6, 8, 11, 12], [2, 5, 6, 9, 10, 11], [2, 5, 6, 9, 10, 12], [2, 5, 6, 9, 11, 12], [2, 5, 6, 10, 11, 12], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9, 11], [2, 5, 7, 8, 9, 12], [2, 5, 7, 8, 10, 11], [2, 5, 7, 8, 10, 12], [2, 5, 7, 8, 11, 12], [2, 5, 7, 9, 10, 11], [2, 5, 7, 9, 10, 12], [2, 5, 7, 9, 11, 12], [2, 5, 7, 10, 11, 12], [2, 5, 8, 9, 10, 11], [2, 5, 8, 9, 10, 12], [2, 5, 8, 9, 11, 12], [2, 5, 8, 10, 11, 12], [2, 5, 9, 10, 11, 12], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9, 11], [2, 6, 7, 8, 9, 12], [2, 6, 7, 8, 10, 11], [2, 6, 7, 8, 10, 12], [2, 6, 7, 8, 11, 12], [2, 6, 7, 9, 10, 11], [2, 6, 7, 9, 10, 12], [2, 6, 7, 9, 11, 12], [2, 6, 7, 10, 11, 12], [2, 6, 8, 9, 10, 11], [2, 6, 8, 9, 10, 12], [2, 6, 8, 9, 11, 12], [2, 6, 8, 10, 11, 12], [2, 6, 9, 10, 11, 12], [2, 7, 8, 9, 10, 11], [2, 7, 8, 9, 10, 12], [2, 7, 8, 9, 11, 12], [2, 7, 8, 10, 11, 12], [2, 7, 9, 10, 11, 12], [2, 8, 9, 10, 11, 12], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7, 11], [3, 4, 5, 6, 7, 12], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8, 11], [3, 4, 5, 6, 8, 12], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9, 11], [3, 4, 5, 6, 9, 12], [3, 4, 5, 6, 10, 11], [3, 4, 5, 6, 10, 12], [3, 4, 5, 6, 11, 12], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8, 11], [3, 4, 5, 7, 8, 12], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9, 11], [3, 4, 5, 7, 9, 12], [3, 4, 5, 7, 10, 11], [3, 4, 5, 7, 10, 12], [3, 4, 5, 7, 11, 12], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9, 11], [3, 4, 5, 8, 9, 12], [3, 4, 5, 8, 10, 11], [3, 4, 5, 8, 10, 12], [3, 4, 5, 8, 11, 12], [3, 4, 5, 9, 10, 11], [3, 4, 5, 9, 10, 12], [3, 4, 5, 9, 11, 12], [3, 4, 5, 10, 11, 12], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8, 11], [3, 4, 6, 7, 8, 12], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9, 11], [3, 4, 6, 7, 9, 12], [3, 4, 6, 7, 10, 11], [3, 4, 6, 7, 10, 12], [3, 4, 6, 7, 11, 12], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9, 11], [3, 4, 6, 8, 9, 12], [3, 4, 6, 8, 10, 11], [3, 4, 6, 8, 10, 12], [3, 4, 6, 8, 11, 12], [3, 4, 6, 9, 10, 11], [3, 4, 6, 9, 10, 12], [3, 4, 6, 9, 11, 12], [3, 4, 6, 10, 11, 12], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9, 11], [3, 4, 7, 8, 9, 12], [3, 4, 7, 8, 10, 11], [3, 4, 7, 8, 10, 12], [3, 4, 7, 8, 11, 12], [3, 4, 7, 9, 10, 11], [3, 4, 7, 9, 10, 12], [3, 4, 7, 9, 11, 12], [3, 4, 7, 10, 11, 12], [3, 4, 8, 9, 10, 11], [3, 4, 8, 9, 10, 12], [3, 4, 8, 9, 11, 12], [3, 4, 8, 10, 11, 12], [3, 4, 9, 10, 11, 12], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8, 11], [3, 5, 6, 7, 8, 12], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9, 11], [3, 5, 6, 7, 9, 12], [3, 5, 6, 7, 10, 11], [3, 5, 6, 7, 10, 12], [3, 5, 6, 7, 11, 12], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9, 11], [3, 5, 6, 8, 9, 12], [3, 5, 6, 8, 10, 11], [3, 5, 6, 8, 10, 12], [3, 5, 6, 8, 11, 12], [3, 5, 6, 9, 10, 11], [3, 5, 6, 9, 10, 12], [3, 5, 6, 9, 11, 12], [3, 5, 6, 10, 11, 12], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9, 11], [3, 5, 7, 8, 9, 12], [3, 5, 7, 8, 10, 11], [3, 5, 7, 8, 10, 12], [3, 5, 7, 8, 11, 12], [3, 5, 7, 9, 10, 11], [3, 5, 7, 9, 10, 12], [3, 5, 7, 9, 11, 12], [3, 5, 7, 10, 11, 12], [3, 5, 8, 9, 10, 11], [3, 5, 8, 9, 10, 12], [3, 5, 8, 9, 11, 12], [3, 5, 8, 10, 11, 12], [3, 5, 9, 10, 11, 12], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9, 11], [3, 6, 7, 8, 9, 12], [3, 6, 7, 8, 10, 11], [3, 6, 7, 8, 10, 12], [3, 6, 7, 8, 11, 12], [3, 6, 7, 9, 10, 11], [3, 6, 7, 9, 10, 12], [3, 6, 7, 9, 11, 12], [3, 6, 7, 10, 11, 12], [3, 6, 8, 9, 10, 11], [3, 6, 8, 9, 10, 12], [3, 6, 8, 9, 11, 12], [3, 6, 8, 10, 11, 12], [3, 6, 9, 10, 11, 12], [3, 7, 8, 9, 10, 11], [3, 7, 8, 9, 10, 12], [3, 7, 8, 9, 11, 12], [3, 7, 8, 10, 11, 12], [3, 7, 9, 10, 11, 12], [3, 8, 9, 10, 11, 12], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8, 11], [4, 5, 6, 7, 8, 12], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9, 11], [4, 5, 6, 7, 9, 12], [4, 5, 6, 7, 10, 11], [4, 5, 6, 7, 10, 12], [4, 5, 6, 7, 11, 12], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9, 11], [4, 5, 6, 8, 9, 12], [4, 5, 6, 8, 10, 11], [4, 5, 6, 8, 10, 12], [4, 5, 6, 8, 11, 12], [4, 5, 6, 9, 10, 11], [4, 5, 6, 9, 10, 12], [4, 5, 6, 9, 11, 12], [4, 5, 6, 10, 11, 12], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9, 11], [4, 5, 7, 8, 9, 12], [4, 5, 7, 8, 10, 11], [4, 5, 7, 8, 10, 12], [4, 5, 7, 8, 11, 12], [4, 5, 7, 9, 10, 11], [4, 5, 7, 9, 10, 12], [4, 5, 7, 9, 11, 12], [4, 5, 7, 10, 11, 12], [4, 5, 8, 9, 10, 11], [4, 5, 8, 9, 10, 12], [4, 5, 8, 9, 11, 12], [4, 5, 8, 10, 11, 12], [4, 5, 9, 10, 11, 12], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9, 11], [4, 6, 7, 8, 9, 12], [4, 6, 7, 8, 10, 11], [4, 6, 7, 8, 10, 12], [4, 6, 7, 8, 11, 12], [4, 6, 7, 9, 10, 11], [4, 6, 7, 9, 10, 12], [4, 6, 7, 9, 11, 12], [4, 6, 7, 10, 11, 12], [4, 6, 8, 9, 10, 11], [4, 6, 8, 9, 10, 12], [4, 6, 8, 9, 11, 12], [4, 6, 8, 10, 11, 12], [4, 6, 9, 10, 11, 12], [4, 7, 8, 9, 10, 11], [4, 7, 8, 9, 10, 12], [4, 7, 8, 9, 11, 12], [4, 7, 8, 10, 11, 12], [4, 7, 9, 10, 11, 12], [4, 8, 9, 10, 11, 12], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 11], [5, 6, 7, 8, 9, 12], [5, 6, 7, 8, 10, 11], [5, 6, 7, 8, 10, 12], [5, 6, 7, 8, 11, 12], [5, 6, 7, 9, 10, 11], [5, 6, 7, 9, 10, 12], [5, 6, 7, 9, 11, 12], [5, 6, 7, 10, 11, 12], [5, 6, 8, 9, 10, 11], [5, 6, 8, 9, 10, 12], [5, 6, 8, 9, 11, 12], [5, 6, 8, 10, 11, 12], [5, 6, 9, 10, 11, 12], [5, 7, 8, 9, 10, 11], [5, 7, 8, 9, 10, 12], [5, 7, 8, 9, 11, 12], [5, 7, 8, 10, 11, 12], [5, 7, 9, 10, 11, 12], [5, 8, 9, 10, 11, 12], [6, 7, 8, 9, 10, 11], [6, 7, 8, 9, 10, 12], [6, 7, 8, 9, 11, 12], [6, 7, 8, 10, 11, 12], [6, 7, 9, 10, 11, 12], [6, 8, 9, 10, 11, 12], [7, 8, 9, 10, 11, 12]])\n assert answers_match(candidate(n=20, k=1), [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]])\n assert answers_match(candidate(n=10, k=7), [[1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9, 10]])\n", "comparison": "unordered"}, "public_tests": ["4\n2", "1\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().combine", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:20+00:00", "tests_total": 36, "tests_dropped": 0, "flags": ["any_order"], "topic_tags": ["backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def combine(n, k)", "container": null, "callable": "combine", "parameters": [{"name": "n", "type": "Integer"}, {"name": "k", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 78, "task_id": "subsets", "difficulty": "Medium", "problem_description": "Given an integer array nums of unique elements, return all possible subsets (the power set).\n\nThe solution set must not contain duplicate subsets. Return the solution in any order.\n\nExample 1:\n\nInput: nums = [1,2,3]\nOutput: [[],[1],[2],[1,2],[3],[1,3],[2,3],[1,2,3]]\n\nExample 2:\n\nInput: nums = [0]\nOutput: [[],[0]]\n\nConstraints:\n\n- 1 <= nums.length <= 10\n- -10 <= nums[i] <= 10\n- All the numbers of nums are unique.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[6, 1, 5, 2, 4]), [[], [4], [2], [2, 4], [5], [5, 4], [5, 2], [5, 2, 4], [1], [1, 4], [1, 2], [1, 2, 4], [1, 5], [1, 5, 4], [1, 5, 2], [1, 5, 2, 4], [6], [6, 4], [6, 2], [6, 2, 4], [6, 5], [6, 5, 4], [6, 5, 2], [6, 5, 2, 4], [6, 1], [6, 1, 4], [6, 1, 2], [6, 1, 2, 4], [6, 1, 5], [6, 1, 5, 4], [6, 1, 5, 2], [6, 1, 5, 2, 4]])\n assert answers_match(candidate(nums=[-2, -1, 0, 1, 2]), [[], [2], [1], [1, 2], [0], [0, 2], [0, 1], [0, 1, 2], [-1], [-1, 2], [-1, 1], [-1, 1, 2], [-1, 0], [-1, 0, 2], [-1, 0, 1], [-1, 0, 1, 2], [-2], [-2, 2], [-2, 1], [-2, 1, 2], [-2, 0], [-2, 0, 2], [-2, 0, 1], [-2, 0, 1, 2], [-2, -1], [-2, -1, 2], [-2, -1, 1], [-2, -1, 1, 2], [-2, -1, 0], [-2, -1, 0, 2], [-2, -1, 0, 1], [-2, -1, 0, 1, 2]])\n assert answers_match(candidate(nums=[-2, -3, -1, 0]), [[], [0], [-1], [-1, 0], [-3], [-3, 0], [-3, -1], [-3, -1, 0], [-2], [-2, 0], [-2, -1], [-2, -1, 0], [-2, -3], [-2, -3, 0], [-2, -3, -1], [-2, -3, -1, 0]])\n assert answers_match(candidate(nums=[-2, -3, -1]), [[], [-1], [-3], [-3, -1], [-2], [-2, -1], [-2, -3], [-2, -3, -1]])\n assert answers_match(candidate(nums=[6, 2, 8, 1, 3]), [[], [3], [1], [1, 3], [8], [8, 3], [8, 1], [8, 1, 3], [2], [2, 3], [2, 1], [2, 1, 3], [2, 8], [2, 8, 3], [2, 8, 1], [2, 8, 1, 3], [6], [6, 3], [6, 1], [6, 1, 3], [6, 8], [6, 8, 3], [6, 8, 1], [6, 8, 1, 3], [6, 2], [6, 2, 3], [6, 2, 1], [6, 2, 1, 3], [6, 2, 8], [6, 2, 8, 3], [6, 2, 8, 1], [6, 2, 8, 1, 3]])\n assert answers_match(candidate(nums=[2, 4, 6, 8, 10]), [[], [10], [8], [8, 10], [6], [6, 10], [6, 8], [6, 8, 10], [4], [4, 10], [4, 8], [4, 8, 10], [4, 6], [4, 6, 10], [4, 6, 8], [4, 6, 8, 10], [2], [2, 10], [2, 8], [2, 8, 10], [2, 6], [2, 6, 10], [2, 6, 8], [2, 6, 8, 10], [2, 4], [2, 4, 10], [2, 4, 8], [2, 4, 8, 10], [2, 4, 6], [2, 4, 6, 10], [2, 4, 6, 8], [2, 4, 6, 8, 10]])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9]), [[], [9], [7], [7, 9], [5], [5, 9], [5, 7], [5, 7, 9], [3], [3, 9], [3, 7], [3, 7, 9], [3, 5], [3, 5, 9], [3, 5, 7], [3, 5, 7, 9], [1], [1, 9], [1, 7], [1, 7, 9], [1, 5], [1, 5, 9], [1, 5, 7], [1, 5, 7, 9], [1, 3], [1, 3, 9], [1, 3, 7], [1, 3, 7, 9], [1, 3, 5], [1, 3, 5, 9], [1, 3, 5, 7], [1, 3, 5, 7, 9]])\n assert answers_match(candidate(nums=[10]), [[], [10]])\n assert answers_match(candidate(nums=[1]), [[], [1]])\n assert answers_match(candidate(nums=[-5, 0, 5]), [[], [5], [0], [0, 5], [-5], [-5, 5], [-5, 0], [-5, 0, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[], [4], [3], [3, 4], [2], [2, 4], [2, 3], [2, 3, 4], [1], [1, 4], [1, 3], [1, 3, 4], [1, 2], [1, 2, 4], [1, 2, 3], [1, 2, 3, 4]])\n assert answers_match(candidate(nums=[-5, -4, -3, -2, -1]), [[], [-1], [-2], [-2, -1], [-3], [-3, -1], [-3, -2], [-3, -2, -1], [-4], [-4, -1], [-4, -2], [-4, -2, -1], [-4, -3], [-4, -3, -1], [-4, -3, -2], [-4, -3, -2, -1], [-5], [-5, -1], [-5, -2], [-5, -2, -1], [-5, -3], [-5, -3, -1], [-5, -3, -2], [-5, -3, -2, -1], [-5, -4], [-5, -4, -1], [-5, -4, -2], [-5, -4, -2, -1], [-5, -4, -3], [-5, -4, -3, -1], [-5, -4, -3, -2], [-5, -4, -3, -2, -1]])\n assert answers_match(candidate(nums=[5, -1, 4]), [[], [4], [-1], [-1, 4], [5], [5, 4], [5, -1], [5, -1, 4]])\n assert answers_match(candidate(nums=[0]), [[], [0]])\n assert answers_match(candidate(nums=[-10, 10]), [[], [10], [-10], [-10, 10]])\n assert answers_match(candidate(nums=[5, -1, 2]), [[], [2], [-1], [-1, 2], [5], [5, 2], [5, -1], [5, -1, 2]])\n assert answers_match(candidate(nums=[10, -5, 0, 3]), [[], [3], [0], [0, 3], [-5], [-5, 3], [-5, 0], [-5, 0, 3], [10], [10, 3], [10, 0], [10, 0, 3], [10, -5], [10, -5, 3], [10, -5, 0], [10, -5, 0, 3]])\n assert answers_match(candidate(nums=[1, 2]), [[], [2], [1], [1, 2]])\n assert answers_match(candidate(nums=[10, -10, 0]), [[], [0], [-10], [-10, 0], [10], [10, 0], [10, -10], [10, -10, 0]])\n assert answers_match(candidate(nums=[1, 2, 3]), [[], [3], [2], [2, 3], [1], [1, 3], [1, 2], [1, 2, 3]])\n assert answers_match(candidate(nums=[5, -1, 3]), [[], [3], [-1], [-1, 3], [5], [5, 3], [5, -1], [5, -1, 3]])\n assert answers_match(candidate(nums=[7]), [[], [7]])\n assert answers_match(candidate(nums=[5, -3, 7, 1]), [[], [1], [7], [7, 1], [-3], [-3, 1], [-3, 7], [-3, 7, 1], [5], [5, 1], [5, 7], [5, 7, 1], [5, -3], [5, -3, 1], [5, -3, 7], [5, -3, 7, 1]])\n assert answers_match(candidate(nums=[3, 1, 2]), [[], [2], [1], [1, 2], [3], [3, 2], [3, 1], [3, 1, 2]])\n assert answers_match(candidate(nums=[-1, 0, 1]), [[], [1], [0], [0, 1], [-1], [-1, 1], [-1, 0], [-1, 0, 1]])\n assert answers_match(candidate(nums=[-2, -4, -6, -8]), [[], [-8], [-6], [-6, -8], [-4], [-4, -8], [-4, -6], [-4, -6, -8], [-2], [-2, -8], [-2, -6], [-2, -6, -8], [-2, -4], [-2, -4, -8], [-2, -4, -6], [-2, -4, -6, -8]])\n assert answers_match(candidate(nums=[2, 4, 6, 8]), [[], [8], [6], [6, 8], [4], [4, 8], [4, 6], [4, 6, 8], [2], [2, 8], [2, 6], [2, 6, 8], [2, 4], [2, 4, 8], [2, 4, 6], [2, 4, 6, 8]])\n assert answers_match(candidate(nums=[-10, -5, -3, -1, 0, 1, 3, 5, 10]), [[], [10], [5], [5, 10], [3], [3, 10], [3, 5], [3, 5, 10], [1], [1, 10], [1, 5], [1, 5, 10], [1, 3], [1, 3, 10], [1, 3, 5], [1, 3, 5, 10], [0], [0, 10], [0, 5], [0, 5, 10], [0, 3], [0, 3, 10], [0, 3, 5], [0, 3, 5, 10], [0, 1], [0, 1, 10], [0, 1, 5], [0, 1, 5, 10], [0, 1, 3], [0, 1, 3, 10], [0, 1, 3, 5], [0, 1, 3, 5, 10], [-1], [-1, 10], [-1, 5], [-1, 5, 10], [-1, 3], [-1, 3, 10], [-1, 3, 5], [-1, 3, 5, 10], [-1, 1], [-1, 1, 10], [-1, 1, 5], [-1, 1, 5, 10], [-1, 1, 3], [-1, 1, 3, 10], [-1, 1, 3, 5], [-1, 1, 3, 5, 10], [-1, 0], [-1, 0, 10], [-1, 0, 5], [-1, 0, 5, 10], [-1, 0, 3], [-1, 0, 3, 10], [-1, 0, 3, 5], [-1, 0, 3, 5, 10], [-1, 0, 1], [-1, 0, 1, 10], [-1, 0, 1, 5], [-1, 0, 1, 5, 10], [-1, 0, 1, 3], [-1, 0, 1, 3, 10], [-1, 0, 1, 3, 5], [-1, 0, 1, 3, 5, 10], [-3], [-3, 10], [-3, 5], [-3, 5, 10], [-3, 3], [-3, 3, 10], [-3, 3, 5], [-3, 3, 5, 10], [-3, 1], [-3, 1, 10], [-3, 1, 5], [-3, 1, 5, 10], [-3, 1, 3], [-3, 1, 3, 10], [-3, 1, 3, 5], [-3, 1, 3, 5, 10], [-3, 0], [-3, 0, 10], [-3, 0, 5], [-3, 0, 5, 10], [-3, 0, 3], [-3, 0, 3, 10], [-3, 0, 3, 5], [-3, 0, 3, 5, 10], [-3, 0, 1], [-3, 0, 1, 10], [-3, 0, 1, 5], [-3, 0, 1, 5, 10], [-3, 0, 1, 3], [-3, 0, 1, 3, 10], [-3, 0, 1, 3, 5], [-3, 0, 1, 3, 5, 10], [-3, -1], [-3, -1, 10], [-3, -1, 5], [-3, -1, 5, 10], [-3, -1, 3], [-3, -1, 3, 10], [-3, -1, 3, 5], [-3, -1, 3, 5, 10], [-3, -1, 1], [-3, -1, 1, 10], [-3, -1, 1, 5], [-3, -1, 1, 5, 10], [-3, -1, 1, 3], [-3, -1, 1, 3, 10], [-3, -1, 1, 3, 5], [-3, -1, 1, 3, 5, 10], [-3, -1, 0], [-3, -1, 0, 10], [-3, -1, 0, 5], [-3, -1, 0, 5, 10], [-3, -1, 0, 3], [-3, -1, 0, 3, 10], [-3, -1, 0, 3, 5], [-3, -1, 0, 3, 5, 10], [-3, -1, 0, 1], [-3, -1, 0, 1, 10], [-3, -1, 0, 1, 5], [-3, -1, 0, 1, 5, 10], [-3, -1, 0, 1, 3], [-3, -1, 0, 1, 3, 10], [-3, -1, 0, 1, 3, 5], [-3, -1, 0, 1, 3, 5, 10], [-5], [-5, 10], [-5, 5], [-5, 5, 10], [-5, 3], [-5, 3, 10], [-5, 3, 5], [-5, 3, 5, 10], [-5, 1], [-5, 1, 10], [-5, 1, 5], [-5, 1, 5, 10], [-5, 1, 3], [-5, 1, 3, 10], [-5, 1, 3, 5], [-5, 1, 3, 5, 10], [-5, 0], [-5, 0, 10], [-5, 0, 5], [-5, 0, 5, 10], [-5, 0, 3], [-5, 0, 3, 10], [-5, 0, 3, 5], [-5, 0, 3, 5, 10], [-5, 0, 1], [-5, 0, 1, 10], [-5, 0, 1, 5], [-5, 0, 1, 5, 10], [-5, 0, 1, 3], [-5, 0, 1, 3, 10], [-5, 0, 1, 3, 5], [-5, 0, 1, 3, 5, 10], [-5, -1], [-5, -1, 10], [-5, -1, 5], [-5, -1, 5, 10], [-5, -1, 3], [-5, -1, 3, 10], [-5, -1, 3, 5], [-5, -1, 3, 5, 10], [-5, -1, 1], [-5, -1, 1, 10], [-5, -1, 1, 5], [-5, -1, 1, 5, 10], [-5, -1, 1, 3], [-5, -1, 1, 3, 10], [-5, -1, 1, 3, 5], [-5, -1, 1, 3, 5, 10], [-5, -1, 0], [-5, -1, 0, 10], [-5, -1, 0, 5], [-5, -1, 0, 5, 10], [-5, -1, 0, 3], [-5, -1, 0, 3, 10], [-5, -1, 0, 3, 5], [-5, -1, 0, 3, 5, 10], [-5, -1, 0, 1], [-5, -1, 0, 1, 10], [-5, -1, 0, 1, 5], [-5, -1, 0, 1, 5, 10], [-5, -1, 0, 1, 3], [-5, -1, 0, 1, 3, 10], [-5, -1, 0, 1, 3, 5], [-5, -1, 0, 1, 3, 5, 10], [-5, -3], [-5, -3, 10], [-5, -3, 5], [-5, -3, 5, 10], [-5, -3, 3], [-5, -3, 3, 10], [-5, -3, 3, 5], [-5, -3, 3, 5, 10], [-5, -3, 1], [-5, -3, 1, 10], [-5, -3, 1, 5], [-5, -3, 1, 5, 10], [-5, -3, 1, 3], [-5, -3, 1, 3, 10], [-5, -3, 1, 3, 5], [-5, -3, 1, 3, 5, 10], [-5, -3, 0], [-5, -3, 0, 10], [-5, -3, 0, 5], [-5, -3, 0, 5, 10], [-5, -3, 0, 3], [-5, -3, 0, 3, 10], [-5, -3, 0, 3, 5], [-5, -3, 0, 3, 5, 10], [-5, -3, 0, 1], [-5, -3, 0, 1, 10], [-5, -3, 0, 1, 5], [-5, -3, 0, 1, 5, 10], [-5, -3, 0, 1, 3], [-5, -3, 0, 1, 3, 10], [-5, -3, 0, 1, 3, 5], [-5, -3, 0, 1, 3, 5, 10], [-5, -3, -1], [-5, -3, -1, 10], [-5, -3, -1, 5], [-5, -3, -1, 5, 10], [-5, -3, -1, 3], [-5, -3, -1, 3, 10], [-5, -3, -1, 3, 5], [-5, -3, -1, 3, 5, 10], [-5, -3, -1, 1], [-5, -3, -1, 1, 10], [-5, -3, -1, 1, 5], [-5, -3, -1, 1, 5, 10], [-5, -3, -1, 1, 3], [-5, -3, -1, 1, 3, 10], [-5, -3, -1, 1, 3, 5], [-5, -3, -1, 1, 3, 5, 10], [-5, -3, -1, 0], [-5, -3, -1, 0, 10], [-5, -3, -1, 0, 5], [-5, -3, -1, 0, 5, 10], [-5, -3, -1, 0, 3], [-5, -3, -1, 0, 3, 10], [-5, -3, -1, 0, 3, 5], [-5, -3, -1, 0, 3, 5, 10], [-5, -3, -1, 0, 1], [-5, -3, -1, 0, 1, 10], [-5, -3, -1, 0, 1, 5], [-5, -3, -1, 0, 1, 5, 10], [-5, -3, -1, 0, 1, 3], [-5, -3, -1, 0, 1, 3, 10], [-5, -3, -1, 0, 1, 3, 5], [-5, -3, -1, 0, 1, 3, 5, 10], [-10], [-10, 10], [-10, 5], [-10, 5, 10], [-10, 3], [-10, 3, 10], [-10, 3, 5], [-10, 3, 5, 10], [-10, 1], [-10, 1, 10], [-10, 1, 5], [-10, 1, 5, 10], [-10, 1, 3], [-10, 1, 3, 10], [-10, 1, 3, 5], [-10, 1, 3, 5, 10], [-10, 0], [-10, 0, 10], [-10, 0, 5], [-10, 0, 5, 10], [-10, 0, 3], [-10, 0, 3, 10], [-10, 0, 3, 5], [-10, 0, 3, 5, 10], [-10, 0, 1], [-10, 0, 1, 10], [-10, 0, 1, 5], [-10, 0, 1, 5, 10], [-10, 0, 1, 3], [-10, 0, 1, 3, 10], [-10, 0, 1, 3, 5], [-10, 0, 1, 3, 5, 10], [-10, -1], [-10, -1, 10], [-10, -1, 5], [-10, -1, 5, 10], [-10, -1, 3], [-10, -1, 3, 10], [-10, -1, 3, 5], [-10, -1, 3, 5, 10], [-10, -1, 1], [-10, -1, 1, 10], [-10, -1, 1, 5], [-10, -1, 1, 5, 10], [-10, -1, 1, 3], [-10, -1, 1, 3, 10], [-10, -1, 1, 3, 5], [-10, -1, 1, 3, 5, 10], [-10, -1, 0], [-10, -1, 0, 10], [-10, -1, 0, 5], [-10, -1, 0, 5, 10], [-10, -1, 0, 3], [-10, -1, 0, 3, 10], [-10, -1, 0, 3, 5], [-10, -1, 0, 3, 5, 10], [-10, -1, 0, 1], [-10, -1, 0, 1, 10], [-10, -1, 0, 1, 5], [-10, -1, 0, 1, 5, 10], [-10, -1, 0, 1, 3], [-10, -1, 0, 1, 3, 10], [-10, -1, 0, 1, 3, 5], [-10, -1, 0, 1, 3, 5, 10], [-10, -3], [-10, -3, 10], [-10, -3, 5], [-10, -3, 5, 10], [-10, -3, 3], [-10, -3, 3, 10], [-10, -3, 3, 5], [-10, -3, 3, 5, 10], [-10, -3, 1], [-10, -3, 1, 10], [-10, -3, 1, 5], [-10, -3, 1, 5, 10], [-10, -3, 1, 3], [-10, -3, 1, 3, 10], [-10, -3, 1, 3, 5], [-10, -3, 1, 3, 5, 10], [-10, -3, 0], [-10, -3, 0, 10], [-10, -3, 0, 5], [-10, -3, 0, 5, 10], [-10, -3, 0, 3], [-10, -3, 0, 3, 10], [-10, -3, 0, 3, 5], [-10, -3, 0, 3, 5, 10], [-10, -3, 0, 1], [-10, -3, 0, 1, 10], [-10, -3, 0, 1, 5], [-10, -3, 0, 1, 5, 10], [-10, -3, 0, 1, 3], [-10, -3, 0, 1, 3, 10], [-10, -3, 0, 1, 3, 5], [-10, -3, 0, 1, 3, 5, 10], [-10, -3, -1], [-10, -3, -1, 10], [-10, -3, -1, 5], [-10, -3, -1, 5, 10], [-10, -3, -1, 3], [-10, -3, -1, 3, 10], [-10, -3, -1, 3, 5], [-10, -3, -1, 3, 5, 10], [-10, -3, -1, 1], [-10, -3, -1, 1, 10], [-10, -3, -1, 1, 5], [-10, -3, -1, 1, 5, 10], [-10, -3, -1, 1, 3], [-10, -3, -1, 1, 3, 10], [-10, -3, -1, 1, 3, 5], [-10, -3, -1, 1, 3, 5, 10], [-10, -3, -1, 0], [-10, -3, -1, 0, 10], [-10, -3, -1, 0, 5], [-10, -3, -1, 0, 5, 10], [-10, -3, -1, 0, 3], [-10, -3, -1, 0, 3, 10], [-10, -3, -1, 0, 3, 5], [-10, -3, -1, 0, 3, 5, 10], [-10, -3, -1, 0, 1], [-10, -3, -1, 0, 1, 10], [-10, -3, -1, 0, 1, 5], [-10, -3, -1, 0, 1, 5, 10], [-10, -3, -1, 0, 1, 3], [-10, -3, -1, 0, 1, 3, 10], [-10, -3, -1, 0, 1, 3, 5], [-10, -3, -1, 0, 1, 3, 5, 10], [-10, -5], [-10, -5, 10], [-10, -5, 5], [-10, -5, 5, 10], [-10, -5, 3], [-10, -5, 3, 10], [-10, -5, 3, 5], [-10, -5, 3, 5, 10], [-10, -5, 1], [-10, -5, 1, 10], [-10, -5, 1, 5], [-10, -5, 1, 5, 10], [-10, -5, 1, 3], [-10, -5, 1, 3, 10], [-10, -5, 1, 3, 5], [-10, -5, 1, 3, 5, 10], [-10, -5, 0], [-10, -5, 0, 10], [-10, -5, 0, 5], [-10, -5, 0, 5, 10], [-10, -5, 0, 3], [-10, -5, 0, 3, 10], [-10, -5, 0, 3, 5], [-10, -5, 0, 3, 5, 10], [-10, -5, 0, 1], [-10, -5, 0, 1, 10], [-10, -5, 0, 1, 5], [-10, -5, 0, 1, 5, 10], [-10, -5, 0, 1, 3], [-10, -5, 0, 1, 3, 10], [-10, -5, 0, 1, 3, 5], [-10, -5, 0, 1, 3, 5, 10], [-10, -5, -1], [-10, -5, -1, 10], [-10, -5, -1, 5], [-10, -5, -1, 5, 10], [-10, -5, -1, 3], [-10, -5, -1, 3, 10], [-10, -5, -1, 3, 5], [-10, -5, -1, 3, 5, 10], [-10, -5, -1, 1], [-10, -5, -1, 1, 10], [-10, -5, -1, 1, 5], [-10, -5, -1, 1, 5, 10], [-10, -5, -1, 1, 3], [-10, -5, -1, 1, 3, 10], [-10, -5, -1, 1, 3, 5], [-10, -5, -1, 1, 3, 5, 10], [-10, -5, -1, 0], [-10, -5, -1, 0, 10], [-10, -5, -1, 0, 5], [-10, -5, -1, 0, 5, 10], [-10, -5, -1, 0, 3], [-10, -5, -1, 0, 3, 10], [-10, -5, -1, 0, 3, 5], [-10, -5, -1, 0, 3, 5, 10], [-10, -5, -1, 0, 1], [-10, -5, -1, 0, 1, 10], [-10, -5, -1, 0, 1, 5], [-10, -5, -1, 0, 1, 5, 10], [-10, -5, -1, 0, 1, 3], [-10, -5, -1, 0, 1, 3, 10], [-10, -5, -1, 0, 1, 3, 5], [-10, -5, -1, 0, 1, 3, 5, 10], [-10, -5, -3], [-10, -5, -3, 10], [-10, -5, -3, 5], [-10, -5, -3, 5, 10], [-10, -5, -3, 3], [-10, -5, -3, 3, 10], [-10, -5, -3, 3, 5], [-10, -5, -3, 3, 5, 10], [-10, -5, -3, 1], [-10, -5, -3, 1, 10], [-10, -5, -3, 1, 5], [-10, -5, -3, 1, 5, 10], [-10, -5, -3, 1, 3], [-10, -5, -3, 1, 3, 10], [-10, -5, -3, 1, 3, 5], [-10, -5, -3, 1, 3, 5, 10], [-10, -5, -3, 0], [-10, -5, -3, 0, 10], [-10, -5, -3, 0, 5], [-10, -5, -3, 0, 5, 10], [-10, -5, -3, 0, 3], [-10, -5, -3, 0, 3, 10], [-10, -5, -3, 0, 3, 5], [-10, -5, -3, 0, 3, 5, 10], [-10, -5, -3, 0, 1], [-10, -5, -3, 0, 1, 10], [-10, -5, -3, 0, 1, 5], [-10, -5, -3, 0, 1, 5, 10], [-10, -5, -3, 0, 1, 3], [-10, -5, -3, 0, 1, 3, 10], [-10, -5, -3, 0, 1, 3, 5], [-10, -5, -3, 0, 1, 3, 5, 10], [-10, -5, -3, -1], [-10, -5, -3, -1, 10], [-10, -5, -3, -1, 5], [-10, -5, -3, -1, 5, 10], [-10, -5, -3, -1, 3], [-10, -5, -3, -1, 3, 10], [-10, -5, -3, -1, 3, 5], [-10, -5, -3, -1, 3, 5, 10], [-10, -5, -3, -1, 1], [-10, -5, -3, -1, 1, 10], [-10, -5, -3, -1, 1, 5], [-10, -5, -3, -1, 1, 5, 10], [-10, -5, -3, -1, 1, 3], [-10, -5, -3, -1, 1, 3, 10], [-10, -5, -3, -1, 1, 3, 5], [-10, -5, -3, -1, 1, 3, 5, 10], [-10, -5, -3, -1, 0], [-10, -5, -3, -1, 0, 10], [-10, -5, -3, -1, 0, 5], [-10, -5, -3, -1, 0, 5, 10], [-10, -5, -3, -1, 0, 3], [-10, -5, -3, -1, 0, 3, 10], [-10, -5, -3, -1, 0, 3, 5], [-10, -5, -3, -1, 0, 3, 5, 10], [-10, -5, -3, -1, 0, 1], [-10, -5, -3, -1, 0, 1, 10], [-10, -5, -3, -1, 0, 1, 5], [-10, -5, -3, -1, 0, 1, 5, 10], [-10, -5, -3, -1, 0, 1, 3], [-10, -5, -3, -1, 0, 1, 3, 10], [-10, -5, -3, -1, 0, 1, 3, 5], [-10, -5, -3, -1, 0, 1, 3, 5, 10]])\n assert answers_match(candidate(nums=[10, -5, 0, 7]), [[], [7], [0], [0, 7], [-5], [-5, 7], [-5, 0], [-5, 0, 7], [10], [10, 7], [10, 0], [10, 0, 7], [10, -5], [10, -5, 7], [10, -5, 0], [10, -5, 0, 7]])\n assert answers_match(candidate(nums=[9, 7, 5, 3, 1, -1, -3, -5, -7, -9]), [[], [-9], [-7], [-7, -9], [-5], [-5, -9], [-5, -7], [-5, -7, -9], [-3], [-3, -9], [-3, -7], [-3, -7, -9], [-3, -5], [-3, -5, -9], [-3, -5, -7], [-3, -5, -7, -9], [-1], [-1, -9], [-1, -7], [-1, -7, -9], [-1, -5], [-1, -5, -9], [-1, -5, -7], [-1, -5, -7, -9], [-1, -3], [-1, -3, -9], [-1, -3, -7], [-1, -3, -7, -9], [-1, -3, -5], [-1, -3, -5, -9], [-1, -3, -5, -7], [-1, -3, -5, -7, -9], [1], [1, -9], [1, -7], [1, -7, -9], [1, -5], [1, -5, -9], [1, -5, -7], [1, -5, -7, -9], [1, -3], [1, -3, -9], [1, -3, -7], [1, -3, -7, -9], [1, -3, -5], [1, -3, -5, -9], [1, -3, -5, -7], [1, -3, -5, -7, -9], [1, -1], [1, -1, -9], [1, -1, -7], [1, -1, -7, -9], [1, -1, -5], [1, -1, -5, -9], [1, -1, -5, -7], [1, -1, -5, -7, -9], [1, -1, -3], [1, -1, -3, -9], [1, -1, -3, -7], [1, -1, -3, -7, -9], [1, -1, -3, -5], [1, -1, -3, -5, -9], [1, -1, -3, -5, -7], [1, -1, -3, -5, -7, -9], [3], [3, -9], [3, -7], [3, -7, -9], [3, -5], [3, -5, -9], [3, -5, -7], [3, -5, -7, -9], [3, -3], [3, -3, -9], [3, -3, -7], [3, -3, -7, -9], [3, -3, -5], [3, -3, -5, -9], [3, -3, -5, -7], [3, -3, -5, -7, -9], [3, -1], [3, -1, -9], [3, -1, -7], [3, -1, -7, -9], [3, -1, -5], [3, -1, -5, -9], [3, -1, -5, -7], [3, -1, -5, -7, -9], [3, -1, -3], [3, -1, -3, -9], [3, -1, -3, -7], [3, -1, -3, -7, -9], [3, -1, -3, -5], [3, -1, -3, -5, -9], [3, -1, -3, -5, -7], [3, -1, -3, -5, -7, -9], [3, 1], [3, 1, -9], [3, 1, -7], [3, 1, -7, -9], [3, 1, -5], [3, 1, -5, -9], [3, 1, -5, -7], [3, 1, -5, -7, -9], [3, 1, -3], [3, 1, -3, -9], [3, 1, -3, -7], [3, 1, -3, -7, -9], [3, 1, -3, -5], [3, 1, -3, -5, -9], [3, 1, -3, -5, -7], [3, 1, -3, -5, -7, -9], [3, 1, -1], [3, 1, -1, -9], [3, 1, -1, -7], [3, 1, -1, -7, -9], [3, 1, -1, -5], [3, 1, -1, -5, -9], [3, 1, -1, -5, -7], [3, 1, -1, -5, -7, -9], [3, 1, -1, -3], [3, 1, -1, -3, -9], [3, 1, -1, -3, -7], [3, 1, -1, -3, -7, -9], [3, 1, -1, -3, -5], [3, 1, -1, -3, -5, -9], [3, 1, -1, -3, -5, -7], [3, 1, -1, -3, -5, -7, -9], [5], [5, -9], [5, -7], [5, -7, -9], [5, -5], [5, -5, -9], [5, -5, -7], [5, -5, -7, -9], [5, -3], [5, -3, -9], [5, -3, -7], [5, -3, -7, -9], [5, -3, -5], [5, -3, -5, -9], [5, -3, -5, -7], [5, -3, -5, -7, -9], [5, -1], [5, -1, -9], [5, -1, -7], [5, -1, -7, -9], [5, -1, -5], [5, -1, -5, -9], [5, -1, -5, -7], [5, -1, -5, -7, -9], [5, -1, -3], [5, -1, -3, -9], [5, -1, -3, -7], [5, -1, -3, -7, -9], [5, -1, -3, -5], [5, -1, -3, -5, -9], [5, -1, -3, -5, -7], [5, -1, -3, -5, -7, -9], [5, 1], [5, 1, -9], [5, 1, -7], [5, 1, -7, -9], [5, 1, -5], [5, 1, -5, -9], [5, 1, -5, -7], [5, 1, -5, -7, -9], [5, 1, -3], [5, 1, -3, -9], [5, 1, -3, -7], [5, 1, -3, -7, -9], [5, 1, -3, -5], [5, 1, -3, -5, -9], [5, 1, -3, -5, -7], [5, 1, -3, -5, -7, -9], [5, 1, -1], [5, 1, -1, -9], [5, 1, -1, -7], [5, 1, -1, -7, -9], [5, 1, -1, -5], [5, 1, -1, -5, -9], [5, 1, -1, -5, -7], [5, 1, -1, -5, -7, -9], [5, 1, -1, -3], [5, 1, -1, -3, -9], [5, 1, -1, -3, -7], [5, 1, -1, -3, -7, -9], [5, 1, -1, -3, -5], [5, 1, -1, -3, -5, -9], [5, 1, -1, -3, -5, -7], [5, 1, -1, -3, -5, -7, -9], [5, 3], [5, 3, -9], [5, 3, -7], [5, 3, -7, -9], [5, 3, -5], [5, 3, -5, -9], [5, 3, -5, -7], [5, 3, -5, -7, -9], [5, 3, -3], [5, 3, -3, -9], [5, 3, -3, -7], [5, 3, -3, -7, -9], [5, 3, -3, -5], [5, 3, -3, -5, -9], [5, 3, -3, -5, -7], [5, 3, -3, -5, -7, -9], [5, 3, -1], [5, 3, -1, -9], [5, 3, -1, -7], [5, 3, -1, -7, -9], [5, 3, -1, -5], [5, 3, -1, -5, -9], [5, 3, -1, -5, -7], [5, 3, -1, -5, -7, -9], [5, 3, -1, -3], [5, 3, -1, -3, -9], [5, 3, -1, -3, -7], [5, 3, -1, -3, -7, -9], [5, 3, -1, -3, -5], [5, 3, -1, -3, -5, -9], [5, 3, -1, -3, -5, -7], [5, 3, -1, -3, -5, -7, -9], [5, 3, 1], [5, 3, 1, -9], [5, 3, 1, -7], [5, 3, 1, -7, -9], [5, 3, 1, -5], [5, 3, 1, -5, -9], [5, 3, 1, -5, -7], [5, 3, 1, -5, -7, -9], [5, 3, 1, -3], [5, 3, 1, -3, -9], [5, 3, 1, -3, -7], [5, 3, 1, -3, -7, -9], [5, 3, 1, -3, -5], [5, 3, 1, -3, -5, -9], [5, 3, 1, -3, -5, -7], [5, 3, 1, -3, -5, -7, -9], [5, 3, 1, -1], [5, 3, 1, -1, -9], [5, 3, 1, -1, -7], [5, 3, 1, -1, -7, -9], [5, 3, 1, -1, -5], [5, 3, 1, -1, -5, -9], [5, 3, 1, -1, -5, -7], [5, 3, 1, -1, -5, -7, -9], [5, 3, 1, -1, -3], [5, 3, 1, -1, -3, -9], [5, 3, 1, -1, -3, -7], [5, 3, 1, -1, -3, -7, -9], [5, 3, 1, -1, -3, -5], [5, 3, 1, -1, -3, -5, -9], [5, 3, 1, -1, -3, -5, -7], [5, 3, 1, -1, -3, -5, -7, -9], [7], [7, -9], [7, -7], [7, -7, -9], [7, -5], [7, -5, -9], [7, -5, -7], [7, -5, -7, -9], [7, -3], [7, -3, -9], [7, -3, -7], [7, -3, -7, -9], [7, -3, -5], [7, -3, -5, -9], [7, -3, -5, -7], [7, -3, -5, -7, -9], [7, -1], [7, -1, -9], [7, -1, -7], [7, -1, -7, -9], [7, -1, -5], [7, -1, -5, -9], [7, -1, -5, -7], [7, -1, -5, -7, -9], [7, -1, -3], [7, -1, -3, -9], [7, -1, -3, -7], [7, -1, -3, -7, -9], [7, -1, -3, -5], [7, -1, -3, -5, -9], [7, -1, -3, -5, -7], [7, -1, -3, -5, -7, -9], [7, 1], [7, 1, -9], [7, 1, -7], [7, 1, -7, -9], [7, 1, -5], [7, 1, -5, -9], [7, 1, -5, -7], [7, 1, -5, -7, -9], [7, 1, -3], [7, 1, -3, -9], [7, 1, -3, -7], [7, 1, -3, -7, -9], [7, 1, -3, -5], [7, 1, -3, -5, -9], [7, 1, -3, -5, -7], [7, 1, -3, -5, -7, -9], [7, 1, -1], [7, 1, -1, -9], [7, 1, -1, -7], [7, 1, -1, -7, -9], [7, 1, -1, -5], [7, 1, -1, -5, -9], [7, 1, -1, -5, -7], [7, 1, -1, -5, -7, -9], [7, 1, -1, -3], [7, 1, -1, -3, -9], [7, 1, -1, -3, -7], [7, 1, -1, -3, -7, -9], [7, 1, -1, -3, -5], [7, 1, -1, -3, -5, -9], [7, 1, -1, -3, -5, -7], [7, 1, -1, -3, -5, -7, -9], [7, 3], [7, 3, -9], [7, 3, -7], [7, 3, -7, -9], [7, 3, -5], [7, 3, -5, -9], [7, 3, -5, -7], [7, 3, -5, -7, -9], [7, 3, -3], [7, 3, -3, -9], [7, 3, -3, -7], [7, 3, -3, -7, -9], [7, 3, -3, -5], [7, 3, -3, -5, -9], [7, 3, -3, -5, -7], [7, 3, -3, -5, -7, -9], [7, 3, -1], [7, 3, -1, -9], [7, 3, -1, -7], [7, 3, -1, -7, -9], [7, 3, -1, -5], [7, 3, -1, -5, -9], [7, 3, -1, -5, -7], [7, 3, -1, -5, -7, -9], [7, 3, -1, -3], [7, 3, -1, -3, -9], [7, 3, -1, -3, -7], [7, 3, -1, -3, -7, -9], [7, 3, -1, -3, -5], [7, 3, -1, -3, -5, -9], [7, 3, -1, -3, -5, -7], [7, 3, -1, -3, -5, -7, -9], [7, 3, 1], [7, 3, 1, -9], [7, 3, 1, -7], [7, 3, 1, -7, -9], [7, 3, 1, -5], [7, 3, 1, -5, -9], [7, 3, 1, -5, -7], [7, 3, 1, -5, -7, -9], [7, 3, 1, -3], [7, 3, 1, -3, -9], [7, 3, 1, -3, -7], [7, 3, 1, -3, -7, -9], [7, 3, 1, -3, -5], [7, 3, 1, -3, -5, -9], [7, 3, 1, -3, -5, -7], [7, 3, 1, -3, -5, -7, -9], [7, 3, 1, -1], [7, 3, 1, -1, -9], [7, 3, 1, -1, -7], [7, 3, 1, -1, -7, -9], [7, 3, 1, -1, -5], [7, 3, 1, -1, -5, -9], [7, 3, 1, -1, -5, -7], [7, 3, 1, -1, -5, -7, -9], [7, 3, 1, -1, -3], [7, 3, 1, -1, -3, -9], [7, 3, 1, -1, -3, -7], [7, 3, 1, -1, -3, -7, -9], [7, 3, 1, -1, -3, -5], [7, 3, 1, -1, -3, -5, -9], [7, 3, 1, -1, -3, -5, -7], [7, 3, 1, -1, -3, -5, -7, -9], [7, 5], [7, 5, -9], [7, 5, -7], [7, 5, -7, -9], [7, 5, -5], [7, 5, -5, -9], [7, 5, -5, -7], [7, 5, -5, -7, -9], [7, 5, -3], [7, 5, -3, -9], [7, 5, -3, -7], [7, 5, -3, -7, -9], [7, 5, -3, -5], [7, 5, -3, -5, -9], [7, 5, -3, -5, -7], [7, 5, -3, -5, -7, -9], [7, 5, -1], [7, 5, -1, -9], [7, 5, -1, -7], [7, 5, -1, -7, -9], [7, 5, -1, -5], [7, 5, -1, -5, -9], [7, 5, -1, -5, -7], [7, 5, -1, -5, -7, -9], [7, 5, -1, -3], [7, 5, -1, -3, -9], [7, 5, -1, -3, -7], [7, 5, -1, -3, -7, -9], [7, 5, -1, -3, -5], [7, 5, -1, -3, -5, -9], [7, 5, -1, -3, -5, -7], [7, 5, -1, -3, -5, -7, -9], [7, 5, 1], [7, 5, 1, -9], [7, 5, 1, -7], [7, 5, 1, -7, -9], [7, 5, 1, -5], [7, 5, 1, -5, -9], [7, 5, 1, -5, -7], [7, 5, 1, -5, -7, -9], [7, 5, 1, -3], [7, 5, 1, -3, -9], [7, 5, 1, -3, -7], [7, 5, 1, -3, -7, -9], [7, 5, 1, -3, -5], [7, 5, 1, -3, -5, -9], [7, 5, 1, -3, -5, -7], [7, 5, 1, -3, -5, -7, -9], [7, 5, 1, -1], [7, 5, 1, -1, -9], [7, 5, 1, -1, -7], [7, 5, 1, -1, -7, -9], [7, 5, 1, -1, -5], [7, 5, 1, -1, -5, -9], [7, 5, 1, -1, -5, -7], [7, 5, 1, -1, -5, -7, -9], [7, 5, 1, -1, -3], [7, 5, 1, -1, -3, -9], [7, 5, 1, -1, -3, -7], [7, 5, 1, -1, -3, -7, -9], [7, 5, 1, -1, -3, -5], [7, 5, 1, -1, -3, -5, -9], [7, 5, 1, -1, -3, -5, -7], [7, 5, 1, -1, -3, -5, -7, -9], [7, 5, 3], [7, 5, 3, -9], [7, 5, 3, -7], [7, 5, 3, -7, -9], [7, 5, 3, -5], [7, 5, 3, -5, -9], [7, 5, 3, -5, -7], [7, 5, 3, -5, -7, -9], [7, 5, 3, -3], [7, 5, 3, -3, -9], [7, 5, 3, -3, -7], [7, 5, 3, -3, -7, -9], [7, 5, 3, -3, -5], [7, 5, 3, -3, -5, -9], [7, 5, 3, -3, -5, -7], [7, 5, 3, -3, -5, -7, -9], [7, 5, 3, -1], [7, 5, 3, -1, -9], [7, 5, 3, -1, -7], [7, 5, 3, -1, -7, -9], [7, 5, 3, -1, -5], [7, 5, 3, -1, -5, -9], [7, 5, 3, -1, -5, -7], [7, 5, 3, -1, -5, -7, -9], [7, 5, 3, -1, -3], [7, 5, 3, -1, -3, -9], [7, 5, 3, -1, -3, -7], [7, 5, 3, -1, -3, -7, -9], [7, 5, 3, -1, -3, -5], [7, 5, 3, -1, -3, -5, -9], [7, 5, 3, -1, -3, -5, -7], [7, 5, 3, -1, -3, -5, -7, -9], [7, 5, 3, 1], [7, 5, 3, 1, -9], [7, 5, 3, 1, -7], [7, 5, 3, 1, -7, -9], [7, 5, 3, 1, -5], [7, 5, 3, 1, -5, -9], [7, 5, 3, 1, -5, -7], [7, 5, 3, 1, -5, -7, -9], [7, 5, 3, 1, -3], [7, 5, 3, 1, -3, -9], [7, 5, 3, 1, -3, -7], [7, 5, 3, 1, -3, -7, -9], [7, 5, 3, 1, -3, -5], [7, 5, 3, 1, -3, -5, -9], [7, 5, 3, 1, -3, -5, -7], [7, 5, 3, 1, -3, -5, -7, -9], [7, 5, 3, 1, -1], [7, 5, 3, 1, -1, -9], [7, 5, 3, 1, -1, -7], [7, 5, 3, 1, -1, -7, -9], [7, 5, 3, 1, -1, -5], [7, 5, 3, 1, -1, -5, -9], [7, 5, 3, 1, -1, -5, -7], [7, 5, 3, 1, -1, -5, -7, -9], [7, 5, 3, 1, -1, -3], [7, 5, 3, 1, -1, -3, -9], [7, 5, 3, 1, -1, -3, -7], [7, 5, 3, 1, -1, -3, -7, -9], [7, 5, 3, 1, -1, -3, -5], [7, 5, 3, 1, -1, -3, -5, -9], [7, 5, 3, 1, -1, -3, -5, -7], [7, 5, 3, 1, -1, -3, -5, -7, -9], [9], [9, -9], [9, -7], [9, -7, -9], [9, -5], [9, -5, -9], [9, -5, -7], [9, -5, -7, -9], [9, -3], [9, -3, -9], [9, -3, -7], [9, -3, -7, -9], [9, -3, -5], [9, -3, -5, -9], [9, -3, -5, -7], [9, -3, -5, -7, -9], [9, -1], [9, -1, -9], [9, -1, -7], [9, -1, -7, -9], [9, -1, -5], [9, -1, -5, -9], [9, -1, -5, -7], [9, -1, -5, -7, -9], [9, -1, -3], [9, -1, -3, -9], [9, -1, -3, -7], [9, -1, -3, -7, -9], [9, -1, -3, -5], [9, -1, -3, -5, -9], [9, -1, -3, -5, -7], [9, -1, -3, -5, -7, -9], [9, 1], [9, 1, -9], [9, 1, -7], [9, 1, -7, -9], [9, 1, -5], [9, 1, -5, -9], [9, 1, -5, -7], [9, 1, -5, -7, -9], [9, 1, -3], [9, 1, -3, -9], [9, 1, -3, -7], [9, 1, -3, -7, -9], [9, 1, -3, -5], [9, 1, -3, -5, -9], [9, 1, -3, -5, -7], [9, 1, -3, -5, -7, -9], [9, 1, -1], [9, 1, -1, -9], [9, 1, -1, -7], [9, 1, -1, -7, -9], [9, 1, -1, -5], [9, 1, -1, -5, -9], [9, 1, -1, -5, -7], [9, 1, -1, -5, -7, -9], [9, 1, -1, -3], [9, 1, -1, -3, -9], [9, 1, -1, -3, -7], [9, 1, -1, -3, -7, -9], [9, 1, -1, -3, -5], [9, 1, -1, -3, -5, -9], [9, 1, -1, -3, -5, -7], [9, 1, -1, -3, -5, -7, -9], [9, 3], [9, 3, -9], [9, 3, -7], [9, 3, -7, -9], [9, 3, -5], [9, 3, -5, -9], [9, 3, -5, -7], [9, 3, -5, -7, -9], [9, 3, -3], [9, 3, -3, -9], [9, 3, -3, -7], [9, 3, -3, -7, -9], [9, 3, -3, -5], [9, 3, -3, -5, -9], [9, 3, -3, -5, -7], [9, 3, -3, -5, -7, -9], [9, 3, -1], [9, 3, -1, -9], [9, 3, -1, -7], [9, 3, -1, -7, -9], [9, 3, -1, -5], [9, 3, -1, -5, -9], [9, 3, -1, -5, -7], [9, 3, -1, -5, -7, -9], [9, 3, -1, -3], [9, 3, -1, -3, -9], [9, 3, -1, -3, -7], [9, 3, -1, -3, -7, -9], [9, 3, -1, -3, -5], [9, 3, -1, -3, -5, -9], [9, 3, -1, -3, -5, -7], [9, 3, -1, -3, -5, -7, -9], [9, 3, 1], [9, 3, 1, -9], [9, 3, 1, -7], [9, 3, 1, -7, -9], [9, 3, 1, -5], [9, 3, 1, -5, -9], [9, 3, 1, -5, -7], [9, 3, 1, -5, -7, -9], [9, 3, 1, -3], [9, 3, 1, -3, -9], [9, 3, 1, -3, -7], [9, 3, 1, -3, -7, -9], [9, 3, 1, -3, -5], [9, 3, 1, -3, -5, -9], [9, 3, 1, -3, -5, -7], [9, 3, 1, -3, -5, -7, -9], [9, 3, 1, -1], [9, 3, 1, -1, -9], [9, 3, 1, -1, -7], [9, 3, 1, -1, -7, -9], [9, 3, 1, -1, -5], [9, 3, 1, -1, -5, -9], [9, 3, 1, -1, -5, -7], [9, 3, 1, -1, -5, -7, -9], [9, 3, 1, -1, -3], [9, 3, 1, -1, -3, -9], [9, 3, 1, -1, -3, -7], [9, 3, 1, -1, -3, -7, -9], [9, 3, 1, -1, -3, -5], [9, 3, 1, -1, -3, -5, -9], [9, 3, 1, -1, -3, -5, -7], [9, 3, 1, -1, -3, -5, -7, -9], [9, 5], [9, 5, -9], [9, 5, -7], [9, 5, -7, -9], [9, 5, -5], [9, 5, -5, -9], [9, 5, -5, -7], [9, 5, -5, -7, -9], [9, 5, -3], [9, 5, -3, -9], [9, 5, -3, -7], [9, 5, -3, -7, -9], [9, 5, -3, -5], [9, 5, -3, -5, -9], [9, 5, -3, -5, -7], [9, 5, -3, -5, -7, -9], [9, 5, -1], [9, 5, -1, -9], [9, 5, -1, -7], [9, 5, -1, -7, -9], [9, 5, -1, -5], [9, 5, -1, -5, -9], [9, 5, -1, -5, -7], [9, 5, -1, -5, -7, -9], [9, 5, -1, -3], [9, 5, -1, -3, -9], [9, 5, -1, -3, -7], [9, 5, -1, -3, -7, -9], [9, 5, -1, -3, -5], [9, 5, -1, -3, -5, -9], [9, 5, -1, -3, -5, -7], [9, 5, -1, -3, -5, -7, -9], [9, 5, 1], [9, 5, 1, -9], [9, 5, 1, -7], [9, 5, 1, -7, -9], [9, 5, 1, -5], [9, 5, 1, -5, -9], [9, 5, 1, -5, -7], [9, 5, 1, -5, -7, -9], [9, 5, 1, -3], [9, 5, 1, -3, -9], [9, 5, 1, -3, -7], [9, 5, 1, -3, -7, -9], [9, 5, 1, -3, -5], [9, 5, 1, -3, -5, -9], [9, 5, 1, -3, -5, -7], [9, 5, 1, -3, -5, -7, -9], [9, 5, 1, -1], [9, 5, 1, -1, -9], [9, 5, 1, -1, -7], [9, 5, 1, -1, -7, -9], [9, 5, 1, -1, -5], [9, 5, 1, -1, -5, -9], [9, 5, 1, -1, -5, -7], [9, 5, 1, -1, -5, -7, -9], [9, 5, 1, -1, -3], [9, 5, 1, -1, -3, -9], [9, 5, 1, -1, -3, -7], [9, 5, 1, -1, -3, -7, -9], [9, 5, 1, -1, -3, -5], [9, 5, 1, -1, -3, -5, -9], [9, 5, 1, -1, -3, -5, -7], [9, 5, 1, -1, -3, -5, -7, -9], [9, 5, 3], [9, 5, 3, -9], [9, 5, 3, -7], [9, 5, 3, -7, -9], [9, 5, 3, -5], [9, 5, 3, -5, -9], [9, 5, 3, -5, -7], [9, 5, 3, -5, -7, -9], [9, 5, 3, -3], [9, 5, 3, -3, -9], [9, 5, 3, -3, -7], [9, 5, 3, -3, -7, -9], [9, 5, 3, -3, -5], [9, 5, 3, -3, -5, -9], [9, 5, 3, -3, -5, -7], [9, 5, 3, -3, -5, -7, -9], [9, 5, 3, -1], [9, 5, 3, -1, -9], [9, 5, 3, -1, -7], [9, 5, 3, -1, -7, -9], [9, 5, 3, -1, -5], [9, 5, 3, -1, -5, -9], [9, 5, 3, -1, -5, -7], [9, 5, 3, -1, -5, -7, -9], [9, 5, 3, -1, -3], [9, 5, 3, -1, -3, -9], [9, 5, 3, -1, -3, -7], [9, 5, 3, -1, -3, -7, -9], [9, 5, 3, -1, -3, -5], [9, 5, 3, -1, -3, -5, -9], [9, 5, 3, -1, -3, -5, -7], [9, 5, 3, -1, -3, -5, -7, -9], [9, 5, 3, 1], [9, 5, 3, 1, -9], [9, 5, 3, 1, -7], [9, 5, 3, 1, -7, -9], [9, 5, 3, 1, -5], [9, 5, 3, 1, -5, -9], [9, 5, 3, 1, -5, -7], [9, 5, 3, 1, -5, -7, -9], [9, 5, 3, 1, -3], [9, 5, 3, 1, -3, -9], [9, 5, 3, 1, -3, -7], [9, 5, 3, 1, -3, -7, -9], [9, 5, 3, 1, -3, -5], [9, 5, 3, 1, -3, -5, -9], [9, 5, 3, 1, -3, -5, -7], [9, 5, 3, 1, -3, -5, -7, -9], [9, 5, 3, 1, -1], [9, 5, 3, 1, -1, -9], [9, 5, 3, 1, -1, -7], [9, 5, 3, 1, -1, -7, -9], [9, 5, 3, 1, -1, -5], [9, 5, 3, 1, -1, -5, -9], [9, 5, 3, 1, -1, -5, -7], [9, 5, 3, 1, -1, -5, -7, -9], [9, 5, 3, 1, -1, -3], [9, 5, 3, 1, -1, -3, -9], [9, 5, 3, 1, -1, -3, -7], [9, 5, 3, 1, -1, -3, -7, -9], [9, 5, 3, 1, -1, -3, -5], [9, 5, 3, 1, -1, -3, -5, -9], [9, 5, 3, 1, -1, -3, -5, -7], [9, 5, 3, 1, -1, -3, -5, -7, -9], [9, 7], [9, 7, -9], [9, 7, -7], [9, 7, -7, -9], [9, 7, -5], [9, 7, -5, -9], [9, 7, -5, -7], [9, 7, -5, -7, -9], [9, 7, -3], [9, 7, -3, -9], [9, 7, -3, -7], [9, 7, -3, -7, -9], [9, 7, -3, -5], [9, 7, -3, -5, -9], [9, 7, -3, -5, -7], [9, 7, -3, -5, -7, -9], [9, 7, -1], [9, 7, -1, -9], [9, 7, -1, -7], [9, 7, -1, -7, -9], [9, 7, -1, -5], [9, 7, -1, -5, -9], [9, 7, -1, -5, -7], [9, 7, -1, -5, -7, -9], [9, 7, -1, -3], [9, 7, -1, -3, -9], [9, 7, -1, -3, -7], [9, 7, -1, -3, -7, -9], [9, 7, -1, -3, -5], [9, 7, -1, -3, -5, -9], [9, 7, -1, -3, -5, -7], [9, 7, -1, -3, -5, -7, -9], [9, 7, 1], [9, 7, 1, -9], [9, 7, 1, -7], [9, 7, 1, -7, -9], [9, 7, 1, -5], [9, 7, 1, -5, -9], [9, 7, 1, -5, -7], [9, 7, 1, -5, -7, -9], [9, 7, 1, -3], [9, 7, 1, -3, -9], [9, 7, 1, -3, -7], [9, 7, 1, -3, -7, -9], [9, 7, 1, -3, -5], [9, 7, 1, -3, -5, -9], [9, 7, 1, -3, -5, -7], [9, 7, 1, -3, -5, -7, -9], [9, 7, 1, -1], [9, 7, 1, -1, -9], [9, 7, 1, -1, -7], [9, 7, 1, -1, -7, -9], [9, 7, 1, -1, -5], [9, 7, 1, -1, -5, -9], [9, 7, 1, -1, -5, -7], [9, 7, 1, -1, -5, -7, -9], [9, 7, 1, -1, -3], [9, 7, 1, -1, -3, -9], [9, 7, 1, -1, -3, -7], [9, 7, 1, -1, -3, -7, -9], [9, 7, 1, -1, -3, -5], [9, 7, 1, -1, -3, -5, -9], [9, 7, 1, -1, -3, -5, -7], [9, 7, 1, -1, -3, -5, -7, -9], [9, 7, 3], [9, 7, 3, -9], [9, 7, 3, -7], [9, 7, 3, -7, -9], [9, 7, 3, -5], [9, 7, 3, -5, -9], [9, 7, 3, -5, -7], [9, 7, 3, -5, -7, -9], [9, 7, 3, -3], [9, 7, 3, -3, -9], [9, 7, 3, -3, -7], [9, 7, 3, -3, -7, -9], [9, 7, 3, -3, -5], [9, 7, 3, -3, -5, -9], [9, 7, 3, -3, -5, -7], [9, 7, 3, -3, -5, -7, -9], [9, 7, 3, -1], [9, 7, 3, -1, -9], [9, 7, 3, -1, -7], [9, 7, 3, -1, -7, -9], [9, 7, 3, -1, -5], [9, 7, 3, -1, -5, -9], [9, 7, 3, -1, -5, -7], [9, 7, 3, -1, -5, -7, -9], [9, 7, 3, -1, -3], [9, 7, 3, -1, -3, -9], [9, 7, 3, -1, -3, -7], [9, 7, 3, -1, -3, -7, -9], [9, 7, 3, -1, -3, -5], [9, 7, 3, -1, -3, -5, -9], [9, 7, 3, -1, -3, -5, -7], [9, 7, 3, -1, -3, -5, -7, -9], [9, 7, 3, 1], [9, 7, 3, 1, -9], [9, 7, 3, 1, -7], [9, 7, 3, 1, -7, -9], [9, 7, 3, 1, -5], [9, 7, 3, 1, -5, -9], [9, 7, 3, 1, -5, -7], [9, 7, 3, 1, -5, -7, -9], [9, 7, 3, 1, -3], [9, 7, 3, 1, -3, -9], [9, 7, 3, 1, -3, -7], [9, 7, 3, 1, -3, -7, -9], [9, 7, 3, 1, -3, -5], [9, 7, 3, 1, -3, -5, -9], [9, 7, 3, 1, -3, -5, -7], [9, 7, 3, 1, -3, -5, -7, -9], [9, 7, 3, 1, -1], [9, 7, 3, 1, -1, -9], [9, 7, 3, 1, -1, -7], [9, 7, 3, 1, -1, -7, -9], [9, 7, 3, 1, -1, -5], [9, 7, 3, 1, -1, -5, -9], [9, 7, 3, 1, -1, -5, -7], [9, 7, 3, 1, -1, -5, -7, -9], [9, 7, 3, 1, -1, -3], [9, 7, 3, 1, -1, -3, -9], [9, 7, 3, 1, -1, -3, -7], [9, 7, 3, 1, -1, -3, -7, -9], [9, 7, 3, 1, -1, -3, -5], [9, 7, 3, 1, -1, -3, -5, -9], [9, 7, 3, 1, -1, -3, -5, -7], [9, 7, 3, 1, -1, -3, -5, -7, -9], [9, 7, 5], [9, 7, 5, -9], [9, 7, 5, -7], [9, 7, 5, -7, -9], [9, 7, 5, -5], [9, 7, 5, -5, -9], [9, 7, 5, -5, -7], [9, 7, 5, -5, -7, -9], [9, 7, 5, -3], [9, 7, 5, -3, -9], [9, 7, 5, -3, -7], [9, 7, 5, -3, -7, -9], [9, 7, 5, -3, -5], [9, 7, 5, -3, -5, -9], [9, 7, 5, -3, -5, -7], [9, 7, 5, -3, -5, -7, -9], [9, 7, 5, -1], [9, 7, 5, -1, -9], [9, 7, 5, -1, -7], [9, 7, 5, -1, -7, -9], [9, 7, 5, -1, -5], [9, 7, 5, -1, -5, -9], [9, 7, 5, -1, -5, -7], [9, 7, 5, -1, -5, -7, -9], [9, 7, 5, -1, -3], [9, 7, 5, -1, -3, -9], [9, 7, 5, -1, -3, -7], [9, 7, 5, -1, -3, -7, -9], [9, 7, 5, -1, -3, -5], [9, 7, 5, -1, -3, -5, -9], [9, 7, 5, -1, -3, -5, -7], [9, 7, 5, -1, -3, -5, -7, -9], [9, 7, 5, 1], [9, 7, 5, 1, -9], [9, 7, 5, 1, -7], [9, 7, 5, 1, -7, -9], [9, 7, 5, 1, -5], [9, 7, 5, 1, -5, -9], [9, 7, 5, 1, -5, -7], [9, 7, 5, 1, -5, -7, -9], [9, 7, 5, 1, -3], [9, 7, 5, 1, -3, -9], [9, 7, 5, 1, -3, -7], [9, 7, 5, 1, -3, -7, -9], [9, 7, 5, 1, -3, -5], [9, 7, 5, 1, -3, -5, -9], [9, 7, 5, 1, -3, -5, -7], [9, 7, 5, 1, -3, -5, -7, -9], [9, 7, 5, 1, -1], [9, 7, 5, 1, -1, -9], [9, 7, 5, 1, -1, -7], [9, 7, 5, 1, -1, -7, -9], [9, 7, 5, 1, -1, -5], [9, 7, 5, 1, -1, -5, -9], [9, 7, 5, 1, -1, -5, -7], [9, 7, 5, 1, -1, -5, -7, -9], [9, 7, 5, 1, -1, -3], [9, 7, 5, 1, -1, -3, -9], [9, 7, 5, 1, -1, -3, -7], [9, 7, 5, 1, -1, -3, -7, -9], [9, 7, 5, 1, -1, -3, -5], [9, 7, 5, 1, -1, -3, -5, -9], [9, 7, 5, 1, -1, -3, -5, -7], [9, 7, 5, 1, -1, -3, -5, -7, -9], [9, 7, 5, 3], [9, 7, 5, 3, -9], [9, 7, 5, 3, -7], [9, 7, 5, 3, -7, -9], [9, 7, 5, 3, -5], [9, 7, 5, 3, -5, -9], [9, 7, 5, 3, -5, -7], [9, 7, 5, 3, -5, -7, -9], [9, 7, 5, 3, -3], [9, 7, 5, 3, -3, -9], [9, 7, 5, 3, -3, -7], [9, 7, 5, 3, -3, -7, -9], [9, 7, 5, 3, -3, -5], [9, 7, 5, 3, -3, -5, -9], [9, 7, 5, 3, -3, -5, -7], [9, 7, 5, 3, -3, -5, -7, -9], [9, 7, 5, 3, -1], [9, 7, 5, 3, -1, -9], [9, 7, 5, 3, -1, -7], [9, 7, 5, 3, -1, -7, -9], [9, 7, 5, 3, -1, -5], [9, 7, 5, 3, -1, -5, -9], [9, 7, 5, 3, -1, -5, -7], [9, 7, 5, 3, -1, -5, -7, -9], [9, 7, 5, 3, -1, -3], [9, 7, 5, 3, -1, -3, -9], [9, 7, 5, 3, -1, -3, -7], [9, 7, 5, 3, -1, -3, -7, -9], [9, 7, 5, 3, -1, -3, -5], [9, 7, 5, 3, -1, -3, -5, -9], [9, 7, 5, 3, -1, -3, -5, -7], [9, 7, 5, 3, -1, -3, -5, -7, -9], [9, 7, 5, 3, 1], [9, 7, 5, 3, 1, -9], [9, 7, 5, 3, 1, -7], [9, 7, 5, 3, 1, -7, -9], [9, 7, 5, 3, 1, -5], [9, 7, 5, 3, 1, -5, -9], [9, 7, 5, 3, 1, -5, -7], [9, 7, 5, 3, 1, -5, -7, -9], [9, 7, 5, 3, 1, -3], [9, 7, 5, 3, 1, -3, -9], [9, 7, 5, 3, 1, -3, -7], [9, 7, 5, 3, 1, -3, -7, -9], [9, 7, 5, 3, 1, -3, -5], [9, 7, 5, 3, 1, -3, -5, -9], [9, 7, 5, 3, 1, -3, -5, -7], [9, 7, 5, 3, 1, -3, -5, -7, -9], [9, 7, 5, 3, 1, -1], [9, 7, 5, 3, 1, -1, -9], [9, 7, 5, 3, 1, -1, -7], [9, 7, 5, 3, 1, -1, -7, -9], [9, 7, 5, 3, 1, -1, -5], [9, 7, 5, 3, 1, -1, -5, -9], [9, 7, 5, 3, 1, -1, -5, -7], [9, 7, 5, 3, 1, -1, -5, -7, -9], [9, 7, 5, 3, 1, -1, -3], [9, 7, 5, 3, 1, -1, -3, -9], [9, 7, 5, 3, 1, -1, -3, -7], [9, 7, 5, 3, 1, -1, -3, -7, -9], [9, 7, 5, 3, 1, -1, -3, -5], [9, 7, 5, 3, 1, -1, -3, -5, -9], [9, 7, 5, 3, 1, -1, -3, -5, -7], [9, 7, 5, 3, 1, -1, -3, -5, -7, -9]])\n assert answers_match(candidate(nums=[-3, -2, -1, 0, 1, 2, 3]), [[], [3], [2], [2, 3], [1], [1, 3], [1, 2], [1, 2, 3], [0], [0, 3], [0, 2], [0, 2, 3], [0, 1], [0, 1, 3], [0, 1, 2], [0, 1, 2, 3], [-1], [-1, 3], [-1, 2], [-1, 2, 3], [-1, 1], [-1, 1, 3], [-1, 1, 2], [-1, 1, 2, 3], [-1, 0], [-1, 0, 3], [-1, 0, 2], [-1, 0, 2, 3], [-1, 0, 1], [-1, 0, 1, 3], [-1, 0, 1, 2], [-1, 0, 1, 2, 3], [-2], [-2, 3], [-2, 2], [-2, 2, 3], [-2, 1], [-2, 1, 3], [-2, 1, 2], [-2, 1, 2, 3], [-2, 0], [-2, 0, 3], [-2, 0, 2], [-2, 0, 2, 3], [-2, 0, 1], [-2, 0, 1, 3], [-2, 0, 1, 2], [-2, 0, 1, 2, 3], [-2, -1], [-2, -1, 3], [-2, -1, 2], [-2, -1, 2, 3], [-2, -1, 1], [-2, -1, 1, 3], [-2, -1, 1, 2], [-2, -1, 1, 2, 3], [-2, -1, 0], [-2, -1, 0, 3], [-2, -1, 0, 2], [-2, -1, 0, 2, 3], [-2, -1, 0, 1], [-2, -1, 0, 1, 3], [-2, -1, 0, 1, 2], [-2, -1, 0, 1, 2, 3], [-3], [-3, 3], [-3, 2], [-3, 2, 3], [-3, 1], [-3, 1, 3], [-3, 1, 2], [-3, 1, 2, 3], [-3, 0], [-3, 0, 3], [-3, 0, 2], [-3, 0, 2, 3], [-3, 0, 1], [-3, 0, 1, 3], [-3, 0, 1, 2], [-3, 0, 1, 2, 3], [-3, -1], [-3, -1, 3], [-3, -1, 2], [-3, -1, 2, 3], [-3, -1, 1], [-3, -1, 1, 3], [-3, -1, 1, 2], [-3, -1, 1, 2, 3], [-3, -1, 0], [-3, -1, 0, 3], [-3, -1, 0, 2], [-3, -1, 0, 2, 3], [-3, -1, 0, 1], [-3, -1, 0, 1, 3], [-3, -1, 0, 1, 2], [-3, -1, 0, 1, 2, 3], [-3, -2], [-3, -2, 3], [-3, -2, 2], [-3, -2, 2, 3], [-3, -2, 1], [-3, -2, 1, 3], [-3, -2, 1, 2], [-3, -2, 1, 2, 3], [-3, -2, 0], [-3, -2, 0, 3], [-3, -2, 0, 2], [-3, -2, 0, 2, 3], [-3, -2, 0, 1], [-3, -2, 0, 1, 3], [-3, -2, 0, 1, 2], [-3, -2, 0, 1, 2, 3], [-3, -2, -1], [-3, -2, -1, 3], [-3, -2, -1, 2], [-3, -2, -1, 2, 3], [-3, -2, -1, 1], [-3, -2, -1, 1, 3], [-3, -2, -1, 1, 2], [-3, -2, -1, 1, 2, 3], [-3, -2, -1, 0], [-3, -2, -1, 0, 3], [-3, -2, -1, 0, 2], [-3, -2, -1, 0, 2, 3], [-3, -2, -1, 0, 1], [-3, -2, -1, 0, 1, 3], [-3, -2, -1, 0, 1, 2], [-3, -2, -1, 0, 1, 2, 3]])\n assert answers_match(candidate(nums=[10, -5, 0, 7]), [[], [7], [0], [0, 7], [-5], [-5, 7], [-5, 0], [-5, 0, 7], [10], [10, 7], [10, 0], [10, 0, 7], [10, -5], [10, -5, 7], [10, -5, 0], [10, -5, 0, 7]])\n assert answers_match(candidate(nums=[-1, 0, 1, -2, 2, -3, 3]), [[], [3], [-3], [-3, 3], [2], [2, 3], [2, -3], [2, -3, 3], [-2], [-2, 3], [-2, -3], [-2, -3, 3], [-2, 2], [-2, 2, 3], [-2, 2, -3], [-2, 2, -3, 3], [1], [1, 3], [1, -3], [1, -3, 3], [1, 2], [1, 2, 3], [1, 2, -3], [1, 2, -3, 3], [1, -2], [1, -2, 3], [1, -2, -3], [1, -2, -3, 3], [1, -2, 2], [1, -2, 2, 3], [1, -2, 2, -3], [1, -2, 2, -3, 3], [0], [0, 3], [0, -3], [0, -3, 3], [0, 2], [0, 2, 3], [0, 2, -3], [0, 2, -3, 3], [0, -2], [0, -2, 3], [0, -2, -3], [0, -2, -3, 3], [0, -2, 2], [0, -2, 2, 3], [0, -2, 2, -3], [0, -2, 2, -3, 3], [0, 1], [0, 1, 3], [0, 1, -3], [0, 1, -3, 3], [0, 1, 2], [0, 1, 2, 3], [0, 1, 2, -3], [0, 1, 2, -3, 3], [0, 1, -2], [0, 1, -2, 3], [0, 1, -2, -3], [0, 1, -2, -3, 3], [0, 1, -2, 2], [0, 1, -2, 2, 3], [0, 1, -2, 2, -3], [0, 1, -2, 2, -3, 3], [-1], [-1, 3], [-1, -3], [-1, -3, 3], [-1, 2], [-1, 2, 3], [-1, 2, -3], [-1, 2, -3, 3], [-1, -2], [-1, -2, 3], [-1, -2, -3], [-1, -2, -3, 3], [-1, -2, 2], [-1, -2, 2, 3], [-1, -2, 2, -3], [-1, -2, 2, -3, 3], [-1, 1], [-1, 1, 3], [-1, 1, -3], [-1, 1, -3, 3], [-1, 1, 2], [-1, 1, 2, 3], [-1, 1, 2, -3], [-1, 1, 2, -3, 3], [-1, 1, -2], [-1, 1, -2, 3], [-1, 1, -2, -3], [-1, 1, -2, -3, 3], [-1, 1, -2, 2], [-1, 1, -2, 2, 3], [-1, 1, -2, 2, -3], [-1, 1, -2, 2, -3, 3], [-1, 0], [-1, 0, 3], [-1, 0, -3], [-1, 0, -3, 3], [-1, 0, 2], [-1, 0, 2, 3], [-1, 0, 2, -3], [-1, 0, 2, -3, 3], [-1, 0, -2], [-1, 0, -2, 3], [-1, 0, -2, -3], [-1, 0, -2, -3, 3], [-1, 0, -2, 2], [-1, 0, -2, 2, 3], [-1, 0, -2, 2, -3], [-1, 0, -2, 2, -3, 3], [-1, 0, 1], [-1, 0, 1, 3], [-1, 0, 1, -3], [-1, 0, 1, -3, 3], [-1, 0, 1, 2], [-1, 0, 1, 2, 3], [-1, 0, 1, 2, -3], [-1, 0, 1, 2, -3, 3], [-1, 0, 1, -2], [-1, 0, 1, -2, 3], [-1, 0, 1, -2, -3], [-1, 0, 1, -2, -3, 3], [-1, 0, 1, -2, 2], [-1, 0, 1, -2, 2, 3], [-1, 0, 1, -2, 2, -3], [-1, 0, 1, -2, 2, -3, 3]])\n assert answers_match(candidate(nums=[8, 6, 4, 2, 0, -2, -4, -6, -8]), [[], [-8], [-6], [-6, -8], [-4], [-4, -8], [-4, -6], [-4, -6, -8], [-2], [-2, -8], [-2, -6], [-2, -6, -8], [-2, -4], [-2, -4, -8], [-2, -4, -6], [-2, -4, -6, -8], [0], [0, -8], [0, -6], [0, -6, -8], [0, -4], [0, -4, -8], [0, -4, -6], [0, -4, -6, -8], [0, -2], [0, -2, -8], [0, -2, -6], [0, -2, -6, -8], [0, -2, -4], [0, -2, -4, -8], [0, -2, -4, -6], [0, -2, -4, -6, -8], [2], [2, -8], [2, -6], [2, -6, -8], [2, -4], [2, -4, -8], [2, -4, -6], [2, -4, -6, -8], [2, -2], [2, -2, -8], [2, -2, -6], [2, -2, -6, -8], [2, -2, -4], [2, -2, -4, -8], [2, -2, -4, -6], [2, -2, -4, -6, -8], [2, 0], [2, 0, -8], [2, 0, -6], [2, 0, -6, -8], [2, 0, -4], [2, 0, -4, -8], [2, 0, -4, -6], [2, 0, -4, -6, -8], [2, 0, -2], [2, 0, -2, -8], [2, 0, -2, -6], [2, 0, -2, -6, -8], [2, 0, -2, -4], [2, 0, -2, -4, -8], [2, 0, -2, -4, -6], [2, 0, -2, -4, -6, -8], [4], [4, -8], [4, -6], [4, -6, -8], [4, -4], [4, -4, -8], [4, -4, -6], [4, -4, -6, -8], [4, -2], [4, -2, -8], [4, -2, -6], [4, -2, -6, -8], [4, -2, -4], [4, -2, -4, -8], [4, -2, -4, -6], [4, -2, -4, -6, -8], [4, 0], [4, 0, -8], [4, 0, -6], [4, 0, -6, -8], [4, 0, -4], [4, 0, -4, -8], [4, 0, -4, -6], [4, 0, -4, -6, -8], [4, 0, -2], [4, 0, -2, -8], [4, 0, -2, -6], [4, 0, -2, -6, -8], [4, 0, -2, -4], [4, 0, -2, -4, -8], [4, 0, -2, -4, -6], [4, 0, -2, -4, -6, -8], [4, 2], [4, 2, -8], [4, 2, -6], [4, 2, -6, -8], [4, 2, -4], [4, 2, -4, -8], [4, 2, -4, -6], [4, 2, -4, -6, -8], [4, 2, -2], [4, 2, -2, -8], [4, 2, -2, -6], [4, 2, -2, -6, -8], [4, 2, -2, -4], [4, 2, -2, -4, -8], [4, 2, -2, -4, -6], [4, 2, -2, -4, -6, -8], [4, 2, 0], [4, 2, 0, -8], [4, 2, 0, -6], [4, 2, 0, -6, -8], [4, 2, 0, -4], [4, 2, 0, -4, -8], [4, 2, 0, -4, -6], [4, 2, 0, -4, -6, -8], [4, 2, 0, -2], [4, 2, 0, -2, -8], [4, 2, 0, -2, -6], [4, 2, 0, -2, -6, -8], [4, 2, 0, -2, -4], [4, 2, 0, -2, -4, -8], [4, 2, 0, -2, -4, -6], [4, 2, 0, -2, -4, -6, -8], [6], [6, -8], [6, -6], [6, -6, -8], [6, -4], [6, -4, -8], [6, -4, -6], [6, -4, -6, -8], [6, -2], [6, -2, -8], [6, -2, -6], [6, -2, -6, -8], [6, -2, -4], [6, -2, -4, -8], [6, -2, -4, -6], [6, -2, -4, -6, -8], [6, 0], [6, 0, -8], [6, 0, -6], [6, 0, -6, -8], [6, 0, -4], [6, 0, -4, -8], [6, 0, -4, -6], [6, 0, -4, -6, -8], [6, 0, -2], [6, 0, -2, -8], [6, 0, -2, -6], [6, 0, -2, -6, -8], [6, 0, -2, -4], [6, 0, -2, -4, -8], [6, 0, -2, -4, -6], [6, 0, -2, -4, -6, -8], [6, 2], [6, 2, -8], [6, 2, -6], [6, 2, -6, -8], [6, 2, -4], [6, 2, -4, -8], [6, 2, -4, -6], [6, 2, -4, -6, -8], [6, 2, -2], [6, 2, -2, -8], [6, 2, -2, -6], [6, 2, -2, -6, -8], [6, 2, -2, -4], [6, 2, -2, -4, -8], [6, 2, -2, -4, -6], [6, 2, -2, -4, -6, -8], [6, 2, 0], [6, 2, 0, -8], [6, 2, 0, -6], [6, 2, 0, -6, -8], [6, 2, 0, -4], [6, 2, 0, -4, -8], [6, 2, 0, -4, -6], [6, 2, 0, -4, -6, -8], [6, 2, 0, -2], [6, 2, 0, -2, -8], [6, 2, 0, -2, -6], [6, 2, 0, -2, -6, -8], [6, 2, 0, -2, -4], [6, 2, 0, -2, -4, -8], [6, 2, 0, -2, -4, -6], [6, 2, 0, -2, -4, -6, -8], [6, 4], [6, 4, -8], [6, 4, -6], [6, 4, -6, -8], [6, 4, -4], [6, 4, -4, -8], [6, 4, -4, -6], [6, 4, -4, -6, -8], [6, 4, -2], [6, 4, -2, -8], [6, 4, -2, -6], [6, 4, -2, -6, -8], [6, 4, -2, -4], [6, 4, -2, -4, -8], [6, 4, -2, -4, -6], [6, 4, -2, -4, -6, -8], [6, 4, 0], [6, 4, 0, -8], [6, 4, 0, -6], [6, 4, 0, -6, -8], [6, 4, 0, -4], [6, 4, 0, -4, -8], [6, 4, 0, -4, -6], [6, 4, 0, -4, -6, -8], [6, 4, 0, -2], [6, 4, 0, -2, -8], [6, 4, 0, -2, -6], [6, 4, 0, -2, -6, -8], [6, 4, 0, -2, -4], [6, 4, 0, -2, -4, -8], [6, 4, 0, -2, -4, -6], [6, 4, 0, -2, -4, -6, -8], [6, 4, 2], [6, 4, 2, -8], [6, 4, 2, -6], [6, 4, 2, -6, -8], [6, 4, 2, -4], [6, 4, 2, -4, -8], [6, 4, 2, -4, -6], [6, 4, 2, -4, -6, -8], [6, 4, 2, -2], [6, 4, 2, -2, -8], [6, 4, 2, -2, -6], [6, 4, 2, -2, -6, -8], [6, 4, 2, -2, -4], [6, 4, 2, -2, -4, -8], [6, 4, 2, -2, -4, -6], [6, 4, 2, -2, -4, -6, -8], [6, 4, 2, 0], [6, 4, 2, 0, -8], [6, 4, 2, 0, -6], [6, 4, 2, 0, -6, -8], [6, 4, 2, 0, -4], [6, 4, 2, 0, -4, -8], [6, 4, 2, 0, -4, -6], [6, 4, 2, 0, -4, -6, -8], [6, 4, 2, 0, -2], [6, 4, 2, 0, -2, -8], [6, 4, 2, 0, -2, -6], [6, 4, 2, 0, -2, -6, -8], [6, 4, 2, 0, -2, -4], [6, 4, 2, 0, -2, -4, -8], [6, 4, 2, 0, -2, -4, -6], [6, 4, 2, 0, -2, -4, -6, -8], [8], [8, -8], [8, -6], [8, -6, -8], [8, -4], [8, -4, -8], [8, -4, -6], [8, -4, -6, -8], [8, -2], [8, -2, -8], [8, -2, -6], [8, -2, -6, -8], [8, -2, -4], [8, -2, -4, -8], [8, -2, -4, -6], [8, -2, -4, -6, -8], [8, 0], [8, 0, -8], [8, 0, -6], [8, 0, -6, -8], [8, 0, -4], [8, 0, -4, -8], [8, 0, -4, -6], [8, 0, -4, -6, -8], [8, 0, -2], [8, 0, -2, -8], [8, 0, -2, -6], [8, 0, -2, -6, -8], [8, 0, -2, -4], [8, 0, -2, -4, -8], [8, 0, -2, -4, -6], [8, 0, -2, -4, -6, -8], [8, 2], [8, 2, -8], [8, 2, -6], [8, 2, -6, -8], [8, 2, -4], [8, 2, -4, -8], [8, 2, -4, -6], [8, 2, -4, -6, -8], [8, 2, -2], [8, 2, -2, -8], [8, 2, -2, -6], [8, 2, -2, -6, -8], [8, 2, -2, -4], [8, 2, -2, -4, -8], [8, 2, -2, -4, -6], [8, 2, -2, -4, -6, -8], [8, 2, 0], [8, 2, 0, -8], [8, 2, 0, -6], [8, 2, 0, -6, -8], [8, 2, 0, -4], [8, 2, 0, -4, -8], [8, 2, 0, -4, -6], [8, 2, 0, -4, -6, -8], [8, 2, 0, -2], [8, 2, 0, -2, -8], [8, 2, 0, -2, -6], [8, 2, 0, -2, -6, -8], [8, 2, 0, -2, -4], [8, 2, 0, -2, -4, -8], [8, 2, 0, -2, -4, -6], [8, 2, 0, -2, -4, -6, -8], [8, 4], [8, 4, -8], [8, 4, -6], [8, 4, -6, -8], [8, 4, -4], [8, 4, -4, -8], [8, 4, -4, -6], [8, 4, -4, -6, -8], [8, 4, -2], [8, 4, -2, -8], [8, 4, -2, -6], [8, 4, -2, -6, -8], [8, 4, -2, -4], [8, 4, -2, -4, -8], [8, 4, -2, -4, -6], [8, 4, -2, -4, -6, -8], [8, 4, 0], [8, 4, 0, -8], [8, 4, 0, -6], [8, 4, 0, -6, -8], [8, 4, 0, -4], [8, 4, 0, -4, -8], [8, 4, 0, -4, -6], [8, 4, 0, -4, -6, -8], [8, 4, 0, -2], [8, 4, 0, -2, -8], [8, 4, 0, -2, -6], [8, 4, 0, -2, -6, -8], [8, 4, 0, -2, -4], [8, 4, 0, -2, -4, -8], [8, 4, 0, -2, -4, -6], [8, 4, 0, -2, -4, -6, -8], [8, 4, 2], [8, 4, 2, -8], [8, 4, 2, -6], [8, 4, 2, -6, -8], [8, 4, 2, -4], [8, 4, 2, -4, -8], [8, 4, 2, -4, -6], [8, 4, 2, -4, -6, -8], [8, 4, 2, -2], [8, 4, 2, -2, -8], [8, 4, 2, -2, -6], [8, 4, 2, -2, -6, -8], [8, 4, 2, -2, -4], [8, 4, 2, -2, -4, -8], [8, 4, 2, -2, -4, -6], [8, 4, 2, -2, -4, -6, -8], [8, 4, 2, 0], [8, 4, 2, 0, -8], [8, 4, 2, 0, -6], [8, 4, 2, 0, -6, -8], [8, 4, 2, 0, -4], [8, 4, 2, 0, -4, -8], [8, 4, 2, 0, -4, -6], [8, 4, 2, 0, -4, -6, -8], [8, 4, 2, 0, -2], [8, 4, 2, 0, -2, -8], [8, 4, 2, 0, -2, -6], [8, 4, 2, 0, -2, -6, -8], [8, 4, 2, 0, -2, -4], [8, 4, 2, 0, -2, -4, -8], [8, 4, 2, 0, -2, -4, -6], [8, 4, 2, 0, -2, -4, -6, -8], [8, 6], [8, 6, -8], [8, 6, -6], [8, 6, -6, -8], [8, 6, -4], [8, 6, -4, -8], [8, 6, -4, -6], [8, 6, -4, -6, -8], [8, 6, -2], [8, 6, -2, -8], [8, 6, -2, -6], [8, 6, -2, -6, -8], [8, 6, -2, -4], [8, 6, -2, -4, -8], [8, 6, -2, -4, -6], [8, 6, -2, -4, -6, -8], [8, 6, 0], [8, 6, 0, -8], [8, 6, 0, -6], [8, 6, 0, -6, -8], [8, 6, 0, -4], [8, 6, 0, -4, -8], [8, 6, 0, -4, -6], [8, 6, 0, -4, -6, -8], [8, 6, 0, -2], [8, 6, 0, -2, -8], [8, 6, 0, -2, -6], [8, 6, 0, -2, -6, -8], [8, 6, 0, -2, -4], [8, 6, 0, -2, -4, -8], [8, 6, 0, -2, -4, -6], [8, 6, 0, -2, -4, -6, -8], [8, 6, 2], [8, 6, 2, -8], [8, 6, 2, -6], [8, 6, 2, -6, -8], [8, 6, 2, -4], [8, 6, 2, -4, -8], [8, 6, 2, -4, -6], [8, 6, 2, -4, -6, -8], [8, 6, 2, -2], [8, 6, 2, -2, -8], [8, 6, 2, -2, -6], [8, 6, 2, -2, -6, -8], [8, 6, 2, -2, -4], [8, 6, 2, -2, -4, -8], [8, 6, 2, -2, -4, -6], [8, 6, 2, -2, -4, -6, -8], [8, 6, 2, 0], [8, 6, 2, 0, -8], [8, 6, 2, 0, -6], [8, 6, 2, 0, -6, -8], [8, 6, 2, 0, -4], [8, 6, 2, 0, -4, -8], [8, 6, 2, 0, -4, -6], [8, 6, 2, 0, -4, -6, -8], [8, 6, 2, 0, -2], [8, 6, 2, 0, -2, -8], [8, 6, 2, 0, -2, -6], [8, 6, 2, 0, -2, -6, -8], [8, 6, 2, 0, -2, -4], [8, 6, 2, 0, -2, -4, -8], [8, 6, 2, 0, -2, -4, -6], [8, 6, 2, 0, -2, -4, -6, -8], [8, 6, 4], [8, 6, 4, -8], [8, 6, 4, -6], [8, 6, 4, -6, -8], [8, 6, 4, -4], [8, 6, 4, -4, -8], [8, 6, 4, -4, -6], [8, 6, 4, -4, -6, -8], [8, 6, 4, -2], [8, 6, 4, -2, -8], [8, 6, 4, -2, -6], [8, 6, 4, -2, -6, -8], [8, 6, 4, -2, -4], [8, 6, 4, -2, -4, -8], [8, 6, 4, -2, -4, -6], [8, 6, 4, -2, -4, -6, -8], [8, 6, 4, 0], [8, 6, 4, 0, -8], [8, 6, 4, 0, -6], [8, 6, 4, 0, -6, -8], [8, 6, 4, 0, -4], [8, 6, 4, 0, -4, -8], [8, 6, 4, 0, -4, -6], [8, 6, 4, 0, -4, -6, -8], [8, 6, 4, 0, -2], [8, 6, 4, 0, -2, -8], [8, 6, 4, 0, -2, -6], [8, 6, 4, 0, -2, -6, -8], [8, 6, 4, 0, -2, -4], [8, 6, 4, 0, -2, -4, -8], [8, 6, 4, 0, -2, -4, -6], [8, 6, 4, 0, -2, -4, -6, -8], [8, 6, 4, 2], [8, 6, 4, 2, -8], [8, 6, 4, 2, -6], [8, 6, 4, 2, -6, -8], [8, 6, 4, 2, -4], [8, 6, 4, 2, -4, -8], [8, 6, 4, 2, -4, -6], [8, 6, 4, 2, -4, -6, -8], [8, 6, 4, 2, -2], [8, 6, 4, 2, -2, -8], [8, 6, 4, 2, -2, -6], [8, 6, 4, 2, -2, -6, -8], [8, 6, 4, 2, -2, -4], [8, 6, 4, 2, -2, -4, -8], [8, 6, 4, 2, -2, -4, -6], [8, 6, 4, 2, -2, -4, -6, -8], [8, 6, 4, 2, 0], [8, 6, 4, 2, 0, -8], [8, 6, 4, 2, 0, -6], [8, 6, 4, 2, 0, -6, -8], [8, 6, 4, 2, 0, -4], [8, 6, 4, 2, 0, -4, -8], [8, 6, 4, 2, 0, -4, -6], [8, 6, 4, 2, 0, -4, -6, -8], [8, 6, 4, 2, 0, -2], [8, 6, 4, 2, 0, -2, -8], [8, 6, 4, 2, 0, -2, -6], [8, 6, 4, 2, 0, -2, -6, -8], [8, 6, 4, 2, 0, -2, -4], [8, 6, 4, 2, 0, -2, -4, -8], [8, 6, 4, 2, 0, -2, -4, -6], [8, 6, 4, 2, 0, -2, -4, -6, -8]])\n assert answers_match(candidate(nums=[-10, -8, -6, -4, -2, 0, 2, 4, 6, 8]), [[], [8], [6], [6, 8], [4], [4, 8], [4, 6], [4, 6, 8], [2], [2, 8], [2, 6], [2, 6, 8], [2, 4], [2, 4, 8], [2, 4, 6], [2, 4, 6, 8], [0], [0, 8], [0, 6], [0, 6, 8], [0, 4], [0, 4, 8], [0, 4, 6], [0, 4, 6, 8], [0, 2], [0, 2, 8], [0, 2, 6], [0, 2, 6, 8], [0, 2, 4], [0, 2, 4, 8], [0, 2, 4, 6], [0, 2, 4, 6, 8], [-2], [-2, 8], [-2, 6], [-2, 6, 8], [-2, 4], [-2, 4, 8], [-2, 4, 6], [-2, 4, 6, 8], [-2, 2], [-2, 2, 8], [-2, 2, 6], [-2, 2, 6, 8], [-2, 2, 4], [-2, 2, 4, 8], [-2, 2, 4, 6], [-2, 2, 4, 6, 8], [-2, 0], [-2, 0, 8], [-2, 0, 6], [-2, 0, 6, 8], [-2, 0, 4], [-2, 0, 4, 8], [-2, 0, 4, 6], [-2, 0, 4, 6, 8], [-2, 0, 2], [-2, 0, 2, 8], [-2, 0, 2, 6], [-2, 0, 2, 6, 8], [-2, 0, 2, 4], [-2, 0, 2, 4, 8], [-2, 0, 2, 4, 6], [-2, 0, 2, 4, 6, 8], [-4], [-4, 8], [-4, 6], [-4, 6, 8], [-4, 4], [-4, 4, 8], [-4, 4, 6], [-4, 4, 6, 8], [-4, 2], [-4, 2, 8], [-4, 2, 6], [-4, 2, 6, 8], [-4, 2, 4], [-4, 2, 4, 8], [-4, 2, 4, 6], [-4, 2, 4, 6, 8], [-4, 0], [-4, 0, 8], [-4, 0, 6], [-4, 0, 6, 8], [-4, 0, 4], [-4, 0, 4, 8], [-4, 0, 4, 6], [-4, 0, 4, 6, 8], [-4, 0, 2], [-4, 0, 2, 8], [-4, 0, 2, 6], [-4, 0, 2, 6, 8], [-4, 0, 2, 4], [-4, 0, 2, 4, 8], [-4, 0, 2, 4, 6], [-4, 0, 2, 4, 6, 8], [-4, -2], [-4, -2, 8], [-4, -2, 6], [-4, -2, 6, 8], [-4, -2, 4], [-4, -2, 4, 8], [-4, -2, 4, 6], [-4, -2, 4, 6, 8], [-4, -2, 2], [-4, -2, 2, 8], [-4, -2, 2, 6], [-4, -2, 2, 6, 8], [-4, -2, 2, 4], [-4, -2, 2, 4, 8], [-4, -2, 2, 4, 6], [-4, -2, 2, 4, 6, 8], [-4, -2, 0], [-4, -2, 0, 8], [-4, -2, 0, 6], [-4, -2, 0, 6, 8], [-4, -2, 0, 4], [-4, -2, 0, 4, 8], [-4, -2, 0, 4, 6], [-4, -2, 0, 4, 6, 8], [-4, -2, 0, 2], [-4, -2, 0, 2, 8], [-4, -2, 0, 2, 6], [-4, -2, 0, 2, 6, 8], [-4, -2, 0, 2, 4], [-4, -2, 0, 2, 4, 8], [-4, -2, 0, 2, 4, 6], [-4, -2, 0, 2, 4, 6, 8], [-6], [-6, 8], [-6, 6], [-6, 6, 8], [-6, 4], [-6, 4, 8], [-6, 4, 6], [-6, 4, 6, 8], [-6, 2], [-6, 2, 8], [-6, 2, 6], [-6, 2, 6, 8], [-6, 2, 4], [-6, 2, 4, 8], [-6, 2, 4, 6], [-6, 2, 4, 6, 8], [-6, 0], [-6, 0, 8], [-6, 0, 6], [-6, 0, 6, 8], [-6, 0, 4], [-6, 0, 4, 8], [-6, 0, 4, 6], [-6, 0, 4, 6, 8], [-6, 0, 2], [-6, 0, 2, 8], [-6, 0, 2, 6], [-6, 0, 2, 6, 8], [-6, 0, 2, 4], [-6, 0, 2, 4, 8], [-6, 0, 2, 4, 6], [-6, 0, 2, 4, 6, 8], [-6, -2], [-6, -2, 8], [-6, -2, 6], [-6, -2, 6, 8], [-6, -2, 4], [-6, -2, 4, 8], [-6, -2, 4, 6], [-6, -2, 4, 6, 8], [-6, -2, 2], [-6, -2, 2, 8], [-6, -2, 2, 6], [-6, -2, 2, 6, 8], [-6, -2, 2, 4], [-6, -2, 2, 4, 8], [-6, -2, 2, 4, 6], [-6, -2, 2, 4, 6, 8], [-6, -2, 0], [-6, -2, 0, 8], [-6, -2, 0, 6], [-6, -2, 0, 6, 8], [-6, -2, 0, 4], [-6, -2, 0, 4, 8], [-6, -2, 0, 4, 6], [-6, -2, 0, 4, 6, 8], [-6, -2, 0, 2], [-6, -2, 0, 2, 8], [-6, -2, 0, 2, 6], [-6, -2, 0, 2, 6, 8], [-6, -2, 0, 2, 4], [-6, -2, 0, 2, 4, 8], [-6, -2, 0, 2, 4, 6], [-6, -2, 0, 2, 4, 6, 8], [-6, -4], [-6, -4, 8], [-6, -4, 6], [-6, -4, 6, 8], [-6, -4, 4], [-6, -4, 4, 8], [-6, -4, 4, 6], [-6, -4, 4, 6, 8], [-6, -4, 2], [-6, -4, 2, 8], [-6, -4, 2, 6], [-6, -4, 2, 6, 8], [-6, -4, 2, 4], [-6, -4, 2, 4, 8], [-6, -4, 2, 4, 6], [-6, -4, 2, 4, 6, 8], [-6, -4, 0], [-6, -4, 0, 8], [-6, -4, 0, 6], [-6, -4, 0, 6, 8], [-6, -4, 0, 4], [-6, -4, 0, 4, 8], [-6, -4, 0, 4, 6], [-6, -4, 0, 4, 6, 8], [-6, -4, 0, 2], [-6, -4, 0, 2, 8], [-6, -4, 0, 2, 6], [-6, -4, 0, 2, 6, 8], [-6, -4, 0, 2, 4], [-6, -4, 0, 2, 4, 8], [-6, -4, 0, 2, 4, 6], [-6, -4, 0, 2, 4, 6, 8], [-6, -4, -2], [-6, -4, -2, 8], [-6, -4, -2, 6], [-6, -4, -2, 6, 8], [-6, -4, -2, 4], [-6, -4, -2, 4, 8], [-6, -4, -2, 4, 6], [-6, -4, -2, 4, 6, 8], [-6, -4, -2, 2], [-6, -4, -2, 2, 8], [-6, -4, -2, 2, 6], [-6, -4, -2, 2, 6, 8], [-6, -4, -2, 2, 4], [-6, -4, -2, 2, 4, 8], [-6, -4, -2, 2, 4, 6], [-6, -4, -2, 2, 4, 6, 8], [-6, -4, -2, 0], [-6, -4, -2, 0, 8], [-6, -4, -2, 0, 6], [-6, -4, -2, 0, 6, 8], [-6, -4, -2, 0, 4], [-6, -4, -2, 0, 4, 8], [-6, -4, -2, 0, 4, 6], [-6, -4, -2, 0, 4, 6, 8], [-6, -4, -2, 0, 2], [-6, -4, -2, 0, 2, 8], [-6, -4, -2, 0, 2, 6], [-6, -4, -2, 0, 2, 6, 8], [-6, -4, -2, 0, 2, 4], [-6, -4, -2, 0, 2, 4, 8], [-6, -4, -2, 0, 2, 4, 6], [-6, -4, -2, 0, 2, 4, 6, 8], [-8], [-8, 8], [-8, 6], [-8, 6, 8], [-8, 4], [-8, 4, 8], [-8, 4, 6], [-8, 4, 6, 8], [-8, 2], [-8, 2, 8], [-8, 2, 6], [-8, 2, 6, 8], [-8, 2, 4], [-8, 2, 4, 8], [-8, 2, 4, 6], [-8, 2, 4, 6, 8], [-8, 0], [-8, 0, 8], [-8, 0, 6], [-8, 0, 6, 8], [-8, 0, 4], [-8, 0, 4, 8], [-8, 0, 4, 6], [-8, 0, 4, 6, 8], [-8, 0, 2], [-8, 0, 2, 8], [-8, 0, 2, 6], [-8, 0, 2, 6, 8], [-8, 0, 2, 4], [-8, 0, 2, 4, 8], [-8, 0, 2, 4, 6], [-8, 0, 2, 4, 6, 8], [-8, -2], [-8, -2, 8], [-8, -2, 6], [-8, -2, 6, 8], [-8, -2, 4], [-8, -2, 4, 8], [-8, -2, 4, 6], [-8, -2, 4, 6, 8], [-8, -2, 2], [-8, -2, 2, 8], [-8, -2, 2, 6], [-8, -2, 2, 6, 8], [-8, -2, 2, 4], [-8, -2, 2, 4, 8], [-8, -2, 2, 4, 6], [-8, -2, 2, 4, 6, 8], [-8, -2, 0], [-8, -2, 0, 8], [-8, -2, 0, 6], [-8, -2, 0, 6, 8], [-8, -2, 0, 4], [-8, -2, 0, 4, 8], [-8, -2, 0, 4, 6], [-8, -2, 0, 4, 6, 8], [-8, -2, 0, 2], [-8, -2, 0, 2, 8], [-8, -2, 0, 2, 6], [-8, -2, 0, 2, 6, 8], [-8, -2, 0, 2, 4], [-8, -2, 0, 2, 4, 8], [-8, -2, 0, 2, 4, 6], [-8, -2, 0, 2, 4, 6, 8], [-8, -4], [-8, -4, 8], [-8, -4, 6], [-8, -4, 6, 8], [-8, -4, 4], [-8, -4, 4, 8], [-8, -4, 4, 6], [-8, -4, 4, 6, 8], [-8, -4, 2], [-8, -4, 2, 8], [-8, -4, 2, 6], [-8, -4, 2, 6, 8], [-8, -4, 2, 4], [-8, -4, 2, 4, 8], [-8, -4, 2, 4, 6], [-8, -4, 2, 4, 6, 8], [-8, -4, 0], [-8, -4, 0, 8], [-8, -4, 0, 6], [-8, -4, 0, 6, 8], [-8, -4, 0, 4], [-8, -4, 0, 4, 8], [-8, -4, 0, 4, 6], [-8, -4, 0, 4, 6, 8], [-8, -4, 0, 2], [-8, -4, 0, 2, 8], [-8, -4, 0, 2, 6], [-8, -4, 0, 2, 6, 8], [-8, -4, 0, 2, 4], [-8, -4, 0, 2, 4, 8], [-8, -4, 0, 2, 4, 6], [-8, -4, 0, 2, 4, 6, 8], [-8, -4, -2], [-8, -4, -2, 8], [-8, -4, -2, 6], [-8, -4, -2, 6, 8], [-8, -4, -2, 4], [-8, -4, -2, 4, 8], [-8, -4, -2, 4, 6], [-8, -4, -2, 4, 6, 8], [-8, -4, -2, 2], [-8, -4, -2, 2, 8], [-8, -4, -2, 2, 6], [-8, -4, -2, 2, 6, 8], [-8, -4, -2, 2, 4], [-8, -4, -2, 2, 4, 8], [-8, -4, -2, 2, 4, 6], [-8, -4, -2, 2, 4, 6, 8], [-8, -4, -2, 0], [-8, -4, -2, 0, 8], [-8, -4, -2, 0, 6], [-8, -4, -2, 0, 6, 8], [-8, -4, -2, 0, 4], [-8, -4, -2, 0, 4, 8], [-8, -4, -2, 0, 4, 6], [-8, -4, -2, 0, 4, 6, 8], [-8, -4, -2, 0, 2], [-8, -4, -2, 0, 2, 8], [-8, -4, -2, 0, 2, 6], [-8, -4, -2, 0, 2, 6, 8], [-8, -4, -2, 0, 2, 4], [-8, -4, -2, 0, 2, 4, 8], [-8, -4, -2, 0, 2, 4, 6], [-8, -4, -2, 0, 2, 4, 6, 8], [-8, -6], [-8, -6, 8], [-8, -6, 6], [-8, -6, 6, 8], [-8, -6, 4], [-8, -6, 4, 8], [-8, -6, 4, 6], [-8, -6, 4, 6, 8], [-8, -6, 2], [-8, -6, 2, 8], [-8, -6, 2, 6], [-8, -6, 2, 6, 8], [-8, -6, 2, 4], [-8, -6, 2, 4, 8], [-8, -6, 2, 4, 6], [-8, -6, 2, 4, 6, 8], [-8, -6, 0], [-8, -6, 0, 8], [-8, -6, 0, 6], [-8, -6, 0, 6, 8], [-8, -6, 0, 4], [-8, -6, 0, 4, 8], [-8, -6, 0, 4, 6], [-8, -6, 0, 4, 6, 8], [-8, -6, 0, 2], [-8, -6, 0, 2, 8], [-8, -6, 0, 2, 6], [-8, -6, 0, 2, 6, 8], [-8, -6, 0, 2, 4], [-8, -6, 0, 2, 4, 8], [-8, -6, 0, 2, 4, 6], [-8, -6, 0, 2, 4, 6, 8], [-8, -6, -2], [-8, -6, -2, 8], [-8, -6, -2, 6], [-8, -6, -2, 6, 8], [-8, -6, -2, 4], [-8, -6, -2, 4, 8], [-8, -6, -2, 4, 6], [-8, -6, -2, 4, 6, 8], [-8, -6, -2, 2], [-8, -6, -2, 2, 8], [-8, -6, -2, 2, 6], [-8, -6, -2, 2, 6, 8], [-8, -6, -2, 2, 4], [-8, -6, -2, 2, 4, 8], [-8, -6, -2, 2, 4, 6], [-8, -6, -2, 2, 4, 6, 8], [-8, -6, -2, 0], [-8, -6, -2, 0, 8], [-8, -6, -2, 0, 6], [-8, -6, -2, 0, 6, 8], [-8, -6, -2, 0, 4], [-8, -6, -2, 0, 4, 8], [-8, -6, -2, 0, 4, 6], [-8, -6, -2, 0, 4, 6, 8], [-8, -6, -2, 0, 2], [-8, -6, -2, 0, 2, 8], [-8, -6, -2, 0, 2, 6], [-8, -6, -2, 0, 2, 6, 8], [-8, -6, -2, 0, 2, 4], [-8, -6, -2, 0, 2, 4, 8], [-8, -6, -2, 0, 2, 4, 6], [-8, -6, -2, 0, 2, 4, 6, 8], [-8, -6, -4], [-8, -6, -4, 8], [-8, -6, -4, 6], [-8, -6, -4, 6, 8], [-8, -6, -4, 4], [-8, -6, -4, 4, 8], [-8, -6, -4, 4, 6], [-8, -6, -4, 4, 6, 8], [-8, -6, -4, 2], [-8, -6, -4, 2, 8], [-8, -6, -4, 2, 6], [-8, -6, -4, 2, 6, 8], [-8, -6, -4, 2, 4], [-8, -6, -4, 2, 4, 8], [-8, -6, -4, 2, 4, 6], [-8, -6, -4, 2, 4, 6, 8], [-8, -6, -4, 0], [-8, -6, -4, 0, 8], [-8, -6, -4, 0, 6], [-8, -6, -4, 0, 6, 8], [-8, -6, -4, 0, 4], [-8, -6, -4, 0, 4, 8], [-8, -6, -4, 0, 4, 6], [-8, -6, -4, 0, 4, 6, 8], [-8, -6, -4, 0, 2], [-8, -6, -4, 0, 2, 8], [-8, -6, -4, 0, 2, 6], [-8, -6, -4, 0, 2, 6, 8], [-8, -6, -4, 0, 2, 4], [-8, -6, -4, 0, 2, 4, 8], [-8, -6, -4, 0, 2, 4, 6], [-8, -6, -4, 0, 2, 4, 6, 8], [-8, -6, -4, -2], [-8, -6, -4, -2, 8], [-8, -6, -4, -2, 6], [-8, -6, -4, -2, 6, 8], [-8, -6, -4, -2, 4], [-8, -6, -4, -2, 4, 8], [-8, -6, -4, -2, 4, 6], [-8, -6, -4, -2, 4, 6, 8], [-8, -6, -4, -2, 2], [-8, -6, -4, -2, 2, 8], [-8, -6, -4, -2, 2, 6], [-8, -6, -4, -2, 2, 6, 8], [-8, -6, -4, -2, 2, 4], [-8, -6, -4, -2, 2, 4, 8], [-8, -6, -4, -2, 2, 4, 6], [-8, -6, -4, -2, 2, 4, 6, 8], [-8, -6, -4, -2, 0], [-8, -6, -4, -2, 0, 8], [-8, -6, -4, -2, 0, 6], [-8, -6, -4, -2, 0, 6, 8], [-8, -6, -4, -2, 0, 4], [-8, -6, -4, -2, 0, 4, 8], [-8, -6, -4, -2, 0, 4, 6], [-8, -6, -4, -2, 0, 4, 6, 8], [-8, -6, -4, -2, 0, 2], [-8, -6, -4, -2, 0, 2, 8], [-8, -6, -4, -2, 0, 2, 6], [-8, -6, -4, -2, 0, 2, 6, 8], [-8, -6, -4, -2, 0, 2, 4], [-8, -6, -4, -2, 0, 2, 4, 8], [-8, -6, -4, -2, 0, 2, 4, 6], [-8, -6, -4, -2, 0, 2, 4, 6, 8], [-10], [-10, 8], [-10, 6], [-10, 6, 8], [-10, 4], [-10, 4, 8], [-10, 4, 6], [-10, 4, 6, 8], [-10, 2], [-10, 2, 8], [-10, 2, 6], [-10, 2, 6, 8], [-10, 2, 4], [-10, 2, 4, 8], [-10, 2, 4, 6], [-10, 2, 4, 6, 8], [-10, 0], [-10, 0, 8], [-10, 0, 6], [-10, 0, 6, 8], [-10, 0, 4], [-10, 0, 4, 8], [-10, 0, 4, 6], [-10, 0, 4, 6, 8], [-10, 0, 2], [-10, 0, 2, 8], [-10, 0, 2, 6], [-10, 0, 2, 6, 8], [-10, 0, 2, 4], [-10, 0, 2, 4, 8], [-10, 0, 2, 4, 6], [-10, 0, 2, 4, 6, 8], [-10, -2], [-10, -2, 8], [-10, -2, 6], [-10, -2, 6, 8], [-10, -2, 4], [-10, -2, 4, 8], [-10, -2, 4, 6], [-10, -2, 4, 6, 8], [-10, -2, 2], [-10, -2, 2, 8], [-10, -2, 2, 6], [-10, -2, 2, 6, 8], [-10, -2, 2, 4], [-10, -2, 2, 4, 8], [-10, -2, 2, 4, 6], [-10, -2, 2, 4, 6, 8], [-10, -2, 0], [-10, -2, 0, 8], [-10, -2, 0, 6], [-10, -2, 0, 6, 8], [-10, -2, 0, 4], [-10, -2, 0, 4, 8], [-10, -2, 0, 4, 6], [-10, -2, 0, 4, 6, 8], [-10, -2, 0, 2], [-10, -2, 0, 2, 8], [-10, -2, 0, 2, 6], [-10, -2, 0, 2, 6, 8], [-10, -2, 0, 2, 4], [-10, -2, 0, 2, 4, 8], [-10, -2, 0, 2, 4, 6], [-10, -2, 0, 2, 4, 6, 8], [-10, -4], [-10, -4, 8], [-10, -4, 6], [-10, -4, 6, 8], [-10, -4, 4], [-10, -4, 4, 8], [-10, -4, 4, 6], [-10, -4, 4, 6, 8], [-10, -4, 2], [-10, -4, 2, 8], [-10, -4, 2, 6], [-10, -4, 2, 6, 8], [-10, -4, 2, 4], [-10, -4, 2, 4, 8], [-10, -4, 2, 4, 6], [-10, -4, 2, 4, 6, 8], [-10, -4, 0], [-10, -4, 0, 8], [-10, -4, 0, 6], [-10, -4, 0, 6, 8], [-10, -4, 0, 4], [-10, -4, 0, 4, 8], [-10, -4, 0, 4, 6], [-10, -4, 0, 4, 6, 8], [-10, -4, 0, 2], [-10, -4, 0, 2, 8], [-10, -4, 0, 2, 6], [-10, -4, 0, 2, 6, 8], [-10, -4, 0, 2, 4], [-10, -4, 0, 2, 4, 8], [-10, -4, 0, 2, 4, 6], [-10, -4, 0, 2, 4, 6, 8], [-10, -4, -2], [-10, -4, -2, 8], [-10, -4, -2, 6], [-10, -4, -2, 6, 8], [-10, -4, -2, 4], [-10, -4, -2, 4, 8], [-10, -4, -2, 4, 6], [-10, -4, -2, 4, 6, 8], [-10, -4, -2, 2], [-10, -4, -2, 2, 8], [-10, -4, -2, 2, 6], [-10, -4, -2, 2, 6, 8], [-10, -4, -2, 2, 4], [-10, -4, -2, 2, 4, 8], [-10, -4, -2, 2, 4, 6], [-10, -4, -2, 2, 4, 6, 8], [-10, -4, -2, 0], [-10, -4, -2, 0, 8], [-10, -4, -2, 0, 6], [-10, -4, -2, 0, 6, 8], [-10, -4, -2, 0, 4], [-10, -4, -2, 0, 4, 8], [-10, -4, -2, 0, 4, 6], [-10, -4, -2, 0, 4, 6, 8], [-10, -4, -2, 0, 2], [-10, -4, -2, 0, 2, 8], [-10, -4, -2, 0, 2, 6], [-10, -4, -2, 0, 2, 6, 8], [-10, -4, -2, 0, 2, 4], [-10, -4, -2, 0, 2, 4, 8], [-10, -4, -2, 0, 2, 4, 6], [-10, -4, -2, 0, 2, 4, 6, 8], [-10, -6], [-10, -6, 8], [-10, -6, 6], [-10, -6, 6, 8], [-10, -6, 4], [-10, -6, 4, 8], [-10, -6, 4, 6], [-10, -6, 4, 6, 8], [-10, -6, 2], [-10, -6, 2, 8], [-10, -6, 2, 6], [-10, -6, 2, 6, 8], [-10, -6, 2, 4], [-10, -6, 2, 4, 8], [-10, -6, 2, 4, 6], [-10, -6, 2, 4, 6, 8], [-10, -6, 0], [-10, -6, 0, 8], [-10, -6, 0, 6], [-10, -6, 0, 6, 8], [-10, -6, 0, 4], [-10, -6, 0, 4, 8], [-10, -6, 0, 4, 6], [-10, -6, 0, 4, 6, 8], [-10, -6, 0, 2], [-10, -6, 0, 2, 8], [-10, -6, 0, 2, 6], [-10, -6, 0, 2, 6, 8], [-10, -6, 0, 2, 4], [-10, -6, 0, 2, 4, 8], [-10, -6, 0, 2, 4, 6], [-10, -6, 0, 2, 4, 6, 8], [-10, -6, -2], [-10, -6, -2, 8], [-10, -6, -2, 6], [-10, -6, -2, 6, 8], [-10, -6, -2, 4], [-10, -6, -2, 4, 8], [-10, -6, -2, 4, 6], [-10, -6, -2, 4, 6, 8], [-10, -6, -2, 2], [-10, -6, -2, 2, 8], [-10, -6, -2, 2, 6], [-10, -6, -2, 2, 6, 8], [-10, -6, -2, 2, 4], [-10, -6, -2, 2, 4, 8], [-10, -6, -2, 2, 4, 6], [-10, -6, -2, 2, 4, 6, 8], [-10, -6, -2, 0], [-10, -6, -2, 0, 8], [-10, -6, -2, 0, 6], [-10, -6, -2, 0, 6, 8], [-10, -6, -2, 0, 4], [-10, -6, -2, 0, 4, 8], [-10, -6, -2, 0, 4, 6], [-10, -6, -2, 0, 4, 6, 8], [-10, -6, -2, 0, 2], [-10, -6, -2, 0, 2, 8], [-10, -6, -2, 0, 2, 6], [-10, -6, -2, 0, 2, 6, 8], [-10, -6, -2, 0, 2, 4], [-10, -6, -2, 0, 2, 4, 8], [-10, -6, -2, 0, 2, 4, 6], [-10, -6, -2, 0, 2, 4, 6, 8], [-10, -6, -4], [-10, -6, -4, 8], [-10, -6, -4, 6], [-10, -6, -4, 6, 8], [-10, -6, -4, 4], [-10, -6, -4, 4, 8], [-10, -6, -4, 4, 6], [-10, -6, -4, 4, 6, 8], [-10, -6, -4, 2], [-10, -6, -4, 2, 8], [-10, -6, -4, 2, 6], [-10, -6, -4, 2, 6, 8], [-10, -6, -4, 2, 4], [-10, -6, -4, 2, 4, 8], [-10, -6, -4, 2, 4, 6], [-10, -6, -4, 2, 4, 6, 8], [-10, -6, -4, 0], [-10, -6, -4, 0, 8], [-10, -6, -4, 0, 6], [-10, -6, -4, 0, 6, 8], [-10, -6, -4, 0, 4], [-10, -6, -4, 0, 4, 8], [-10, -6, -4, 0, 4, 6], [-10, -6, -4, 0, 4, 6, 8], [-10, -6, -4, 0, 2], [-10, -6, -4, 0, 2, 8], [-10, -6, -4, 0, 2, 6], [-10, -6, -4, 0, 2, 6, 8], [-10, -6, -4, 0, 2, 4], [-10, -6, -4, 0, 2, 4, 8], [-10, -6, -4, 0, 2, 4, 6], [-10, -6, -4, 0, 2, 4, 6, 8], [-10, -6, -4, -2], [-10, -6, -4, -2, 8], [-10, -6, -4, -2, 6], [-10, -6, -4, -2, 6, 8], [-10, -6, -4, -2, 4], [-10, -6, -4, -2, 4, 8], [-10, -6, -4, -2, 4, 6], [-10, -6, -4, -2, 4, 6, 8], [-10, -6, -4, -2, 2], [-10, -6, -4, -2, 2, 8], [-10, -6, -4, -2, 2, 6], [-10, -6, -4, -2, 2, 6, 8], [-10, -6, -4, -2, 2, 4], [-10, -6, -4, -2, 2, 4, 8], [-10, -6, -4, -2, 2, 4, 6], [-10, -6, -4, -2, 2, 4, 6, 8], [-10, -6, -4, -2, 0], [-10, -6, -4, -2, 0, 8], [-10, -6, -4, -2, 0, 6], [-10, -6, -4, -2, 0, 6, 8], [-10, -6, -4, -2, 0, 4], [-10, -6, -4, -2, 0, 4, 8], [-10, -6, -4, -2, 0, 4, 6], [-10, -6, -4, -2, 0, 4, 6, 8], [-10, -6, -4, -2, 0, 2], [-10, -6, -4, -2, 0, 2, 8], [-10, -6, -4, -2, 0, 2, 6], [-10, -6, -4, -2, 0, 2, 6, 8], [-10, -6, -4, -2, 0, 2, 4], [-10, -6, -4, -2, 0, 2, 4, 8], [-10, -6, -4, -2, 0, 2, 4, 6], [-10, -6, -4, -2, 0, 2, 4, 6, 8], [-10, -8], [-10, -8, 8], [-10, -8, 6], [-10, -8, 6, 8], [-10, -8, 4], [-10, -8, 4, 8], [-10, -8, 4, 6], [-10, -8, 4, 6, 8], [-10, -8, 2], [-10, -8, 2, 8], [-10, -8, 2, 6], [-10, -8, 2, 6, 8], [-10, -8, 2, 4], [-10, -8, 2, 4, 8], [-10, -8, 2, 4, 6], [-10, -8, 2, 4, 6, 8], [-10, -8, 0], [-10, -8, 0, 8], [-10, -8, 0, 6], [-10, -8, 0, 6, 8], [-10, -8, 0, 4], [-10, -8, 0, 4, 8], [-10, -8, 0, 4, 6], [-10, -8, 0, 4, 6, 8], [-10, -8, 0, 2], [-10, -8, 0, 2, 8], [-10, -8, 0, 2, 6], [-10, -8, 0, 2, 6, 8], [-10, -8, 0, 2, 4], [-10, -8, 0, 2, 4, 8], [-10, -8, 0, 2, 4, 6], [-10, -8, 0, 2, 4, 6, 8], [-10, -8, -2], [-10, -8, -2, 8], [-10, -8, -2, 6], [-10, -8, -2, 6, 8], [-10, -8, -2, 4], [-10, -8, -2, 4, 8], [-10, -8, -2, 4, 6], [-10, -8, -2, 4, 6, 8], [-10, -8, -2, 2], [-10, -8, -2, 2, 8], [-10, -8, -2, 2, 6], [-10, -8, -2, 2, 6, 8], [-10, -8, -2, 2, 4], [-10, -8, -2, 2, 4, 8], [-10, -8, -2, 2, 4, 6], [-10, -8, -2, 2, 4, 6, 8], [-10, -8, -2, 0], [-10, -8, -2, 0, 8], [-10, -8, -2, 0, 6], [-10, -8, -2, 0, 6, 8], [-10, -8, -2, 0, 4], [-10, -8, -2, 0, 4, 8], [-10, -8, -2, 0, 4, 6], [-10, -8, -2, 0, 4, 6, 8], [-10, -8, -2, 0, 2], [-10, -8, -2, 0, 2, 8], [-10, -8, -2, 0, 2, 6], [-10, -8, -2, 0, 2, 6, 8], [-10, -8, -2, 0, 2, 4], [-10, -8, -2, 0, 2, 4, 8], [-10, -8, -2, 0, 2, 4, 6], [-10, -8, -2, 0, 2, 4, 6, 8], [-10, -8, -4], [-10, -8, -4, 8], [-10, -8, -4, 6], [-10, -8, -4, 6, 8], [-10, -8, -4, 4], [-10, -8, -4, 4, 8], [-10, -8, -4, 4, 6], [-10, -8, -4, 4, 6, 8], [-10, -8, -4, 2], [-10, -8, -4, 2, 8], [-10, -8, -4, 2, 6], [-10, -8, -4, 2, 6, 8], [-10, -8, -4, 2, 4], [-10, -8, -4, 2, 4, 8], [-10, -8, -4, 2, 4, 6], [-10, -8, -4, 2, 4, 6, 8], [-10, -8, -4, 0], [-10, -8, -4, 0, 8], [-10, -8, -4, 0, 6], [-10, -8, -4, 0, 6, 8], [-10, -8, -4, 0, 4], [-10, -8, -4, 0, 4, 8], [-10, -8, -4, 0, 4, 6], [-10, -8, -4, 0, 4, 6, 8], [-10, -8, -4, 0, 2], [-10, -8, -4, 0, 2, 8], [-10, -8, -4, 0, 2, 6], [-10, -8, -4, 0, 2, 6, 8], [-10, -8, -4, 0, 2, 4], [-10, -8, -4, 0, 2, 4, 8], [-10, -8, -4, 0, 2, 4, 6], [-10, -8, -4, 0, 2, 4, 6, 8], [-10, -8, -4, -2], [-10, -8, -4, -2, 8], [-10, -8, -4, -2, 6], [-10, -8, -4, -2, 6, 8], [-10, -8, -4, -2, 4], [-10, -8, -4, -2, 4, 8], [-10, -8, -4, -2, 4, 6], [-10, -8, -4, -2, 4, 6, 8], [-10, -8, -4, -2, 2], [-10, -8, -4, -2, 2, 8], [-10, -8, -4, -2, 2, 6], [-10, -8, -4, -2, 2, 6, 8], [-10, -8, -4, -2, 2, 4], [-10, -8, -4, -2, 2, 4, 8], [-10, -8, -4, -2, 2, 4, 6], [-10, -8, -4, -2, 2, 4, 6, 8], [-10, -8, -4, -2, 0], [-10, -8, -4, -2, 0, 8], [-10, -8, -4, -2, 0, 6], [-10, -8, -4, -2, 0, 6, 8], [-10, -8, -4, -2, 0, 4], [-10, -8, -4, -2, 0, 4, 8], [-10, -8, -4, -2, 0, 4, 6], [-10, -8, -4, -2, 0, 4, 6, 8], [-10, -8, -4, -2, 0, 2], [-10, -8, -4, -2, 0, 2, 8], [-10, -8, -4, -2, 0, 2, 6], [-10, -8, -4, -2, 0, 2, 6, 8], [-10, -8, -4, -2, 0, 2, 4], [-10, -8, -4, -2, 0, 2, 4, 8], [-10, -8, -4, -2, 0, 2, 4, 6], [-10, -8, -4, -2, 0, 2, 4, 6, 8], [-10, -8, -6], [-10, -8, -6, 8], [-10, -8, -6, 6], [-10, -8, -6, 6, 8], [-10, -8, -6, 4], [-10, -8, -6, 4, 8], [-10, -8, -6, 4, 6], [-10, -8, -6, 4, 6, 8], [-10, -8, -6, 2], [-10, -8, -6, 2, 8], [-10, -8, -6, 2, 6], [-10, -8, -6, 2, 6, 8], [-10, -8, -6, 2, 4], [-10, -8, -6, 2, 4, 8], [-10, -8, -6, 2, 4, 6], [-10, -8, -6, 2, 4, 6, 8], [-10, -8, -6, 0], [-10, -8, -6, 0, 8], [-10, -8, -6, 0, 6], [-10, -8, -6, 0, 6, 8], [-10, -8, -6, 0, 4], [-10, -8, -6, 0, 4, 8], [-10, -8, -6, 0, 4, 6], [-10, -8, -6, 0, 4, 6, 8], [-10, -8, -6, 0, 2], [-10, -8, -6, 0, 2, 8], [-10, -8, -6, 0, 2, 6], [-10, -8, -6, 0, 2, 6, 8], [-10, -8, -6, 0, 2, 4], [-10, -8, -6, 0, 2, 4, 8], [-10, -8, -6, 0, 2, 4, 6], [-10, -8, -6, 0, 2, 4, 6, 8], [-10, -8, -6, -2], [-10, -8, -6, -2, 8], [-10, -8, -6, -2, 6], [-10, -8, -6, -2, 6, 8], [-10, -8, -6, -2, 4], [-10, -8, -6, -2, 4, 8], [-10, -8, -6, -2, 4, 6], [-10, -8, -6, -2, 4, 6, 8], [-10, -8, -6, -2, 2], [-10, -8, -6, -2, 2, 8], [-10, -8, -6, -2, 2, 6], [-10, -8, -6, -2, 2, 6, 8], [-10, -8, -6, -2, 2, 4], [-10, -8, -6, -2, 2, 4, 8], [-10, -8, -6, -2, 2, 4, 6], [-10, -8, -6, -2, 2, 4, 6, 8], [-10, -8, -6, -2, 0], [-10, -8, -6, -2, 0, 8], [-10, -8, -6, -2, 0, 6], [-10, -8, -6, -2, 0, 6, 8], [-10, -8, -6, -2, 0, 4], [-10, -8, -6, -2, 0, 4, 8], [-10, -8, -6, -2, 0, 4, 6], [-10, -8, -6, -2, 0, 4, 6, 8], [-10, -8, -6, -2, 0, 2], [-10, -8, -6, -2, 0, 2, 8], [-10, -8, -6, -2, 0, 2, 6], [-10, -8, -6, -2, 0, 2, 6, 8], [-10, -8, -6, -2, 0, 2, 4], [-10, -8, -6, -2, 0, 2, 4, 8], [-10, -8, -6, -2, 0, 2, 4, 6], [-10, -8, -6, -2, 0, 2, 4, 6, 8], [-10, -8, -6, -4], [-10, -8, -6, -4, 8], [-10, -8, -6, -4, 6], [-10, -8, -6, -4, 6, 8], [-10, -8, -6, -4, 4], [-10, -8, -6, -4, 4, 8], [-10, -8, -6, -4, 4, 6], [-10, -8, -6, -4, 4, 6, 8], [-10, -8, -6, -4, 2], [-10, -8, -6, -4, 2, 8], [-10, -8, -6, -4, 2, 6], [-10, -8, -6, -4, 2, 6, 8], [-10, -8, -6, -4, 2, 4], [-10, -8, -6, -4, 2, 4, 8], [-10, -8, -6, -4, 2, 4, 6], [-10, -8, -6, -4, 2, 4, 6, 8], [-10, -8, -6, -4, 0], [-10, -8, -6, -4, 0, 8], [-10, -8, -6, -4, 0, 6], [-10, -8, -6, -4, 0, 6, 8], [-10, -8, -6, -4, 0, 4], [-10, -8, -6, -4, 0, 4, 8], [-10, -8, -6, -4, 0, 4, 6], [-10, -8, -6, -4, 0, 4, 6, 8], [-10, -8, -6, -4, 0, 2], [-10, -8, -6, -4, 0, 2, 8], [-10, -8, -6, -4, 0, 2, 6], [-10, -8, -6, -4, 0, 2, 6, 8], [-10, -8, -6, -4, 0, 2, 4], [-10, -8, -6, -4, 0, 2, 4, 8], [-10, -8, -6, -4, 0, 2, 4, 6], [-10, -8, -6, -4, 0, 2, 4, 6, 8], [-10, -8, -6, -4, -2], [-10, -8, -6, -4, -2, 8], [-10, -8, -6, -4, -2, 6], [-10, -8, -6, -4, -2, 6, 8], [-10, -8, -6, -4, -2, 4], [-10, -8, -6, -4, -2, 4, 8], [-10, -8, -6, -4, -2, 4, 6], [-10, -8, -6, -4, -2, 4, 6, 8], [-10, -8, -6, -4, -2, 2], [-10, -8, -6, -4, -2, 2, 8], [-10, -8, -6, -4, -2, 2, 6], [-10, -8, -6, -4, -2, 2, 6, 8], [-10, -8, -6, -4, -2, 2, 4], [-10, -8, -6, -4, -2, 2, 4, 8], [-10, -8, -6, -4, -2, 2, 4, 6], [-10, -8, -6, -4, -2, 2, 4, 6, 8], [-10, -8, -6, -4, -2, 0], [-10, -8, -6, -4, -2, 0, 8], [-10, -8, -6, -4, -2, 0, 6], [-10, -8, -6, -4, -2, 0, 6, 8], [-10, -8, -6, -4, -2, 0, 4], [-10, -8, -6, -4, -2, 0, 4, 8], [-10, -8, -6, -4, -2, 0, 4, 6], [-10, -8, -6, -4, -2, 0, 4, 6, 8], [-10, -8, -6, -4, -2, 0, 2], [-10, -8, -6, -4, -2, 0, 2, 8], [-10, -8, -6, -4, -2, 0, 2, 6], [-10, -8, -6, -4, -2, 0, 2, 6, 8], [-10, -8, -6, -4, -2, 0, 2, 4], [-10, -8, -6, -4, -2, 0, 2, 4, 8], [-10, -8, -6, -4, -2, 0, 2, 4, 6], [-10, -8, -6, -4, -2, 0, 2, 4, 6, 8]])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5]), [[], [5], [4], [4, 5], [3], [3, 5], [3, 4], [3, 4, 5], [2], [2, 5], [2, 4], [2, 4, 5], [2, 3], [2, 3, 5], [2, 3, 4], [2, 3, 4, 5], [1], [1, 5], [1, 4], [1, 4, 5], [1, 3], [1, 3, 5], [1, 3, 4], [1, 3, 4, 5], [1, 2], [1, 2, 5], [1, 2, 4], [1, 2, 4, 5], [1, 2, 3], [1, 2, 3, 5], [1, 2, 3, 4], [1, 2, 3, 4, 5], [0], [0, 5], [0, 4], [0, 4, 5], [0, 3], [0, 3, 5], [0, 3, 4], [0, 3, 4, 5], [0, 2], [0, 2, 5], [0, 2, 4], [0, 2, 4, 5], [0, 2, 3], [0, 2, 3, 5], [0, 2, 3, 4], [0, 2, 3, 4, 5], [0, 1], [0, 1, 5], [0, 1, 4], [0, 1, 4, 5], [0, 1, 3], [0, 1, 3, 5], [0, 1, 3, 4], [0, 1, 3, 4, 5], [0, 1, 2], [0, 1, 2, 5], [0, 1, 2, 4], [0, 1, 2, 4, 5], [0, 1, 2, 3], [0, 1, 2, 3, 5], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[], [4], [3], [3, 4], [2], [2, 4], [2, 3], [2, 3, 4], [1], [1, 4], [1, 3], [1, 3, 4], [1, 2], [1, 2, 4], [1, 2, 3], [1, 2, 3, 4]])\n assert answers_match(candidate(nums=[7, 1, 5, 3]), [[], [3], [5], [5, 3], [1], [1, 3], [1, 5], [1, 5, 3], [7], [7, 3], [7, 5], [7, 5, 3], [7, 1], [7, 1, 3], [7, 1, 5], [7, 1, 5, 3]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5]), [[], [-5], [-4], [-4, -5], [-3], [-3, -5], [-3, -4], [-3, -4, -5], [-2], [-2, -5], [-2, -4], [-2, -4, -5], [-2, -3], [-2, -3, -5], [-2, -3, -4], [-2, -3, -4, -5], [-1], [-1, -5], [-1, -4], [-1, -4, -5], [-1, -3], [-1, -3, -5], [-1, -3, -4], [-1, -3, -4, -5], [-1, -2], [-1, -2, -5], [-1, -2, -4], [-1, -2, -4, -5], [-1, -2, -3], [-1, -2, -3, -5], [-1, -2, -3, -4], [-1, -2, -3, -4, -5]])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), [[], [9], [8], [8, 9], [7], [7, 9], [7, 8], [7, 8, 9], [6], [6, 9], [6, 8], [6, 8, 9], [6, 7], [6, 7, 9], [6, 7, 8], [6, 7, 8, 9], [5], [5, 9], [5, 8], [5, 8, 9], [5, 7], [5, 7, 9], [5, 7, 8], [5, 7, 8, 9], [5, 6], [5, 6, 9], [5, 6, 8], [5, 6, 8, 9], [5, 6, 7], [5, 6, 7, 9], [5, 6, 7, 8], [5, 6, 7, 8, 9], [4], [4, 9], [4, 8], [4, 8, 9], [4, 7], [4, 7, 9], [4, 7, 8], [4, 7, 8, 9], [4, 6], [4, 6, 9], [4, 6, 8], [4, 6, 8, 9], [4, 6, 7], [4, 6, 7, 9], [4, 6, 7, 8], [4, 6, 7, 8, 9], [4, 5], [4, 5, 9], [4, 5, 8], [4, 5, 8, 9], [4, 5, 7], [4, 5, 7, 9], [4, 5, 7, 8], [4, 5, 7, 8, 9], [4, 5, 6], [4, 5, 6, 9], [4, 5, 6, 8], [4, 5, 6, 8, 9], [4, 5, 6, 7], [4, 5, 6, 7, 9], [4, 5, 6, 7, 8], [4, 5, 6, 7, 8, 9], [3], [3, 9], [3, 8], [3, 8, 9], [3, 7], [3, 7, 9], [3, 7, 8], [3, 7, 8, 9], [3, 6], [3, 6, 9], [3, 6, 8], [3, 6, 8, 9], [3, 6, 7], [3, 6, 7, 9], [3, 6, 7, 8], [3, 6, 7, 8, 9], [3, 5], [3, 5, 9], [3, 5, 8], [3, 5, 8, 9], [3, 5, 7], [3, 5, 7, 9], [3, 5, 7, 8], [3, 5, 7, 8, 9], [3, 5, 6], [3, 5, 6, 9], [3, 5, 6, 8], [3, 5, 6, 8, 9], [3, 5, 6, 7], [3, 5, 6, 7, 9], [3, 5, 6, 7, 8], [3, 5, 6, 7, 8, 9], [3, 4], [3, 4, 9], [3, 4, 8], [3, 4, 8, 9], [3, 4, 7], [3, 4, 7, 9], [3, 4, 7, 8], [3, 4, 7, 8, 9], [3, 4, 6], [3, 4, 6, 9], [3, 4, 6, 8], [3, 4, 6, 8, 9], [3, 4, 6, 7], [3, 4, 6, 7, 9], [3, 4, 6, 7, 8], [3, 4, 6, 7, 8, 9], [3, 4, 5], [3, 4, 5, 9], [3, 4, 5, 8], [3, 4, 5, 8, 9], [3, 4, 5, 7], [3, 4, 5, 7, 9], [3, 4, 5, 7, 8], [3, 4, 5, 7, 8, 9], [3, 4, 5, 6], [3, 4, 5, 6, 9], [3, 4, 5, 6, 8], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 8, 9], [2], [2, 9], [2, 8], [2, 8, 9], [2, 7], [2, 7, 9], [2, 7, 8], [2, 7, 8, 9], [2, 6], [2, 6, 9], [2, 6, 8], [2, 6, 8, 9], [2, 6, 7], [2, 6, 7, 9], [2, 6, 7, 8], [2, 6, 7, 8, 9], [2, 5], [2, 5, 9], [2, 5, 8], [2, 5, 8, 9], [2, 5, 7], [2, 5, 7, 9], [2, 5, 7, 8], [2, 5, 7, 8, 9], [2, 5, 6], [2, 5, 6, 9], [2, 5, 6, 8], [2, 5, 6, 8, 9], [2, 5, 6, 7], [2, 5, 6, 7, 9], [2, 5, 6, 7, 8], [2, 5, 6, 7, 8, 9], [2, 4], [2, 4, 9], [2, 4, 8], [2, 4, 8, 9], [2, 4, 7], [2, 4, 7, 9], [2, 4, 7, 8], [2, 4, 7, 8, 9], [2, 4, 6], [2, 4, 6, 9], [2, 4, 6, 8], [2, 4, 6, 8, 9], [2, 4, 6, 7], [2, 4, 6, 7, 9], [2, 4, 6, 7, 8], [2, 4, 6, 7, 8, 9], [2, 4, 5], [2, 4, 5, 9], [2, 4, 5, 8], [2, 4, 5, 8, 9], [2, 4, 5, 7], [2, 4, 5, 7, 9], [2, 4, 5, 7, 8], [2, 4, 5, 7, 8, 9], [2, 4, 5, 6], [2, 4, 5, 6, 9], [2, 4, 5, 6, 8], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 7], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 8, 9], [2, 3], [2, 3, 9], [2, 3, 8], [2, 3, 8, 9], [2, 3, 7], [2, 3, 7, 9], [2, 3, 7, 8], [2, 3, 7, 8, 9], [2, 3, 6], [2, 3, 6, 9], [2, 3, 6, 8], [2, 3, 6, 8, 9], [2, 3, 6, 7], [2, 3, 6, 7, 9], [2, 3, 6, 7, 8], [2, 3, 6, 7, 8, 9], [2, 3, 5], [2, 3, 5, 9], [2, 3, 5, 8], [2, 3, 5, 8, 9], [2, 3, 5, 7], [2, 3, 5, 7, 9], [2, 3, 5, 7, 8], [2, 3, 5, 7, 8, 9], [2, 3, 5, 6], [2, 3, 5, 6, 9], [2, 3, 5, 6, 8], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 7], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 8, 9], [2, 3, 4], [2, 3, 4, 9], [2, 3, 4, 8], [2, 3, 4, 8, 9], [2, 3, 4, 7], [2, 3, 4, 7, 9], [2, 3, 4, 7, 8], [2, 3, 4, 7, 8, 9], [2, 3, 4, 6], [2, 3, 4, 6, 9], [2, 3, 4, 6, 8], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 7], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 5], [2, 3, 4, 5, 9], [2, 3, 4, 5, 8], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 7], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 8, 9], [1], [1, 9], [1, 8], [1, 8, 9], [1, 7], [1, 7, 9], [1, 7, 8], [1, 7, 8, 9], [1, 6], [1, 6, 9], [1, 6, 8], [1, 6, 8, 9], [1, 6, 7], [1, 6, 7, 9], [1, 6, 7, 8], [1, 6, 7, 8, 9], [1, 5], [1, 5, 9], [1, 5, 8], [1, 5, 8, 9], [1, 5, 7], [1, 5, 7, 9], [1, 5, 7, 8], [1, 5, 7, 8, 9], [1, 5, 6], [1, 5, 6, 9], [1, 5, 6, 8], [1, 5, 6, 8, 9], [1, 5, 6, 7], [1, 5, 6, 7, 9], [1, 5, 6, 7, 8], [1, 5, 6, 7, 8, 9], [1, 4], [1, 4, 9], [1, 4, 8], [1, 4, 8, 9], [1, 4, 7], [1, 4, 7, 9], [1, 4, 7, 8], [1, 4, 7, 8, 9], [1, 4, 6], [1, 4, 6, 9], [1, 4, 6, 8], [1, 4, 6, 8, 9], [1, 4, 6, 7], [1, 4, 6, 7, 9], [1, 4, 6, 7, 8], [1, 4, 6, 7, 8, 9], [1, 4, 5], [1, 4, 5, 9], [1, 4, 5, 8], [1, 4, 5, 8, 9], [1, 4, 5, 7], [1, 4, 5, 7, 9], [1, 4, 5, 7, 8], [1, 4, 5, 7, 8, 9], [1, 4, 5, 6], [1, 4, 5, 6, 9], [1, 4, 5, 6, 8], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 7], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 8, 9], [1, 3], [1, 3, 9], [1, 3, 8], [1, 3, 8, 9], [1, 3, 7], [1, 3, 7, 9], [1, 3, 7, 8], [1, 3, 7, 8, 9], [1, 3, 6], [1, 3, 6, 9], [1, 3, 6, 8], [1, 3, 6, 8, 9], [1, 3, 6, 7], [1, 3, 6, 7, 9], [1, 3, 6, 7, 8], [1, 3, 6, 7, 8, 9], [1, 3, 5], [1, 3, 5, 9], [1, 3, 5, 8], [1, 3, 5, 8, 9], [1, 3, 5, 7], [1, 3, 5, 7, 9], [1, 3, 5, 7, 8], [1, 3, 5, 7, 8, 9], [1, 3, 5, 6], [1, 3, 5, 6, 9], [1, 3, 5, 6, 8], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 7], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 8, 9], [1, 3, 4], [1, 3, 4, 9], [1, 3, 4, 8], [1, 3, 4, 8, 9], [1, 3, 4, 7], [1, 3, 4, 7, 9], [1, 3, 4, 7, 8], [1, 3, 4, 7, 8, 9], [1, 3, 4, 6], [1, 3, 4, 6, 9], [1, 3, 4, 6, 8], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 7], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 5], [1, 3, 4, 5, 9], [1, 3, 4, 5, 8], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 7], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 6], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 8, 9], [1, 2], [1, 2, 9], [1, 2, 8], [1, 2, 8, 9], [1, 2, 7], [1, 2, 7, 9], [1, 2, 7, 8], [1, 2, 7, 8, 9], [1, 2, 6], [1, 2, 6, 9], [1, 2, 6, 8], [1, 2, 6, 8, 9], [1, 2, 6, 7], [1, 2, 6, 7, 9], [1, 2, 6, 7, 8], [1, 2, 6, 7, 8, 9], [1, 2, 5], [1, 2, 5, 9], [1, 2, 5, 8], [1, 2, 5, 8, 9], [1, 2, 5, 7], [1, 2, 5, 7, 9], [1, 2, 5, 7, 8], [1, 2, 5, 7, 8, 9], [1, 2, 5, 6], [1, 2, 5, 6, 9], [1, 2, 5, 6, 8], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 7], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 8, 9], [1, 2, 4], [1, 2, 4, 9], [1, 2, 4, 8], [1, 2, 4, 8, 9], [1, 2, 4, 7], [1, 2, 4, 7, 9], [1, 2, 4, 7, 8], [1, 2, 4, 7, 8, 9], [1, 2, 4, 6], [1, 2, 4, 6, 9], [1, 2, 4, 6, 8], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 7], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 5], [1, 2, 4, 5, 9], [1, 2, 4, 5, 8], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 7], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 6], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 3], [1, 2, 3, 9], [1, 2, 3, 8], [1, 2, 3, 8, 9], [1, 2, 3, 7], [1, 2, 3, 7, 9], [1, 2, 3, 7, 8], [1, 2, 3, 7, 8, 9], [1, 2, 3, 6], [1, 2, 3, 6, 9], [1, 2, 3, 6, 8], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 7], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 5], [1, 2, 3, 5, 9], [1, 2, 3, 5, 8], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 7], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 6], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 4], [1, 2, 3, 4, 9], [1, 2, 3, 4, 8], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 7], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 6], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9], [0], [0, 9], [0, 8], [0, 8, 9], [0, 7], [0, 7, 9], [0, 7, 8], [0, 7, 8, 9], [0, 6], [0, 6, 9], [0, 6, 8], [0, 6, 8, 9], [0, 6, 7], [0, 6, 7, 9], [0, 6, 7, 8], [0, 6, 7, 8, 9], [0, 5], [0, 5, 9], [0, 5, 8], [0, 5, 8, 9], [0, 5, 7], [0, 5, 7, 9], [0, 5, 7, 8], [0, 5, 7, 8, 9], [0, 5, 6], [0, 5, 6, 9], [0, 5, 6, 8], [0, 5, 6, 8, 9], [0, 5, 6, 7], [0, 5, 6, 7, 9], [0, 5, 6, 7, 8], [0, 5, 6, 7, 8, 9], [0, 4], [0, 4, 9], [0, 4, 8], [0, 4, 8, 9], [0, 4, 7], [0, 4, 7, 9], [0, 4, 7, 8], [0, 4, 7, 8, 9], [0, 4, 6], [0, 4, 6, 9], [0, 4, 6, 8], [0, 4, 6, 8, 9], [0, 4, 6, 7], [0, 4, 6, 7, 9], [0, 4, 6, 7, 8], [0, 4, 6, 7, 8, 9], [0, 4, 5], [0, 4, 5, 9], [0, 4, 5, 8], [0, 4, 5, 8, 9], [0, 4, 5, 7], [0, 4, 5, 7, 9], [0, 4, 5, 7, 8], [0, 4, 5, 7, 8, 9], [0, 4, 5, 6], [0, 4, 5, 6, 9], [0, 4, 5, 6, 8], [0, 4, 5, 6, 8, 9], [0, 4, 5, 6, 7], [0, 4, 5, 6, 7, 9], [0, 4, 5, 6, 7, 8], [0, 4, 5, 6, 7, 8, 9], [0, 3], [0, 3, 9], [0, 3, 8], [0, 3, 8, 9], [0, 3, 7], [0, 3, 7, 9], [0, 3, 7, 8], [0, 3, 7, 8, 9], [0, 3, 6], [0, 3, 6, 9], [0, 3, 6, 8], [0, 3, 6, 8, 9], [0, 3, 6, 7], [0, 3, 6, 7, 9], [0, 3, 6, 7, 8], [0, 3, 6, 7, 8, 9], [0, 3, 5], [0, 3, 5, 9], [0, 3, 5, 8], [0, 3, 5, 8, 9], [0, 3, 5, 7], [0, 3, 5, 7, 9], [0, 3, 5, 7, 8], [0, 3, 5, 7, 8, 9], [0, 3, 5, 6], [0, 3, 5, 6, 9], [0, 3, 5, 6, 8], [0, 3, 5, 6, 8, 9], [0, 3, 5, 6, 7], [0, 3, 5, 6, 7, 9], [0, 3, 5, 6, 7, 8], [0, 3, 5, 6, 7, 8, 9], [0, 3, 4], [0, 3, 4, 9], [0, 3, 4, 8], [0, 3, 4, 8, 9], [0, 3, 4, 7], [0, 3, 4, 7, 9], [0, 3, 4, 7, 8], [0, 3, 4, 7, 8, 9], [0, 3, 4, 6], [0, 3, 4, 6, 9], [0, 3, 4, 6, 8], [0, 3, 4, 6, 8, 9], [0, 3, 4, 6, 7], [0, 3, 4, 6, 7, 9], [0, 3, 4, 6, 7, 8], [0, 3, 4, 6, 7, 8, 9], [0, 3, 4, 5], [0, 3, 4, 5, 9], [0, 3, 4, 5, 8], [0, 3, 4, 5, 8, 9], [0, 3, 4, 5, 7], [0, 3, 4, 5, 7, 9], [0, 3, 4, 5, 7, 8], [0, 3, 4, 5, 7, 8, 9], [0, 3, 4, 5, 6], [0, 3, 4, 5, 6, 9], [0, 3, 4, 5, 6, 8], [0, 3, 4, 5, 6, 8, 9], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6, 7, 9], [0, 3, 4, 5, 6, 7, 8], [0, 3, 4, 5, 6, 7, 8, 9], [0, 2], [0, 2, 9], [0, 2, 8], [0, 2, 8, 9], [0, 2, 7], [0, 2, 7, 9], [0, 2, 7, 8], [0, 2, 7, 8, 9], [0, 2, 6], [0, 2, 6, 9], [0, 2, 6, 8], [0, 2, 6, 8, 9], [0, 2, 6, 7], [0, 2, 6, 7, 9], [0, 2, 6, 7, 8], [0, 2, 6, 7, 8, 9], [0, 2, 5], [0, 2, 5, 9], [0, 2, 5, 8], [0, 2, 5, 8, 9], [0, 2, 5, 7], [0, 2, 5, 7, 9], [0, 2, 5, 7, 8], [0, 2, 5, 7, 8, 9], [0, 2, 5, 6], [0, 2, 5, 6, 9], [0, 2, 5, 6, 8], [0, 2, 5, 6, 8, 9], [0, 2, 5, 6, 7], [0, 2, 5, 6, 7, 9], [0, 2, 5, 6, 7, 8], [0, 2, 5, 6, 7, 8, 9], [0, 2, 4], [0, 2, 4, 9], [0, 2, 4, 8], [0, 2, 4, 8, 9], [0, 2, 4, 7], [0, 2, 4, 7, 9], [0, 2, 4, 7, 8], [0, 2, 4, 7, 8, 9], [0, 2, 4, 6], [0, 2, 4, 6, 9], [0, 2, 4, 6, 8], [0, 2, 4, 6, 8, 9], [0, 2, 4, 6, 7], [0, 2, 4, 6, 7, 9], [0, 2, 4, 6, 7, 8], [0, 2, 4, 6, 7, 8, 9], [0, 2, 4, 5], [0, 2, 4, 5, 9], [0, 2, 4, 5, 8], [0, 2, 4, 5, 8, 9], [0, 2, 4, 5, 7], [0, 2, 4, 5, 7, 9], [0, 2, 4, 5, 7, 8], [0, 2, 4, 5, 7, 8, 9], [0, 2, 4, 5, 6], [0, 2, 4, 5, 6, 9], [0, 2, 4, 5, 6, 8], [0, 2, 4, 5, 6, 8, 9], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6, 7, 9], [0, 2, 4, 5, 6, 7, 8], [0, 2, 4, 5, 6, 7, 8, 9], [0, 2, 3], [0, 2, 3, 9], [0, 2, 3, 8], [0, 2, 3, 8, 9], [0, 2, 3, 7], [0, 2, 3, 7, 9], [0, 2, 3, 7, 8], [0, 2, 3, 7, 8, 9], [0, 2, 3, 6], [0, 2, 3, 6, 9], [0, 2, 3, 6, 8], [0, 2, 3, 6, 8, 9], [0, 2, 3, 6, 7], [0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 8], [0, 2, 3, 6, 7, 8, 9], [0, 2, 3, 5], [0, 2, 3, 5, 9], [0, 2, 3, 5, 8], [0, 2, 3, 5, 8, 9], [0, 2, 3, 5, 7], [0, 2, 3, 5, 7, 9], [0, 2, 3, 5, 7, 8], [0, 2, 3, 5, 7, 8, 9], [0, 2, 3, 5, 6], [0, 2, 3, 5, 6, 9], [0, 2, 3, 5, 6, 8], [0, 2, 3, 5, 6, 8, 9], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6, 7, 9], [0, 2, 3, 5, 6, 7, 8], [0, 2, 3, 5, 6, 7, 8, 9], [0, 2, 3, 4], [0, 2, 3, 4, 9], [0, 2, 3, 4, 8], [0, 2, 3, 4, 8, 9], [0, 2, 3, 4, 7], [0, 2, 3, 4, 7, 9], [0, 2, 3, 4, 7, 8], [0, 2, 3, 4, 7, 8, 9], [0, 2, 3, 4, 6], [0, 2, 3, 4, 6, 9], [0, 2, 3, 4, 6, 8], [0, 2, 3, 4, 6, 8, 9], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6, 7, 9], [0, 2, 3, 4, 6, 7, 8], [0, 2, 3, 4, 6, 7, 8, 9], [0, 2, 3, 4, 5], [0, 2, 3, 4, 5, 9], [0, 2, 3, 4, 5, 8], [0, 2, 3, 4, 5, 8, 9], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5, 7, 9], [0, 2, 3, 4, 5, 7, 8], [0, 2, 3, 4, 5, 7, 8, 9], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 6, 9], [0, 2, 3, 4, 5, 6, 8], [0, 2, 3, 4, 5, 6, 8, 9], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6, 7, 9], [0, 2, 3, 4, 5, 6, 7, 8], [0, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1], [0, 1, 9], [0, 1, 8], [0, 1, 8, 9], [0, 1, 7], [0, 1, 7, 9], [0, 1, 7, 8], [0, 1, 7, 8, 9], [0, 1, 6], [0, 1, 6, 9], [0, 1, 6, 8], [0, 1, 6, 8, 9], [0, 1, 6, 7], [0, 1, 6, 7, 9], [0, 1, 6, 7, 8], [0, 1, 6, 7, 8, 9], [0, 1, 5], [0, 1, 5, 9], [0, 1, 5, 8], [0, 1, 5, 8, 9], [0, 1, 5, 7], [0, 1, 5, 7, 9], [0, 1, 5, 7, 8], [0, 1, 5, 7, 8, 9], [0, 1, 5, 6], [0, 1, 5, 6, 9], [0, 1, 5, 6, 8], [0, 1, 5, 6, 8, 9], [0, 1, 5, 6, 7], [0, 1, 5, 6, 7, 9], [0, 1, 5, 6, 7, 8], [0, 1, 5, 6, 7, 8, 9], [0, 1, 4], [0, 1, 4, 9], [0, 1, 4, 8], [0, 1, 4, 8, 9], [0, 1, 4, 7], [0, 1, 4, 7, 9], [0, 1, 4, 7, 8], [0, 1, 4, 7, 8, 9], [0, 1, 4, 6], [0, 1, 4, 6, 9], [0, 1, 4, 6, 8], [0, 1, 4, 6, 8, 9], [0, 1, 4, 6, 7], [0, 1, 4, 6, 7, 9], [0, 1, 4, 6, 7, 8], [0, 1, 4, 6, 7, 8, 9], [0, 1, 4, 5], [0, 1, 4, 5, 9], [0, 1, 4, 5, 8], [0, 1, 4, 5, 8, 9], [0, 1, 4, 5, 7], [0, 1, 4, 5, 7, 9], [0, 1, 4, 5, 7, 8], [0, 1, 4, 5, 7, 8, 9], [0, 1, 4, 5, 6], [0, 1, 4, 5, 6, 9], [0, 1, 4, 5, 6, 8], [0, 1, 4, 5, 6, 8, 9], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6, 7, 9], [0, 1, 4, 5, 6, 7, 8], [0, 1, 4, 5, 6, 7, 8, 9], [0, 1, 3], [0, 1, 3, 9], [0, 1, 3, 8], [0, 1, 3, 8, 9], [0, 1, 3, 7], [0, 1, 3, 7, 9], [0, 1, 3, 7, 8], [0, 1, 3, 7, 8, 9], [0, 1, 3, 6], [0, 1, 3, 6, 9], [0, 1, 3, 6, 8], [0, 1, 3, 6, 8, 9], [0, 1, 3, 6, 7], [0, 1, 3, 6, 7, 9], [0, 1, 3, 6, 7, 8], [0, 1, 3, 6, 7, 8, 9], [0, 1, 3, 5], [0, 1, 3, 5, 9], [0, 1, 3, 5, 8], [0, 1, 3, 5, 8, 9], [0, 1, 3, 5, 7], [0, 1, 3, 5, 7, 9], [0, 1, 3, 5, 7, 8], [0, 1, 3, 5, 7, 8, 9], [0, 1, 3, 5, 6], [0, 1, 3, 5, 6, 9], [0, 1, 3, 5, 6, 8], [0, 1, 3, 5, 6, 8, 9], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6, 7, 9], [0, 1, 3, 5, 6, 7, 8], [0, 1, 3, 5, 6, 7, 8, 9], [0, 1, 3, 4], [0, 1, 3, 4, 9], [0, 1, 3, 4, 8], [0, 1, 3, 4, 8, 9], [0, 1, 3, 4, 7], [0, 1, 3, 4, 7, 9], [0, 1, 3, 4, 7, 8], [0, 1, 3, 4, 7, 8, 9], [0, 1, 3, 4, 6], [0, 1, 3, 4, 6, 9], [0, 1, 3, 4, 6, 8], [0, 1, 3, 4, 6, 8, 9], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6, 7, 9], [0, 1, 3, 4, 6, 7, 8], [0, 1, 3, 4, 6, 7, 8, 9], [0, 1, 3, 4, 5], [0, 1, 3, 4, 5, 9], [0, 1, 3, 4, 5, 8], [0, 1, 3, 4, 5, 8, 9], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5, 7, 9], [0, 1, 3, 4, 5, 7, 8], [0, 1, 3, 4, 5, 7, 8, 9], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5, 6, 9], [0, 1, 3, 4, 5, 6, 8], [0, 1, 3, 4, 5, 6, 8, 9], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6, 7, 9], [0, 1, 3, 4, 5, 6, 7, 8], [0, 1, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2], [0, 1, 2, 9], [0, 1, 2, 8], [0, 1, 2, 8, 9], [0, 1, 2, 7], [0, 1, 2, 7, 9], [0, 1, 2, 7, 8], [0, 1, 2, 7, 8, 9], [0, 1, 2, 6], [0, 1, 2, 6, 9], [0, 1, 2, 6, 8], [0, 1, 2, 6, 8, 9], [0, 1, 2, 6, 7], [0, 1, 2, 6, 7, 9], [0, 1, 2, 6, 7, 8], [0, 1, 2, 6, 7, 8, 9], [0, 1, 2, 5], [0, 1, 2, 5, 9], [0, 1, 2, 5, 8], [0, 1, 2, 5, 8, 9], [0, 1, 2, 5, 7], [0, 1, 2, 5, 7, 9], [0, 1, 2, 5, 7, 8], [0, 1, 2, 5, 7, 8, 9], [0, 1, 2, 5, 6], [0, 1, 2, 5, 6, 9], [0, 1, 2, 5, 6, 8], [0, 1, 2, 5, 6, 8, 9], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 8], [0, 1, 2, 5, 6, 7, 8, 9], [0, 1, 2, 4], [0, 1, 2, 4, 9], [0, 1, 2, 4, 8], [0, 1, 2, 4, 8, 9], [0, 1, 2, 4, 7], [0, 1, 2, 4, 7, 9], [0, 1, 2, 4, 7, 8], [0, 1, 2, 4, 7, 8, 9], [0, 1, 2, 4, 6], [0, 1, 2, 4, 6, 9], [0, 1, 2, 4, 6, 8], [0, 1, 2, 4, 6, 8, 9], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6, 7, 9], [0, 1, 2, 4, 6, 7, 8], [0, 1, 2, 4, 6, 7, 8, 9], [0, 1, 2, 4, 5], [0, 1, 2, 4, 5, 9], [0, 1, 2, 4, 5, 8], [0, 1, 2, 4, 5, 8, 9], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5, 7, 9], [0, 1, 2, 4, 5, 7, 8], [0, 1, 2, 4, 5, 7, 8, 9], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5, 6, 9], [0, 1, 2, 4, 5, 6, 8], [0, 1, 2, 4, 5, 6, 8, 9], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6, 7, 9], [0, 1, 2, 4, 5, 6, 7, 8], [0, 1, 2, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3], [0, 1, 2, 3, 9], [0, 1, 2, 3, 8], [0, 1, 2, 3, 8, 9], [0, 1, 2, 3, 7], [0, 1, 2, 3, 7, 9], [0, 1, 2, 3, 7, 8], [0, 1, 2, 3, 7, 8, 9], [0, 1, 2, 3, 6], [0, 1, 2, 3, 6, 9], [0, 1, 2, 3, 6, 8], [0, 1, 2, 3, 6, 8, 9], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6, 7, 9], [0, 1, 2, 3, 6, 7, 8], [0, 1, 2, 3, 6, 7, 8, 9], [0, 1, 2, 3, 5], [0, 1, 2, 3, 5, 9], [0, 1, 2, 3, 5, 8], [0, 1, 2, 3, 5, 8, 9], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5, 7, 9], [0, 1, 2, 3, 5, 7, 8], [0, 1, 2, 3, 5, 7, 8, 9], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 6, 9], [0, 1, 2, 3, 5, 6, 8], [0, 1, 2, 3, 5, 6, 8, 9], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6, 7, 9], [0, 1, 2, 3, 5, 6, 7, 8], [0, 1, 2, 3, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 9], [0, 1, 2, 3, 4, 8], [0, 1, 2, 3, 4, 8, 9], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4, 7, 9], [0, 1, 2, 3, 4, 7, 8], [0, 1, 2, 3, 4, 7, 8, 9], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 6, 9], [0, 1, 2, 3, 4, 6, 8], [0, 1, 2, 3, 4, 6, 8, 9], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6, 7, 9], [0, 1, 2, 3, 4, 6, 7, 8], [0, 1, 2, 3, 4, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5, 9], [0, 1, 2, 3, 4, 5, 8], [0, 1, 2, 3, 4, 5, 8, 9], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7, 9], [0, 1, 2, 3, 4, 5, 7, 8], [0, 1, 2, 3, 4, 5, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6, 9], [0, 1, 2, 3, 4, 5, 6, 8], [0, 1, 2, 3, 4, 5, 6, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 7, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(nums=[-3, 1, 4, -2, 5, -6, 7, -8, 9, -10]), [[], [-10], [9], [9, -10], [-8], [-8, -10], [-8, 9], [-8, 9, -10], [7], [7, -10], [7, 9], [7, 9, -10], [7, -8], [7, -8, -10], [7, -8, 9], [7, -8, 9, -10], [-6], [-6, -10], [-6, 9], [-6, 9, -10], [-6, -8], [-6, -8, -10], [-6, -8, 9], [-6, -8, 9, -10], [-6, 7], [-6, 7, -10], [-6, 7, 9], [-6, 7, 9, -10], [-6, 7, -8], [-6, 7, -8, -10], [-6, 7, -8, 9], [-6, 7, -8, 9, -10], [5], [5, -10], [5, 9], [5, 9, -10], [5, -8], [5, -8, -10], [5, -8, 9], [5, -8, 9, -10], [5, 7], [5, 7, -10], [5, 7, 9], [5, 7, 9, -10], [5, 7, -8], [5, 7, -8, -10], [5, 7, -8, 9], [5, 7, -8, 9, -10], [5, -6], [5, -6, -10], [5, -6, 9], [5, -6, 9, -10], [5, -6, -8], [5, -6, -8, -10], [5, -6, -8, 9], [5, -6, -8, 9, -10], [5, -6, 7], [5, -6, 7, -10], [5, -6, 7, 9], [5, -6, 7, 9, -10], [5, -6, 7, -8], [5, -6, 7, -8, -10], [5, -6, 7, -8, 9], [5, -6, 7, -8, 9, -10], [-2], [-2, -10], [-2, 9], [-2, 9, -10], [-2, -8], [-2, -8, -10], [-2, -8, 9], [-2, -8, 9, -10], [-2, 7], [-2, 7, -10], [-2, 7, 9], [-2, 7, 9, -10], [-2, 7, -8], [-2, 7, -8, -10], [-2, 7, -8, 9], [-2, 7, -8, 9, -10], [-2, -6], [-2, -6, -10], [-2, -6, 9], [-2, -6, 9, -10], [-2, -6, -8], [-2, -6, -8, -10], [-2, -6, -8, 9], [-2, -6, -8, 9, -10], [-2, -6, 7], [-2, -6, 7, -10], [-2, -6, 7, 9], [-2, -6, 7, 9, -10], [-2, -6, 7, -8], [-2, -6, 7, -8, -10], [-2, -6, 7, -8, 9], [-2, -6, 7, -8, 9, -10], [-2, 5], [-2, 5, -10], [-2, 5, 9], [-2, 5, 9, -10], [-2, 5, -8], [-2, 5, -8, -10], [-2, 5, -8, 9], [-2, 5, -8, 9, -10], [-2, 5, 7], [-2, 5, 7, -10], [-2, 5, 7, 9], [-2, 5, 7, 9, -10], [-2, 5, 7, -8], [-2, 5, 7, -8, -10], [-2, 5, 7, -8, 9], [-2, 5, 7, -8, 9, -10], [-2, 5, -6], [-2, 5, -6, -10], [-2, 5, -6, 9], [-2, 5, -6, 9, -10], [-2, 5, -6, -8], [-2, 5, -6, -8, -10], [-2, 5, -6, -8, 9], [-2, 5, -6, -8, 9, -10], [-2, 5, -6, 7], [-2, 5, -6, 7, -10], [-2, 5, -6, 7, 9], [-2, 5, -6, 7, 9, -10], [-2, 5, -6, 7, -8], [-2, 5, -6, 7, -8, -10], [-2, 5, -6, 7, -8, 9], [-2, 5, -6, 7, -8, 9, -10], [4], [4, -10], [4, 9], [4, 9, -10], [4, -8], [4, -8, -10], [4, -8, 9], [4, -8, 9, -10], [4, 7], [4, 7, -10], [4, 7, 9], [4, 7, 9, -10], [4, 7, -8], [4, 7, -8, -10], [4, 7, -8, 9], [4, 7, -8, 9, -10], [4, -6], [4, -6, -10], [4, -6, 9], [4, -6, 9, -10], [4, -6, -8], [4, -6, -8, -10], [4, -6, -8, 9], [4, -6, -8, 9, -10], [4, -6, 7], [4, -6, 7, -10], [4, -6, 7, 9], [4, -6, 7, 9, -10], [4, -6, 7, -8], [4, -6, 7, -8, -10], [4, -6, 7, -8, 9], [4, -6, 7, -8, 9, -10], [4, 5], [4, 5, -10], [4, 5, 9], [4, 5, 9, -10], [4, 5, -8], [4, 5, -8, -10], [4, 5, -8, 9], [4, 5, -8, 9, -10], [4, 5, 7], [4, 5, 7, -10], [4, 5, 7, 9], [4, 5, 7, 9, -10], [4, 5, 7, -8], [4, 5, 7, -8, -10], [4, 5, 7, -8, 9], [4, 5, 7, -8, 9, -10], [4, 5, -6], [4, 5, -6, -10], [4, 5, -6, 9], [4, 5, -6, 9, -10], [4, 5, -6, -8], [4, 5, -6, -8, -10], [4, 5, -6, -8, 9], [4, 5, -6, -8, 9, -10], [4, 5, -6, 7], [4, 5, -6, 7, -10], [4, 5, -6, 7, 9], [4, 5, -6, 7, 9, -10], [4, 5, -6, 7, -8], [4, 5, -6, 7, -8, -10], [4, 5, -6, 7, -8, 9], [4, 5, -6, 7, -8, 9, -10], [4, -2], [4, -2, -10], [4, -2, 9], [4, -2, 9, -10], [4, -2, -8], [4, -2, -8, -10], [4, -2, -8, 9], [4, -2, -8, 9, -10], [4, -2, 7], [4, -2, 7, -10], [4, -2, 7, 9], [4, -2, 7, 9, -10], [4, -2, 7, -8], [4, -2, 7, -8, -10], [4, -2, 7, -8, 9], [4, -2, 7, -8, 9, -10], [4, -2, -6], [4, -2, -6, -10], [4, -2, -6, 9], [4, -2, -6, 9, -10], [4, -2, -6, -8], [4, -2, -6, -8, -10], [4, -2, -6, -8, 9], [4, -2, -6, -8, 9, -10], [4, -2, -6, 7], [4, -2, -6, 7, -10], [4, -2, -6, 7, 9], [4, -2, -6, 7, 9, -10], [4, -2, -6, 7, -8], [4, -2, -6, 7, -8, -10], [4, -2, -6, 7, -8, 9], [4, -2, -6, 7, -8, 9, -10], [4, -2, 5], [4, -2, 5, -10], [4, -2, 5, 9], [4, -2, 5, 9, -10], [4, -2, 5, -8], [4, -2, 5, -8, -10], [4, -2, 5, -8, 9], [4, -2, 5, -8, 9, -10], [4, -2, 5, 7], [4, -2, 5, 7, -10], [4, -2, 5, 7, 9], [4, -2, 5, 7, 9, -10], [4, -2, 5, 7, -8], [4, -2, 5, 7, -8, -10], [4, -2, 5, 7, -8, 9], [4, -2, 5, 7, -8, 9, -10], [4, -2, 5, -6], [4, -2, 5, -6, -10], [4, -2, 5, -6, 9], [4, -2, 5, -6, 9, -10], [4, -2, 5, -6, -8], [4, -2, 5, -6, -8, -10], [4, -2, 5, -6, -8, 9], [4, -2, 5, -6, -8, 9, -10], [4, -2, 5, -6, 7], [4, -2, 5, -6, 7, -10], [4, -2, 5, -6, 7, 9], [4, -2, 5, -6, 7, 9, -10], [4, -2, 5, -6, 7, -8], [4, -2, 5, -6, 7, -8, -10], [4, -2, 5, -6, 7, -8, 9], [4, -2, 5, -6, 7, -8, 9, -10], [1], [1, -10], [1, 9], [1, 9, -10], [1, -8], [1, -8, -10], [1, -8, 9], [1, -8, 9, -10], [1, 7], [1, 7, -10], [1, 7, 9], [1, 7, 9, -10], [1, 7, -8], [1, 7, -8, -10], [1, 7, -8, 9], [1, 7, -8, 9, -10], [1, -6], [1, -6, -10], [1, -6, 9], [1, -6, 9, -10], [1, -6, -8], [1, -6, -8, -10], [1, -6, -8, 9], [1, -6, -8, 9, -10], [1, -6, 7], [1, -6, 7, -10], [1, -6, 7, 9], [1, -6, 7, 9, -10], [1, -6, 7, -8], [1, -6, 7, -8, -10], [1, -6, 7, -8, 9], [1, -6, 7, -8, 9, -10], [1, 5], [1, 5, -10], [1, 5, 9], [1, 5, 9, -10], [1, 5, -8], [1, 5, -8, -10], [1, 5, -8, 9], [1, 5, -8, 9, -10], [1, 5, 7], [1, 5, 7, -10], [1, 5, 7, 9], [1, 5, 7, 9, -10], [1, 5, 7, -8], [1, 5, 7, -8, -10], [1, 5, 7, -8, 9], [1, 5, 7, -8, 9, -10], [1, 5, -6], [1, 5, -6, -10], [1, 5, -6, 9], [1, 5, -6, 9, -10], [1, 5, -6, -8], [1, 5, -6, -8, -10], [1, 5, -6, -8, 9], [1, 5, -6, -8, 9, -10], [1, 5, -6, 7], [1, 5, -6, 7, -10], [1, 5, -6, 7, 9], [1, 5, -6, 7, 9, -10], [1, 5, -6, 7, -8], [1, 5, -6, 7, -8, -10], [1, 5, -6, 7, -8, 9], [1, 5, -6, 7, -8, 9, -10], [1, -2], [1, -2, -10], [1, -2, 9], [1, -2, 9, -10], [1, -2, -8], [1, -2, -8, -10], [1, -2, -8, 9], [1, -2, -8, 9, -10], [1, -2, 7], [1, -2, 7, -10], [1, -2, 7, 9], [1, -2, 7, 9, -10], [1, -2, 7, -8], [1, -2, 7, -8, -10], [1, -2, 7, -8, 9], [1, -2, 7, -8, 9, -10], [1, -2, -6], [1, -2, -6, -10], [1, -2, -6, 9], [1, -2, -6, 9, -10], [1, -2, -6, -8], [1, -2, -6, -8, -10], [1, -2, -6, -8, 9], [1, -2, -6, -8, 9, -10], [1, -2, -6, 7], [1, -2, -6, 7, -10], [1, -2, -6, 7, 9], [1, -2, -6, 7, 9, -10], [1, -2, -6, 7, -8], [1, -2, -6, 7, -8, -10], [1, -2, -6, 7, -8, 9], [1, -2, -6, 7, -8, 9, -10], [1, -2, 5], [1, -2, 5, -10], [1, -2, 5, 9], [1, -2, 5, 9, -10], [1, -2, 5, -8], [1, -2, 5, -8, -10], [1, -2, 5, -8, 9], [1, -2, 5, -8, 9, -10], [1, -2, 5, 7], [1, -2, 5, 7, -10], [1, -2, 5, 7, 9], [1, -2, 5, 7, 9, -10], [1, -2, 5, 7, -8], [1, -2, 5, 7, -8, -10], [1, -2, 5, 7, -8, 9], [1, -2, 5, 7, -8, 9, -10], [1, -2, 5, -6], [1, -2, 5, -6, -10], [1, -2, 5, -6, 9], [1, -2, 5, -6, 9, -10], [1, -2, 5, -6, -8], [1, -2, 5, -6, -8, -10], [1, -2, 5, -6, -8, 9], [1, -2, 5, -6, -8, 9, -10], [1, -2, 5, -6, 7], [1, -2, 5, -6, 7, -10], [1, -2, 5, -6, 7, 9], [1, -2, 5, -6, 7, 9, -10], [1, -2, 5, -6, 7, -8], [1, -2, 5, -6, 7, -8, -10], [1, -2, 5, -6, 7, -8, 9], [1, -2, 5, -6, 7, -8, 9, -10], [1, 4], [1, 4, -10], [1, 4, 9], [1, 4, 9, -10], [1, 4, -8], [1, 4, -8, -10], [1, 4, -8, 9], [1, 4, -8, 9, -10], [1, 4, 7], [1, 4, 7, -10], [1, 4, 7, 9], [1, 4, 7, 9, -10], [1, 4, 7, -8], [1, 4, 7, -8, -10], [1, 4, 7, -8, 9], [1, 4, 7, -8, 9, -10], [1, 4, -6], [1, 4, -6, -10], [1, 4, -6, 9], [1, 4, -6, 9, -10], [1, 4, -6, -8], [1, 4, -6, -8, -10], [1, 4, -6, -8, 9], [1, 4, -6, -8, 9, -10], [1, 4, -6, 7], [1, 4, -6, 7, -10], [1, 4, -6, 7, 9], [1, 4, -6, 7, 9, -10], [1, 4, -6, 7, -8], [1, 4, -6, 7, -8, -10], [1, 4, -6, 7, -8, 9], [1, 4, -6, 7, -8, 9, -10], [1, 4, 5], [1, 4, 5, -10], [1, 4, 5, 9], [1, 4, 5, 9, -10], [1, 4, 5, -8], [1, 4, 5, -8, -10], [1, 4, 5, -8, 9], [1, 4, 5, -8, 9, -10], [1, 4, 5, 7], [1, 4, 5, 7, -10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 9, -10], [1, 4, 5, 7, -8], [1, 4, 5, 7, -8, -10], [1, 4, 5, 7, -8, 9], [1, 4, 5, 7, -8, 9, -10], [1, 4, 5, -6], [1, 4, 5, -6, -10], [1, 4, 5, -6, 9], [1, 4, 5, -6, 9, -10], [1, 4, 5, -6, -8], [1, 4, 5, -6, -8, -10], [1, 4, 5, -6, -8, 9], [1, 4, 5, -6, -8, 9, -10], [1, 4, 5, -6, 7], [1, 4, 5, -6, 7, -10], [1, 4, 5, -6, 7, 9], [1, 4, 5, -6, 7, 9, -10], [1, 4, 5, -6, 7, -8], [1, 4, 5, -6, 7, -8, -10], [1, 4, 5, -6, 7, -8, 9], [1, 4, 5, -6, 7, -8, 9, -10], [1, 4, -2], [1, 4, -2, -10], [1, 4, -2, 9], [1, 4, -2, 9, -10], [1, 4, -2, -8], [1, 4, -2, -8, -10], [1, 4, -2, -8, 9], [1, 4, -2, -8, 9, -10], [1, 4, -2, 7], [1, 4, -2, 7, -10], [1, 4, -2, 7, 9], [1, 4, -2, 7, 9, -10], [1, 4, -2, 7, -8], [1, 4, -2, 7, -8, -10], [1, 4, -2, 7, -8, 9], [1, 4, -2, 7, -8, 9, -10], [1, 4, -2, -6], [1, 4, -2, -6, -10], [1, 4, -2, -6, 9], [1, 4, -2, -6, 9, -10], [1, 4, -2, -6, -8], [1, 4, -2, -6, -8, -10], [1, 4, -2, -6, -8, 9], [1, 4, -2, -6, -8, 9, -10], [1, 4, -2, -6, 7], [1, 4, -2, -6, 7, -10], [1, 4, -2, -6, 7, 9], [1, 4, -2, -6, 7, 9, -10], [1, 4, -2, -6, 7, -8], [1, 4, -2, -6, 7, -8, -10], [1, 4, -2, -6, 7, -8, 9], [1, 4, -2, -6, 7, -8, 9, -10], [1, 4, -2, 5], [1, 4, -2, 5, -10], [1, 4, -2, 5, 9], [1, 4, -2, 5, 9, -10], [1, 4, -2, 5, -8], [1, 4, -2, 5, -8, -10], [1, 4, -2, 5, -8, 9], [1, 4, -2, 5, -8, 9, -10], [1, 4, -2, 5, 7], [1, 4, -2, 5, 7, -10], [1, 4, -2, 5, 7, 9], [1, 4, -2, 5, 7, 9, -10], [1, 4, -2, 5, 7, -8], [1, 4, -2, 5, 7, -8, -10], [1, 4, -2, 5, 7, -8, 9], [1, 4, -2, 5, 7, -8, 9, -10], [1, 4, -2, 5, -6], [1, 4, -2, 5, -6, -10], [1, 4, -2, 5, -6, 9], [1, 4, -2, 5, -6, 9, -10], [1, 4, -2, 5, -6, -8], [1, 4, -2, 5, -6, -8, -10], [1, 4, -2, 5, -6, -8, 9], [1, 4, -2, 5, -6, -8, 9, -10], [1, 4, -2, 5, -6, 7], [1, 4, -2, 5, -6, 7, -10], [1, 4, -2, 5, -6, 7, 9], [1, 4, -2, 5, -6, 7, 9, -10], [1, 4, -2, 5, -6, 7, -8], [1, 4, -2, 5, -6, 7, -8, -10], [1, 4, -2, 5, -6, 7, -8, 9], [1, 4, -2, 5, -6, 7, -8, 9, -10], [-3], [-3, -10], [-3, 9], [-3, 9, -10], [-3, -8], [-3, -8, -10], [-3, -8, 9], [-3, -8, 9, -10], [-3, 7], [-3, 7, -10], [-3, 7, 9], [-3, 7, 9, -10], [-3, 7, -8], [-3, 7, -8, -10], [-3, 7, -8, 9], [-3, 7, -8, 9, -10], [-3, -6], [-3, -6, -10], [-3, -6, 9], [-3, -6, 9, -10], [-3, -6, -8], [-3, -6, -8, -10], [-3, -6, -8, 9], [-3, -6, -8, 9, -10], [-3, -6, 7], [-3, -6, 7, -10], [-3, -6, 7, 9], [-3, -6, 7, 9, -10], [-3, -6, 7, -8], [-3, -6, 7, -8, -10], [-3, -6, 7, -8, 9], [-3, -6, 7, -8, 9, -10], [-3, 5], [-3, 5, -10], [-3, 5, 9], [-3, 5, 9, -10], [-3, 5, -8], [-3, 5, -8, -10], [-3, 5, -8, 9], [-3, 5, -8, 9, -10], [-3, 5, 7], [-3, 5, 7, -10], [-3, 5, 7, 9], [-3, 5, 7, 9, -10], [-3, 5, 7, -8], [-3, 5, 7, -8, -10], [-3, 5, 7, -8, 9], [-3, 5, 7, -8, 9, -10], [-3, 5, -6], [-3, 5, -6, -10], [-3, 5, -6, 9], [-3, 5, -6, 9, -10], [-3, 5, -6, -8], [-3, 5, -6, -8, -10], [-3, 5, -6, -8, 9], [-3, 5, -6, -8, 9, -10], [-3, 5, -6, 7], [-3, 5, -6, 7, -10], [-3, 5, -6, 7, 9], [-3, 5, -6, 7, 9, -10], [-3, 5, -6, 7, -8], [-3, 5, -6, 7, -8, -10], [-3, 5, -6, 7, -8, 9], [-3, 5, -6, 7, -8, 9, -10], [-3, -2], [-3, -2, -10], [-3, -2, 9], [-3, -2, 9, -10], [-3, -2, -8], [-3, -2, -8, -10], [-3, -2, -8, 9], [-3, -2, -8, 9, -10], [-3, -2, 7], [-3, -2, 7, -10], [-3, -2, 7, 9], [-3, -2, 7, 9, -10], [-3, -2, 7, -8], [-3, -2, 7, -8, -10], [-3, -2, 7, -8, 9], [-3, -2, 7, -8, 9, -10], [-3, -2, -6], [-3, -2, -6, -10], [-3, -2, -6, 9], [-3, -2, -6, 9, -10], [-3, -2, -6, -8], [-3, -2, -6, -8, -10], [-3, -2, -6, -8, 9], [-3, -2, -6, -8, 9, -10], [-3, -2, -6, 7], [-3, -2, -6, 7, -10], [-3, -2, -6, 7, 9], [-3, -2, -6, 7, 9, -10], [-3, -2, -6, 7, -8], [-3, -2, -6, 7, -8, -10], [-3, -2, -6, 7, -8, 9], [-3, -2, -6, 7, -8, 9, -10], [-3, -2, 5], [-3, -2, 5, -10], [-3, -2, 5, 9], [-3, -2, 5, 9, -10], [-3, -2, 5, -8], [-3, -2, 5, -8, -10], [-3, -2, 5, -8, 9], [-3, -2, 5, -8, 9, -10], [-3, -2, 5, 7], [-3, -2, 5, 7, -10], [-3, -2, 5, 7, 9], [-3, -2, 5, 7, 9, -10], [-3, -2, 5, 7, -8], [-3, -2, 5, 7, -8, -10], [-3, -2, 5, 7, -8, 9], [-3, -2, 5, 7, -8, 9, -10], [-3, -2, 5, -6], [-3, -2, 5, -6, -10], [-3, -2, 5, -6, 9], [-3, -2, 5, -6, 9, -10], [-3, -2, 5, -6, -8], [-3, -2, 5, -6, -8, -10], [-3, -2, 5, -6, -8, 9], [-3, -2, 5, -6, -8, 9, -10], [-3, -2, 5, -6, 7], [-3, -2, 5, -6, 7, -10], [-3, -2, 5, -6, 7, 9], [-3, -2, 5, -6, 7, 9, -10], [-3, -2, 5, -6, 7, -8], [-3, -2, 5, -6, 7, -8, -10], [-3, -2, 5, -6, 7, -8, 9], [-3, -2, 5, -6, 7, -8, 9, -10], [-3, 4], [-3, 4, -10], [-3, 4, 9], [-3, 4, 9, -10], [-3, 4, -8], [-3, 4, -8, -10], [-3, 4, -8, 9], [-3, 4, -8, 9, -10], [-3, 4, 7], [-3, 4, 7, -10], [-3, 4, 7, 9], [-3, 4, 7, 9, -10], [-3, 4, 7, -8], [-3, 4, 7, -8, -10], [-3, 4, 7, -8, 9], [-3, 4, 7, -8, 9, -10], [-3, 4, -6], [-3, 4, -6, -10], [-3, 4, -6, 9], [-3, 4, -6, 9, -10], [-3, 4, -6, -8], [-3, 4, -6, -8, -10], [-3, 4, -6, -8, 9], [-3, 4, -6, -8, 9, -10], [-3, 4, -6, 7], [-3, 4, -6, 7, -10], [-3, 4, -6, 7, 9], [-3, 4, -6, 7, 9, -10], [-3, 4, -6, 7, -8], [-3, 4, -6, 7, -8, -10], [-3, 4, -6, 7, -8, 9], [-3, 4, -6, 7, -8, 9, -10], [-3, 4, 5], [-3, 4, 5, -10], [-3, 4, 5, 9], [-3, 4, 5, 9, -10], [-3, 4, 5, -8], [-3, 4, 5, -8, -10], [-3, 4, 5, -8, 9], [-3, 4, 5, -8, 9, -10], [-3, 4, 5, 7], [-3, 4, 5, 7, -10], [-3, 4, 5, 7, 9], [-3, 4, 5, 7, 9, -10], [-3, 4, 5, 7, -8], [-3, 4, 5, 7, -8, -10], [-3, 4, 5, 7, -8, 9], [-3, 4, 5, 7, -8, 9, -10], [-3, 4, 5, -6], [-3, 4, 5, -6, -10], [-3, 4, 5, -6, 9], [-3, 4, 5, -6, 9, -10], [-3, 4, 5, -6, -8], [-3, 4, 5, -6, -8, -10], [-3, 4, 5, -6, -8, 9], [-3, 4, 5, -6, -8, 9, -10], [-3, 4, 5, -6, 7], [-3, 4, 5, -6, 7, -10], [-3, 4, 5, -6, 7, 9], [-3, 4, 5, -6, 7, 9, -10], [-3, 4, 5, -6, 7, -8], [-3, 4, 5, -6, 7, -8, -10], [-3, 4, 5, -6, 7, -8, 9], [-3, 4, 5, -6, 7, -8, 9, -10], [-3, 4, -2], [-3, 4, -2, -10], [-3, 4, -2, 9], [-3, 4, -2, 9, -10], [-3, 4, -2, -8], [-3, 4, -2, -8, -10], [-3, 4, -2, -8, 9], [-3, 4, -2, -8, 9, -10], [-3, 4, -2, 7], [-3, 4, -2, 7, -10], [-3, 4, -2, 7, 9], [-3, 4, -2, 7, 9, -10], [-3, 4, -2, 7, -8], [-3, 4, -2, 7, -8, -10], [-3, 4, -2, 7, -8, 9], [-3, 4, -2, 7, -8, 9, -10], [-3, 4, -2, -6], [-3, 4, -2, -6, -10], [-3, 4, -2, -6, 9], [-3, 4, -2, -6, 9, -10], [-3, 4, -2, -6, -8], [-3, 4, -2, -6, -8, -10], [-3, 4, -2, -6, -8, 9], [-3, 4, -2, -6, -8, 9, -10], [-3, 4, -2, -6, 7], [-3, 4, -2, -6, 7, -10], [-3, 4, -2, -6, 7, 9], [-3, 4, -2, -6, 7, 9, -10], [-3, 4, -2, -6, 7, -8], [-3, 4, -2, -6, 7, -8, -10], [-3, 4, -2, -6, 7, -8, 9], [-3, 4, -2, -6, 7, -8, 9, -10], [-3, 4, -2, 5], [-3, 4, -2, 5, -10], [-3, 4, -2, 5, 9], [-3, 4, -2, 5, 9, -10], [-3, 4, -2, 5, -8], [-3, 4, -2, 5, -8, -10], [-3, 4, -2, 5, -8, 9], [-3, 4, -2, 5, -8, 9, -10], [-3, 4, -2, 5, 7], [-3, 4, -2, 5, 7, -10], [-3, 4, -2, 5, 7, 9], [-3, 4, -2, 5, 7, 9, -10], [-3, 4, -2, 5, 7, -8], [-3, 4, -2, 5, 7, -8, -10], [-3, 4, -2, 5, 7, -8, 9], [-3, 4, -2, 5, 7, -8, 9, -10], [-3, 4, -2, 5, -6], [-3, 4, -2, 5, -6, -10], [-3, 4, -2, 5, -6, 9], [-3, 4, -2, 5, -6, 9, -10], [-3, 4, -2, 5, -6, -8], [-3, 4, -2, 5, -6, -8, -10], [-3, 4, -2, 5, -6, -8, 9], [-3, 4, -2, 5, -6, -8, 9, -10], [-3, 4, -2, 5, -6, 7], [-3, 4, -2, 5, -6, 7, -10], [-3, 4, -2, 5, -6, 7, 9], [-3, 4, -2, 5, -6, 7, 9, -10], [-3, 4, -2, 5, -6, 7, -8], [-3, 4, -2, 5, -6, 7, -8, -10], [-3, 4, -2, 5, -6, 7, -8, 9], [-3, 4, -2, 5, -6, 7, -8, 9, -10], [-3, 1], [-3, 1, -10], [-3, 1, 9], [-3, 1, 9, -10], [-3, 1, -8], [-3, 1, -8, -10], [-3, 1, -8, 9], [-3, 1, -8, 9, -10], [-3, 1, 7], [-3, 1, 7, -10], [-3, 1, 7, 9], [-3, 1, 7, 9, -10], [-3, 1, 7, -8], [-3, 1, 7, -8, -10], [-3, 1, 7, -8, 9], [-3, 1, 7, -8, 9, -10], [-3, 1, -6], [-3, 1, -6, -10], [-3, 1, -6, 9], [-3, 1, -6, 9, -10], [-3, 1, -6, -8], [-3, 1, -6, -8, -10], [-3, 1, -6, -8, 9], [-3, 1, -6, -8, 9, -10], [-3, 1, -6, 7], [-3, 1, -6, 7, -10], [-3, 1, -6, 7, 9], [-3, 1, -6, 7, 9, -10], [-3, 1, -6, 7, -8], [-3, 1, -6, 7, -8, -10], [-3, 1, -6, 7, -8, 9], [-3, 1, -6, 7, -8, 9, -10], [-3, 1, 5], [-3, 1, 5, -10], [-3, 1, 5, 9], [-3, 1, 5, 9, -10], [-3, 1, 5, -8], [-3, 1, 5, -8, -10], [-3, 1, 5, -8, 9], [-3, 1, 5, -8, 9, -10], [-3, 1, 5, 7], [-3, 1, 5, 7, -10], [-3, 1, 5, 7, 9], [-3, 1, 5, 7, 9, -10], [-3, 1, 5, 7, -8], [-3, 1, 5, 7, -8, -10], [-3, 1, 5, 7, -8, 9], [-3, 1, 5, 7, -8, 9, -10], [-3, 1, 5, -6], [-3, 1, 5, -6, -10], [-3, 1, 5, -6, 9], [-3, 1, 5, -6, 9, -10], [-3, 1, 5, -6, -8], [-3, 1, 5, -6, -8, -10], [-3, 1, 5, -6, -8, 9], [-3, 1, 5, -6, -8, 9, -10], [-3, 1, 5, -6, 7], [-3, 1, 5, -6, 7, -10], [-3, 1, 5, -6, 7, 9], [-3, 1, 5, -6, 7, 9, -10], [-3, 1, 5, -6, 7, -8], [-3, 1, 5, -6, 7, -8, -10], [-3, 1, 5, -6, 7, -8, 9], [-3, 1, 5, -6, 7, -8, 9, -10], [-3, 1, -2], [-3, 1, -2, -10], [-3, 1, -2, 9], [-3, 1, -2, 9, -10], [-3, 1, -2, -8], [-3, 1, -2, -8, -10], [-3, 1, -2, -8, 9], [-3, 1, -2, -8, 9, -10], [-3, 1, -2, 7], [-3, 1, -2, 7, -10], [-3, 1, -2, 7, 9], [-3, 1, -2, 7, 9, -10], [-3, 1, -2, 7, -8], [-3, 1, -2, 7, -8, -10], [-3, 1, -2, 7, -8, 9], [-3, 1, -2, 7, -8, 9, -10], [-3, 1, -2, -6], [-3, 1, -2, -6, -10], [-3, 1, -2, -6, 9], [-3, 1, -2, -6, 9, -10], [-3, 1, -2, -6, -8], [-3, 1, -2, -6, -8, -10], [-3, 1, -2, -6, -8, 9], [-3, 1, -2, -6, -8, 9, -10], [-3, 1, -2, -6, 7], [-3, 1, -2, -6, 7, -10], [-3, 1, -2, -6, 7, 9], [-3, 1, -2, -6, 7, 9, -10], [-3, 1, -2, -6, 7, -8], [-3, 1, -2, -6, 7, -8, -10], [-3, 1, -2, -6, 7, -8, 9], [-3, 1, -2, -6, 7, -8, 9, -10], [-3, 1, -2, 5], [-3, 1, -2, 5, -10], [-3, 1, -2, 5, 9], [-3, 1, -2, 5, 9, -10], [-3, 1, -2, 5, -8], [-3, 1, -2, 5, -8, -10], [-3, 1, -2, 5, -8, 9], [-3, 1, -2, 5, -8, 9, -10], [-3, 1, -2, 5, 7], [-3, 1, -2, 5, 7, -10], [-3, 1, -2, 5, 7, 9], [-3, 1, -2, 5, 7, 9, -10], [-3, 1, -2, 5, 7, -8], [-3, 1, -2, 5, 7, -8, -10], [-3, 1, -2, 5, 7, -8, 9], [-3, 1, -2, 5, 7, -8, 9, -10], [-3, 1, -2, 5, -6], [-3, 1, -2, 5, -6, -10], [-3, 1, -2, 5, -6, 9], [-3, 1, -2, 5, -6, 9, -10], [-3, 1, -2, 5, -6, -8], [-3, 1, -2, 5, -6, -8, -10], [-3, 1, -2, 5, -6, -8, 9], [-3, 1, -2, 5, -6, -8, 9, -10], [-3, 1, -2, 5, -6, 7], [-3, 1, -2, 5, -6, 7, -10], [-3, 1, -2, 5, -6, 7, 9], [-3, 1, -2, 5, -6, 7, 9, -10], [-3, 1, -2, 5, -6, 7, -8], [-3, 1, -2, 5, -6, 7, -8, -10], [-3, 1, -2, 5, -6, 7, -8, 9], [-3, 1, -2, 5, -6, 7, -8, 9, -10], [-3, 1, 4], [-3, 1, 4, -10], [-3, 1, 4, 9], [-3, 1, 4, 9, -10], [-3, 1, 4, -8], [-3, 1, 4, -8, -10], [-3, 1, 4, -8, 9], [-3, 1, 4, -8, 9, -10], [-3, 1, 4, 7], [-3, 1, 4, 7, -10], [-3, 1, 4, 7, 9], [-3, 1, 4, 7, 9, -10], [-3, 1, 4, 7, -8], [-3, 1, 4, 7, -8, -10], [-3, 1, 4, 7, -8, 9], [-3, 1, 4, 7, -8, 9, -10], [-3, 1, 4, -6], [-3, 1, 4, -6, -10], [-3, 1, 4, -6, 9], [-3, 1, 4, -6, 9, -10], [-3, 1, 4, -6, -8], [-3, 1, 4, -6, -8, -10], [-3, 1, 4, -6, -8, 9], [-3, 1, 4, -6, -8, 9, -10], [-3, 1, 4, -6, 7], [-3, 1, 4, -6, 7, -10], [-3, 1, 4, -6, 7, 9], [-3, 1, 4, -6, 7, 9, -10], [-3, 1, 4, -6, 7, -8], [-3, 1, 4, -6, 7, -8, -10], [-3, 1, 4, -6, 7, -8, 9], [-3, 1, 4, -6, 7, -8, 9, -10], [-3, 1, 4, 5], [-3, 1, 4, 5, -10], [-3, 1, 4, 5, 9], [-3, 1, 4, 5, 9, -10], [-3, 1, 4, 5, -8], [-3, 1, 4, 5, -8, -10], [-3, 1, 4, 5, -8, 9], [-3, 1, 4, 5, -8, 9, -10], [-3, 1, 4, 5, 7], [-3, 1, 4, 5, 7, -10], [-3, 1, 4, 5, 7, 9], [-3, 1, 4, 5, 7, 9, -10], [-3, 1, 4, 5, 7, -8], [-3, 1, 4, 5, 7, -8, -10], [-3, 1, 4, 5, 7, -8, 9], [-3, 1, 4, 5, 7, -8, 9, -10], [-3, 1, 4, 5, -6], [-3, 1, 4, 5, -6, -10], [-3, 1, 4, 5, -6, 9], [-3, 1, 4, 5, -6, 9, -10], [-3, 1, 4, 5, -6, -8], [-3, 1, 4, 5, -6, -8, -10], [-3, 1, 4, 5, -6, -8, 9], [-3, 1, 4, 5, -6, -8, 9, -10], [-3, 1, 4, 5, -6, 7], [-3, 1, 4, 5, -6, 7, -10], [-3, 1, 4, 5, -6, 7, 9], [-3, 1, 4, 5, -6, 7, 9, -10], [-3, 1, 4, 5, -6, 7, -8], [-3, 1, 4, 5, -6, 7, -8, -10], [-3, 1, 4, 5, -6, 7, -8, 9], [-3, 1, 4, 5, -6, 7, -8, 9, -10], [-3, 1, 4, -2], [-3, 1, 4, -2, -10], [-3, 1, 4, -2, 9], [-3, 1, 4, -2, 9, -10], [-3, 1, 4, -2, -8], [-3, 1, 4, -2, -8, -10], [-3, 1, 4, -2, -8, 9], [-3, 1, 4, -2, -8, 9, -10], [-3, 1, 4, -2, 7], [-3, 1, 4, -2, 7, -10], [-3, 1, 4, -2, 7, 9], [-3, 1, 4, -2, 7, 9, -10], [-3, 1, 4, -2, 7, -8], [-3, 1, 4, -2, 7, -8, -10], [-3, 1, 4, -2, 7, -8, 9], [-3, 1, 4, -2, 7, -8, 9, -10], [-3, 1, 4, -2, -6], [-3, 1, 4, -2, -6, -10], [-3, 1, 4, -2, -6, 9], [-3, 1, 4, -2, -6, 9, -10], [-3, 1, 4, -2, -6, -8], [-3, 1, 4, -2, -6, -8, -10], [-3, 1, 4, -2, -6, -8, 9], [-3, 1, 4, -2, -6, -8, 9, -10], [-3, 1, 4, -2, -6, 7], [-3, 1, 4, -2, -6, 7, -10], [-3, 1, 4, -2, -6, 7, 9], [-3, 1, 4, -2, -6, 7, 9, -10], [-3, 1, 4, -2, -6, 7, -8], [-3, 1, 4, -2, -6, 7, -8, -10], [-3, 1, 4, -2, -6, 7, -8, 9], [-3, 1, 4, -2, -6, 7, -8, 9, -10], [-3, 1, 4, -2, 5], [-3, 1, 4, -2, 5, -10], [-3, 1, 4, -2, 5, 9], [-3, 1, 4, -2, 5, 9, -10], [-3, 1, 4, -2, 5, -8], [-3, 1, 4, -2, 5, -8, -10], [-3, 1, 4, -2, 5, -8, 9], [-3, 1, 4, -2, 5, -8, 9, -10], [-3, 1, 4, -2, 5, 7], [-3, 1, 4, -2, 5, 7, -10], [-3, 1, 4, -2, 5, 7, 9], [-3, 1, 4, -2, 5, 7, 9, -10], [-3, 1, 4, -2, 5, 7, -8], [-3, 1, 4, -2, 5, 7, -8, -10], [-3, 1, 4, -2, 5, 7, -8, 9], [-3, 1, 4, -2, 5, 7, -8, 9, -10], [-3, 1, 4, -2, 5, -6], [-3, 1, 4, -2, 5, -6, -10], [-3, 1, 4, -2, 5, -6, 9], [-3, 1, 4, -2, 5, -6, 9, -10], [-3, 1, 4, -2, 5, -6, -8], [-3, 1, 4, -2, 5, -6, -8, -10], [-3, 1, 4, -2, 5, -6, -8, 9], [-3, 1, 4, -2, 5, -6, -8, 9, -10], [-3, 1, 4, -2, 5, -6, 7], [-3, 1, 4, -2, 5, -6, 7, -10], [-3, 1, 4, -2, 5, -6, 7, 9], [-3, 1, 4, -2, 5, -6, 7, 9, -10], [-3, 1, 4, -2, 5, -6, 7, -8], [-3, 1, 4, -2, 5, -6, 7, -8, -10], [-3, 1, 4, -2, 5, -6, 7, -8, 9], [-3, 1, 4, -2, 5, -6, 7, -8, 9, -10]])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]), [[], [-10], [-9], [-9, -10], [-8], [-8, -10], [-8, -9], [-8, -9, -10], [-7], [-7, -10], [-7, -9], [-7, -9, -10], [-7, -8], [-7, -8, -10], [-7, -8, -9], [-7, -8, -9, -10], [-6], [-6, -10], [-6, -9], [-6, -9, -10], [-6, -8], [-6, -8, -10], [-6, -8, -9], [-6, -8, -9, -10], [-6, -7], [-6, -7, -10], [-6, -7, -9], [-6, -7, -9, -10], [-6, -7, -8], [-6, -7, -8, -10], [-6, -7, -8, -9], [-6, -7, -8, -9, -10], [-5], [-5, -10], [-5, -9], [-5, -9, -10], [-5, -8], [-5, -8, -10], [-5, -8, -9], [-5, -8, -9, -10], [-5, -7], [-5, -7, -10], [-5, -7, -9], [-5, -7, -9, -10], [-5, -7, -8], [-5, -7, -8, -10], [-5, -7, -8, -9], [-5, -7, -8, -9, -10], [-5, -6], [-5, -6, -10], [-5, -6, -9], [-5, -6, -9, -10], [-5, -6, -8], [-5, -6, -8, -10], [-5, -6, -8, -9], [-5, -6, -8, -9, -10], [-5, -6, -7], [-5, -6, -7, -10], [-5, -6, -7, -9], [-5, -6, -7, -9, -10], [-5, -6, -7, -8], [-5, -6, -7, -8, -10], [-5, -6, -7, -8, -9], [-5, -6, -7, -8, -9, -10], [-4], [-4, -10], [-4, -9], [-4, -9, -10], [-4, -8], [-4, -8, -10], [-4, -8, -9], [-4, -8, -9, -10], [-4, -7], [-4, -7, -10], [-4, -7, -9], [-4, -7, -9, -10], [-4, -7, -8], [-4, -7, -8, -10], [-4, -7, -8, -9], [-4, -7, -8, -9, -10], [-4, -6], [-4, -6, -10], [-4, -6, -9], [-4, -6, -9, -10], [-4, -6, -8], [-4, -6, -8, -10], [-4, -6, -8, -9], [-4, -6, -8, -9, -10], [-4, -6, -7], [-4, -6, -7, -10], [-4, -6, -7, -9], [-4, -6, -7, -9, -10], [-4, -6, -7, -8], [-4, -6, -7, -8, -10], [-4, -6, -7, -8, -9], [-4, -6, -7, -8, -9, -10], [-4, -5], [-4, -5, -10], [-4, -5, -9], [-4, -5, -9, -10], [-4, -5, -8], [-4, -5, -8, -10], [-4, -5, -8, -9], [-4, -5, -8, -9, -10], [-4, -5, -7], [-4, -5, -7, -10], [-4, -5, -7, -9], [-4, -5, -7, -9, -10], [-4, -5, -7, -8], [-4, -5, -7, -8, -10], [-4, -5, -7, -8, -9], [-4, -5, -7, -8, -9, -10], [-4, -5, -6], [-4, -5, -6, -10], [-4, -5, -6, -9], [-4, -5, -6, -9, -10], [-4, -5, -6, -8], [-4, -5, -6, -8, -10], [-4, -5, -6, -8, -9], [-4, -5, -6, -8, -9, -10], [-4, -5, -6, -7], [-4, -5, -6, -7, -10], [-4, -5, -6, -7, -9], [-4, -5, -6, -7, -9, -10], [-4, -5, -6, -7, -8], [-4, -5, -6, -7, -8, -10], [-4, -5, -6, -7, -8, -9], [-4, -5, -6, -7, -8, -9, -10], [-3], [-3, -10], [-3, -9], [-3, -9, -10], [-3, -8], [-3, -8, -10], [-3, -8, -9], [-3, -8, -9, -10], [-3, -7], [-3, -7, -10], [-3, -7, -9], [-3, -7, -9, -10], [-3, -7, -8], [-3, -7, -8, -10], [-3, -7, -8, -9], [-3, -7, -8, -9, -10], [-3, -6], [-3, -6, -10], [-3, -6, -9], [-3, -6, -9, -10], [-3, -6, -8], [-3, -6, -8, -10], [-3, -6, -8, -9], [-3, -6, -8, -9, -10], [-3, -6, -7], [-3, -6, -7, -10], [-3, -6, -7, -9], [-3, -6, -7, -9, -10], [-3, -6, -7, -8], [-3, -6, -7, -8, -10], [-3, -6, -7, -8, -9], [-3, -6, -7, -8, -9, -10], [-3, -5], [-3, -5, -10], [-3, -5, -9], [-3, -5, -9, -10], [-3, -5, -8], [-3, -5, -8, -10], [-3, -5, -8, -9], [-3, -5, -8, -9, -10], [-3, -5, -7], [-3, -5, -7, -10], [-3, -5, -7, -9], [-3, -5, -7, -9, -10], [-3, -5, -7, -8], [-3, -5, -7, -8, -10], [-3, -5, -7, -8, -9], [-3, -5, -7, -8, -9, -10], [-3, -5, -6], [-3, -5, -6, -10], [-3, -5, -6, -9], [-3, -5, -6, -9, -10], [-3, -5, -6, -8], [-3, -5, -6, -8, -10], [-3, -5, -6, -8, -9], [-3, -5, -6, -8, -9, -10], [-3, -5, -6, -7], [-3, -5, -6, -7, -10], [-3, -5, -6, -7, -9], [-3, -5, -6, -7, -9, -10], [-3, -5, -6, -7, -8], [-3, -5, -6, -7, -8, -10], [-3, -5, -6, -7, -8, -9], [-3, -5, -6, -7, -8, -9, -10], [-3, -4], [-3, -4, -10], [-3, -4, -9], [-3, -4, -9, -10], [-3, -4, -8], [-3, -4, -8, -10], [-3, -4, -8, -9], [-3, -4, -8, -9, -10], [-3, -4, -7], [-3, -4, -7, -10], [-3, -4, -7, -9], [-3, -4, -7, -9, -10], [-3, -4, -7, -8], [-3, -4, -7, -8, -10], [-3, -4, -7, -8, -9], [-3, -4, -7, -8, -9, -10], [-3, -4, -6], [-3, -4, -6, -10], [-3, -4, -6, -9], [-3, -4, -6, -9, -10], [-3, -4, -6, -8], [-3, -4, -6, -8, -10], [-3, -4, -6, -8, -9], [-3, -4, -6, -8, -9, -10], [-3, -4, -6, -7], [-3, -4, -6, -7, -10], [-3, -4, -6, -7, -9], [-3, -4, -6, -7, -9, -10], [-3, -4, -6, -7, -8], [-3, -4, -6, -7, -8, -10], [-3, -4, -6, -7, -8, -9], [-3, -4, -6, -7, -8, -9, -10], [-3, -4, -5], [-3, -4, -5, -10], [-3, -4, -5, -9], [-3, -4, -5, -9, -10], [-3, -4, -5, -8], [-3, -4, -5, -8, -10], [-3, -4, -5, -8, -9], [-3, -4, -5, -8, -9, -10], [-3, -4, -5, -7], [-3, -4, -5, -7, -10], [-3, -4, -5, -7, -9], [-3, -4, -5, -7, -9, -10], [-3, -4, -5, -7, -8], [-3, -4, -5, -7, -8, -10], [-3, -4, -5, -7, -8, -9], [-3, -4, -5, -7, -8, -9, -10], [-3, -4, -5, -6], [-3, -4, -5, -6, -10], [-3, -4, -5, -6, -9], [-3, -4, -5, -6, -9, -10], [-3, -4, -5, -6, -8], [-3, -4, -5, -6, -8, -10], [-3, -4, -5, -6, -8, -9], [-3, -4, -5, -6, -8, -9, -10], [-3, -4, -5, -6, -7], [-3, -4, -5, -6, -7, -10], [-3, -4, -5, -6, -7, -9], [-3, -4, -5, -6, -7, -9, -10], [-3, -4, -5, -6, -7, -8], [-3, -4, -5, -6, -7, -8, -10], [-3, -4, -5, -6, -7, -8, -9], [-3, -4, -5, -6, -7, -8, -9, -10], [-2], [-2, -10], [-2, -9], [-2, -9, -10], [-2, -8], [-2, -8, -10], [-2, -8, -9], [-2, -8, -9, -10], [-2, -7], [-2, -7, -10], [-2, -7, -9], [-2, -7, -9, -10], [-2, -7, -8], [-2, -7, -8, -10], [-2, -7, -8, -9], [-2, -7, -8, -9, -10], [-2, -6], [-2, -6, -10], [-2, -6, -9], [-2, -6, -9, -10], [-2, -6, -8], [-2, -6, -8, -10], [-2, -6, -8, -9], [-2, -6, -8, -9, -10], [-2, -6, -7], [-2, -6, -7, -10], [-2, -6, -7, -9], [-2, -6, -7, -9, -10], [-2, -6, -7, -8], [-2, -6, -7, -8, -10], [-2, -6, -7, -8, -9], [-2, -6, -7, -8, -9, -10], [-2, -5], [-2, -5, -10], [-2, -5, -9], [-2, -5, -9, -10], [-2, -5, -8], [-2, -5, -8, -10], [-2, -5, -8, -9], [-2, -5, -8, -9, -10], [-2, -5, -7], [-2, -5, -7, -10], [-2, -5, -7, -9], [-2, -5, -7, -9, -10], [-2, -5, -7, -8], [-2, -5, -7, -8, -10], [-2, -5, -7, -8, -9], [-2, -5, -7, -8, -9, -10], [-2, -5, -6], [-2, -5, -6, -10], [-2, -5, -6, -9], [-2, -5, -6, -9, -10], [-2, -5, -6, -8], [-2, -5, -6, -8, -10], [-2, -5, -6, -8, -9], [-2, -5, -6, -8, -9, -10], [-2, -5, -6, -7], [-2, -5, -6, -7, -10], [-2, -5, -6, -7, -9], [-2, -5, -6, -7, -9, -10], [-2, -5, -6, -7, -8], [-2, -5, -6, -7, -8, -10], [-2, -5, -6, -7, -8, -9], [-2, -5, -6, -7, -8, -9, -10], [-2, -4], [-2, -4, -10], [-2, -4, -9], [-2, -4, -9, -10], [-2, -4, -8], [-2, -4, -8, -10], [-2, -4, -8, -9], [-2, -4, -8, -9, -10], [-2, -4, -7], [-2, -4, -7, -10], [-2, -4, -7, -9], [-2, -4, -7, -9, -10], [-2, -4, -7, -8], [-2, -4, -7, -8, -10], [-2, -4, -7, -8, -9], [-2, -4, -7, -8, -9, -10], [-2, -4, -6], [-2, -4, -6, -10], [-2, -4, -6, -9], [-2, -4, -6, -9, -10], [-2, -4, -6, -8], [-2, -4, -6, -8, -10], [-2, -4, -6, -8, -9], [-2, -4, -6, -8, -9, -10], [-2, -4, -6, -7], [-2, -4, -6, -7, -10], [-2, -4, -6, -7, -9], [-2, -4, -6, -7, -9, -10], [-2, -4, -6, -7, -8], [-2, -4, -6, -7, -8, -10], [-2, -4, -6, -7, -8, -9], [-2, -4, -6, -7, -8, -9, -10], [-2, -4, -5], [-2, -4, -5, -10], [-2, -4, -5, -9], [-2, -4, -5, -9, -10], [-2, -4, -5, -8], [-2, -4, -5, -8, -10], [-2, -4, -5, -8, -9], [-2, -4, -5, -8, -9, -10], [-2, -4, -5, -7], [-2, -4, -5, -7, -10], [-2, -4, -5, -7, -9], [-2, -4, -5, -7, -9, -10], [-2, -4, -5, -7, -8], [-2, -4, -5, -7, -8, -10], [-2, -4, -5, -7, -8, -9], [-2, -4, -5, -7, -8, -9, -10], [-2, -4, -5, -6], [-2, -4, -5, -6, -10], [-2, -4, -5, -6, -9], [-2, -4, -5, -6, -9, -10], [-2, -4, -5, -6, -8], [-2, -4, -5, -6, -8, -10], [-2, -4, -5, -6, -8, -9], [-2, -4, -5, -6, -8, -9, -10], [-2, -4, -5, -6, -7], [-2, -4, -5, -6, -7, -10], [-2, -4, -5, -6, -7, -9], [-2, -4, -5, -6, -7, -9, -10], [-2, -4, -5, -6, -7, -8], [-2, -4, -5, -6, -7, -8, -10], [-2, -4, -5, -6, -7, -8, -9], [-2, -4, -5, -6, -7, -8, -9, -10], [-2, -3], [-2, -3, -10], [-2, -3, -9], [-2, -3, -9, -10], [-2, -3, -8], [-2, -3, -8, -10], [-2, -3, -8, -9], [-2, -3, -8, -9, -10], [-2, -3, -7], [-2, -3, -7, -10], [-2, -3, -7, -9], [-2, -3, -7, -9, -10], [-2, -3, -7, -8], [-2, -3, -7, -8, -10], [-2, -3, -7, -8, -9], [-2, -3, -7, -8, -9, -10], [-2, -3, -6], [-2, -3, -6, -10], [-2, -3, -6, -9], [-2, -3, -6, -9, -10], [-2, -3, -6, -8], [-2, -3, -6, -8, -10], [-2, -3, -6, -8, -9], [-2, -3, -6, -8, -9, -10], [-2, -3, -6, -7], [-2, -3, -6, -7, -10], [-2, -3, -6, -7, -9], [-2, -3, -6, -7, -9, -10], [-2, -3, -6, -7, -8], [-2, -3, -6, -7, -8, -10], [-2, -3, -6, -7, -8, -9], [-2, -3, -6, -7, -8, -9, -10], [-2, -3, -5], [-2, -3, -5, -10], [-2, -3, -5, -9], [-2, -3, -5, -9, -10], [-2, -3, -5, -8], [-2, -3, -5, -8, -10], [-2, -3, -5, -8, -9], [-2, -3, -5, -8, -9, -10], [-2, -3, -5, -7], [-2, -3, -5, -7, -10], [-2, -3, -5, -7, -9], [-2, -3, -5, -7, -9, -10], [-2, -3, -5, -7, -8], [-2, -3, -5, -7, -8, -10], [-2, -3, -5, -7, -8, -9], [-2, -3, -5, -7, -8, -9, -10], [-2, -3, -5, -6], [-2, -3, -5, -6, -10], [-2, -3, -5, -6, -9], [-2, -3, -5, -6, -9, -10], [-2, -3, -5, -6, -8], [-2, -3, -5, -6, -8, -10], [-2, -3, -5, -6, -8, -9], [-2, -3, -5, -6, -8, -9, -10], [-2, -3, -5, -6, -7], [-2, -3, -5, -6, -7, -10], [-2, -3, -5, -6, -7, -9], [-2, -3, -5, -6, -7, -9, -10], [-2, -3, -5, -6, -7, -8], [-2, -3, -5, -6, -7, -8, -10], [-2, -3, -5, -6, -7, -8, -9], [-2, -3, -5, -6, -7, -8, -9, -10], [-2, -3, -4], [-2, -3, -4, -10], [-2, -3, -4, -9], [-2, -3, -4, -9, -10], [-2, -3, -4, -8], [-2, -3, -4, -8, -10], [-2, -3, -4, -8, -9], [-2, -3, -4, -8, -9, -10], [-2, -3, -4, -7], [-2, -3, -4, -7, -10], [-2, -3, -4, -7, -9], [-2, -3, -4, -7, -9, -10], [-2, -3, -4, -7, -8], [-2, -3, -4, -7, -8, -10], [-2, -3, -4, -7, -8, -9], [-2, -3, -4, -7, -8, -9, -10], [-2, -3, -4, -6], [-2, -3, -4, -6, -10], [-2, -3, -4, -6, -9], [-2, -3, -4, -6, -9, -10], [-2, -3, -4, -6, -8], [-2, -3, -4, -6, -8, -10], [-2, -3, -4, -6, -8, -9], [-2, -3, -4, -6, -8, -9, -10], [-2, -3, -4, -6, -7], [-2, -3, -4, -6, -7, -10], [-2, -3, -4, -6, -7, -9], [-2, -3, -4, -6, -7, -9, -10], [-2, -3, -4, -6, -7, -8], [-2, -3, -4, -6, -7, -8, -10], [-2, -3, -4, -6, -7, -8, -9], [-2, -3, -4, -6, -7, -8, -9, -10], [-2, -3, -4, -5], [-2, -3, -4, -5, -10], [-2, -3, -4, -5, -9], [-2, -3, -4, -5, -9, -10], [-2, -3, -4, -5, -8], [-2, -3, -4, -5, -8, -10], [-2, -3, -4, -5, -8, -9], [-2, -3, -4, -5, -8, -9, -10], [-2, -3, -4, -5, -7], [-2, -3, -4, -5, -7, -10], [-2, -3, -4, -5, -7, -9], [-2, -3, -4, -5, -7, -9, -10], [-2, -3, -4, -5, -7, -8], [-2, -3, -4, -5, -7, -8, -10], [-2, -3, -4, -5, -7, -8, -9], [-2, -3, -4, -5, -7, -8, -9, -10], [-2, -3, -4, -5, -6], [-2, -3, -4, -5, -6, -10], [-2, -3, -4, -5, -6, -9], [-2, -3, -4, -5, -6, -9, -10], [-2, -3, -4, -5, -6, -8], [-2, -3, -4, -5, -6, -8, -10], [-2, -3, -4, -5, -6, -8, -9], [-2, -3, -4, -5, -6, -8, -9, -10], [-2, -3, -4, -5, -6, -7], [-2, -3, -4, -5, -6, -7, -10], [-2, -3, -4, -5, -6, -7, -9], [-2, -3, -4, -5, -6, -7, -9, -10], [-2, -3, -4, -5, -6, -7, -8], [-2, -3, -4, -5, -6, -7, -8, -10], [-2, -3, -4, -5, -6, -7, -8, -9], [-2, -3, -4, -5, -6, -7, -8, -9, -10], [-1], [-1, -10], [-1, -9], [-1, -9, -10], [-1, -8], [-1, -8, -10], [-1, -8, -9], [-1, -8, -9, -10], [-1, -7], [-1, -7, -10], [-1, -7, -9], [-1, -7, -9, -10], [-1, -7, -8], [-1, -7, -8, -10], [-1, -7, -8, -9], [-1, -7, -8, -9, -10], [-1, -6], [-1, -6, -10], [-1, -6, -9], [-1, -6, -9, -10], [-1, -6, -8], [-1, -6, -8, -10], [-1, -6, -8, -9], [-1, -6, -8, -9, -10], [-1, -6, -7], [-1, -6, -7, -10], [-1, -6, -7, -9], [-1, -6, -7, -9, -10], [-1, -6, -7, -8], [-1, -6, -7, -8, -10], [-1, -6, -7, -8, -9], [-1, -6, -7, -8, -9, -10], [-1, -5], [-1, -5, -10], [-1, -5, -9], [-1, -5, -9, -10], [-1, -5, -8], [-1, -5, -8, -10], [-1, -5, -8, -9], [-1, -5, -8, -9, -10], [-1, -5, -7], [-1, -5, -7, -10], [-1, -5, -7, -9], [-1, -5, -7, -9, -10], [-1, -5, -7, -8], [-1, -5, -7, -8, -10], [-1, -5, -7, -8, -9], [-1, -5, -7, -8, -9, -10], [-1, -5, -6], [-1, -5, -6, -10], [-1, -5, -6, -9], [-1, -5, -6, -9, -10], [-1, -5, -6, -8], [-1, -5, -6, -8, -10], [-1, -5, -6, -8, -9], [-1, -5, -6, -8, -9, -10], [-1, -5, -6, -7], [-1, -5, -6, -7, -10], [-1, -5, -6, -7, -9], [-1, -5, -6, -7, -9, -10], [-1, -5, -6, -7, -8], [-1, -5, -6, -7, -8, -10], [-1, -5, -6, -7, -8, -9], [-1, -5, -6, -7, -8, -9, -10], [-1, -4], [-1, -4, -10], [-1, -4, -9], [-1, -4, -9, -10], [-1, -4, -8], [-1, -4, -8, -10], [-1, -4, -8, -9], [-1, -4, -8, -9, -10], [-1, -4, -7], [-1, -4, -7, -10], [-1, -4, -7, -9], [-1, -4, -7, -9, -10], [-1, -4, -7, -8], [-1, -4, -7, -8, -10], [-1, -4, -7, -8, -9], [-1, -4, -7, -8, -9, -10], [-1, -4, -6], [-1, -4, -6, -10], [-1, -4, -6, -9], [-1, -4, -6, -9, -10], [-1, -4, -6, -8], [-1, -4, -6, -8, -10], [-1, -4, -6, -8, -9], [-1, -4, -6, -8, -9, -10], [-1, -4, -6, -7], [-1, -4, -6, -7, -10], [-1, -4, -6, -7, -9], [-1, -4, -6, -7, -9, -10], [-1, -4, -6, -7, -8], [-1, -4, -6, -7, -8, -10], [-1, -4, -6, -7, -8, -9], [-1, -4, -6, -7, -8, -9, -10], [-1, -4, -5], [-1, -4, -5, -10], [-1, -4, -5, -9], [-1, -4, -5, -9, -10], [-1, -4, -5, -8], [-1, -4, -5, -8, -10], [-1, -4, -5, -8, -9], [-1, -4, -5, -8, -9, -10], [-1, -4, -5, -7], [-1, -4, -5, -7, -10], [-1, -4, -5, -7, -9], [-1, -4, -5, -7, -9, -10], [-1, -4, -5, -7, -8], [-1, -4, -5, -7, -8, -10], [-1, -4, -5, -7, -8, -9], [-1, -4, -5, -7, -8, -9, -10], [-1, -4, -5, -6], [-1, -4, -5, -6, -10], [-1, -4, -5, -6, -9], [-1, -4, -5, -6, -9, -10], [-1, -4, -5, -6, -8], [-1, -4, -5, -6, -8, -10], [-1, -4, -5, -6, -8, -9], [-1, -4, -5, -6, -8, -9, -10], [-1, -4, -5, -6, -7], [-1, -4, -5, -6, -7, -10], [-1, -4, -5, -6, -7, -9], [-1, -4, -5, -6, -7, -9, -10], [-1, -4, -5, -6, -7, -8], [-1, -4, -5, -6, -7, -8, -10], [-1, -4, -5, -6, -7, -8, -9], [-1, -4, -5, -6, -7, -8, -9, -10], [-1, -3], [-1, -3, -10], [-1, -3, -9], [-1, -3, -9, -10], [-1, -3, -8], [-1, -3, -8, -10], [-1, -3, -8, -9], [-1, -3, -8, -9, -10], [-1, -3, -7], [-1, -3, -7, -10], [-1, -3, -7, -9], [-1, -3, -7, -9, -10], [-1, -3, -7, -8], [-1, -3, -7, -8, -10], [-1, -3, -7, -8, -9], [-1, -3, -7, -8, -9, -10], [-1, -3, -6], [-1, -3, -6, -10], [-1, -3, -6, -9], [-1, -3, -6, -9, -10], [-1, -3, -6, -8], [-1, -3, -6, -8, -10], [-1, -3, -6, -8, -9], [-1, -3, -6, -8, -9, -10], [-1, -3, -6, -7], [-1, -3, -6, -7, -10], [-1, -3, -6, -7, -9], [-1, -3, -6, -7, -9, -10], [-1, -3, -6, -7, -8], [-1, -3, -6, -7, -8, -10], [-1, -3, -6, -7, -8, -9], [-1, -3, -6, -7, -8, -9, -10], [-1, -3, -5], [-1, -3, -5, -10], [-1, -3, -5, -9], [-1, -3, -5, -9, -10], [-1, -3, -5, -8], [-1, -3, -5, -8, -10], [-1, -3, -5, -8, -9], [-1, -3, -5, -8, -9, -10], [-1, -3, -5, -7], [-1, -3, -5, -7, -10], [-1, -3, -5, -7, -9], [-1, -3, -5, -7, -9, -10], [-1, -3, -5, -7, -8], [-1, -3, -5, -7, -8, -10], [-1, -3, -5, -7, -8, -9], [-1, -3, -5, -7, -8, -9, -10], [-1, -3, -5, -6], [-1, -3, -5, -6, -10], [-1, -3, -5, -6, -9], [-1, -3, -5, -6, -9, -10], [-1, -3, -5, -6, -8], [-1, -3, -5, -6, -8, -10], [-1, -3, -5, -6, -8, -9], [-1, -3, -5, -6, -8, -9, -10], [-1, -3, -5, -6, -7], [-1, -3, -5, -6, -7, -10], [-1, -3, -5, -6, -7, -9], [-1, -3, -5, -6, -7, -9, -10], [-1, -3, -5, -6, -7, -8], [-1, -3, -5, -6, -7, -8, -10], [-1, -3, -5, -6, -7, -8, -9], [-1, -3, -5, -6, -7, -8, -9, -10], [-1, -3, -4], [-1, -3, -4, -10], [-1, -3, -4, -9], [-1, -3, -4, -9, -10], [-1, -3, -4, -8], [-1, -3, -4, -8, -10], [-1, -3, -4, -8, -9], [-1, -3, -4, -8, -9, -10], [-1, -3, -4, -7], [-1, -3, -4, -7, -10], [-1, -3, -4, -7, -9], [-1, -3, -4, -7, -9, -10], [-1, -3, -4, -7, -8], [-1, -3, -4, -7, -8, -10], [-1, -3, -4, -7, -8, -9], [-1, -3, -4, -7, -8, -9, -10], [-1, -3, -4, -6], [-1, -3, -4, -6, -10], [-1, -3, -4, -6, -9], [-1, -3, -4, -6, -9, -10], [-1, -3, -4, -6, -8], [-1, -3, -4, -6, -8, -10], [-1, -3, -4, -6, -8, -9], [-1, -3, -4, -6, -8, -9, -10], [-1, -3, -4, -6, -7], [-1, -3, -4, -6, -7, -10], [-1, -3, -4, -6, -7, -9], [-1, -3, -4, -6, -7, -9, -10], [-1, -3, -4, -6, -7, -8], [-1, -3, -4, -6, -7, -8, -10], [-1, -3, -4, -6, -7, -8, -9], [-1, -3, -4, -6, -7, -8, -9, -10], [-1, -3, -4, -5], [-1, -3, -4, -5, -10], [-1, -3, -4, -5, -9], [-1, -3, -4, -5, -9, -10], [-1, -3, -4, -5, -8], [-1, -3, -4, -5, -8, -10], [-1, -3, -4, -5, -8, -9], [-1, -3, -4, -5, -8, -9, -10], [-1, -3, -4, -5, -7], [-1, -3, -4, -5, -7, -10], [-1, -3, -4, -5, -7, -9], [-1, -3, -4, -5, -7, -9, -10], [-1, -3, -4, -5, -7, -8], [-1, -3, -4, -5, -7, -8, -10], [-1, -3, -4, -5, -7, -8, -9], [-1, -3, -4, -5, -7, -8, -9, -10], [-1, -3, -4, -5, -6], [-1, -3, -4, -5, -6, -10], [-1, -3, -4, -5, -6, -9], [-1, -3, -4, -5, -6, -9, -10], [-1, -3, -4, -5, -6, -8], [-1, -3, -4, -5, -6, -8, -10], [-1, -3, -4, -5, -6, -8, -9], [-1, -3, -4, -5, -6, -8, -9, -10], [-1, -3, -4, -5, -6, -7], [-1, -3, -4, -5, -6, -7, -10], [-1, -3, -4, -5, -6, -7, -9], [-1, -3, -4, -5, -6, -7, -9, -10], [-1, -3, -4, -5, -6, -7, -8], [-1, -3, -4, -5, -6, -7, -8, -10], [-1, -3, -4, -5, -6, -7, -8, -9], [-1, -3, -4, -5, -6, -7, -8, -9, -10], [-1, -2], [-1, -2, -10], [-1, -2, -9], [-1, -2, -9, -10], [-1, -2, -8], [-1, -2, -8, -10], [-1, -2, -8, -9], [-1, -2, -8, -9, -10], [-1, -2, -7], [-1, -2, -7, -10], [-1, -2, -7, -9], [-1, -2, -7, -9, -10], [-1, -2, -7, -8], [-1, -2, -7, -8, -10], [-1, -2, -7, -8, -9], [-1, -2, -7, -8, -9, -10], [-1, -2, -6], [-1, -2, -6, -10], [-1, -2, -6, -9], [-1, -2, -6, -9, -10], [-1, -2, -6, -8], [-1, -2, -6, -8, -10], [-1, -2, -6, -8, -9], [-1, -2, -6, -8, -9, -10], [-1, -2, -6, -7], [-1, -2, -6, -7, -10], [-1, -2, -6, -7, -9], [-1, -2, -6, -7, -9, -10], [-1, -2, -6, -7, -8], [-1, -2, -6, -7, -8, -10], [-1, -2, -6, -7, -8, -9], [-1, -2, -6, -7, -8, -9, -10], [-1, -2, -5], [-1, -2, -5, -10], [-1, -2, -5, -9], [-1, -2, -5, -9, -10], [-1, -2, -5, -8], [-1, -2, -5, -8, -10], [-1, -2, -5, -8, -9], [-1, -2, -5, -8, -9, -10], [-1, -2, -5, -7], [-1, -2, -5, -7, -10], [-1, -2, -5, -7, -9], [-1, -2, -5, -7, -9, -10], [-1, -2, -5, -7, -8], [-1, -2, -5, -7, -8, -10], [-1, -2, -5, -7, -8, -9], [-1, -2, -5, -7, -8, -9, -10], [-1, -2, -5, -6], [-1, -2, -5, -6, -10], [-1, -2, -5, -6, -9], [-1, -2, -5, -6, -9, -10], [-1, -2, -5, -6, -8], [-1, -2, -5, -6, -8, -10], [-1, -2, -5, -6, -8, -9], [-1, -2, -5, -6, -8, -9, -10], [-1, -2, -5, -6, -7], [-1, -2, -5, -6, -7, -10], [-1, -2, -5, -6, -7, -9], [-1, -2, -5, -6, -7, -9, -10], [-1, -2, -5, -6, -7, -8], [-1, -2, -5, -6, -7, -8, -10], [-1, -2, -5, -6, -7, -8, -9], [-1, -2, -5, -6, -7, -8, -9, -10], [-1, -2, -4], [-1, -2, -4, -10], [-1, -2, -4, -9], [-1, -2, -4, -9, -10], [-1, -2, -4, -8], [-1, -2, -4, -8, -10], [-1, -2, -4, -8, -9], [-1, -2, -4, -8, -9, -10], [-1, -2, -4, -7], [-1, -2, -4, -7, -10], [-1, -2, -4, -7, -9], [-1, -2, -4, -7, -9, -10], [-1, -2, -4, -7, -8], [-1, -2, -4, -7, -8, -10], [-1, -2, -4, -7, -8, -9], [-1, -2, -4, -7, -8, -9, -10], [-1, -2, -4, -6], [-1, -2, -4, -6, -10], [-1, -2, -4, -6, -9], [-1, -2, -4, -6, -9, -10], [-1, -2, -4, -6, -8], [-1, -2, -4, -6, -8, -10], [-1, -2, -4, -6, -8, -9], [-1, -2, -4, -6, -8, -9, -10], [-1, -2, -4, -6, -7], [-1, -2, -4, -6, -7, -10], [-1, -2, -4, -6, -7, -9], [-1, -2, -4, -6, -7, -9, -10], [-1, -2, -4, -6, -7, -8], [-1, -2, -4, -6, -7, -8, -10], [-1, -2, -4, -6, -7, -8, -9], [-1, -2, -4, -6, -7, -8, -9, -10], [-1, -2, -4, -5], [-1, -2, -4, -5, -10], [-1, -2, -4, -5, -9], [-1, -2, -4, -5, -9, -10], [-1, -2, -4, -5, -8], [-1, -2, -4, -5, -8, -10], [-1, -2, -4, -5, -8, -9], [-1, -2, -4, -5, -8, -9, -10], [-1, -2, -4, -5, -7], [-1, -2, -4, -5, -7, -10], [-1, -2, -4, -5, -7, -9], [-1, -2, -4, -5, -7, -9, -10], [-1, -2, -4, -5, -7, -8], [-1, -2, -4, -5, -7, -8, -10], [-1, -2, -4, -5, -7, -8, -9], [-1, -2, -4, -5, -7, -8, -9, -10], [-1, -2, -4, -5, -6], [-1, -2, -4, -5, -6, -10], [-1, -2, -4, -5, -6, -9], [-1, -2, -4, -5, -6, -9, -10], [-1, -2, -4, -5, -6, -8], [-1, -2, -4, -5, -6, -8, -10], [-1, -2, -4, -5, -6, -8, -9], [-1, -2, -4, -5, -6, -8, -9, -10], [-1, -2, -4, -5, -6, -7], [-1, -2, -4, -5, -6, -7, -10], [-1, -2, -4, -5, -6, -7, -9], [-1, -2, -4, -5, -6, -7, -9, -10], [-1, -2, -4, -5, -6, -7, -8], [-1, -2, -4, -5, -6, -7, -8, -10], [-1, -2, -4, -5, -6, -7, -8, -9], [-1, -2, -4, -5, -6, -7, -8, -9, -10], [-1, -2, -3], [-1, -2, -3, -10], [-1, -2, -3, -9], [-1, -2, -3, -9, -10], [-1, -2, -3, -8], [-1, -2, -3, -8, -10], [-1, -2, -3, -8, -9], [-1, -2, -3, -8, -9, -10], [-1, -2, -3, -7], [-1, -2, -3, -7, -10], [-1, -2, -3, -7, -9], [-1, -2, -3, -7, -9, -10], [-1, -2, -3, -7, -8], [-1, -2, -3, -7, -8, -10], [-1, -2, -3, -7, -8, -9], [-1, -2, -3, -7, -8, -9, -10], [-1, -2, -3, -6], [-1, -2, -3, -6, -10], [-1, -2, -3, -6, -9], [-1, -2, -3, -6, -9, -10], [-1, -2, -3, -6, -8], [-1, -2, -3, -6, -8, -10], [-1, -2, -3, -6, -8, -9], [-1, -2, -3, -6, -8, -9, -10], [-1, -2, -3, -6, -7], [-1, -2, -3, -6, -7, -10], [-1, -2, -3, -6, -7, -9], [-1, -2, -3, -6, -7, -9, -10], [-1, -2, -3, -6, -7, -8], [-1, -2, -3, -6, -7, -8, -10], [-1, -2, -3, -6, -7, -8, -9], [-1, -2, -3, -6, -7, -8, -9, -10], [-1, -2, -3, -5], [-1, -2, -3, -5, -10], [-1, -2, -3, -5, -9], [-1, -2, -3, -5, -9, -10], [-1, -2, -3, -5, -8], [-1, -2, -3, -5, -8, -10], [-1, -2, -3, -5, -8, -9], [-1, -2, -3, -5, -8, -9, -10], [-1, -2, -3, -5, -7], [-1, -2, -3, -5, -7, -10], [-1, -2, -3, -5, -7, -9], [-1, -2, -3, -5, -7, -9, -10], [-1, -2, -3, -5, -7, -8], [-1, -2, -3, -5, -7, -8, -10], [-1, -2, -3, -5, -7, -8, -9], [-1, -2, -3, -5, -7, -8, -9, -10], [-1, -2, -3, -5, -6], [-1, -2, -3, -5, -6, -10], [-1, -2, -3, -5, -6, -9], [-1, -2, -3, -5, -6, -9, -10], [-1, -2, -3, -5, -6, -8], [-1, -2, -3, -5, -6, -8, -10], [-1, -2, -3, -5, -6, -8, -9], [-1, -2, -3, -5, -6, -8, -9, -10], [-1, -2, -3, -5, -6, -7], [-1, -2, -3, -5, -6, -7, -10], [-1, -2, -3, -5, -6, -7, -9], [-1, -2, -3, -5, -6, -7, -9, -10], [-1, -2, -3, -5, -6, -7, -8], [-1, -2, -3, -5, -6, -7, -8, -10], [-1, -2, -3, -5, -6, -7, -8, -9], [-1, -2, -3, -5, -6, -7, -8, -9, -10], [-1, -2, -3, -4], [-1, -2, -3, -4, -10], [-1, -2, -3, -4, -9], [-1, -2, -3, -4, -9, -10], [-1, -2, -3, -4, -8], [-1, -2, -3, -4, -8, -10], [-1, -2, -3, -4, -8, -9], [-1, -2, -3, -4, -8, -9, -10], [-1, -2, -3, -4, -7], [-1, -2, -3, -4, -7, -10], [-1, -2, -3, -4, -7, -9], [-1, -2, -3, -4, -7, -9, -10], [-1, -2, -3, -4, -7, -8], [-1, -2, -3, -4, -7, -8, -10], [-1, -2, -3, -4, -7, -8, -9], [-1, -2, -3, -4, -7, -8, -9, -10], [-1, -2, -3, -4, -6], [-1, -2, -3, -4, -6, -10], [-1, -2, -3, -4, -6, -9], [-1, -2, -3, -4, -6, -9, -10], [-1, -2, -3, -4, -6, -8], [-1, -2, -3, -4, -6, -8, -10], [-1, -2, -3, -4, -6, -8, -9], [-1, -2, -3, -4, -6, -8, -9, -10], [-1, -2, -3, -4, -6, -7], [-1, -2, -3, -4, -6, -7, -10], [-1, -2, -3, -4, -6, -7, -9], [-1, -2, -3, -4, -6, -7, -9, -10], [-1, -2, -3, -4, -6, -7, -8], [-1, -2, -3, -4, -6, -7, -8, -10], [-1, -2, -3, -4, -6, -7, -8, -9], [-1, -2, -3, -4, -6, -7, -8, -9, -10], [-1, -2, -3, -4, -5], [-1, -2, -3, -4, -5, -10], [-1, -2, -3, -4, -5, -9], [-1, -2, -3, -4, -5, -9, -10], [-1, -2, -3, -4, -5, -8], [-1, -2, -3, -4, -5, -8, -10], [-1, -2, -3, -4, -5, -8, -9], [-1, -2, -3, -4, -5, -8, -9, -10], [-1, -2, -3, -4, -5, -7], [-1, -2, -3, -4, -5, -7, -10], [-1, -2, -3, -4, -5, -7, -9], [-1, -2, -3, -4, -5, -7, -9, -10], [-1, -2, -3, -4, -5, -7, -8], [-1, -2, -3, -4, -5, -7, -8, -10], [-1, -2, -3, -4, -5, -7, -8, -9], [-1, -2, -3, -4, -5, -7, -8, -9, -10], [-1, -2, -3, -4, -5, -6], [-1, -2, -3, -4, -5, -6, -10], [-1, -2, -3, -4, -5, -6, -9], [-1, -2, -3, -4, -5, -6, -9, -10], [-1, -2, -3, -4, -5, -6, -8], [-1, -2, -3, -4, -5, -6, -8, -10], [-1, -2, -3, -4, -5, -6, -8, -9], [-1, -2, -3, -4, -5, -6, -8, -9, -10], [-1, -2, -3, -4, -5, -6, -7], [-1, -2, -3, -4, -5, -6, -7, -10], [-1, -2, -3, -4, -5, -6, -7, -9], [-1, -2, -3, -4, -5, -6, -7, -9, -10], [-1, -2, -3, -4, -5, -6, -7, -8], [-1, -2, -3, -4, -5, -6, -7, -8, -10], [-1, -2, -3, -4, -5, -6, -7, -8, -9], [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]])\n assert answers_match(candidate(nums=[-3, -1, 2, 4, 6, 8]), [[], [8], [6], [6, 8], [4], [4, 8], [4, 6], [4, 6, 8], [2], [2, 8], [2, 6], [2, 6, 8], [2, 4], [2, 4, 8], [2, 4, 6], [2, 4, 6, 8], [-1], [-1, 8], [-1, 6], [-1, 6, 8], [-1, 4], [-1, 4, 8], [-1, 4, 6], [-1, 4, 6, 8], [-1, 2], [-1, 2, 8], [-1, 2, 6], [-1, 2, 6, 8], [-1, 2, 4], [-1, 2, 4, 8], [-1, 2, 4, 6], [-1, 2, 4, 6, 8], [-3], [-3, 8], [-3, 6], [-3, 6, 8], [-3, 4], [-3, 4, 8], [-3, 4, 6], [-3, 4, 6, 8], [-3, 2], [-3, 2, 8], [-3, 2, 6], [-3, 2, 6, 8], [-3, 2, 4], [-3, 2, 4, 8], [-3, 2, 4, 6], [-3, 2, 4, 6, 8], [-3, -1], [-3, -1, 8], [-3, -1, 6], [-3, -1, 6, 8], [-3, -1, 4], [-3, -1, 4, 8], [-3, -1, 4, 6], [-3, -1, 4, 6, 8], [-3, -1, 2], [-3, -1, 2, 8], [-3, -1, 2, 6], [-3, -1, 2, 6, 8], [-3, -1, 2, 4], [-3, -1, 2, 4, 8], [-3, -1, 2, 4, 6], [-3, -1, 2, 4, 6, 8]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, 3]), [[], [3], [2], [2, 3], [1], [1, 3], [1, 2], [1, 2, 3], [0], [0, 3], [0, 2], [0, 2, 3], [0, 1], [0, 1, 3], [0, 1, 2], [0, 1, 2, 3], [-1], [-1, 3], [-1, 2], [-1, 2, 3], [-1, 1], [-1, 1, 3], [-1, 1, 2], [-1, 1, 2, 3], [-1, 0], [-1, 0, 3], [-1, 0, 2], [-1, 0, 2, 3], [-1, 0, 1], [-1, 0, 1, 3], [-1, 0, 1, 2], [-1, 0, 1, 2, 3]])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1]), [[], [1], [2], [2, 1], [3], [3, 1], [3, 2], [3, 2, 1], [4], [4, 1], [4, 2], [4, 2, 1], [4, 3], [4, 3, 1], [4, 3, 2], [4, 3, 2, 1], [5], [5, 1], [5, 2], [5, 2, 1], [5, 3], [5, 3, 1], [5, 3, 2], [5, 3, 2, 1], [5, 4], [5, 4, 1], [5, 4, 2], [5, 4, 2, 1], [5, 4, 3], [5, 4, 3, 1], [5, 4, 3, 2], [5, 4, 3, 2, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [[], [10], [9], [9, 10], [8], [8, 10], [8, 9], [8, 9, 10], [7], [7, 10], [7, 9], [7, 9, 10], [7, 8], [7, 8, 10], [7, 8, 9], [7, 8, 9, 10], [6], [6, 10], [6, 9], [6, 9, 10], [6, 8], [6, 8, 10], [6, 8, 9], [6, 8, 9, 10], [6, 7], [6, 7, 10], [6, 7, 9], [6, 7, 9, 10], [6, 7, 8], [6, 7, 8, 10], [6, 7, 8, 9], [6, 7, 8, 9, 10], [5], [5, 10], [5, 9], [5, 9, 10], [5, 8], [5, 8, 10], [5, 8, 9], [5, 8, 9, 10], [5, 7], [5, 7, 10], [5, 7, 9], [5, 7, 9, 10], [5, 7, 8], [5, 7, 8, 10], [5, 7, 8, 9], [5, 7, 8, 9, 10], [5, 6], [5, 6, 10], [5, 6, 9], [5, 6, 9, 10], [5, 6, 8], [5, 6, 8, 10], [5, 6, 8, 9], [5, 6, 8, 9, 10], [5, 6, 7], [5, 6, 7, 10], [5, 6, 7, 9], [5, 6, 7, 9, 10], [5, 6, 7, 8], [5, 6, 7, 8, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 9, 10], [4], [4, 10], [4, 9], [4, 9, 10], [4, 8], [4, 8, 10], [4, 8, 9], [4, 8, 9, 10], [4, 7], [4, 7, 10], [4, 7, 9], [4, 7, 9, 10], [4, 7, 8], [4, 7, 8, 10], [4, 7, 8, 9], [4, 7, 8, 9, 10], [4, 6], [4, 6, 10], [4, 6, 9], [4, 6, 9, 10], [4, 6, 8], [4, 6, 8, 10], [4, 6, 8, 9], [4, 6, 8, 9, 10], [4, 6, 7], [4, 6, 7, 10], [4, 6, 7, 9], [4, 6, 7, 9, 10], [4, 6, 7, 8], [4, 6, 7, 8, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 9, 10], [4, 5], [4, 5, 10], [4, 5, 9], [4, 5, 9, 10], [4, 5, 8], [4, 5, 8, 10], [4, 5, 8, 9], [4, 5, 8, 9, 10], [4, 5, 7], [4, 5, 7, 10], [4, 5, 7, 9], [4, 5, 7, 9, 10], [4, 5, 7, 8], [4, 5, 7, 8, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 9, 10], [4, 5, 6], [4, 5, 6, 10], [4, 5, 6, 9], [4, 5, 6, 9, 10], [4, 5, 6, 8], [4, 5, 6, 8, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 9, 10], [4, 5, 6, 7], [4, 5, 6, 7, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 9, 10], [3], [3, 10], [3, 9], [3, 9, 10], [3, 8], [3, 8, 10], [3, 8, 9], [3, 8, 9, 10], [3, 7], [3, 7, 10], [3, 7, 9], [3, 7, 9, 10], [3, 7, 8], [3, 7, 8, 10], [3, 7, 8, 9], [3, 7, 8, 9, 10], [3, 6], [3, 6, 10], [3, 6, 9], [3, 6, 9, 10], [3, 6, 8], [3, 6, 8, 10], [3, 6, 8, 9], [3, 6, 8, 9, 10], [3, 6, 7], [3, 6, 7, 10], [3, 6, 7, 9], [3, 6, 7, 9, 10], [3, 6, 7, 8], [3, 6, 7, 8, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 9, 10], [3, 5], [3, 5, 10], [3, 5, 9], [3, 5, 9, 10], [3, 5, 8], [3, 5, 8, 10], [3, 5, 8, 9], [3, 5, 8, 9, 10], [3, 5, 7], [3, 5, 7, 10], [3, 5, 7, 9], [3, 5, 7, 9, 10], [3, 5, 7, 8], [3, 5, 7, 8, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 9, 10], [3, 5, 6], [3, 5, 6, 10], [3, 5, 6, 9], [3, 5, 6, 9, 10], [3, 5, 6, 8], [3, 5, 6, 8, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 9, 10], [3, 5, 6, 7], [3, 5, 6, 7, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 9, 10], [3, 4], [3, 4, 10], [3, 4, 9], [3, 4, 9, 10], [3, 4, 8], [3, 4, 8, 10], [3, 4, 8, 9], [3, 4, 8, 9, 10], [3, 4, 7], [3, 4, 7, 10], [3, 4, 7, 9], [3, 4, 7, 9, 10], [3, 4, 7, 8], [3, 4, 7, 8, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 9, 10], [3, 4, 6], [3, 4, 6, 10], [3, 4, 6, 9], [3, 4, 6, 9, 10], [3, 4, 6, 8], [3, 4, 6, 8, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 9, 10], [3, 4, 6, 7], [3, 4, 6, 7, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 9, 10], [3, 4, 5], [3, 4, 5, 10], [3, 4, 5, 9], [3, 4, 5, 9, 10], [3, 4, 5, 8], [3, 4, 5, 8, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 9, 10], [3, 4, 5, 7], [3, 4, 5, 7, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 6], [3, 4, 5, 6, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 9, 10], [2], [2, 10], [2, 9], [2, 9, 10], [2, 8], [2, 8, 10], [2, 8, 9], [2, 8, 9, 10], [2, 7], [2, 7, 10], [2, 7, 9], [2, 7, 9, 10], [2, 7, 8], [2, 7, 8, 10], [2, 7, 8, 9], [2, 7, 8, 9, 10], [2, 6], [2, 6, 10], [2, 6, 9], [2, 6, 9, 10], [2, 6, 8], [2, 6, 8, 10], [2, 6, 8, 9], [2, 6, 8, 9, 10], [2, 6, 7], [2, 6, 7, 10], [2, 6, 7, 9], [2, 6, 7, 9, 10], [2, 6, 7, 8], [2, 6, 7, 8, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 9, 10], [2, 5], [2, 5, 10], [2, 5, 9], [2, 5, 9, 10], [2, 5, 8], [2, 5, 8, 10], [2, 5, 8, 9], [2, 5, 8, 9, 10], [2, 5, 7], [2, 5, 7, 10], [2, 5, 7, 9], [2, 5, 7, 9, 10], [2, 5, 7, 8], [2, 5, 7, 8, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 9, 10], [2, 5, 6], [2, 5, 6, 10], [2, 5, 6, 9], [2, 5, 6, 9, 10], [2, 5, 6, 8], [2, 5, 6, 8, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 9, 10], [2, 5, 6, 7], [2, 5, 6, 7, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 9, 10], [2, 4], [2, 4, 10], [2, 4, 9], [2, 4, 9, 10], [2, 4, 8], [2, 4, 8, 10], [2, 4, 8, 9], [2, 4, 8, 9, 10], [2, 4, 7], [2, 4, 7, 10], [2, 4, 7, 9], [2, 4, 7, 9, 10], [2, 4, 7, 8], [2, 4, 7, 8, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 9, 10], [2, 4, 6], [2, 4, 6, 10], [2, 4, 6, 9], [2, 4, 6, 9, 10], [2, 4, 6, 8], [2, 4, 6, 8, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 9, 10], [2, 4, 6, 7], [2, 4, 6, 7, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 9, 10], [2, 4, 5], [2, 4, 5, 10], [2, 4, 5, 9], [2, 4, 5, 9, 10], [2, 4, 5, 8], [2, 4, 5, 8, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 9, 10], [2, 4, 5, 7], [2, 4, 5, 7, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 6], [2, 4, 5, 6, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 9, 10], [2, 3], [2, 3, 10], [2, 3, 9], [2, 3, 9, 10], [2, 3, 8], [2, 3, 8, 10], [2, 3, 8, 9], [2, 3, 8, 9, 10], [2, 3, 7], [2, 3, 7, 10], [2, 3, 7, 9], [2, 3, 7, 9, 10], [2, 3, 7, 8], [2, 3, 7, 8, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 9, 10], [2, 3, 6], [2, 3, 6, 10], [2, 3, 6, 9], [2, 3, 6, 9, 10], [2, 3, 6, 8], [2, 3, 6, 8, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 9, 10], [2, 3, 6, 7], [2, 3, 6, 7, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 9, 10], [2, 3, 5], [2, 3, 5, 10], [2, 3, 5, 9], [2, 3, 5, 9, 10], [2, 3, 5, 8], [2, 3, 5, 8, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 9, 10], [2, 3, 5, 7], [2, 3, 5, 7, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 6], [2, 3, 5, 6, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 4], [2, 3, 4, 10], [2, 3, 4, 9], [2, 3, 4, 9, 10], [2, 3, 4, 8], [2, 3, 4, 8, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 9, 10], [2, 3, 4, 7], [2, 3, 4, 7, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 6], [2, 3, 4, 6, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 5], [2, 3, 4, 5, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 9, 10], [1], [1, 10], [1, 9], [1, 9, 10], [1, 8], [1, 8, 10], [1, 8, 9], [1, 8, 9, 10], [1, 7], [1, 7, 10], [1, 7, 9], [1, 7, 9, 10], [1, 7, 8], [1, 7, 8, 10], [1, 7, 8, 9], [1, 7, 8, 9, 10], [1, 6], [1, 6, 10], [1, 6, 9], [1, 6, 9, 10], [1, 6, 8], [1, 6, 8, 10], [1, 6, 8, 9], [1, 6, 8, 9, 10], [1, 6, 7], [1, 6, 7, 10], [1, 6, 7, 9], [1, 6, 7, 9, 10], [1, 6, 7, 8], [1, 6, 7, 8, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 9, 10], [1, 5], [1, 5, 10], [1, 5, 9], [1, 5, 9, 10], [1, 5, 8], [1, 5, 8, 10], [1, 5, 8, 9], [1, 5, 8, 9, 10], [1, 5, 7], [1, 5, 7, 10], [1, 5, 7, 9], [1, 5, 7, 9, 10], [1, 5, 7, 8], [1, 5, 7, 8, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 9, 10], [1, 5, 6], [1, 5, 6, 10], [1, 5, 6, 9], [1, 5, 6, 9, 10], [1, 5, 6, 8], [1, 5, 6, 8, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 9, 10], [1, 5, 6, 7], [1, 5, 6, 7, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 9, 10], [1, 4], [1, 4, 10], [1, 4, 9], [1, 4, 9, 10], [1, 4, 8], [1, 4, 8, 10], [1, 4, 8, 9], [1, 4, 8, 9, 10], [1, 4, 7], [1, 4, 7, 10], [1, 4, 7, 9], [1, 4, 7, 9, 10], [1, 4, 7, 8], [1, 4, 7, 8, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 9, 10], [1, 4, 6], [1, 4, 6, 10], [1, 4, 6, 9], [1, 4, 6, 9, 10], [1, 4, 6, 8], [1, 4, 6, 8, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 9, 10], [1, 4, 6, 7], [1, 4, 6, 7, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 9, 10], [1, 4, 5], [1, 4, 5, 10], [1, 4, 5, 9], [1, 4, 5, 9, 10], [1, 4, 5, 8], [1, 4, 5, 8, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 9, 10], [1, 4, 5, 7], [1, 4, 5, 7, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 6], [1, 4, 5, 6, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 9, 10], [1, 3], [1, 3, 10], [1, 3, 9], [1, 3, 9, 10], [1, 3, 8], [1, 3, 8, 10], [1, 3, 8, 9], [1, 3, 8, 9, 10], [1, 3, 7], [1, 3, 7, 10], [1, 3, 7, 9], [1, 3, 7, 9, 10], [1, 3, 7, 8], [1, 3, 7, 8, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 9, 10], [1, 3, 6], [1, 3, 6, 10], [1, 3, 6, 9], [1, 3, 6, 9, 10], [1, 3, 6, 8], [1, 3, 6, 8, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 9, 10], [1, 3, 6, 7], [1, 3, 6, 7, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 9, 10], [1, 3, 5], [1, 3, 5, 10], [1, 3, 5, 9], [1, 3, 5, 9, 10], [1, 3, 5, 8], [1, 3, 5, 8, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 9, 10], [1, 3, 5, 7], [1, 3, 5, 7, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 6], [1, 3, 5, 6, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 4], [1, 3, 4, 10], [1, 3, 4, 9], [1, 3, 4, 9, 10], [1, 3, 4, 8], [1, 3, 4, 8, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 9, 10], [1, 3, 4, 7], [1, 3, 4, 7, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 6], [1, 3, 4, 6, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 5], [1, 3, 4, 5, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2], [1, 2, 10], [1, 2, 9], [1, 2, 9, 10], [1, 2, 8], [1, 2, 8, 10], [1, 2, 8, 9], [1, 2, 8, 9, 10], [1, 2, 7], [1, 2, 7, 10], [1, 2, 7, 9], [1, 2, 7, 9, 10], [1, 2, 7, 8], [1, 2, 7, 8, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 9, 10], [1, 2, 6], [1, 2, 6, 10], [1, 2, 6, 9], [1, 2, 6, 9, 10], [1, 2, 6, 8], [1, 2, 6, 8, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 9, 10], [1, 2, 6, 7], [1, 2, 6, 7, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 9, 10], [1, 2, 5], [1, 2, 5, 10], [1, 2, 5, 9], [1, 2, 5, 9, 10], [1, 2, 5, 8], [1, 2, 5, 8, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 9, 10], [1, 2, 5, 7], [1, 2, 5, 7, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 6], [1, 2, 5, 6, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 4], [1, 2, 4, 10], [1, 2, 4, 9], [1, 2, 4, 9, 10], [1, 2, 4, 8], [1, 2, 4, 8, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 9, 10], [1, 2, 4, 7], [1, 2, 4, 7, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 6], [1, 2, 4, 6, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 5], [1, 2, 4, 5, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3], [1, 2, 3, 10], [1, 2, 3, 9], [1, 2, 3, 9, 10], [1, 2, 3, 8], [1, 2, 3, 8, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 9, 10], [1, 2, 3, 7], [1, 2, 3, 7, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 6], [1, 2, 3, 6, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 5], [1, 2, 3, 5, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4], [1, 2, 3, 4, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4]), [[], [4], [3], [3, 4], [2], [2, 4], [2, 3], [2, 3, 4], [1], [1, 4], [1, 3], [1, 3, 4], [1, 2], [1, 2, 4], [1, 2, 3], [1, 2, 3, 4], [0], [0, 4], [0, 3], [0, 3, 4], [0, 2], [0, 2, 4], [0, 2, 3], [0, 2, 3, 4], [0, 1], [0, 1, 4], [0, 1, 3], [0, 1, 3, 4], [0, 1, 2], [0, 1, 2, 4], [0, 1, 2, 3], [0, 1, 2, 3, 4]])\n assert answers_match(candidate(nums=[1, -1, 2, -2, 3, -3, 4, -4, 5, -5]), [[], [-5], [5], [5, -5], [-4], [-4, -5], [-4, 5], [-4, 5, -5], [4], [4, -5], [4, 5], [4, 5, -5], [4, -4], [4, -4, -5], [4, -4, 5], [4, -4, 5, -5], [-3], [-3, -5], [-3, 5], [-3, 5, -5], [-3, -4], [-3, -4, -5], [-3, -4, 5], [-3, -4, 5, -5], [-3, 4], [-3, 4, -5], [-3, 4, 5], [-3, 4, 5, -5], [-3, 4, -4], [-3, 4, -4, -5], [-3, 4, -4, 5], [-3, 4, -4, 5, -5], [3], [3, -5], [3, 5], [3, 5, -5], [3, -4], [3, -4, -5], [3, -4, 5], [3, -4, 5, -5], [3, 4], [3, 4, -5], [3, 4, 5], [3, 4, 5, -5], [3, 4, -4], [3, 4, -4, -5], [3, 4, -4, 5], [3, 4, -4, 5, -5], [3, -3], [3, -3, -5], [3, -3, 5], [3, -3, 5, -5], [3, -3, -4], [3, -3, -4, -5], [3, -3, -4, 5], [3, -3, -4, 5, -5], [3, -3, 4], [3, -3, 4, -5], [3, -3, 4, 5], [3, -3, 4, 5, -5], [3, -3, 4, -4], [3, -3, 4, -4, -5], [3, -3, 4, -4, 5], [3, -3, 4, -4, 5, -5], [-2], [-2, -5], [-2, 5], [-2, 5, -5], [-2, -4], [-2, -4, -5], [-2, -4, 5], [-2, -4, 5, -5], [-2, 4], [-2, 4, -5], [-2, 4, 5], [-2, 4, 5, -5], [-2, 4, -4], [-2, 4, -4, -5], [-2, 4, -4, 5], [-2, 4, -4, 5, -5], [-2, -3], [-2, -3, -5], [-2, -3, 5], [-2, -3, 5, -5], [-2, -3, -4], [-2, -3, -4, -5], [-2, -3, -4, 5], [-2, -3, -4, 5, -5], [-2, -3, 4], [-2, -3, 4, -5], [-2, -3, 4, 5], [-2, -3, 4, 5, -5], [-2, -3, 4, -4], [-2, -3, 4, -4, -5], [-2, -3, 4, -4, 5], [-2, -3, 4, -4, 5, -5], [-2, 3], [-2, 3, -5], [-2, 3, 5], [-2, 3, 5, -5], [-2, 3, -4], [-2, 3, -4, -5], [-2, 3, -4, 5], [-2, 3, -4, 5, -5], [-2, 3, 4], [-2, 3, 4, -5], [-2, 3, 4, 5], [-2, 3, 4, 5, -5], [-2, 3, 4, -4], [-2, 3, 4, -4, -5], [-2, 3, 4, -4, 5], [-2, 3, 4, -4, 5, -5], [-2, 3, -3], [-2, 3, -3, -5], [-2, 3, -3, 5], [-2, 3, -3, 5, -5], [-2, 3, -3, -4], [-2, 3, -3, -4, -5], [-2, 3, -3, -4, 5], [-2, 3, -3, -4, 5, -5], [-2, 3, -3, 4], [-2, 3, -3, 4, -5], [-2, 3, -3, 4, 5], [-2, 3, -3, 4, 5, -5], [-2, 3, -3, 4, -4], [-2, 3, -3, 4, -4, -5], [-2, 3, -3, 4, -4, 5], [-2, 3, -3, 4, -4, 5, -5], [2], [2, -5], [2, 5], [2, 5, -5], [2, -4], [2, -4, -5], [2, -4, 5], [2, -4, 5, -5], [2, 4], [2, 4, -5], [2, 4, 5], [2, 4, 5, -5], [2, 4, -4], [2, 4, -4, -5], [2, 4, -4, 5], [2, 4, -4, 5, -5], [2, -3], [2, -3, -5], [2, -3, 5], [2, -3, 5, -5], [2, -3, -4], [2, -3, -4, -5], [2, -3, -4, 5], [2, -3, -4, 5, -5], [2, -3, 4], [2, -3, 4, -5], [2, -3, 4, 5], [2, -3, 4, 5, -5], [2, -3, 4, -4], [2, -3, 4, -4, -5], [2, -3, 4, -4, 5], [2, -3, 4, -4, 5, -5], [2, 3], [2, 3, -5], [2, 3, 5], [2, 3, 5, -5], [2, 3, -4], [2, 3, -4, -5], [2, 3, -4, 5], [2, 3, -4, 5, -5], [2, 3, 4], [2, 3, 4, -5], [2, 3, 4, 5], [2, 3, 4, 5, -5], [2, 3, 4, -4], [2, 3, 4, -4, -5], [2, 3, 4, -4, 5], [2, 3, 4, -4, 5, -5], [2, 3, -3], [2, 3, -3, -5], [2, 3, -3, 5], [2, 3, -3, 5, -5], [2, 3, -3, -4], [2, 3, -3, -4, -5], [2, 3, -3, -4, 5], [2, 3, -3, -4, 5, -5], [2, 3, -3, 4], [2, 3, -3, 4, -5], [2, 3, -3, 4, 5], [2, 3, -3, 4, 5, -5], [2, 3, -3, 4, -4], [2, 3, -3, 4, -4, -5], [2, 3, -3, 4, -4, 5], [2, 3, -3, 4, -4, 5, -5], [2, -2], [2, -2, -5], [2, -2, 5], [2, -2, 5, -5], [2, -2, -4], [2, -2, -4, -5], [2, -2, -4, 5], [2, -2, -4, 5, -5], [2, -2, 4], [2, -2, 4, -5], [2, -2, 4, 5], [2, -2, 4, 5, -5], [2, -2, 4, -4], [2, -2, 4, -4, -5], [2, -2, 4, -4, 5], [2, -2, 4, -4, 5, -5], [2, -2, -3], [2, -2, -3, -5], [2, -2, -3, 5], [2, -2, -3, 5, -5], [2, -2, -3, -4], [2, -2, -3, -4, -5], [2, -2, -3, -4, 5], [2, -2, -3, -4, 5, -5], [2, -2, -3, 4], [2, -2, -3, 4, -5], [2, -2, -3, 4, 5], [2, -2, -3, 4, 5, -5], [2, -2, -3, 4, -4], [2, -2, -3, 4, -4, -5], [2, -2, -3, 4, -4, 5], [2, -2, -3, 4, -4, 5, -5], [2, -2, 3], [2, -2, 3, -5], [2, -2, 3, 5], [2, -2, 3, 5, -5], [2, -2, 3, -4], [2, -2, 3, -4, -5], [2, -2, 3, -4, 5], [2, -2, 3, -4, 5, -5], [2, -2, 3, 4], [2, -2, 3, 4, -5], [2, -2, 3, 4, 5], [2, -2, 3, 4, 5, -5], [2, -2, 3, 4, -4], [2, -2, 3, 4, -4, -5], [2, -2, 3, 4, -4, 5], [2, -2, 3, 4, -4, 5, -5], [2, -2, 3, -3], [2, -2, 3, -3, -5], [2, -2, 3, -3, 5], [2, -2, 3, -3, 5, -5], [2, -2, 3, -3, -4], [2, -2, 3, -3, -4, -5], [2, -2, 3, -3, -4, 5], [2, -2, 3, -3, -4, 5, -5], [2, -2, 3, -3, 4], [2, -2, 3, -3, 4, -5], [2, -2, 3, -3, 4, 5], [2, -2, 3, -3, 4, 5, -5], [2, -2, 3, -3, 4, -4], [2, -2, 3, -3, 4, -4, -5], [2, -2, 3, -3, 4, -4, 5], [2, -2, 3, -3, 4, -4, 5, -5], [-1], [-1, -5], [-1, 5], [-1, 5, -5], [-1, -4], [-1, -4, -5], [-1, -4, 5], [-1, -4, 5, -5], [-1, 4], [-1, 4, -5], [-1, 4, 5], [-1, 4, 5, -5], [-1, 4, -4], [-1, 4, -4, -5], [-1, 4, -4, 5], [-1, 4, -4, 5, -5], [-1, -3], [-1, -3, -5], [-1, -3, 5], [-1, -3, 5, -5], [-1, -3, -4], [-1, -3, -4, -5], [-1, -3, -4, 5], [-1, -3, -4, 5, -5], [-1, -3, 4], [-1, -3, 4, -5], [-1, -3, 4, 5], [-1, -3, 4, 5, -5], [-1, -3, 4, -4], [-1, -3, 4, -4, -5], [-1, -3, 4, -4, 5], [-1, -3, 4, -4, 5, -5], [-1, 3], [-1, 3, -5], [-1, 3, 5], [-1, 3, 5, -5], [-1, 3, -4], [-1, 3, -4, -5], [-1, 3, -4, 5], [-1, 3, -4, 5, -5], [-1, 3, 4], [-1, 3, 4, -5], [-1, 3, 4, 5], [-1, 3, 4, 5, -5], [-1, 3, 4, -4], [-1, 3, 4, -4, -5], [-1, 3, 4, -4, 5], [-1, 3, 4, -4, 5, -5], [-1, 3, -3], [-1, 3, -3, -5], [-1, 3, -3, 5], [-1, 3, -3, 5, -5], [-1, 3, -3, -4], [-1, 3, -3, -4, -5], [-1, 3, -3, -4, 5], [-1, 3, -3, -4, 5, -5], [-1, 3, -3, 4], [-1, 3, -3, 4, -5], [-1, 3, -3, 4, 5], [-1, 3, -3, 4, 5, -5], [-1, 3, -3, 4, -4], [-1, 3, -3, 4, -4, -5], [-1, 3, -3, 4, -4, 5], [-1, 3, -3, 4, -4, 5, -5], [-1, -2], [-1, -2, -5], [-1, -2, 5], [-1, -2, 5, -5], [-1, -2, -4], [-1, -2, -4, -5], [-1, -2, -4, 5], [-1, -2, -4, 5, -5], [-1, -2, 4], [-1, -2, 4, -5], [-1, -2, 4, 5], [-1, -2, 4, 5, -5], [-1, -2, 4, -4], [-1, -2, 4, -4, -5], [-1, -2, 4, -4, 5], [-1, -2, 4, -4, 5, -5], [-1, -2, -3], [-1, -2, -3, -5], [-1, -2, -3, 5], [-1, -2, -3, 5, -5], [-1, -2, -3, -4], [-1, -2, -3, -4, -5], [-1, -2, -3, -4, 5], [-1, -2, -3, -4, 5, -5], [-1, -2, -3, 4], [-1, -2, -3, 4, -5], [-1, -2, -3, 4, 5], [-1, -2, -3, 4, 5, -5], [-1, -2, -3, 4, -4], [-1, -2, -3, 4, -4, -5], [-1, -2, -3, 4, -4, 5], [-1, -2, -3, 4, -4, 5, -5], [-1, -2, 3], [-1, -2, 3, -5], [-1, -2, 3, 5], [-1, -2, 3, 5, -5], [-1, -2, 3, -4], [-1, -2, 3, -4, -5], [-1, -2, 3, -4, 5], [-1, -2, 3, -4, 5, -5], [-1, -2, 3, 4], [-1, -2, 3, 4, -5], [-1, -2, 3, 4, 5], [-1, -2, 3, 4, 5, -5], [-1, -2, 3, 4, -4], [-1, -2, 3, 4, -4, -5], [-1, -2, 3, 4, -4, 5], [-1, -2, 3, 4, -4, 5, -5], [-1, -2, 3, -3], [-1, -2, 3, -3, -5], [-1, -2, 3, -3, 5], [-1, -2, 3, -3, 5, -5], [-1, -2, 3, -3, -4], [-1, -2, 3, -3, -4, -5], [-1, -2, 3, -3, -4, 5], [-1, -2, 3, -3, -4, 5, -5], [-1, -2, 3, -3, 4], [-1, -2, 3, -3, 4, -5], [-1, -2, 3, -3, 4, 5], [-1, -2, 3, -3, 4, 5, -5], [-1, -2, 3, -3, 4, -4], [-1, -2, 3, -3, 4, -4, -5], [-1, -2, 3, -3, 4, -4, 5], [-1, -2, 3, -3, 4, -4, 5, -5], [-1, 2], [-1, 2, -5], [-1, 2, 5], [-1, 2, 5, -5], [-1, 2, -4], [-1, 2, -4, -5], [-1, 2, -4, 5], [-1, 2, -4, 5, -5], [-1, 2, 4], [-1, 2, 4, -5], [-1, 2, 4, 5], [-1, 2, 4, 5, -5], [-1, 2, 4, -4], [-1, 2, 4, -4, -5], [-1, 2, 4, -4, 5], [-1, 2, 4, -4, 5, -5], [-1, 2, -3], [-1, 2, -3, -5], [-1, 2, -3, 5], [-1, 2, -3, 5, -5], [-1, 2, -3, -4], [-1, 2, -3, -4, -5], [-1, 2, -3, -4, 5], [-1, 2, -3, -4, 5, -5], [-1, 2, -3, 4], [-1, 2, -3, 4, -5], [-1, 2, -3, 4, 5], [-1, 2, -3, 4, 5, -5], [-1, 2, -3, 4, -4], [-1, 2, -3, 4, -4, -5], [-1, 2, -3, 4, -4, 5], [-1, 2, -3, 4, -4, 5, -5], [-1, 2, 3], [-1, 2, 3, -5], [-1, 2, 3, 5], [-1, 2, 3, 5, -5], [-1, 2, 3, -4], [-1, 2, 3, -4, -5], [-1, 2, 3, -4, 5], [-1, 2, 3, -4, 5, -5], [-1, 2, 3, 4], [-1, 2, 3, 4, -5], [-1, 2, 3, 4, 5], [-1, 2, 3, 4, 5, -5], [-1, 2, 3, 4, -4], [-1, 2, 3, 4, -4, -5], [-1, 2, 3, 4, -4, 5], [-1, 2, 3, 4, -4, 5, -5], [-1, 2, 3, -3], [-1, 2, 3, -3, -5], [-1, 2, 3, -3, 5], [-1, 2, 3, -3, 5, -5], [-1, 2, 3, -3, -4], [-1, 2, 3, -3, -4, -5], [-1, 2, 3, -3, -4, 5], [-1, 2, 3, -3, -4, 5, -5], [-1, 2, 3, -3, 4], [-1, 2, 3, -3, 4, -5], [-1, 2, 3, -3, 4, 5], [-1, 2, 3, -3, 4, 5, -5], [-1, 2, 3, -3, 4, -4], [-1, 2, 3, -3, 4, -4, -5], [-1, 2, 3, -3, 4, -4, 5], [-1, 2, 3, -3, 4, -4, 5, -5], [-1, 2, -2], [-1, 2, -2, -5], [-1, 2, -2, 5], [-1, 2, -2, 5, -5], [-1, 2, -2, -4], [-1, 2, -2, -4, -5], [-1, 2, -2, -4, 5], [-1, 2, -2, -4, 5, -5], [-1, 2, -2, 4], [-1, 2, -2, 4, -5], [-1, 2, -2, 4, 5], [-1, 2, -2, 4, 5, -5], [-1, 2, -2, 4, -4], [-1, 2, -2, 4, -4, -5], [-1, 2, -2, 4, -4, 5], [-1, 2, -2, 4, -4, 5, -5], [-1, 2, -2, -3], [-1, 2, -2, -3, -5], [-1, 2, -2, -3, 5], [-1, 2, -2, -3, 5, -5], [-1, 2, -2, -3, -4], [-1, 2, -2, -3, -4, -5], [-1, 2, -2, -3, -4, 5], [-1, 2, -2, -3, -4, 5, -5], [-1, 2, -2, -3, 4], [-1, 2, -2, -3, 4, -5], [-1, 2, -2, -3, 4, 5], [-1, 2, -2, -3, 4, 5, -5], [-1, 2, -2, -3, 4, -4], [-1, 2, -2, -3, 4, -4, -5], [-1, 2, -2, -3, 4, -4, 5], [-1, 2, -2, -3, 4, -4, 5, -5], [-1, 2, -2, 3], [-1, 2, -2, 3, -5], [-1, 2, -2, 3, 5], [-1, 2, -2, 3, 5, -5], [-1, 2, -2, 3, -4], [-1, 2, -2, 3, -4, -5], [-1, 2, -2, 3, -4, 5], [-1, 2, -2, 3, -4, 5, -5], [-1, 2, -2, 3, 4], [-1, 2, -2, 3, 4, -5], [-1, 2, -2, 3, 4, 5], [-1, 2, -2, 3, 4, 5, -5], [-1, 2, -2, 3, 4, -4], [-1, 2, -2, 3, 4, -4, -5], [-1, 2, -2, 3, 4, -4, 5], [-1, 2, -2, 3, 4, -4, 5, -5], [-1, 2, -2, 3, -3], [-1, 2, -2, 3, -3, -5], [-1, 2, -2, 3, -3, 5], [-1, 2, -2, 3, -3, 5, -5], [-1, 2, -2, 3, -3, -4], [-1, 2, -2, 3, -3, -4, -5], [-1, 2, -2, 3, -3, -4, 5], [-1, 2, -2, 3, -3, -4, 5, -5], [-1, 2, -2, 3, -3, 4], [-1, 2, -2, 3, -3, 4, -5], [-1, 2, -2, 3, -3, 4, 5], [-1, 2, -2, 3, -3, 4, 5, -5], [-1, 2, -2, 3, -3, 4, -4], [-1, 2, -2, 3, -3, 4, -4, -5], [-1, 2, -2, 3, -3, 4, -4, 5], [-1, 2, -2, 3, -3, 4, -4, 5, -5], [1], [1, -5], [1, 5], [1, 5, -5], [1, -4], [1, -4, -5], [1, -4, 5], [1, -4, 5, -5], [1, 4], [1, 4, -5], [1, 4, 5], [1, 4, 5, -5], [1, 4, -4], [1, 4, -4, -5], [1, 4, -4, 5], [1, 4, -4, 5, -5], [1, -3], [1, -3, -5], [1, -3, 5], [1, -3, 5, -5], [1, -3, -4], [1, -3, -4, -5], [1, -3, -4, 5], [1, -3, -4, 5, -5], [1, -3, 4], [1, -3, 4, -5], [1, -3, 4, 5], [1, -3, 4, 5, -5], [1, -3, 4, -4], [1, -3, 4, -4, -5], [1, -3, 4, -4, 5], [1, -3, 4, -4, 5, -5], [1, 3], [1, 3, -5], [1, 3, 5], [1, 3, 5, -5], [1, 3, -4], [1, 3, -4, -5], [1, 3, -4, 5], [1, 3, -4, 5, -5], [1, 3, 4], [1, 3, 4, -5], [1, 3, 4, 5], [1, 3, 4, 5, -5], [1, 3, 4, -4], [1, 3, 4, -4, -5], [1, 3, 4, -4, 5], [1, 3, 4, -4, 5, -5], [1, 3, -3], [1, 3, -3, -5], [1, 3, -3, 5], [1, 3, -3, 5, -5], [1, 3, -3, -4], [1, 3, -3, -4, -5], [1, 3, -3, -4, 5], [1, 3, -3, -4, 5, -5], [1, 3, -3, 4], [1, 3, -3, 4, -5], [1, 3, -3, 4, 5], [1, 3, -3, 4, 5, -5], [1, 3, -3, 4, -4], [1, 3, -3, 4, -4, -5], [1, 3, -3, 4, -4, 5], [1, 3, -3, 4, -4, 5, -5], [1, -2], [1, -2, -5], [1, -2, 5], [1, -2, 5, -5], [1, -2, -4], [1, -2, -4, -5], [1, -2, -4, 5], [1, -2, -4, 5, -5], [1, -2, 4], [1, -2, 4, -5], [1, -2, 4, 5], [1, -2, 4, 5, -5], [1, -2, 4, -4], [1, -2, 4, -4, -5], [1, -2, 4, -4, 5], [1, -2, 4, -4, 5, -5], [1, -2, -3], [1, -2, -3, -5], [1, -2, -3, 5], [1, -2, -3, 5, -5], [1, -2, -3, -4], [1, -2, -3, -4, -5], [1, -2, -3, -4, 5], [1, -2, -3, -4, 5, -5], [1, -2, -3, 4], [1, -2, -3, 4, -5], [1, -2, -3, 4, 5], [1, -2, -3, 4, 5, -5], [1, -2, -3, 4, -4], [1, -2, -3, 4, -4, -5], [1, -2, -3, 4, -4, 5], [1, -2, -3, 4, -4, 5, -5], [1, -2, 3], [1, -2, 3, -5], [1, -2, 3, 5], [1, -2, 3, 5, -5], [1, -2, 3, -4], [1, -2, 3, -4, -5], [1, -2, 3, -4, 5], [1, -2, 3, -4, 5, -5], [1, -2, 3, 4], [1, -2, 3, 4, -5], [1, -2, 3, 4, 5], [1, -2, 3, 4, 5, -5], [1, -2, 3, 4, -4], [1, -2, 3, 4, -4, -5], [1, -2, 3, 4, -4, 5], [1, -2, 3, 4, -4, 5, -5], [1, -2, 3, -3], [1, -2, 3, -3, -5], [1, -2, 3, -3, 5], [1, -2, 3, -3, 5, -5], [1, -2, 3, -3, -4], [1, -2, 3, -3, -4, -5], [1, -2, 3, -3, -4, 5], [1, -2, 3, -3, -4, 5, -5], [1, -2, 3, -3, 4], [1, -2, 3, -3, 4, -5], [1, -2, 3, -3, 4, 5], [1, -2, 3, -3, 4, 5, -5], [1, -2, 3, -3, 4, -4], [1, -2, 3, -3, 4, -4, -5], [1, -2, 3, -3, 4, -4, 5], [1, -2, 3, -3, 4, -4, 5, -5], [1, 2], [1, 2, -5], [1, 2, 5], [1, 2, 5, -5], [1, 2, -4], [1, 2, -4, -5], [1, 2, -4, 5], [1, 2, -4, 5, -5], [1, 2, 4], [1, 2, 4, -5], [1, 2, 4, 5], [1, 2, 4, 5, -5], [1, 2, 4, -4], [1, 2, 4, -4, -5], [1, 2, 4, -4, 5], [1, 2, 4, -4, 5, -5], [1, 2, -3], [1, 2, -3, -5], [1, 2, -3, 5], [1, 2, -3, 5, -5], [1, 2, -3, -4], [1, 2, -3, -4, -5], [1, 2, -3, -4, 5], [1, 2, -3, -4, 5, -5], [1, 2, -3, 4], [1, 2, -3, 4, -5], [1, 2, -3, 4, 5], [1, 2, -3, 4, 5, -5], [1, 2, -3, 4, -4], [1, 2, -3, 4, -4, -5], [1, 2, -3, 4, -4, 5], [1, 2, -3, 4, -4, 5, -5], [1, 2, 3], [1, 2, 3, -5], [1, 2, 3, 5], [1, 2, 3, 5, -5], [1, 2, 3, -4], [1, 2, 3, -4, -5], [1, 2, 3, -4, 5], [1, 2, 3, -4, 5, -5], [1, 2, 3, 4], [1, 2, 3, 4, -5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, -5], [1, 2, 3, 4, -4], [1, 2, 3, 4, -4, -5], [1, 2, 3, 4, -4, 5], [1, 2, 3, 4, -4, 5, -5], [1, 2, 3, -3], [1, 2, 3, -3, -5], [1, 2, 3, -3, 5], [1, 2, 3, -3, 5, -5], [1, 2, 3, -3, -4], [1, 2, 3, -3, -4, -5], [1, 2, 3, -3, -4, 5], [1, 2, 3, -3, -4, 5, -5], [1, 2, 3, -3, 4], [1, 2, 3, -3, 4, -5], [1, 2, 3, -3, 4, 5], [1, 2, 3, -3, 4, 5, -5], [1, 2, 3, -3, 4, -4], [1, 2, 3, -3, 4, -4, -5], [1, 2, 3, -3, 4, -4, 5], [1, 2, 3, -3, 4, -4, 5, -5], [1, 2, -2], [1, 2, -2, -5], [1, 2, -2, 5], [1, 2, -2, 5, -5], [1, 2, -2, -4], [1, 2, -2, -4, -5], [1, 2, -2, -4, 5], [1, 2, -2, -4, 5, -5], [1, 2, -2, 4], [1, 2, -2, 4, -5], [1, 2, -2, 4, 5], [1, 2, -2, 4, 5, -5], [1, 2, -2, 4, -4], [1, 2, -2, 4, -4, -5], [1, 2, -2, 4, -4, 5], [1, 2, -2, 4, -4, 5, -5], [1, 2, -2, -3], [1, 2, -2, -3, -5], [1, 2, -2, -3, 5], [1, 2, -2, -3, 5, -5], [1, 2, -2, -3, -4], [1, 2, -2, -3, -4, -5], [1, 2, -2, -3, -4, 5], [1, 2, -2, -3, -4, 5, -5], [1, 2, -2, -3, 4], [1, 2, -2, -3, 4, -5], [1, 2, -2, -3, 4, 5], [1, 2, -2, -3, 4, 5, -5], [1, 2, -2, -3, 4, -4], [1, 2, -2, -3, 4, -4, -5], [1, 2, -2, -3, 4, -4, 5], [1, 2, -2, -3, 4, -4, 5, -5], [1, 2, -2, 3], [1, 2, -2, 3, -5], [1, 2, -2, 3, 5], [1, 2, -2, 3, 5, -5], [1, 2, -2, 3, -4], [1, 2, -2, 3, -4, -5], [1, 2, -2, 3, -4, 5], [1, 2, -2, 3, -4, 5, -5], [1, 2, -2, 3, 4], [1, 2, -2, 3, 4, -5], [1, 2, -2, 3, 4, 5], [1, 2, -2, 3, 4, 5, -5], [1, 2, -2, 3, 4, -4], [1, 2, -2, 3, 4, -4, -5], [1, 2, -2, 3, 4, -4, 5], [1, 2, -2, 3, 4, -4, 5, -5], [1, 2, -2, 3, -3], [1, 2, -2, 3, -3, -5], [1, 2, -2, 3, -3, 5], [1, 2, -2, 3, -3, 5, -5], [1, 2, -2, 3, -3, -4], [1, 2, -2, 3, -3, -4, -5], [1, 2, -2, 3, -3, -4, 5], [1, 2, -2, 3, -3, -4, 5, -5], [1, 2, -2, 3, -3, 4], [1, 2, -2, 3, -3, 4, -5], [1, 2, -2, 3, -3, 4, 5], [1, 2, -2, 3, -3, 4, 5, -5], [1, 2, -2, 3, -3, 4, -4], [1, 2, -2, 3, -3, 4, -4, -5], [1, 2, -2, 3, -3, 4, -4, 5], [1, 2, -2, 3, -3, 4, -4, 5, -5], [1, -1], [1, -1, -5], [1, -1, 5], [1, -1, 5, -5], [1, -1, -4], [1, -1, -4, -5], [1, -1, -4, 5], [1, -1, -4, 5, -5], [1, -1, 4], [1, -1, 4, -5], [1, -1, 4, 5], [1, -1, 4, 5, -5], [1, -1, 4, -4], [1, -1, 4, -4, -5], [1, -1, 4, -4, 5], [1, -1, 4, -4, 5, -5], [1, -1, -3], [1, -1, -3, -5], [1, -1, -3, 5], [1, -1, -3, 5, -5], [1, -1, -3, -4], [1, -1, -3, -4, -5], [1, -1, -3, -4, 5], [1, -1, -3, -4, 5, -5], [1, -1, -3, 4], [1, -1, -3, 4, -5], [1, -1, -3, 4, 5], [1, -1, -3, 4, 5, -5], [1, -1, -3, 4, -4], [1, -1, -3, 4, -4, -5], [1, -1, -3, 4, -4, 5], [1, -1, -3, 4, -4, 5, -5], [1, -1, 3], [1, -1, 3, -5], [1, -1, 3, 5], [1, -1, 3, 5, -5], [1, -1, 3, -4], [1, -1, 3, -4, -5], [1, -1, 3, -4, 5], [1, -1, 3, -4, 5, -5], [1, -1, 3, 4], [1, -1, 3, 4, -5], [1, -1, 3, 4, 5], [1, -1, 3, 4, 5, -5], [1, -1, 3, 4, -4], [1, -1, 3, 4, -4, -5], [1, -1, 3, 4, -4, 5], [1, -1, 3, 4, -4, 5, -5], [1, -1, 3, -3], [1, -1, 3, -3, -5], [1, -1, 3, -3, 5], [1, -1, 3, -3, 5, -5], [1, -1, 3, -3, -4], [1, -1, 3, -3, -4, -5], [1, -1, 3, -3, -4, 5], [1, -1, 3, -3, -4, 5, -5], [1, -1, 3, -3, 4], [1, -1, 3, -3, 4, -5], [1, -1, 3, -3, 4, 5], [1, -1, 3, -3, 4, 5, -5], [1, -1, 3, -3, 4, -4], [1, -1, 3, -3, 4, -4, -5], [1, -1, 3, -3, 4, -4, 5], [1, -1, 3, -3, 4, -4, 5, -5], [1, -1, -2], [1, -1, -2, -5], [1, -1, -2, 5], [1, -1, -2, 5, -5], [1, -1, -2, -4], [1, -1, -2, -4, -5], [1, -1, -2, -4, 5], [1, -1, -2, -4, 5, -5], [1, -1, -2, 4], [1, -1, -2, 4, -5], [1, -1, -2, 4, 5], [1, -1, -2, 4, 5, -5], [1, -1, -2, 4, -4], [1, -1, -2, 4, -4, -5], [1, -1, -2, 4, -4, 5], [1, -1, -2, 4, -4, 5, -5], [1, -1, -2, -3], [1, -1, -2, -3, -5], [1, -1, -2, -3, 5], [1, -1, -2, -3, 5, -5], [1, -1, -2, -3, -4], [1, -1, -2, -3, -4, -5], [1, -1, -2, -3, -4, 5], [1, -1, -2, -3, -4, 5, -5], [1, -1, -2, -3, 4], [1, -1, -2, -3, 4, -5], [1, -1, -2, -3, 4, 5], [1, -1, -2, -3, 4, 5, -5], [1, -1, -2, -3, 4, -4], [1, -1, -2, -3, 4, -4, -5], [1, -1, -2, -3, 4, -4, 5], [1, -1, -2, -3, 4, -4, 5, -5], [1, -1, -2, 3], [1, -1, -2, 3, -5], [1, -1, -2, 3, 5], [1, -1, -2, 3, 5, -5], [1, -1, -2, 3, -4], [1, -1, -2, 3, -4, -5], [1, -1, -2, 3, -4, 5], [1, -1, -2, 3, -4, 5, -5], [1, -1, -2, 3, 4], [1, -1, -2, 3, 4, -5], [1, -1, -2, 3, 4, 5], [1, -1, -2, 3, 4, 5, -5], [1, -1, -2, 3, 4, -4], [1, -1, -2, 3, 4, -4, -5], [1, -1, -2, 3, 4, -4, 5], [1, -1, -2, 3, 4, -4, 5, -5], [1, -1, -2, 3, -3], [1, -1, -2, 3, -3, -5], [1, -1, -2, 3, -3, 5], [1, -1, -2, 3, -3, 5, -5], [1, -1, -2, 3, -3, -4], [1, -1, -2, 3, -3, -4, -5], [1, -1, -2, 3, -3, -4, 5], [1, -1, -2, 3, -3, -4, 5, -5], [1, -1, -2, 3, -3, 4], [1, -1, -2, 3, -3, 4, -5], [1, -1, -2, 3, -3, 4, 5], [1, -1, -2, 3, -3, 4, 5, -5], [1, -1, -2, 3, -3, 4, -4], [1, -1, -2, 3, -3, 4, -4, -5], [1, -1, -2, 3, -3, 4, -4, 5], [1, -1, -2, 3, -3, 4, -4, 5, -5], [1, -1, 2], [1, -1, 2, -5], [1, -1, 2, 5], [1, -1, 2, 5, -5], [1, -1, 2, -4], [1, -1, 2, -4, -5], [1, -1, 2, -4, 5], [1, -1, 2, -4, 5, -5], [1, -1, 2, 4], [1, -1, 2, 4, -5], [1, -1, 2, 4, 5], [1, -1, 2, 4, 5, -5], [1, -1, 2, 4, -4], [1, -1, 2, 4, -4, -5], [1, -1, 2, 4, -4, 5], [1, -1, 2, 4, -4, 5, -5], [1, -1, 2, -3], [1, -1, 2, -3, -5], [1, -1, 2, -3, 5], [1, -1, 2, -3, 5, -5], [1, -1, 2, -3, -4], [1, -1, 2, -3, -4, -5], [1, -1, 2, -3, -4, 5], [1, -1, 2, -3, -4, 5, -5], [1, -1, 2, -3, 4], [1, -1, 2, -3, 4, -5], [1, -1, 2, -3, 4, 5], [1, -1, 2, -3, 4, 5, -5], [1, -1, 2, -3, 4, -4], [1, -1, 2, -3, 4, -4, -5], [1, -1, 2, -3, 4, -4, 5], [1, -1, 2, -3, 4, -4, 5, -5], [1, -1, 2, 3], [1, -1, 2, 3, -5], [1, -1, 2, 3, 5], [1, -1, 2, 3, 5, -5], [1, -1, 2, 3, -4], [1, -1, 2, 3, -4, -5], [1, -1, 2, 3, -4, 5], [1, -1, 2, 3, -4, 5, -5], [1, -1, 2, 3, 4], [1, -1, 2, 3, 4, -5], [1, -1, 2, 3, 4, 5], [1, -1, 2, 3, 4, 5, -5], [1, -1, 2, 3, 4, -4], [1, -1, 2, 3, 4, -4, -5], [1, -1, 2, 3, 4, -4, 5], [1, -1, 2, 3, 4, -4, 5, -5], [1, -1, 2, 3, -3], [1, -1, 2, 3, -3, -5], [1, -1, 2, 3, -3, 5], [1, -1, 2, 3, -3, 5, -5], [1, -1, 2, 3, -3, -4], [1, -1, 2, 3, -3, -4, -5], [1, -1, 2, 3, -3, -4, 5], [1, -1, 2, 3, -3, -4, 5, -5], [1, -1, 2, 3, -3, 4], [1, -1, 2, 3, -3, 4, -5], [1, -1, 2, 3, -3, 4, 5], [1, -1, 2, 3, -3, 4, 5, -5], [1, -1, 2, 3, -3, 4, -4], [1, -1, 2, 3, -3, 4, -4, -5], [1, -1, 2, 3, -3, 4, -4, 5], [1, -1, 2, 3, -3, 4, -4, 5, -5], [1, -1, 2, -2], [1, -1, 2, -2, -5], [1, -1, 2, -2, 5], [1, -1, 2, -2, 5, -5], [1, -1, 2, -2, -4], [1, -1, 2, -2, -4, -5], [1, -1, 2, -2, -4, 5], [1, -1, 2, -2, -4, 5, -5], [1, -1, 2, -2, 4], [1, -1, 2, -2, 4, -5], [1, -1, 2, -2, 4, 5], [1, -1, 2, -2, 4, 5, -5], [1, -1, 2, -2, 4, -4], [1, -1, 2, -2, 4, -4, -5], [1, -1, 2, -2, 4, -4, 5], [1, -1, 2, -2, 4, -4, 5, -5], [1, -1, 2, -2, -3], [1, -1, 2, -2, -3, -5], [1, -1, 2, -2, -3, 5], [1, -1, 2, -2, -3, 5, -5], [1, -1, 2, -2, -3, -4], [1, -1, 2, -2, -3, -4, -5], [1, -1, 2, -2, -3, -4, 5], [1, -1, 2, -2, -3, -4, 5, -5], [1, -1, 2, -2, -3, 4], [1, -1, 2, -2, -3, 4, -5], [1, -1, 2, -2, -3, 4, 5], [1, -1, 2, -2, -3, 4, 5, -5], [1, -1, 2, -2, -3, 4, -4], [1, -1, 2, -2, -3, 4, -4, -5], [1, -1, 2, -2, -3, 4, -4, 5], [1, -1, 2, -2, -3, 4, -4, 5, -5], [1, -1, 2, -2, 3], [1, -1, 2, -2, 3, -5], [1, -1, 2, -2, 3, 5], [1, -1, 2, -2, 3, 5, -5], [1, -1, 2, -2, 3, -4], [1, -1, 2, -2, 3, -4, -5], [1, -1, 2, -2, 3, -4, 5], [1, -1, 2, -2, 3, -4, 5, -5], [1, -1, 2, -2, 3, 4], [1, -1, 2, -2, 3, 4, -5], [1, -1, 2, -2, 3, 4, 5], [1, -1, 2, -2, 3, 4, 5, -5], [1, -1, 2, -2, 3, 4, -4], [1, -1, 2, -2, 3, 4, -4, -5], [1, -1, 2, -2, 3, 4, -4, 5], [1, -1, 2, -2, 3, 4, -4, 5, -5], [1, -1, 2, -2, 3, -3], [1, -1, 2, -2, 3, -3, -5], [1, -1, 2, -2, 3, -3, 5], [1, -1, 2, -2, 3, -3, 5, -5], [1, -1, 2, -2, 3, -3, -4], [1, -1, 2, -2, 3, -3, -4, -5], [1, -1, 2, -2, 3, -3, -4, 5], [1, -1, 2, -2, 3, -3, -4, 5, -5], [1, -1, 2, -2, 3, -3, 4], [1, -1, 2, -2, 3, -3, 4, -5], [1, -1, 2, -2, 3, -3, 4, 5], [1, -1, 2, -2, 3, -3, 4, 5, -5], [1, -1, 2, -2, 3, -3, 4, -4], [1, -1, 2, -2, 3, -3, 4, -4, -5], [1, -1, 2, -2, 3, -3, 4, -4, 5], [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]])\n assert answers_match(candidate(nums=[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]), [[], [-1], [-2], [-2, -1], [-3], [-3, -1], [-3, -2], [-3, -2, -1], [-4], [-4, -1], [-4, -2], [-4, -2, -1], [-4, -3], [-4, -3, -1], [-4, -3, -2], [-4, -3, -2, -1], [-5], [-5, -1], [-5, -2], [-5, -2, -1], [-5, -3], [-5, -3, -1], [-5, -3, -2], [-5, -3, -2, -1], [-5, -4], [-5, -4, -1], [-5, -4, -2], [-5, -4, -2, -1], [-5, -4, -3], [-5, -4, -3, -1], [-5, -4, -3, -2], [-5, -4, -3, -2, -1], [-6], [-6, -1], [-6, -2], [-6, -2, -1], [-6, -3], [-6, -3, -1], [-6, -3, -2], [-6, -3, -2, -1], [-6, -4], [-6, -4, -1], [-6, -4, -2], [-6, -4, -2, -1], [-6, -4, -3], [-6, -4, -3, -1], [-6, -4, -3, -2], [-6, -4, -3, -2, -1], [-6, -5], [-6, -5, -1], [-6, -5, -2], [-6, -5, -2, -1], [-6, -5, -3], [-6, -5, -3, -1], [-6, -5, -3, -2], [-6, -5, -3, -2, -1], [-6, -5, -4], [-6, -5, -4, -1], [-6, -5, -4, -2], [-6, -5, -4, -2, -1], [-6, -5, -4, -3], [-6, -5, -4, -3, -1], [-6, -5, -4, -3, -2], [-6, -5, -4, -3, -2, -1], [-7], [-7, -1], [-7, -2], [-7, -2, -1], [-7, -3], [-7, -3, -1], [-7, -3, -2], [-7, -3, -2, -1], [-7, -4], [-7, -4, -1], [-7, -4, -2], [-7, -4, -2, -1], [-7, -4, -3], [-7, -4, -3, -1], [-7, -4, -3, -2], [-7, -4, -3, -2, -1], [-7, -5], [-7, -5, -1], [-7, -5, -2], [-7, -5, -2, -1], [-7, -5, -3], [-7, -5, -3, -1], [-7, -5, -3, -2], [-7, -5, -3, -2, -1], [-7, -5, -4], [-7, -5, -4, -1], [-7, -5, -4, -2], [-7, -5, -4, -2, -1], [-7, -5, -4, -3], [-7, -5, -4, -3, -1], [-7, -5, -4, -3, -2], [-7, -5, -4, -3, -2, -1], [-7, -6], [-7, -6, -1], [-7, -6, -2], [-7, -6, -2, -1], [-7, -6, -3], [-7, -6, -3, -1], [-7, -6, -3, -2], [-7, -6, -3, -2, -1], [-7, -6, -4], [-7, -6, -4, -1], [-7, -6, -4, -2], [-7, -6, -4, -2, -1], [-7, -6, -4, -3], [-7, -6, -4, -3, -1], [-7, -6, -4, -3, -2], [-7, -6, -4, -3, -2, -1], [-7, -6, -5], [-7, -6, -5, -1], [-7, -6, -5, -2], [-7, -6, -5, -2, -1], [-7, -6, -5, -3], [-7, -6, -5, -3, -1], [-7, -6, -5, -3, -2], [-7, -6, -5, -3, -2, -1], [-7, -6, -5, -4], [-7, -6, -5, -4, -1], [-7, -6, -5, -4, -2], [-7, -6, -5, -4, -2, -1], [-7, -6, -5, -4, -3], [-7, -6, -5, -4, -3, -1], [-7, -6, -5, -4, -3, -2], [-7, -6, -5, -4, -3, -2, -1], [-8], [-8, -1], [-8, -2], [-8, -2, -1], [-8, -3], [-8, -3, -1], [-8, -3, -2], [-8, -3, -2, -1], [-8, -4], [-8, -4, -1], [-8, -4, -2], [-8, -4, -2, -1], [-8, -4, -3], [-8, -4, -3, -1], [-8, -4, -3, -2], [-8, -4, -3, -2, -1], [-8, -5], [-8, -5, -1], [-8, -5, -2], [-8, -5, -2, -1], [-8, -5, -3], [-8, -5, -3, -1], [-8, -5, -3, -2], [-8, -5, -3, -2, -1], [-8, -5, -4], [-8, -5, -4, -1], [-8, -5, -4, -2], [-8, -5, -4, -2, -1], [-8, -5, -4, -3], [-8, -5, -4, -3, -1], [-8, -5, -4, -3, -2], [-8, -5, -4, -3, -2, -1], [-8, -6], [-8, -6, -1], [-8, -6, -2], [-8, -6, -2, -1], [-8, -6, -3], [-8, -6, -3, -1], [-8, -6, -3, -2], [-8, -6, -3, -2, -1], [-8, -6, -4], [-8, -6, -4, -1], [-8, -6, -4, -2], [-8, -6, -4, -2, -1], [-8, -6, -4, -3], [-8, -6, -4, -3, -1], [-8, -6, -4, -3, -2], [-8, -6, -4, -3, -2, -1], [-8, -6, -5], [-8, -6, -5, -1], [-8, -6, -5, -2], [-8, -6, -5, -2, -1], [-8, -6, -5, -3], [-8, -6, -5, -3, -1], [-8, -6, -5, -3, -2], [-8, -6, -5, -3, -2, -1], [-8, -6, -5, -4], [-8, -6, -5, -4, -1], [-8, -6, -5, -4, -2], [-8, -6, -5, -4, -2, -1], [-8, -6, -5, -4, -3], [-8, -6, -5, -4, -3, -1], [-8, -6, -5, -4, -3, -2], [-8, -6, -5, -4, -3, -2, -1], [-8, -7], [-8, -7, -1], [-8, -7, -2], [-8, -7, -2, -1], [-8, -7, -3], [-8, -7, -3, -1], [-8, -7, -3, -2], [-8, -7, -3, -2, -1], [-8, -7, -4], [-8, -7, -4, -1], [-8, -7, -4, -2], [-8, -7, -4, -2, -1], [-8, -7, -4, -3], [-8, -7, -4, -3, -1], [-8, -7, -4, -3, -2], [-8, -7, -4, -3, -2, -1], [-8, -7, -5], [-8, -7, -5, -1], [-8, -7, -5, -2], [-8, -7, -5, -2, -1], [-8, -7, -5, -3], [-8, -7, -5, -3, -1], [-8, -7, -5, -3, -2], [-8, -7, -5, -3, -2, -1], [-8, -7, -5, -4], [-8, -7, -5, -4, -1], [-8, -7, -5, -4, -2], [-8, -7, -5, -4, -2, -1], [-8, -7, -5, -4, -3], [-8, -7, -5, -4, -3, -1], [-8, -7, -5, -4, -3, -2], [-8, -7, -5, -4, -3, -2, -1], [-8, -7, -6], [-8, -7, -6, -1], [-8, -7, -6, -2], [-8, -7, -6, -2, -1], [-8, -7, -6, -3], [-8, -7, -6, -3, -1], [-8, -7, -6, -3, -2], [-8, -7, -6, -3, -2, -1], [-8, -7, -6, -4], [-8, -7, -6, -4, -1], [-8, -7, -6, -4, -2], [-8, -7, -6, -4, -2, -1], [-8, -7, -6, -4, -3], [-8, -7, -6, -4, -3, -1], [-8, -7, -6, -4, -3, -2], [-8, -7, -6, -4, -3, -2, -1], [-8, -7, -6, -5], [-8, -7, -6, -5, -1], [-8, -7, -6, -5, -2], [-8, -7, -6, -5, -2, -1], [-8, -7, -6, -5, -3], [-8, -7, -6, -5, -3, -1], [-8, -7, -6, -5, -3, -2], [-8, -7, -6, -5, -3, -2, -1], [-8, -7, -6, -5, -4], [-8, -7, -6, -5, -4, -1], [-8, -7, -6, -5, -4, -2], [-8, -7, -6, -5, -4, -2, -1], [-8, -7, -6, -5, -4, -3], [-8, -7, -6, -5, -4, -3, -1], [-8, -7, -6, -5, -4, -3, -2], [-8, -7, -6, -5, -4, -3, -2, -1], [-9], [-9, -1], [-9, -2], [-9, -2, -1], [-9, -3], [-9, -3, -1], [-9, -3, -2], [-9, -3, -2, -1], [-9, -4], [-9, -4, -1], [-9, -4, -2], [-9, -4, -2, -1], [-9, -4, -3], [-9, -4, -3, -1], [-9, -4, -3, -2], [-9, -4, -3, -2, -1], [-9, -5], [-9, -5, -1], [-9, -5, -2], [-9, -5, -2, -1], [-9, -5, -3], [-9, -5, -3, -1], [-9, -5, -3, -2], [-9, -5, -3, -2, -1], [-9, -5, -4], [-9, -5, -4, -1], [-9, -5, -4, -2], [-9, -5, -4, -2, -1], [-9, -5, -4, -3], [-9, -5, -4, -3, -1], [-9, -5, -4, -3, -2], [-9, -5, -4, -3, -2, -1], [-9, -6], [-9, -6, -1], [-9, -6, -2], [-9, -6, -2, -1], [-9, -6, -3], [-9, -6, -3, -1], [-9, -6, -3, -2], [-9, -6, -3, -2, -1], [-9, -6, -4], [-9, -6, -4, -1], [-9, -6, -4, -2], [-9, -6, -4, -2, -1], [-9, -6, -4, -3], [-9, -6, -4, -3, -1], [-9, -6, -4, -3, -2], [-9, -6, -4, -3, -2, -1], [-9, -6, -5], [-9, -6, -5, -1], [-9, -6, -5, -2], [-9, -6, -5, -2, -1], [-9, -6, -5, -3], [-9, -6, -5, -3, -1], [-9, -6, -5, -3, -2], [-9, -6, -5, -3, -2, -1], [-9, -6, -5, -4], [-9, -6, -5, -4, -1], [-9, -6, -5, -4, -2], [-9, -6, -5, -4, -2, -1], [-9, -6, -5, -4, -3], [-9, -6, -5, -4, -3, -1], [-9, -6, -5, -4, -3, -2], [-9, -6, -5, -4, -3, -2, -1], [-9, -7], [-9, -7, -1], [-9, -7, -2], [-9, -7, -2, -1], [-9, -7, -3], [-9, -7, -3, -1], [-9, -7, -3, -2], [-9, -7, -3, -2, -1], [-9, -7, -4], [-9, -7, -4, -1], [-9, -7, -4, -2], [-9, -7, -4, -2, -1], [-9, -7, -4, -3], [-9, -7, -4, -3, -1], [-9, -7, -4, -3, -2], [-9, -7, -4, -3, -2, -1], [-9, -7, -5], [-9, -7, -5, -1], [-9, -7, -5, -2], [-9, -7, -5, -2, -1], [-9, -7, -5, -3], [-9, -7, -5, -3, -1], [-9, -7, -5, -3, -2], [-9, -7, -5, -3, -2, -1], [-9, -7, -5, -4], [-9, -7, -5, -4, -1], [-9, -7, -5, -4, -2], [-9, -7, -5, -4, -2, -1], [-9, -7, -5, -4, -3], [-9, -7, -5, -4, -3, -1], [-9, -7, -5, -4, -3, -2], [-9, -7, -5, -4, -3, -2, -1], [-9, -7, -6], [-9, -7, -6, -1], [-9, -7, -6, -2], [-9, -7, -6, -2, -1], [-9, -7, -6, -3], [-9, -7, -6, -3, -1], [-9, -7, -6, -3, -2], [-9, -7, -6, -3, -2, -1], [-9, -7, -6, -4], [-9, -7, -6, -4, -1], [-9, -7, -6, -4, -2], [-9, -7, -6, -4, -2, -1], [-9, -7, -6, -4, -3], [-9, -7, -6, -4, -3, -1], [-9, -7, -6, -4, -3, -2], [-9, -7, -6, -4, -3, -2, -1], [-9, -7, -6, -5], [-9, -7, -6, -5, -1], [-9, -7, -6, -5, -2], [-9, -7, -6, -5, -2, -1], [-9, -7, -6, -5, -3], [-9, -7, -6, -5, -3, -1], [-9, -7, -6, -5, -3, -2], [-9, -7, -6, -5, -3, -2, -1], [-9, -7, -6, -5, -4], [-9, -7, -6, -5, -4, -1], [-9, -7, -6, -5, -4, -2], [-9, -7, -6, -5, -4, -2, -1], [-9, -7, -6, -5, -4, -3], [-9, -7, -6, -5, -4, -3, -1], [-9, -7, -6, -5, -4, -3, -2], [-9, -7, -6, -5, -4, -3, -2, -1], [-9, -8], [-9, -8, -1], [-9, -8, -2], [-9, -8, -2, -1], [-9, -8, -3], [-9, -8, -3, -1], [-9, -8, -3, -2], [-9, -8, -3, -2, -1], [-9, -8, -4], [-9, -8, -4, -1], [-9, -8, -4, -2], [-9, -8, -4, -2, -1], [-9, -8, -4, -3], [-9, -8, -4, -3, -1], [-9, -8, -4, -3, -2], [-9, -8, -4, -3, -2, -1], [-9, -8, -5], [-9, -8, -5, -1], [-9, -8, -5, -2], [-9, -8, -5, -2, -1], [-9, -8, -5, -3], [-9, -8, -5, -3, -1], [-9, -8, -5, -3, -2], [-9, -8, -5, -3, -2, -1], [-9, -8, -5, -4], [-9, -8, -5, -4, -1], [-9, -8, -5, -4, -2], [-9, -8, -5, -4, -2, -1], [-9, -8, -5, -4, -3], [-9, -8, -5, -4, -3, -1], [-9, -8, -5, -4, -3, -2], [-9, -8, -5, -4, -3, -2, -1], [-9, -8, -6], [-9, -8, -6, -1], [-9, -8, -6, -2], [-9, -8, -6, -2, -1], [-9, -8, -6, -3], [-9, -8, -6, -3, -1], [-9, -8, -6, -3, -2], [-9, -8, -6, -3, -2, -1], [-9, -8, -6, -4], [-9, -8, -6, -4, -1], [-9, -8, -6, -4, -2], [-9, -8, -6, -4, -2, -1], [-9, -8, -6, -4, -3], [-9, -8, -6, -4, -3, -1], [-9, -8, -6, -4, -3, -2], [-9, -8, -6, -4, -3, -2, -1], [-9, -8, -6, -5], [-9, -8, -6, -5, -1], [-9, -8, -6, -5, -2], [-9, -8, -6, -5, -2, -1], [-9, -8, -6, -5, -3], [-9, -8, -6, -5, -3, -1], [-9, -8, -6, -5, -3, -2], [-9, -8, -6, -5, -3, -2, -1], [-9, -8, -6, -5, -4], [-9, -8, -6, -5, -4, -1], [-9, -8, -6, -5, -4, -2], [-9, -8, -6, -5, -4, -2, -1], [-9, -8, -6, -5, -4, -3], [-9, -8, -6, -5, -4, -3, -1], [-9, -8, -6, -5, -4, -3, -2], [-9, -8, -6, -5, -4, -3, -2, -1], [-9, -8, -7], [-9, -8, -7, -1], [-9, -8, -7, -2], [-9, -8, -7, -2, -1], [-9, -8, -7, -3], [-9, -8, -7, -3, -1], [-9, -8, -7, -3, -2], [-9, -8, -7, -3, -2, -1], [-9, -8, -7, -4], [-9, -8, -7, -4, -1], [-9, -8, -7, -4, -2], [-9, -8, -7, -4, -2, -1], [-9, -8, -7, -4, -3], [-9, -8, -7, -4, -3, -1], [-9, -8, -7, -4, -3, -2], [-9, -8, -7, -4, -3, -2, -1], [-9, -8, -7, -5], [-9, -8, -7, -5, -1], [-9, -8, -7, -5, -2], [-9, -8, -7, -5, -2, -1], [-9, -8, -7, -5, -3], [-9, -8, -7, -5, -3, -1], [-9, -8, -7, -5, -3, -2], [-9, -8, -7, -5, -3, -2, -1], [-9, -8, -7, -5, -4], [-9, -8, -7, -5, -4, -1], [-9, -8, -7, -5, -4, -2], [-9, -8, -7, -5, -4, -2, -1], [-9, -8, -7, -5, -4, -3], [-9, -8, -7, -5, -4, -3, -1], [-9, -8, -7, -5, -4, -3, -2], [-9, -8, -7, -5, -4, -3, -2, -1], [-9, -8, -7, -6], [-9, -8, -7, -6, -1], [-9, -8, -7, -6, -2], [-9, -8, -7, -6, -2, -1], [-9, -8, -7, -6, -3], [-9, -8, -7, -6, -3, -1], [-9, -8, -7, -6, -3, -2], [-9, -8, -7, -6, -3, -2, -1], [-9, -8, -7, -6, -4], [-9, -8, -7, -6, -4, -1], [-9, -8, -7, -6, -4, -2], [-9, -8, -7, -6, -4, -2, -1], [-9, -8, -7, -6, -4, -3], [-9, -8, -7, -6, -4, -3, -1], [-9, -8, -7, -6, -4, -3, -2], [-9, -8, -7, -6, -4, -3, -2, -1], [-9, -8, -7, -6, -5], [-9, -8, -7, -6, -5, -1], [-9, -8, -7, -6, -5, -2], [-9, -8, -7, -6, -5, -2, -1], [-9, -8, -7, -6, -5, -3], [-9, -8, -7, -6, -5, -3, -1], [-9, -8, -7, -6, -5, -3, -2], [-9, -8, -7, -6, -5, -3, -2, -1], [-9, -8, -7, -6, -5, -4], [-9, -8, -7, -6, -5, -4, -1], [-9, -8, -7, -6, -5, -4, -2], [-9, -8, -7, -6, -5, -4, -2, -1], [-9, -8, -7, -6, -5, -4, -3], [-9, -8, -7, -6, -5, -4, -3, -1], [-9, -8, -7, -6, -5, -4, -3, -2], [-9, -8, -7, -6, -5, -4, -3, -2, -1], [-10], [-10, -1], [-10, -2], [-10, -2, -1], [-10, -3], [-10, -3, -1], [-10, -3, -2], [-10, -3, -2, -1], [-10, -4], [-10, -4, -1], [-10, -4, -2], [-10, -4, -2, -1], [-10, -4, -3], [-10, -4, -3, -1], [-10, -4, -3, -2], [-10, -4, -3, -2, -1], [-10, -5], [-10, -5, -1], [-10, -5, -2], [-10, -5, -2, -1], [-10, -5, -3], [-10, -5, -3, -1], [-10, -5, -3, -2], [-10, -5, -3, -2, -1], [-10, -5, -4], [-10, -5, -4, -1], [-10, -5, -4, -2], [-10, -5, -4, -2, -1], [-10, -5, -4, -3], [-10, -5, -4, -3, -1], [-10, -5, -4, -3, -2], [-10, -5, -4, -3, -2, -1], [-10, -6], [-10, -6, -1], [-10, -6, -2], [-10, -6, -2, -1], [-10, -6, -3], [-10, -6, -3, -1], [-10, -6, -3, -2], [-10, -6, -3, -2, -1], [-10, -6, -4], [-10, -6, -4, -1], [-10, -6, -4, -2], [-10, -6, -4, -2, -1], [-10, -6, -4, -3], [-10, -6, -4, -3, -1], [-10, -6, -4, -3, -2], [-10, -6, -4, -3, -2, -1], [-10, -6, -5], [-10, -6, -5, -1], [-10, -6, -5, -2], [-10, -6, -5, -2, -1], [-10, -6, -5, -3], [-10, -6, -5, -3, -1], [-10, -6, -5, -3, -2], [-10, -6, -5, -3, -2, -1], [-10, -6, -5, -4], [-10, -6, -5, -4, -1], [-10, -6, -5, -4, -2], [-10, -6, -5, -4, -2, -1], [-10, -6, -5, -4, -3], [-10, -6, -5, -4, -3, -1], [-10, -6, -5, -4, -3, -2], [-10, -6, -5, -4, -3, -2, -1], [-10, -7], [-10, -7, -1], [-10, -7, -2], [-10, -7, -2, -1], [-10, -7, -3], [-10, -7, -3, -1], [-10, -7, -3, -2], [-10, -7, -3, -2, -1], [-10, -7, -4], [-10, -7, -4, -1], [-10, -7, -4, -2], [-10, -7, -4, -2, -1], [-10, -7, -4, -3], [-10, -7, -4, -3, -1], [-10, -7, -4, -3, -2], [-10, -7, -4, -3, -2, -1], [-10, -7, -5], [-10, -7, -5, -1], [-10, -7, -5, -2], [-10, -7, -5, -2, -1], [-10, -7, -5, -3], [-10, -7, -5, -3, -1], [-10, -7, -5, -3, -2], [-10, -7, -5, -3, -2, -1], [-10, -7, -5, -4], [-10, -7, -5, -4, -1], [-10, -7, -5, -4, -2], [-10, -7, -5, -4, -2, -1], [-10, -7, -5, -4, -3], [-10, -7, -5, -4, -3, -1], [-10, -7, -5, -4, -3, -2], [-10, -7, -5, -4, -3, -2, -1], [-10, -7, -6], [-10, -7, -6, -1], [-10, -7, -6, -2], [-10, -7, -6, -2, -1], [-10, -7, -6, -3], [-10, -7, -6, -3, -1], [-10, -7, -6, -3, -2], [-10, -7, -6, -3, -2, -1], [-10, -7, -6, -4], [-10, -7, -6, -4, -1], [-10, -7, -6, -4, -2], [-10, -7, -6, -4, -2, -1], [-10, -7, -6, -4, -3], [-10, -7, -6, -4, -3, -1], [-10, -7, -6, -4, -3, -2], [-10, -7, -6, -4, -3, -2, -1], [-10, -7, -6, -5], [-10, -7, -6, -5, -1], [-10, -7, -6, -5, -2], [-10, -7, -6, -5, -2, -1], [-10, -7, -6, -5, -3], [-10, -7, -6, -5, -3, -1], [-10, -7, -6, -5, -3, -2], [-10, -7, -6, -5, -3, -2, -1], [-10, -7, -6, -5, -4], [-10, -7, -6, -5, -4, -1], [-10, -7, -6, -5, -4, -2], [-10, -7, -6, -5, -4, -2, -1], [-10, -7, -6, -5, -4, -3], [-10, -7, -6, -5, -4, -3, -1], [-10, -7, -6, -5, -4, -3, -2], [-10, -7, -6, -5, -4, -3, -2, -1], [-10, -8], [-10, -8, -1], [-10, -8, -2], [-10, -8, -2, -1], [-10, -8, -3], [-10, -8, -3, -1], [-10, -8, -3, -2], [-10, -8, -3, -2, -1], [-10, -8, -4], [-10, -8, -4, -1], [-10, -8, -4, -2], [-10, -8, -4, -2, -1], [-10, -8, -4, -3], [-10, -8, -4, -3, -1], [-10, -8, -4, -3, -2], [-10, -8, -4, -3, -2, -1], [-10, -8, -5], [-10, -8, -5, -1], [-10, -8, -5, -2], [-10, -8, -5, -2, -1], [-10, -8, -5, -3], [-10, -8, -5, -3, -1], [-10, -8, -5, -3, -2], [-10, -8, -5, -3, -2, -1], [-10, -8, -5, -4], [-10, -8, -5, -4, -1], [-10, -8, -5, -4, -2], [-10, -8, -5, -4, -2, -1], [-10, -8, -5, -4, -3], [-10, -8, -5, -4, -3, -1], [-10, -8, -5, -4, -3, -2], [-10, -8, -5, -4, -3, -2, -1], [-10, -8, -6], [-10, -8, -6, -1], [-10, -8, -6, -2], [-10, -8, -6, -2, -1], [-10, -8, -6, -3], [-10, -8, -6, -3, -1], [-10, -8, -6, -3, -2], [-10, -8, -6, -3, -2, -1], [-10, -8, -6, -4], [-10, -8, -6, -4, -1], [-10, -8, -6, -4, -2], [-10, -8, -6, -4, -2, -1], [-10, -8, -6, -4, -3], [-10, -8, -6, -4, -3, -1], [-10, -8, -6, -4, -3, -2], [-10, -8, -6, -4, -3, -2, -1], [-10, -8, -6, -5], [-10, -8, -6, -5, -1], [-10, -8, -6, -5, -2], [-10, -8, -6, -5, -2, -1], [-10, -8, -6, -5, -3], [-10, -8, -6, -5, -3, -1], [-10, -8, -6, -5, -3, -2], [-10, -8, -6, -5, -3, -2, -1], [-10, -8, -6, -5, -4], [-10, -8, -6, -5, -4, -1], [-10, -8, -6, -5, -4, -2], [-10, -8, -6, -5, -4, -2, -1], [-10, -8, -6, -5, -4, -3], [-10, -8, -6, -5, -4, -3, -1], [-10, -8, -6, -5, -4, -3, -2], [-10, -8, -6, -5, -4, -3, -2, -1], [-10, -8, -7], [-10, -8, -7, -1], [-10, -8, -7, -2], [-10, -8, -7, -2, -1], [-10, -8, -7, -3], [-10, -8, -7, -3, -1], [-10, -8, -7, -3, -2], [-10, -8, -7, -3, -2, -1], [-10, -8, -7, -4], [-10, -8, -7, -4, -1], [-10, -8, -7, -4, -2], [-10, -8, -7, -4, -2, -1], [-10, -8, -7, -4, -3], [-10, -8, -7, -4, -3, -1], [-10, -8, -7, -4, -3, -2], [-10, -8, -7, -4, -3, -2, -1], [-10, -8, -7, -5], [-10, -8, -7, -5, -1], [-10, -8, -7, -5, -2], [-10, -8, -7, -5, -2, -1], [-10, -8, -7, -5, -3], [-10, -8, -7, -5, -3, -1], [-10, -8, -7, -5, -3, -2], [-10, -8, -7, -5, -3, -2, -1], [-10, -8, -7, -5, -4], [-10, -8, -7, -5, -4, -1], [-10, -8, -7, -5, -4, -2], [-10, -8, -7, -5, -4, -2, -1], [-10, -8, -7, -5, -4, -3], [-10, -8, -7, -5, -4, -3, -1], [-10, -8, -7, -5, -4, -3, -2], [-10, -8, -7, -5, -4, -3, -2, -1], [-10, -8, -7, -6], [-10, -8, -7, -6, -1], [-10, -8, -7, -6, -2], [-10, -8, -7, -6, -2, -1], [-10, -8, -7, -6, -3], [-10, -8, -7, -6, -3, -1], [-10, -8, -7, -6, -3, -2], [-10, -8, -7, -6, -3, -2, -1], [-10, -8, -7, -6, -4], [-10, -8, -7, -6, -4, -1], [-10, -8, -7, -6, -4, -2], [-10, -8, -7, -6, -4, -2, -1], [-10, -8, -7, -6, -4, -3], [-10, -8, -7, -6, -4, -3, -1], [-10, -8, -7, -6, -4, -3, -2], [-10, -8, -7, -6, -4, -3, -2, -1], [-10, -8, -7, -6, -5], [-10, -8, -7, -6, -5, -1], [-10, -8, -7, -6, -5, -2], [-10, -8, -7, -6, -5, -2, -1], [-10, -8, -7, -6, -5, -3], [-10, -8, -7, -6, -5, -3, -1], [-10, -8, -7, -6, -5, -3, -2], [-10, -8, -7, -6, -5, -3, -2, -1], [-10, -8, -7, -6, -5, -4], [-10, -8, -7, -6, -5, -4, -1], [-10, -8, -7, -6, -5, -4, -2], [-10, -8, -7, -6, -5, -4, -2, -1], [-10, -8, -7, -6, -5, -4, -3], [-10, -8, -7, -6, -5, -4, -3, -1], [-10, -8, -7, -6, -5, -4, -3, -2], [-10, -8, -7, -6, -5, -4, -3, -2, -1], [-10, -9], [-10, -9, -1], [-10, -9, -2], [-10, -9, -2, -1], [-10, -9, -3], [-10, -9, -3, -1], [-10, -9, -3, -2], [-10, -9, -3, -2, -1], [-10, -9, -4], [-10, -9, -4, -1], [-10, -9, -4, -2], [-10, -9, -4, -2, -1], [-10, -9, -4, -3], [-10, -9, -4, -3, -1], [-10, -9, -4, -3, -2], [-10, -9, -4, -3, -2, -1], [-10, -9, -5], [-10, -9, -5, -1], [-10, -9, -5, -2], [-10, -9, -5, -2, -1], [-10, -9, -5, -3], [-10, -9, -5, -3, -1], [-10, -9, -5, -3, -2], [-10, -9, -5, -3, -2, -1], [-10, -9, -5, -4], [-10, -9, -5, -4, -1], [-10, -9, -5, -4, -2], [-10, -9, -5, -4, -2, -1], [-10, -9, -5, -4, -3], [-10, -9, -5, -4, -3, -1], [-10, -9, -5, -4, -3, -2], [-10, -9, -5, -4, -3, -2, -1], [-10, -9, -6], [-10, -9, -6, -1], [-10, -9, -6, -2], [-10, -9, -6, -2, -1], [-10, -9, -6, -3], [-10, -9, -6, -3, -1], [-10, -9, -6, -3, -2], [-10, -9, -6, -3, -2, -1], [-10, -9, -6, -4], [-10, -9, -6, -4, -1], [-10, -9, -6, -4, -2], [-10, -9, -6, -4, -2, -1], [-10, -9, -6, -4, -3], [-10, -9, -6, -4, -3, -1], [-10, -9, -6, -4, -3, -2], [-10, -9, -6, -4, -3, -2, -1], [-10, -9, -6, -5], [-10, -9, -6, -5, -1], [-10, -9, -6, -5, -2], [-10, -9, -6, -5, -2, -1], [-10, -9, -6, -5, -3], [-10, -9, -6, -5, -3, -1], [-10, -9, -6, -5, -3, -2], [-10, -9, -6, -5, -3, -2, -1], [-10, -9, -6, -5, -4], [-10, -9, -6, -5, -4, -1], [-10, -9, -6, -5, -4, -2], [-10, -9, -6, -5, -4, -2, -1], [-10, -9, -6, -5, -4, -3], [-10, -9, -6, -5, -4, -3, -1], [-10, -9, -6, -5, -4, -3, -2], [-10, -9, -6, -5, -4, -3, -2, -1], [-10, -9, -7], [-10, -9, -7, -1], [-10, -9, -7, -2], [-10, -9, -7, -2, -1], [-10, -9, -7, -3], [-10, -9, -7, -3, -1], [-10, -9, -7, -3, -2], [-10, -9, -7, -3, -2, -1], [-10, -9, -7, -4], [-10, -9, -7, -4, -1], [-10, -9, -7, -4, -2], [-10, -9, -7, -4, -2, -1], [-10, -9, -7, -4, -3], [-10, -9, -7, -4, -3, -1], [-10, -9, -7, -4, -3, -2], [-10, -9, -7, -4, -3, -2, -1], [-10, -9, -7, -5], [-10, -9, -7, -5, -1], [-10, -9, -7, -5, -2], [-10, -9, -7, -5, -2, -1], [-10, -9, -7, -5, -3], [-10, -9, -7, -5, -3, -1], [-10, -9, -7, -5, -3, -2], [-10, -9, -7, -5, -3, -2, -1], [-10, -9, -7, -5, -4], [-10, -9, -7, -5, -4, -1], [-10, -9, -7, -5, -4, -2], [-10, -9, -7, -5, -4, -2, -1], [-10, -9, -7, -5, -4, -3], [-10, -9, -7, -5, -4, -3, -1], [-10, -9, -7, -5, -4, -3, -2], [-10, -9, -7, -5, -4, -3, -2, -1], [-10, -9, -7, -6], [-10, -9, -7, -6, -1], [-10, -9, -7, -6, -2], [-10, -9, -7, -6, -2, -1], [-10, -9, -7, -6, -3], [-10, -9, -7, -6, -3, -1], [-10, -9, -7, -6, -3, -2], [-10, -9, -7, -6, -3, -2, -1], [-10, -9, -7, -6, -4], [-10, -9, -7, -6, -4, -1], [-10, -9, -7, -6, -4, -2], [-10, -9, -7, -6, -4, -2, -1], [-10, -9, -7, -6, -4, -3], [-10, -9, -7, -6, -4, -3, -1], [-10, -9, -7, -6, -4, -3, -2], [-10, -9, -7, -6, -4, -3, -2, -1], [-10, -9, -7, -6, -5], [-10, -9, -7, -6, -5, -1], [-10, -9, -7, -6, -5, -2], [-10, -9, -7, -6, -5, -2, -1], [-10, -9, -7, -6, -5, -3], [-10, -9, -7, -6, -5, -3, -1], [-10, -9, -7, -6, -5, -3, -2], [-10, -9, -7, -6, -5, -3, -2, -1], [-10, -9, -7, -6, -5, -4], [-10, -9, -7, -6, -5, -4, -1], [-10, -9, -7, -6, -5, -4, -2], [-10, -9, -7, -6, -5, -4, -2, -1], [-10, -9, -7, -6, -5, -4, -3], [-10, -9, -7, -6, -5, -4, -3, -1], [-10, -9, -7, -6, -5, -4, -3, -2], [-10, -9, -7, -6, -5, -4, -3, -2, -1], [-10, -9, -8], [-10, -9, -8, -1], [-10, -9, -8, -2], [-10, -9, -8, -2, -1], [-10, -9, -8, -3], [-10, -9, -8, -3, -1], [-10, -9, -8, -3, -2], [-10, -9, -8, -3, -2, -1], [-10, -9, -8, -4], [-10, -9, -8, -4, -1], [-10, -9, -8, -4, -2], [-10, -9, -8, -4, -2, -1], [-10, -9, -8, -4, -3], [-10, -9, -8, -4, -3, -1], [-10, -9, -8, -4, -3, -2], [-10, -9, -8, -4, -3, -2, -1], [-10, -9, -8, -5], [-10, -9, -8, -5, -1], [-10, -9, -8, -5, -2], [-10, -9, -8, -5, -2, -1], [-10, -9, -8, -5, -3], [-10, -9, -8, -5, -3, -1], [-10, -9, -8, -5, -3, -2], [-10, -9, -8, -5, -3, -2, -1], [-10, -9, -8, -5, -4], [-10, -9, -8, -5, -4, -1], [-10, -9, -8, -5, -4, -2], [-10, -9, -8, -5, -4, -2, -1], [-10, -9, -8, -5, -4, -3], [-10, -9, -8, -5, -4, -3, -1], [-10, -9, -8, -5, -4, -3, -2], [-10, -9, -8, -5, -4, -3, -2, -1], [-10, -9, -8, -6], [-10, -9, -8, -6, -1], [-10, -9, -8, -6, -2], [-10, -9, -8, -6, -2, -1], [-10, -9, -8, -6, -3], [-10, -9, -8, -6, -3, -1], [-10, -9, -8, -6, -3, -2], [-10, -9, -8, -6, -3, -2, -1], [-10, -9, -8, -6, -4], [-10, -9, -8, -6, -4, -1], [-10, -9, -8, -6, -4, -2], [-10, -9, -8, -6, -4, -2, -1], [-10, -9, -8, -6, -4, -3], [-10, -9, -8, -6, -4, -3, -1], [-10, -9, -8, -6, -4, -3, -2], [-10, -9, -8, -6, -4, -3, -2, -1], [-10, -9, -8, -6, -5], [-10, -9, -8, -6, -5, -1], [-10, -9, -8, -6, -5, -2], [-10, -9, -8, -6, -5, -2, -1], [-10, -9, -8, -6, -5, -3], [-10, -9, -8, -6, -5, -3, -1], [-10, -9, -8, -6, -5, -3, -2], [-10, -9, -8, -6, -5, -3, -2, -1], [-10, -9, -8, -6, -5, -4], [-10, -9, -8, -6, -5, -4, -1], [-10, -9, -8, -6, -5, -4, -2], [-10, -9, -8, -6, -5, -4, -2, -1], [-10, -9, -8, -6, -5, -4, -3], [-10, -9, -8, -6, -5, -4, -3, -1], [-10, -9, -8, -6, -5, -4, -3, -2], [-10, -9, -8, -6, -5, -4, -3, -2, -1], [-10, -9, -8, -7], [-10, -9, -8, -7, -1], [-10, -9, -8, -7, -2], [-10, -9, -8, -7, -2, -1], [-10, -9, -8, -7, -3], [-10, -9, -8, -7, -3, -1], [-10, -9, -8, -7, -3, -2], [-10, -9, -8, -7, -3, -2, -1], [-10, -9, -8, -7, -4], [-10, -9, -8, -7, -4, -1], [-10, -9, -8, -7, -4, -2], [-10, -9, -8, -7, -4, -2, -1], [-10, -9, -8, -7, -4, -3], [-10, -9, -8, -7, -4, -3, -1], [-10, -9, -8, -7, -4, -3, -2], [-10, -9, -8, -7, -4, -3, -2, -1], [-10, -9, -8, -7, -5], [-10, -9, -8, -7, -5, -1], [-10, -9, -8, -7, -5, -2], [-10, -9, -8, -7, -5, -2, -1], [-10, -9, -8, -7, -5, -3], [-10, -9, -8, -7, -5, -3, -1], [-10, -9, -8, -7, -5, -3, -2], [-10, -9, -8, -7, -5, -3, -2, -1], [-10, -9, -8, -7, -5, -4], [-10, -9, -8, -7, -5, -4, -1], [-10, -9, -8, -7, -5, -4, -2], [-10, -9, -8, -7, -5, -4, -2, -1], [-10, -9, -8, -7, -5, -4, -3], [-10, -9, -8, -7, -5, -4, -3, -1], [-10, -9, -8, -7, -5, -4, -3, -2], [-10, -9, -8, -7, -5, -4, -3, -2, -1], [-10, -9, -8, -7, -6], [-10, -9, -8, -7, -6, -1], [-10, -9, -8, -7, -6, -2], [-10, -9, -8, -7, -6, -2, -1], [-10, -9, -8, -7, -6, -3], [-10, -9, -8, -7, -6, -3, -1], [-10, -9, -8, -7, -6, -3, -2], [-10, -9, -8, -7, -6, -3, -2, -1], [-10, -9, -8, -7, -6, -4], [-10, -9, -8, -7, -6, -4, -1], [-10, -9, -8, -7, -6, -4, -2], [-10, -9, -8, -7, -6, -4, -2, -1], [-10, -9, -8, -7, -6, -4, -3], [-10, -9, -8, -7, -6, -4, -3, -1], [-10, -9, -8, -7, -6, -4, -3, -2], [-10, -9, -8, -7, -6, -4, -3, -2, -1], [-10, -9, -8, -7, -6, -5], [-10, -9, -8, -7, -6, -5, -1], [-10, -9, -8, -7, -6, -5, -2], [-10, -9, -8, -7, -6, -5, -2, -1], [-10, -9, -8, -7, -6, -5, -3], [-10, -9, -8, -7, -6, -5, -3, -1], [-10, -9, -8, -7, -6, -5, -3, -2], [-10, -9, -8, -7, -6, -5, -3, -2, -1], [-10, -9, -8, -7, -6, -5, -4], [-10, -9, -8, -7, -6, -5, -4, -1], [-10, -9, -8, -7, -6, -5, -4, -2], [-10, -9, -8, -7, -6, -5, -4, -2, -1], [-10, -9, -8, -7, -6, -5, -4, -3], [-10, -9, -8, -7, -6, -5, -4, -3, -1], [-10, -9, -8, -7, -6, -5, -4, -3, -2], [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6]), [[], [6], [5], [5, 6], [4], [4, 6], [4, 5], [4, 5, 6], [3], [3, 6], [3, 5], [3, 5, 6], [3, 4], [3, 4, 6], [3, 4, 5], [3, 4, 5, 6], [2], [2, 6], [2, 5], [2, 5, 6], [2, 4], [2, 4, 6], [2, 4, 5], [2, 4, 5, 6], [2, 3], [2, 3, 6], [2, 3, 5], [2, 3, 5, 6], [2, 3, 4], [2, 3, 4, 6], [2, 3, 4, 5], [2, 3, 4, 5, 6], [1], [1, 6], [1, 5], [1, 5, 6], [1, 4], [1, 4, 6], [1, 4, 5], [1, 4, 5, 6], [1, 3], [1, 3, 6], [1, 3, 5], [1, 3, 5, 6], [1, 3, 4], [1, 3, 4, 6], [1, 3, 4, 5], [1, 3, 4, 5, 6], [1, 2], [1, 2, 6], [1, 2, 5], [1, 2, 5, 6], [1, 2, 4], [1, 2, 4, 6], [1, 2, 4, 5], [1, 2, 4, 5, 6], [1, 2, 3], [1, 2, 3, 6], [1, 2, 3, 5], [1, 2, 3, 5, 6], [1, 2, 3, 4], [1, 2, 3, 4, 6], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6]])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]), [[], [0], [1], [1, 0], [2], [2, 0], [2, 1], [2, 1, 0], [3], [3, 0], [3, 1], [3, 1, 0], [3, 2], [3, 2, 0], [3, 2, 1], [3, 2, 1, 0], [4], [4, 0], [4, 1], [4, 1, 0], [4, 2], [4, 2, 0], [4, 2, 1], [4, 2, 1, 0], [4, 3], [4, 3, 0], [4, 3, 1], [4, 3, 1, 0], [4, 3, 2], [4, 3, 2, 0], [4, 3, 2, 1], [4, 3, 2, 1, 0], [5], [5, 0], [5, 1], [5, 1, 0], [5, 2], [5, 2, 0], [5, 2, 1], [5, 2, 1, 0], [5, 3], [5, 3, 0], [5, 3, 1], [5, 3, 1, 0], [5, 3, 2], [5, 3, 2, 0], [5, 3, 2, 1], [5, 3, 2, 1, 0], [5, 4], [5, 4, 0], [5, 4, 1], [5, 4, 1, 0], [5, 4, 2], [5, 4, 2, 0], [5, 4, 2, 1], [5, 4, 2, 1, 0], [5, 4, 3], [5, 4, 3, 0], [5, 4, 3, 1], [5, 4, 3, 1, 0], [5, 4, 3, 2], [5, 4, 3, 2, 0], [5, 4, 3, 2, 1], [5, 4, 3, 2, 1, 0], [6], [6, 0], [6, 1], [6, 1, 0], [6, 2], [6, 2, 0], [6, 2, 1], [6, 2, 1, 0], [6, 3], [6, 3, 0], [6, 3, 1], [6, 3, 1, 0], [6, 3, 2], [6, 3, 2, 0], [6, 3, 2, 1], [6, 3, 2, 1, 0], [6, 4], [6, 4, 0], [6, 4, 1], [6, 4, 1, 0], [6, 4, 2], [6, 4, 2, 0], [6, 4, 2, 1], [6, 4, 2, 1, 0], [6, 4, 3], [6, 4, 3, 0], [6, 4, 3, 1], [6, 4, 3, 1, 0], [6, 4, 3, 2], [6, 4, 3, 2, 0], [6, 4, 3, 2, 1], [6, 4, 3, 2, 1, 0], [6, 5], [6, 5, 0], [6, 5, 1], [6, 5, 1, 0], [6, 5, 2], [6, 5, 2, 0], [6, 5, 2, 1], [6, 5, 2, 1, 0], [6, 5, 3], [6, 5, 3, 0], [6, 5, 3, 1], [6, 5, 3, 1, 0], [6, 5, 3, 2], [6, 5, 3, 2, 0], [6, 5, 3, 2, 1], [6, 5, 3, 2, 1, 0], [6, 5, 4], [6, 5, 4, 0], [6, 5, 4, 1], [6, 5, 4, 1, 0], [6, 5, 4, 2], [6, 5, 4, 2, 0], [6, 5, 4, 2, 1], [6, 5, 4, 2, 1, 0], [6, 5, 4, 3], [6, 5, 4, 3, 0], [6, 5, 4, 3, 1], [6, 5, 4, 3, 1, 0], [6, 5, 4, 3, 2], [6, 5, 4, 3, 2, 0], [6, 5, 4, 3, 2, 1], [6, 5, 4, 3, 2, 1, 0], [7], [7, 0], [7, 1], [7, 1, 0], [7, 2], [7, 2, 0], [7, 2, 1], [7, 2, 1, 0], [7, 3], [7, 3, 0], [7, 3, 1], [7, 3, 1, 0], [7, 3, 2], [7, 3, 2, 0], [7, 3, 2, 1], [7, 3, 2, 1, 0], [7, 4], [7, 4, 0], [7, 4, 1], [7, 4, 1, 0], [7, 4, 2], [7, 4, 2, 0], [7, 4, 2, 1], [7, 4, 2, 1, 0], [7, 4, 3], [7, 4, 3, 0], [7, 4, 3, 1], [7, 4, 3, 1, 0], [7, 4, 3, 2], [7, 4, 3, 2, 0], [7, 4, 3, 2, 1], [7, 4, 3, 2, 1, 0], [7, 5], [7, 5, 0], [7, 5, 1], [7, 5, 1, 0], [7, 5, 2], [7, 5, 2, 0], [7, 5, 2, 1], [7, 5, 2, 1, 0], [7, 5, 3], [7, 5, 3, 0], [7, 5, 3, 1], [7, 5, 3, 1, 0], [7, 5, 3, 2], [7, 5, 3, 2, 0], [7, 5, 3, 2, 1], [7, 5, 3, 2, 1, 0], [7, 5, 4], [7, 5, 4, 0], [7, 5, 4, 1], [7, 5, 4, 1, 0], [7, 5, 4, 2], [7, 5, 4, 2, 0], [7, 5, 4, 2, 1], [7, 5, 4, 2, 1, 0], [7, 5, 4, 3], [7, 5, 4, 3, 0], [7, 5, 4, 3, 1], [7, 5, 4, 3, 1, 0], [7, 5, 4, 3, 2], [7, 5, 4, 3, 2, 0], [7, 5, 4, 3, 2, 1], [7, 5, 4, 3, 2, 1, 0], [7, 6], [7, 6, 0], [7, 6, 1], [7, 6, 1, 0], [7, 6, 2], [7, 6, 2, 0], [7, 6, 2, 1], [7, 6, 2, 1, 0], [7, 6, 3], [7, 6, 3, 0], [7, 6, 3, 1], [7, 6, 3, 1, 0], [7, 6, 3, 2], [7, 6, 3, 2, 0], [7, 6, 3, 2, 1], [7, 6, 3, 2, 1, 0], [7, 6, 4], [7, 6, 4, 0], [7, 6, 4, 1], [7, 6, 4, 1, 0], [7, 6, 4, 2], [7, 6, 4, 2, 0], [7, 6, 4, 2, 1], [7, 6, 4, 2, 1, 0], [7, 6, 4, 3], [7, 6, 4, 3, 0], [7, 6, 4, 3, 1], [7, 6, 4, 3, 1, 0], [7, 6, 4, 3, 2], [7, 6, 4, 3, 2, 0], [7, 6, 4, 3, 2, 1], [7, 6, 4, 3, 2, 1, 0], [7, 6, 5], [7, 6, 5, 0], [7, 6, 5, 1], [7, 6, 5, 1, 0], [7, 6, 5, 2], [7, 6, 5, 2, 0], [7, 6, 5, 2, 1], [7, 6, 5, 2, 1, 0], [7, 6, 5, 3], [7, 6, 5, 3, 0], [7, 6, 5, 3, 1], [7, 6, 5, 3, 1, 0], [7, 6, 5, 3, 2], [7, 6, 5, 3, 2, 0], [7, 6, 5, 3, 2, 1], [7, 6, 5, 3, 2, 1, 0], [7, 6, 5, 4], [7, 6, 5, 4, 0], [7, 6, 5, 4, 1], [7, 6, 5, 4, 1, 0], [7, 6, 5, 4, 2], [7, 6, 5, 4, 2, 0], [7, 6, 5, 4, 2, 1], [7, 6, 5, 4, 2, 1, 0], [7, 6, 5, 4, 3], [7, 6, 5, 4, 3, 0], [7, 6, 5, 4, 3, 1], [7, 6, 5, 4, 3, 1, 0], [7, 6, 5, 4, 3, 2], [7, 6, 5, 4, 3, 2, 0], [7, 6, 5, 4, 3, 2, 1], [7, 6, 5, 4, 3, 2, 1, 0], [8], [8, 0], [8, 1], [8, 1, 0], [8, 2], [8, 2, 0], [8, 2, 1], [8, 2, 1, 0], [8, 3], [8, 3, 0], [8, 3, 1], [8, 3, 1, 0], [8, 3, 2], [8, 3, 2, 0], [8, 3, 2, 1], [8, 3, 2, 1, 0], [8, 4], [8, 4, 0], [8, 4, 1], [8, 4, 1, 0], [8, 4, 2], [8, 4, 2, 0], [8, 4, 2, 1], [8, 4, 2, 1, 0], [8, 4, 3], [8, 4, 3, 0], [8, 4, 3, 1], [8, 4, 3, 1, 0], [8, 4, 3, 2], [8, 4, 3, 2, 0], [8, 4, 3, 2, 1], [8, 4, 3, 2, 1, 0], [8, 5], [8, 5, 0], [8, 5, 1], [8, 5, 1, 0], [8, 5, 2], [8, 5, 2, 0], [8, 5, 2, 1], [8, 5, 2, 1, 0], [8, 5, 3], [8, 5, 3, 0], [8, 5, 3, 1], [8, 5, 3, 1, 0], [8, 5, 3, 2], [8, 5, 3, 2, 0], [8, 5, 3, 2, 1], [8, 5, 3, 2, 1, 0], [8, 5, 4], [8, 5, 4, 0], [8, 5, 4, 1], [8, 5, 4, 1, 0], [8, 5, 4, 2], [8, 5, 4, 2, 0], [8, 5, 4, 2, 1], [8, 5, 4, 2, 1, 0], [8, 5, 4, 3], [8, 5, 4, 3, 0], [8, 5, 4, 3, 1], [8, 5, 4, 3, 1, 0], [8, 5, 4, 3, 2], [8, 5, 4, 3, 2, 0], [8, 5, 4, 3, 2, 1], [8, 5, 4, 3, 2, 1, 0], [8, 6], [8, 6, 0], [8, 6, 1], [8, 6, 1, 0], [8, 6, 2], [8, 6, 2, 0], [8, 6, 2, 1], [8, 6, 2, 1, 0], [8, 6, 3], [8, 6, 3, 0], [8, 6, 3, 1], [8, 6, 3, 1, 0], [8, 6, 3, 2], [8, 6, 3, 2, 0], [8, 6, 3, 2, 1], [8, 6, 3, 2, 1, 0], [8, 6, 4], [8, 6, 4, 0], [8, 6, 4, 1], [8, 6, 4, 1, 0], [8, 6, 4, 2], [8, 6, 4, 2, 0], [8, 6, 4, 2, 1], [8, 6, 4, 2, 1, 0], [8, 6, 4, 3], [8, 6, 4, 3, 0], [8, 6, 4, 3, 1], [8, 6, 4, 3, 1, 0], [8, 6, 4, 3, 2], [8, 6, 4, 3, 2, 0], [8, 6, 4, 3, 2, 1], [8, 6, 4, 3, 2, 1, 0], [8, 6, 5], [8, 6, 5, 0], [8, 6, 5, 1], [8, 6, 5, 1, 0], [8, 6, 5, 2], [8, 6, 5, 2, 0], [8, 6, 5, 2, 1], [8, 6, 5, 2, 1, 0], [8, 6, 5, 3], [8, 6, 5, 3, 0], [8, 6, 5, 3, 1], [8, 6, 5, 3, 1, 0], [8, 6, 5, 3, 2], [8, 6, 5, 3, 2, 0], [8, 6, 5, 3, 2, 1], [8, 6, 5, 3, 2, 1, 0], [8, 6, 5, 4], [8, 6, 5, 4, 0], [8, 6, 5, 4, 1], [8, 6, 5, 4, 1, 0], [8, 6, 5, 4, 2], [8, 6, 5, 4, 2, 0], [8, 6, 5, 4, 2, 1], [8, 6, 5, 4, 2, 1, 0], [8, 6, 5, 4, 3], [8, 6, 5, 4, 3, 0], [8, 6, 5, 4, 3, 1], [8, 6, 5, 4, 3, 1, 0], [8, 6, 5, 4, 3, 2], [8, 6, 5, 4, 3, 2, 0], [8, 6, 5, 4, 3, 2, 1], [8, 6, 5, 4, 3, 2, 1, 0], [8, 7], [8, 7, 0], [8, 7, 1], [8, 7, 1, 0], [8, 7, 2], [8, 7, 2, 0], [8, 7, 2, 1], [8, 7, 2, 1, 0], [8, 7, 3], [8, 7, 3, 0], [8, 7, 3, 1], [8, 7, 3, 1, 0], [8, 7, 3, 2], [8, 7, 3, 2, 0], [8, 7, 3, 2, 1], [8, 7, 3, 2, 1, 0], [8, 7, 4], [8, 7, 4, 0], [8, 7, 4, 1], [8, 7, 4, 1, 0], [8, 7, 4, 2], [8, 7, 4, 2, 0], [8, 7, 4, 2, 1], [8, 7, 4, 2, 1, 0], [8, 7, 4, 3], [8, 7, 4, 3, 0], [8, 7, 4, 3, 1], [8, 7, 4, 3, 1, 0], [8, 7, 4, 3, 2], [8, 7, 4, 3, 2, 0], [8, 7, 4, 3, 2, 1], [8, 7, 4, 3, 2, 1, 0], [8, 7, 5], [8, 7, 5, 0], [8, 7, 5, 1], [8, 7, 5, 1, 0], [8, 7, 5, 2], [8, 7, 5, 2, 0], [8, 7, 5, 2, 1], [8, 7, 5, 2, 1, 0], [8, 7, 5, 3], [8, 7, 5, 3, 0], [8, 7, 5, 3, 1], [8, 7, 5, 3, 1, 0], [8, 7, 5, 3, 2], [8, 7, 5, 3, 2, 0], [8, 7, 5, 3, 2, 1], [8, 7, 5, 3, 2, 1, 0], [8, 7, 5, 4], [8, 7, 5, 4, 0], [8, 7, 5, 4, 1], [8, 7, 5, 4, 1, 0], [8, 7, 5, 4, 2], [8, 7, 5, 4, 2, 0], [8, 7, 5, 4, 2, 1], [8, 7, 5, 4, 2, 1, 0], [8, 7, 5, 4, 3], [8, 7, 5, 4, 3, 0], [8, 7, 5, 4, 3, 1], [8, 7, 5, 4, 3, 1, 0], [8, 7, 5, 4, 3, 2], [8, 7, 5, 4, 3, 2, 0], [8, 7, 5, 4, 3, 2, 1], [8, 7, 5, 4, 3, 2, 1, 0], [8, 7, 6], [8, 7, 6, 0], [8, 7, 6, 1], [8, 7, 6, 1, 0], [8, 7, 6, 2], [8, 7, 6, 2, 0], [8, 7, 6, 2, 1], [8, 7, 6, 2, 1, 0], [8, 7, 6, 3], [8, 7, 6, 3, 0], [8, 7, 6, 3, 1], [8, 7, 6, 3, 1, 0], [8, 7, 6, 3, 2], [8, 7, 6, 3, 2, 0], [8, 7, 6, 3, 2, 1], [8, 7, 6, 3, 2, 1, 0], [8, 7, 6, 4], [8, 7, 6, 4, 0], [8, 7, 6, 4, 1], [8, 7, 6, 4, 1, 0], [8, 7, 6, 4, 2], [8, 7, 6, 4, 2, 0], [8, 7, 6, 4, 2, 1], [8, 7, 6, 4, 2, 1, 0], [8, 7, 6, 4, 3], [8, 7, 6, 4, 3, 0], [8, 7, 6, 4, 3, 1], [8, 7, 6, 4, 3, 1, 0], [8, 7, 6, 4, 3, 2], [8, 7, 6, 4, 3, 2, 0], [8, 7, 6, 4, 3, 2, 1], [8, 7, 6, 4, 3, 2, 1, 0], [8, 7, 6, 5], [8, 7, 6, 5, 0], [8, 7, 6, 5, 1], [8, 7, 6, 5, 1, 0], [8, 7, 6, 5, 2], [8, 7, 6, 5, 2, 0], [8, 7, 6, 5, 2, 1], [8, 7, 6, 5, 2, 1, 0], [8, 7, 6, 5, 3], [8, 7, 6, 5, 3, 0], [8, 7, 6, 5, 3, 1], [8, 7, 6, 5, 3, 1, 0], [8, 7, 6, 5, 3, 2], [8, 7, 6, 5, 3, 2, 0], [8, 7, 6, 5, 3, 2, 1], [8, 7, 6, 5, 3, 2, 1, 0], [8, 7, 6, 5, 4], [8, 7, 6, 5, 4, 0], [8, 7, 6, 5, 4, 1], [8, 7, 6, 5, 4, 1, 0], [8, 7, 6, 5, 4, 2], [8, 7, 6, 5, 4, 2, 0], [8, 7, 6, 5, 4, 2, 1], [8, 7, 6, 5, 4, 2, 1, 0], [8, 7, 6, 5, 4, 3], [8, 7, 6, 5, 4, 3, 0], [8, 7, 6, 5, 4, 3, 1], [8, 7, 6, 5, 4, 3, 1, 0], [8, 7, 6, 5, 4, 3, 2], [8, 7, 6, 5, 4, 3, 2, 0], [8, 7, 6, 5, 4, 3, 2, 1], [8, 7, 6, 5, 4, 3, 2, 1, 0], [9], [9, 0], [9, 1], [9, 1, 0], [9, 2], [9, 2, 0], [9, 2, 1], [9, 2, 1, 0], [9, 3], [9, 3, 0], [9, 3, 1], [9, 3, 1, 0], [9, 3, 2], [9, 3, 2, 0], [9, 3, 2, 1], [9, 3, 2, 1, 0], [9, 4], [9, 4, 0], [9, 4, 1], [9, 4, 1, 0], [9, 4, 2], [9, 4, 2, 0], [9, 4, 2, 1], [9, 4, 2, 1, 0], [9, 4, 3], [9, 4, 3, 0], [9, 4, 3, 1], [9, 4, 3, 1, 0], [9, 4, 3, 2], [9, 4, 3, 2, 0], [9, 4, 3, 2, 1], [9, 4, 3, 2, 1, 0], [9, 5], [9, 5, 0], [9, 5, 1], [9, 5, 1, 0], [9, 5, 2], [9, 5, 2, 0], [9, 5, 2, 1], [9, 5, 2, 1, 0], [9, 5, 3], [9, 5, 3, 0], [9, 5, 3, 1], [9, 5, 3, 1, 0], [9, 5, 3, 2], [9, 5, 3, 2, 0], [9, 5, 3, 2, 1], [9, 5, 3, 2, 1, 0], [9, 5, 4], [9, 5, 4, 0], [9, 5, 4, 1], [9, 5, 4, 1, 0], [9, 5, 4, 2], [9, 5, 4, 2, 0], [9, 5, 4, 2, 1], [9, 5, 4, 2, 1, 0], [9, 5, 4, 3], [9, 5, 4, 3, 0], [9, 5, 4, 3, 1], [9, 5, 4, 3, 1, 0], [9, 5, 4, 3, 2], [9, 5, 4, 3, 2, 0], [9, 5, 4, 3, 2, 1], [9, 5, 4, 3, 2, 1, 0], [9, 6], [9, 6, 0], [9, 6, 1], [9, 6, 1, 0], [9, 6, 2], [9, 6, 2, 0], [9, 6, 2, 1], [9, 6, 2, 1, 0], [9, 6, 3], [9, 6, 3, 0], [9, 6, 3, 1], [9, 6, 3, 1, 0], [9, 6, 3, 2], [9, 6, 3, 2, 0], [9, 6, 3, 2, 1], [9, 6, 3, 2, 1, 0], [9, 6, 4], [9, 6, 4, 0], [9, 6, 4, 1], [9, 6, 4, 1, 0], [9, 6, 4, 2], [9, 6, 4, 2, 0], [9, 6, 4, 2, 1], [9, 6, 4, 2, 1, 0], [9, 6, 4, 3], [9, 6, 4, 3, 0], [9, 6, 4, 3, 1], [9, 6, 4, 3, 1, 0], [9, 6, 4, 3, 2], [9, 6, 4, 3, 2, 0], [9, 6, 4, 3, 2, 1], [9, 6, 4, 3, 2, 1, 0], [9, 6, 5], [9, 6, 5, 0], [9, 6, 5, 1], [9, 6, 5, 1, 0], [9, 6, 5, 2], [9, 6, 5, 2, 0], [9, 6, 5, 2, 1], [9, 6, 5, 2, 1, 0], [9, 6, 5, 3], [9, 6, 5, 3, 0], [9, 6, 5, 3, 1], [9, 6, 5, 3, 1, 0], [9, 6, 5, 3, 2], [9, 6, 5, 3, 2, 0], [9, 6, 5, 3, 2, 1], [9, 6, 5, 3, 2, 1, 0], [9, 6, 5, 4], [9, 6, 5, 4, 0], [9, 6, 5, 4, 1], [9, 6, 5, 4, 1, 0], [9, 6, 5, 4, 2], [9, 6, 5, 4, 2, 0], [9, 6, 5, 4, 2, 1], [9, 6, 5, 4, 2, 1, 0], [9, 6, 5, 4, 3], [9, 6, 5, 4, 3, 0], [9, 6, 5, 4, 3, 1], [9, 6, 5, 4, 3, 1, 0], [9, 6, 5, 4, 3, 2], [9, 6, 5, 4, 3, 2, 0], [9, 6, 5, 4, 3, 2, 1], [9, 6, 5, 4, 3, 2, 1, 0], [9, 7], [9, 7, 0], [9, 7, 1], [9, 7, 1, 0], [9, 7, 2], [9, 7, 2, 0], [9, 7, 2, 1], [9, 7, 2, 1, 0], [9, 7, 3], [9, 7, 3, 0], [9, 7, 3, 1], [9, 7, 3, 1, 0], [9, 7, 3, 2], [9, 7, 3, 2, 0], [9, 7, 3, 2, 1], [9, 7, 3, 2, 1, 0], [9, 7, 4], [9, 7, 4, 0], [9, 7, 4, 1], [9, 7, 4, 1, 0], [9, 7, 4, 2], [9, 7, 4, 2, 0], [9, 7, 4, 2, 1], [9, 7, 4, 2, 1, 0], [9, 7, 4, 3], [9, 7, 4, 3, 0], [9, 7, 4, 3, 1], [9, 7, 4, 3, 1, 0], [9, 7, 4, 3, 2], [9, 7, 4, 3, 2, 0], [9, 7, 4, 3, 2, 1], [9, 7, 4, 3, 2, 1, 0], [9, 7, 5], [9, 7, 5, 0], [9, 7, 5, 1], [9, 7, 5, 1, 0], [9, 7, 5, 2], [9, 7, 5, 2, 0], [9, 7, 5, 2, 1], [9, 7, 5, 2, 1, 0], [9, 7, 5, 3], [9, 7, 5, 3, 0], [9, 7, 5, 3, 1], [9, 7, 5, 3, 1, 0], [9, 7, 5, 3, 2], [9, 7, 5, 3, 2, 0], [9, 7, 5, 3, 2, 1], [9, 7, 5, 3, 2, 1, 0], [9, 7, 5, 4], [9, 7, 5, 4, 0], [9, 7, 5, 4, 1], [9, 7, 5, 4, 1, 0], [9, 7, 5, 4, 2], [9, 7, 5, 4, 2, 0], [9, 7, 5, 4, 2, 1], [9, 7, 5, 4, 2, 1, 0], [9, 7, 5, 4, 3], [9, 7, 5, 4, 3, 0], [9, 7, 5, 4, 3, 1], [9, 7, 5, 4, 3, 1, 0], [9, 7, 5, 4, 3, 2], [9, 7, 5, 4, 3, 2, 0], [9, 7, 5, 4, 3, 2, 1], [9, 7, 5, 4, 3, 2, 1, 0], [9, 7, 6], [9, 7, 6, 0], [9, 7, 6, 1], [9, 7, 6, 1, 0], [9, 7, 6, 2], [9, 7, 6, 2, 0], [9, 7, 6, 2, 1], [9, 7, 6, 2, 1, 0], [9, 7, 6, 3], [9, 7, 6, 3, 0], [9, 7, 6, 3, 1], [9, 7, 6, 3, 1, 0], [9, 7, 6, 3, 2], [9, 7, 6, 3, 2, 0], [9, 7, 6, 3, 2, 1], [9, 7, 6, 3, 2, 1, 0], [9, 7, 6, 4], [9, 7, 6, 4, 0], [9, 7, 6, 4, 1], [9, 7, 6, 4, 1, 0], [9, 7, 6, 4, 2], [9, 7, 6, 4, 2, 0], [9, 7, 6, 4, 2, 1], [9, 7, 6, 4, 2, 1, 0], [9, 7, 6, 4, 3], [9, 7, 6, 4, 3, 0], [9, 7, 6, 4, 3, 1], [9, 7, 6, 4, 3, 1, 0], [9, 7, 6, 4, 3, 2], [9, 7, 6, 4, 3, 2, 0], [9, 7, 6, 4, 3, 2, 1], [9, 7, 6, 4, 3, 2, 1, 0], [9, 7, 6, 5], [9, 7, 6, 5, 0], [9, 7, 6, 5, 1], [9, 7, 6, 5, 1, 0], [9, 7, 6, 5, 2], [9, 7, 6, 5, 2, 0], [9, 7, 6, 5, 2, 1], [9, 7, 6, 5, 2, 1, 0], [9, 7, 6, 5, 3], [9, 7, 6, 5, 3, 0], [9, 7, 6, 5, 3, 1], [9, 7, 6, 5, 3, 1, 0], [9, 7, 6, 5, 3, 2], [9, 7, 6, 5, 3, 2, 0], [9, 7, 6, 5, 3, 2, 1], [9, 7, 6, 5, 3, 2, 1, 0], [9, 7, 6, 5, 4], [9, 7, 6, 5, 4, 0], [9, 7, 6, 5, 4, 1], [9, 7, 6, 5, 4, 1, 0], [9, 7, 6, 5, 4, 2], [9, 7, 6, 5, 4, 2, 0], [9, 7, 6, 5, 4, 2, 1], [9, 7, 6, 5, 4, 2, 1, 0], [9, 7, 6, 5, 4, 3], [9, 7, 6, 5, 4, 3, 0], [9, 7, 6, 5, 4, 3, 1], [9, 7, 6, 5, 4, 3, 1, 0], [9, 7, 6, 5, 4, 3, 2], [9, 7, 6, 5, 4, 3, 2, 0], [9, 7, 6, 5, 4, 3, 2, 1], [9, 7, 6, 5, 4, 3, 2, 1, 0], [9, 8], [9, 8, 0], [9, 8, 1], [9, 8, 1, 0], [9, 8, 2], [9, 8, 2, 0], [9, 8, 2, 1], [9, 8, 2, 1, 0], [9, 8, 3], [9, 8, 3, 0], [9, 8, 3, 1], [9, 8, 3, 1, 0], [9, 8, 3, 2], [9, 8, 3, 2, 0], [9, 8, 3, 2, 1], [9, 8, 3, 2, 1, 0], [9, 8, 4], [9, 8, 4, 0], [9, 8, 4, 1], [9, 8, 4, 1, 0], [9, 8, 4, 2], [9, 8, 4, 2, 0], [9, 8, 4, 2, 1], [9, 8, 4, 2, 1, 0], [9, 8, 4, 3], [9, 8, 4, 3, 0], [9, 8, 4, 3, 1], [9, 8, 4, 3, 1, 0], [9, 8, 4, 3, 2], [9, 8, 4, 3, 2, 0], [9, 8, 4, 3, 2, 1], [9, 8, 4, 3, 2, 1, 0], [9, 8, 5], [9, 8, 5, 0], [9, 8, 5, 1], [9, 8, 5, 1, 0], [9, 8, 5, 2], [9, 8, 5, 2, 0], [9, 8, 5, 2, 1], [9, 8, 5, 2, 1, 0], [9, 8, 5, 3], [9, 8, 5, 3, 0], [9, 8, 5, 3, 1], [9, 8, 5, 3, 1, 0], [9, 8, 5, 3, 2], [9, 8, 5, 3, 2, 0], [9, 8, 5, 3, 2, 1], [9, 8, 5, 3, 2, 1, 0], [9, 8, 5, 4], [9, 8, 5, 4, 0], [9, 8, 5, 4, 1], [9, 8, 5, 4, 1, 0], [9, 8, 5, 4, 2], [9, 8, 5, 4, 2, 0], [9, 8, 5, 4, 2, 1], [9, 8, 5, 4, 2, 1, 0], [9, 8, 5, 4, 3], [9, 8, 5, 4, 3, 0], [9, 8, 5, 4, 3, 1], [9, 8, 5, 4, 3, 1, 0], [9, 8, 5, 4, 3, 2], [9, 8, 5, 4, 3, 2, 0], [9, 8, 5, 4, 3, 2, 1], [9, 8, 5, 4, 3, 2, 1, 0], [9, 8, 6], [9, 8, 6, 0], [9, 8, 6, 1], [9, 8, 6, 1, 0], [9, 8, 6, 2], [9, 8, 6, 2, 0], [9, 8, 6, 2, 1], [9, 8, 6, 2, 1, 0], [9, 8, 6, 3], [9, 8, 6, 3, 0], [9, 8, 6, 3, 1], [9, 8, 6, 3, 1, 0], [9, 8, 6, 3, 2], [9, 8, 6, 3, 2, 0], [9, 8, 6, 3, 2, 1], [9, 8, 6, 3, 2, 1, 0], [9, 8, 6, 4], [9, 8, 6, 4, 0], [9, 8, 6, 4, 1], [9, 8, 6, 4, 1, 0], [9, 8, 6, 4, 2], [9, 8, 6, 4, 2, 0], [9, 8, 6, 4, 2, 1], [9, 8, 6, 4, 2, 1, 0], [9, 8, 6, 4, 3], [9, 8, 6, 4, 3, 0], [9, 8, 6, 4, 3, 1], [9, 8, 6, 4, 3, 1, 0], [9, 8, 6, 4, 3, 2], [9, 8, 6, 4, 3, 2, 0], [9, 8, 6, 4, 3, 2, 1], [9, 8, 6, 4, 3, 2, 1, 0], [9, 8, 6, 5], [9, 8, 6, 5, 0], [9, 8, 6, 5, 1], [9, 8, 6, 5, 1, 0], [9, 8, 6, 5, 2], [9, 8, 6, 5, 2, 0], [9, 8, 6, 5, 2, 1], [9, 8, 6, 5, 2, 1, 0], [9, 8, 6, 5, 3], [9, 8, 6, 5, 3, 0], [9, 8, 6, 5, 3, 1], [9, 8, 6, 5, 3, 1, 0], [9, 8, 6, 5, 3, 2], [9, 8, 6, 5, 3, 2, 0], [9, 8, 6, 5, 3, 2, 1], [9, 8, 6, 5, 3, 2, 1, 0], [9, 8, 6, 5, 4], [9, 8, 6, 5, 4, 0], [9, 8, 6, 5, 4, 1], [9, 8, 6, 5, 4, 1, 0], [9, 8, 6, 5, 4, 2], [9, 8, 6, 5, 4, 2, 0], [9, 8, 6, 5, 4, 2, 1], [9, 8, 6, 5, 4, 2, 1, 0], [9, 8, 6, 5, 4, 3], [9, 8, 6, 5, 4, 3, 0], [9, 8, 6, 5, 4, 3, 1], [9, 8, 6, 5, 4, 3, 1, 0], [9, 8, 6, 5, 4, 3, 2], [9, 8, 6, 5, 4, 3, 2, 0], [9, 8, 6, 5, 4, 3, 2, 1], [9, 8, 6, 5, 4, 3, 2, 1, 0], [9, 8, 7], [9, 8, 7, 0], [9, 8, 7, 1], [9, 8, 7, 1, 0], [9, 8, 7, 2], [9, 8, 7, 2, 0], [9, 8, 7, 2, 1], [9, 8, 7, 2, 1, 0], [9, 8, 7, 3], [9, 8, 7, 3, 0], [9, 8, 7, 3, 1], [9, 8, 7, 3, 1, 0], [9, 8, 7, 3, 2], [9, 8, 7, 3, 2, 0], [9, 8, 7, 3, 2, 1], [9, 8, 7, 3, 2, 1, 0], [9, 8, 7, 4], [9, 8, 7, 4, 0], [9, 8, 7, 4, 1], [9, 8, 7, 4, 1, 0], [9, 8, 7, 4, 2], [9, 8, 7, 4, 2, 0], [9, 8, 7, 4, 2, 1], [9, 8, 7, 4, 2, 1, 0], [9, 8, 7, 4, 3], [9, 8, 7, 4, 3, 0], [9, 8, 7, 4, 3, 1], [9, 8, 7, 4, 3, 1, 0], [9, 8, 7, 4, 3, 2], [9, 8, 7, 4, 3, 2, 0], [9, 8, 7, 4, 3, 2, 1], [9, 8, 7, 4, 3, 2, 1, 0], [9, 8, 7, 5], [9, 8, 7, 5, 0], [9, 8, 7, 5, 1], [9, 8, 7, 5, 1, 0], [9, 8, 7, 5, 2], [9, 8, 7, 5, 2, 0], [9, 8, 7, 5, 2, 1], [9, 8, 7, 5, 2, 1, 0], [9, 8, 7, 5, 3], [9, 8, 7, 5, 3, 0], [9, 8, 7, 5, 3, 1], [9, 8, 7, 5, 3, 1, 0], [9, 8, 7, 5, 3, 2], [9, 8, 7, 5, 3, 2, 0], [9, 8, 7, 5, 3, 2, 1], [9, 8, 7, 5, 3, 2, 1, 0], [9, 8, 7, 5, 4], [9, 8, 7, 5, 4, 0], [9, 8, 7, 5, 4, 1], [9, 8, 7, 5, 4, 1, 0], [9, 8, 7, 5, 4, 2], [9, 8, 7, 5, 4, 2, 0], [9, 8, 7, 5, 4, 2, 1], [9, 8, 7, 5, 4, 2, 1, 0], [9, 8, 7, 5, 4, 3], [9, 8, 7, 5, 4, 3, 0], [9, 8, 7, 5, 4, 3, 1], [9, 8, 7, 5, 4, 3, 1, 0], [9, 8, 7, 5, 4, 3, 2], [9, 8, 7, 5, 4, 3, 2, 0], [9, 8, 7, 5, 4, 3, 2, 1], [9, 8, 7, 5, 4, 3, 2, 1, 0], [9, 8, 7, 6], [9, 8, 7, 6, 0], [9, 8, 7, 6, 1], [9, 8, 7, 6, 1, 0], [9, 8, 7, 6, 2], [9, 8, 7, 6, 2, 0], [9, 8, 7, 6, 2, 1], [9, 8, 7, 6, 2, 1, 0], [9, 8, 7, 6, 3], [9, 8, 7, 6, 3, 0], [9, 8, 7, 6, 3, 1], [9, 8, 7, 6, 3, 1, 0], [9, 8, 7, 6, 3, 2], [9, 8, 7, 6, 3, 2, 0], [9, 8, 7, 6, 3, 2, 1], [9, 8, 7, 6, 3, 2, 1, 0], [9, 8, 7, 6, 4], [9, 8, 7, 6, 4, 0], [9, 8, 7, 6, 4, 1], [9, 8, 7, 6, 4, 1, 0], [9, 8, 7, 6, 4, 2], [9, 8, 7, 6, 4, 2, 0], [9, 8, 7, 6, 4, 2, 1], [9, 8, 7, 6, 4, 2, 1, 0], [9, 8, 7, 6, 4, 3], [9, 8, 7, 6, 4, 3, 0], [9, 8, 7, 6, 4, 3, 1], [9, 8, 7, 6, 4, 3, 1, 0], [9, 8, 7, 6, 4, 3, 2], [9, 8, 7, 6, 4, 3, 2, 0], [9, 8, 7, 6, 4, 3, 2, 1], [9, 8, 7, 6, 4, 3, 2, 1, 0], [9, 8, 7, 6, 5], [9, 8, 7, 6, 5, 0], [9, 8, 7, 6, 5, 1], [9, 8, 7, 6, 5, 1, 0], [9, 8, 7, 6, 5, 2], [9, 8, 7, 6, 5, 2, 0], [9, 8, 7, 6, 5, 2, 1], [9, 8, 7, 6, 5, 2, 1, 0], [9, 8, 7, 6, 5, 3], [9, 8, 7, 6, 5, 3, 0], [9, 8, 7, 6, 5, 3, 1], [9, 8, 7, 6, 5, 3, 1, 0], [9, 8, 7, 6, 5, 3, 2], [9, 8, 7, 6, 5, 3, 2, 0], [9, 8, 7, 6, 5, 3, 2, 1], [9, 8, 7, 6, 5, 3, 2, 1, 0], [9, 8, 7, 6, 5, 4], [9, 8, 7, 6, 5, 4, 0], [9, 8, 7, 6, 5, 4, 1], [9, 8, 7, 6, 5, 4, 1, 0], [9, 8, 7, 6, 5, 4, 2], [9, 8, 7, 6, 5, 4, 2, 0], [9, 8, 7, 6, 5, 4, 2, 1], [9, 8, 7, 6, 5, 4, 2, 1, 0], [9, 8, 7, 6, 5, 4, 3], [9, 8, 7, 6, 5, 4, 3, 0], [9, 8, 7, 6, 5, 4, 3, 1], [9, 8, 7, 6, 5, 4, 3, 1, 0], [9, 8, 7, 6, 5, 4, 3, 2], [9, 8, 7, 6, 5, 4, 3, 2, 0], [9, 8, 7, 6, 5, 4, 3, 2, 1], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]])\n assert answers_match(candidate(nums=[-5, 0, 5, 10]), [[], [10], [5], [5, 10], [0], [0, 10], [0, 5], [0, 5, 10], [-5], [-5, 10], [-5, 5], [-5, 5, 10], [-5, 0], [-5, 0, 10], [-5, 0, 5], [-5, 0, 5, 10]])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]), [[], [0], [1], [1, 0], [2], [2, 0], [2, 1], [2, 1, 0], [3], [3, 0], [3, 1], [3, 1, 0], [3, 2], [3, 2, 0], [3, 2, 1], [3, 2, 1, 0], [4], [4, 0], [4, 1], [4, 1, 0], [4, 2], [4, 2, 0], [4, 2, 1], [4, 2, 1, 0], [4, 3], [4, 3, 0], [4, 3, 1], [4, 3, 1, 0], [4, 3, 2], [4, 3, 2, 0], [4, 3, 2, 1], [4, 3, 2, 1, 0], [5], [5, 0], [5, 1], [5, 1, 0], [5, 2], [5, 2, 0], [5, 2, 1], [5, 2, 1, 0], [5, 3], [5, 3, 0], [5, 3, 1], [5, 3, 1, 0], [5, 3, 2], [5, 3, 2, 0], [5, 3, 2, 1], [5, 3, 2, 1, 0], [5, 4], [5, 4, 0], [5, 4, 1], [5, 4, 1, 0], [5, 4, 2], [5, 4, 2, 0], [5, 4, 2, 1], [5, 4, 2, 1, 0], [5, 4, 3], [5, 4, 3, 0], [5, 4, 3, 1], [5, 4, 3, 1, 0], [5, 4, 3, 2], [5, 4, 3, 2, 0], [5, 4, 3, 2, 1], [5, 4, 3, 2, 1, 0], [6], [6, 0], [6, 1], [6, 1, 0], [6, 2], [6, 2, 0], [6, 2, 1], [6, 2, 1, 0], [6, 3], [6, 3, 0], [6, 3, 1], [6, 3, 1, 0], [6, 3, 2], [6, 3, 2, 0], [6, 3, 2, 1], [6, 3, 2, 1, 0], [6, 4], [6, 4, 0], [6, 4, 1], [6, 4, 1, 0], [6, 4, 2], [6, 4, 2, 0], [6, 4, 2, 1], [6, 4, 2, 1, 0], [6, 4, 3], [6, 4, 3, 0], [6, 4, 3, 1], [6, 4, 3, 1, 0], [6, 4, 3, 2], [6, 4, 3, 2, 0], [6, 4, 3, 2, 1], [6, 4, 3, 2, 1, 0], [6, 5], [6, 5, 0], [6, 5, 1], [6, 5, 1, 0], [6, 5, 2], [6, 5, 2, 0], [6, 5, 2, 1], [6, 5, 2, 1, 0], [6, 5, 3], [6, 5, 3, 0], [6, 5, 3, 1], [6, 5, 3, 1, 0], [6, 5, 3, 2], [6, 5, 3, 2, 0], [6, 5, 3, 2, 1], [6, 5, 3, 2, 1, 0], [6, 5, 4], [6, 5, 4, 0], [6, 5, 4, 1], [6, 5, 4, 1, 0], [6, 5, 4, 2], [6, 5, 4, 2, 0], [6, 5, 4, 2, 1], [6, 5, 4, 2, 1, 0], [6, 5, 4, 3], [6, 5, 4, 3, 0], [6, 5, 4, 3, 1], [6, 5, 4, 3, 1, 0], [6, 5, 4, 3, 2], [6, 5, 4, 3, 2, 0], [6, 5, 4, 3, 2, 1], [6, 5, 4, 3, 2, 1, 0], [7], [7, 0], [7, 1], [7, 1, 0], [7, 2], [7, 2, 0], [7, 2, 1], [7, 2, 1, 0], [7, 3], [7, 3, 0], [7, 3, 1], [7, 3, 1, 0], [7, 3, 2], [7, 3, 2, 0], [7, 3, 2, 1], [7, 3, 2, 1, 0], [7, 4], [7, 4, 0], [7, 4, 1], [7, 4, 1, 0], [7, 4, 2], [7, 4, 2, 0], [7, 4, 2, 1], [7, 4, 2, 1, 0], [7, 4, 3], [7, 4, 3, 0], [7, 4, 3, 1], [7, 4, 3, 1, 0], [7, 4, 3, 2], [7, 4, 3, 2, 0], [7, 4, 3, 2, 1], [7, 4, 3, 2, 1, 0], [7, 5], [7, 5, 0], [7, 5, 1], [7, 5, 1, 0], [7, 5, 2], [7, 5, 2, 0], [7, 5, 2, 1], [7, 5, 2, 1, 0], [7, 5, 3], [7, 5, 3, 0], [7, 5, 3, 1], [7, 5, 3, 1, 0], [7, 5, 3, 2], [7, 5, 3, 2, 0], [7, 5, 3, 2, 1], [7, 5, 3, 2, 1, 0], [7, 5, 4], [7, 5, 4, 0], [7, 5, 4, 1], [7, 5, 4, 1, 0], [7, 5, 4, 2], [7, 5, 4, 2, 0], [7, 5, 4, 2, 1], [7, 5, 4, 2, 1, 0], [7, 5, 4, 3], [7, 5, 4, 3, 0], [7, 5, 4, 3, 1], [7, 5, 4, 3, 1, 0], [7, 5, 4, 3, 2], [7, 5, 4, 3, 2, 0], [7, 5, 4, 3, 2, 1], [7, 5, 4, 3, 2, 1, 0], [7, 6], [7, 6, 0], [7, 6, 1], [7, 6, 1, 0], [7, 6, 2], [7, 6, 2, 0], [7, 6, 2, 1], [7, 6, 2, 1, 0], [7, 6, 3], [7, 6, 3, 0], [7, 6, 3, 1], [7, 6, 3, 1, 0], [7, 6, 3, 2], [7, 6, 3, 2, 0], [7, 6, 3, 2, 1], [7, 6, 3, 2, 1, 0], [7, 6, 4], [7, 6, 4, 0], [7, 6, 4, 1], [7, 6, 4, 1, 0], [7, 6, 4, 2], [7, 6, 4, 2, 0], [7, 6, 4, 2, 1], [7, 6, 4, 2, 1, 0], [7, 6, 4, 3], [7, 6, 4, 3, 0], [7, 6, 4, 3, 1], [7, 6, 4, 3, 1, 0], [7, 6, 4, 3, 2], [7, 6, 4, 3, 2, 0], [7, 6, 4, 3, 2, 1], [7, 6, 4, 3, 2, 1, 0], [7, 6, 5], [7, 6, 5, 0], [7, 6, 5, 1], [7, 6, 5, 1, 0], [7, 6, 5, 2], [7, 6, 5, 2, 0], [7, 6, 5, 2, 1], [7, 6, 5, 2, 1, 0], [7, 6, 5, 3], [7, 6, 5, 3, 0], [7, 6, 5, 3, 1], [7, 6, 5, 3, 1, 0], [7, 6, 5, 3, 2], [7, 6, 5, 3, 2, 0], [7, 6, 5, 3, 2, 1], [7, 6, 5, 3, 2, 1, 0], [7, 6, 5, 4], [7, 6, 5, 4, 0], [7, 6, 5, 4, 1], [7, 6, 5, 4, 1, 0], [7, 6, 5, 4, 2], [7, 6, 5, 4, 2, 0], [7, 6, 5, 4, 2, 1], [7, 6, 5, 4, 2, 1, 0], [7, 6, 5, 4, 3], [7, 6, 5, 4, 3, 0], [7, 6, 5, 4, 3, 1], [7, 6, 5, 4, 3, 1, 0], [7, 6, 5, 4, 3, 2], [7, 6, 5, 4, 3, 2, 0], [7, 6, 5, 4, 3, 2, 1], [7, 6, 5, 4, 3, 2, 1, 0], [8], [8, 0], [8, 1], [8, 1, 0], [8, 2], [8, 2, 0], [8, 2, 1], [8, 2, 1, 0], [8, 3], [8, 3, 0], [8, 3, 1], [8, 3, 1, 0], [8, 3, 2], [8, 3, 2, 0], [8, 3, 2, 1], [8, 3, 2, 1, 0], [8, 4], [8, 4, 0], [8, 4, 1], [8, 4, 1, 0], [8, 4, 2], [8, 4, 2, 0], [8, 4, 2, 1], [8, 4, 2, 1, 0], [8, 4, 3], [8, 4, 3, 0], [8, 4, 3, 1], [8, 4, 3, 1, 0], [8, 4, 3, 2], [8, 4, 3, 2, 0], [8, 4, 3, 2, 1], [8, 4, 3, 2, 1, 0], [8, 5], [8, 5, 0], [8, 5, 1], [8, 5, 1, 0], [8, 5, 2], [8, 5, 2, 0], [8, 5, 2, 1], [8, 5, 2, 1, 0], [8, 5, 3], [8, 5, 3, 0], [8, 5, 3, 1], [8, 5, 3, 1, 0], [8, 5, 3, 2], [8, 5, 3, 2, 0], [8, 5, 3, 2, 1], [8, 5, 3, 2, 1, 0], [8, 5, 4], [8, 5, 4, 0], [8, 5, 4, 1], [8, 5, 4, 1, 0], [8, 5, 4, 2], [8, 5, 4, 2, 0], [8, 5, 4, 2, 1], [8, 5, 4, 2, 1, 0], [8, 5, 4, 3], [8, 5, 4, 3, 0], [8, 5, 4, 3, 1], [8, 5, 4, 3, 1, 0], [8, 5, 4, 3, 2], [8, 5, 4, 3, 2, 0], [8, 5, 4, 3, 2, 1], [8, 5, 4, 3, 2, 1, 0], [8, 6], [8, 6, 0], [8, 6, 1], [8, 6, 1, 0], [8, 6, 2], [8, 6, 2, 0], [8, 6, 2, 1], [8, 6, 2, 1, 0], [8, 6, 3], [8, 6, 3, 0], [8, 6, 3, 1], [8, 6, 3, 1, 0], [8, 6, 3, 2], [8, 6, 3, 2, 0], [8, 6, 3, 2, 1], [8, 6, 3, 2, 1, 0], [8, 6, 4], [8, 6, 4, 0], [8, 6, 4, 1], [8, 6, 4, 1, 0], [8, 6, 4, 2], [8, 6, 4, 2, 0], [8, 6, 4, 2, 1], [8, 6, 4, 2, 1, 0], [8, 6, 4, 3], [8, 6, 4, 3, 0], [8, 6, 4, 3, 1], [8, 6, 4, 3, 1, 0], [8, 6, 4, 3, 2], [8, 6, 4, 3, 2, 0], [8, 6, 4, 3, 2, 1], [8, 6, 4, 3, 2, 1, 0], [8, 6, 5], [8, 6, 5, 0], [8, 6, 5, 1], [8, 6, 5, 1, 0], [8, 6, 5, 2], [8, 6, 5, 2, 0], [8, 6, 5, 2, 1], [8, 6, 5, 2, 1, 0], [8, 6, 5, 3], [8, 6, 5, 3, 0], [8, 6, 5, 3, 1], [8, 6, 5, 3, 1, 0], [8, 6, 5, 3, 2], [8, 6, 5, 3, 2, 0], [8, 6, 5, 3, 2, 1], [8, 6, 5, 3, 2, 1, 0], [8, 6, 5, 4], [8, 6, 5, 4, 0], [8, 6, 5, 4, 1], [8, 6, 5, 4, 1, 0], [8, 6, 5, 4, 2], [8, 6, 5, 4, 2, 0], [8, 6, 5, 4, 2, 1], [8, 6, 5, 4, 2, 1, 0], [8, 6, 5, 4, 3], [8, 6, 5, 4, 3, 0], [8, 6, 5, 4, 3, 1], [8, 6, 5, 4, 3, 1, 0], [8, 6, 5, 4, 3, 2], [8, 6, 5, 4, 3, 2, 0], [8, 6, 5, 4, 3, 2, 1], [8, 6, 5, 4, 3, 2, 1, 0], [8, 7], [8, 7, 0], [8, 7, 1], [8, 7, 1, 0], [8, 7, 2], [8, 7, 2, 0], [8, 7, 2, 1], [8, 7, 2, 1, 0], [8, 7, 3], [8, 7, 3, 0], [8, 7, 3, 1], [8, 7, 3, 1, 0], [8, 7, 3, 2], [8, 7, 3, 2, 0], [8, 7, 3, 2, 1], [8, 7, 3, 2, 1, 0], [8, 7, 4], [8, 7, 4, 0], [8, 7, 4, 1], [8, 7, 4, 1, 0], [8, 7, 4, 2], [8, 7, 4, 2, 0], [8, 7, 4, 2, 1], [8, 7, 4, 2, 1, 0], [8, 7, 4, 3], [8, 7, 4, 3, 0], [8, 7, 4, 3, 1], [8, 7, 4, 3, 1, 0], [8, 7, 4, 3, 2], [8, 7, 4, 3, 2, 0], [8, 7, 4, 3, 2, 1], [8, 7, 4, 3, 2, 1, 0], [8, 7, 5], [8, 7, 5, 0], [8, 7, 5, 1], [8, 7, 5, 1, 0], [8, 7, 5, 2], [8, 7, 5, 2, 0], [8, 7, 5, 2, 1], [8, 7, 5, 2, 1, 0], [8, 7, 5, 3], [8, 7, 5, 3, 0], [8, 7, 5, 3, 1], [8, 7, 5, 3, 1, 0], [8, 7, 5, 3, 2], [8, 7, 5, 3, 2, 0], [8, 7, 5, 3, 2, 1], [8, 7, 5, 3, 2, 1, 0], [8, 7, 5, 4], [8, 7, 5, 4, 0], [8, 7, 5, 4, 1], [8, 7, 5, 4, 1, 0], [8, 7, 5, 4, 2], [8, 7, 5, 4, 2, 0], [8, 7, 5, 4, 2, 1], [8, 7, 5, 4, 2, 1, 0], [8, 7, 5, 4, 3], [8, 7, 5, 4, 3, 0], [8, 7, 5, 4, 3, 1], [8, 7, 5, 4, 3, 1, 0], [8, 7, 5, 4, 3, 2], [8, 7, 5, 4, 3, 2, 0], [8, 7, 5, 4, 3, 2, 1], [8, 7, 5, 4, 3, 2, 1, 0], [8, 7, 6], [8, 7, 6, 0], [8, 7, 6, 1], [8, 7, 6, 1, 0], [8, 7, 6, 2], [8, 7, 6, 2, 0], [8, 7, 6, 2, 1], [8, 7, 6, 2, 1, 0], [8, 7, 6, 3], [8, 7, 6, 3, 0], [8, 7, 6, 3, 1], [8, 7, 6, 3, 1, 0], [8, 7, 6, 3, 2], [8, 7, 6, 3, 2, 0], [8, 7, 6, 3, 2, 1], [8, 7, 6, 3, 2, 1, 0], [8, 7, 6, 4], [8, 7, 6, 4, 0], [8, 7, 6, 4, 1], [8, 7, 6, 4, 1, 0], [8, 7, 6, 4, 2], [8, 7, 6, 4, 2, 0], [8, 7, 6, 4, 2, 1], [8, 7, 6, 4, 2, 1, 0], [8, 7, 6, 4, 3], [8, 7, 6, 4, 3, 0], [8, 7, 6, 4, 3, 1], [8, 7, 6, 4, 3, 1, 0], [8, 7, 6, 4, 3, 2], [8, 7, 6, 4, 3, 2, 0], [8, 7, 6, 4, 3, 2, 1], [8, 7, 6, 4, 3, 2, 1, 0], [8, 7, 6, 5], [8, 7, 6, 5, 0], [8, 7, 6, 5, 1], [8, 7, 6, 5, 1, 0], [8, 7, 6, 5, 2], [8, 7, 6, 5, 2, 0], [8, 7, 6, 5, 2, 1], [8, 7, 6, 5, 2, 1, 0], [8, 7, 6, 5, 3], [8, 7, 6, 5, 3, 0], [8, 7, 6, 5, 3, 1], [8, 7, 6, 5, 3, 1, 0], [8, 7, 6, 5, 3, 2], [8, 7, 6, 5, 3, 2, 0], [8, 7, 6, 5, 3, 2, 1], [8, 7, 6, 5, 3, 2, 1, 0], [8, 7, 6, 5, 4], [8, 7, 6, 5, 4, 0], [8, 7, 6, 5, 4, 1], [8, 7, 6, 5, 4, 1, 0], [8, 7, 6, 5, 4, 2], [8, 7, 6, 5, 4, 2, 0], [8, 7, 6, 5, 4, 2, 1], [8, 7, 6, 5, 4, 2, 1, 0], [8, 7, 6, 5, 4, 3], [8, 7, 6, 5, 4, 3, 0], [8, 7, 6, 5, 4, 3, 1], [8, 7, 6, 5, 4, 3, 1, 0], [8, 7, 6, 5, 4, 3, 2], [8, 7, 6, 5, 4, 3, 2, 0], [8, 7, 6, 5, 4, 3, 2, 1], [8, 7, 6, 5, 4, 3, 2, 1, 0], [9], [9, 0], [9, 1], [9, 1, 0], [9, 2], [9, 2, 0], [9, 2, 1], [9, 2, 1, 0], [9, 3], [9, 3, 0], [9, 3, 1], [9, 3, 1, 0], [9, 3, 2], [9, 3, 2, 0], [9, 3, 2, 1], [9, 3, 2, 1, 0], [9, 4], [9, 4, 0], [9, 4, 1], [9, 4, 1, 0], [9, 4, 2], [9, 4, 2, 0], [9, 4, 2, 1], [9, 4, 2, 1, 0], [9, 4, 3], [9, 4, 3, 0], [9, 4, 3, 1], [9, 4, 3, 1, 0], [9, 4, 3, 2], [9, 4, 3, 2, 0], [9, 4, 3, 2, 1], [9, 4, 3, 2, 1, 0], [9, 5], [9, 5, 0], [9, 5, 1], [9, 5, 1, 0], [9, 5, 2], [9, 5, 2, 0], [9, 5, 2, 1], [9, 5, 2, 1, 0], [9, 5, 3], [9, 5, 3, 0], [9, 5, 3, 1], [9, 5, 3, 1, 0], [9, 5, 3, 2], [9, 5, 3, 2, 0], [9, 5, 3, 2, 1], [9, 5, 3, 2, 1, 0], [9, 5, 4], [9, 5, 4, 0], [9, 5, 4, 1], [9, 5, 4, 1, 0], [9, 5, 4, 2], [9, 5, 4, 2, 0], [9, 5, 4, 2, 1], [9, 5, 4, 2, 1, 0], [9, 5, 4, 3], [9, 5, 4, 3, 0], [9, 5, 4, 3, 1], [9, 5, 4, 3, 1, 0], [9, 5, 4, 3, 2], [9, 5, 4, 3, 2, 0], [9, 5, 4, 3, 2, 1], [9, 5, 4, 3, 2, 1, 0], [9, 6], [9, 6, 0], [9, 6, 1], [9, 6, 1, 0], [9, 6, 2], [9, 6, 2, 0], [9, 6, 2, 1], [9, 6, 2, 1, 0], [9, 6, 3], [9, 6, 3, 0], [9, 6, 3, 1], [9, 6, 3, 1, 0], [9, 6, 3, 2], [9, 6, 3, 2, 0], [9, 6, 3, 2, 1], [9, 6, 3, 2, 1, 0], [9, 6, 4], [9, 6, 4, 0], [9, 6, 4, 1], [9, 6, 4, 1, 0], [9, 6, 4, 2], [9, 6, 4, 2, 0], [9, 6, 4, 2, 1], [9, 6, 4, 2, 1, 0], [9, 6, 4, 3], [9, 6, 4, 3, 0], [9, 6, 4, 3, 1], [9, 6, 4, 3, 1, 0], [9, 6, 4, 3, 2], [9, 6, 4, 3, 2, 0], [9, 6, 4, 3, 2, 1], [9, 6, 4, 3, 2, 1, 0], [9, 6, 5], [9, 6, 5, 0], [9, 6, 5, 1], [9, 6, 5, 1, 0], [9, 6, 5, 2], [9, 6, 5, 2, 0], [9, 6, 5, 2, 1], [9, 6, 5, 2, 1, 0], [9, 6, 5, 3], [9, 6, 5, 3, 0], [9, 6, 5, 3, 1], [9, 6, 5, 3, 1, 0], [9, 6, 5, 3, 2], [9, 6, 5, 3, 2, 0], [9, 6, 5, 3, 2, 1], [9, 6, 5, 3, 2, 1, 0], [9, 6, 5, 4], [9, 6, 5, 4, 0], [9, 6, 5, 4, 1], [9, 6, 5, 4, 1, 0], [9, 6, 5, 4, 2], [9, 6, 5, 4, 2, 0], [9, 6, 5, 4, 2, 1], [9, 6, 5, 4, 2, 1, 0], [9, 6, 5, 4, 3], [9, 6, 5, 4, 3, 0], [9, 6, 5, 4, 3, 1], [9, 6, 5, 4, 3, 1, 0], [9, 6, 5, 4, 3, 2], [9, 6, 5, 4, 3, 2, 0], [9, 6, 5, 4, 3, 2, 1], [9, 6, 5, 4, 3, 2, 1, 0], [9, 7], [9, 7, 0], [9, 7, 1], [9, 7, 1, 0], [9, 7, 2], [9, 7, 2, 0], [9, 7, 2, 1], [9, 7, 2, 1, 0], [9, 7, 3], [9, 7, 3, 0], [9, 7, 3, 1], [9, 7, 3, 1, 0], [9, 7, 3, 2], [9, 7, 3, 2, 0], [9, 7, 3, 2, 1], [9, 7, 3, 2, 1, 0], [9, 7, 4], [9, 7, 4, 0], [9, 7, 4, 1], [9, 7, 4, 1, 0], [9, 7, 4, 2], [9, 7, 4, 2, 0], [9, 7, 4, 2, 1], [9, 7, 4, 2, 1, 0], [9, 7, 4, 3], [9, 7, 4, 3, 0], [9, 7, 4, 3, 1], [9, 7, 4, 3, 1, 0], [9, 7, 4, 3, 2], [9, 7, 4, 3, 2, 0], [9, 7, 4, 3, 2, 1], [9, 7, 4, 3, 2, 1, 0], [9, 7, 5], [9, 7, 5, 0], [9, 7, 5, 1], [9, 7, 5, 1, 0], [9, 7, 5, 2], [9, 7, 5, 2, 0], [9, 7, 5, 2, 1], [9, 7, 5, 2, 1, 0], [9, 7, 5, 3], [9, 7, 5, 3, 0], [9, 7, 5, 3, 1], [9, 7, 5, 3, 1, 0], [9, 7, 5, 3, 2], [9, 7, 5, 3, 2, 0], [9, 7, 5, 3, 2, 1], [9, 7, 5, 3, 2, 1, 0], [9, 7, 5, 4], [9, 7, 5, 4, 0], [9, 7, 5, 4, 1], [9, 7, 5, 4, 1, 0], [9, 7, 5, 4, 2], [9, 7, 5, 4, 2, 0], [9, 7, 5, 4, 2, 1], [9, 7, 5, 4, 2, 1, 0], [9, 7, 5, 4, 3], [9, 7, 5, 4, 3, 0], [9, 7, 5, 4, 3, 1], [9, 7, 5, 4, 3, 1, 0], [9, 7, 5, 4, 3, 2], [9, 7, 5, 4, 3, 2, 0], [9, 7, 5, 4, 3, 2, 1], [9, 7, 5, 4, 3, 2, 1, 0], [9, 7, 6], [9, 7, 6, 0], [9, 7, 6, 1], [9, 7, 6, 1, 0], [9, 7, 6, 2], [9, 7, 6, 2, 0], [9, 7, 6, 2, 1], [9, 7, 6, 2, 1, 0], [9, 7, 6, 3], [9, 7, 6, 3, 0], [9, 7, 6, 3, 1], [9, 7, 6, 3, 1, 0], [9, 7, 6, 3, 2], [9, 7, 6, 3, 2, 0], [9, 7, 6, 3, 2, 1], [9, 7, 6, 3, 2, 1, 0], [9, 7, 6, 4], [9, 7, 6, 4, 0], [9, 7, 6, 4, 1], [9, 7, 6, 4, 1, 0], [9, 7, 6, 4, 2], [9, 7, 6, 4, 2, 0], [9, 7, 6, 4, 2, 1], [9, 7, 6, 4, 2, 1, 0], [9, 7, 6, 4, 3], [9, 7, 6, 4, 3, 0], [9, 7, 6, 4, 3, 1], [9, 7, 6, 4, 3, 1, 0], [9, 7, 6, 4, 3, 2], [9, 7, 6, 4, 3, 2, 0], [9, 7, 6, 4, 3, 2, 1], [9, 7, 6, 4, 3, 2, 1, 0], [9, 7, 6, 5], [9, 7, 6, 5, 0], [9, 7, 6, 5, 1], [9, 7, 6, 5, 1, 0], [9, 7, 6, 5, 2], [9, 7, 6, 5, 2, 0], [9, 7, 6, 5, 2, 1], [9, 7, 6, 5, 2, 1, 0], [9, 7, 6, 5, 3], [9, 7, 6, 5, 3, 0], [9, 7, 6, 5, 3, 1], [9, 7, 6, 5, 3, 1, 0], [9, 7, 6, 5, 3, 2], [9, 7, 6, 5, 3, 2, 0], [9, 7, 6, 5, 3, 2, 1], [9, 7, 6, 5, 3, 2, 1, 0], [9, 7, 6, 5, 4], [9, 7, 6, 5, 4, 0], [9, 7, 6, 5, 4, 1], [9, 7, 6, 5, 4, 1, 0], [9, 7, 6, 5, 4, 2], [9, 7, 6, 5, 4, 2, 0], [9, 7, 6, 5, 4, 2, 1], [9, 7, 6, 5, 4, 2, 1, 0], [9, 7, 6, 5, 4, 3], [9, 7, 6, 5, 4, 3, 0], [9, 7, 6, 5, 4, 3, 1], [9, 7, 6, 5, 4, 3, 1, 0], [9, 7, 6, 5, 4, 3, 2], [9, 7, 6, 5, 4, 3, 2, 0], [9, 7, 6, 5, 4, 3, 2, 1], [9, 7, 6, 5, 4, 3, 2, 1, 0], [9, 8], [9, 8, 0], [9, 8, 1], [9, 8, 1, 0], [9, 8, 2], [9, 8, 2, 0], [9, 8, 2, 1], [9, 8, 2, 1, 0], [9, 8, 3], [9, 8, 3, 0], [9, 8, 3, 1], [9, 8, 3, 1, 0], [9, 8, 3, 2], [9, 8, 3, 2, 0], [9, 8, 3, 2, 1], [9, 8, 3, 2, 1, 0], [9, 8, 4], [9, 8, 4, 0], [9, 8, 4, 1], [9, 8, 4, 1, 0], [9, 8, 4, 2], [9, 8, 4, 2, 0], [9, 8, 4, 2, 1], [9, 8, 4, 2, 1, 0], [9, 8, 4, 3], [9, 8, 4, 3, 0], [9, 8, 4, 3, 1], [9, 8, 4, 3, 1, 0], [9, 8, 4, 3, 2], [9, 8, 4, 3, 2, 0], [9, 8, 4, 3, 2, 1], [9, 8, 4, 3, 2, 1, 0], [9, 8, 5], [9, 8, 5, 0], [9, 8, 5, 1], [9, 8, 5, 1, 0], [9, 8, 5, 2], [9, 8, 5, 2, 0], [9, 8, 5, 2, 1], [9, 8, 5, 2, 1, 0], [9, 8, 5, 3], [9, 8, 5, 3, 0], [9, 8, 5, 3, 1], [9, 8, 5, 3, 1, 0], [9, 8, 5, 3, 2], [9, 8, 5, 3, 2, 0], [9, 8, 5, 3, 2, 1], [9, 8, 5, 3, 2, 1, 0], [9, 8, 5, 4], [9, 8, 5, 4, 0], [9, 8, 5, 4, 1], [9, 8, 5, 4, 1, 0], [9, 8, 5, 4, 2], [9, 8, 5, 4, 2, 0], [9, 8, 5, 4, 2, 1], [9, 8, 5, 4, 2, 1, 0], [9, 8, 5, 4, 3], [9, 8, 5, 4, 3, 0], [9, 8, 5, 4, 3, 1], [9, 8, 5, 4, 3, 1, 0], [9, 8, 5, 4, 3, 2], [9, 8, 5, 4, 3, 2, 0], [9, 8, 5, 4, 3, 2, 1], [9, 8, 5, 4, 3, 2, 1, 0], [9, 8, 6], [9, 8, 6, 0], [9, 8, 6, 1], [9, 8, 6, 1, 0], [9, 8, 6, 2], [9, 8, 6, 2, 0], [9, 8, 6, 2, 1], [9, 8, 6, 2, 1, 0], [9, 8, 6, 3], [9, 8, 6, 3, 0], [9, 8, 6, 3, 1], [9, 8, 6, 3, 1, 0], [9, 8, 6, 3, 2], [9, 8, 6, 3, 2, 0], [9, 8, 6, 3, 2, 1], [9, 8, 6, 3, 2, 1, 0], [9, 8, 6, 4], [9, 8, 6, 4, 0], [9, 8, 6, 4, 1], [9, 8, 6, 4, 1, 0], [9, 8, 6, 4, 2], [9, 8, 6, 4, 2, 0], [9, 8, 6, 4, 2, 1], [9, 8, 6, 4, 2, 1, 0], [9, 8, 6, 4, 3], [9, 8, 6, 4, 3, 0], [9, 8, 6, 4, 3, 1], [9, 8, 6, 4, 3, 1, 0], [9, 8, 6, 4, 3, 2], [9, 8, 6, 4, 3, 2, 0], [9, 8, 6, 4, 3, 2, 1], [9, 8, 6, 4, 3, 2, 1, 0], [9, 8, 6, 5], [9, 8, 6, 5, 0], [9, 8, 6, 5, 1], [9, 8, 6, 5, 1, 0], [9, 8, 6, 5, 2], [9, 8, 6, 5, 2, 0], [9, 8, 6, 5, 2, 1], [9, 8, 6, 5, 2, 1, 0], [9, 8, 6, 5, 3], [9, 8, 6, 5, 3, 0], [9, 8, 6, 5, 3, 1], [9, 8, 6, 5, 3, 1, 0], [9, 8, 6, 5, 3, 2], [9, 8, 6, 5, 3, 2, 0], [9, 8, 6, 5, 3, 2, 1], [9, 8, 6, 5, 3, 2, 1, 0], [9, 8, 6, 5, 4], [9, 8, 6, 5, 4, 0], [9, 8, 6, 5, 4, 1], [9, 8, 6, 5, 4, 1, 0], [9, 8, 6, 5, 4, 2], [9, 8, 6, 5, 4, 2, 0], [9, 8, 6, 5, 4, 2, 1], [9, 8, 6, 5, 4, 2, 1, 0], [9, 8, 6, 5, 4, 3], [9, 8, 6, 5, 4, 3, 0], [9, 8, 6, 5, 4, 3, 1], [9, 8, 6, 5, 4, 3, 1, 0], [9, 8, 6, 5, 4, 3, 2], [9, 8, 6, 5, 4, 3, 2, 0], [9, 8, 6, 5, 4, 3, 2, 1], [9, 8, 6, 5, 4, 3, 2, 1, 0], [9, 8, 7], [9, 8, 7, 0], [9, 8, 7, 1], [9, 8, 7, 1, 0], [9, 8, 7, 2], [9, 8, 7, 2, 0], [9, 8, 7, 2, 1], [9, 8, 7, 2, 1, 0], [9, 8, 7, 3], [9, 8, 7, 3, 0], [9, 8, 7, 3, 1], [9, 8, 7, 3, 1, 0], [9, 8, 7, 3, 2], [9, 8, 7, 3, 2, 0], [9, 8, 7, 3, 2, 1], [9, 8, 7, 3, 2, 1, 0], [9, 8, 7, 4], [9, 8, 7, 4, 0], [9, 8, 7, 4, 1], [9, 8, 7, 4, 1, 0], [9, 8, 7, 4, 2], [9, 8, 7, 4, 2, 0], [9, 8, 7, 4, 2, 1], [9, 8, 7, 4, 2, 1, 0], [9, 8, 7, 4, 3], [9, 8, 7, 4, 3, 0], [9, 8, 7, 4, 3, 1], [9, 8, 7, 4, 3, 1, 0], [9, 8, 7, 4, 3, 2], [9, 8, 7, 4, 3, 2, 0], [9, 8, 7, 4, 3, 2, 1], [9, 8, 7, 4, 3, 2, 1, 0], [9, 8, 7, 5], [9, 8, 7, 5, 0], [9, 8, 7, 5, 1], [9, 8, 7, 5, 1, 0], [9, 8, 7, 5, 2], [9, 8, 7, 5, 2, 0], [9, 8, 7, 5, 2, 1], [9, 8, 7, 5, 2, 1, 0], [9, 8, 7, 5, 3], [9, 8, 7, 5, 3, 0], [9, 8, 7, 5, 3, 1], [9, 8, 7, 5, 3, 1, 0], [9, 8, 7, 5, 3, 2], [9, 8, 7, 5, 3, 2, 0], [9, 8, 7, 5, 3, 2, 1], [9, 8, 7, 5, 3, 2, 1, 0], [9, 8, 7, 5, 4], [9, 8, 7, 5, 4, 0], [9, 8, 7, 5, 4, 1], [9, 8, 7, 5, 4, 1, 0], [9, 8, 7, 5, 4, 2], [9, 8, 7, 5, 4, 2, 0], [9, 8, 7, 5, 4, 2, 1], [9, 8, 7, 5, 4, 2, 1, 0], [9, 8, 7, 5, 4, 3], [9, 8, 7, 5, 4, 3, 0], [9, 8, 7, 5, 4, 3, 1], [9, 8, 7, 5, 4, 3, 1, 0], [9, 8, 7, 5, 4, 3, 2], [9, 8, 7, 5, 4, 3, 2, 0], [9, 8, 7, 5, 4, 3, 2, 1], [9, 8, 7, 5, 4, 3, 2, 1, 0], [9, 8, 7, 6], [9, 8, 7, 6, 0], [9, 8, 7, 6, 1], [9, 8, 7, 6, 1, 0], [9, 8, 7, 6, 2], [9, 8, 7, 6, 2, 0], [9, 8, 7, 6, 2, 1], [9, 8, 7, 6, 2, 1, 0], [9, 8, 7, 6, 3], [9, 8, 7, 6, 3, 0], [9, 8, 7, 6, 3, 1], [9, 8, 7, 6, 3, 1, 0], [9, 8, 7, 6, 3, 2], [9, 8, 7, 6, 3, 2, 0], [9, 8, 7, 6, 3, 2, 1], [9, 8, 7, 6, 3, 2, 1, 0], [9, 8, 7, 6, 4], [9, 8, 7, 6, 4, 0], [9, 8, 7, 6, 4, 1], [9, 8, 7, 6, 4, 1, 0], [9, 8, 7, 6, 4, 2], [9, 8, 7, 6, 4, 2, 0], [9, 8, 7, 6, 4, 2, 1], [9, 8, 7, 6, 4, 2, 1, 0], [9, 8, 7, 6, 4, 3], [9, 8, 7, 6, 4, 3, 0], [9, 8, 7, 6, 4, 3, 1], [9, 8, 7, 6, 4, 3, 1, 0], [9, 8, 7, 6, 4, 3, 2], [9, 8, 7, 6, 4, 3, 2, 0], [9, 8, 7, 6, 4, 3, 2, 1], [9, 8, 7, 6, 4, 3, 2, 1, 0], [9, 8, 7, 6, 5], [9, 8, 7, 6, 5, 0], [9, 8, 7, 6, 5, 1], [9, 8, 7, 6, 5, 1, 0], [9, 8, 7, 6, 5, 2], [9, 8, 7, 6, 5, 2, 0], [9, 8, 7, 6, 5, 2, 1], [9, 8, 7, 6, 5, 2, 1, 0], [9, 8, 7, 6, 5, 3], [9, 8, 7, 6, 5, 3, 0], [9, 8, 7, 6, 5, 3, 1], [9, 8, 7, 6, 5, 3, 1, 0], [9, 8, 7, 6, 5, 3, 2], [9, 8, 7, 6, 5, 3, 2, 0], [9, 8, 7, 6, 5, 3, 2, 1], [9, 8, 7, 6, 5, 3, 2, 1, 0], [9, 8, 7, 6, 5, 4], [9, 8, 7, 6, 5, 4, 0], [9, 8, 7, 6, 5, 4, 1], [9, 8, 7, 6, 5, 4, 1, 0], [9, 8, 7, 6, 5, 4, 2], [9, 8, 7, 6, 5, 4, 2, 0], [9, 8, 7, 6, 5, 4, 2, 1], [9, 8, 7, 6, 5, 4, 2, 1, 0], [9, 8, 7, 6, 5, 4, 3], [9, 8, 7, 6, 5, 4, 3, 0], [9, 8, 7, 6, 5, 4, 3, 1], [9, 8, 7, 6, 5, 4, 3, 1, 0], [9, 8, 7, 6, 5, 4, 3, 2], [9, 8, 7, 6, 5, 4, 3, 2, 0], [9, 8, 7, 6, 5, 4, 3, 2, 1], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]])\n assert answers_match(candidate(nums=[5, 3, 8, 6, 2, 7, 4, 1]), [[], [1], [4], [4, 1], [7], [7, 1], [7, 4], [7, 4, 1], [2], [2, 1], [2, 4], [2, 4, 1], [2, 7], [2, 7, 1], [2, 7, 4], [2, 7, 4, 1], [6], [6, 1], [6, 4], [6, 4, 1], [6, 7], [6, 7, 1], [6, 7, 4], [6, 7, 4, 1], [6, 2], [6, 2, 1], [6, 2, 4], [6, 2, 4, 1], [6, 2, 7], [6, 2, 7, 1], [6, 2, 7, 4], [6, 2, 7, 4, 1], [8], [8, 1], [8, 4], [8, 4, 1], [8, 7], [8, 7, 1], [8, 7, 4], [8, 7, 4, 1], [8, 2], [8, 2, 1], [8, 2, 4], [8, 2, 4, 1], [8, 2, 7], [8, 2, 7, 1], [8, 2, 7, 4], [8, 2, 7, 4, 1], [8, 6], [8, 6, 1], [8, 6, 4], [8, 6, 4, 1], [8, 6, 7], [8, 6, 7, 1], [8, 6, 7, 4], [8, 6, 7, 4, 1], [8, 6, 2], [8, 6, 2, 1], [8, 6, 2, 4], [8, 6, 2, 4, 1], [8, 6, 2, 7], [8, 6, 2, 7, 1], [8, 6, 2, 7, 4], [8, 6, 2, 7, 4, 1], [3], [3, 1], [3, 4], [3, 4, 1], [3, 7], [3, 7, 1], [3, 7, 4], [3, 7, 4, 1], [3, 2], [3, 2, 1], [3, 2, 4], [3, 2, 4, 1], [3, 2, 7], [3, 2, 7, 1], [3, 2, 7, 4], [3, 2, 7, 4, 1], [3, 6], [3, 6, 1], [3, 6, 4], [3, 6, 4, 1], [3, 6, 7], [3, 6, 7, 1], [3, 6, 7, 4], [3, 6, 7, 4, 1], [3, 6, 2], [3, 6, 2, 1], [3, 6, 2, 4], [3, 6, 2, 4, 1], [3, 6, 2, 7], [3, 6, 2, 7, 1], [3, 6, 2, 7, 4], [3, 6, 2, 7, 4, 1], [3, 8], [3, 8, 1], [3, 8, 4], [3, 8, 4, 1], [3, 8, 7], [3, 8, 7, 1], [3, 8, 7, 4], [3, 8, 7, 4, 1], [3, 8, 2], [3, 8, 2, 1], [3, 8, 2, 4], [3, 8, 2, 4, 1], [3, 8, 2, 7], [3, 8, 2, 7, 1], [3, 8, 2, 7, 4], [3, 8, 2, 7, 4, 1], [3, 8, 6], [3, 8, 6, 1], [3, 8, 6, 4], [3, 8, 6, 4, 1], [3, 8, 6, 7], [3, 8, 6, 7, 1], [3, 8, 6, 7, 4], [3, 8, 6, 7, 4, 1], [3, 8, 6, 2], [3, 8, 6, 2, 1], [3, 8, 6, 2, 4], [3, 8, 6, 2, 4, 1], [3, 8, 6, 2, 7], [3, 8, 6, 2, 7, 1], [3, 8, 6, 2, 7, 4], [3, 8, 6, 2, 7, 4, 1], [5], [5, 1], [5, 4], [5, 4, 1], [5, 7], [5, 7, 1], [5, 7, 4], [5, 7, 4, 1], [5, 2], [5, 2, 1], [5, 2, 4], [5, 2, 4, 1], [5, 2, 7], [5, 2, 7, 1], [5, 2, 7, 4], [5, 2, 7, 4, 1], [5, 6], [5, 6, 1], [5, 6, 4], [5, 6, 4, 1], [5, 6, 7], [5, 6, 7, 1], [5, 6, 7, 4], [5, 6, 7, 4, 1], [5, 6, 2], [5, 6, 2, 1], [5, 6, 2, 4], [5, 6, 2, 4, 1], [5, 6, 2, 7], [5, 6, 2, 7, 1], [5, 6, 2, 7, 4], [5, 6, 2, 7, 4, 1], [5, 8], [5, 8, 1], [5, 8, 4], [5, 8, 4, 1], [5, 8, 7], [5, 8, 7, 1], [5, 8, 7, 4], [5, 8, 7, 4, 1], [5, 8, 2], [5, 8, 2, 1], [5, 8, 2, 4], [5, 8, 2, 4, 1], [5, 8, 2, 7], [5, 8, 2, 7, 1], [5, 8, 2, 7, 4], [5, 8, 2, 7, 4, 1], [5, 8, 6], [5, 8, 6, 1], [5, 8, 6, 4], [5, 8, 6, 4, 1], [5, 8, 6, 7], [5, 8, 6, 7, 1], [5, 8, 6, 7, 4], [5, 8, 6, 7, 4, 1], [5, 8, 6, 2], [5, 8, 6, 2, 1], [5, 8, 6, 2, 4], [5, 8, 6, 2, 4, 1], [5, 8, 6, 2, 7], [5, 8, 6, 2, 7, 1], [5, 8, 6, 2, 7, 4], [5, 8, 6, 2, 7, 4, 1], [5, 3], [5, 3, 1], [5, 3, 4], [5, 3, 4, 1], [5, 3, 7], [5, 3, 7, 1], [5, 3, 7, 4], [5, 3, 7, 4, 1], [5, 3, 2], [5, 3, 2, 1], [5, 3, 2, 4], [5, 3, 2, 4, 1], [5, 3, 2, 7], [5, 3, 2, 7, 1], [5, 3, 2, 7, 4], [5, 3, 2, 7, 4, 1], [5, 3, 6], [5, 3, 6, 1], [5, 3, 6, 4], [5, 3, 6, 4, 1], [5, 3, 6, 7], [5, 3, 6, 7, 1], [5, 3, 6, 7, 4], [5, 3, 6, 7, 4, 1], [5, 3, 6, 2], [5, 3, 6, 2, 1], [5, 3, 6, 2, 4], [5, 3, 6, 2, 4, 1], [5, 3, 6, 2, 7], [5, 3, 6, 2, 7, 1], [5, 3, 6, 2, 7, 4], [5, 3, 6, 2, 7, 4, 1], [5, 3, 8], [5, 3, 8, 1], [5, 3, 8, 4], [5, 3, 8, 4, 1], [5, 3, 8, 7], [5, 3, 8, 7, 1], [5, 3, 8, 7, 4], [5, 3, 8, 7, 4, 1], [5, 3, 8, 2], [5, 3, 8, 2, 1], [5, 3, 8, 2, 4], [5, 3, 8, 2, 4, 1], [5, 3, 8, 2, 7], [5, 3, 8, 2, 7, 1], [5, 3, 8, 2, 7, 4], [5, 3, 8, 2, 7, 4, 1], [5, 3, 8, 6], [5, 3, 8, 6, 1], [5, 3, 8, 6, 4], [5, 3, 8, 6, 4, 1], [5, 3, 8, 6, 7], [5, 3, 8, 6, 7, 1], [5, 3, 8, 6, 7, 4], [5, 3, 8, 6, 7, 4, 1], [5, 3, 8, 6, 2], [5, 3, 8, 6, 2, 1], [5, 3, 8, 6, 2, 4], [5, 3, 8, 6, 2, 4, 1], [5, 3, 8, 6, 2, 7], [5, 3, 8, 6, 2, 7, 1], [5, 3, 8, 6, 2, 7, 4], [5, 3, 8, 6, 2, 7, 4, 1]])\n assert answers_match(candidate(nums=[1, -1, 2, -2, 3, -3, 4, -4]), [[], [-4], [4], [4, -4], [-3], [-3, -4], [-3, 4], [-3, 4, -4], [3], [3, -4], [3, 4], [3, 4, -4], [3, -3], [3, -3, -4], [3, -3, 4], [3, -3, 4, -4], [-2], [-2, -4], [-2, 4], [-2, 4, -4], [-2, -3], [-2, -3, -4], [-2, -3, 4], [-2, -3, 4, -4], [-2, 3], [-2, 3, -4], [-2, 3, 4], [-2, 3, 4, -4], [-2, 3, -3], [-2, 3, -3, -4], [-2, 3, -3, 4], [-2, 3, -3, 4, -4], [2], [2, -4], [2, 4], [2, 4, -4], [2, -3], [2, -3, -4], [2, -3, 4], [2, -3, 4, -4], [2, 3], [2, 3, -4], [2, 3, 4], [2, 3, 4, -4], [2, 3, -3], [2, 3, -3, -4], [2, 3, -3, 4], [2, 3, -3, 4, -4], [2, -2], [2, -2, -4], [2, -2, 4], [2, -2, 4, -4], [2, -2, -3], [2, -2, -3, -4], [2, -2, -3, 4], [2, -2, -3, 4, -4], [2, -2, 3], [2, -2, 3, -4], [2, -2, 3, 4], [2, -2, 3, 4, -4], [2, -2, 3, -3], [2, -2, 3, -3, -4], [2, -2, 3, -3, 4], [2, -2, 3, -3, 4, -4], [-1], [-1, -4], [-1, 4], [-1, 4, -4], [-1, -3], [-1, -3, -4], [-1, -3, 4], [-1, -3, 4, -4], [-1, 3], [-1, 3, -4], [-1, 3, 4], [-1, 3, 4, -4], [-1, 3, -3], [-1, 3, -3, -4], [-1, 3, -3, 4], [-1, 3, -3, 4, -4], [-1, -2], [-1, -2, -4], [-1, -2, 4], [-1, -2, 4, -4], [-1, -2, -3], [-1, -2, -3, -4], [-1, -2, -3, 4], [-1, -2, -3, 4, -4], [-1, -2, 3], [-1, -2, 3, -4], [-1, -2, 3, 4], [-1, -2, 3, 4, -4], [-1, -2, 3, -3], [-1, -2, 3, -3, -4], [-1, -2, 3, -3, 4], [-1, -2, 3, -3, 4, -4], [-1, 2], [-1, 2, -4], [-1, 2, 4], [-1, 2, 4, -4], [-1, 2, -3], [-1, 2, -3, -4], [-1, 2, -3, 4], [-1, 2, -3, 4, -4], [-1, 2, 3], [-1, 2, 3, -4], [-1, 2, 3, 4], [-1, 2, 3, 4, -4], [-1, 2, 3, -3], [-1, 2, 3, -3, -4], [-1, 2, 3, -3, 4], [-1, 2, 3, -3, 4, -4], [-1, 2, -2], [-1, 2, -2, -4], [-1, 2, -2, 4], [-1, 2, -2, 4, -4], [-1, 2, -2, -3], [-1, 2, -2, -3, -4], [-1, 2, -2, -3, 4], [-1, 2, -2, -3, 4, -4], [-1, 2, -2, 3], [-1, 2, -2, 3, -4], [-1, 2, -2, 3, 4], [-1, 2, -2, 3, 4, -4], [-1, 2, -2, 3, -3], [-1, 2, -2, 3, -3, -4], [-1, 2, -2, 3, -3, 4], [-1, 2, -2, 3, -3, 4, -4], [1], [1, -4], [1, 4], [1, 4, -4], [1, -3], [1, -3, -4], [1, -3, 4], [1, -3, 4, -4], [1, 3], [1, 3, -4], [1, 3, 4], [1, 3, 4, -4], [1, 3, -3], [1, 3, -3, -4], [1, 3, -3, 4], [1, 3, -3, 4, -4], [1, -2], [1, -2, -4], [1, -2, 4], [1, -2, 4, -4], [1, -2, -3], [1, -2, -3, -4], [1, -2, -3, 4], [1, -2, -3, 4, -4], [1, -2, 3], [1, -2, 3, -4], [1, -2, 3, 4], [1, -2, 3, 4, -4], [1, -2, 3, -3], [1, -2, 3, -3, -4], [1, -2, 3, -3, 4], [1, -2, 3, -3, 4, -4], [1, 2], [1, 2, -4], [1, 2, 4], [1, 2, 4, -4], [1, 2, -3], [1, 2, -3, -4], [1, 2, -3, 4], [1, 2, -3, 4, -4], [1, 2, 3], [1, 2, 3, -4], [1, 2, 3, 4], [1, 2, 3, 4, -4], [1, 2, 3, -3], [1, 2, 3, -3, -4], [1, 2, 3, -3, 4], [1, 2, 3, -3, 4, -4], [1, 2, -2], [1, 2, -2, -4], [1, 2, -2, 4], [1, 2, -2, 4, -4], [1, 2, -2, -3], [1, 2, -2, -3, -4], [1, 2, -2, -3, 4], [1, 2, -2, -3, 4, -4], [1, 2, -2, 3], [1, 2, -2, 3, -4], [1, 2, -2, 3, 4], [1, 2, -2, 3, 4, -4], [1, 2, -2, 3, -3], [1, 2, -2, 3, -3, -4], [1, 2, -2, 3, -3, 4], [1, 2, -2, 3, -3, 4, -4], [1, -1], [1, -1, -4], [1, -1, 4], [1, -1, 4, -4], [1, -1, -3], [1, -1, -3, -4], [1, -1, -3, 4], [1, -1, -3, 4, -4], [1, -1, 3], [1, -1, 3, -4], [1, -1, 3, 4], [1, -1, 3, 4, -4], [1, -1, 3, -3], [1, -1, 3, -3, -4], [1, -1, 3, -3, 4], [1, -1, 3, -3, 4, -4], [1, -1, -2], [1, -1, -2, -4], [1, -1, -2, 4], [1, -1, -2, 4, -4], [1, -1, -2, -3], [1, -1, -2, -3, -4], [1, -1, -2, -3, 4], [1, -1, -2, -3, 4, -4], [1, -1, -2, 3], [1, -1, -2, 3, -4], [1, -1, -2, 3, 4], [1, -1, -2, 3, 4, -4], [1, -1, -2, 3, -3], [1, -1, -2, 3, -3, -4], [1, -1, -2, 3, -3, 4], [1, -1, -2, 3, -3, 4, -4], [1, -1, 2], [1, -1, 2, -4], [1, -1, 2, 4], [1, -1, 2, 4, -4], [1, -1, 2, -3], [1, -1, 2, -3, -4], [1, -1, 2, -3, 4], [1, -1, 2, -3, 4, -4], [1, -1, 2, 3], [1, -1, 2, 3, -4], [1, -1, 2, 3, 4], [1, -1, 2, 3, 4, -4], [1, -1, 2, 3, -3], [1, -1, 2, 3, -3, -4], [1, -1, 2, 3, -3, 4], [1, -1, 2, 3, -3, 4, -4], [1, -1, 2, -2], [1, -1, 2, -2, -4], [1, -1, 2, -2, 4], [1, -1, 2, -2, 4, -4], [1, -1, 2, -2, -3], [1, -1, 2, -2, -3, -4], [1, -1, 2, -2, -3, 4], [1, -1, 2, -2, -3, 4, -4], [1, -1, 2, -2, 3], [1, -1, 2, -2, 3, -4], [1, -1, 2, -2, 3, 4], [1, -1, 2, -2, 3, 4, -4], [1, -1, 2, -2, 3, -3], [1, -1, 2, -2, 3, -3, -4], [1, -1, 2, -2, 3, -3, 4], [1, -1, 2, -2, 3, -3, 4, -4]])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), [[], [9], [8], [8, 9], [7], [7, 9], [7, 8], [7, 8, 9], [6], [6, 9], [6, 8], [6, 8, 9], [6, 7], [6, 7, 9], [6, 7, 8], [6, 7, 8, 9], [5], [5, 9], [5, 8], [5, 8, 9], [5, 7], [5, 7, 9], [5, 7, 8], [5, 7, 8, 9], [5, 6], [5, 6, 9], [5, 6, 8], [5, 6, 8, 9], [5, 6, 7], [5, 6, 7, 9], [5, 6, 7, 8], [5, 6, 7, 8, 9], [4], [4, 9], [4, 8], [4, 8, 9], [4, 7], [4, 7, 9], [4, 7, 8], [4, 7, 8, 9], [4, 6], [4, 6, 9], [4, 6, 8], [4, 6, 8, 9], [4, 6, 7], [4, 6, 7, 9], [4, 6, 7, 8], [4, 6, 7, 8, 9], [4, 5], [4, 5, 9], [4, 5, 8], [4, 5, 8, 9], [4, 5, 7], [4, 5, 7, 9], [4, 5, 7, 8], [4, 5, 7, 8, 9], [4, 5, 6], [4, 5, 6, 9], [4, 5, 6, 8], [4, 5, 6, 8, 9], [4, 5, 6, 7], [4, 5, 6, 7, 9], [4, 5, 6, 7, 8], [4, 5, 6, 7, 8, 9], [3], [3, 9], [3, 8], [3, 8, 9], [3, 7], [3, 7, 9], [3, 7, 8], [3, 7, 8, 9], [3, 6], [3, 6, 9], [3, 6, 8], [3, 6, 8, 9], [3, 6, 7], [3, 6, 7, 9], [3, 6, 7, 8], [3, 6, 7, 8, 9], [3, 5], [3, 5, 9], [3, 5, 8], [3, 5, 8, 9], [3, 5, 7], [3, 5, 7, 9], [3, 5, 7, 8], [3, 5, 7, 8, 9], [3, 5, 6], [3, 5, 6, 9], [3, 5, 6, 8], [3, 5, 6, 8, 9], [3, 5, 6, 7], [3, 5, 6, 7, 9], [3, 5, 6, 7, 8], [3, 5, 6, 7, 8, 9], [3, 4], [3, 4, 9], [3, 4, 8], [3, 4, 8, 9], [3, 4, 7], [3, 4, 7, 9], [3, 4, 7, 8], [3, 4, 7, 8, 9], [3, 4, 6], [3, 4, 6, 9], [3, 4, 6, 8], [3, 4, 6, 8, 9], [3, 4, 6, 7], [3, 4, 6, 7, 9], [3, 4, 6, 7, 8], [3, 4, 6, 7, 8, 9], [3, 4, 5], [3, 4, 5, 9], [3, 4, 5, 8], [3, 4, 5, 8, 9], [3, 4, 5, 7], [3, 4, 5, 7, 9], [3, 4, 5, 7, 8], [3, 4, 5, 7, 8, 9], [3, 4, 5, 6], [3, 4, 5, 6, 9], [3, 4, 5, 6, 8], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 8, 9], [2], [2, 9], [2, 8], [2, 8, 9], [2, 7], [2, 7, 9], [2, 7, 8], [2, 7, 8, 9], [2, 6], [2, 6, 9], [2, 6, 8], [2, 6, 8, 9], [2, 6, 7], [2, 6, 7, 9], [2, 6, 7, 8], [2, 6, 7, 8, 9], [2, 5], [2, 5, 9], [2, 5, 8], [2, 5, 8, 9], [2, 5, 7], [2, 5, 7, 9], [2, 5, 7, 8], [2, 5, 7, 8, 9], [2, 5, 6], [2, 5, 6, 9], [2, 5, 6, 8], [2, 5, 6, 8, 9], [2, 5, 6, 7], [2, 5, 6, 7, 9], [2, 5, 6, 7, 8], [2, 5, 6, 7, 8, 9], [2, 4], [2, 4, 9], [2, 4, 8], [2, 4, 8, 9], [2, 4, 7], [2, 4, 7, 9], [2, 4, 7, 8], [2, 4, 7, 8, 9], [2, 4, 6], [2, 4, 6, 9], [2, 4, 6, 8], [2, 4, 6, 8, 9], [2, 4, 6, 7], [2, 4, 6, 7, 9], [2, 4, 6, 7, 8], [2, 4, 6, 7, 8, 9], [2, 4, 5], [2, 4, 5, 9], [2, 4, 5, 8], [2, 4, 5, 8, 9], [2, 4, 5, 7], [2, 4, 5, 7, 9], [2, 4, 5, 7, 8], [2, 4, 5, 7, 8, 9], [2, 4, 5, 6], [2, 4, 5, 6, 9], [2, 4, 5, 6, 8], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 7], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 8, 9], [2, 3], [2, 3, 9], [2, 3, 8], [2, 3, 8, 9], [2, 3, 7], [2, 3, 7, 9], [2, 3, 7, 8], [2, 3, 7, 8, 9], [2, 3, 6], [2, 3, 6, 9], [2, 3, 6, 8], [2, 3, 6, 8, 9], [2, 3, 6, 7], [2, 3, 6, 7, 9], [2, 3, 6, 7, 8], [2, 3, 6, 7, 8, 9], [2, 3, 5], [2, 3, 5, 9], [2, 3, 5, 8], [2, 3, 5, 8, 9], [2, 3, 5, 7], [2, 3, 5, 7, 9], [2, 3, 5, 7, 8], [2, 3, 5, 7, 8, 9], [2, 3, 5, 6], [2, 3, 5, 6, 9], [2, 3, 5, 6, 8], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 7], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 8, 9], [2, 3, 4], [2, 3, 4, 9], [2, 3, 4, 8], [2, 3, 4, 8, 9], [2, 3, 4, 7], [2, 3, 4, 7, 9], [2, 3, 4, 7, 8], [2, 3, 4, 7, 8, 9], [2, 3, 4, 6], [2, 3, 4, 6, 9], [2, 3, 4, 6, 8], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 7], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 5], [2, 3, 4, 5, 9], [2, 3, 4, 5, 8], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 7], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 8, 9], [1], [1, 9], [1, 8], [1, 8, 9], [1, 7], [1, 7, 9], [1, 7, 8], [1, 7, 8, 9], [1, 6], [1, 6, 9], [1, 6, 8], [1, 6, 8, 9], [1, 6, 7], [1, 6, 7, 9], [1, 6, 7, 8], [1, 6, 7, 8, 9], [1, 5], [1, 5, 9], [1, 5, 8], [1, 5, 8, 9], [1, 5, 7], [1, 5, 7, 9], [1, 5, 7, 8], [1, 5, 7, 8, 9], [1, 5, 6], [1, 5, 6, 9], [1, 5, 6, 8], [1, 5, 6, 8, 9], [1, 5, 6, 7], [1, 5, 6, 7, 9], [1, 5, 6, 7, 8], [1, 5, 6, 7, 8, 9], [1, 4], [1, 4, 9], [1, 4, 8], [1, 4, 8, 9], [1, 4, 7], [1, 4, 7, 9], [1, 4, 7, 8], [1, 4, 7, 8, 9], [1, 4, 6], [1, 4, 6, 9], [1, 4, 6, 8], [1, 4, 6, 8, 9], [1, 4, 6, 7], [1, 4, 6, 7, 9], [1, 4, 6, 7, 8], [1, 4, 6, 7, 8, 9], [1, 4, 5], [1, 4, 5, 9], [1, 4, 5, 8], [1, 4, 5, 8, 9], [1, 4, 5, 7], [1, 4, 5, 7, 9], [1, 4, 5, 7, 8], [1, 4, 5, 7, 8, 9], [1, 4, 5, 6], [1, 4, 5, 6, 9], [1, 4, 5, 6, 8], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 7], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 8, 9], [1, 3], [1, 3, 9], [1, 3, 8], [1, 3, 8, 9], [1, 3, 7], [1, 3, 7, 9], [1, 3, 7, 8], [1, 3, 7, 8, 9], [1, 3, 6], [1, 3, 6, 9], [1, 3, 6, 8], [1, 3, 6, 8, 9], [1, 3, 6, 7], [1, 3, 6, 7, 9], [1, 3, 6, 7, 8], [1, 3, 6, 7, 8, 9], [1, 3, 5], [1, 3, 5, 9], [1, 3, 5, 8], [1, 3, 5, 8, 9], [1, 3, 5, 7], [1, 3, 5, 7, 9], [1, 3, 5, 7, 8], [1, 3, 5, 7, 8, 9], [1, 3, 5, 6], [1, 3, 5, 6, 9], [1, 3, 5, 6, 8], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 7], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 8, 9], [1, 3, 4], [1, 3, 4, 9], [1, 3, 4, 8], [1, 3, 4, 8, 9], [1, 3, 4, 7], [1, 3, 4, 7, 9], [1, 3, 4, 7, 8], [1, 3, 4, 7, 8, 9], [1, 3, 4, 6], [1, 3, 4, 6, 9], [1, 3, 4, 6, 8], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 7], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 5], [1, 3, 4, 5, 9], [1, 3, 4, 5, 8], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 7], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 6], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 8, 9], [1, 2], [1, 2, 9], [1, 2, 8], [1, 2, 8, 9], [1, 2, 7], [1, 2, 7, 9], [1, 2, 7, 8], [1, 2, 7, 8, 9], [1, 2, 6], [1, 2, 6, 9], [1, 2, 6, 8], [1, 2, 6, 8, 9], [1, 2, 6, 7], [1, 2, 6, 7, 9], [1, 2, 6, 7, 8], [1, 2, 6, 7, 8, 9], [1, 2, 5], [1, 2, 5, 9], [1, 2, 5, 8], [1, 2, 5, 8, 9], [1, 2, 5, 7], [1, 2, 5, 7, 9], [1, 2, 5, 7, 8], [1, 2, 5, 7, 8, 9], [1, 2, 5, 6], [1, 2, 5, 6, 9], [1, 2, 5, 6, 8], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 7], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 8, 9], [1, 2, 4], [1, 2, 4, 9], [1, 2, 4, 8], [1, 2, 4, 8, 9], [1, 2, 4, 7], [1, 2, 4, 7, 9], [1, 2, 4, 7, 8], [1, 2, 4, 7, 8, 9], [1, 2, 4, 6], [1, 2, 4, 6, 9], [1, 2, 4, 6, 8], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 7], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 5], [1, 2, 4, 5, 9], [1, 2, 4, 5, 8], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 7], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 6], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 3], [1, 2, 3, 9], [1, 2, 3, 8], [1, 2, 3, 8, 9], [1, 2, 3, 7], [1, 2, 3, 7, 9], [1, 2, 3, 7, 8], [1, 2, 3, 7, 8, 9], [1, 2, 3, 6], [1, 2, 3, 6, 9], [1, 2, 3, 6, 8], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 7], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 5], [1, 2, 3, 5, 9], [1, 2, 3, 5, 8], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 7], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 6], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 4], [1, 2, 3, 4, 9], [1, 2, 3, 4, 8], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 7], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 6], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9], [0], [0, 9], [0, 8], [0, 8, 9], [0, 7], [0, 7, 9], [0, 7, 8], [0, 7, 8, 9], [0, 6], [0, 6, 9], [0, 6, 8], [0, 6, 8, 9], [0, 6, 7], [0, 6, 7, 9], [0, 6, 7, 8], [0, 6, 7, 8, 9], [0, 5], [0, 5, 9], [0, 5, 8], [0, 5, 8, 9], [0, 5, 7], [0, 5, 7, 9], [0, 5, 7, 8], [0, 5, 7, 8, 9], [0, 5, 6], [0, 5, 6, 9], [0, 5, 6, 8], [0, 5, 6, 8, 9], [0, 5, 6, 7], [0, 5, 6, 7, 9], [0, 5, 6, 7, 8], [0, 5, 6, 7, 8, 9], [0, 4], [0, 4, 9], [0, 4, 8], [0, 4, 8, 9], [0, 4, 7], [0, 4, 7, 9], [0, 4, 7, 8], [0, 4, 7, 8, 9], [0, 4, 6], [0, 4, 6, 9], [0, 4, 6, 8], [0, 4, 6, 8, 9], [0, 4, 6, 7], [0, 4, 6, 7, 9], [0, 4, 6, 7, 8], [0, 4, 6, 7, 8, 9], [0, 4, 5], [0, 4, 5, 9], [0, 4, 5, 8], [0, 4, 5, 8, 9], [0, 4, 5, 7], [0, 4, 5, 7, 9], [0, 4, 5, 7, 8], [0, 4, 5, 7, 8, 9], [0, 4, 5, 6], [0, 4, 5, 6, 9], [0, 4, 5, 6, 8], [0, 4, 5, 6, 8, 9], [0, 4, 5, 6, 7], [0, 4, 5, 6, 7, 9], [0, 4, 5, 6, 7, 8], [0, 4, 5, 6, 7, 8, 9], [0, 3], [0, 3, 9], [0, 3, 8], [0, 3, 8, 9], [0, 3, 7], [0, 3, 7, 9], [0, 3, 7, 8], [0, 3, 7, 8, 9], [0, 3, 6], [0, 3, 6, 9], [0, 3, 6, 8], [0, 3, 6, 8, 9], [0, 3, 6, 7], [0, 3, 6, 7, 9], [0, 3, 6, 7, 8], [0, 3, 6, 7, 8, 9], [0, 3, 5], [0, 3, 5, 9], [0, 3, 5, 8], [0, 3, 5, 8, 9], [0, 3, 5, 7], [0, 3, 5, 7, 9], [0, 3, 5, 7, 8], [0, 3, 5, 7, 8, 9], [0, 3, 5, 6], [0, 3, 5, 6, 9], [0, 3, 5, 6, 8], [0, 3, 5, 6, 8, 9], [0, 3, 5, 6, 7], [0, 3, 5, 6, 7, 9], [0, 3, 5, 6, 7, 8], [0, 3, 5, 6, 7, 8, 9], [0, 3, 4], [0, 3, 4, 9], [0, 3, 4, 8], [0, 3, 4, 8, 9], [0, 3, 4, 7], [0, 3, 4, 7, 9], [0, 3, 4, 7, 8], [0, 3, 4, 7, 8, 9], [0, 3, 4, 6], [0, 3, 4, 6, 9], [0, 3, 4, 6, 8], [0, 3, 4, 6, 8, 9], [0, 3, 4, 6, 7], [0, 3, 4, 6, 7, 9], [0, 3, 4, 6, 7, 8], [0, 3, 4, 6, 7, 8, 9], [0, 3, 4, 5], [0, 3, 4, 5, 9], [0, 3, 4, 5, 8], [0, 3, 4, 5, 8, 9], [0, 3, 4, 5, 7], [0, 3, 4, 5, 7, 9], [0, 3, 4, 5, 7, 8], [0, 3, 4, 5, 7, 8, 9], [0, 3, 4, 5, 6], [0, 3, 4, 5, 6, 9], [0, 3, 4, 5, 6, 8], [0, 3, 4, 5, 6, 8, 9], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6, 7, 9], [0, 3, 4, 5, 6, 7, 8], [0, 3, 4, 5, 6, 7, 8, 9], [0, 2], [0, 2, 9], [0, 2, 8], [0, 2, 8, 9], [0, 2, 7], [0, 2, 7, 9], [0, 2, 7, 8], [0, 2, 7, 8, 9], [0, 2, 6], [0, 2, 6, 9], [0, 2, 6, 8], [0, 2, 6, 8, 9], [0, 2, 6, 7], [0, 2, 6, 7, 9], [0, 2, 6, 7, 8], [0, 2, 6, 7, 8, 9], [0, 2, 5], [0, 2, 5, 9], [0, 2, 5, 8], [0, 2, 5, 8, 9], [0, 2, 5, 7], [0, 2, 5, 7, 9], [0, 2, 5, 7, 8], [0, 2, 5, 7, 8, 9], [0, 2, 5, 6], [0, 2, 5, 6, 9], [0, 2, 5, 6, 8], [0, 2, 5, 6, 8, 9], [0, 2, 5, 6, 7], [0, 2, 5, 6, 7, 9], [0, 2, 5, 6, 7, 8], [0, 2, 5, 6, 7, 8, 9], [0, 2, 4], [0, 2, 4, 9], [0, 2, 4, 8], [0, 2, 4, 8, 9], [0, 2, 4, 7], [0, 2, 4, 7, 9], [0, 2, 4, 7, 8], [0, 2, 4, 7, 8, 9], [0, 2, 4, 6], [0, 2, 4, 6, 9], [0, 2, 4, 6, 8], [0, 2, 4, 6, 8, 9], [0, 2, 4, 6, 7], [0, 2, 4, 6, 7, 9], [0, 2, 4, 6, 7, 8], [0, 2, 4, 6, 7, 8, 9], [0, 2, 4, 5], [0, 2, 4, 5, 9], [0, 2, 4, 5, 8], [0, 2, 4, 5, 8, 9], [0, 2, 4, 5, 7], [0, 2, 4, 5, 7, 9], [0, 2, 4, 5, 7, 8], [0, 2, 4, 5, 7, 8, 9], [0, 2, 4, 5, 6], [0, 2, 4, 5, 6, 9], [0, 2, 4, 5, 6, 8], [0, 2, 4, 5, 6, 8, 9], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6, 7, 9], [0, 2, 4, 5, 6, 7, 8], [0, 2, 4, 5, 6, 7, 8, 9], [0, 2, 3], [0, 2, 3, 9], [0, 2, 3, 8], [0, 2, 3, 8, 9], [0, 2, 3, 7], [0, 2, 3, 7, 9], [0, 2, 3, 7, 8], [0, 2, 3, 7, 8, 9], [0, 2, 3, 6], [0, 2, 3, 6, 9], [0, 2, 3, 6, 8], [0, 2, 3, 6, 8, 9], [0, 2, 3, 6, 7], [0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7, 8], [0, 2, 3, 6, 7, 8, 9], [0, 2, 3, 5], [0, 2, 3, 5, 9], [0, 2, 3, 5, 8], [0, 2, 3, 5, 8, 9], [0, 2, 3, 5, 7], [0, 2, 3, 5, 7, 9], [0, 2, 3, 5, 7, 8], [0, 2, 3, 5, 7, 8, 9], [0, 2, 3, 5, 6], [0, 2, 3, 5, 6, 9], [0, 2, 3, 5, 6, 8], [0, 2, 3, 5, 6, 8, 9], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6, 7, 9], [0, 2, 3, 5, 6, 7, 8], [0, 2, 3, 5, 6, 7, 8, 9], [0, 2, 3, 4], [0, 2, 3, 4, 9], [0, 2, 3, 4, 8], [0, 2, 3, 4, 8, 9], [0, 2, 3, 4, 7], [0, 2, 3, 4, 7, 9], [0, 2, 3, 4, 7, 8], [0, 2, 3, 4, 7, 8, 9], [0, 2, 3, 4, 6], [0, 2, 3, 4, 6, 9], [0, 2, 3, 4, 6, 8], [0, 2, 3, 4, 6, 8, 9], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6, 7, 9], [0, 2, 3, 4, 6, 7, 8], [0, 2, 3, 4, 6, 7, 8, 9], [0, 2, 3, 4, 5], [0, 2, 3, 4, 5, 9], [0, 2, 3, 4, 5, 8], [0, 2, 3, 4, 5, 8, 9], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5, 7, 9], [0, 2, 3, 4, 5, 7, 8], [0, 2, 3, 4, 5, 7, 8, 9], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 6, 9], [0, 2, 3, 4, 5, 6, 8], [0, 2, 3, 4, 5, 6, 8, 9], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6, 7, 9], [0, 2, 3, 4, 5, 6, 7, 8], [0, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1], [0, 1, 9], [0, 1, 8], [0, 1, 8, 9], [0, 1, 7], [0, 1, 7, 9], [0, 1, 7, 8], [0, 1, 7, 8, 9], [0, 1, 6], [0, 1, 6, 9], [0, 1, 6, 8], [0, 1, 6, 8, 9], [0, 1, 6, 7], [0, 1, 6, 7, 9], [0, 1, 6, 7, 8], [0, 1, 6, 7, 8, 9], [0, 1, 5], [0, 1, 5, 9], [0, 1, 5, 8], [0, 1, 5, 8, 9], [0, 1, 5, 7], [0, 1, 5, 7, 9], [0, 1, 5, 7, 8], [0, 1, 5, 7, 8, 9], [0, 1, 5, 6], [0, 1, 5, 6, 9], [0, 1, 5, 6, 8], [0, 1, 5, 6, 8, 9], [0, 1, 5, 6, 7], [0, 1, 5, 6, 7, 9], [0, 1, 5, 6, 7, 8], [0, 1, 5, 6, 7, 8, 9], [0, 1, 4], [0, 1, 4, 9], [0, 1, 4, 8], [0, 1, 4, 8, 9], [0, 1, 4, 7], [0, 1, 4, 7, 9], [0, 1, 4, 7, 8], [0, 1, 4, 7, 8, 9], [0, 1, 4, 6], [0, 1, 4, 6, 9], [0, 1, 4, 6, 8], [0, 1, 4, 6, 8, 9], [0, 1, 4, 6, 7], [0, 1, 4, 6, 7, 9], [0, 1, 4, 6, 7, 8], [0, 1, 4, 6, 7, 8, 9], [0, 1, 4, 5], [0, 1, 4, 5, 9], [0, 1, 4, 5, 8], [0, 1, 4, 5, 8, 9], [0, 1, 4, 5, 7], [0, 1, 4, 5, 7, 9], [0, 1, 4, 5, 7, 8], [0, 1, 4, 5, 7, 8, 9], [0, 1, 4, 5, 6], [0, 1, 4, 5, 6, 9], [0, 1, 4, 5, 6, 8], [0, 1, 4, 5, 6, 8, 9], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6, 7, 9], [0, 1, 4, 5, 6, 7, 8], [0, 1, 4, 5, 6, 7, 8, 9], [0, 1, 3], [0, 1, 3, 9], [0, 1, 3, 8], [0, 1, 3, 8, 9], [0, 1, 3, 7], [0, 1, 3, 7, 9], [0, 1, 3, 7, 8], [0, 1, 3, 7, 8, 9], [0, 1, 3, 6], [0, 1, 3, 6, 9], [0, 1, 3, 6, 8], [0, 1, 3, 6, 8, 9], [0, 1, 3, 6, 7], [0, 1, 3, 6, 7, 9], [0, 1, 3, 6, 7, 8], [0, 1, 3, 6, 7, 8, 9], [0, 1, 3, 5], [0, 1, 3, 5, 9], [0, 1, 3, 5, 8], [0, 1, 3, 5, 8, 9], [0, 1, 3, 5, 7], [0, 1, 3, 5, 7, 9], [0, 1, 3, 5, 7, 8], [0, 1, 3, 5, 7, 8, 9], [0, 1, 3, 5, 6], [0, 1, 3, 5, 6, 9], [0, 1, 3, 5, 6, 8], [0, 1, 3, 5, 6, 8, 9], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6, 7, 9], [0, 1, 3, 5, 6, 7, 8], [0, 1, 3, 5, 6, 7, 8, 9], [0, 1, 3, 4], [0, 1, 3, 4, 9], [0, 1, 3, 4, 8], [0, 1, 3, 4, 8, 9], [0, 1, 3, 4, 7], [0, 1, 3, 4, 7, 9], [0, 1, 3, 4, 7, 8], [0, 1, 3, 4, 7, 8, 9], [0, 1, 3, 4, 6], [0, 1, 3, 4, 6, 9], [0, 1, 3, 4, 6, 8], [0, 1, 3, 4, 6, 8, 9], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6, 7, 9], [0, 1, 3, 4, 6, 7, 8], [0, 1, 3, 4, 6, 7, 8, 9], [0, 1, 3, 4, 5], [0, 1, 3, 4, 5, 9], [0, 1, 3, 4, 5, 8], [0, 1, 3, 4, 5, 8, 9], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5, 7, 9], [0, 1, 3, 4, 5, 7, 8], [0, 1, 3, 4, 5, 7, 8, 9], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5, 6, 9], [0, 1, 3, 4, 5, 6, 8], [0, 1, 3, 4, 5, 6, 8, 9], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6, 7, 9], [0, 1, 3, 4, 5, 6, 7, 8], [0, 1, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2], [0, 1, 2, 9], [0, 1, 2, 8], [0, 1, 2, 8, 9], [0, 1, 2, 7], [0, 1, 2, 7, 9], [0, 1, 2, 7, 8], [0, 1, 2, 7, 8, 9], [0, 1, 2, 6], [0, 1, 2, 6, 9], [0, 1, 2, 6, 8], [0, 1, 2, 6, 8, 9], [0, 1, 2, 6, 7], [0, 1, 2, 6, 7, 9], [0, 1, 2, 6, 7, 8], [0, 1, 2, 6, 7, 8, 9], [0, 1, 2, 5], [0, 1, 2, 5, 9], [0, 1, 2, 5, 8], [0, 1, 2, 5, 8, 9], [0, 1, 2, 5, 7], [0, 1, 2, 5, 7, 9], [0, 1, 2, 5, 7, 8], [0, 1, 2, 5, 7, 8, 9], [0, 1, 2, 5, 6], [0, 1, 2, 5, 6, 9], [0, 1, 2, 5, 6, 8], [0, 1, 2, 5, 6, 8, 9], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7, 8], [0, 1, 2, 5, 6, 7, 8, 9], [0, 1, 2, 4], [0, 1, 2, 4, 9], [0, 1, 2, 4, 8], [0, 1, 2, 4, 8, 9], [0, 1, 2, 4, 7], [0, 1, 2, 4, 7, 9], [0, 1, 2, 4, 7, 8], [0, 1, 2, 4, 7, 8, 9], [0, 1, 2, 4, 6], [0, 1, 2, 4, 6, 9], [0, 1, 2, 4, 6, 8], [0, 1, 2, 4, 6, 8, 9], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6, 7, 9], [0, 1, 2, 4, 6, 7, 8], [0, 1, 2, 4, 6, 7, 8, 9], [0, 1, 2, 4, 5], [0, 1, 2, 4, 5, 9], [0, 1, 2, 4, 5, 8], [0, 1, 2, 4, 5, 8, 9], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5, 7, 9], [0, 1, 2, 4, 5, 7, 8], [0, 1, 2, 4, 5, 7, 8, 9], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5, 6, 9], [0, 1, 2, 4, 5, 6, 8], [0, 1, 2, 4, 5, 6, 8, 9], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6, 7, 9], [0, 1, 2, 4, 5, 6, 7, 8], [0, 1, 2, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3], [0, 1, 2, 3, 9], [0, 1, 2, 3, 8], [0, 1, 2, 3, 8, 9], [0, 1, 2, 3, 7], [0, 1, 2, 3, 7, 9], [0, 1, 2, 3, 7, 8], [0, 1, 2, 3, 7, 8, 9], [0, 1, 2, 3, 6], [0, 1, 2, 3, 6, 9], [0, 1, 2, 3, 6, 8], [0, 1, 2, 3, 6, 8, 9], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6, 7, 9], [0, 1, 2, 3, 6, 7, 8], [0, 1, 2, 3, 6, 7, 8, 9], [0, 1, 2, 3, 5], [0, 1, 2, 3, 5, 9], [0, 1, 2, 3, 5, 8], [0, 1, 2, 3, 5, 8, 9], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5, 7, 9], [0, 1, 2, 3, 5, 7, 8], [0, 1, 2, 3, 5, 7, 8, 9], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 6, 9], [0, 1, 2, 3, 5, 6, 8], [0, 1, 2, 3, 5, 6, 8, 9], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6, 7, 9], [0, 1, 2, 3, 5, 6, 7, 8], [0, 1, 2, 3, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 9], [0, 1, 2, 3, 4, 8], [0, 1, 2, 3, 4, 8, 9], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4, 7, 9], [0, 1, 2, 3, 4, 7, 8], [0, 1, 2, 3, 4, 7, 8, 9], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 6, 9], [0, 1, 2, 3, 4, 6, 8], [0, 1, 2, 3, 4, 6, 8, 9], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6, 7, 9], [0, 1, 2, 3, 4, 6, 7, 8], [0, 1, 2, 3, 4, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5, 9], [0, 1, 2, 3, 4, 5, 8], [0, 1, 2, 3, 4, 5, 8, 9], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7, 9], [0, 1, 2, 3, 4, 5, 7, 8], [0, 1, 2, 3, 4, 5, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6, 9], [0, 1, 2, 3, 4, 5, 6, 8], [0, 1, 2, 3, 4, 5, 6, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 7, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(nums=[5, 1, 4, 2, 3]), [[], [3], [2], [2, 3], [4], [4, 3], [4, 2], [4, 2, 3], [1], [1, 3], [1, 2], [1, 2, 3], [1, 4], [1, 4, 3], [1, 4, 2], [1, 4, 2, 3], [5], [5, 3], [5, 2], [5, 2, 3], [5, 4], [5, 4, 3], [5, 4, 2], [5, 4, 2, 3], [5, 1], [5, 1, 3], [5, 1, 2], [5, 1, 2, 3], [5, 1, 4], [5, 1, 4, 3], [5, 1, 4, 2], [5, 1, 4, 2, 3]])\n assert answers_match(candidate(nums=[1, -1, 2, -2, 3, -3]), [[], [-3], [3], [3, -3], [-2], [-2, -3], [-2, 3], [-2, 3, -3], [2], [2, -3], [2, 3], [2, 3, -3], [2, -2], [2, -2, -3], [2, -2, 3], [2, -2, 3, -3], [-1], [-1, -3], [-1, 3], [-1, 3, -3], [-1, -2], [-1, -2, -3], [-1, -2, 3], [-1, -2, 3, -3], [-1, 2], [-1, 2, -3], [-1, 2, 3], [-1, 2, 3, -3], [-1, 2, -2], [-1, 2, -2, -3], [-1, 2, -2, 3], [-1, 2, -2, 3, -3], [1], [1, -3], [1, 3], [1, 3, -3], [1, -2], [1, -2, -3], [1, -2, 3], [1, -2, 3, -3], [1, 2], [1, 2, -3], [1, 2, 3], [1, 2, 3, -3], [1, 2, -2], [1, 2, -2, -3], [1, 2, -2, 3], [1, 2, -2, 3, -3], [1, -1], [1, -1, -3], [1, -1, 3], [1, -1, 3, -3], [1, -1, -2], [1, -1, -2, -3], [1, -1, -2, 3], [1, -1, -2, 3, -3], [1, -1, 2], [1, -1, 2, -3], [1, -1, 2, 3], [1, -1, 2, 3, -3], [1, -1, 2, -2], [1, -1, 2, -2, -3], [1, -1, 2, -2, 3], [1, -1, 2, -2, 3, -3]])\n assert answers_match(candidate(nums=[8, 6, 7, 5, 3, 0, 9]), [[], [9], [0], [0, 9], [3], [3, 9], [3, 0], [3, 0, 9], [5], [5, 9], [5, 0], [5, 0, 9], [5, 3], [5, 3, 9], [5, 3, 0], [5, 3, 0, 9], [7], [7, 9], [7, 0], [7, 0, 9], [7, 3], [7, 3, 9], [7, 3, 0], [7, 3, 0, 9], [7, 5], [7, 5, 9], [7, 5, 0], [7, 5, 0, 9], [7, 5, 3], [7, 5, 3, 9], [7, 5, 3, 0], [7, 5, 3, 0, 9], [6], [6, 9], [6, 0], [6, 0, 9], [6, 3], [6, 3, 9], [6, 3, 0], [6, 3, 0, 9], [6, 5], [6, 5, 9], [6, 5, 0], [6, 5, 0, 9], [6, 5, 3], [6, 5, 3, 9], [6, 5, 3, 0], [6, 5, 3, 0, 9], [6, 7], [6, 7, 9], [6, 7, 0], [6, 7, 0, 9], [6, 7, 3], [6, 7, 3, 9], [6, 7, 3, 0], [6, 7, 3, 0, 9], [6, 7, 5], [6, 7, 5, 9], [6, 7, 5, 0], [6, 7, 5, 0, 9], [6, 7, 5, 3], [6, 7, 5, 3, 9], [6, 7, 5, 3, 0], [6, 7, 5, 3, 0, 9], [8], [8, 9], [8, 0], [8, 0, 9], [8, 3], [8, 3, 9], [8, 3, 0], [8, 3, 0, 9], [8, 5], [8, 5, 9], [8, 5, 0], [8, 5, 0, 9], [8, 5, 3], [8, 5, 3, 9], [8, 5, 3, 0], [8, 5, 3, 0, 9], [8, 7], [8, 7, 9], [8, 7, 0], [8, 7, 0, 9], [8, 7, 3], [8, 7, 3, 9], [8, 7, 3, 0], [8, 7, 3, 0, 9], [8, 7, 5], [8, 7, 5, 9], [8, 7, 5, 0], [8, 7, 5, 0, 9], [8, 7, 5, 3], [8, 7, 5, 3, 9], [8, 7, 5, 3, 0], [8, 7, 5, 3, 0, 9], [8, 6], [8, 6, 9], [8, 6, 0], [8, 6, 0, 9], [8, 6, 3], [8, 6, 3, 9], [8, 6, 3, 0], [8, 6, 3, 0, 9], [8, 6, 5], [8, 6, 5, 9], [8, 6, 5, 0], [8, 6, 5, 0, 9], [8, 6, 5, 3], [8, 6, 5, 3, 9], [8, 6, 5, 3, 0], [8, 6, 5, 3, 0, 9], [8, 6, 7], [8, 6, 7, 9], [8, 6, 7, 0], [8, 6, 7, 0, 9], [8, 6, 7, 3], [8, 6, 7, 3, 9], [8, 6, 7, 3, 0], [8, 6, 7, 3, 0, 9], [8, 6, 7, 5], [8, 6, 7, 5, 9], [8, 6, 7, 5, 0], [8, 6, 7, 5, 0, 9], [8, 6, 7, 5, 3], [8, 6, 7, 5, 3, 9], [8, 6, 7, 5, 3, 0], [8, 6, 7, 5, 3, 0, 9]])\n assert answers_match(candidate(nums=[10, -10, 5, -5, 0]), [[], [0], [-5], [-5, 0], [5], [5, 0], [5, -5], [5, -5, 0], [-10], [-10, 0], [-10, -5], [-10, -5, 0], [-10, 5], [-10, 5, 0], [-10, 5, -5], [-10, 5, -5, 0], [10], [10, 0], [10, -5], [10, -5, 0], [10, 5], [10, 5, 0], [10, 5, -5], [10, 5, -5, 0], [10, -10], [10, -10, 0], [10, -10, -5], [10, -10, -5, 0], [10, -10, 5], [10, -10, 5, 0], [10, -10, 5, -5], [10, -10, 5, -5, 0]])\n assert answers_match(candidate(nums=[-10, -5, 0, 5, 10]), [[], [10], [5], [5, 10], [0], [0, 10], [0, 5], [0, 5, 10], [-5], [-5, 10], [-5, 5], [-5, 5, 10], [-5, 0], [-5, 0, 10], [-5, 0, 5], [-5, 0, 5, 10], [-10], [-10, 10], [-10, 5], [-10, 5, 10], [-10, 0], [-10, 0, 10], [-10, 0, 5], [-10, 0, 5, 10], [-10, -5], [-10, -5, 10], [-10, -5, 5], [-10, -5, 5, 10], [-10, -5, 0], [-10, -5, 0, 10], [-10, -5, 0, 5], [-10, -5, 0, 5, 10]])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8]), [[], [8], [7], [7, 8], [6], [6, 8], [6, 7], [6, 7, 8], [5], [5, 8], [5, 7], [5, 7, 8], [5, 6], [5, 6, 8], [5, 6, 7], [5, 6, 7, 8], [4], [4, 8], [4, 7], [4, 7, 8], [4, 6], [4, 6, 8], [4, 6, 7], [4, 6, 7, 8], [4, 5], [4, 5, 8], [4, 5, 7], [4, 5, 7, 8], [4, 5, 6], [4, 5, 6, 8], [4, 5, 6, 7], [4, 5, 6, 7, 8], [3], [3, 8], [3, 7], [3, 7, 8], [3, 6], [3, 6, 8], [3, 6, 7], [3, 6, 7, 8], [3, 5], [3, 5, 8], [3, 5, 7], [3, 5, 7, 8], [3, 5, 6], [3, 5, 6, 8], [3, 5, 6, 7], [3, 5, 6, 7, 8], [3, 4], [3, 4, 8], [3, 4, 7], [3, 4, 7, 8], [3, 4, 6], [3, 4, 6, 8], [3, 4, 6, 7], [3, 4, 6, 7, 8], [3, 4, 5], [3, 4, 5, 8], [3, 4, 5, 7], [3, 4, 5, 7, 8], [3, 4, 5, 6], [3, 4, 5, 6, 8], [3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 8], [2], [2, 8], [2, 7], [2, 7, 8], [2, 6], [2, 6, 8], [2, 6, 7], [2, 6, 7, 8], [2, 5], [2, 5, 8], [2, 5, 7], [2, 5, 7, 8], [2, 5, 6], [2, 5, 6, 8], [2, 5, 6, 7], [2, 5, 6, 7, 8], [2, 4], [2, 4, 8], [2, 4, 7], [2, 4, 7, 8], [2, 4, 6], [2, 4, 6, 8], [2, 4, 6, 7], [2, 4, 6, 7, 8], [2, 4, 5], [2, 4, 5, 8], [2, 4, 5, 7], [2, 4, 5, 7, 8], [2, 4, 5, 6], [2, 4, 5, 6, 8], [2, 4, 5, 6, 7], [2, 4, 5, 6, 7, 8], [2, 3], [2, 3, 8], [2, 3, 7], [2, 3, 7, 8], [2, 3, 6], [2, 3, 6, 8], [2, 3, 6, 7], [2, 3, 6, 7, 8], [2, 3, 5], [2, 3, 5, 8], [2, 3, 5, 7], [2, 3, 5, 7, 8], [2, 3, 5, 6], [2, 3, 5, 6, 8], [2, 3, 5, 6, 7], [2, 3, 5, 6, 7, 8], [2, 3, 4], [2, 3, 4, 8], [2, 3, 4, 7], [2, 3, 4, 7, 8], [2, 3, 4, 6], [2, 3, 4, 6, 8], [2, 3, 4, 6, 7], [2, 3, 4, 6, 7, 8], [2, 3, 4, 5], [2, 3, 4, 5, 8], [2, 3, 4, 5, 7], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 7, 8], [1], [1, 8], [1, 7], [1, 7, 8], [1, 6], [1, 6, 8], [1, 6, 7], [1, 6, 7, 8], [1, 5], [1, 5, 8], [1, 5, 7], [1, 5, 7, 8], [1, 5, 6], [1, 5, 6, 8], [1, 5, 6, 7], [1, 5, 6, 7, 8], [1, 4], [1, 4, 8], [1, 4, 7], [1, 4, 7, 8], [1, 4, 6], [1, 4, 6, 8], [1, 4, 6, 7], [1, 4, 6, 7, 8], [1, 4, 5], [1, 4, 5, 8], [1, 4, 5, 7], [1, 4, 5, 7, 8], [1, 4, 5, 6], [1, 4, 5, 6, 8], [1, 4, 5, 6, 7], [1, 4, 5, 6, 7, 8], [1, 3], [1, 3, 8], [1, 3, 7], [1, 3, 7, 8], [1, 3, 6], [1, 3, 6, 8], [1, 3, 6, 7], [1, 3, 6, 7, 8], [1, 3, 5], [1, 3, 5, 8], [1, 3, 5, 7], [1, 3, 5, 7, 8], [1, 3, 5, 6], [1, 3, 5, 6, 8], [1, 3, 5, 6, 7], [1, 3, 5, 6, 7, 8], [1, 3, 4], [1, 3, 4, 8], [1, 3, 4, 7], [1, 3, 4, 7, 8], [1, 3, 4, 6], [1, 3, 4, 6, 8], [1, 3, 4, 6, 7], [1, 3, 4, 6, 7, 8], [1, 3, 4, 5], [1, 3, 4, 5, 8], [1, 3, 4, 5, 7], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 6], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 7, 8], [1, 2], [1, 2, 8], [1, 2, 7], [1, 2, 7, 8], [1, 2, 6], [1, 2, 6, 8], [1, 2, 6, 7], [1, 2, 6, 7, 8], [1, 2, 5], [1, 2, 5, 8], [1, 2, 5, 7], [1, 2, 5, 7, 8], [1, 2, 5, 6], [1, 2, 5, 6, 8], [1, 2, 5, 6, 7], [1, 2, 5, 6, 7, 8], [1, 2, 4], [1, 2, 4, 8], [1, 2, 4, 7], [1, 2, 4, 7, 8], [1, 2, 4, 6], [1, 2, 4, 6, 8], [1, 2, 4, 6, 7], [1, 2, 4, 6, 7, 8], [1, 2, 4, 5], [1, 2, 4, 5, 8], [1, 2, 4, 5, 7], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 6], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 7, 8], [1, 2, 3], [1, 2, 3, 8], [1, 2, 3, 7], [1, 2, 3, 7, 8], [1, 2, 3, 6], [1, 2, 3, 6, 8], [1, 2, 3, 6, 7], [1, 2, 3, 6, 7, 8], [1, 2, 3, 5], [1, 2, 3, 5, 8], [1, 2, 3, 5, 7], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 6], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 4], [1, 2, 3, 4, 8], [1, 2, 3, 4, 7], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 6], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 8], [0], [0, 8], [0, 7], [0, 7, 8], [0, 6], [0, 6, 8], [0, 6, 7], [0, 6, 7, 8], [0, 5], [0, 5, 8], [0, 5, 7], [0, 5, 7, 8], [0, 5, 6], [0, 5, 6, 8], [0, 5, 6, 7], [0, 5, 6, 7, 8], [0, 4], [0, 4, 8], [0, 4, 7], [0, 4, 7, 8], [0, 4, 6], [0, 4, 6, 8], [0, 4, 6, 7], [0, 4, 6, 7, 8], [0, 4, 5], [0, 4, 5, 8], [0, 4, 5, 7], [0, 4, 5, 7, 8], [0, 4, 5, 6], [0, 4, 5, 6, 8], [0, 4, 5, 6, 7], [0, 4, 5, 6, 7, 8], [0, 3], [0, 3, 8], [0, 3, 7], [0, 3, 7, 8], [0, 3, 6], [0, 3, 6, 8], [0, 3, 6, 7], [0, 3, 6, 7, 8], [0, 3, 5], [0, 3, 5, 8], [0, 3, 5, 7], [0, 3, 5, 7, 8], [0, 3, 5, 6], [0, 3, 5, 6, 8], [0, 3, 5, 6, 7], [0, 3, 5, 6, 7, 8], [0, 3, 4], [0, 3, 4, 8], [0, 3, 4, 7], [0, 3, 4, 7, 8], [0, 3, 4, 6], [0, 3, 4, 6, 8], [0, 3, 4, 6, 7], [0, 3, 4, 6, 7, 8], [0, 3, 4, 5], [0, 3, 4, 5, 8], [0, 3, 4, 5, 7], [0, 3, 4, 5, 7, 8], [0, 3, 4, 5, 6], [0, 3, 4, 5, 6, 8], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6, 7, 8], [0, 2], [0, 2, 8], [0, 2, 7], [0, 2, 7, 8], [0, 2, 6], [0, 2, 6, 8], [0, 2, 6, 7], [0, 2, 6, 7, 8], [0, 2, 5], [0, 2, 5, 8], [0, 2, 5, 7], [0, 2, 5, 7, 8], [0, 2, 5, 6], [0, 2, 5, 6, 8], [0, 2, 5, 6, 7], [0, 2, 5, 6, 7, 8], [0, 2, 4], [0, 2, 4, 8], [0, 2, 4, 7], [0, 2, 4, 7, 8], [0, 2, 4, 6], [0, 2, 4, 6, 8], [0, 2, 4, 6, 7], [0, 2, 4, 6, 7, 8], [0, 2, 4, 5], [0, 2, 4, 5, 8], [0, 2, 4, 5, 7], [0, 2, 4, 5, 7, 8], [0, 2, 4, 5, 6], [0, 2, 4, 5, 6, 8], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6, 7, 8], [0, 2, 3], [0, 2, 3, 8], [0, 2, 3, 7], [0, 2, 3, 7, 8], [0, 2, 3, 6], [0, 2, 3, 6, 8], [0, 2, 3, 6, 7], [0, 2, 3, 6, 7, 8], [0, 2, 3, 5], [0, 2, 3, 5, 8], [0, 2, 3, 5, 7], [0, 2, 3, 5, 7, 8], [0, 2, 3, 5, 6], [0, 2, 3, 5, 6, 8], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6, 7, 8], [0, 2, 3, 4], [0, 2, 3, 4, 8], [0, 2, 3, 4, 7], [0, 2, 3, 4, 7, 8], [0, 2, 3, 4, 6], [0, 2, 3, 4, 6, 8], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6, 7, 8], [0, 2, 3, 4, 5], [0, 2, 3, 4, 5, 8], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5, 7, 8], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 6, 8], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6, 7, 8], [0, 1], [0, 1, 8], [0, 1, 7], [0, 1, 7, 8], [0, 1, 6], [0, 1, 6, 8], [0, 1, 6, 7], [0, 1, 6, 7, 8], [0, 1, 5], [0, 1, 5, 8], [0, 1, 5, 7], [0, 1, 5, 7, 8], [0, 1, 5, 6], [0, 1, 5, 6, 8], [0, 1, 5, 6, 7], [0, 1, 5, 6, 7, 8], [0, 1, 4], [0, 1, 4, 8], [0, 1, 4, 7], [0, 1, 4, 7, 8], [0, 1, 4, 6], [0, 1, 4, 6, 8], [0, 1, 4, 6, 7], [0, 1, 4, 6, 7, 8], [0, 1, 4, 5], [0, 1, 4, 5, 8], [0, 1, 4, 5, 7], [0, 1, 4, 5, 7, 8], [0, 1, 4, 5, 6], [0, 1, 4, 5, 6, 8], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6, 7, 8], [0, 1, 3], [0, 1, 3, 8], [0, 1, 3, 7], [0, 1, 3, 7, 8], [0, 1, 3, 6], [0, 1, 3, 6, 8], [0, 1, 3, 6, 7], [0, 1, 3, 6, 7, 8], [0, 1, 3, 5], [0, 1, 3, 5, 8], [0, 1, 3, 5, 7], [0, 1, 3, 5, 7, 8], [0, 1, 3, 5, 6], [0, 1, 3, 5, 6, 8], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6, 7, 8], [0, 1, 3, 4], [0, 1, 3, 4, 8], [0, 1, 3, 4, 7], [0, 1, 3, 4, 7, 8], [0, 1, 3, 4, 6], [0, 1, 3, 4, 6, 8], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6, 7, 8], [0, 1, 3, 4, 5], [0, 1, 3, 4, 5, 8], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5, 7, 8], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5, 6, 8], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6, 7, 8], [0, 1, 2], [0, 1, 2, 8], [0, 1, 2, 7], [0, 1, 2, 7, 8], [0, 1, 2, 6], [0, 1, 2, 6, 8], [0, 1, 2, 6, 7], [0, 1, 2, 6, 7, 8], [0, 1, 2, 5], [0, 1, 2, 5, 8], [0, 1, 2, 5, 7], [0, 1, 2, 5, 7, 8], [0, 1, 2, 5, 6], [0, 1, 2, 5, 6, 8], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6, 7, 8], [0, 1, 2, 4], [0, 1, 2, 4, 8], [0, 1, 2, 4, 7], [0, 1, 2, 4, 7, 8], [0, 1, 2, 4, 6], [0, 1, 2, 4, 6, 8], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6, 7, 8], [0, 1, 2, 4, 5], [0, 1, 2, 4, 5, 8], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5, 7, 8], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5, 6, 8], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6, 7, 8], [0, 1, 2, 3], [0, 1, 2, 3, 8], [0, 1, 2, 3, 7], [0, 1, 2, 3, 7, 8], [0, 1, 2, 3, 6], [0, 1, 2, 3, 6, 8], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6, 7, 8], [0, 1, 2, 3, 5], [0, 1, 2, 3, 5, 8], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5, 7, 8], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 6, 8], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6, 7, 8], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 8], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4, 7, 8], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 6, 8], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6, 7, 8], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 5, 8], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 7, 8], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 6, 8], [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 7, 8], [-1], [-1, 8], [-1, 7], [-1, 7, 8], [-1, 6], [-1, 6, 8], [-1, 6, 7], [-1, 6, 7, 8], [-1, 5], [-1, 5, 8], [-1, 5, 7], [-1, 5, 7, 8], [-1, 5, 6], [-1, 5, 6, 8], [-1, 5, 6, 7], [-1, 5, 6, 7, 8], [-1, 4], [-1, 4, 8], [-1, 4, 7], [-1, 4, 7, 8], [-1, 4, 6], [-1, 4, 6, 8], [-1, 4, 6, 7], [-1, 4, 6, 7, 8], [-1, 4, 5], [-1, 4, 5, 8], [-1, 4, 5, 7], [-1, 4, 5, 7, 8], [-1, 4, 5, 6], [-1, 4, 5, 6, 8], [-1, 4, 5, 6, 7], [-1, 4, 5, 6, 7, 8], [-1, 3], [-1, 3, 8], [-1, 3, 7], [-1, 3, 7, 8], [-1, 3, 6], [-1, 3, 6, 8], [-1, 3, 6, 7], [-1, 3, 6, 7, 8], [-1, 3, 5], [-1, 3, 5, 8], [-1, 3, 5, 7], [-1, 3, 5, 7, 8], [-1, 3, 5, 6], [-1, 3, 5, 6, 8], [-1, 3, 5, 6, 7], [-1, 3, 5, 6, 7, 8], [-1, 3, 4], [-1, 3, 4, 8], [-1, 3, 4, 7], [-1, 3, 4, 7, 8], [-1, 3, 4, 6], [-1, 3, 4, 6, 8], [-1, 3, 4, 6, 7], [-1, 3, 4, 6, 7, 8], [-1, 3, 4, 5], [-1, 3, 4, 5, 8], [-1, 3, 4, 5, 7], [-1, 3, 4, 5, 7, 8], [-1, 3, 4, 5, 6], [-1, 3, 4, 5, 6, 8], [-1, 3, 4, 5, 6, 7], [-1, 3, 4, 5, 6, 7, 8], [-1, 2], [-1, 2, 8], [-1, 2, 7], [-1, 2, 7, 8], [-1, 2, 6], [-1, 2, 6, 8], [-1, 2, 6, 7], [-1, 2, 6, 7, 8], [-1, 2, 5], [-1, 2, 5, 8], [-1, 2, 5, 7], [-1, 2, 5, 7, 8], [-1, 2, 5, 6], [-1, 2, 5, 6, 8], [-1, 2, 5, 6, 7], [-1, 2, 5, 6, 7, 8], [-1, 2, 4], [-1, 2, 4, 8], [-1, 2, 4, 7], [-1, 2, 4, 7, 8], [-1, 2, 4, 6], [-1, 2, 4, 6, 8], [-1, 2, 4, 6, 7], [-1, 2, 4, 6, 7, 8], [-1, 2, 4, 5], [-1, 2, 4, 5, 8], [-1, 2, 4, 5, 7], [-1, 2, 4, 5, 7, 8], [-1, 2, 4, 5, 6], [-1, 2, 4, 5, 6, 8], [-1, 2, 4, 5, 6, 7], [-1, 2, 4, 5, 6, 7, 8], [-1, 2, 3], [-1, 2, 3, 8], [-1, 2, 3, 7], [-1, 2, 3, 7, 8], [-1, 2, 3, 6], [-1, 2, 3, 6, 8], [-1, 2, 3, 6, 7], [-1, 2, 3, 6, 7, 8], [-1, 2, 3, 5], [-1, 2, 3, 5, 8], [-1, 2, 3, 5, 7], [-1, 2, 3, 5, 7, 8], [-1, 2, 3, 5, 6], [-1, 2, 3, 5, 6, 8], [-1, 2, 3, 5, 6, 7], [-1, 2, 3, 5, 6, 7, 8], [-1, 2, 3, 4], [-1, 2, 3, 4, 8], [-1, 2, 3, 4, 7], [-1, 2, 3, 4, 7, 8], [-1, 2, 3, 4, 6], [-1, 2, 3, 4, 6, 8], [-1, 2, 3, 4, 6, 7], [-1, 2, 3, 4, 6, 7, 8], [-1, 2, 3, 4, 5], [-1, 2, 3, 4, 5, 8], [-1, 2, 3, 4, 5, 7], [-1, 2, 3, 4, 5, 7, 8], [-1, 2, 3, 4, 5, 6], [-1, 2, 3, 4, 5, 6, 8], [-1, 2, 3, 4, 5, 6, 7], [-1, 2, 3, 4, 5, 6, 7, 8], [-1, 1], [-1, 1, 8], [-1, 1, 7], [-1, 1, 7, 8], [-1, 1, 6], [-1, 1, 6, 8], [-1, 1, 6, 7], [-1, 1, 6, 7, 8], [-1, 1, 5], [-1, 1, 5, 8], [-1, 1, 5, 7], [-1, 1, 5, 7, 8], [-1, 1, 5, 6], [-1, 1, 5, 6, 8], [-1, 1, 5, 6, 7], [-1, 1, 5, 6, 7, 8], [-1, 1, 4], [-1, 1, 4, 8], [-1, 1, 4, 7], [-1, 1, 4, 7, 8], [-1, 1, 4, 6], [-1, 1, 4, 6, 8], [-1, 1, 4, 6, 7], [-1, 1, 4, 6, 7, 8], [-1, 1, 4, 5], [-1, 1, 4, 5, 8], [-1, 1, 4, 5, 7], [-1, 1, 4, 5, 7, 8], [-1, 1, 4, 5, 6], [-1, 1, 4, 5, 6, 8], [-1, 1, 4, 5, 6, 7], [-1, 1, 4, 5, 6, 7, 8], [-1, 1, 3], [-1, 1, 3, 8], [-1, 1, 3, 7], [-1, 1, 3, 7, 8], [-1, 1, 3, 6], [-1, 1, 3, 6, 8], [-1, 1, 3, 6, 7], [-1, 1, 3, 6, 7, 8], [-1, 1, 3, 5], [-1, 1, 3, 5, 8], [-1, 1, 3, 5, 7], [-1, 1, 3, 5, 7, 8], [-1, 1, 3, 5, 6], [-1, 1, 3, 5, 6, 8], [-1, 1, 3, 5, 6, 7], [-1, 1, 3, 5, 6, 7, 8], [-1, 1, 3, 4], [-1, 1, 3, 4, 8], [-1, 1, 3, 4, 7], [-1, 1, 3, 4, 7, 8], [-1, 1, 3, 4, 6], [-1, 1, 3, 4, 6, 8], [-1, 1, 3, 4, 6, 7], [-1, 1, 3, 4, 6, 7, 8], [-1, 1, 3, 4, 5], [-1, 1, 3, 4, 5, 8], [-1, 1, 3, 4, 5, 7], [-1, 1, 3, 4, 5, 7, 8], [-1, 1, 3, 4, 5, 6], [-1, 1, 3, 4, 5, 6, 8], [-1, 1, 3, 4, 5, 6, 7], [-1, 1, 3, 4, 5, 6, 7, 8], [-1, 1, 2], [-1, 1, 2, 8], [-1, 1, 2, 7], [-1, 1, 2, 7, 8], [-1, 1, 2, 6], [-1, 1, 2, 6, 8], [-1, 1, 2, 6, 7], [-1, 1, 2, 6, 7, 8], [-1, 1, 2, 5], [-1, 1, 2, 5, 8], [-1, 1, 2, 5, 7], [-1, 1, 2, 5, 7, 8], [-1, 1, 2, 5, 6], [-1, 1, 2, 5, 6, 8], [-1, 1, 2, 5, 6, 7], [-1, 1, 2, 5, 6, 7, 8], [-1, 1, 2, 4], [-1, 1, 2, 4, 8], [-1, 1, 2, 4, 7], [-1, 1, 2, 4, 7, 8], [-1, 1, 2, 4, 6], [-1, 1, 2, 4, 6, 8], [-1, 1, 2, 4, 6, 7], [-1, 1, 2, 4, 6, 7, 8], [-1, 1, 2, 4, 5], [-1, 1, 2, 4, 5, 8], [-1, 1, 2, 4, 5, 7], [-1, 1, 2, 4, 5, 7, 8], [-1, 1, 2, 4, 5, 6], [-1, 1, 2, 4, 5, 6, 8], [-1, 1, 2, 4, 5, 6, 7], [-1, 1, 2, 4, 5, 6, 7, 8], [-1, 1, 2, 3], [-1, 1, 2, 3, 8], [-1, 1, 2, 3, 7], [-1, 1, 2, 3, 7, 8], [-1, 1, 2, 3, 6], [-1, 1, 2, 3, 6, 8], [-1, 1, 2, 3, 6, 7], [-1, 1, 2, 3, 6, 7, 8], [-1, 1, 2, 3, 5], [-1, 1, 2, 3, 5, 8], [-1, 1, 2, 3, 5, 7], [-1, 1, 2, 3, 5, 7, 8], [-1, 1, 2, 3, 5, 6], [-1, 1, 2, 3, 5, 6, 8], [-1, 1, 2, 3, 5, 6, 7], [-1, 1, 2, 3, 5, 6, 7, 8], [-1, 1, 2, 3, 4], [-1, 1, 2, 3, 4, 8], [-1, 1, 2, 3, 4, 7], [-1, 1, 2, 3, 4, 7, 8], [-1, 1, 2, 3, 4, 6], [-1, 1, 2, 3, 4, 6, 8], [-1, 1, 2, 3, 4, 6, 7], [-1, 1, 2, 3, 4, 6, 7, 8], [-1, 1, 2, 3, 4, 5], [-1, 1, 2, 3, 4, 5, 8], [-1, 1, 2, 3, 4, 5, 7], [-1, 1, 2, 3, 4, 5, 7, 8], [-1, 1, 2, 3, 4, 5, 6], [-1, 1, 2, 3, 4, 5, 6, 8], [-1, 1, 2, 3, 4, 5, 6, 7], [-1, 1, 2, 3, 4, 5, 6, 7, 8], [-1, 0], [-1, 0, 8], [-1, 0, 7], [-1, 0, 7, 8], [-1, 0, 6], [-1, 0, 6, 8], [-1, 0, 6, 7], [-1, 0, 6, 7, 8], [-1, 0, 5], [-1, 0, 5, 8], [-1, 0, 5, 7], [-1, 0, 5, 7, 8], [-1, 0, 5, 6], [-1, 0, 5, 6, 8], [-1, 0, 5, 6, 7], [-1, 0, 5, 6, 7, 8], [-1, 0, 4], [-1, 0, 4, 8], [-1, 0, 4, 7], [-1, 0, 4, 7, 8], [-1, 0, 4, 6], [-1, 0, 4, 6, 8], [-1, 0, 4, 6, 7], [-1, 0, 4, 6, 7, 8], [-1, 0, 4, 5], [-1, 0, 4, 5, 8], [-1, 0, 4, 5, 7], [-1, 0, 4, 5, 7, 8], [-1, 0, 4, 5, 6], [-1, 0, 4, 5, 6, 8], [-1, 0, 4, 5, 6, 7], [-1, 0, 4, 5, 6, 7, 8], [-1, 0, 3], [-1, 0, 3, 8], [-1, 0, 3, 7], [-1, 0, 3, 7, 8], [-1, 0, 3, 6], [-1, 0, 3, 6, 8], [-1, 0, 3, 6, 7], [-1, 0, 3, 6, 7, 8], [-1, 0, 3, 5], [-1, 0, 3, 5, 8], [-1, 0, 3, 5, 7], [-1, 0, 3, 5, 7, 8], [-1, 0, 3, 5, 6], [-1, 0, 3, 5, 6, 8], [-1, 0, 3, 5, 6, 7], [-1, 0, 3, 5, 6, 7, 8], [-1, 0, 3, 4], [-1, 0, 3, 4, 8], [-1, 0, 3, 4, 7], [-1, 0, 3, 4, 7, 8], [-1, 0, 3, 4, 6], [-1, 0, 3, 4, 6, 8], [-1, 0, 3, 4, 6, 7], [-1, 0, 3, 4, 6, 7, 8], [-1, 0, 3, 4, 5], [-1, 0, 3, 4, 5, 8], [-1, 0, 3, 4, 5, 7], [-1, 0, 3, 4, 5, 7, 8], [-1, 0, 3, 4, 5, 6], [-1, 0, 3, 4, 5, 6, 8], [-1, 0, 3, 4, 5, 6, 7], [-1, 0, 3, 4, 5, 6, 7, 8], [-1, 0, 2], [-1, 0, 2, 8], [-1, 0, 2, 7], [-1, 0, 2, 7, 8], [-1, 0, 2, 6], [-1, 0, 2, 6, 8], [-1, 0, 2, 6, 7], [-1, 0, 2, 6, 7, 8], [-1, 0, 2, 5], [-1, 0, 2, 5, 8], [-1, 0, 2, 5, 7], [-1, 0, 2, 5, 7, 8], [-1, 0, 2, 5, 6], [-1, 0, 2, 5, 6, 8], [-1, 0, 2, 5, 6, 7], [-1, 0, 2, 5, 6, 7, 8], [-1, 0, 2, 4], [-1, 0, 2, 4, 8], [-1, 0, 2, 4, 7], [-1, 0, 2, 4, 7, 8], [-1, 0, 2, 4, 6], [-1, 0, 2, 4, 6, 8], [-1, 0, 2, 4, 6, 7], [-1, 0, 2, 4, 6, 7, 8], [-1, 0, 2, 4, 5], [-1, 0, 2, 4, 5, 8], [-1, 0, 2, 4, 5, 7], [-1, 0, 2, 4, 5, 7, 8], [-1, 0, 2, 4, 5, 6], [-1, 0, 2, 4, 5, 6, 8], [-1, 0, 2, 4, 5, 6, 7], [-1, 0, 2, 4, 5, 6, 7, 8], [-1, 0, 2, 3], [-1, 0, 2, 3, 8], [-1, 0, 2, 3, 7], [-1, 0, 2, 3, 7, 8], [-1, 0, 2, 3, 6], [-1, 0, 2, 3, 6, 8], [-1, 0, 2, 3, 6, 7], [-1, 0, 2, 3, 6, 7, 8], [-1, 0, 2, 3, 5], [-1, 0, 2, 3, 5, 8], [-1, 0, 2, 3, 5, 7], [-1, 0, 2, 3, 5, 7, 8], [-1, 0, 2, 3, 5, 6], [-1, 0, 2, 3, 5, 6, 8], [-1, 0, 2, 3, 5, 6, 7], [-1, 0, 2, 3, 5, 6, 7, 8], [-1, 0, 2, 3, 4], [-1, 0, 2, 3, 4, 8], [-1, 0, 2, 3, 4, 7], [-1, 0, 2, 3, 4, 7, 8], [-1, 0, 2, 3, 4, 6], [-1, 0, 2, 3, 4, 6, 8], [-1, 0, 2, 3, 4, 6, 7], [-1, 0, 2, 3, 4, 6, 7, 8], [-1, 0, 2, 3, 4, 5], [-1, 0, 2, 3, 4, 5, 8], [-1, 0, 2, 3, 4, 5, 7], [-1, 0, 2, 3, 4, 5, 7, 8], [-1, 0, 2, 3, 4, 5, 6], [-1, 0, 2, 3, 4, 5, 6, 8], [-1, 0, 2, 3, 4, 5, 6, 7], [-1, 0, 2, 3, 4, 5, 6, 7, 8], [-1, 0, 1], [-1, 0, 1, 8], [-1, 0, 1, 7], [-1, 0, 1, 7, 8], [-1, 0, 1, 6], [-1, 0, 1, 6, 8], [-1, 0, 1, 6, 7], [-1, 0, 1, 6, 7, 8], [-1, 0, 1, 5], [-1, 0, 1, 5, 8], [-1, 0, 1, 5, 7], [-1, 0, 1, 5, 7, 8], [-1, 0, 1, 5, 6], [-1, 0, 1, 5, 6, 8], [-1, 0, 1, 5, 6, 7], [-1, 0, 1, 5, 6, 7, 8], [-1, 0, 1, 4], [-1, 0, 1, 4, 8], [-1, 0, 1, 4, 7], [-1, 0, 1, 4, 7, 8], [-1, 0, 1, 4, 6], [-1, 0, 1, 4, 6, 8], [-1, 0, 1, 4, 6, 7], [-1, 0, 1, 4, 6, 7, 8], [-1, 0, 1, 4, 5], [-1, 0, 1, 4, 5, 8], [-1, 0, 1, 4, 5, 7], [-1, 0, 1, 4, 5, 7, 8], [-1, 0, 1, 4, 5, 6], [-1, 0, 1, 4, 5, 6, 8], [-1, 0, 1, 4, 5, 6, 7], [-1, 0, 1, 4, 5, 6, 7, 8], [-1, 0, 1, 3], [-1, 0, 1, 3, 8], [-1, 0, 1, 3, 7], [-1, 0, 1, 3, 7, 8], [-1, 0, 1, 3, 6], [-1, 0, 1, 3, 6, 8], [-1, 0, 1, 3, 6, 7], [-1, 0, 1, 3, 6, 7, 8], [-1, 0, 1, 3, 5], [-1, 0, 1, 3, 5, 8], [-1, 0, 1, 3, 5, 7], [-1, 0, 1, 3, 5, 7, 8], [-1, 0, 1, 3, 5, 6], [-1, 0, 1, 3, 5, 6, 8], [-1, 0, 1, 3, 5, 6, 7], [-1, 0, 1, 3, 5, 6, 7, 8], [-1, 0, 1, 3, 4], [-1, 0, 1, 3, 4, 8], [-1, 0, 1, 3, 4, 7], [-1, 0, 1, 3, 4, 7, 8], [-1, 0, 1, 3, 4, 6], [-1, 0, 1, 3, 4, 6, 8], [-1, 0, 1, 3, 4, 6, 7], [-1, 0, 1, 3, 4, 6, 7, 8], [-1, 0, 1, 3, 4, 5], [-1, 0, 1, 3, 4, 5, 8], [-1, 0, 1, 3, 4, 5, 7], [-1, 0, 1, 3, 4, 5, 7, 8], [-1, 0, 1, 3, 4, 5, 6], [-1, 0, 1, 3, 4, 5, 6, 8], [-1, 0, 1, 3, 4, 5, 6, 7], [-1, 0, 1, 3, 4, 5, 6, 7, 8], [-1, 0, 1, 2], [-1, 0, 1, 2, 8], [-1, 0, 1, 2, 7], [-1, 0, 1, 2, 7, 8], [-1, 0, 1, 2, 6], [-1, 0, 1, 2, 6, 8], [-1, 0, 1, 2, 6, 7], [-1, 0, 1, 2, 6, 7, 8], [-1, 0, 1, 2, 5], [-1, 0, 1, 2, 5, 8], [-1, 0, 1, 2, 5, 7], [-1, 0, 1, 2, 5, 7, 8], [-1, 0, 1, 2, 5, 6], [-1, 0, 1, 2, 5, 6, 8], [-1, 0, 1, 2, 5, 6, 7], [-1, 0, 1, 2, 5, 6, 7, 8], [-1, 0, 1, 2, 4], [-1, 0, 1, 2, 4, 8], [-1, 0, 1, 2, 4, 7], [-1, 0, 1, 2, 4, 7, 8], [-1, 0, 1, 2, 4, 6], [-1, 0, 1, 2, 4, 6, 8], [-1, 0, 1, 2, 4, 6, 7], [-1, 0, 1, 2, 4, 6, 7, 8], [-1, 0, 1, 2, 4, 5], [-1, 0, 1, 2, 4, 5, 8], [-1, 0, 1, 2, 4, 5, 7], [-1, 0, 1, 2, 4, 5, 7, 8], [-1, 0, 1, 2, 4, 5, 6], [-1, 0, 1, 2, 4, 5, 6, 8], [-1, 0, 1, 2, 4, 5, 6, 7], [-1, 0, 1, 2, 4, 5, 6, 7, 8], [-1, 0, 1, 2, 3], [-1, 0, 1, 2, 3, 8], [-1, 0, 1, 2, 3, 7], [-1, 0, 1, 2, 3, 7, 8], [-1, 0, 1, 2, 3, 6], [-1, 0, 1, 2, 3, 6, 8], [-1, 0, 1, 2, 3, 6, 7], [-1, 0, 1, 2, 3, 6, 7, 8], [-1, 0, 1, 2, 3, 5], [-1, 0, 1, 2, 3, 5, 8], [-1, 0, 1, 2, 3, 5, 7], [-1, 0, 1, 2, 3, 5, 7, 8], [-1, 0, 1, 2, 3, 5, 6], [-1, 0, 1, 2, 3, 5, 6, 8], [-1, 0, 1, 2, 3, 5, 6, 7], [-1, 0, 1, 2, 3, 5, 6, 7, 8], [-1, 0, 1, 2, 3, 4], [-1, 0, 1, 2, 3, 4, 8], [-1, 0, 1, 2, 3, 4, 7], [-1, 0, 1, 2, 3, 4, 7, 8], [-1, 0, 1, 2, 3, 4, 6], [-1, 0, 1, 2, 3, 4, 6, 8], [-1, 0, 1, 2, 3, 4, 6, 7], [-1, 0, 1, 2, 3, 4, 6, 7, 8], [-1, 0, 1, 2, 3, 4, 5], [-1, 0, 1, 2, 3, 4, 5, 8], [-1, 0, 1, 2, 3, 4, 5, 7], [-1, 0, 1, 2, 3, 4, 5, 7, 8], [-1, 0, 1, 2, 3, 4, 5, 6], [-1, 0, 1, 2, 3, 4, 5, 6, 8], [-1, 0, 1, 2, 3, 4, 5, 6, 7], [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8]])\n assert answers_match(candidate(nums=[-9, -7, -5, -3, -1, 1, 3, 5, 7, 9]), [[], [9], [7], [7, 9], [5], [5, 9], [5, 7], [5, 7, 9], [3], [3, 9], [3, 7], [3, 7, 9], [3, 5], [3, 5, 9], [3, 5, 7], [3, 5, 7, 9], [1], [1, 9], [1, 7], [1, 7, 9], [1, 5], [1, 5, 9], [1, 5, 7], [1, 5, 7, 9], [1, 3], [1, 3, 9], [1, 3, 7], [1, 3, 7, 9], [1, 3, 5], [1, 3, 5, 9], [1, 3, 5, 7], [1, 3, 5, 7, 9], [-1], [-1, 9], [-1, 7], [-1, 7, 9], [-1, 5], [-1, 5, 9], [-1, 5, 7], [-1, 5, 7, 9], [-1, 3], [-1, 3, 9], [-1, 3, 7], [-1, 3, 7, 9], [-1, 3, 5], [-1, 3, 5, 9], [-1, 3, 5, 7], [-1, 3, 5, 7, 9], [-1, 1], [-1, 1, 9], [-1, 1, 7], [-1, 1, 7, 9], [-1, 1, 5], [-1, 1, 5, 9], [-1, 1, 5, 7], [-1, 1, 5, 7, 9], [-1, 1, 3], [-1, 1, 3, 9], [-1, 1, 3, 7], [-1, 1, 3, 7, 9], [-1, 1, 3, 5], [-1, 1, 3, 5, 9], [-1, 1, 3, 5, 7], [-1, 1, 3, 5, 7, 9], [-3], [-3, 9], [-3, 7], [-3, 7, 9], [-3, 5], [-3, 5, 9], [-3, 5, 7], [-3, 5, 7, 9], [-3, 3], [-3, 3, 9], [-3, 3, 7], [-3, 3, 7, 9], [-3, 3, 5], [-3, 3, 5, 9], [-3, 3, 5, 7], [-3, 3, 5, 7, 9], [-3, 1], [-3, 1, 9], [-3, 1, 7], [-3, 1, 7, 9], [-3, 1, 5], [-3, 1, 5, 9], [-3, 1, 5, 7], [-3, 1, 5, 7, 9], [-3, 1, 3], [-3, 1, 3, 9], [-3, 1, 3, 7], [-3, 1, 3, 7, 9], [-3, 1, 3, 5], [-3, 1, 3, 5, 9], [-3, 1, 3, 5, 7], [-3, 1, 3, 5, 7, 9], [-3, -1], [-3, -1, 9], [-3, -1, 7], [-3, -1, 7, 9], [-3, -1, 5], [-3, -1, 5, 9], [-3, -1, 5, 7], [-3, -1, 5, 7, 9], [-3, -1, 3], [-3, -1, 3, 9], [-3, -1, 3, 7], [-3, -1, 3, 7, 9], [-3, -1, 3, 5], [-3, -1, 3, 5, 9], [-3, -1, 3, 5, 7], [-3, -1, 3, 5, 7, 9], [-3, -1, 1], [-3, -1, 1, 9], [-3, -1, 1, 7], [-3, -1, 1, 7, 9], [-3, -1, 1, 5], [-3, -1, 1, 5, 9], [-3, -1, 1, 5, 7], [-3, -1, 1, 5, 7, 9], [-3, -1, 1, 3], [-3, -1, 1, 3, 9], [-3, -1, 1, 3, 7], [-3, -1, 1, 3, 7, 9], [-3, -1, 1, 3, 5], [-3, -1, 1, 3, 5, 9], [-3, -1, 1, 3, 5, 7], [-3, -1, 1, 3, 5, 7, 9], [-5], [-5, 9], [-5, 7], [-5, 7, 9], [-5, 5], [-5, 5, 9], [-5, 5, 7], [-5, 5, 7, 9], [-5, 3], [-5, 3, 9], [-5, 3, 7], [-5, 3, 7, 9], [-5, 3, 5], [-5, 3, 5, 9], [-5, 3, 5, 7], [-5, 3, 5, 7, 9], [-5, 1], [-5, 1, 9], [-5, 1, 7], [-5, 1, 7, 9], [-5, 1, 5], [-5, 1, 5, 9], [-5, 1, 5, 7], [-5, 1, 5, 7, 9], [-5, 1, 3], [-5, 1, 3, 9], [-5, 1, 3, 7], [-5, 1, 3, 7, 9], [-5, 1, 3, 5], [-5, 1, 3, 5, 9], [-5, 1, 3, 5, 7], [-5, 1, 3, 5, 7, 9], [-5, -1], [-5, -1, 9], [-5, -1, 7], [-5, -1, 7, 9], [-5, -1, 5], [-5, -1, 5, 9], [-5, -1, 5, 7], [-5, -1, 5, 7, 9], [-5, -1, 3], [-5, -1, 3, 9], [-5, -1, 3, 7], [-5, -1, 3, 7, 9], [-5, -1, 3, 5], [-5, -1, 3, 5, 9], [-5, -1, 3, 5, 7], [-5, -1, 3, 5, 7, 9], [-5, -1, 1], [-5, -1, 1, 9], [-5, -1, 1, 7], [-5, -1, 1, 7, 9], [-5, -1, 1, 5], [-5, -1, 1, 5, 9], [-5, -1, 1, 5, 7], [-5, -1, 1, 5, 7, 9], [-5, -1, 1, 3], [-5, -1, 1, 3, 9], [-5, -1, 1, 3, 7], [-5, -1, 1, 3, 7, 9], [-5, -1, 1, 3, 5], [-5, -1, 1, 3, 5, 9], [-5, -1, 1, 3, 5, 7], [-5, -1, 1, 3, 5, 7, 9], [-5, -3], [-5, -3, 9], [-5, -3, 7], [-5, -3, 7, 9], [-5, -3, 5], [-5, -3, 5, 9], [-5, -3, 5, 7], [-5, -3, 5, 7, 9], [-5, -3, 3], [-5, -3, 3, 9], [-5, -3, 3, 7], [-5, -3, 3, 7, 9], [-5, -3, 3, 5], [-5, -3, 3, 5, 9], [-5, -3, 3, 5, 7], [-5, -3, 3, 5, 7, 9], [-5, -3, 1], [-5, -3, 1, 9], [-5, -3, 1, 7], [-5, -3, 1, 7, 9], [-5, -3, 1, 5], [-5, -3, 1, 5, 9], [-5, -3, 1, 5, 7], [-5, -3, 1, 5, 7, 9], [-5, -3, 1, 3], [-5, -3, 1, 3, 9], [-5, -3, 1, 3, 7], [-5, -3, 1, 3, 7, 9], [-5, -3, 1, 3, 5], [-5, -3, 1, 3, 5, 9], [-5, -3, 1, 3, 5, 7], [-5, -3, 1, 3, 5, 7, 9], [-5, -3, -1], [-5, -3, -1, 9], [-5, -3, -1, 7], [-5, -3, -1, 7, 9], [-5, -3, -1, 5], [-5, -3, -1, 5, 9], [-5, -3, -1, 5, 7], [-5, -3, -1, 5, 7, 9], [-5, -3, -1, 3], [-5, -3, -1, 3, 9], [-5, -3, -1, 3, 7], [-5, -3, -1, 3, 7, 9], [-5, -3, -1, 3, 5], [-5, -3, -1, 3, 5, 9], [-5, -3, -1, 3, 5, 7], [-5, -3, -1, 3, 5, 7, 9], [-5, -3, -1, 1], [-5, -3, -1, 1, 9], [-5, -3, -1, 1, 7], [-5, -3, -1, 1, 7, 9], [-5, -3, -1, 1, 5], [-5, -3, -1, 1, 5, 9], [-5, -3, -1, 1, 5, 7], [-5, -3, -1, 1, 5, 7, 9], [-5, -3, -1, 1, 3], [-5, -3, -1, 1, 3, 9], [-5, -3, -1, 1, 3, 7], [-5, -3, -1, 1, 3, 7, 9], [-5, -3, -1, 1, 3, 5], [-5, -3, -1, 1, 3, 5, 9], [-5, -3, -1, 1, 3, 5, 7], [-5, -3, -1, 1, 3, 5, 7, 9], [-7], [-7, 9], [-7, 7], [-7, 7, 9], [-7, 5], [-7, 5, 9], [-7, 5, 7], [-7, 5, 7, 9], [-7, 3], [-7, 3, 9], [-7, 3, 7], [-7, 3, 7, 9], [-7, 3, 5], [-7, 3, 5, 9], [-7, 3, 5, 7], [-7, 3, 5, 7, 9], [-7, 1], [-7, 1, 9], [-7, 1, 7], [-7, 1, 7, 9], [-7, 1, 5], [-7, 1, 5, 9], [-7, 1, 5, 7], [-7, 1, 5, 7, 9], [-7, 1, 3], [-7, 1, 3, 9], [-7, 1, 3, 7], [-7, 1, 3, 7, 9], [-7, 1, 3, 5], [-7, 1, 3, 5, 9], [-7, 1, 3, 5, 7], [-7, 1, 3, 5, 7, 9], [-7, -1], [-7, -1, 9], [-7, -1, 7], [-7, -1, 7, 9], [-7, -1, 5], [-7, -1, 5, 9], [-7, -1, 5, 7], [-7, -1, 5, 7, 9], [-7, -1, 3], [-7, -1, 3, 9], [-7, -1, 3, 7], [-7, -1, 3, 7, 9], [-7, -1, 3, 5], [-7, -1, 3, 5, 9], [-7, -1, 3, 5, 7], [-7, -1, 3, 5, 7, 9], [-7, -1, 1], [-7, -1, 1, 9], [-7, -1, 1, 7], [-7, -1, 1, 7, 9], [-7, -1, 1, 5], [-7, -1, 1, 5, 9], [-7, -1, 1, 5, 7], [-7, -1, 1, 5, 7, 9], [-7, -1, 1, 3], [-7, -1, 1, 3, 9], [-7, -1, 1, 3, 7], [-7, -1, 1, 3, 7, 9], [-7, -1, 1, 3, 5], [-7, -1, 1, 3, 5, 9], [-7, -1, 1, 3, 5, 7], [-7, -1, 1, 3, 5, 7, 9], [-7, -3], [-7, -3, 9], [-7, -3, 7], [-7, -3, 7, 9], [-7, -3, 5], [-7, -3, 5, 9], [-7, -3, 5, 7], [-7, -3, 5, 7, 9], [-7, -3, 3], [-7, -3, 3, 9], [-7, -3, 3, 7], [-7, -3, 3, 7, 9], [-7, -3, 3, 5], [-7, -3, 3, 5, 9], [-7, -3, 3, 5, 7], [-7, -3, 3, 5, 7, 9], [-7, -3, 1], [-7, -3, 1, 9], [-7, -3, 1, 7], [-7, -3, 1, 7, 9], [-7, -3, 1, 5], [-7, -3, 1, 5, 9], [-7, -3, 1, 5, 7], [-7, -3, 1, 5, 7, 9], [-7, -3, 1, 3], [-7, -3, 1, 3, 9], [-7, -3, 1, 3, 7], [-7, -3, 1, 3, 7, 9], [-7, -3, 1, 3, 5], [-7, -3, 1, 3, 5, 9], [-7, -3, 1, 3, 5, 7], [-7, -3, 1, 3, 5, 7, 9], [-7, -3, -1], [-7, -3, -1, 9], [-7, -3, -1, 7], [-7, -3, -1, 7, 9], [-7, -3, -1, 5], [-7, -3, -1, 5, 9], [-7, -3, -1, 5, 7], [-7, -3, -1, 5, 7, 9], [-7, -3, -1, 3], [-7, -3, -1, 3, 9], [-7, -3, -1, 3, 7], [-7, -3, -1, 3, 7, 9], [-7, -3, -1, 3, 5], [-7, -3, -1, 3, 5, 9], [-7, -3, -1, 3, 5, 7], [-7, -3, -1, 3, 5, 7, 9], [-7, -3, -1, 1], [-7, -3, -1, 1, 9], [-7, -3, -1, 1, 7], [-7, -3, -1, 1, 7, 9], [-7, -3, -1, 1, 5], [-7, -3, -1, 1, 5, 9], [-7, -3, -1, 1, 5, 7], [-7, -3, -1, 1, 5, 7, 9], [-7, -3, -1, 1, 3], [-7, -3, -1, 1, 3, 9], [-7, -3, -1, 1, 3, 7], [-7, -3, -1, 1, 3, 7, 9], [-7, -3, -1, 1, 3, 5], [-7, -3, -1, 1, 3, 5, 9], [-7, -3, -1, 1, 3, 5, 7], [-7, -3, -1, 1, 3, 5, 7, 9], [-7, -5], [-7, -5, 9], [-7, -5, 7], [-7, -5, 7, 9], [-7, -5, 5], [-7, -5, 5, 9], [-7, -5, 5, 7], [-7, -5, 5, 7, 9], [-7, -5, 3], [-7, -5, 3, 9], [-7, -5, 3, 7], [-7, -5, 3, 7, 9], [-7, -5, 3, 5], [-7, -5, 3, 5, 9], [-7, -5, 3, 5, 7], [-7, -5, 3, 5, 7, 9], [-7, -5, 1], [-7, -5, 1, 9], [-7, -5, 1, 7], [-7, -5, 1, 7, 9], [-7, -5, 1, 5], [-7, -5, 1, 5, 9], [-7, -5, 1, 5, 7], [-7, -5, 1, 5, 7, 9], [-7, -5, 1, 3], [-7, -5, 1, 3, 9], [-7, -5, 1, 3, 7], [-7, -5, 1, 3, 7, 9], [-7, -5, 1, 3, 5], [-7, -5, 1, 3, 5, 9], [-7, -5, 1, 3, 5, 7], [-7, -5, 1, 3, 5, 7, 9], [-7, -5, -1], [-7, -5, -1, 9], [-7, -5, -1, 7], [-7, -5, -1, 7, 9], [-7, -5, -1, 5], [-7, -5, -1, 5, 9], [-7, -5, -1, 5, 7], [-7, -5, -1, 5, 7, 9], [-7, -5, -1, 3], [-7, -5, -1, 3, 9], [-7, -5, -1, 3, 7], [-7, -5, -1, 3, 7, 9], [-7, -5, -1, 3, 5], [-7, -5, -1, 3, 5, 9], [-7, -5, -1, 3, 5, 7], [-7, -5, -1, 3, 5, 7, 9], [-7, -5, -1, 1], [-7, -5, -1, 1, 9], [-7, -5, -1, 1, 7], [-7, -5, -1, 1, 7, 9], [-7, -5, -1, 1, 5], [-7, -5, -1, 1, 5, 9], [-7, -5, -1, 1, 5, 7], [-7, -5, -1, 1, 5, 7, 9], [-7, -5, -1, 1, 3], [-7, -5, -1, 1, 3, 9], [-7, -5, -1, 1, 3, 7], [-7, -5, -1, 1, 3, 7, 9], [-7, -5, -1, 1, 3, 5], [-7, -5, -1, 1, 3, 5, 9], [-7, -5, -1, 1, 3, 5, 7], [-7, -5, -1, 1, 3, 5, 7, 9], [-7, -5, -3], [-7, -5, -3, 9], [-7, -5, -3, 7], [-7, -5, -3, 7, 9], [-7, -5, -3, 5], [-7, -5, -3, 5, 9], [-7, -5, -3, 5, 7], [-7, -5, -3, 5, 7, 9], [-7, -5, -3, 3], [-7, -5, -3, 3, 9], [-7, -5, -3, 3, 7], [-7, -5, -3, 3, 7, 9], [-7, -5, -3, 3, 5], [-7, -5, -3, 3, 5, 9], [-7, -5, -3, 3, 5, 7], [-7, -5, -3, 3, 5, 7, 9], [-7, -5, -3, 1], [-7, -5, -3, 1, 9], [-7, -5, -3, 1, 7], [-7, -5, -3, 1, 7, 9], [-7, -5, -3, 1, 5], [-7, -5, -3, 1, 5, 9], [-7, -5, -3, 1, 5, 7], [-7, -5, -3, 1, 5, 7, 9], [-7, -5, -3, 1, 3], [-7, -5, -3, 1, 3, 9], [-7, -5, -3, 1, 3, 7], [-7, -5, -3, 1, 3, 7, 9], [-7, -5, -3, 1, 3, 5], [-7, -5, -3, 1, 3, 5, 9], [-7, -5, -3, 1, 3, 5, 7], [-7, -5, -3, 1, 3, 5, 7, 9], [-7, -5, -3, -1], [-7, -5, -3, -1, 9], [-7, -5, -3, -1, 7], [-7, -5, -3, -1, 7, 9], [-7, -5, -3, -1, 5], [-7, -5, -3, -1, 5, 9], [-7, -5, -3, -1, 5, 7], [-7, -5, -3, -1, 5, 7, 9], [-7, -5, -3, -1, 3], [-7, -5, -3, -1, 3, 9], [-7, -5, -3, -1, 3, 7], [-7, -5, -3, -1, 3, 7, 9], [-7, -5, -3, -1, 3, 5], [-7, -5, -3, -1, 3, 5, 9], [-7, -5, -3, -1, 3, 5, 7], [-7, -5, -3, -1, 3, 5, 7, 9], [-7, -5, -3, -1, 1], [-7, -5, -3, -1, 1, 9], [-7, -5, -3, -1, 1, 7], [-7, -5, -3, -1, 1, 7, 9], [-7, -5, -3, -1, 1, 5], [-7, -5, -3, -1, 1, 5, 9], [-7, -5, -3, -1, 1, 5, 7], [-7, -5, -3, -1, 1, 5, 7, 9], [-7, -5, -3, -1, 1, 3], [-7, -5, -3, -1, 1, 3, 9], [-7, -5, -3, -1, 1, 3, 7], [-7, -5, -3, -1, 1, 3, 7, 9], [-7, -5, -3, -1, 1, 3, 5], [-7, -5, -3, -1, 1, 3, 5, 9], [-7, -5, -3, -1, 1, 3, 5, 7], [-7, -5, -3, -1, 1, 3, 5, 7, 9], [-9], [-9, 9], [-9, 7], [-9, 7, 9], [-9, 5], [-9, 5, 9], [-9, 5, 7], [-9, 5, 7, 9], [-9, 3], [-9, 3, 9], [-9, 3, 7], [-9, 3, 7, 9], [-9, 3, 5], [-9, 3, 5, 9], [-9, 3, 5, 7], [-9, 3, 5, 7, 9], [-9, 1], [-9, 1, 9], [-9, 1, 7], [-9, 1, 7, 9], [-9, 1, 5], [-9, 1, 5, 9], [-9, 1, 5, 7], [-9, 1, 5, 7, 9], [-9, 1, 3], [-9, 1, 3, 9], [-9, 1, 3, 7], [-9, 1, 3, 7, 9], [-9, 1, 3, 5], [-9, 1, 3, 5, 9], [-9, 1, 3, 5, 7], [-9, 1, 3, 5, 7, 9], [-9, -1], [-9, -1, 9], [-9, -1, 7], [-9, -1, 7, 9], [-9, -1, 5], [-9, -1, 5, 9], [-9, -1, 5, 7], [-9, -1, 5, 7, 9], [-9, -1, 3], [-9, -1, 3, 9], [-9, -1, 3, 7], [-9, -1, 3, 7, 9], [-9, -1, 3, 5], [-9, -1, 3, 5, 9], [-9, -1, 3, 5, 7], [-9, -1, 3, 5, 7, 9], [-9, -1, 1], [-9, -1, 1, 9], [-9, -1, 1, 7], [-9, -1, 1, 7, 9], [-9, -1, 1, 5], [-9, -1, 1, 5, 9], [-9, -1, 1, 5, 7], [-9, -1, 1, 5, 7, 9], [-9, -1, 1, 3], [-9, -1, 1, 3, 9], [-9, -1, 1, 3, 7], [-9, -1, 1, 3, 7, 9], [-9, -1, 1, 3, 5], [-9, -1, 1, 3, 5, 9], [-9, -1, 1, 3, 5, 7], [-9, -1, 1, 3, 5, 7, 9], [-9, -3], [-9, -3, 9], [-9, -3, 7], [-9, -3, 7, 9], [-9, -3, 5], [-9, -3, 5, 9], [-9, -3, 5, 7], [-9, -3, 5, 7, 9], [-9, -3, 3], [-9, -3, 3, 9], [-9, -3, 3, 7], [-9, -3, 3, 7, 9], [-9, -3, 3, 5], [-9, -3, 3, 5, 9], [-9, -3, 3, 5, 7], [-9, -3, 3, 5, 7, 9], [-9, -3, 1], [-9, -3, 1, 9], [-9, -3, 1, 7], [-9, -3, 1, 7, 9], [-9, -3, 1, 5], [-9, -3, 1, 5, 9], [-9, -3, 1, 5, 7], [-9, -3, 1, 5, 7, 9], [-9, -3, 1, 3], [-9, -3, 1, 3, 9], [-9, -3, 1, 3, 7], [-9, -3, 1, 3, 7, 9], [-9, -3, 1, 3, 5], [-9, -3, 1, 3, 5, 9], [-9, -3, 1, 3, 5, 7], [-9, -3, 1, 3, 5, 7, 9], [-9, -3, -1], [-9, -3, -1, 9], [-9, -3, -1, 7], [-9, -3, -1, 7, 9], [-9, -3, -1, 5], [-9, -3, -1, 5, 9], [-9, -3, -1, 5, 7], [-9, -3, -1, 5, 7, 9], [-9, -3, -1, 3], [-9, -3, -1, 3, 9], [-9, -3, -1, 3, 7], [-9, -3, -1, 3, 7, 9], [-9, -3, -1, 3, 5], [-9, -3, -1, 3, 5, 9], [-9, -3, -1, 3, 5, 7], [-9, -3, -1, 3, 5, 7, 9], [-9, -3, -1, 1], [-9, -3, -1, 1, 9], [-9, -3, -1, 1, 7], [-9, -3, -1, 1, 7, 9], [-9, -3, -1, 1, 5], [-9, -3, -1, 1, 5, 9], [-9, -3, -1, 1, 5, 7], [-9, -3, -1, 1, 5, 7, 9], [-9, -3, -1, 1, 3], [-9, -3, -1, 1, 3, 9], [-9, -3, -1, 1, 3, 7], [-9, -3, -1, 1, 3, 7, 9], [-9, -3, -1, 1, 3, 5], [-9, -3, -1, 1, 3, 5, 9], [-9, -3, -1, 1, 3, 5, 7], [-9, -3, -1, 1, 3, 5, 7, 9], [-9, -5], [-9, -5, 9], [-9, -5, 7], [-9, -5, 7, 9], [-9, -5, 5], [-9, -5, 5, 9], [-9, -5, 5, 7], [-9, -5, 5, 7, 9], [-9, -5, 3], [-9, -5, 3, 9], [-9, -5, 3, 7], [-9, -5, 3, 7, 9], [-9, -5, 3, 5], [-9, -5, 3, 5, 9], [-9, -5, 3, 5, 7], [-9, -5, 3, 5, 7, 9], [-9, -5, 1], [-9, -5, 1, 9], [-9, -5, 1, 7], [-9, -5, 1, 7, 9], [-9, -5, 1, 5], [-9, -5, 1, 5, 9], [-9, -5, 1, 5, 7], [-9, -5, 1, 5, 7, 9], [-9, -5, 1, 3], [-9, -5, 1, 3, 9], [-9, -5, 1, 3, 7], [-9, -5, 1, 3, 7, 9], [-9, -5, 1, 3, 5], [-9, -5, 1, 3, 5, 9], [-9, -5, 1, 3, 5, 7], [-9, -5, 1, 3, 5, 7, 9], [-9, -5, -1], [-9, -5, -1, 9], [-9, -5, -1, 7], [-9, -5, -1, 7, 9], [-9, -5, -1, 5], [-9, -5, -1, 5, 9], [-9, -5, -1, 5, 7], [-9, -5, -1, 5, 7, 9], [-9, -5, -1, 3], [-9, -5, -1, 3, 9], [-9, -5, -1, 3, 7], [-9, -5, -1, 3, 7, 9], [-9, -5, -1, 3, 5], [-9, -5, -1, 3, 5, 9], [-9, -5, -1, 3, 5, 7], [-9, -5, -1, 3, 5, 7, 9], [-9, -5, -1, 1], [-9, -5, -1, 1, 9], [-9, -5, -1, 1, 7], [-9, -5, -1, 1, 7, 9], [-9, -5, -1, 1, 5], [-9, -5, -1, 1, 5, 9], [-9, -5, -1, 1, 5, 7], [-9, -5, -1, 1, 5, 7, 9], [-9, -5, -1, 1, 3], [-9, -5, -1, 1, 3, 9], [-9, -5, -1, 1, 3, 7], [-9, -5, -1, 1, 3, 7, 9], [-9, -5, -1, 1, 3, 5], [-9, -5, -1, 1, 3, 5, 9], [-9, -5, -1, 1, 3, 5, 7], [-9, -5, -1, 1, 3, 5, 7, 9], [-9, -5, -3], [-9, -5, -3, 9], [-9, -5, -3, 7], [-9, -5, -3, 7, 9], [-9, -5, -3, 5], [-9, -5, -3, 5, 9], [-9, -5, -3, 5, 7], [-9, -5, -3, 5, 7, 9], [-9, -5, -3, 3], [-9, -5, -3, 3, 9], [-9, -5, -3, 3, 7], [-9, -5, -3, 3, 7, 9], [-9, -5, -3, 3, 5], [-9, -5, -3, 3, 5, 9], [-9, -5, -3, 3, 5, 7], [-9, -5, -3, 3, 5, 7, 9], [-9, -5, -3, 1], [-9, -5, -3, 1, 9], [-9, -5, -3, 1, 7], [-9, -5, -3, 1, 7, 9], [-9, -5, -3, 1, 5], [-9, -5, -3, 1, 5, 9], [-9, -5, -3, 1, 5, 7], [-9, -5, -3, 1, 5, 7, 9], [-9, -5, -3, 1, 3], [-9, -5, -3, 1, 3, 9], [-9, -5, -3, 1, 3, 7], [-9, -5, -3, 1, 3, 7, 9], [-9, -5, -3, 1, 3, 5], [-9, -5, -3, 1, 3, 5, 9], [-9, -5, -3, 1, 3, 5, 7], [-9, -5, -3, 1, 3, 5, 7, 9], [-9, -5, -3, -1], [-9, -5, -3, -1, 9], [-9, -5, -3, -1, 7], [-9, -5, -3, -1, 7, 9], [-9, -5, -3, -1, 5], [-9, -5, -3, -1, 5, 9], [-9, -5, -3, -1, 5, 7], [-9, -5, -3, -1, 5, 7, 9], [-9, -5, -3, -1, 3], [-9, -5, -3, -1, 3, 9], [-9, -5, -3, -1, 3, 7], [-9, -5, -3, -1, 3, 7, 9], [-9, -5, -3, -1, 3, 5], [-9, -5, -3, -1, 3, 5, 9], [-9, -5, -3, -1, 3, 5, 7], [-9, -5, -3, -1, 3, 5, 7, 9], [-9, -5, -3, -1, 1], [-9, -5, -3, -1, 1, 9], [-9, -5, -3, -1, 1, 7], [-9, -5, -3, -1, 1, 7, 9], [-9, -5, -3, -1, 1, 5], [-9, -5, -3, -1, 1, 5, 9], [-9, -5, -3, -1, 1, 5, 7], [-9, -5, -3, -1, 1, 5, 7, 9], [-9, -5, -3, -1, 1, 3], [-9, -5, -3, -1, 1, 3, 9], [-9, -5, -3, -1, 1, 3, 7], [-9, -5, -3, -1, 1, 3, 7, 9], [-9, -5, -3, -1, 1, 3, 5], [-9, -5, -3, -1, 1, 3, 5, 9], [-9, -5, -3, -1, 1, 3, 5, 7], [-9, -5, -3, -1, 1, 3, 5, 7, 9], [-9, -7], [-9, -7, 9], [-9, -7, 7], [-9, -7, 7, 9], [-9, -7, 5], [-9, -7, 5, 9], [-9, -7, 5, 7], [-9, -7, 5, 7, 9], [-9, -7, 3], [-9, -7, 3, 9], [-9, -7, 3, 7], [-9, -7, 3, 7, 9], [-9, -7, 3, 5], [-9, -7, 3, 5, 9], [-9, -7, 3, 5, 7], [-9, -7, 3, 5, 7, 9], [-9, -7, 1], [-9, -7, 1, 9], [-9, -7, 1, 7], [-9, -7, 1, 7, 9], [-9, -7, 1, 5], [-9, -7, 1, 5, 9], [-9, -7, 1, 5, 7], [-9, -7, 1, 5, 7, 9], [-9, -7, 1, 3], [-9, -7, 1, 3, 9], [-9, -7, 1, 3, 7], [-9, -7, 1, 3, 7, 9], [-9, -7, 1, 3, 5], [-9, -7, 1, 3, 5, 9], [-9, -7, 1, 3, 5, 7], [-9, -7, 1, 3, 5, 7, 9], [-9, -7, -1], [-9, -7, -1, 9], [-9, -7, -1, 7], [-9, -7, -1, 7, 9], [-9, -7, -1, 5], [-9, -7, -1, 5, 9], [-9, -7, -1, 5, 7], [-9, -7, -1, 5, 7, 9], [-9, -7, -1, 3], [-9, -7, -1, 3, 9], [-9, -7, -1, 3, 7], [-9, -7, -1, 3, 7, 9], [-9, -7, -1, 3, 5], [-9, -7, -1, 3, 5, 9], [-9, -7, -1, 3, 5, 7], [-9, -7, -1, 3, 5, 7, 9], [-9, -7, -1, 1], [-9, -7, -1, 1, 9], [-9, -7, -1, 1, 7], [-9, -7, -1, 1, 7, 9], [-9, -7, -1, 1, 5], [-9, -7, -1, 1, 5, 9], [-9, -7, -1, 1, 5, 7], [-9, -7, -1, 1, 5, 7, 9], [-9, -7, -1, 1, 3], [-9, -7, -1, 1, 3, 9], [-9, -7, -1, 1, 3, 7], [-9, -7, -1, 1, 3, 7, 9], [-9, -7, -1, 1, 3, 5], [-9, -7, -1, 1, 3, 5, 9], [-9, -7, -1, 1, 3, 5, 7], [-9, -7, -1, 1, 3, 5, 7, 9], [-9, -7, -3], [-9, -7, -3, 9], [-9, -7, -3, 7], [-9, -7, -3, 7, 9], [-9, -7, -3, 5], [-9, -7, -3, 5, 9], [-9, -7, -3, 5, 7], [-9, -7, -3, 5, 7, 9], [-9, -7, -3, 3], [-9, -7, -3, 3, 9], [-9, -7, -3, 3, 7], [-9, -7, -3, 3, 7, 9], [-9, -7, -3, 3, 5], [-9, -7, -3, 3, 5, 9], [-9, -7, -3, 3, 5, 7], [-9, -7, -3, 3, 5, 7, 9], [-9, -7, -3, 1], [-9, -7, -3, 1, 9], [-9, -7, -3, 1, 7], [-9, -7, -3, 1, 7, 9], [-9, -7, -3, 1, 5], [-9, -7, -3, 1, 5, 9], [-9, -7, -3, 1, 5, 7], [-9, -7, -3, 1, 5, 7, 9], [-9, -7, -3, 1, 3], [-9, -7, -3, 1, 3, 9], [-9, -7, -3, 1, 3, 7], [-9, -7, -3, 1, 3, 7, 9], [-9, -7, -3, 1, 3, 5], [-9, -7, -3, 1, 3, 5, 9], [-9, -7, -3, 1, 3, 5, 7], [-9, -7, -3, 1, 3, 5, 7, 9], [-9, -7, -3, -1], [-9, -7, -3, -1, 9], [-9, -7, -3, -1, 7], [-9, -7, -3, -1, 7, 9], [-9, -7, -3, -1, 5], [-9, -7, -3, -1, 5, 9], [-9, -7, -3, -1, 5, 7], [-9, -7, -3, -1, 5, 7, 9], [-9, -7, -3, -1, 3], [-9, -7, -3, -1, 3, 9], [-9, -7, -3, -1, 3, 7], [-9, -7, -3, -1, 3, 7, 9], [-9, -7, -3, -1, 3, 5], [-9, -7, -3, -1, 3, 5, 9], [-9, -7, -3, -1, 3, 5, 7], [-9, -7, -3, -1, 3, 5, 7, 9], [-9, -7, -3, -1, 1], [-9, -7, -3, -1, 1, 9], [-9, -7, -3, -1, 1, 7], [-9, -7, -3, -1, 1, 7, 9], [-9, -7, -3, -1, 1, 5], [-9, -7, -3, -1, 1, 5, 9], [-9, -7, -3, -1, 1, 5, 7], [-9, -7, -3, -1, 1, 5, 7, 9], [-9, -7, -3, -1, 1, 3], [-9, -7, -3, -1, 1, 3, 9], [-9, -7, -3, -1, 1, 3, 7], [-9, -7, -3, -1, 1, 3, 7, 9], [-9, -7, -3, -1, 1, 3, 5], [-9, -7, -3, -1, 1, 3, 5, 9], [-9, -7, -3, -1, 1, 3, 5, 7], [-9, -7, -3, -1, 1, 3, 5, 7, 9], [-9, -7, -5], [-9, -7, -5, 9], [-9, -7, -5, 7], [-9, -7, -5, 7, 9], [-9, -7, -5, 5], [-9, -7, -5, 5, 9], [-9, -7, -5, 5, 7], [-9, -7, -5, 5, 7, 9], [-9, -7, -5, 3], [-9, -7, -5, 3, 9], [-9, -7, -5, 3, 7], [-9, -7, -5, 3, 7, 9], [-9, -7, -5, 3, 5], [-9, -7, -5, 3, 5, 9], [-9, -7, -5, 3, 5, 7], [-9, -7, -5, 3, 5, 7, 9], [-9, -7, -5, 1], [-9, -7, -5, 1, 9], [-9, -7, -5, 1, 7], [-9, -7, -5, 1, 7, 9], [-9, -7, -5, 1, 5], [-9, -7, -5, 1, 5, 9], [-9, -7, -5, 1, 5, 7], [-9, -7, -5, 1, 5, 7, 9], [-9, -7, -5, 1, 3], [-9, -7, -5, 1, 3, 9], [-9, -7, -5, 1, 3, 7], [-9, -7, -5, 1, 3, 7, 9], [-9, -7, -5, 1, 3, 5], [-9, -7, -5, 1, 3, 5, 9], [-9, -7, -5, 1, 3, 5, 7], [-9, -7, -5, 1, 3, 5, 7, 9], [-9, -7, -5, -1], [-9, -7, -5, -1, 9], [-9, -7, -5, -1, 7], [-9, -7, -5, -1, 7, 9], [-9, -7, -5, -1, 5], [-9, -7, -5, -1, 5, 9], [-9, -7, -5, -1, 5, 7], [-9, -7, -5, -1, 5, 7, 9], [-9, -7, -5, -1, 3], [-9, -7, -5, -1, 3, 9], [-9, -7, -5, -1, 3, 7], [-9, -7, -5, -1, 3, 7, 9], [-9, -7, -5, -1, 3, 5], [-9, -7, -5, -1, 3, 5, 9], [-9, -7, -5, -1, 3, 5, 7], [-9, -7, -5, -1, 3, 5, 7, 9], [-9, -7, -5, -1, 1], [-9, -7, -5, -1, 1, 9], [-9, -7, -5, -1, 1, 7], [-9, -7, -5, -1, 1, 7, 9], [-9, -7, -5, -1, 1, 5], [-9, -7, -5, -1, 1, 5, 9], [-9, -7, -5, -1, 1, 5, 7], [-9, -7, -5, -1, 1, 5, 7, 9], [-9, -7, -5, -1, 1, 3], [-9, -7, -5, -1, 1, 3, 9], [-9, -7, -5, -1, 1, 3, 7], [-9, -7, -5, -1, 1, 3, 7, 9], [-9, -7, -5, -1, 1, 3, 5], [-9, -7, -5, -1, 1, 3, 5, 9], [-9, -7, -5, -1, 1, 3, 5, 7], [-9, -7, -5, -1, 1, 3, 5, 7, 9], [-9, -7, -5, -3], [-9, -7, -5, -3, 9], [-9, -7, -5, -3, 7], [-9, -7, -5, -3, 7, 9], [-9, -7, -5, -3, 5], [-9, -7, -5, -3, 5, 9], [-9, -7, -5, -3, 5, 7], [-9, -7, -5, -3, 5, 7, 9], [-9, -7, -5, -3, 3], [-9, -7, -5, -3, 3, 9], [-9, -7, -5, -3, 3, 7], [-9, -7, -5, -3, 3, 7, 9], [-9, -7, -5, -3, 3, 5], [-9, -7, -5, -3, 3, 5, 9], [-9, -7, -5, -3, 3, 5, 7], [-9, -7, -5, -3, 3, 5, 7, 9], [-9, -7, -5, -3, 1], [-9, -7, -5, -3, 1, 9], [-9, -7, -5, -3, 1, 7], [-9, -7, -5, -3, 1, 7, 9], [-9, -7, -5, -3, 1, 5], [-9, -7, -5, -3, 1, 5, 9], [-9, -7, -5, -3, 1, 5, 7], [-9, -7, -5, -3, 1, 5, 7, 9], [-9, -7, -5, -3, 1, 3], [-9, -7, -5, -3, 1, 3, 9], [-9, -7, -5, -3, 1, 3, 7], [-9, -7, -5, -3, 1, 3, 7, 9], [-9, -7, -5, -3, 1, 3, 5], [-9, -7, -5, -3, 1, 3, 5, 9], [-9, -7, -5, -3, 1, 3, 5, 7], [-9, -7, -5, -3, 1, 3, 5, 7, 9], [-9, -7, -5, -3, -1], [-9, -7, -5, -3, -1, 9], [-9, -7, -5, -3, -1, 7], [-9, -7, -5, -3, -1, 7, 9], [-9, -7, -5, -3, -1, 5], [-9, -7, -5, -3, -1, 5, 9], [-9, -7, -5, -3, -1, 5, 7], [-9, -7, -5, -3, -1, 5, 7, 9], [-9, -7, -5, -3, -1, 3], [-9, -7, -5, -3, -1, 3, 9], [-9, -7, -5, -3, -1, 3, 7], [-9, -7, -5, -3, -1, 3, 7, 9], [-9, -7, -5, -3, -1, 3, 5], [-9, -7, -5, -3, -1, 3, 5, 9], [-9, -7, -5, -3, -1, 3, 5, 7], [-9, -7, -5, -3, -1, 3, 5, 7, 9], [-9, -7, -5, -3, -1, 1], [-9, -7, -5, -3, -1, 1, 9], [-9, -7, -5, -3, -1, 1, 7], [-9, -7, -5, -3, -1, 1, 7, 9], [-9, -7, -5, -3, -1, 1, 5], [-9, -7, -5, -3, -1, 1, 5, 9], [-9, -7, -5, -3, -1, 1, 5, 7], [-9, -7, -5, -3, -1, 1, 5, 7, 9], [-9, -7, -5, -3, -1, 1, 3], [-9, -7, -5, -3, -1, 1, 3, 9], [-9, -7, -5, -3, -1, 1, 3, 7], [-9, -7, -5, -3, -1, 1, 3, 7, 9], [-9, -7, -5, -3, -1, 1, 3, 5], [-9, -7, -5, -3, -1, 1, 3, 5, 9], [-9, -7, -5, -3, -1, 1, 3, 5, 7], [-9, -7, -5, -3, -1, 1, 3, 5, 7, 9]])\n assert answers_match(candidate(nums=[-5, -3, -1, 0, 1, 3, 5]), [[], [5], [3], [3, 5], [1], [1, 5], [1, 3], [1, 3, 5], [0], [0, 5], [0, 3], [0, 3, 5], [0, 1], [0, 1, 5], [0, 1, 3], [0, 1, 3, 5], [-1], [-1, 5], [-1, 3], [-1, 3, 5], [-1, 1], [-1, 1, 5], [-1, 1, 3], [-1, 1, 3, 5], [-1, 0], [-1, 0, 5], [-1, 0, 3], [-1, 0, 3, 5], [-1, 0, 1], [-1, 0, 1, 5], [-1, 0, 1, 3], [-1, 0, 1, 3, 5], [-3], [-3, 5], [-3, 3], [-3, 3, 5], [-3, 1], [-3, 1, 5], [-3, 1, 3], [-3, 1, 3, 5], [-3, 0], [-3, 0, 5], [-3, 0, 3], [-3, 0, 3, 5], [-3, 0, 1], [-3, 0, 1, 5], [-3, 0, 1, 3], [-3, 0, 1, 3, 5], [-3, -1], [-3, -1, 5], [-3, -1, 3], [-3, -1, 3, 5], [-3, -1, 1], [-3, -1, 1, 5], [-3, -1, 1, 3], [-3, -1, 1, 3, 5], [-3, -1, 0], [-3, -1, 0, 5], [-3, -1, 0, 3], [-3, -1, 0, 3, 5], [-3, -1, 0, 1], [-3, -1, 0, 1, 5], [-3, -1, 0, 1, 3], [-3, -1, 0, 1, 3, 5], [-5], [-5, 5], [-5, 3], [-5, 3, 5], [-5, 1], [-5, 1, 5], [-5, 1, 3], [-5, 1, 3, 5], [-5, 0], [-5, 0, 5], [-5, 0, 3], [-5, 0, 3, 5], [-5, 0, 1], [-5, 0, 1, 5], [-5, 0, 1, 3], [-5, 0, 1, 3, 5], [-5, -1], [-5, -1, 5], [-5, -1, 3], [-5, -1, 3, 5], [-5, -1, 1], [-5, -1, 1, 5], [-5, -1, 1, 3], [-5, -1, 1, 3, 5], [-5, -1, 0], [-5, -1, 0, 5], [-5, -1, 0, 3], [-5, -1, 0, 3, 5], [-5, -1, 0, 1], [-5, -1, 0, 1, 5], [-5, -1, 0, 1, 3], [-5, -1, 0, 1, 3, 5], [-5, -3], [-5, -3, 5], [-5, -3, 3], [-5, -3, 3, 5], [-5, -3, 1], [-5, -3, 1, 5], [-5, -3, 1, 3], [-5, -3, 1, 3, 5], [-5, -3, 0], [-5, -3, 0, 5], [-5, -3, 0, 3], [-5, -3, 0, 3, 5], [-5, -3, 0, 1], [-5, -3, 0, 1, 5], [-5, -3, 0, 1, 3], [-5, -3, 0, 1, 3, 5], [-5, -3, -1], [-5, -3, -1, 5], [-5, -3, -1, 3], [-5, -3, -1, 3, 5], [-5, -3, -1, 1], [-5, -3, -1, 1, 5], [-5, -3, -1, 1, 3], [-5, -3, -1, 1, 3, 5], [-5, -3, -1, 0], [-5, -3, -1, 0, 5], [-5, -3, -1, 0, 3], [-5, -3, -1, 0, 3, 5], [-5, -3, -1, 0, 1], [-5, -3, -1, 0, 1, 5], [-5, -3, -1, 0, 1, 3], [-5, -3, -1, 0, 1, 3, 5]])\n", "comparison": "unordered"}, "public_tests": ["[1,2,3]", "[0]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().subsets", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:22+00:00", "tests_total": 91, "tests_dropped": 27, "flags": ["any_order"], "topic_tags": ["array", "backtracking", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def subsets(nums)", "container": null, "callable": "subsets", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 79, "task_id": "word-search", "difficulty": "Medium", "problem_description": "Given an m x n grid of characters board and a string word, return true if word exists in the grid.\n\nThe word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once.\n\nExample 1:\n\nInput: board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCCED\"\nOutput: true\n\nExample 2:\n\nInput: board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"SEE\"\nOutput: true\n\nExample 3:\n\nInput: board = [[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]], word = \"ABCB\"\nOutput: false\n\nConstraints:\n\n- m == board.length\n- n = board[i].length\n- 1 <= m, n <= 6\n- 1 <= word.length <= 15\n- board and word consists of only lowercase and uppercase English letters.\n\nFollow up: Could you use search pruning to make your solution faster with a larger board?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [['A', 'B'], ['C', 'D']],word = \"BD\") == True\n assert candidate(board = [['A', 'B'], ['C', 'D']],word = \"AC\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"ABCB\") == False\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"ASADB\") == False\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"ABCB\") == False\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'E', 'S'], ['A', 'D', 'E', 'E']],word = \"ABCESEEEFS\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"Z\") == False\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"AB\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"ABCCED\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"SEE\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"E\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"SEE\") == True\n assert candidate(board = [['A', 'B'], ['C', 'D']],word = \"AB\") == True\n assert candidate(board = [['A', 'B'], ['C', 'D']],word = \"CD\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"ASAD\") == True\n assert candidate(board = [['A']],word = \"A\") == True\n assert candidate(board = [['A', 'B', 'C', 'E'], ['S', 'F', 'C', 'S'], ['A', 'D', 'E', 'E']],word = \"ABCCED\") == True\n", "comparison": "exact"}, "public_tests": ["[[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]]\n\"ABCCED\"", "[[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]]\n\"SEE\"", "[[\"A\",\"B\",\"C\",\"E\"],[\"S\",\"F\",\"C\",\"S\"],[\"A\",\"D\",\"E\",\"E\"]]\n\"ABCB\""], "hints": [], "metadata": {"canonical_parameter_names": ["board", "word"], "leetcode_dataset_entry_point": "Solution().exist", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:24+00:00", "tests_total": 17, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "string", "backtracking", "depth-first-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def exist(board, word)", "container": null, "callable": "exist", "parameters": [{"name": "board", "type": "Character[][]"}, {"name": "word", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 81, "task_id": "search-in-rotated-sorted-array-ii", "difficulty": "Medium", "problem_description": "There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values).\n\nBefore being passed to your function, nums is rotated at an unknown pivot index k (0 <= k < nums.length) such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] (0-indexed). For example, [0,1,2,4,4,4,5,6,6,7] might be rotated at pivot index 5 and become [4,5,6,6,7,0,1,2,4,4].\n\nGiven the array nums after the rotation and an integer target, return true if target is in nums, or false if it is not in nums.\n\nYou must decrease the overall operation steps as much as possible.\n\nExample 1:\n\nInput: nums = [2,5,6,0,0,1,2], target = 0\nOutput: true\n\nExample 2:\n\nInput: nums = [2,5,6,0,0,1,2], target = 3\nOutput: false\n\nConstraints:\n\n- 1 <= nums.length <= 5000\n- -10^4 <= nums[i] <= 10^4\n- nums is guaranteed to be rotated at some pivot.\n- -10^4 <= target <= 10^4\n\nFollow up: This problem is similar to Search in Rotated Sorted Array, but nums may contain duplicates. Would this affect the runtime complexity? How and why?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2],target = 6) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1],target = 2) == True\n assert candidate(nums = [4, 5, 6, 6, 7, 0, 1, 2, 4, 4],target = 4) == True\n assert candidate(nums = [3, 1],target = 2) == False\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2],target = 3) == False\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2],target = 0) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3],target = 1) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1],target = 3) == False\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 1],target = 1) == True\n assert candidate(nums = [3, 1],target = 1) == True\n assert candidate(nums = [1],target = 1) == True\n assert candidate(nums = [5, 1, 3],target = 3) == True\n assert candidate(nums = [2, 5, 6, 0, 0, 1, 2],target = 3) == False\n assert candidate(nums = [4, 5, 6, 6, 7, 0, 1, 2, 4, 4],target = 7) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5) == True\n assert candidate(nums = [2, 5, 6, 0, 0, 1, 2],target = 0) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],target = 1) == True\n assert candidate(nums = [5, 1, 3],target = 5) == True\n assert candidate(nums = [1, 3, 5],target = 1) == True\n assert candidate(nums = [1, 0, 1, 1, 1],target = 0) == True\n assert candidate(nums = [1],target = 0) == False\n assert candidate(nums = [1],target = 2) == False\n assert candidate(nums = [1, 3, 5],target = 5) == True\n assert candidate(nums = [3, 1],target = 3) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 3, 4, 2],target = 3) == True\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 4, 6, 8, 10],target = 7) == False\n assert candidate(nums = [7, 8, 9, 1, 2, 3, 4, 5, 6],target = 9) == True\n assert candidate(nums = [6, 7, 1, 2, 3, 4, 5],target = 3) == True\n assert candidate(nums = [5, 5, 5, 1, 2, 3, 4, 5],target = 6) == False\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2, 3],target = 6) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0],target = 18) == True\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2, 3],target = 10) == False\n assert candidate(nums = [6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5],target = 10) == True\n assert candidate(nums = [11, 13, 15, 17, 19, 21, 3, 5, 7, 9],target = 3) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 0, 1, 2, 3, 4],target = 9) == True\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 0],target = 0) == True\n assert candidate(nums = [15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],target = 3) == True\n assert candidate(nums = [10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 15) == True\n assert candidate(nums = [5, 5, 5, 1, 2, 3, 4, 5],target = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0],target = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0],target = 19) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 2) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == True\n assert candidate(nums = [2, 2, 2, 0, 2, 2],target = 0) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 2, 3, 4],target = 1) == True\n assert candidate(nums = [2, 2, 2, 0, 1, 2],target = 3) == False\n assert candidate(nums = [2, 2, 2, 0, 1, 2],target = 0) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 15) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 2) == False\n assert candidate(nums = [5, 1, 3, 4, 5, 5, 5, 5, 5],target = 1) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 0, 1, 2, 3, 4],target = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0],target = 20) == False\n assert candidate(nums = [3, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 1) == True\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2, 3],target = 0) == True\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 0, 1],target = 0) == True\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 4, 6, 8, 10],target = 5) == False\n assert candidate(nums = [9, 9, 9, 9, 9, 1, 1, 1, 1, 1],target = 1) == True\n assert candidate(nums = [1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 3) == True\n assert candidate(nums = [4, 5, 6, 7, 8, 1, 2, 3],target = 8) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 2, 2, 2, 2],target = 3) == True\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8],target = 1) == False\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],target = 9) == True\n assert candidate(nums = [4, 4, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 4, 4, 4, 4],target = 0) == True\n assert candidate(nums = [5, 5, 5, 5, 1, 5, 5, 5, 5, 5, 5, 5],target = 1) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 1) == False\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4],target = 0) == True\n assert candidate(nums = [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],target = 25) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4],target = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7],target = 5) == True\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8],target = 0) == True\n assert candidate(nums = [3, 4, 5, 6, 1, 2],target = 1) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 7) == True\n assert candidate(nums = [10, 10, 10, 10, 10, 1, 2, 3, 4, 5],target = 1) == True\n assert candidate(nums = [10, 15, 20, 25, 30, 5, 10],target = 25) == True\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 4, 6, 8, 10],target = 17) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59],target = 29) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1],target = 2) == True\n", "comparison": "exact"}, "public_tests": ["[2,5,6,0,0,1,2]\n0", "[2,5,6,0,0,1,2]\n3"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().search", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:29+00:00", "tests_total": 77, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def search(nums, target)", "container": null, "callable": "search", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 84, "task_id": "largest-rectangle-in-histogram", "difficulty": "Hard", "problem_description": "Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the area of the largest rectangle in the histogram.\n\nExample 1:\n\nInput: heights = [2,1,5,6,2,3]\nOutput: 10\nExplanation: The above is a histogram where width of each bar is 1.\nThe largest rectangle is shown in the red area, which has an area = 10 units.\n\nExample 2:\n\nInput: heights = [2,4]\nOutput: 4\n\nConstraints:\n\n- 1 <= heights.length <= 10^5\n- 0 <= heights[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(heights = [1]) == 1\n assert candidate(heights = [1, 0, 1, 0, 1]) == 1\n assert candidate(heights = [10000, 10000, 10000, 10000, 10000]) == 50000\n assert candidate(heights = [0]) == 0\n assert candidate(heights = [1, 2, 3, 4, 5]) == 9\n assert candidate(heights = [0, 1, 0, 1, 0]) == 1\n assert candidate(heights = [2, 1, 2]) == 3\n assert candidate(heights = [4, 2, 0, 3, 2, 5, 6, 0, 0, 1]) == 10\n assert candidate(heights = [3, 6, 5, 7, 4, 8, 1, 0]) == 20\n assert candidate(heights = [3]) == 3\n assert candidate(heights = [2, 4]) == 4\n assert candidate(heights = [10000, 10000, 10000, 10000]) == 40000\n assert candidate(heights = [3, 6, 5, 7, 4, 8, 1, 0, 9]) == 20\n assert candidate(heights = [0, 0, 0, 0, 0]) == 0\n assert candidate(heights = [0, 9, 0, 8, 0, 7, 0, 6, 0, 5, 0, 4, 0, 3, 0, 2, 0, 1]) == 9\n assert candidate(heights = [2, 1, 5, 6, 2, 3]) == 10\n assert candidate(heights = [3, 3, 3, 3, 3, 3, 3, 3, 3]) == 27\n assert candidate(heights = [1, 1, 1, 1, 1]) == 5\n assert candidate(heights = [5, 4, 3, 2, 1]) == 9\n assert candidate(heights = [3, 1, 3, 1, 3]) == 5\n assert candidate(heights = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 30\n assert candidate(heights = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) == 16\n assert candidate(heights = [10, 15, 10, 20, 25, 30, 20, 15, 10]) == 90\n assert candidate(heights = [5, 4, 3, 2, 1, 2, 3, 4, 5]) == 9\n assert candidate(heights = [1, 2, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1]) == 14\n assert candidate(heights = [1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1]) == 15\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 60\n assert candidate(heights = [3, 6, 5, 7, 4, 8, 1, 0, 2]) == 20\n assert candidate(heights = [5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5]) == 9\n assert candidate(heights = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(heights = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 30\n assert candidate(heights = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 25\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 30\n assert candidate(heights = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991]) == 99910\n assert candidate(heights = [3, 6, 5, 7, 4, 8, 1, 0, 2, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 55\n assert candidate(heights = [5, 2, 5, 2, 5, 2, 5, 2, 5, 2]) == 20\n assert candidate(heights = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 55\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 110\n assert candidate(heights = [6, 2, 5, 4, 5, 1, 6, 2, 3, 3, 2, 6, 5, 3, 2, 1]) == 18\n assert candidate(heights = [3, 6, 5, 7, 4, 8, 1, 0, 9, 2, 5, 6, 4, 3, 7, 8, 9, 10, 11, 12]) == 42\n assert candidate(heights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 113\n assert candidate(heights = [10, 20, 10, 30, 10, 40, 10, 50, 10, 60, 10]) == 110\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 66\n assert candidate(heights = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 27, 24, 21, 18, 15, 12, 9, 6, 3]) == 165\n assert candidate(heights = [10000, 0, 10000, 0, 10000, 0]) == 10000\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 55\n assert candidate(heights = [5, 3, 5, 6, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1]) == 28\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(heights = [1, 3, 2, 1, 5, 4, 2, 1]) == 8\n assert candidate(heights = [4, 2, 0, 3, 2, 5]) == 6\n assert candidate(heights = [100, 200, 300, 400, 300, 200, 100]) == 1000\n assert candidate(heights = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == 10\n assert candidate(heights = [1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1]) == 28\n assert candidate(heights = [6, 2, 5, 4, 5, 1, 6, 3]) == 12\n assert candidate(heights = [2, 1, 5, 6, 2, 3, 2, 1, 5, 6, 2, 3]) == 12\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 55\n assert candidate(heights = [2, 1, 5, 6, 2, 3, 1, 4, 2, 1]) == 10\n assert candidate(heights = [0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(heights = [4, 2, 0, 3, 2, 5, 3, 1]) == 8\n assert candidate(heights = [5, 5, 1, 5, 5]) == 10\n assert candidate(heights = [1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0]) == 10\n assert candidate(heights = [1, 3, 2, 1, 2, 3, 1]) == 7\n assert candidate(heights = [5, 6, 2, 8, 9, 1, 4, 3, 7, 10]) == 16\n assert candidate(heights = [5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5]) == 25\n assert candidate(heights = [5, 8, 6, 2, 7, 8, 5, 9, 5, 3, 8, 6, 7, 9, 5, 2, 8]) == 34\n assert candidate(heights = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(heights = [10000, 0, 10000, 0, 10000, 0, 10000, 0]) == 10000\n assert candidate(heights = [2, 1, 5, 6, 2, 3, 2, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(heights = [1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21]) == 66\n assert candidate(heights = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 21\n assert candidate(heights = [2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4]) == 40\n assert candidate(heights = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 18\n assert candidate(heights = [5, 4, 3, 2, 1, 1, 2, 3, 4, 5]) == 10\n assert candidate(heights = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 20\n assert candidate(heights = [1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(heights = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 25\n assert candidate(heights = [2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 26\n assert candidate(heights = [1, 3, 2, 1, 3, 2, 1]) == 7\n assert candidate(heights = [5, 5, 1, 7, 1, 1, 5, 2, 7, 6]) == 12\n assert candidate(heights = [5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5]) == 25\n assert candidate(heights = [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 25\n assert candidate(heights = [6, 2, 5, 4, 5, 1, 6]) == 12\n assert candidate(heights = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 21\n assert candidate(heights = [5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 55\n assert candidate(heights = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == 15\n assert candidate(heights = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(heights = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == 160\n assert candidate(heights = [1, 3, 2, 1, 2, 3, 1, 2, 3, 4, 3, 2, 1, 2, 3, 1]) == 16\n assert candidate(heights = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 21\n assert candidate(heights = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(heights = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]) == 5500\n assert candidate(heights = [1, 0, 0, 0, 1, 0, 0, 0, 1]) == 1\n assert candidate(heights = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 20\n assert candidate(heights = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 1\n assert candidate(heights = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 17\n assert candidate(heights = [2, 1, 3, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 2, 3, 2, 1, 2, 3, 2, 1]) == 28\n", "comparison": "exact"}, "public_tests": ["[2,1,5,6,2,3]", "[2,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["heights"], "leetcode_dataset_entry_point": "Solution().largestRectangleArea", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:35+00:00", "tests_total": 96, "tests_dropped": 0, "flags": ["figure_reference", "has_images"], "topic_tags": ["array", "stack", "monotonic-stack", "range-minimum-maximum-query"]}, "language": "ruby", "interface": {"raw_signature": "def largest_rectangle_area(heights)", "container": null, "callable": "largest_rectangle_area", "parameters": [{"name": "heights", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 85, "task_id": "maximal-rectangle", "difficulty": "Hard", "problem_description": "Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.\n\nExample 1:\n\nInput: matrix = [[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]\nOutput: 6\nExplanation: The maximal rectangle is shown in the above picture.\n\nExample 2:\n\nInput: matrix = [[\"0\"]]\nOutput: 0\n\nExample 3:\n\nInput: matrix = [[\"1\"]]\nOutput: 1\n\nConstraints:\n\n- rows == matrix.length\n- cols == matrix[i].length\n- 1 <= rows, cols <= 200\n- matrix[i][j] is '0' or '1'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [['1']]) == 1\n assert candidate(matrix = [['0', '1', '0', '1'], ['1', '0', '1', '0'], ['0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1'], ['1', '1']]) == 4\n assert candidate(matrix = [['0']]) == 0\n assert candidate(matrix = [['1', '1', '0', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['0', '0', '1', '1', '1']]) == 10\n assert candidate(matrix = [['0', '0', '0'], ['0', '0', '0']]) == 0\n assert candidate(matrix = [['1', '0', '1', '0', '0'], ['1', '0', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '1', '0']]) == 6\n assert candidate(matrix = [['1', '1', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1']]) == 16\n assert candidate(matrix = [['1', '0'], ['0', '1']]) == 1\n assert candidate(matrix = [['1', '0', '1'], ['0', '0', '1'], ['1', '0', '1']]) == 3\n assert candidate(matrix = [['1', '1', '1'], ['1', '1', '1'], ['1', '1', '1']]) == 9\n assert candidate(matrix = [['0', '0'], ['0', '0']]) == 0\n assert candidate(matrix = [['1', '1', '0', '1'], ['1', '1', '0', '1'], ['1', '1', '1', '1']]) == 6\n assert candidate(matrix = [['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '0', '0'], ['1', '1', '0', '0']]) == 8\n assert candidate(matrix = [['0', '1', '1', '0'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['0', '1', '1', '0']]) == 8\n assert candidate(matrix = [['1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '1', '0'], ['1', '1', '1', '1', '1']]) == 5\n assert candidate(matrix = [['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '0', '0', '1'], ['1', '0', '0', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1']]) == 8\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1']]) == 16\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 10\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '0', '1'], ['1', '0', '0', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 10\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 30\n assert candidate(matrix = [['0', '1', '0', '1'], ['1', '0', '1', '0'], ['0', '1', '0', '1'], ['1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '1', '0', '1'], ['1', '1', '1', '1'], ['0', '1', '1', '0'], ['1', '1', '1', '1'], ['1', '0', '1', '0']]) == 6\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 25\n assert candidate(matrix = [['1', '1', '0', '0'], ['1', '1', '0', '0'], ['0', '0', '1', '1'], ['0', '0', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '0', '0', '0', '0', '1', '1'], ['1', '1', '1', '1', '0', '0', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 16\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1']]) == 10\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1', '0', '0', '1'], ['1', '1', '1', '1', '1'], ['0', '1', '0', '1', '0'], ['1', '1', '1', '1', '1']]) == 5\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '0', '1'], ['1', '0', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1']]) == 6\n assert candidate(matrix = [['0', '0', '0', '0', '0', '0'], ['0', '1', '1', '1', '1', '0'], ['0', '1', '1', '1', '1', '0'], ['0', '1', '1', '1', '1', '0'], ['0', '0', '0', '0', '0', '0']]) == 12\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '0', '1'], ['1', '1', '1', '1', '1']]) == 12\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1']]) == 5\n assert candidate(matrix = [['1', '0', '0', '1', '1', '0', '1'], ['1', '0', '0', '1', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '1', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 10\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '0', '0', '1'], ['1', '1', '0', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 12\n assert candidate(matrix = [['1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1'], ['0', '1', '1', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1']]) == 6\n assert candidate(matrix = [['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1']]) == 10\n assert candidate(matrix = [['1', '1', '1', '1'], ['1', '1', '0', '1'], ['1', '1', '1', '1'], ['0', '1', '1', '1']]) == 6\n assert candidate(matrix = [['0', '1', '1', '1', '0'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['0', '1', '1', '1', '0']]) == 12\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 20\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1']]) == 5\n assert candidate(matrix = [['1', '1', '1'], ['1', '1', '1'], ['1', '1', '1'], ['0', '0', '0'], ['1', '1', '1'], ['1', '1', '1'], ['1', '1', '1']]) == 9\n assert candidate(matrix = [['0', '0', '0', '1', '0'], ['0', '0', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['0', '0', '0', '1', '0']]) == 6\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 7\n assert candidate(matrix = [['1', '1', '0', '0', '1'], ['1', '1', '0', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1']]) == 6\n assert candidate(matrix = [['1', '0', '0', '1', '0'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '1', '0']]) == 10\n assert candidate(matrix = [['0', '1', '1', '0'], ['1', '1', '1', '1'], ['0', '1', '1', '0'], ['1', '1', '1', '1']]) == 8\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '1', '1', '1']]) == 21\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '0', '0', '1', '1']]) == 12\n assert candidate(matrix = [['1', '0', '1', '1'], ['1', '1', '1', '1'], ['0', '1', '1', '1'], ['1', '0', '1', '1']]) == 8\n assert candidate(matrix = [['1', '0', '0', '1'], ['0', '0', '0', '0'], ['1', '0', '0', '1'], ['1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '0', '0'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '0', '0'], ['0', '0', '0', '0', '0']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 15\n assert candidate(matrix = [['1', '1', '1', '1'], ['1', '1', '0', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1']]) == 8\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0'], ['1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0']]) == 6\n assert candidate(matrix = [['0', '1', '1', '1', '0', '0', '1'], ['0', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '0', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1', '0']]) == 10\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '0', '0', '1', '1'], ['1', '1', '0', '0', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1']]) == 16\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['0', '0', '1', '1', '1'], ['0', '0', '1', '1', '1'], ['0', '0', '1', '1', '1']]) == 12\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '0', '0', '0', '1'], ['1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1'], ['1', '0', '0', '0', '1']]) == 4\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1']]) == 5\n assert candidate(matrix = [['0', '0', '0', '0'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['0', '0', '0', '0']]) == 8\n", "comparison": "exact"}, "public_tests": ["[[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]", "[[\"0\"]]", "[[\"1\"]]"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().maximalRectangle", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:38+00:00", "tests_total": 66, "tests_dropped": 0, "flags": ["figure_reference", "has_images"], "topic_tags": ["array", "dynamic-programming", "stack", "matrix", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def maximal_rectangle(matrix)", "container": null, "callable": "maximal_rectangle", "parameters": [{"name": "matrix", "type": "Character[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 87, "task_id": "scramble-string", "difficulty": "Hard", "problem_description": "We can scramble a string s to get a string t using the following algorithm:\n\n1. If the length of the string is 1, stop.\n2. If the length of the string is > 1, do the following:\n - Split the string into two non-empty substrings at a random index, i.e., if the string is s, divide it to x and y where s = x + y.\n - Randomly decide to swap the two substrings or to keep them in the same order. i.e., after this step, s may become s = x + y or s = y + x.\n - Apply step 1 recursively on each of the two substrings x and y.\n\nGiven two strings s1 and s2 of the same length, return true if s2 is a scrambled string of s1, otherwise, return false.\n\nExample 1:\n\nInput: s1 = \"great\", s2 = \"rgeat\"\nOutput: true\nExplanation: One possible scenario applied on s1 is:\n\"great\" --> \"gr/eat\" // divide at random index.\n\"gr/eat\" --> \"gr/eat\" // random decision is not to swap the two substrings and keep them in order.\n\"gr/eat\" --> \"g/r / e/at\" // apply the same algorithm recursively on both substrings. divide at random index each of them.\n\"g/r / e/at\" --> \"r/g / e/at\" // random decision was to swap the first substring and to keep the second substring in the same order.\n\"r/g / e/at\" --> \"r/g / e/ a/t\" // again apply the algorithm recursively, divide \"at\" to \"a/t\".\n\"r/g / e/ a/t\" --> \"r/g / e/ a/t\" // random decision is to keep both substrings in the same order.\nThe algorithm stops now, and the result string is \"rgeat\" which is s2.\nAs one possible scenario led s1 to be scrambled to s2, we return true.\n\nExample 2:\n\nInput: s1 = \"abcde\", s2 = \"caebd\"\nOutput: false\n\nExample 3:\n\nInput: s1 = \"a\", s2 = \"a\"\nOutput: true\n\nConstraints:\n\n- s1.length == s2.length\n- 1 <= s1.length <= 30\n- s1 and s2 consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s1 = \"abcdefghij\",s2 = \"ihgfedcbaj\") == True\n assert candidate(s1 = \"noon\",s2 = \"onon\") == True\n assert candidate(s1 = \"abc\",s2 = \"cab\") == True\n assert candidate(s1 = \"abcdefghijklmnop\",s2 = \"ponmlkjihgfedcba\") == True\n assert candidate(s1 = \"abcde\",s2 = \"caebd\") == False\n assert candidate(s1 = \"abcdefghijk\",s2 = \"abcdefghijk\") == True\n assert candidate(s1 = \"abc\",s2 = \"bca\") == True\n assert candidate(s1 = \"abcdefgh\",s2 = \"hgfedcba\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"ijabcdefgh\") == True\n assert candidate(s1 = \"ab\",s2 = \"ba\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"jihgfedcba\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"abcabc\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"ccbbaa\") == True\n assert candidate(s1 = \"great\",s2 = \"rgeat\") == True\n assert candidate(s1 = \"abcd\",s2 = \"abcd\") == True\n assert candidate(s1 = \"abcd\",s2 = \"bdac\") == False\n assert candidate(s1 = \"hello\",s2 = \"lohel\") == True\n assert candidate(s1 = \"abcd\",s2 = \"dcba\") == True\n assert candidate(s1 = \"aabb\",s2 = \"baba\") == True\n assert candidate(s1 = \"abcdefgh\",s2 = \"efghabcd\") == True\n assert candidate(s1 = \"eebaacb\",s2 = \"aceebbb\") == False\n assert candidate(s1 = \"xstjzkfpqczbdy\",s2 = \"bdyxzcqpzkjfst\") == True\n assert candidate(s1 = \"hello\",s2 = \"olelh\") == True\n assert candidate(s1 = \"xyzz\",s2 = \"zzyx\") == True\n assert candidate(s1 = \"xyz\",s2 = \"zyx\") == True\n assert candidate(s1 = \"abcdefg\",s2 = \"efgabcd\") == True\n assert candidate(s1 = \"abcdefghijk\",s2 = \"kabcdefghij\") == True\n assert candidate(s1 = \"a\",s2 = \"a\") == True\n assert candidate(s1 = \"algorithm\",s2 = \"logarithm\") == True\n assert candidate(s1 = \"abcdabcd\",s2 = \"ddddcccc\") == False\n assert candidate(s1 = \"abcdexyz\",s2 = \"zyxdecba\") == True\n assert candidate(s1 = \"abcdxyz\",s2 = \"yzabcdx\") == True\n assert candidate(s1 = \"recursion\",s2 = \"rursiicno\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"jihgfecdba\") == True\n assert candidate(s1 = \"abcdefgh\",s2 = \"abcdghfe\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"abijhgfedc\") == True\n assert candidate(s1 = \"xylophone\",s2 = \"eponhloxy\") == True\n assert candidate(s1 = \"abcdefg\",s2 = \"gfedcba\") == True\n assert candidate(s1 = \"scramble\",s2 = \"elmacrbs\") == True\n assert candidate(s1 = \"interview\",s2 = \"wetneivrt\") == False\n assert candidate(s1 = \"abababab\",s2 = \"babababa\") == True\n assert candidate(s1 = \"abcdefgh\",s2 = \"ghfedcba\") == True\n assert candidate(s1 = \"abcdexyz\",s2 = \"xyzexbcd\") == False\n assert candidate(s1 = \"abcdefgh\",s2 = \"cdabefgh\") == True\n assert candidate(s1 = \"qwertyuiop\",s2 = \"yuiopqwert\") == True\n assert candidate(s1 = \"intention\",s2 = \"tennotiin\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"jihgfedabc\") == True\n assert candidate(s1 = \"abcd\",s2 = \"cdab\") == True\n assert candidate(s1 = \"scramble\",s2 = \"melbrcsa\") == True\n assert candidate(s1 = \"abcdexyz\",s2 = \"xyzabcde\") == True\n assert candidate(s1 = \"algorithm\",s2 = \"rhtaglmoi\") == False\n assert candidate(s1 = \"optimization\",s2 = \"tivioonpmzas\") == False\n assert candidate(s1 = \"interview\",s2 = \"ewrotnive\") == False\n assert candidate(s1 = \"programming\",s2 = \"gnimmargorp\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"efghabcdij\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"abcdjihgfe\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"fedcbaighj\") == True\n assert candidate(s1 = \"waterbottle\",s2 = \"elbottlewat\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"ghfedcbaab\") == False\n assert candidate(s1 = \"scramble\",s2 = \"leacrbms\") == True\n assert candidate(s1 = \"scramble\",s2 = \"rscmable\") == True\n assert candidate(s1 = \"algorithm\",s2 = \"rhtlgmaoi\") == False\n assert candidate(s1 = \"abcdefghijk\",s2 = \"efghijkabcd\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"ihgfedcbaa\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"hgfedcbaij\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"abcdghfjie\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"abcdefghij\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"ihgfjedcba\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"ijklabefgh\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"ghijefabcd\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"ihgfjklmno\") == False\n assert candidate(s1 = \"interview\",s2 = \"reterivne\") == False\n assert candidate(s1 = \"python\",s2 = \"nohtyp\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"bcdefghiaj\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"cdabefghij\") == True\n assert candidate(s1 = \"abcdabcd\",s2 = \"dcbacabd\") == True\n assert candidate(s1 = \"scramble\",s2 = \"blecrmas\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"cbadefghij\") == True\n assert candidate(s1 = \"optimization\",s2 = \"nizationopti\") == False\n assert candidate(s1 = \"intvw\",s2 = \"nvtiw\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"cdefghijab\") == True\n assert candidate(s1 = \"intervw\",s2 = \"wvnreit\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"efghijabcd\") == True\n assert candidate(s1 = \"optimization\",s2 = \"nizaitpmosio\") == False\n assert candidate(s1 = \"algorithm\",s2 = \"rhtgmialo\") == False\n assert candidate(s1 = \"interview\",s2 = \"terviewin\") == True\n assert candidate(s1 = \"abcdabcd\",s2 = \"abcdabcd\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"jabcdefghi\") == True\n assert candidate(s1 = \"abcdefghijk\",s2 = \"kjiabcdefgh\") == True\n assert candidate(s1 = \"abab\",s2 = \"baba\") == True\n assert candidate(s1 = \"scramble\",s2 = \"melcarbs\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"fghebacijd\") == False\n assert candidate(s1 = \"scramble\",s2 = \"ercmsbal\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"cbadefghji\") == True\n assert candidate(s1 = \"introduction\",s2 = \"ntrioduicton\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"abjihgfedc\") == True\n assert candidate(s1 = \"recursion\",s2 = \"insrucero\") == False\n", "comparison": "exact"}, "public_tests": ["\"great\"\n\"rgeat\"", "\"abcde\"\n\"caebd\"", "\"a\"\n\"a\""], "hints": [], "metadata": {"canonical_parameter_names": ["s1", "s2"], "leetcode_dataset_entry_point": "Solution().isScramble", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:42+00:00", "tests_total": 109, "tests_dropped": 12, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def is_scramble(s1, s2)", "container": null, "callable": "is_scramble", "parameters": [{"name": "s1", "type": "String"}, {"name": "s2", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 89, "task_id": "gray-code", "difficulty": "Medium", "problem_description": "An n-bit gray code sequence is a sequence of 2^n integers where:\n\n- Every integer is in the inclusive range [0, 2^n - 1],\n- The first integer is 0,\n- An integer appears no more than once in the sequence,\n- The binary representation of every pair of adjacent integers differs by exactly one bit, and\n- The binary representation of the first and last integers differs by exactly one bit.\n\nGiven an integer n, return any valid n-bit gray code sequence.\n\nExample 1:\n\nInput: n = 2\nOutput: [0,1,3,2]\nExplanation:\nThe binary representation of [0,1,3,2] is [00,01,11,10].\n- 00 and 01 differ by one bit\n- 01 and 11 differ by one bit\n- 11 and 10 differ by one bit\n- 10 and 00 differ by one bit\n[0,2,3,1] is also a valid gray code sequence, whose binary representation is [00,10,11,01].\n- 00 and 10 differ by one bit\n- 10 and 11 differ by one bit\n- 11 and 01 differ by one bit\n- 01 and 00 differ by one bit\n\nExample 2:\n\nInput: n = 1\nOutput: [0,1]\n\nConstraints:\n\n- 1 <= n <= 16\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == [0, 1, 3, 2, 6, 7, 5, 4]\n assert candidate(n = 4) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8]\n assert candidate(n = 2) == [0, 1, 3, 2]\n assert candidate(n = 1) == [0, 1]\n assert candidate(n = 10) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110, 106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81, 83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76, 68, 69, 71, 70, 66, 67, 65, 64, 192, 193, 195, 194, 198, 199, 197, 196, 204, 205, 207, 206, 202, 203, 201, 200, 216, 217, 219, 218, 222, 223, 221, 220, 212, 213, 215, 214, 210, 211, 209, 208, 240, 241, 243, 242, 246, 247, 245, 244, 252, 253, 255, 254, 250, 251, 249, 248, 232, 233, 235, 234, 238, 239, 237, 236, 228, 229, 231, 230, 226, 227, 225, 224, 160, 161, 163, 162, 166, 167, 165, 164, 172, 173, 175, 174, 170, 171, 169, 168, 184, 185, 187, 186, 190, 191, 189, 188, 180, 181, 183, 182, 178, 179, 177, 176, 144, 145, 147, 146, 150, 151, 149, 148, 156, 157, 159, 158, 154, 155, 153, 152, 136, 137, 139, 138, 142, 143, 141, 140, 132, 133, 135, 134, 130, 131, 129, 128, 384, 385, 387, 386, 390, 391, 389, 388, 396, 397, 399, 398, 394, 395, 393, 392, 408, 409, 411, 410, 414, 415, 413, 412, 404, 405, 407, 406, 402, 403, 401, 400, 432, 433, 435, 434, 438, 439, 437, 436, 444, 445, 447, 446, 442, 443, 441, 440, 424, 425, 427, 426, 430, 431, 429, 428, 420, 421, 423, 422, 418, 419, 417, 416, 480, 481, 483, 482, 486, 487, 485, 484, 492, 493, 495, 494, 490, 491, 489, 488, 504, 505, 507, 506, 510, 511, 509, 508, 500, 501, 503, 502, 498, 499, 497, 496, 464, 465, 467, 466, 470, 471, 469, 468, 476, 477, 479, 478, 474, 475, 473, 472, 456, 457, 459, 458, 462, 463, 461, 460, 452, 453, 455, 454, 450, 451, 449, 448, 320, 321, 323, 322, 326, 327, 325, 324, 332, 333, 335, 334, 330, 331, 329, 328, 344, 345, 347, 346, 350, 351, 349, 348, 340, 341, 343, 342, 338, 339, 337, 336, 368, 369, 371, 370, 374, 375, 373, 372, 380, 381, 383, 382, 378, 379, 377, 376, 360, 361, 363, 362, 366, 367, 365, 364, 356, 357, 359, 358, 354, 355, 353, 352, 288, 289, 291, 290, 294, 295, 293, 292, 300, 301, 303, 302, 298, 299, 297, 296, 312, 313, 315, 314, 318, 319, 317, 316, 308, 309, 311, 310, 306, 307, 305, 304, 272, 273, 275, 274, 278, 279, 277, 276, 284, 285, 287, 286, 282, 283, 281, 280, 264, 265, 267, 266, 270, 271, 269, 268, 260, 261, 263, 262, 258, 259, 257, 256, 768, 769, 771, 770, 774, 775, 773, 772, 780, 781, 783, 782, 778, 779, 777, 776, 792, 793, 795, 794, 798, 799, 797, 796, 788, 789, 791, 790, 786, 787, 785, 784, 816, 817, 819, 818, 822, 823, 821, 820, 828, 829, 831, 830, 826, 827, 825, 824, 808, 809, 811, 810, 814, 815, 813, 812, 804, 805, 807, 806, 802, 803, 801, 800, 864, 865, 867, 866, 870, 871, 869, 868, 876, 877, 879, 878, 874, 875, 873, 872, 888, 889, 891, 890, 894, 895, 893, 892, 884, 885, 887, 886, 882, 883, 881, 880, 848, 849, 851, 850, 854, 855, 853, 852, 860, 861, 863, 862, 858, 859, 857, 856, 840, 841, 843, 842, 846, 847, 845, 844, 836, 837, 839, 838, 834, 835, 833, 832, 960, 961, 963, 962, 966, 967, 965, 964, 972, 973, 975, 974, 970, 971, 969, 968, 984, 985, 987, 986, 990, 991, 989, 988, 980, 981, 983, 982, 978, 979, 977, 976, 1008, 1009, 1011, 1010, 1014, 1015, 1013, 1012, 1020, 1021, 1023, 1022, 1018, 1019, 1017, 1016, 1000, 1001, 1003, 1002, 1006, 1007, 1005, 1004, 996, 997, 999, 998, 994, 995, 993, 992, 928, 929, 931, 930, 934, 935, 933, 932, 940, 941, 943, 942, 938, 939, 937, 936, 952, 953, 955, 954, 958, 959, 957, 956, 948, 949, 951, 950, 946, 947, 945, 944, 912, 913, 915, 914, 918, 919, 917, 916, 924, 925, 927, 926, 922, 923, 921, 920, 904, 905, 907, 906, 910, 911, 909, 908, 900, 901, 903, 902, 898, 899, 897, 896, 640, 641, 643, 642, 646, 647, 645, 644, 652, 653, 655, 654, 650, 651, 649, 648, 664, 665, 667, 666, 670, 671, 669, 668, 660, 661, 663, 662, 658, 659, 657, 656, 688, 689, 691, 690, 694, 695, 693, 692, 700, 701, 703, 702, 698, 699, 697, 696, 680, 681, 683, 682, 686, 687, 685, 684, 676, 677, 679, 678, 674, 675, 673, 672, 736, 737, 739, 738, 742, 743, 741, 740, 748, 749, 751, 750, 746, 747, 745, 744, 760, 761, 763, 762, 766, 767, 765, 764, 756, 757, 759, 758, 754, 755, 753, 752, 720, 721, 723, 722, 726, 727, 725, 724, 732, 733, 735, 734, 730, 731, 729, 728, 712, 713, 715, 714, 718, 719, 717, 716, 708, 709, 711, 710, 706, 707, 705, 704, 576, 577, 579, 578, 582, 583, 581, 580, 588, 589, 591, 590, 586, 587, 585, 584, 600, 601, 603, 602, 606, 607, 605, 604, 596, 597, 599, 598, 594, 595, 593, 592, 624, 625, 627, 626, 630, 631, 629, 628, 636, 637, 639, 638, 634, 635, 633, 632, 616, 617, 619, 618, 622, 623, 621, 620, 612, 613, 615, 614, 610, 611, 609, 608, 544, 545, 547, 546, 550, 551, 549, 548, 556, 557, 559, 558, 554, 555, 553, 552, 568, 569, 571, 570, 574, 575, 573, 572, 564, 565, 567, 566, 562, 563, 561, 560, 528, 529, 531, 530, 534, 535, 533, 532, 540, 541, 543, 542, 538, 539, 537, 536, 520, 521, 523, 522, 526, 527, 525, 524, 516, 517, 519, 518, 514, 515, 513, 512]\n assert candidate(n = 5) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16]\n assert candidate(n = 8) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110, 106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81, 83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76, 68, 69, 71, 70, 66, 67, 65, 64, 192, 193, 195, 194, 198, 199, 197, 196, 204, 205, 207, 206, 202, 203, 201, 200, 216, 217, 219, 218, 222, 223, 221, 220, 212, 213, 215, 214, 210, 211, 209, 208, 240, 241, 243, 242, 246, 247, 245, 244, 252, 253, 255, 254, 250, 251, 249, 248, 232, 233, 235, 234, 238, 239, 237, 236, 228, 229, 231, 230, 226, 227, 225, 224, 160, 161, 163, 162, 166, 167, 165, 164, 172, 173, 175, 174, 170, 171, 169, 168, 184, 185, 187, 186, 190, 191, 189, 188, 180, 181, 183, 182, 178, 179, 177, 176, 144, 145, 147, 146, 150, 151, 149, 148, 156, 157, 159, 158, 154, 155, 153, 152, 136, 137, 139, 138, 142, 143, 141, 140, 132, 133, 135, 134, 130, 131, 129, 128]\n assert candidate(n = 11) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110, 106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81, 83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76, 68, 69, 71, 70, 66, 67, 65, 64, 192, 193, 195, 194, 198, 199, 197, 196, 204, 205, 207, 206, 202, 203, 201, 200, 216, 217, 219, 218, 222, 223, 221, 220, 212, 213, 215, 214, 210, 211, 209, 208, 240, 241, 243, 242, 246, 247, 245, 244, 252, 253, 255, 254, 250, 251, 249, 248, 232, 233, 235, 234, 238, 239, 237, 236, 228, 229, 231, 230, 226, 227, 225, 224, 160, 161, 163, 162, 166, 167, 165, 164, 172, 173, 175, 174, 170, 171, 169, 168, 184, 185, 187, 186, 190, 191, 189, 188, 180, 181, 183, 182, 178, 179, 177, 176, 144, 145, 147, 146, 150, 151, 149, 148, 156, 157, 159, 158, 154, 155, 153, 152, 136, 137, 139, 138, 142, 143, 141, 140, 132, 133, 135, 134, 130, 131, 129, 128, 384, 385, 387, 386, 390, 391, 389, 388, 396, 397, 399, 398, 394, 395, 393, 392, 408, 409, 411, 410, 414, 415, 413, 412, 404, 405, 407, 406, 402, 403, 401, 400, 432, 433, 435, 434, 438, 439, 437, 436, 444, 445, 447, 446, 442, 443, 441, 440, 424, 425, 427, 426, 430, 431, 429, 428, 420, 421, 423, 422, 418, 419, 417, 416, 480, 481, 483, 482, 486, 487, 485, 484, 492, 493, 495, 494, 490, 491, 489, 488, 504, 505, 507, 506, 510, 511, 509, 508, 500, 501, 503, 502, 498, 499, 497, 496, 464, 465, 467, 466, 470, 471, 469, 468, 476, 477, 479, 478, 474, 475, 473, 472, 456, 457, 459, 458, 462, 463, 461, 460, 452, 453, 455, 454, 450, 451, 449, 448, 320, 321, 323, 322, 326, 327, 325, 324, 332, 333, 335, 334, 330, 331, 329, 328, 344, 345, 347, 346, 350, 351, 349, 348, 340, 341, 343, 342, 338, 339, 337, 336, 368, 369, 371, 370, 374, 375, 373, 372, 380, 381, 383, 382, 378, 379, 377, 376, 360, 361, 363, 362, 366, 367, 365, 364, 356, 357, 359, 358, 354, 355, 353, 352, 288, 289, 291, 290, 294, 295, 293, 292, 300, 301, 303, 302, 298, 299, 297, 296, 312, 313, 315, 314, 318, 319, 317, 316, 308, 309, 311, 310, 306, 307, 305, 304, 272, 273, 275, 274, 278, 279, 277, 276, 284, 285, 287, 286, 282, 283, 281, 280, 264, 265, 267, 266, 270, 271, 269, 268, 260, 261, 263, 262, 258, 259, 257, 256, 768, 769, 771, 770, 774, 775, 773, 772, 780, 781, 783, 782, 778, 779, 777, 776, 792, 793, 795, 794, 798, 799, 797, 796, 788, 789, 791, 790, 786, 787, 785, 784, 816, 817, 819, 818, 822, 823, 821, 820, 828, 829, 831, 830, 826, 827, 825, 824, 808, 809, 811, 810, 814, 815, 813, 812, 804, 805, 807, 806, 802, 803, 801, 800, 864, 865, 867, 866, 870, 871, 869, 868, 876, 877, 879, 878, 874, 875, 873, 872, 888, 889, 891, 890, 894, 895, 893, 892, 884, 885, 887, 886, 882, 883, 881, 880, 848, 849, 851, 850, 854, 855, 853, 852, 860, 861, 863, 862, 858, 859, 857, 856, 840, 841, 843, 842, 846, 847, 845, 844, 836, 837, 839, 838, 834, 835, 833, 832, 960, 961, 963, 962, 966, 967, 965, 964, 972, 973, 975, 974, 970, 971, 969, 968, 984, 985, 987, 986, 990, 991, 989, 988, 980, 981, 983, 982, 978, 979, 977, 976, 1008, 1009, 1011, 1010, 1014, 1015, 1013, 1012, 1020, 1021, 1023, 1022, 1018, 1019, 1017, 1016, 1000, 1001, 1003, 1002, 1006, 1007, 1005, 1004, 996, 997, 999, 998, 994, 995, 993, 992, 928, 929, 931, 930, 934, 935, 933, 932, 940, 941, 943, 942, 938, 939, 937, 936, 952, 953, 955, 954, 958, 959, 957, 956, 948, 949, 951, 950, 946, 947, 945, 944, 912, 913, 915, 914, 918, 919, 917, 916, 924, 925, 927, 926, 922, 923, 921, 920, 904, 905, 907, 906, 910, 911, 909, 908, 900, 901, 903, 902, 898, 899, 897, 896, 640, 641, 643, 642, 646, 647, 645, 644, 652, 653, 655, 654, 650, 651, 649, 648, 664, 665, 667, 666, 670, 671, 669, 668, 660, 661, 663, 662, 658, 659, 657, 656, 688, 689, 691, 690, 694, 695, 693, 692, 700, 701, 703, 702, 698, 699, 697, 696, 680, 681, 683, 682, 686, 687, 685, 684, 676, 677, 679, 678, 674, 675, 673, 672, 736, 737, 739, 738, 742, 743, 741, 740, 748, 749, 751, 750, 746, 747, 745, 744, 760, 761, 763, 762, 766, 767, 765, 764, 756, 757, 759, 758, 754, 755, 753, 752, 720, 721, 723, 722, 726, 727, 725, 724, 732, 733, 735, 734, 730, 731, 729, 728, 712, 713, 715, 714, 718, 719, 717, 716, 708, 709, 711, 710, 706, 707, 705, 704, 576, 577, 579, 578, 582, 583, 581, 580, 588, 589, 591, 590, 586, 587, 585, 584, 600, 601, 603, 602, 606, 607, 605, 604, 596, 597, 599, 598, 594, 595, 593, 592, 624, 625, 627, 626, 630, 631, 629, 628, 636, 637, 639, 638, 634, 635, 633, 632, 616, 617, 619, 618, 622, 623, 621, 620, 612, 613, 615, 614, 610, 611, 609, 608, 544, 545, 547, 546, 550, 551, 549, 548, 556, 557, 559, 558, 554, 555, 553, 552, 568, 569, 571, 570, 574, 575, 573, 572, 564, 565, 567, 566, 562, 563, 561, 560, 528, 529, 531, 530, 534, 535, 533, 532, 540, 541, 543, 542, 538, 539, 537, 536, 520, 521, 523, 522, 526, 527, 525, 524, 516, 517, 519, 518, 514, 515, 513, 512, 1536, 1537, 1539, 1538, 1542, 1543, 1541, 1540, 1548, 1549, 1551, 1550, 1546, 1547, 1545, 1544, 1560, 1561, 1563, 1562, 1566, 1567, 1565, 1564, 1556, 1557, 1559, 1558, 1554, 1555, 1553, 1552, 1584, 1585, 1587, 1586, 1590, 1591, 1589, 1588, 1596, 1597, 1599, 1598, 1594, 1595, 1593, 1592, 1576, 1577, 1579, 1578, 1582, 1583, 1581, 1580, 1572, 1573, 1575, 1574, 1570, 1571, 1569, 1568, 1632, 1633, 1635, 1634, 1638, 1639, 1637, 1636, 1644, 1645, 1647, 1646, 1642, 1643, 1641, 1640, 1656, 1657, 1659, 1658, 1662, 1663, 1661, 1660, 1652, 1653, 1655, 1654, 1650, 1651, 1649, 1648, 1616, 1617, 1619, 1618, 1622, 1623, 1621, 1620, 1628, 1629, 1631, 1630, 1626, 1627, 1625, 1624, 1608, 1609, 1611, 1610, 1614, 1615, 1613, 1612, 1604, 1605, 1607, 1606, 1602, 1603, 1601, 1600, 1728, 1729, 1731, 1730, 1734, 1735, 1733, 1732, 1740, 1741, 1743, 1742, 1738, 1739, 1737, 1736, 1752, 1753, 1755, 1754, 1758, 1759, 1757, 1756, 1748, 1749, 1751, 1750, 1746, 1747, 1745, 1744, 1776, 1777, 1779, 1778, 1782, 1783, 1781, 1780, 1788, 1789, 1791, 1790, 1786, 1787, 1785, 1784, 1768, 1769, 1771, 1770, 1774, 1775, 1773, 1772, 1764, 1765, 1767, 1766, 1762, 1763, 1761, 1760, 1696, 1697, 1699, 1698, 1702, 1703, 1701, 1700, 1708, 1709, 1711, 1710, 1706, 1707, 1705, 1704, 1720, 1721, 1723, 1722, 1726, 1727, 1725, 1724, 1716, 1717, 1719, 1718, 1714, 1715, 1713, 1712, 1680, 1681, 1683, 1682, 1686, 1687, 1685, 1684, 1692, 1693, 1695, 1694, 1690, 1691, 1689, 1688, 1672, 1673, 1675, 1674, 1678, 1679, 1677, 1676, 1668, 1669, 1671, 1670, 1666, 1667, 1665, 1664, 1920, 1921, 1923, 1922, 1926, 1927, 1925, 1924, 1932, 1933, 1935, 1934, 1930, 1931, 1929, 1928, 1944, 1945, 1947, 1946, 1950, 1951, 1949, 1948, 1940, 1941, 1943, 1942, 1938, 1939, 1937, 1936, 1968, 1969, 1971, 1970, 1974, 1975, 1973, 1972, 1980, 1981, 1983, 1982, 1978, 1979, 1977, 1976, 1960, 1961, 1963, 1962, 1966, 1967, 1965, 1964, 1956, 1957, 1959, 1958, 1954, 1955, 1953, 1952, 2016, 2017, 2019, 2018, 2022, 2023, 2021, 2020, 2028, 2029, 2031, 2030, 2026, 2027, 2025, 2024, 2040, 2041, 2043, 2042, 2046, 2047, 2045, 2044, 2036, 2037, 2039, 2038, 2034, 2035, 2033, 2032, 2000, 2001, 2003, 2002, 2006, 2007, 2005, 2004, 2012, 2013, 2015, 2014, 2010, 2011, 2009, 2008, 1992, 1993, 1995, 1994, 1998, 1999, 1997, 1996, 1988, 1989, 1991, 1990, 1986, 1987, 1985, 1984, 1856, 1857, 1859, 1858, 1862, 1863, 1861, 1860, 1868, 1869, 1871, 1870, 1866, 1867, 1865, 1864, 1880, 1881, 1883, 1882, 1886, 1887, 1885, 1884, 1876, 1877, 1879, 1878, 1874, 1875, 1873, 1872, 1904, 1905, 1907, 1906, 1910, 1911, 1909, 1908, 1916, 1917, 1919, 1918, 1914, 1915, 1913, 1912, 1896, 1897, 1899, 1898, 1902, 1903, 1901, 1900, 1892, 1893, 1895, 1894, 1890, 1891, 1889, 1888, 1824, 1825, 1827, 1826, 1830, 1831, 1829, 1828, 1836, 1837, 1839, 1838, 1834, 1835, 1833, 1832, 1848, 1849, 1851, 1850, 1854, 1855, 1853, 1852, 1844, 1845, 1847, 1846, 1842, 1843, 1841, 1840, 1808, 1809, 1811, 1810, 1814, 1815, 1813, 1812, 1820, 1821, 1823, 1822, 1818, 1819, 1817, 1816, 1800, 1801, 1803, 1802, 1806, 1807, 1805, 1804, 1796, 1797, 1799, 1798, 1794, 1795, 1793, 1792, 1280, 1281, 1283, 1282, 1286, 1287, 1285, 1284, 1292, 1293, 1295, 1294, 1290, 1291, 1289, 1288, 1304, 1305, 1307, 1306, 1310, 1311, 1309, 1308, 1300, 1301, 1303, 1302, 1298, 1299, 1297, 1296, 1328, 1329, 1331, 1330, 1334, 1335, 1333, 1332, 1340, 1341, 1343, 1342, 1338, 1339, 1337, 1336, 1320, 1321, 1323, 1322, 1326, 1327, 1325, 1324, 1316, 1317, 1319, 1318, 1314, 1315, 1313, 1312, 1376, 1377, 1379, 1378, 1382, 1383, 1381, 1380, 1388, 1389, 1391, 1390, 1386, 1387, 1385, 1384, 1400, 1401, 1403, 1402, 1406, 1407, 1405, 1404, 1396, 1397, 1399, 1398, 1394, 1395, 1393, 1392, 1360, 1361, 1363, 1362, 1366, 1367, 1365, 1364, 1372, 1373, 1375, 1374, 1370, 1371, 1369, 1368, 1352, 1353, 1355, 1354, 1358, 1359, 1357, 1356, 1348, 1349, 1351, 1350, 1346, 1347, 1345, 1344, 1472, 1473, 1475, 1474, 1478, 1479, 1477, 1476, 1484, 1485, 1487, 1486, 1482, 1483, 1481, 1480, 1496, 1497, 1499, 1498, 1502, 1503, 1501, 1500, 1492, 1493, 1495, 1494, 1490, 1491, 1489, 1488, 1520, 1521, 1523, 1522, 1526, 1527, 1525, 1524, 1532, 1533, 1535, 1534, 1530, 1531, 1529, 1528, 1512, 1513, 1515, 1514, 1518, 1519, 1517, 1516, 1508, 1509, 1511, 1510, 1506, 1507, 1505, 1504, 1440, 1441, 1443, 1442, 1446, 1447, 1445, 1444, 1452, 1453, 1455, 1454, 1450, 1451, 1449, 1448, 1464, 1465, 1467, 1466, 1470, 1471, 1469, 1468, 1460, 1461, 1463, 1462, 1458, 1459, 1457, 1456, 1424, 1425, 1427, 1426, 1430, 1431, 1429, 1428, 1436, 1437, 1439, 1438, 1434, 1435, 1433, 1432, 1416, 1417, 1419, 1418, 1422, 1423, 1421, 1420, 1412, 1413, 1415, 1414, 1410, 1411, 1409, 1408, 1152, 1153, 1155, 1154, 1158, 1159, 1157, 1156, 1164, 1165, 1167, 1166, 1162, 1163, 1161, 1160, 1176, 1177, 1179, 1178, 1182, 1183, 1181, 1180, 1172, 1173, 1175, 1174, 1170, 1171, 1169, 1168, 1200, 1201, 1203, 1202, 1206, 1207, 1205, 1204, 1212, 1213, 1215, 1214, 1210, 1211, 1209, 1208, 1192, 1193, 1195, 1194, 1198, 1199, 1197, 1196, 1188, 1189, 1191, 1190, 1186, 1187, 1185, 1184, 1248, 1249, 1251, 1250, 1254, 1255, 1253, 1252, 1260, 1261, 1263, 1262, 1258, 1259, 1257, 1256, 1272, 1273, 1275, 1274, 1278, 1279, 1277, 1276, 1268, 1269, 1271, 1270, 1266, 1267, 1265, 1264, 1232, 1233, 1235, 1234, 1238, 1239, 1237, 1236, 1244, 1245, 1247, 1246, 1242, 1243, 1241, 1240, 1224, 1225, 1227, 1226, 1230, 1231, 1229, 1228, 1220, 1221, 1223, 1222, 1218, 1219, 1217, 1216, 1088, 1089, 1091, 1090, 1094, 1095, 1093, 1092, 1100, 1101, 1103, 1102, 1098, 1099, 1097, 1096, 1112, 1113, 1115, 1114, 1118, 1119, 1117, 1116, 1108, 1109, 1111, 1110, 1106, 1107, 1105, 1104, 1136, 1137, 1139, 1138, 1142, 1143, 1141, 1140, 1148, 1149, 1151, 1150, 1146, 1147, 1145, 1144, 1128, 1129, 1131, 1130, 1134, 1135, 1133, 1132, 1124, 1125, 1127, 1126, 1122, 1123, 1121, 1120, 1056, 1057, 1059, 1058, 1062, 1063, 1061, 1060, 1068, 1069, 1071, 1070, 1066, 1067, 1065, 1064, 1080, 1081, 1083, 1082, 1086, 1087, 1085, 1084, 1076, 1077, 1079, 1078, 1074, 1075, 1073, 1072, 1040, 1041, 1043, 1042, 1046, 1047, 1045, 1044, 1052, 1053, 1055, 1054, 1050, 1051, 1049, 1048, 1032, 1033, 1035, 1034, 1038, 1039, 1037, 1036, 1028, 1029, 1031, 1030, 1026, 1027, 1025, 1024]\n assert candidate(n = 12) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110, 106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81, 83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76, 68, 69, 71, 70, 66, 67, 65, 64, 192, 193, 195, 194, 198, 199, 197, 196, 204, 205, 207, 206, 202, 203, 201, 200, 216, 217, 219, 218, 222, 223, 221, 220, 212, 213, 215, 214, 210, 211, 209, 208, 240, 241, 243, 242, 246, 247, 245, 244, 252, 253, 255, 254, 250, 251, 249, 248, 232, 233, 235, 234, 238, 239, 237, 236, 228, 229, 231, 230, 226, 227, 225, 224, 160, 161, 163, 162, 166, 167, 165, 164, 172, 173, 175, 174, 170, 171, 169, 168, 184, 185, 187, 186, 190, 191, 189, 188, 180, 181, 183, 182, 178, 179, 177, 176, 144, 145, 147, 146, 150, 151, 149, 148, 156, 157, 159, 158, 154, 155, 153, 152, 136, 137, 139, 138, 142, 143, 141, 140, 132, 133, 135, 134, 130, 131, 129, 128, 384, 385, 387, 386, 390, 391, 389, 388, 396, 397, 399, 398, 394, 395, 393, 392, 408, 409, 411, 410, 414, 415, 413, 412, 404, 405, 407, 406, 402, 403, 401, 400, 432, 433, 435, 434, 438, 439, 437, 436, 444, 445, 447, 446, 442, 443, 441, 440, 424, 425, 427, 426, 430, 431, 429, 428, 420, 421, 423, 422, 418, 419, 417, 416, 480, 481, 483, 482, 486, 487, 485, 484, 492, 493, 495, 494, 490, 491, 489, 488, 504, 505, 507, 506, 510, 511, 509, 508, 500, 501, 503, 502, 498, 499, 497, 496, 464, 465, 467, 466, 470, 471, 469, 468, 476, 477, 479, 478, 474, 475, 473, 472, 456, 457, 459, 458, 462, 463, 461, 460, 452, 453, 455, 454, 450, 451, 449, 448, 320, 321, 323, 322, 326, 327, 325, 324, 332, 333, 335, 334, 330, 331, 329, 328, 344, 345, 347, 346, 350, 351, 349, 348, 340, 341, 343, 342, 338, 339, 337, 336, 368, 369, 371, 370, 374, 375, 373, 372, 380, 381, 383, 382, 378, 379, 377, 376, 360, 361, 363, 362, 366, 367, 365, 364, 356, 357, 359, 358, 354, 355, 353, 352, 288, 289, 291, 290, 294, 295, 293, 292, 300, 301, 303, 302, 298, 299, 297, 296, 312, 313, 315, 314, 318, 319, 317, 316, 308, 309, 311, 310, 306, 307, 305, 304, 272, 273, 275, 274, 278, 279, 277, 276, 284, 285, 287, 286, 282, 283, 281, 280, 264, 265, 267, 266, 270, 271, 269, 268, 260, 261, 263, 262, 258, 259, 257, 256, 768, 769, 771, 770, 774, 775, 773, 772, 780, 781, 783, 782, 778, 779, 777, 776, 792, 793, 795, 794, 798, 799, 797, 796, 788, 789, 791, 790, 786, 787, 785, 784, 816, 817, 819, 818, 822, 823, 821, 820, 828, 829, 831, 830, 826, 827, 825, 824, 808, 809, 811, 810, 814, 815, 813, 812, 804, 805, 807, 806, 802, 803, 801, 800, 864, 865, 867, 866, 870, 871, 869, 868, 876, 877, 879, 878, 874, 875, 873, 872, 888, 889, 891, 890, 894, 895, 893, 892, 884, 885, 887, 886, 882, 883, 881, 880, 848, 849, 851, 850, 854, 855, 853, 852, 860, 861, 863, 862, 858, 859, 857, 856, 840, 841, 843, 842, 846, 847, 845, 844, 836, 837, 839, 838, 834, 835, 833, 832, 960, 961, 963, 962, 966, 967, 965, 964, 972, 973, 975, 974, 970, 971, 969, 968, 984, 985, 987, 986, 990, 991, 989, 988, 980, 981, 983, 982, 978, 979, 977, 976, 1008, 1009, 1011, 1010, 1014, 1015, 1013, 1012, 1020, 1021, 1023, 1022, 1018, 1019, 1017, 1016, 1000, 1001, 1003, 1002, 1006, 1007, 1005, 1004, 996, 997, 999, 998, 994, 995, 993, 992, 928, 929, 931, 930, 934, 935, 933, 932, 940, 941, 943, 942, 938, 939, 937, 936, 952, 953, 955, 954, 958, 959, 957, 956, 948, 949, 951, 950, 946, 947, 945, 944, 912, 913, 915, 914, 918, 919, 917, 916, 924, 925, 927, 926, 922, 923, 921, 920, 904, 905, 907, 906, 910, 911, 909, 908, 900, 901, 903, 902, 898, 899, 897, 896, 640, 641, 643, 642, 646, 647, 645, 644, 652, 653, 655, 654, 650, 651, 649, 648, 664, 665, 667, 666, 670, 671, 669, 668, 660, 661, 663, 662, 658, 659, 657, 656, 688, 689, 691, 690, 694, 695, 693, 692, 700, 701, 703, 702, 698, 699, 697, 696, 680, 681, 683, 682, 686, 687, 685, 684, 676, 677, 679, 678, 674, 675, 673, 672, 736, 737, 739, 738, 742, 743, 741, 740, 748, 749, 751, 750, 746, 747, 745, 744, 760, 761, 763, 762, 766, 767, 765, 764, 756, 757, 759, 758, 754, 755, 753, 752, 720, 721, 723, 722, 726, 727, 725, 724, 732, 733, 735, 734, 730, 731, 729, 728, 712, 713, 715, 714, 718, 719, 717, 716, 708, 709, 711, 710, 706, 707, 705, 704, 576, 577, 579, 578, 582, 583, 581, 580, 588, 589, 591, 590, 586, 587, 585, 584, 600, 601, 603, 602, 606, 607, 605, 604, 596, 597, 599, 598, 594, 595, 593, 592, 624, 625, 627, 626, 630, 631, 629, 628, 636, 637, 639, 638, 634, 635, 633, 632, 616, 617, 619, 618, 622, 623, 621, 620, 612, 613, 615, 614, 610, 611, 609, 608, 544, 545, 547, 546, 550, 551, 549, 548, 556, 557, 559, 558, 554, 555, 553, 552, 568, 569, 571, 570, 574, 575, 573, 572, 564, 565, 567, 566, 562, 563, 561, 560, 528, 529, 531, 530, 534, 535, 533, 532, 540, 541, 543, 542, 538, 539, 537, 536, 520, 521, 523, 522, 526, 527, 525, 524, 516, 517, 519, 518, 514, 515, 513, 512, 1536, 1537, 1539, 1538, 1542, 1543, 1541, 1540, 1548, 1549, 1551, 1550, 1546, 1547, 1545, 1544, 1560, 1561, 1563, 1562, 1566, 1567, 1565, 1564, 1556, 1557, 1559, 1558, 1554, 1555, 1553, 1552, 1584, 1585, 1587, 1586, 1590, 1591, 1589, 1588, 1596, 1597, 1599, 1598, 1594, 1595, 1593, 1592, 1576, 1577, 1579, 1578, 1582, 1583, 1581, 1580, 1572, 1573, 1575, 1574, 1570, 1571, 1569, 1568, 1632, 1633, 1635, 1634, 1638, 1639, 1637, 1636, 1644, 1645, 1647, 1646, 1642, 1643, 1641, 1640, 1656, 1657, 1659, 1658, 1662, 1663, 1661, 1660, 1652, 1653, 1655, 1654, 1650, 1651, 1649, 1648, 1616, 1617, 1619, 1618, 1622, 1623, 1621, 1620, 1628, 1629, 1631, 1630, 1626, 1627, 1625, 1624, 1608, 1609, 1611, 1610, 1614, 1615, 1613, 1612, 1604, 1605, 1607, 1606, 1602, 1603, 1601, 1600, 1728, 1729, 1731, 1730, 1734, 1735, 1733, 1732, 1740, 1741, 1743, 1742, 1738, 1739, 1737, 1736, 1752, 1753, 1755, 1754, 1758, 1759, 1757, 1756, 1748, 1749, 1751, 1750, 1746, 1747, 1745, 1744, 1776, 1777, 1779, 1778, 1782, 1783, 1781, 1780, 1788, 1789, 1791, 1790, 1786, 1787, 1785, 1784, 1768, 1769, 1771, 1770, 1774, 1775, 1773, 1772, 1764, 1765, 1767, 1766, 1762, 1763, 1761, 1760, 1696, 1697, 1699, 1698, 1702, 1703, 1701, 1700, 1708, 1709, 1711, 1710, 1706, 1707, 1705, 1704, 1720, 1721, 1723, 1722, 1726, 1727, 1725, 1724, 1716, 1717, 1719, 1718, 1714, 1715, 1713, 1712, 1680, 1681, 1683, 1682, 1686, 1687, 1685, 1684, 1692, 1693, 1695, 1694, 1690, 1691, 1689, 1688, 1672, 1673, 1675, 1674, 1678, 1679, 1677, 1676, 1668, 1669, 1671, 1670, 1666, 1667, 1665, 1664, 1920, 1921, 1923, 1922, 1926, 1927, 1925, 1924, 1932, 1933, 1935, 1934, 1930, 1931, 1929, 1928, 1944, 1945, 1947, 1946, 1950, 1951, 1949, 1948, 1940, 1941, 1943, 1942, 1938, 1939, 1937, 1936, 1968, 1969, 1971, 1970, 1974, 1975, 1973, 1972, 1980, 1981, 1983, 1982, 1978, 1979, 1977, 1976, 1960, 1961, 1963, 1962, 1966, 1967, 1965, 1964, 1956, 1957, 1959, 1958, 1954, 1955, 1953, 1952, 2016, 2017, 2019, 2018, 2022, 2023, 2021, 2020, 2028, 2029, 2031, 2030, 2026, 2027, 2025, 2024, 2040, 2041, 2043, 2042, 2046, 2047, 2045, 2044, 2036, 2037, 2039, 2038, 2034, 2035, 2033, 2032, 2000, 2001, 2003, 2002, 2006, 2007, 2005, 2004, 2012, 2013, 2015, 2014, 2010, 2011, 2009, 2008, 1992, 1993, 1995, 1994, 1998, 1999, 1997, 1996, 1988, 1989, 1991, 1990, 1986, 1987, 1985, 1984, 1856, 1857, 1859, 1858, 1862, 1863, 1861, 1860, 1868, 1869, 1871, 1870, 1866, 1867, 1865, 1864, 1880, 1881, 1883, 1882, 1886, 1887, 1885, 1884, 1876, 1877, 1879, 1878, 1874, 1875, 1873, 1872, 1904, 1905, 1907, 1906, 1910, 1911, 1909, 1908, 1916, 1917, 1919, 1918, 1914, 1915, 1913, 1912, 1896, 1897, 1899, 1898, 1902, 1903, 1901, 1900, 1892, 1893, 1895, 1894, 1890, 1891, 1889, 1888, 1824, 1825, 1827, 1826, 1830, 1831, 1829, 1828, 1836, 1837, 1839, 1838, 1834, 1835, 1833, 1832, 1848, 1849, 1851, 1850, 1854, 1855, 1853, 1852, 1844, 1845, 1847, 1846, 1842, 1843, 1841, 1840, 1808, 1809, 1811, 1810, 1814, 1815, 1813, 1812, 1820, 1821, 1823, 1822, 1818, 1819, 1817, 1816, 1800, 1801, 1803, 1802, 1806, 1807, 1805, 1804, 1796, 1797, 1799, 1798, 1794, 1795, 1793, 1792, 1280, 1281, 1283, 1282, 1286, 1287, 1285, 1284, 1292, 1293, 1295, 1294, 1290, 1291, 1289, 1288, 1304, 1305, 1307, 1306, 1310, 1311, 1309, 1308, 1300, 1301, 1303, 1302, 1298, 1299, 1297, 1296, 1328, 1329, 1331, 1330, 1334, 1335, 1333, 1332, 1340, 1341, 1343, 1342, 1338, 1339, 1337, 1336, 1320, 1321, 1323, 1322, 1326, 1327, 1325, 1324, 1316, 1317, 1319, 1318, 1314, 1315, 1313, 1312, 1376, 1377, 1379, 1378, 1382, 1383, 1381, 1380, 1388, 1389, 1391, 1390, 1386, 1387, 1385, 1384, 1400, 1401, 1403, 1402, 1406, 1407, 1405, 1404, 1396, 1397, 1399, 1398, 1394, 1395, 1393, 1392, 1360, 1361, 1363, 1362, 1366, 1367, 1365, 1364, 1372, 1373, 1375, 1374, 1370, 1371, 1369, 1368, 1352, 1353, 1355, 1354, 1358, 1359, 1357, 1356, 1348, 1349, 1351, 1350, 1346, 1347, 1345, 1344, 1472, 1473, 1475, 1474, 1478, 1479, 1477, 1476, 1484, 1485, 1487, 1486, 1482, 1483, 1481, 1480, 1496, 1497, 1499, 1498, 1502, 1503, 1501, 1500, 1492, 1493, 1495, 1494, 1490, 1491, 1489, 1488, 1520, 1521, 1523, 1522, 1526, 1527, 1525, 1524, 1532, 1533, 1535, 1534, 1530, 1531, 1529, 1528, 1512, 1513, 1515, 1514, 1518, 1519, 1517, 1516, 1508, 1509, 1511, 1510, 1506, 1507, 1505, 1504, 1440, 1441, 1443, 1442, 1446, 1447, 1445, 1444, 1452, 1453, 1455, 1454, 1450, 1451, 1449, 1448, 1464, 1465, 1467, 1466, 1470, 1471, 1469, 1468, 1460, 1461, 1463, 1462, 1458, 1459, 1457, 1456, 1424, 1425, 1427, 1426, 1430, 1431, 1429, 1428, 1436, 1437, 1439, 1438, 1434, 1435, 1433, 1432, 1416, 1417, 1419, 1418, 1422, 1423, 1421, 1420, 1412, 1413, 1415, 1414, 1410, 1411, 1409, 1408, 1152, 1153, 1155, 1154, 1158, 1159, 1157, 1156, 1164, 1165, 1167, 1166, 1162, 1163, 1161, 1160, 1176, 1177, 1179, 1178, 1182, 1183, 1181, 1180, 1172, 1173, 1175, 1174, 1170, 1171, 1169, 1168, 1200, 1201, 1203, 1202, 1206, 1207, 1205, 1204, 1212, 1213, 1215, 1214, 1210, 1211, 1209, 1208, 1192, 1193, 1195, 1194, 1198, 1199, 1197, 1196, 1188, 1189, 1191, 1190, 1186, 1187, 1185, 1184, 1248, 1249, 1251, 1250, 1254, 1255, 1253, 1252, 1260, 1261, 1263, 1262, 1258, 1259, 1257, 1256, 1272, 1273, 1275, 1274, 1278, 1279, 1277, 1276, 1268, 1269, 1271, 1270, 1266, 1267, 1265, 1264, 1232, 1233, 1235, 1234, 1238, 1239, 1237, 1236, 1244, 1245, 1247, 1246, 1242, 1243, 1241, 1240, 1224, 1225, 1227, 1226, 1230, 1231, 1229, 1228, 1220, 1221, 1223, 1222, 1218, 1219, 1217, 1216, 1088, 1089, 1091, 1090, 1094, 1095, 1093, 1092, 1100, 1101, 1103, 1102, 1098, 1099, 1097, 1096, 1112, 1113, 1115, 1114, 1118, 1119, 1117, 1116, 1108, 1109, 1111, 1110, 1106, 1107, 1105, 1104, 1136, 1137, 1139, 1138, 1142, 1143, 1141, 1140, 1148, 1149, 1151, 1150, 1146, 1147, 1145, 1144, 1128, 1129, 1131, 1130, 1134, 1135, 1133, 1132, 1124, 1125, 1127, 1126, 1122, 1123, 1121, 1120, 1056, 1057, 1059, 1058, 1062, 1063, 1061, 1060, 1068, 1069, 1071, 1070, 1066, 1067, 1065, 1064, 1080, 1081, 1083, 1082, 1086, 1087, 1085, 1084, 1076, 1077, 1079, 1078, 1074, 1075, 1073, 1072, 1040, 1041, 1043, 1042, 1046, 1047, 1045, 1044, 1052, 1053, 1055, 1054, 1050, 1051, 1049, 1048, 1032, 1033, 1035, 1034, 1038, 1039, 1037, 1036, 1028, 1029, 1031, 1030, 1026, 1027, 1025, 1024, 3072, 3073, 3075, 3074, 3078, 3079, 3077, 3076, 3084, 3085, 3087, 3086, 3082, 3083, 3081, 3080, 3096, 3097, 3099, 3098, 3102, 3103, 3101, 3100, 3092, 3093, 3095, 3094, 3090, 3091, 3089, 3088, 3120, 3121, 3123, 3122, 3126, 3127, 3125, 3124, 3132, 3133, 3135, 3134, 3130, 3131, 3129, 3128, 3112, 3113, 3115, 3114, 3118, 3119, 3117, 3116, 3108, 3109, 3111, 3110, 3106, 3107, 3105, 3104, 3168, 3169, 3171, 3170, 3174, 3175, 3173, 3172, 3180, 3181, 3183, 3182, 3178, 3179, 3177, 3176, 3192, 3193, 3195, 3194, 3198, 3199, 3197, 3196, 3188, 3189, 3191, 3190, 3186, 3187, 3185, 3184, 3152, 3153, 3155, 3154, 3158, 3159, 3157, 3156, 3164, 3165, 3167, 3166, 3162, 3163, 3161, 3160, 3144, 3145, 3147, 3146, 3150, 3151, 3149, 3148, 3140, 3141, 3143, 3142, 3138, 3139, 3137, 3136, 3264, 3265, 3267, 3266, 3270, 3271, 3269, 3268, 3276, 3277, 3279, 3278, 3274, 3275, 3273, 3272, 3288, 3289, 3291, 3290, 3294, 3295, 3293, 3292, 3284, 3285, 3287, 3286, 3282, 3283, 3281, 3280, 3312, 3313, 3315, 3314, 3318, 3319, 3317, 3316, 3324, 3325, 3327, 3326, 3322, 3323, 3321, 3320, 3304, 3305, 3307, 3306, 3310, 3311, 3309, 3308, 3300, 3301, 3303, 3302, 3298, 3299, 3297, 3296, 3232, 3233, 3235, 3234, 3238, 3239, 3237, 3236, 3244, 3245, 3247, 3246, 3242, 3243, 3241, 3240, 3256, 3257, 3259, 3258, 3262, 3263, 3261, 3260, 3252, 3253, 3255, 3254, 3250, 3251, 3249, 3248, 3216, 3217, 3219, 3218, 3222, 3223, 3221, 3220, 3228, 3229, 3231, 3230, 3226, 3227, 3225, 3224, 3208, 3209, 3211, 3210, 3214, 3215, 3213, 3212, 3204, 3205, 3207, 3206, 3202, 3203, 3201, 3200, 3456, 3457, 3459, 3458, 3462, 3463, 3461, 3460, 3468, 3469, 3471, 3470, 3466, 3467, 3465, 3464, 3480, 3481, 3483, 3482, 3486, 3487, 3485, 3484, 3476, 3477, 3479, 3478, 3474, 3475, 3473, 3472, 3504, 3505, 3507, 3506, 3510, 3511, 3509, 3508, 3516, 3517, 3519, 3518, 3514, 3515, 3513, 3512, 3496, 3497, 3499, 3498, 3502, 3503, 3501, 3500, 3492, 3493, 3495, 3494, 3490, 3491, 3489, 3488, 3552, 3553, 3555, 3554, 3558, 3559, 3557, 3556, 3564, 3565, 3567, 3566, 3562, 3563, 3561, 3560, 3576, 3577, 3579, 3578, 3582, 3583, 3581, 3580, 3572, 3573, 3575, 3574, 3570, 3571, 3569, 3568, 3536, 3537, 3539, 3538, 3542, 3543, 3541, 3540, 3548, 3549, 3551, 3550, 3546, 3547, 3545, 3544, 3528, 3529, 3531, 3530, 3534, 3535, 3533, 3532, 3524, 3525, 3527, 3526, 3522, 3523, 3521, 3520, 3392, 3393, 3395, 3394, 3398, 3399, 3397, 3396, 3404, 3405, 3407, 3406, 3402, 3403, 3401, 3400, 3416, 3417, 3419, 3418, 3422, 3423, 3421, 3420, 3412, 3413, 3415, 3414, 3410, 3411, 3409, 3408, 3440, 3441, 3443, 3442, 3446, 3447, 3445, 3444, 3452, 3453, 3455, 3454, 3450, 3451, 3449, 3448, 3432, 3433, 3435, 3434, 3438, 3439, 3437, 3436, 3428, 3429, 3431, 3430, 3426, 3427, 3425, 3424, 3360, 3361, 3363, 3362, 3366, 3367, 3365, 3364, 3372, 3373, 3375, 3374, 3370, 3371, 3369, 3368, 3384, 3385, 3387, 3386, 3390, 3391, 3389, 3388, 3380, 3381, 3383, 3382, 3378, 3379, 3377, 3376, 3344, 3345, 3347, 3346, 3350, 3351, 3349, 3348, 3356, 3357, 3359, 3358, 3354, 3355, 3353, 3352, 3336, 3337, 3339, 3338, 3342, 3343, 3341, 3340, 3332, 3333, 3335, 3334, 3330, 3331, 3329, 3328, 3840, 3841, 3843, 3842, 3846, 3847, 3845, 3844, 3852, 3853, 3855, 3854, 3850, 3851, 3849, 3848, 3864, 3865, 3867, 3866, 3870, 3871, 3869, 3868, 3860, 3861, 3863, 3862, 3858, 3859, 3857, 3856, 3888, 3889, 3891, 3890, 3894, 3895, 3893, 3892, 3900, 3901, 3903, 3902, 3898, 3899, 3897, 3896, 3880, 3881, 3883, 3882, 3886, 3887, 3885, 3884, 3876, 3877, 3879, 3878, 3874, 3875, 3873, 3872, 3936, 3937, 3939, 3938, 3942, 3943, 3941, 3940, 3948, 3949, 3951, 3950, 3946, 3947, 3945, 3944, 3960, 3961, 3963, 3962, 3966, 3967, 3965, 3964, 3956, 3957, 3959, 3958, 3954, 3955, 3953, 3952, 3920, 3921, 3923, 3922, 3926, 3927, 3925, 3924, 3932, 3933, 3935, 3934, 3930, 3931, 3929, 3928, 3912, 3913, 3915, 3914, 3918, 3919, 3917, 3916, 3908, 3909, 3911, 3910, 3906, 3907, 3905, 3904, 4032, 4033, 4035, 4034, 4038, 4039, 4037, 4036, 4044, 4045, 4047, 4046, 4042, 4043, 4041, 4040, 4056, 4057, 4059, 4058, 4062, 4063, 4061, 4060, 4052, 4053, 4055, 4054, 4050, 4051, 4049, 4048, 4080, 4081, 4083, 4082, 4086, 4087, 4085, 4084, 4092, 4093, 4095, 4094, 4090, 4091, 4089, 4088, 4072, 4073, 4075, 4074, 4078, 4079, 4077, 4076, 4068, 4069, 4071, 4070, 4066, 4067, 4065, 4064, 4000, 4001, 4003, 4002, 4006, 4007, 4005, 4004, 4012, 4013, 4015, 4014, 4010, 4011, 4009, 4008, 4024, 4025, 4027, 4026, 4030, 4031, 4029, 4028, 4020, 4021, 4023, 4022, 4018, 4019, 4017, 4016, 3984, 3985, 3987, 3986, 3990, 3991, 3989, 3988, 3996, 3997, 3999, 3998, 3994, 3995, 3993, 3992, 3976, 3977, 3979, 3978, 3982, 3983, 3981, 3980, 3972, 3973, 3975, 3974, 3970, 3971, 3969, 3968, 3712, 3713, 3715, 3714, 3718, 3719, 3717, 3716, 3724, 3725, 3727, 3726, 3722, 3723, 3721, 3720, 3736, 3737, 3739, 3738, 3742, 3743, 3741, 3740, 3732, 3733, 3735, 3734, 3730, 3731, 3729, 3728, 3760, 3761, 3763, 3762, 3766, 3767, 3765, 3764, 3772, 3773, 3775, 3774, 3770, 3771, 3769, 3768, 3752, 3753, 3755, 3754, 3758, 3759, 3757, 3756, 3748, 3749, 3751, 3750, 3746, 3747, 3745, 3744, 3808, 3809, 3811, 3810, 3814, 3815, 3813, 3812, 3820, 3821, 3823, 3822, 3818, 3819, 3817, 3816, 3832, 3833, 3835, 3834, 3838, 3839, 3837, 3836, 3828, 3829, 3831, 3830, 3826, 3827, 3825, 3824, 3792, 3793, 3795, 3794, 3798, 3799, 3797, 3796, 3804, 3805, 3807, 3806, 3802, 3803, 3801, 3800, 3784, 3785, 3787, 3786, 3790, 3791, 3789, 3788, 3780, 3781, 3783, 3782, 3778, 3779, 3777, 3776, 3648, 3649, 3651, 3650, 3654, 3655, 3653, 3652, 3660, 3661, 3663, 3662, 3658, 3659, 3657, 3656, 3672, 3673, 3675, 3674, 3678, 3679, 3677, 3676, 3668, 3669, 3671, 3670, 3666, 3667, 3665, 3664, 3696, 3697, 3699, 3698, 3702, 3703, 3701, 3700, 3708, 3709, 3711, 3710, 3706, 3707, 3705, 3704, 3688, 3689, 3691, 3690, 3694, 3695, 3693, 3692, 3684, 3685, 3687, 3686, 3682, 3683, 3681, 3680, 3616, 3617, 3619, 3618, 3622, 3623, 3621, 3620, 3628, 3629, 3631, 3630, 3626, 3627, 3625, 3624, 3640, 3641, 3643, 3642, 3646, 3647, 3645, 3644, 3636, 3637, 3639, 3638, 3634, 3635, 3633, 3632, 3600, 3601, 3603, 3602, 3606, 3607, 3605, 3604, 3612, 3613, 3615, 3614, 3610, 3611, 3609, 3608, 3592, 3593, 3595, 3594, 3598, 3599, 3597, 3596, 3588, 3589, 3591, 3590, 3586, 3587, 3585, 3584, 2560, 2561, 2563, 2562, 2566, 2567, 2565, 2564, 2572, 2573, 2575, 2574, 2570, 2571, 2569, 2568, 2584, 2585, 2587, 2586, 2590, 2591, 2589, 2588, 2580, 2581, 2583, 2582, 2578, 2579, 2577, 2576, 2608, 2609, 2611, 2610, 2614, 2615, 2613, 2612, 2620, 2621, 2623, 2622, 2618, 2619, 2617, 2616, 2600, 2601, 2603, 2602, 2606, 2607, 2605, 2604, 2596, 2597, 2599, 2598, 2594, 2595, 2593, 2592, 2656, 2657, 2659, 2658, 2662, 2663, 2661, 2660, 2668, 2669, 2671, 2670, 2666, 2667, 2665, 2664, 2680, 2681, 2683, 2682, 2686, 2687, 2685, 2684, 2676, 2677, 2679, 2678, 2674, 2675, 2673, 2672, 2640, 2641, 2643, 2642, 2646, 2647, 2645, 2644, 2652, 2653, 2655, 2654, 2650, 2651, 2649, 2648, 2632, 2633, 2635, 2634, 2638, 2639, 2637, 2636, 2628, 2629, 2631, 2630, 2626, 2627, 2625, 2624, 2752, 2753, 2755, 2754, 2758, 2759, 2757, 2756, 2764, 2765, 2767, 2766, 2762, 2763, 2761, 2760, 2776, 2777, 2779, 2778, 2782, 2783, 2781, 2780, 2772, 2773, 2775, 2774, 2770, 2771, 2769, 2768, 2800, 2801, 2803, 2802, 2806, 2807, 2805, 2804, 2812, 2813, 2815, 2814, 2810, 2811, 2809, 2808, 2792, 2793, 2795, 2794, 2798, 2799, 2797, 2796, 2788, 2789, 2791, 2790, 2786, 2787, 2785, 2784, 2720, 2721, 2723, 2722, 2726, 2727, 2725, 2724, 2732, 2733, 2735, 2734, 2730, 2731, 2729, 2728, 2744, 2745, 2747, 2746, 2750, 2751, 2749, 2748, 2740, 2741, 2743, 2742, 2738, 2739, 2737, 2736, 2704, 2705, 2707, 2706, 2710, 2711, 2709, 2708, 2716, 2717, 2719, 2718, 2714, 2715, 2713, 2712, 2696, 2697, 2699, 2698, 2702, 2703, 2701, 2700, 2692, 2693, 2695, 2694, 2690, 2691, 2689, 2688, 2944, 2945, 2947, 2946, 2950, 2951, 2949, 2948, 2956, 2957, 2959, 2958, 2954, 2955, 2953, 2952, 2968, 2969, 2971, 2970, 2974, 2975, 2973, 2972, 2964, 2965, 2967, 2966, 2962, 2963, 2961, 2960, 2992, 2993, 2995, 2994, 2998, 2999, 2997, 2996, 3004, 3005, 3007, 3006, 3002, 3003, 3001, 3000, 2984, 2985, 2987, 2986, 2990, 2991, 2989, 2988, 2980, 2981, 2983, 2982, 2978, 2979, 2977, 2976, 3040, 3041, 3043, 3042, 3046, 3047, 3045, 3044, 3052, 3053, 3055, 3054, 3050, 3051, 3049, 3048, 3064, 3065, 3067, 3066, 3070, 3071, 3069, 3068, 3060, 3061, 3063, 3062, 3058, 3059, 3057, 3056, 3024, 3025, 3027, 3026, 3030, 3031, 3029, 3028, 3036, 3037, 3039, 3038, 3034, 3035, 3033, 3032, 3016, 3017, 3019, 3018, 3022, 3023, 3021, 3020, 3012, 3013, 3015, 3014, 3010, 3011, 3009, 3008, 2880, 2881, 2883, 2882, 2886, 2887, 2885, 2884, 2892, 2893, 2895, 2894, 2890, 2891, 2889, 2888, 2904, 2905, 2907, 2906, 2910, 2911, 2909, 2908, 2900, 2901, 2903, 2902, 2898, 2899, 2897, 2896, 2928, 2929, 2931, 2930, 2934, 2935, 2933, 2932, 2940, 2941, 2943, 2942, 2938, 2939, 2937, 2936, 2920, 2921, 2923, 2922, 2926, 2927, 2925, 2924, 2916, 2917, 2919, 2918, 2914, 2915, 2913, 2912, 2848, 2849, 2851, 2850, 2854, 2855, 2853, 2852, 2860, 2861, 2863, 2862, 2858, 2859, 2857, 2856, 2872, 2873, 2875, 2874, 2878, 2879, 2877, 2876, 2868, 2869, 2871, 2870, 2866, 2867, 2865, 2864, 2832, 2833, 2835, 2834, 2838, 2839, 2837, 2836, 2844, 2845, 2847, 2846, 2842, 2843, 2841, 2840, 2824, 2825, 2827, 2826, 2830, 2831, 2829, 2828, 2820, 2821, 2823, 2822, 2818, 2819, 2817, 2816, 2304, 2305, 2307, 2306, 2310, 2311, 2309, 2308, 2316, 2317, 2319, 2318, 2314, 2315, 2313, 2312, 2328, 2329, 2331, 2330, 2334, 2335, 2333, 2332, 2324, 2325, 2327, 2326, 2322, 2323, 2321, 2320, 2352, 2353, 2355, 2354, 2358, 2359, 2357, 2356, 2364, 2365, 2367, 2366, 2362, 2363, 2361, 2360, 2344, 2345, 2347, 2346, 2350, 2351, 2349, 2348, 2340, 2341, 2343, 2342, 2338, 2339, 2337, 2336, 2400, 2401, 2403, 2402, 2406, 2407, 2405, 2404, 2412, 2413, 2415, 2414, 2410, 2411, 2409, 2408, 2424, 2425, 2427, 2426, 2430, 2431, 2429, 2428, 2420, 2421, 2423, 2422, 2418, 2419, 2417, 2416, 2384, 2385, 2387, 2386, 2390, 2391, 2389, 2388, 2396, 2397, 2399, 2398, 2394, 2395, 2393, 2392, 2376, 2377, 2379, 2378, 2382, 2383, 2381, 2380, 2372, 2373, 2375, 2374, 2370, 2371, 2369, 2368, 2496, 2497, 2499, 2498, 2502, 2503, 2501, 2500, 2508, 2509, 2511, 2510, 2506, 2507, 2505, 2504, 2520, 2521, 2523, 2522, 2526, 2527, 2525, 2524, 2516, 2517, 2519, 2518, 2514, 2515, 2513, 2512, 2544, 2545, 2547, 2546, 2550, 2551, 2549, 2548, 2556, 2557, 2559, 2558, 2554, 2555, 2553, 2552, 2536, 2537, 2539, 2538, 2542, 2543, 2541, 2540, 2532, 2533, 2535, 2534, 2530, 2531, 2529, 2528, 2464, 2465, 2467, 2466, 2470, 2471, 2469, 2468, 2476, 2477, 2479, 2478, 2474, 2475, 2473, 2472, 2488, 2489, 2491, 2490, 2494, 2495, 2493, 2492, 2484, 2485, 2487, 2486, 2482, 2483, 2481, 2480, 2448, 2449, 2451, 2450, 2454, 2455, 2453, 2452, 2460, 2461, 2463, 2462, 2458, 2459, 2457, 2456, 2440, 2441, 2443, 2442, 2446, 2447, 2445, 2444, 2436, 2437, 2439, 2438, 2434, 2435, 2433, 2432, 2176, 2177, 2179, 2178, 2182, 2183, 2181, 2180, 2188, 2189, 2191, 2190, 2186, 2187, 2185, 2184, 2200, 2201, 2203, 2202, 2206, 2207, 2205, 2204, 2196, 2197, 2199, 2198, 2194, 2195, 2193, 2192, 2224, 2225, 2227, 2226, 2230, 2231, 2229, 2228, 2236, 2237, 2239, 2238, 2234, 2235, 2233, 2232, 2216, 2217, 2219, 2218, 2222, 2223, 2221, 2220, 2212, 2213, 2215, 2214, 2210, 2211, 2209, 2208, 2272, 2273, 2275, 2274, 2278, 2279, 2277, 2276, 2284, 2285, 2287, 2286, 2282, 2283, 2281, 2280, 2296, 2297, 2299, 2298, 2302, 2303, 2301, 2300, 2292, 2293, 2295, 2294, 2290, 2291, 2289, 2288, 2256, 2257, 2259, 2258, 2262, 2263, 2261, 2260, 2268, 2269, 2271, 2270, 2266, 2267, 2265, 2264, 2248, 2249, 2251, 2250, 2254, 2255, 2253, 2252, 2244, 2245, 2247, 2246, 2242, 2243, 2241, 2240, 2112, 2113, 2115, 2114, 2118, 2119, 2117, 2116, 2124, 2125, 2127, 2126, 2122, 2123, 2121, 2120, 2136, 2137, 2139, 2138, 2142, 2143, 2141, 2140, 2132, 2133, 2135, 2134, 2130, 2131, 2129, 2128, 2160, 2161, 2163, 2162, 2166, 2167, 2165, 2164, 2172, 2173, 2175, 2174, 2170, 2171, 2169, 2168, 2152, 2153, 2155, 2154, 2158, 2159, 2157, 2156, 2148, 2149, 2151, 2150, 2146, 2147, 2145, 2144, 2080, 2081, 2083, 2082, 2086, 2087, 2085, 2084, 2092, 2093, 2095, 2094, 2090, 2091, 2089, 2088, 2104, 2105, 2107, 2106, 2110, 2111, 2109, 2108, 2100, 2101, 2103, 2102, 2098, 2099, 2097, 2096, 2064, 2065, 2067, 2066, 2070, 2071, 2069, 2068, 2076, 2077, 2079, 2078, 2074, 2075, 2073, 2072, 2056, 2057, 2059, 2058, 2062, 2063, 2061, 2060, 2052, 2053, 2055, 2054, 2050, 2051, 2049, 2048]\n assert candidate(n = 9) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110, 106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81, 83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76, 68, 69, 71, 70, 66, 67, 65, 64, 192, 193, 195, 194, 198, 199, 197, 196, 204, 205, 207, 206, 202, 203, 201, 200, 216, 217, 219, 218, 222, 223, 221, 220, 212, 213, 215, 214, 210, 211, 209, 208, 240, 241, 243, 242, 246, 247, 245, 244, 252, 253, 255, 254, 250, 251, 249, 248, 232, 233, 235, 234, 238, 239, 237, 236, 228, 229, 231, 230, 226, 227, 225, 224, 160, 161, 163, 162, 166, 167, 165, 164, 172, 173, 175, 174, 170, 171, 169, 168, 184, 185, 187, 186, 190, 191, 189, 188, 180, 181, 183, 182, 178, 179, 177, 176, 144, 145, 147, 146, 150, 151, 149, 148, 156, 157, 159, 158, 154, 155, 153, 152, 136, 137, 139, 138, 142, 143, 141, 140, 132, 133, 135, 134, 130, 131, 129, 128, 384, 385, 387, 386, 390, 391, 389, 388, 396, 397, 399, 398, 394, 395, 393, 392, 408, 409, 411, 410, 414, 415, 413, 412, 404, 405, 407, 406, 402, 403, 401, 400, 432, 433, 435, 434, 438, 439, 437, 436, 444, 445, 447, 446, 442, 443, 441, 440, 424, 425, 427, 426, 430, 431, 429, 428, 420, 421, 423, 422, 418, 419, 417, 416, 480, 481, 483, 482, 486, 487, 485, 484, 492, 493, 495, 494, 490, 491, 489, 488, 504, 505, 507, 506, 510, 511, 509, 508, 500, 501, 503, 502, 498, 499, 497, 496, 464, 465, 467, 466, 470, 471, 469, 468, 476, 477, 479, 478, 474, 475, 473, 472, 456, 457, 459, 458, 462, 463, 461, 460, 452, 453, 455, 454, 450, 451, 449, 448, 320, 321, 323, 322, 326, 327, 325, 324, 332, 333, 335, 334, 330, 331, 329, 328, 344, 345, 347, 346, 350, 351, 349, 348, 340, 341, 343, 342, 338, 339, 337, 336, 368, 369, 371, 370, 374, 375, 373, 372, 380, 381, 383, 382, 378, 379, 377, 376, 360, 361, 363, 362, 366, 367, 365, 364, 356, 357, 359, 358, 354, 355, 353, 352, 288, 289, 291, 290, 294, 295, 293, 292, 300, 301, 303, 302, 298, 299, 297, 296, 312, 313, 315, 314, 318, 319, 317, 316, 308, 309, 311, 310, 306, 307, 305, 304, 272, 273, 275, 274, 278, 279, 277, 276, 284, 285, 287, 286, 282, 283, 281, 280, 264, 265, 267, 266, 270, 271, 269, 268, 260, 261, 263, 262, 258, 259, 257, 256]\n assert candidate(n = 6) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32]\n assert candidate(n = 7) == [0, 1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, 21, 23, 22, 18, 19, 17, 16, 48, 49, 51, 50, 54, 55, 53, 52, 60, 61, 63, 62, 58, 59, 57, 56, 40, 41, 43, 42, 46, 47, 45, 44, 36, 37, 39, 38, 34, 35, 33, 32, 96, 97, 99, 98, 102, 103, 101, 100, 108, 109, 111, 110, 106, 107, 105, 104, 120, 121, 123, 122, 126, 127, 125, 124, 116, 117, 119, 118, 114, 115, 113, 112, 80, 81, 83, 82, 86, 87, 85, 84, 92, 93, 95, 94, 90, 91, 89, 88, 72, 73, 75, 74, 78, 79, 77, 76, 68, 69, 71, 70, 66, 67, 65, 64]\n", "comparison": "exact"}, "public_tests": ["2", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().grayCode", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:47+00:00", "tests_total": 12, "tests_dropped": 0, "flags": ["multiple_answers"], "topic_tags": ["math", "backtracking", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def gray_code(n)", "container": null, "callable": "gray_code", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 90, "task_id": "subsets-ii", "difficulty": "Medium", "problem_description": "Given an integer array nums that may contain duplicates, return all possible subsets (the power set).\n\nThe solution set must not contain duplicate subsets. Return the solution in any order.\n\nExample 1:\n\nInput: nums = [1,2,2]\nOutput: [[],[1],[1,2],[1,2,2],[2],[2,2]]\n\nExample 2:\n\nInput: nums = [0]\nOutput: [[],[0]]\n\nConstraints:\n\n- 1 <= nums.length <= 10\n- -10 <= nums[i] <= 10\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[-1, 1, -1, 1]), [[-1, -1, 1, 1], [-1, -1, 1], [-1, -1], [-1, 1, 1], [-1, 1], [-1], [1, 1], [1], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3]), [[1, 2, 2, 3], [1, 2, 2], [1, 2, 3], [1, 2], [1, 3], [1], [2, 2, 3], [2, 2], [2, 3], [2], [3], []])\n assert answers_match(candidate(nums=[1, 1, 2, 2]), [[1, 1, 2, 2], [1, 1, 2], [1, 1], [1, 2, 2], [1, 2], [1], [2, 2], [2], []])\n assert answers_match(candidate(nums=[-1, -1, 0, 1, 1, 2]), [[-1, -1, 0, 1, 1, 2], [-1, -1, 0, 1, 1], [-1, -1, 0, 1, 2], [-1, -1, 0, 1], [-1, -1, 0, 2], [-1, -1, 0], [-1, -1, 1, 1, 2], [-1, -1, 1, 1], [-1, -1, 1, 2], [-1, -1, 1], [-1, -1, 2], [-1, -1], [-1, 0, 1, 1, 2], [-1, 0, 1, 1], [-1, 0, 1, 2], [-1, 0, 1], [-1, 0, 2], [-1, 0], [-1, 1, 1, 2], [-1, 1, 1], [-1, 1, 2], [-1, 1], [-1, 2], [-1], [0, 1, 1, 2], [0, 1, 1], [0, 1, 2], [0, 1], [0, 2], [0], [1, 1, 2], [1, 1], [1, 2], [1], [2], []])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3]), [[1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 4], [1, 3], [1, 4], [1], [2, 3, 4], [2, 3], [2, 4], [2], [3, 4], [3], [4], []])\n assert answers_match(candidate(nums=[2, 1, 2]), [[1, 2, 2], [1, 2], [1], [2, 2], [2], []])\n assert answers_match(candidate(nums=[1, 2, 2]), [[1, 2, 2], [1, 2], [1], [2, 2], [2], []])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5], [5], []])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5]), [[-5, -4, -3, -2, -1], [-5, -4, -3, -2], [-5, -4, -3, -1], [-5, -4, -3], [-5, -4, -2, -1], [-5, -4, -2], [-5, -4, -1], [-5, -4], [-5, -3, -2, -1], [-5, -3, -2], [-5, -3, -1], [-5, -3], [-5, -2, -1], [-5, -2], [-5, -1], [-5], [-4, -3, -2, -1], [-4, -3, -2], [-4, -3, -1], [-4, -3], [-4, -2, -1], [-4, -2], [-4, -1], [-4], [-3, -2, -1], [-3, -2], [-3, -1], [-3], [-2, -1], [-2], [-1], []])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0], [0], []])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [1], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [2], [3, 4, 5], [3, 4], [3, 5], [3], [4, 5], [4], [5], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3]), [[1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 2]), [[1, 1, 1, 2, 2, 2], [1, 1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1], [1, 1, 2, 2, 2], [1, 1, 2, 2], [1, 1, 2], [1, 1], [1, 2, 2, 2], [1, 2, 2], [1, 2], [1], [2, 2, 2], [2, 2], [2], []])\n assert answers_match(candidate(nums=[10, 10, 10]), [[10, 10, 10], [10, 10], [10], []])\n assert answers_match(candidate(nums=[0]), [[0], []])\n assert answers_match(candidate(nums=[-1, -1, -1, 0]), [[-1, -1, -1, 0], [-1, -1, -1], [-1, -1, 0], [-1, -1], [-1, 0], [-1], [0], []])\n assert answers_match(candidate(nums=[0, 0, 0, 0]), [[0, 0, 0, 0], [0, 0, 0], [0, 0], [0], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4]), [[1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 3, 4, 4, 4], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4], [2, 4, 4], [2, 4], [2], [3, 3, 3, 4, 4, 4], [3, 3, 3, 4, 4], [3, 3, 3, 4], [3, 3, 3], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4], [3, 4, 4], [3, 4], [3], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[4, 4, 4, 1, 4]), [[1, 4, 4, 4, 4], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [4, 4, 4, 4], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[1, 2, 3]), [[1, 2, 3], [1, 2], [1, 3], [1], [2, 3], [2], [3], []])\n assert answers_match(candidate(nums=[-1, -1, 2]), [[-1, -1, 2], [-1, -1], [-1, 2], [-1], [2], []])\n assert answers_match(candidate(nums=[5]), [[5], []])\n assert answers_match(candidate(nums=[2, 2, 2, 2, 2]), [[2, 2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2], [2, 2], [2], []])\n assert answers_match(candidate(nums=[-1, 0, 1]), [[-1, 0, 1], [-1, 0], [-1, 1], [-1], [0, 1], [0], [1], []])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0], [0], []])\n assert answers_match(candidate(nums=[4, 4, 4, 1, 4]), [[1, 4, 4, 4, 4], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [4, 4, 4, 4], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [2], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [3], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [4], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [5], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [6], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [7], [8, 9, 10], [8, 9], [8, 10], [8], [9, 10], [9], [10], []])\n assert answers_match(candidate(nums=[-2, -2, -1, -1, 0, 0, 1, 1, 2, 2]), [[-2, -2, -1, -1, 0, 0, 1, 1, 2, 2], [-2, -2, -1, -1, 0, 0, 1, 1, 2], [-2, -2, -1, -1, 0, 0, 1, 1], [-2, -2, -1, -1, 0, 0, 1, 2, 2], [-2, -2, -1, -1, 0, 0, 1, 2], [-2, -2, -1, -1, 0, 0, 1], [-2, -2, -1, -1, 0, 0, 2, 2], [-2, -2, -1, -1, 0, 0, 2], [-2, -2, -1, -1, 0, 0], [-2, -2, -1, -1, 0, 1, 1, 2, 2], [-2, -2, -1, -1, 0, 1, 1, 2], [-2, -2, -1, -1, 0, 1, 1], [-2, -2, -1, -1, 0, 1, 2, 2], [-2, -2, -1, -1, 0, 1, 2], [-2, -2, -1, -1, 0, 1], [-2, -2, -1, -1, 0, 2, 2], [-2, -2, -1, -1, 0, 2], [-2, -2, -1, -1, 0], [-2, -2, -1, -1, 1, 1, 2, 2], [-2, -2, -1, -1, 1, 1, 2], [-2, -2, -1, -1, 1, 1], [-2, -2, -1, -1, 1, 2, 2], [-2, -2, -1, -1, 1, 2], [-2, -2, -1, -1, 1], [-2, -2, -1, -1, 2, 2], [-2, -2, -1, -1, 2], [-2, -2, -1, -1], [-2, -2, -1, 0, 0, 1, 1, 2, 2], [-2, -2, -1, 0, 0, 1, 1, 2], [-2, -2, -1, 0, 0, 1, 1], [-2, -2, -1, 0, 0, 1, 2, 2], [-2, -2, -1, 0, 0, 1, 2], [-2, -2, -1, 0, 0, 1], [-2, -2, -1, 0, 0, 2, 2], [-2, -2, -1, 0, 0, 2], [-2, -2, -1, 0, 0], [-2, -2, -1, 0, 1, 1, 2, 2], [-2, -2, -1, 0, 1, 1, 2], [-2, -2, -1, 0, 1, 1], [-2, -2, -1, 0, 1, 2, 2], [-2, -2, -1, 0, 1, 2], [-2, -2, -1, 0, 1], [-2, -2, -1, 0, 2, 2], [-2, -2, -1, 0, 2], [-2, -2, -1, 0], [-2, -2, -1, 1, 1, 2, 2], [-2, -2, -1, 1, 1, 2], [-2, -2, -1, 1, 1], [-2, -2, -1, 1, 2, 2], [-2, -2, -1, 1, 2], [-2, -2, -1, 1], [-2, -2, -1, 2, 2], [-2, -2, -1, 2], [-2, -2, -1], [-2, -2, 0, 0, 1, 1, 2, 2], [-2, -2, 0, 0, 1, 1, 2], [-2, -2, 0, 0, 1, 1], [-2, -2, 0, 0, 1, 2, 2], [-2, -2, 0, 0, 1, 2], [-2, -2, 0, 0, 1], [-2, -2, 0, 0, 2, 2], [-2, -2, 0, 0, 2], [-2, -2, 0, 0], [-2, -2, 0, 1, 1, 2, 2], [-2, -2, 0, 1, 1, 2], [-2, -2, 0, 1, 1], [-2, -2, 0, 1, 2, 2], [-2, -2, 0, 1, 2], [-2, -2, 0, 1], [-2, -2, 0, 2, 2], [-2, -2, 0, 2], [-2, -2, 0], [-2, -2, 1, 1, 2, 2], [-2, -2, 1, 1, 2], [-2, -2, 1, 1], [-2, -2, 1, 2, 2], [-2, -2, 1, 2], [-2, -2, 1], [-2, -2, 2, 2], [-2, -2, 2], [-2, -2], [-2, -1, -1, 0, 0, 1, 1, 2, 2], [-2, -1, -1, 0, 0, 1, 1, 2], [-2, -1, -1, 0, 0, 1, 1], [-2, -1, -1, 0, 0, 1, 2, 2], [-2, -1, -1, 0, 0, 1, 2], [-2, -1, -1, 0, 0, 1], [-2, -1, -1, 0, 0, 2, 2], [-2, -1, -1, 0, 0, 2], [-2, -1, -1, 0, 0], [-2, -1, -1, 0, 1, 1, 2, 2], [-2, -1, -1, 0, 1, 1, 2], [-2, -1, -1, 0, 1, 1], [-2, -1, -1, 0, 1, 2, 2], [-2, -1, -1, 0, 1, 2], [-2, -1, -1, 0, 1], [-2, -1, -1, 0, 2, 2], [-2, -1, -1, 0, 2], [-2, -1, -1, 0], [-2, -1, -1, 1, 1, 2, 2], [-2, -1, -1, 1, 1, 2], [-2, -1, -1, 1, 1], [-2, -1, -1, 1, 2, 2], [-2, -1, -1, 1, 2], [-2, -1, -1, 1], [-2, -1, -1, 2, 2], [-2, -1, -1, 2], [-2, -1, -1], [-2, -1, 0, 0, 1, 1, 2, 2], [-2, -1, 0, 0, 1, 1, 2], [-2, -1, 0, 0, 1, 1], [-2, -1, 0, 0, 1, 2, 2], [-2, -1, 0, 0, 1, 2], [-2, -1, 0, 0, 1], [-2, -1, 0, 0, 2, 2], [-2, -1, 0, 0, 2], [-2, -1, 0, 0], [-2, -1, 0, 1, 1, 2, 2], [-2, -1, 0, 1, 1, 2], [-2, -1, 0, 1, 1], [-2, -1, 0, 1, 2, 2], [-2, -1, 0, 1, 2], [-2, -1, 0, 1], [-2, -1, 0, 2, 2], [-2, -1, 0, 2], [-2, -1, 0], [-2, -1, 1, 1, 2, 2], [-2, -1, 1, 1, 2], [-2, -1, 1, 1], [-2, -1, 1, 2, 2], [-2, -1, 1, 2], [-2, -1, 1], [-2, -1, 2, 2], [-2, -1, 2], [-2, -1], [-2, 0, 0, 1, 1, 2, 2], [-2, 0, 0, 1, 1, 2], [-2, 0, 0, 1, 1], [-2, 0, 0, 1, 2, 2], [-2, 0, 0, 1, 2], [-2, 0, 0, 1], [-2, 0, 0, 2, 2], [-2, 0, 0, 2], [-2, 0, 0], [-2, 0, 1, 1, 2, 2], [-2, 0, 1, 1, 2], [-2, 0, 1, 1], [-2, 0, 1, 2, 2], [-2, 0, 1, 2], [-2, 0, 1], [-2, 0, 2, 2], [-2, 0, 2], [-2, 0], [-2, 1, 1, 2, 2], [-2, 1, 1, 2], [-2, 1, 1], [-2, 1, 2, 2], [-2, 1, 2], [-2, 1], [-2, 2, 2], [-2, 2], [-2], [-1, -1, 0, 0, 1, 1, 2, 2], [-1, -1, 0, 0, 1, 1, 2], [-1, -1, 0, 0, 1, 1], [-1, -1, 0, 0, 1, 2, 2], [-1, -1, 0, 0, 1, 2], [-1, -1, 0, 0, 1], [-1, -1, 0, 0, 2, 2], [-1, -1, 0, 0, 2], [-1, -1, 0, 0], [-1, -1, 0, 1, 1, 2, 2], [-1, -1, 0, 1, 1, 2], [-1, -1, 0, 1, 1], [-1, -1, 0, 1, 2, 2], [-1, -1, 0, 1, 2], [-1, -1, 0, 1], [-1, -1, 0, 2, 2], [-1, -1, 0, 2], [-1, -1, 0], [-1, -1, 1, 1, 2, 2], [-1, -1, 1, 1, 2], [-1, -1, 1, 1], [-1, -1, 1, 2, 2], [-1, -1, 1, 2], [-1, -1, 1], [-1, -1, 2, 2], [-1, -1, 2], [-1, -1], [-1, 0, 0, 1, 1, 2, 2], [-1, 0, 0, 1, 1, 2], [-1, 0, 0, 1, 1], [-1, 0, 0, 1, 2, 2], [-1, 0, 0, 1, 2], [-1, 0, 0, 1], [-1, 0, 0, 2, 2], [-1, 0, 0, 2], [-1, 0, 0], [-1, 0, 1, 1, 2, 2], [-1, 0, 1, 1, 2], [-1, 0, 1, 1], [-1, 0, 1, 2, 2], [-1, 0, 1, 2], [-1, 0, 1], [-1, 0, 2, 2], [-1, 0, 2], [-1, 0], [-1, 1, 1, 2, 2], [-1, 1, 1, 2], [-1, 1, 1], [-1, 1, 2, 2], [-1, 1, 2], [-1, 1], [-1, 2, 2], [-1, 2], [-1], [0, 0, 1, 1, 2, 2], [0, 0, 1, 1, 2], [0, 0, 1, 1], [0, 0, 1, 2, 2], [0, 0, 1, 2], [0, 0, 1], [0, 0, 2, 2], [0, 0, 2], [0, 0], [0, 1, 1, 2, 2], [0, 1, 1, 2], [0, 1, 1], [0, 1, 2, 2], [0, 1, 2], [0, 1], [0, 2, 2], [0, 2], [0], [1, 1, 2, 2], [1, 1, 2], [1, 1], [1, 2, 2], [1, 2], [1], [2, 2], [2], []])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1, 0, -1, -2, -3, -4]), [[-4, -3, -2, -1, 0, 1, 2, 3, 4, 5], [-4, -3, -2, -1, 0, 1, 2, 3, 4], [-4, -3, -2, -1, 0, 1, 2, 3, 5], [-4, -3, -2, -1, 0, 1, 2, 3], [-4, -3, -2, -1, 0, 1, 2, 4, 5], [-4, -3, -2, -1, 0, 1, 2, 4], [-4, -3, -2, -1, 0, 1, 2, 5], [-4, -3, -2, -1, 0, 1, 2], [-4, -3, -2, -1, 0, 1, 3, 4, 5], [-4, -3, -2, -1, 0, 1, 3, 4], [-4, -3, -2, -1, 0, 1, 3, 5], [-4, -3, -2, -1, 0, 1, 3], [-4, -3, -2, -1, 0, 1, 4, 5], [-4, -3, -2, -1, 0, 1, 4], [-4, -3, -2, -1, 0, 1, 5], [-4, -3, -2, -1, 0, 1], [-4, -3, -2, -1, 0, 2, 3, 4, 5], [-4, -3, -2, -1, 0, 2, 3, 4], [-4, -3, -2, -1, 0, 2, 3, 5], [-4, -3, -2, -1, 0, 2, 3], [-4, -3, -2, -1, 0, 2, 4, 5], [-4, -3, -2, -1, 0, 2, 4], [-4, -3, -2, -1, 0, 2, 5], [-4, -3, -2, -1, 0, 2], [-4, -3, -2, -1, 0, 3, 4, 5], [-4, -3, -2, -1, 0, 3, 4], [-4, -3, -2, -1, 0, 3, 5], [-4, -3, -2, -1, 0, 3], [-4, -3, -2, -1, 0, 4, 5], [-4, -3, -2, -1, 0, 4], [-4, -3, -2, -1, 0, 5], [-4, -3, -2, -1, 0], [-4, -3, -2, -1, 1, 2, 3, 4, 5], [-4, -3, -2, -1, 1, 2, 3, 4], [-4, -3, -2, -1, 1, 2, 3, 5], [-4, -3, -2, -1, 1, 2, 3], [-4, -3, -2, -1, 1, 2, 4, 5], [-4, -3, -2, -1, 1, 2, 4], [-4, -3, -2, -1, 1, 2, 5], [-4, -3, -2, -1, 1, 2], [-4, -3, -2, -1, 1, 3, 4, 5], [-4, -3, -2, -1, 1, 3, 4], [-4, -3, -2, -1, 1, 3, 5], [-4, -3, -2, -1, 1, 3], [-4, -3, -2, -1, 1, 4, 5], [-4, -3, -2, -1, 1, 4], [-4, -3, -2, -1, 1, 5], [-4, -3, -2, -1, 1], [-4, -3, -2, -1, 2, 3, 4, 5], [-4, -3, -2, -1, 2, 3, 4], [-4, -3, -2, -1, 2, 3, 5], [-4, -3, -2, -1, 2, 3], [-4, -3, -2, -1, 2, 4, 5], [-4, -3, -2, -1, 2, 4], [-4, -3, -2, -1, 2, 5], [-4, -3, -2, -1, 2], [-4, -3, -2, -1, 3, 4, 5], [-4, -3, -2, -1, 3, 4], [-4, -3, -2, -1, 3, 5], [-4, -3, -2, -1, 3], [-4, -3, -2, -1, 4, 5], [-4, -3, -2, -1, 4], [-4, -3, -2, -1, 5], [-4, -3, -2, -1], [-4, -3, -2, 0, 1, 2, 3, 4, 5], [-4, -3, -2, 0, 1, 2, 3, 4], [-4, -3, -2, 0, 1, 2, 3, 5], [-4, -3, -2, 0, 1, 2, 3], [-4, -3, -2, 0, 1, 2, 4, 5], [-4, -3, -2, 0, 1, 2, 4], [-4, -3, -2, 0, 1, 2, 5], [-4, -3, -2, 0, 1, 2], [-4, -3, -2, 0, 1, 3, 4, 5], [-4, -3, -2, 0, 1, 3, 4], [-4, -3, -2, 0, 1, 3, 5], [-4, -3, -2, 0, 1, 3], [-4, -3, -2, 0, 1, 4, 5], [-4, -3, -2, 0, 1, 4], [-4, -3, -2, 0, 1, 5], [-4, -3, -2, 0, 1], [-4, -3, -2, 0, 2, 3, 4, 5], [-4, -3, -2, 0, 2, 3, 4], [-4, -3, -2, 0, 2, 3, 5], [-4, -3, -2, 0, 2, 3], [-4, -3, -2, 0, 2, 4, 5], [-4, -3, -2, 0, 2, 4], [-4, -3, -2, 0, 2, 5], [-4, -3, -2, 0, 2], [-4, -3, -2, 0, 3, 4, 5], [-4, -3, -2, 0, 3, 4], [-4, -3, -2, 0, 3, 5], [-4, -3, -2, 0, 3], [-4, -3, -2, 0, 4, 5], [-4, -3, -2, 0, 4], [-4, -3, -2, 0, 5], [-4, -3, -2, 0], [-4, -3, -2, 1, 2, 3, 4, 5], [-4, -3, -2, 1, 2, 3, 4], [-4, -3, -2, 1, 2, 3, 5], [-4, -3, -2, 1, 2, 3], [-4, -3, -2, 1, 2, 4, 5], [-4, -3, -2, 1, 2, 4], [-4, -3, -2, 1, 2, 5], [-4, -3, -2, 1, 2], [-4, -3, -2, 1, 3, 4, 5], [-4, -3, -2, 1, 3, 4], [-4, -3, -2, 1, 3, 5], [-4, -3, -2, 1, 3], [-4, -3, -2, 1, 4, 5], [-4, -3, -2, 1, 4], [-4, -3, -2, 1, 5], [-4, -3, -2, 1], [-4, -3, -2, 2, 3, 4, 5], [-4, -3, -2, 2, 3, 4], [-4, -3, -2, 2, 3, 5], [-4, -3, -2, 2, 3], [-4, -3, -2, 2, 4, 5], [-4, -3, -2, 2, 4], [-4, -3, -2, 2, 5], [-4, -3, -2, 2], [-4, -3, -2, 3, 4, 5], [-4, -3, -2, 3, 4], [-4, -3, -2, 3, 5], [-4, -3, -2, 3], [-4, -3, -2, 4, 5], [-4, -3, -2, 4], [-4, -3, -2, 5], [-4, -3, -2], [-4, -3, -1, 0, 1, 2, 3, 4, 5], [-4, -3, -1, 0, 1, 2, 3, 4], [-4, -3, -1, 0, 1, 2, 3, 5], [-4, -3, -1, 0, 1, 2, 3], [-4, -3, -1, 0, 1, 2, 4, 5], [-4, -3, -1, 0, 1, 2, 4], [-4, -3, -1, 0, 1, 2, 5], [-4, -3, -1, 0, 1, 2], [-4, -3, -1, 0, 1, 3, 4, 5], [-4, -3, -1, 0, 1, 3, 4], [-4, -3, -1, 0, 1, 3, 5], [-4, -3, -1, 0, 1, 3], [-4, -3, -1, 0, 1, 4, 5], [-4, -3, -1, 0, 1, 4], [-4, -3, -1, 0, 1, 5], [-4, -3, -1, 0, 1], [-4, -3, -1, 0, 2, 3, 4, 5], [-4, -3, -1, 0, 2, 3, 4], [-4, -3, -1, 0, 2, 3, 5], [-4, -3, -1, 0, 2, 3], [-4, -3, -1, 0, 2, 4, 5], [-4, -3, -1, 0, 2, 4], [-4, -3, -1, 0, 2, 5], [-4, -3, -1, 0, 2], [-4, -3, -1, 0, 3, 4, 5], [-4, -3, -1, 0, 3, 4], [-4, -3, -1, 0, 3, 5], [-4, -3, -1, 0, 3], [-4, -3, -1, 0, 4, 5], [-4, -3, -1, 0, 4], [-4, -3, -1, 0, 5], [-4, -3, -1, 0], [-4, -3, -1, 1, 2, 3, 4, 5], [-4, -3, -1, 1, 2, 3, 4], [-4, -3, -1, 1, 2, 3, 5], [-4, -3, -1, 1, 2, 3], [-4, -3, -1, 1, 2, 4, 5], [-4, -3, -1, 1, 2, 4], [-4, -3, -1, 1, 2, 5], [-4, -3, -1, 1, 2], [-4, -3, -1, 1, 3, 4, 5], [-4, -3, -1, 1, 3, 4], [-4, -3, -1, 1, 3, 5], [-4, -3, -1, 1, 3], [-4, -3, -1, 1, 4, 5], [-4, -3, -1, 1, 4], [-4, -3, -1, 1, 5], [-4, -3, -1, 1], [-4, -3, -1, 2, 3, 4, 5], [-4, -3, -1, 2, 3, 4], [-4, -3, -1, 2, 3, 5], [-4, -3, -1, 2, 3], [-4, -3, -1, 2, 4, 5], [-4, -3, -1, 2, 4], [-4, -3, -1, 2, 5], [-4, -3, -1, 2], [-4, -3, -1, 3, 4, 5], [-4, -3, -1, 3, 4], [-4, -3, -1, 3, 5], [-4, -3, -1, 3], [-4, -3, -1, 4, 5], [-4, -3, -1, 4], [-4, -3, -1, 5], [-4, -3, -1], [-4, -3, 0, 1, 2, 3, 4, 5], [-4, -3, 0, 1, 2, 3, 4], [-4, -3, 0, 1, 2, 3, 5], [-4, -3, 0, 1, 2, 3], [-4, -3, 0, 1, 2, 4, 5], [-4, -3, 0, 1, 2, 4], [-4, -3, 0, 1, 2, 5], [-4, -3, 0, 1, 2], [-4, -3, 0, 1, 3, 4, 5], [-4, -3, 0, 1, 3, 4], [-4, -3, 0, 1, 3, 5], [-4, -3, 0, 1, 3], [-4, -3, 0, 1, 4, 5], [-4, -3, 0, 1, 4], [-4, -3, 0, 1, 5], [-4, -3, 0, 1], [-4, -3, 0, 2, 3, 4, 5], [-4, -3, 0, 2, 3, 4], [-4, -3, 0, 2, 3, 5], [-4, -3, 0, 2, 3], [-4, -3, 0, 2, 4, 5], [-4, -3, 0, 2, 4], [-4, -3, 0, 2, 5], [-4, -3, 0, 2], [-4, -3, 0, 3, 4, 5], [-4, -3, 0, 3, 4], [-4, -3, 0, 3, 5], [-4, -3, 0, 3], [-4, -3, 0, 4, 5], [-4, -3, 0, 4], [-4, -3, 0, 5], [-4, -3, 0], [-4, -3, 1, 2, 3, 4, 5], [-4, -3, 1, 2, 3, 4], [-4, -3, 1, 2, 3, 5], [-4, -3, 1, 2, 3], [-4, -3, 1, 2, 4, 5], [-4, -3, 1, 2, 4], [-4, -3, 1, 2, 5], [-4, -3, 1, 2], [-4, -3, 1, 3, 4, 5], [-4, -3, 1, 3, 4], [-4, -3, 1, 3, 5], [-4, -3, 1, 3], [-4, -3, 1, 4, 5], [-4, -3, 1, 4], [-4, -3, 1, 5], [-4, -3, 1], [-4, -3, 2, 3, 4, 5], [-4, -3, 2, 3, 4], [-4, -3, 2, 3, 5], [-4, -3, 2, 3], [-4, -3, 2, 4, 5], [-4, -3, 2, 4], [-4, -3, 2, 5], [-4, -3, 2], [-4, -3, 3, 4, 5], [-4, -3, 3, 4], [-4, -3, 3, 5], [-4, -3, 3], [-4, -3, 4, 5], [-4, -3, 4], [-4, -3, 5], [-4, -3], [-4, -2, -1, 0, 1, 2, 3, 4, 5], [-4, -2, -1, 0, 1, 2, 3, 4], [-4, -2, -1, 0, 1, 2, 3, 5], [-4, -2, -1, 0, 1, 2, 3], [-4, -2, -1, 0, 1, 2, 4, 5], [-4, -2, -1, 0, 1, 2, 4], [-4, -2, -1, 0, 1, 2, 5], [-4, -2, -1, 0, 1, 2], [-4, -2, -1, 0, 1, 3, 4, 5], [-4, -2, -1, 0, 1, 3, 4], [-4, -2, -1, 0, 1, 3, 5], [-4, -2, -1, 0, 1, 3], [-4, -2, -1, 0, 1, 4, 5], [-4, -2, -1, 0, 1, 4], [-4, -2, -1, 0, 1, 5], [-4, -2, -1, 0, 1], [-4, -2, -1, 0, 2, 3, 4, 5], [-4, -2, -1, 0, 2, 3, 4], [-4, -2, -1, 0, 2, 3, 5], [-4, -2, -1, 0, 2, 3], [-4, -2, -1, 0, 2, 4, 5], [-4, -2, -1, 0, 2, 4], [-4, -2, -1, 0, 2, 5], [-4, -2, -1, 0, 2], [-4, -2, -1, 0, 3, 4, 5], [-4, -2, -1, 0, 3, 4], [-4, -2, -1, 0, 3, 5], [-4, -2, -1, 0, 3], [-4, -2, -1, 0, 4, 5], [-4, -2, -1, 0, 4], [-4, -2, -1, 0, 5], [-4, -2, -1, 0], [-4, -2, -1, 1, 2, 3, 4, 5], [-4, -2, -1, 1, 2, 3, 4], [-4, -2, -1, 1, 2, 3, 5], [-4, -2, -1, 1, 2, 3], [-4, -2, -1, 1, 2, 4, 5], [-4, -2, -1, 1, 2, 4], [-4, -2, -1, 1, 2, 5], [-4, -2, -1, 1, 2], [-4, -2, -1, 1, 3, 4, 5], [-4, -2, -1, 1, 3, 4], [-4, -2, -1, 1, 3, 5], [-4, -2, -1, 1, 3], [-4, -2, -1, 1, 4, 5], [-4, -2, -1, 1, 4], [-4, -2, -1, 1, 5], [-4, -2, -1, 1], [-4, -2, -1, 2, 3, 4, 5], [-4, -2, -1, 2, 3, 4], [-4, -2, -1, 2, 3, 5], [-4, -2, -1, 2, 3], [-4, -2, -1, 2, 4, 5], [-4, -2, -1, 2, 4], [-4, -2, -1, 2, 5], [-4, -2, -1, 2], [-4, -2, -1, 3, 4, 5], [-4, -2, -1, 3, 4], [-4, -2, -1, 3, 5], [-4, -2, -1, 3], [-4, -2, -1, 4, 5], [-4, -2, -1, 4], [-4, -2, -1, 5], [-4, -2, -1], [-4, -2, 0, 1, 2, 3, 4, 5], [-4, -2, 0, 1, 2, 3, 4], [-4, -2, 0, 1, 2, 3, 5], [-4, -2, 0, 1, 2, 3], [-4, -2, 0, 1, 2, 4, 5], [-4, -2, 0, 1, 2, 4], [-4, -2, 0, 1, 2, 5], [-4, -2, 0, 1, 2], [-4, -2, 0, 1, 3, 4, 5], [-4, -2, 0, 1, 3, 4], [-4, -2, 0, 1, 3, 5], [-4, -2, 0, 1, 3], [-4, -2, 0, 1, 4, 5], [-4, -2, 0, 1, 4], [-4, -2, 0, 1, 5], [-4, -2, 0, 1], [-4, -2, 0, 2, 3, 4, 5], [-4, -2, 0, 2, 3, 4], [-4, -2, 0, 2, 3, 5], [-4, -2, 0, 2, 3], [-4, -2, 0, 2, 4, 5], [-4, -2, 0, 2, 4], [-4, -2, 0, 2, 5], [-4, -2, 0, 2], [-4, -2, 0, 3, 4, 5], [-4, -2, 0, 3, 4], [-4, -2, 0, 3, 5], [-4, -2, 0, 3], [-4, -2, 0, 4, 5], [-4, -2, 0, 4], [-4, -2, 0, 5], [-4, -2, 0], [-4, -2, 1, 2, 3, 4, 5], [-4, -2, 1, 2, 3, 4], [-4, -2, 1, 2, 3, 5], [-4, -2, 1, 2, 3], [-4, -2, 1, 2, 4, 5], [-4, -2, 1, 2, 4], [-4, -2, 1, 2, 5], [-4, -2, 1, 2], [-4, -2, 1, 3, 4, 5], [-4, -2, 1, 3, 4], [-4, -2, 1, 3, 5], [-4, -2, 1, 3], [-4, -2, 1, 4, 5], [-4, -2, 1, 4], [-4, -2, 1, 5], [-4, -2, 1], [-4, -2, 2, 3, 4, 5], [-4, -2, 2, 3, 4], [-4, -2, 2, 3, 5], [-4, -2, 2, 3], [-4, -2, 2, 4, 5], [-4, -2, 2, 4], [-4, -2, 2, 5], [-4, -2, 2], [-4, -2, 3, 4, 5], [-4, -2, 3, 4], [-4, -2, 3, 5], [-4, -2, 3], [-4, -2, 4, 5], [-4, -2, 4], [-4, -2, 5], [-4, -2], [-4, -1, 0, 1, 2, 3, 4, 5], [-4, -1, 0, 1, 2, 3, 4], [-4, -1, 0, 1, 2, 3, 5], [-4, -1, 0, 1, 2, 3], [-4, -1, 0, 1, 2, 4, 5], [-4, -1, 0, 1, 2, 4], [-4, -1, 0, 1, 2, 5], [-4, -1, 0, 1, 2], [-4, -1, 0, 1, 3, 4, 5], [-4, -1, 0, 1, 3, 4], [-4, -1, 0, 1, 3, 5], [-4, -1, 0, 1, 3], [-4, -1, 0, 1, 4, 5], [-4, -1, 0, 1, 4], [-4, -1, 0, 1, 5], [-4, -1, 0, 1], [-4, -1, 0, 2, 3, 4, 5], [-4, -1, 0, 2, 3, 4], [-4, -1, 0, 2, 3, 5], [-4, -1, 0, 2, 3], [-4, -1, 0, 2, 4, 5], [-4, -1, 0, 2, 4], [-4, -1, 0, 2, 5], [-4, -1, 0, 2], [-4, -1, 0, 3, 4, 5], [-4, -1, 0, 3, 4], [-4, -1, 0, 3, 5], [-4, -1, 0, 3], [-4, -1, 0, 4, 5], [-4, -1, 0, 4], [-4, -1, 0, 5], [-4, -1, 0], [-4, -1, 1, 2, 3, 4, 5], [-4, -1, 1, 2, 3, 4], [-4, -1, 1, 2, 3, 5], [-4, -1, 1, 2, 3], [-4, -1, 1, 2, 4, 5], [-4, -1, 1, 2, 4], [-4, -1, 1, 2, 5], [-4, -1, 1, 2], [-4, -1, 1, 3, 4, 5], [-4, -1, 1, 3, 4], [-4, -1, 1, 3, 5], [-4, -1, 1, 3], [-4, -1, 1, 4, 5], [-4, -1, 1, 4], [-4, -1, 1, 5], [-4, -1, 1], [-4, -1, 2, 3, 4, 5], [-4, -1, 2, 3, 4], [-4, -1, 2, 3, 5], [-4, -1, 2, 3], [-4, -1, 2, 4, 5], [-4, -1, 2, 4], [-4, -1, 2, 5], [-4, -1, 2], [-4, -1, 3, 4, 5], [-4, -1, 3, 4], [-4, -1, 3, 5], [-4, -1, 3], [-4, -1, 4, 5], [-4, -1, 4], [-4, -1, 5], [-4, -1], [-4, 0, 1, 2, 3, 4, 5], [-4, 0, 1, 2, 3, 4], [-4, 0, 1, 2, 3, 5], [-4, 0, 1, 2, 3], [-4, 0, 1, 2, 4, 5], [-4, 0, 1, 2, 4], [-4, 0, 1, 2, 5], [-4, 0, 1, 2], [-4, 0, 1, 3, 4, 5], [-4, 0, 1, 3, 4], [-4, 0, 1, 3, 5], [-4, 0, 1, 3], [-4, 0, 1, 4, 5], [-4, 0, 1, 4], [-4, 0, 1, 5], [-4, 0, 1], [-4, 0, 2, 3, 4, 5], [-4, 0, 2, 3, 4], [-4, 0, 2, 3, 5], [-4, 0, 2, 3], [-4, 0, 2, 4, 5], [-4, 0, 2, 4], [-4, 0, 2, 5], [-4, 0, 2], [-4, 0, 3, 4, 5], [-4, 0, 3, 4], [-4, 0, 3, 5], [-4, 0, 3], [-4, 0, 4, 5], [-4, 0, 4], [-4, 0, 5], [-4, 0], [-4, 1, 2, 3, 4, 5], [-4, 1, 2, 3, 4], [-4, 1, 2, 3, 5], [-4, 1, 2, 3], [-4, 1, 2, 4, 5], [-4, 1, 2, 4], [-4, 1, 2, 5], [-4, 1, 2], [-4, 1, 3, 4, 5], [-4, 1, 3, 4], [-4, 1, 3, 5], [-4, 1, 3], [-4, 1, 4, 5], [-4, 1, 4], [-4, 1, 5], [-4, 1], [-4, 2, 3, 4, 5], [-4, 2, 3, 4], [-4, 2, 3, 5], [-4, 2, 3], [-4, 2, 4, 5], [-4, 2, 4], [-4, 2, 5], [-4, 2], [-4, 3, 4, 5], [-4, 3, 4], [-4, 3, 5], [-4, 3], [-4, 4, 5], [-4, 4], [-4, 5], [-4], [-3, -2, -1, 0, 1, 2, 3, 4, 5], [-3, -2, -1, 0, 1, 2, 3, 4], [-3, -2, -1, 0, 1, 2, 3, 5], [-3, -2, -1, 0, 1, 2, 3], [-3, -2, -1, 0, 1, 2, 4, 5], [-3, -2, -1, 0, 1, 2, 4], [-3, -2, -1, 0, 1, 2, 5], [-3, -2, -1, 0, 1, 2], [-3, -2, -1, 0, 1, 3, 4, 5], [-3, -2, -1, 0, 1, 3, 4], [-3, -2, -1, 0, 1, 3, 5], [-3, -2, -1, 0, 1, 3], [-3, -2, -1, 0, 1, 4, 5], [-3, -2, -1, 0, 1, 4], [-3, -2, -1, 0, 1, 5], [-3, -2, -1, 0, 1], [-3, -2, -1, 0, 2, 3, 4, 5], [-3, -2, -1, 0, 2, 3, 4], [-3, -2, -1, 0, 2, 3, 5], [-3, -2, -1, 0, 2, 3], [-3, -2, -1, 0, 2, 4, 5], [-3, -2, -1, 0, 2, 4], [-3, -2, -1, 0, 2, 5], [-3, -2, -1, 0, 2], [-3, -2, -1, 0, 3, 4, 5], [-3, -2, -1, 0, 3, 4], [-3, -2, -1, 0, 3, 5], [-3, -2, -1, 0, 3], [-3, -2, -1, 0, 4, 5], [-3, -2, -1, 0, 4], [-3, -2, -1, 0, 5], [-3, -2, -1, 0], [-3, -2, -1, 1, 2, 3, 4, 5], [-3, -2, -1, 1, 2, 3, 4], [-3, -2, -1, 1, 2, 3, 5], [-3, -2, -1, 1, 2, 3], [-3, -2, -1, 1, 2, 4, 5], [-3, -2, -1, 1, 2, 4], [-3, -2, -1, 1, 2, 5], [-3, -2, -1, 1, 2], [-3, -2, -1, 1, 3, 4, 5], [-3, -2, -1, 1, 3, 4], [-3, -2, -1, 1, 3, 5], [-3, -2, -1, 1, 3], [-3, -2, -1, 1, 4, 5], [-3, -2, -1, 1, 4], [-3, -2, -1, 1, 5], [-3, -2, -1, 1], [-3, -2, -1, 2, 3, 4, 5], [-3, -2, -1, 2, 3, 4], [-3, -2, -1, 2, 3, 5], [-3, -2, -1, 2, 3], [-3, -2, -1, 2, 4, 5], [-3, -2, -1, 2, 4], [-3, -2, -1, 2, 5], [-3, -2, -1, 2], [-3, -2, -1, 3, 4, 5], [-3, -2, -1, 3, 4], [-3, -2, -1, 3, 5], [-3, -2, -1, 3], [-3, -2, -1, 4, 5], [-3, -2, -1, 4], [-3, -2, -1, 5], [-3, -2, -1], [-3, -2, 0, 1, 2, 3, 4, 5], [-3, -2, 0, 1, 2, 3, 4], [-3, -2, 0, 1, 2, 3, 5], [-3, -2, 0, 1, 2, 3], [-3, -2, 0, 1, 2, 4, 5], [-3, -2, 0, 1, 2, 4], [-3, -2, 0, 1, 2, 5], [-3, -2, 0, 1, 2], [-3, -2, 0, 1, 3, 4, 5], [-3, -2, 0, 1, 3, 4], [-3, -2, 0, 1, 3, 5], [-3, -2, 0, 1, 3], [-3, -2, 0, 1, 4, 5], [-3, -2, 0, 1, 4], [-3, -2, 0, 1, 5], [-3, -2, 0, 1], [-3, -2, 0, 2, 3, 4, 5], [-3, -2, 0, 2, 3, 4], [-3, -2, 0, 2, 3, 5], [-3, -2, 0, 2, 3], [-3, -2, 0, 2, 4, 5], [-3, -2, 0, 2, 4], [-3, -2, 0, 2, 5], [-3, -2, 0, 2], [-3, -2, 0, 3, 4, 5], [-3, -2, 0, 3, 4], [-3, -2, 0, 3, 5], [-3, -2, 0, 3], [-3, -2, 0, 4, 5], [-3, -2, 0, 4], [-3, -2, 0, 5], [-3, -2, 0], [-3, -2, 1, 2, 3, 4, 5], [-3, -2, 1, 2, 3, 4], [-3, -2, 1, 2, 3, 5], [-3, -2, 1, 2, 3], [-3, -2, 1, 2, 4, 5], [-3, -2, 1, 2, 4], [-3, -2, 1, 2, 5], [-3, -2, 1, 2], [-3, -2, 1, 3, 4, 5], [-3, -2, 1, 3, 4], [-3, -2, 1, 3, 5], [-3, -2, 1, 3], [-3, -2, 1, 4, 5], [-3, -2, 1, 4], [-3, -2, 1, 5], [-3, -2, 1], [-3, -2, 2, 3, 4, 5], [-3, -2, 2, 3, 4], [-3, -2, 2, 3, 5], [-3, -2, 2, 3], [-3, -2, 2, 4, 5], [-3, -2, 2, 4], [-3, -2, 2, 5], [-3, -2, 2], [-3, -2, 3, 4, 5], [-3, -2, 3, 4], [-3, -2, 3, 5], [-3, -2, 3], [-3, -2, 4, 5], [-3, -2, 4], [-3, -2, 5], [-3, -2], [-3, -1, 0, 1, 2, 3, 4, 5], [-3, -1, 0, 1, 2, 3, 4], [-3, -1, 0, 1, 2, 3, 5], [-3, -1, 0, 1, 2, 3], [-3, -1, 0, 1, 2, 4, 5], [-3, -1, 0, 1, 2, 4], [-3, -1, 0, 1, 2, 5], [-3, -1, 0, 1, 2], [-3, -1, 0, 1, 3, 4, 5], [-3, -1, 0, 1, 3, 4], [-3, -1, 0, 1, 3, 5], [-3, -1, 0, 1, 3], [-3, -1, 0, 1, 4, 5], [-3, -1, 0, 1, 4], [-3, -1, 0, 1, 5], [-3, -1, 0, 1], [-3, -1, 0, 2, 3, 4, 5], [-3, -1, 0, 2, 3, 4], [-3, -1, 0, 2, 3, 5], [-3, -1, 0, 2, 3], [-3, -1, 0, 2, 4, 5], [-3, -1, 0, 2, 4], [-3, -1, 0, 2, 5], [-3, -1, 0, 2], [-3, -1, 0, 3, 4, 5], [-3, -1, 0, 3, 4], [-3, -1, 0, 3, 5], [-3, -1, 0, 3], [-3, -1, 0, 4, 5], [-3, -1, 0, 4], [-3, -1, 0, 5], [-3, -1, 0], [-3, -1, 1, 2, 3, 4, 5], [-3, -1, 1, 2, 3, 4], [-3, -1, 1, 2, 3, 5], [-3, -1, 1, 2, 3], [-3, -1, 1, 2, 4, 5], [-3, -1, 1, 2, 4], [-3, -1, 1, 2, 5], [-3, -1, 1, 2], [-3, -1, 1, 3, 4, 5], [-3, -1, 1, 3, 4], [-3, -1, 1, 3, 5], [-3, -1, 1, 3], [-3, -1, 1, 4, 5], [-3, -1, 1, 4], [-3, -1, 1, 5], [-3, -1, 1], [-3, -1, 2, 3, 4, 5], [-3, -1, 2, 3, 4], [-3, -1, 2, 3, 5], [-3, -1, 2, 3], [-3, -1, 2, 4, 5], [-3, -1, 2, 4], [-3, -1, 2, 5], [-3, -1, 2], [-3, -1, 3, 4, 5], [-3, -1, 3, 4], [-3, -1, 3, 5], [-3, -1, 3], [-3, -1, 4, 5], [-3, -1, 4], [-3, -1, 5], [-3, -1], [-3, 0, 1, 2, 3, 4, 5], [-3, 0, 1, 2, 3, 4], [-3, 0, 1, 2, 3, 5], [-3, 0, 1, 2, 3], [-3, 0, 1, 2, 4, 5], [-3, 0, 1, 2, 4], [-3, 0, 1, 2, 5], [-3, 0, 1, 2], [-3, 0, 1, 3, 4, 5], [-3, 0, 1, 3, 4], [-3, 0, 1, 3, 5], [-3, 0, 1, 3], [-3, 0, 1, 4, 5], [-3, 0, 1, 4], [-3, 0, 1, 5], [-3, 0, 1], [-3, 0, 2, 3, 4, 5], [-3, 0, 2, 3, 4], [-3, 0, 2, 3, 5], [-3, 0, 2, 3], [-3, 0, 2, 4, 5], [-3, 0, 2, 4], [-3, 0, 2, 5], [-3, 0, 2], [-3, 0, 3, 4, 5], [-3, 0, 3, 4], [-3, 0, 3, 5], [-3, 0, 3], [-3, 0, 4, 5], [-3, 0, 4], [-3, 0, 5], [-3, 0], [-3, 1, 2, 3, 4, 5], [-3, 1, 2, 3, 4], [-3, 1, 2, 3, 5], [-3, 1, 2, 3], [-3, 1, 2, 4, 5], [-3, 1, 2, 4], [-3, 1, 2, 5], [-3, 1, 2], [-3, 1, 3, 4, 5], [-3, 1, 3, 4], [-3, 1, 3, 5], [-3, 1, 3], [-3, 1, 4, 5], [-3, 1, 4], [-3, 1, 5], [-3, 1], [-3, 2, 3, 4, 5], [-3, 2, 3, 4], [-3, 2, 3, 5], [-3, 2, 3], [-3, 2, 4, 5], [-3, 2, 4], [-3, 2, 5], [-3, 2], [-3, 3, 4, 5], [-3, 3, 4], [-3, 3, 5], [-3, 3], [-3, 4, 5], [-3, 4], [-3, 5], [-3], [-2, -1, 0, 1, 2, 3, 4, 5], [-2, -1, 0, 1, 2, 3, 4], [-2, -1, 0, 1, 2, 3, 5], [-2, -1, 0, 1, 2, 3], [-2, -1, 0, 1, 2, 4, 5], [-2, -1, 0, 1, 2, 4], [-2, -1, 0, 1, 2, 5], [-2, -1, 0, 1, 2], [-2, -1, 0, 1, 3, 4, 5], [-2, -1, 0, 1, 3, 4], [-2, -1, 0, 1, 3, 5], [-2, -1, 0, 1, 3], [-2, -1, 0, 1, 4, 5], [-2, -1, 0, 1, 4], [-2, -1, 0, 1, 5], [-2, -1, 0, 1], [-2, -1, 0, 2, 3, 4, 5], [-2, -1, 0, 2, 3, 4], [-2, -1, 0, 2, 3, 5], [-2, -1, 0, 2, 3], [-2, -1, 0, 2, 4, 5], [-2, -1, 0, 2, 4], [-2, -1, 0, 2, 5], [-2, -1, 0, 2], [-2, -1, 0, 3, 4, 5], [-2, -1, 0, 3, 4], [-2, -1, 0, 3, 5], [-2, -1, 0, 3], [-2, -1, 0, 4, 5], [-2, -1, 0, 4], [-2, -1, 0, 5], [-2, -1, 0], [-2, -1, 1, 2, 3, 4, 5], [-2, -1, 1, 2, 3, 4], [-2, -1, 1, 2, 3, 5], [-2, -1, 1, 2, 3], [-2, -1, 1, 2, 4, 5], [-2, -1, 1, 2, 4], [-2, -1, 1, 2, 5], [-2, -1, 1, 2], [-2, -1, 1, 3, 4, 5], [-2, -1, 1, 3, 4], [-2, -1, 1, 3, 5], [-2, -1, 1, 3], [-2, -1, 1, 4, 5], [-2, -1, 1, 4], [-2, -1, 1, 5], [-2, -1, 1], [-2, -1, 2, 3, 4, 5], [-2, -1, 2, 3, 4], [-2, -1, 2, 3, 5], [-2, -1, 2, 3], [-2, -1, 2, 4, 5], [-2, -1, 2, 4], [-2, -1, 2, 5], [-2, -1, 2], [-2, -1, 3, 4, 5], [-2, -1, 3, 4], [-2, -1, 3, 5], [-2, -1, 3], [-2, -1, 4, 5], [-2, -1, 4], [-2, -1, 5], [-2, -1], [-2, 0, 1, 2, 3, 4, 5], [-2, 0, 1, 2, 3, 4], [-2, 0, 1, 2, 3, 5], [-2, 0, 1, 2, 3], [-2, 0, 1, 2, 4, 5], [-2, 0, 1, 2, 4], [-2, 0, 1, 2, 5], [-2, 0, 1, 2], [-2, 0, 1, 3, 4, 5], [-2, 0, 1, 3, 4], [-2, 0, 1, 3, 5], [-2, 0, 1, 3], [-2, 0, 1, 4, 5], [-2, 0, 1, 4], [-2, 0, 1, 5], [-2, 0, 1], [-2, 0, 2, 3, 4, 5], [-2, 0, 2, 3, 4], [-2, 0, 2, 3, 5], [-2, 0, 2, 3], [-2, 0, 2, 4, 5], [-2, 0, 2, 4], [-2, 0, 2, 5], [-2, 0, 2], [-2, 0, 3, 4, 5], [-2, 0, 3, 4], [-2, 0, 3, 5], [-2, 0, 3], [-2, 0, 4, 5], [-2, 0, 4], [-2, 0, 5], [-2, 0], [-2, 1, 2, 3, 4, 5], [-2, 1, 2, 3, 4], [-2, 1, 2, 3, 5], [-2, 1, 2, 3], [-2, 1, 2, 4, 5], [-2, 1, 2, 4], [-2, 1, 2, 5], [-2, 1, 2], [-2, 1, 3, 4, 5], [-2, 1, 3, 4], [-2, 1, 3, 5], [-2, 1, 3], [-2, 1, 4, 5], [-2, 1, 4], [-2, 1, 5], [-2, 1], [-2, 2, 3, 4, 5], [-2, 2, 3, 4], [-2, 2, 3, 5], [-2, 2, 3], [-2, 2, 4, 5], [-2, 2, 4], [-2, 2, 5], [-2, 2], [-2, 3, 4, 5], [-2, 3, 4], [-2, 3, 5], [-2, 3], [-2, 4, 5], [-2, 4], [-2, 5], [-2], [-1, 0, 1, 2, 3, 4, 5], [-1, 0, 1, 2, 3, 4], [-1, 0, 1, 2, 3, 5], [-1, 0, 1, 2, 3], [-1, 0, 1, 2, 4, 5], [-1, 0, 1, 2, 4], [-1, 0, 1, 2, 5], [-1, 0, 1, 2], [-1, 0, 1, 3, 4, 5], [-1, 0, 1, 3, 4], [-1, 0, 1, 3, 5], [-1, 0, 1, 3], [-1, 0, 1, 4, 5], [-1, 0, 1, 4], [-1, 0, 1, 5], [-1, 0, 1], [-1, 0, 2, 3, 4, 5], [-1, 0, 2, 3, 4], [-1, 0, 2, 3, 5], [-1, 0, 2, 3], [-1, 0, 2, 4, 5], [-1, 0, 2, 4], [-1, 0, 2, 5], [-1, 0, 2], [-1, 0, 3, 4, 5], [-1, 0, 3, 4], [-1, 0, 3, 5], [-1, 0, 3], [-1, 0, 4, 5], [-1, 0, 4], [-1, 0, 5], [-1, 0], [-1, 1, 2, 3, 4, 5], [-1, 1, 2, 3, 4], [-1, 1, 2, 3, 5], [-1, 1, 2, 3], [-1, 1, 2, 4, 5], [-1, 1, 2, 4], [-1, 1, 2, 5], [-1, 1, 2], [-1, 1, 3, 4, 5], [-1, 1, 3, 4], [-1, 1, 3, 5], [-1, 1, 3], [-1, 1, 4, 5], [-1, 1, 4], [-1, 1, 5], [-1, 1], [-1, 2, 3, 4, 5], [-1, 2, 3, 4], [-1, 2, 3, 5], [-1, 2, 3], [-1, 2, 4, 5], [-1, 2, 4], [-1, 2, 5], [-1, 2], [-1, 3, 4, 5], [-1, 3, 4], [-1, 3, 5], [-1, 3], [-1, 4, 5], [-1, 4], [-1, 5], [-1], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5], [0, 1, 2, 3], [0, 1, 2, 4, 5], [0, 1, 2, 4], [0, 1, 2, 5], [0, 1, 2], [0, 1, 3, 4, 5], [0, 1, 3, 4], [0, 1, 3, 5], [0, 1, 3], [0, 1, 4, 5], [0, 1, 4], [0, 1, 5], [0, 1], [0, 2, 3, 4, 5], [0, 2, 3, 4], [0, 2, 3, 5], [0, 2, 3], [0, 2, 4, 5], [0, 2, 4], [0, 2, 5], [0, 2], [0, 3, 4, 5], [0, 3, 4], [0, 3, 5], [0, 3], [0, 4, 5], [0, 4], [0, 5], [0], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [1], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [2], [3, 4, 5], [3, 4], [3, 5], [3], [4, 5], [4], [5], []])\n assert answers_match(candidate(nums=[0, -1, -1, 0, 1, 1, -2, -2]), [[-2, -2, -1, -1, 0, 0, 1, 1], [-2, -2, -1, -1, 0, 0, 1], [-2, -2, -1, -1, 0, 0], [-2, -2, -1, -1, 0, 1, 1], [-2, -2, -1, -1, 0, 1], [-2, -2, -1, -1, 0], [-2, -2, -1, -1, 1, 1], [-2, -2, -1, -1, 1], [-2, -2, -1, -1], [-2, -2, -1, 0, 0, 1, 1], [-2, -2, -1, 0, 0, 1], [-2, -2, -1, 0, 0], [-2, -2, -1, 0, 1, 1], [-2, -2, -1, 0, 1], [-2, -2, -1, 0], [-2, -2, -1, 1, 1], [-2, -2, -1, 1], [-2, -2, -1], [-2, -2, 0, 0, 1, 1], [-2, -2, 0, 0, 1], [-2, -2, 0, 0], [-2, -2, 0, 1, 1], [-2, -2, 0, 1], [-2, -2, 0], [-2, -2, 1, 1], [-2, -2, 1], [-2, -2], [-2, -1, -1, 0, 0, 1, 1], [-2, -1, -1, 0, 0, 1], [-2, -1, -1, 0, 0], [-2, -1, -1, 0, 1, 1], [-2, -1, -1, 0, 1], [-2, -1, -1, 0], [-2, -1, -1, 1, 1], [-2, -1, -1, 1], [-2, -1, -1], [-2, -1, 0, 0, 1, 1], [-2, -1, 0, 0, 1], [-2, -1, 0, 0], [-2, -1, 0, 1, 1], [-2, -1, 0, 1], [-2, -1, 0], [-2, -1, 1, 1], [-2, -1, 1], [-2, -1], [-2, 0, 0, 1, 1], [-2, 0, 0, 1], [-2, 0, 0], [-2, 0, 1, 1], [-2, 0, 1], [-2, 0], [-2, 1, 1], [-2, 1], [-2], [-1, -1, 0, 0, 1, 1], [-1, -1, 0, 0, 1], [-1, -1, 0, 0], [-1, -1, 0, 1, 1], [-1, -1, 0, 1], [-1, -1, 0], [-1, -1, 1, 1], [-1, -1, 1], [-1, -1], [-1, 0, 0, 1, 1], [-1, 0, 0, 1], [-1, 0, 0], [-1, 0, 1, 1], [-1, 0, 1], [-1, 0], [-1, 1, 1], [-1, 1], [-1], [0, 0, 1, 1], [0, 0, 1], [0, 0], [0, 1, 1], [0, 1], [0], [1, 1], [1], []])\n assert answers_match(candidate(nums=[4, 4, 4, 3, 3, 2, 2, 1, 1]), [[1, 1, 2, 2, 3, 3, 4, 4, 4], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 4], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 4], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 4], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 4], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4], [1, 1, 2, 3], [1, 1, 2, 4, 4, 4], [1, 1, 2, 4, 4], [1, 1, 2, 4], [1, 1, 2], [1, 1, 3, 3, 4, 4, 4], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4], [1, 1, 3, 3], [1, 1, 3, 4, 4, 4], [1, 1, 3, 4, 4], [1, 1, 3, 4], [1, 1, 3], [1, 1, 4, 4, 4], [1, 1, 4, 4], [1, 1, 4], [1, 1], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4], [2, 4, 4], [2, 4], [2], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4], [3, 4, 4], [3, 4], [3], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5]), [[0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5], [0, 1, 2, 3], [0, 1, 2, 4, 5], [0, 1, 2, 4], [0, 1, 2, 5], [0, 1, 2], [0, 1, 3, 4, 5], [0, 1, 3, 4], [0, 1, 3, 5], [0, 1, 3], [0, 1, 4, 5], [0, 1, 4], [0, 1, 5], [0, 1], [0, 2, 3, 4, 5], [0, 2, 3, 4], [0, 2, 3, 5], [0, 2, 3], [0, 2, 4, 5], [0, 2, 4], [0, 2, 5], [0, 2], [0, 3, 4, 5], [0, 3, 4], [0, 3, 5], [0, 3], [0, 4, 5], [0, 4], [0, 5], [0], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [1], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [2], [3, 4, 5], [3, 4], [3, 5], [3], [4, 5], [4], [5], []])\n assert answers_match(candidate(nums=[1, 2, 3, 3, 2, 1, 1, 2, 3]), [[1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2], [1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2], [1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 3], [1, 1, 1, 2], [1, 1, 1, 3, 3, 3], [1, 1, 1, 3, 3], [1, 1, 1, 3], [1, 1, 1], [1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3, 3], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3, 3], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3, 3], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3, 3], [1, 3, 3], [1, 3], [1], [2, 2, 2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [2, 2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3, 3], [2, 3, 3], [2, 3], [2], [3, 3, 3], [3, 3], [3], []])\n assert answers_match(candidate(nums=[7, 6, 5, 4, 3, 2, 1, 0]), [[0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6], [0, 1, 2, 3, 7], [0, 1, 2, 3], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6], [0, 1, 2, 4, 7], [0, 1, 2, 4], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6], [0, 1, 2, 5, 7], [0, 1, 2, 5], [0, 1, 2, 6, 7], [0, 1, 2, 6], [0, 1, 2, 7], [0, 1, 2], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6], [0, 1, 3, 4, 7], [0, 1, 3, 4], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6], [0, 1, 3, 5, 7], [0, 1, 3, 5], [0, 1, 3, 6, 7], [0, 1, 3, 6], [0, 1, 3, 7], [0, 1, 3], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6], [0, 1, 4, 5, 7], [0, 1, 4, 5], [0, 1, 4, 6, 7], [0, 1, 4, 6], [0, 1, 4, 7], [0, 1, 4], [0, 1, 5, 6, 7], [0, 1, 5, 6], [0, 1, 5, 7], [0, 1, 5], [0, 1, 6, 7], [0, 1, 6], [0, 1, 7], [0, 1], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6], [0, 2, 3, 4, 7], [0, 2, 3, 4], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6], [0, 2, 3, 5, 7], [0, 2, 3, 5], [0, 2, 3, 6, 7], [0, 2, 3, 6], [0, 2, 3, 7], [0, 2, 3], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6], [0, 2, 4, 5, 7], [0, 2, 4, 5], [0, 2, 4, 6, 7], [0, 2, 4, 6], [0, 2, 4, 7], [0, 2, 4], [0, 2, 5, 6, 7], [0, 2, 5, 6], [0, 2, 5, 7], [0, 2, 5], [0, 2, 6, 7], [0, 2, 6], [0, 2, 7], [0, 2], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6], [0, 3, 4, 5, 7], [0, 3, 4, 5], [0, 3, 4, 6, 7], [0, 3, 4, 6], [0, 3, 4, 7], [0, 3, 4], [0, 3, 5, 6, 7], [0, 3, 5, 6], [0, 3, 5, 7], [0, 3, 5], [0, 3, 6, 7], [0, 3, 6], [0, 3, 7], [0, 3], [0, 4, 5, 6, 7], [0, 4, 5, 6], [0, 4, 5, 7], [0, 4, 5], [0, 4, 6, 7], [0, 4, 6], [0, 4, 7], [0, 4], [0, 5, 6, 7], [0, 5, 6], [0, 5, 7], [0, 5], [0, 6, 7], [0, 6], [0, 7], [0], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5], [1, 2, 3, 6, 7], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5], [1, 2, 4, 6, 7], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4], [1, 2, 5, 6, 7], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5], [1, 2, 6, 7], [1, 2, 6], [1, 2, 7], [1, 2], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5], [1, 3, 4, 6, 7], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4], [1, 3, 5, 6, 7], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5], [1, 3, 6, 7], [1, 3, 6], [1, 3, 7], [1, 3], [1, 4, 5, 6, 7], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5], [1, 4, 6, 7], [1, 4, 6], [1, 4, 7], [1, 4], [1, 5, 6, 7], [1, 5, 6], [1, 5, 7], [1, 5], [1, 6, 7], [1, 6], [1, 7], [1], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5], [2, 3, 4, 6, 7], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4], [2, 3, 5, 6, 7], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5], [2, 3, 6, 7], [2, 3, 6], [2, 3, 7], [2, 3], [2, 4, 5, 6, 7], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5], [2, 4, 6, 7], [2, 4, 6], [2, 4, 7], [2, 4], [2, 5, 6, 7], [2, 5, 6], [2, 5, 7], [2, 5], [2, 6, 7], [2, 6], [2, 7], [2], [3, 4, 5, 6, 7], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5], [3, 4, 6, 7], [3, 4, 6], [3, 4, 7], [3, 4], [3, 5, 6, 7], [3, 5, 6], [3, 5, 7], [3, 5], [3, 6, 7], [3, 6], [3, 7], [3], [4, 5, 6, 7], [4, 5, 6], [4, 5, 7], [4, 5], [4, 6, 7], [4, 6], [4, 7], [4], [5, 6, 7], [5, 6], [5, 7], [5], [6, 7], [6], [7], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3]), [[1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3, 3], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3, 3], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3, 3], [2, 3, 3], [2, 3], [2], [3, 3, 3], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3]), [[1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 2, 2, 2, 3, 3, 4]), [[1, 1, 1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 1, 2, 2, 2, 3, 4], [1, 1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 2, 2, 3, 3, 4], [1, 1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 1, 2, 2, 3], [1, 1, 1, 1, 2, 2, 4], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 2, 3, 4], [1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 2, 4], [1, 1, 1, 1, 2], [1, 1, 1, 1, 3, 3, 4], [1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 3, 4], [1, 1, 1, 1, 3], [1, 1, 1, 1, 4], [1, 1, 1, 1], [1, 1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 3, 4], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 2, 2, 2], [1, 1, 1, 2, 2, 3, 3, 4], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2, 4], [1, 1, 1, 2, 2], [1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 3, 4], [1, 1, 1, 2, 3], [1, 1, 1, 2, 4], [1, 1, 1, 2], [1, 1, 1, 3, 3, 4], [1, 1, 1, 3, 3], [1, 1, 1, 3, 4], [1, 1, 1, 3], [1, 1, 1, 4], [1, 1, 1], [1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3, 4], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2, 4], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4], [1, 1, 2, 3], [1, 1, 2, 4], [1, 1, 2], [1, 1, 3, 3, 4], [1, 1, 3, 3], [1, 1, 3, 4], [1, 1, 3], [1, 1, 4], [1, 1], [1, 2, 2, 2, 3, 3, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4], [1, 3], [1, 4], [1], [2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4], [2, 2, 2], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4], [2, 3], [2, 4], [2], [3, 3, 4], [3, 3], [3, 4], [3], [4], []])\n assert answers_match(candidate(nums=[3, 1, 2, 2, 1]), [[1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3], [1, 1], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3], [1, 2], [1, 3], [1], [2, 2, 3], [2, 2], [2, 3], [2], [3], []])\n assert answers_match(candidate(nums=[-1, -1, -1, 0, 0, 1, 1]), [[-1, -1, -1, 0, 0, 1, 1], [-1, -1, -1, 0, 0, 1], [-1, -1, -1, 0, 0], [-1, -1, -1, 0, 1, 1], [-1, -1, -1, 0, 1], [-1, -1, -1, 0], [-1, -1, -1, 1, 1], [-1, -1, -1, 1], [-1, -1, -1], [-1, -1, 0, 0, 1, 1], [-1, -1, 0, 0, 1], [-1, -1, 0, 0], [-1, -1, 0, 1, 1], [-1, -1, 0, 1], [-1, -1, 0], [-1, -1, 1, 1], [-1, -1, 1], [-1, -1], [-1, 0, 0, 1, 1], [-1, 0, 0, 1], [-1, 0, 0], [-1, 0, 1, 1], [-1, 0, 1], [-1, 0], [-1, 1, 1], [-1, 1], [-1], [0, 0, 1, 1], [0, 0, 1], [0, 0], [0, 1, 1], [0, 1], [0], [1, 1], [1], []])\n assert answers_match(candidate(nums=[-5, -5, -4, -4, -3, -2, -1, 0, 0, 1]), [[-5, -5, -4, -4, -3, -2, -1, 0, 0, 1], [-5, -5, -4, -4, -3, -2, -1, 0, 0], [-5, -5, -4, -4, -3, -2, -1, 0, 1], [-5, -5, -4, -4, -3, -2, -1, 0], [-5, -5, -4, -4, -3, -2, -1, 1], [-5, -5, -4, -4, -3, -2, -1], [-5, -5, -4, -4, -3, -2, 0, 0, 1], [-5, -5, -4, -4, -3, -2, 0, 0], [-5, -5, -4, -4, -3, -2, 0, 1], [-5, -5, -4, -4, -3, -2, 0], [-5, -5, -4, -4, -3, -2, 1], [-5, -5, -4, -4, -3, -2], [-5, -5, -4, -4, -3, -1, 0, 0, 1], [-5, -5, -4, -4, -3, -1, 0, 0], [-5, -5, -4, -4, -3, -1, 0, 1], [-5, -5, -4, -4, -3, -1, 0], [-5, -5, -4, -4, -3, -1, 1], [-5, -5, -4, -4, -3, -1], [-5, -5, -4, -4, -3, 0, 0, 1], [-5, -5, -4, -4, -3, 0, 0], [-5, -5, -4, -4, -3, 0, 1], [-5, -5, -4, -4, -3, 0], [-5, -5, -4, -4, -3, 1], [-5, -5, -4, -4, -3], [-5, -5, -4, -4, -2, -1, 0, 0, 1], [-5, -5, -4, -4, -2, -1, 0, 0], [-5, -5, -4, -4, -2, -1, 0, 1], [-5, -5, -4, -4, -2, -1, 0], [-5, -5, -4, -4, -2, -1, 1], [-5, -5, -4, -4, -2, -1], [-5, -5, -4, -4, -2, 0, 0, 1], [-5, -5, -4, -4, -2, 0, 0], [-5, -5, -4, -4, -2, 0, 1], [-5, -5, -4, -4, -2, 0], [-5, -5, -4, -4, -2, 1], [-5, -5, -4, -4, -2], [-5, -5, -4, -4, -1, 0, 0, 1], [-5, -5, -4, -4, -1, 0, 0], [-5, -5, -4, -4, -1, 0, 1], [-5, -5, -4, -4, -1, 0], [-5, -5, -4, -4, -1, 1], [-5, -5, -4, -4, -1], [-5, -5, -4, -4, 0, 0, 1], [-5, -5, -4, -4, 0, 0], [-5, -5, -4, -4, 0, 1], [-5, -5, -4, -4, 0], [-5, -5, -4, -4, 1], [-5, -5, -4, -4], [-5, -5, -4, -3, -2, -1, 0, 0, 1], [-5, -5, -4, -3, -2, -1, 0, 0], [-5, -5, -4, -3, -2, -1, 0, 1], [-5, -5, -4, -3, -2, -1, 0], [-5, -5, -4, -3, -2, -1, 1], [-5, -5, -4, -3, -2, -1], [-5, -5, -4, -3, -2, 0, 0, 1], [-5, -5, -4, -3, -2, 0, 0], [-5, -5, -4, -3, -2, 0, 1], [-5, -5, -4, -3, -2, 0], [-5, -5, -4, -3, -2, 1], [-5, -5, -4, -3, -2], [-5, -5, -4, -3, -1, 0, 0, 1], [-5, -5, -4, -3, -1, 0, 0], [-5, -5, -4, -3, -1, 0, 1], [-5, -5, -4, -3, -1, 0], [-5, -5, -4, -3, -1, 1], [-5, -5, -4, -3, -1], [-5, -5, -4, -3, 0, 0, 1], [-5, -5, -4, -3, 0, 0], [-5, -5, -4, -3, 0, 1], [-5, -5, -4, -3, 0], [-5, -5, -4, -3, 1], [-5, -5, -4, -3], [-5, -5, -4, -2, -1, 0, 0, 1], [-5, -5, -4, -2, -1, 0, 0], [-5, -5, -4, -2, -1, 0, 1], [-5, -5, -4, -2, -1, 0], [-5, -5, -4, -2, -1, 1], [-5, -5, -4, -2, -1], [-5, -5, -4, -2, 0, 0, 1], [-5, -5, -4, -2, 0, 0], [-5, -5, -4, -2, 0, 1], [-5, -5, -4, -2, 0], [-5, -5, -4, -2, 1], [-5, -5, -4, -2], [-5, -5, -4, -1, 0, 0, 1], [-5, -5, -4, -1, 0, 0], [-5, -5, -4, -1, 0, 1], [-5, -5, -4, -1, 0], [-5, -5, -4, -1, 1], [-5, -5, -4, -1], [-5, -5, -4, 0, 0, 1], [-5, -5, -4, 0, 0], [-5, -5, -4, 0, 1], [-5, -5, -4, 0], [-5, -5, -4, 1], [-5, -5, -4], [-5, -5, -3, -2, -1, 0, 0, 1], [-5, -5, -3, -2, -1, 0, 0], [-5, -5, -3, -2, -1, 0, 1], [-5, -5, -3, -2, -1, 0], [-5, -5, -3, -2, -1, 1], [-5, -5, -3, -2, -1], [-5, -5, -3, -2, 0, 0, 1], [-5, -5, -3, -2, 0, 0], [-5, -5, -3, -2, 0, 1], [-5, -5, -3, -2, 0], [-5, -5, -3, -2, 1], [-5, -5, -3, -2], [-5, -5, -3, -1, 0, 0, 1], [-5, -5, -3, -1, 0, 0], [-5, -5, -3, -1, 0, 1], [-5, -5, -3, -1, 0], [-5, -5, -3, -1, 1], [-5, -5, -3, -1], [-5, -5, -3, 0, 0, 1], [-5, -5, -3, 0, 0], [-5, -5, -3, 0, 1], [-5, -5, -3, 0], [-5, -5, -3, 1], [-5, -5, -3], [-5, -5, -2, -1, 0, 0, 1], [-5, -5, -2, -1, 0, 0], [-5, -5, -2, -1, 0, 1], [-5, -5, -2, -1, 0], [-5, -5, -2, -1, 1], [-5, -5, -2, -1], [-5, -5, -2, 0, 0, 1], [-5, -5, -2, 0, 0], [-5, -5, -2, 0, 1], [-5, -5, -2, 0], [-5, -5, -2, 1], [-5, -5, -2], [-5, -5, -1, 0, 0, 1], [-5, -5, -1, 0, 0], [-5, -5, -1, 0, 1], [-5, -5, -1, 0], [-5, -5, -1, 1], [-5, -5, -1], [-5, -5, 0, 0, 1], [-5, -5, 0, 0], [-5, -5, 0, 1], [-5, -5, 0], [-5, -5, 1], [-5, -5], [-5, -4, -4, -3, -2, -1, 0, 0, 1], [-5, -4, -4, -3, -2, -1, 0, 0], [-5, -4, -4, -3, -2, -1, 0, 1], [-5, -4, -4, -3, -2, -1, 0], [-5, -4, -4, -3, -2, -1, 1], [-5, -4, -4, -3, -2, -1], [-5, -4, -4, -3, -2, 0, 0, 1], [-5, -4, -4, -3, -2, 0, 0], [-5, -4, -4, -3, -2, 0, 1], [-5, -4, -4, -3, -2, 0], [-5, -4, -4, -3, -2, 1], [-5, -4, -4, -3, -2], [-5, -4, -4, -3, -1, 0, 0, 1], [-5, -4, -4, -3, -1, 0, 0], [-5, -4, -4, -3, -1, 0, 1], [-5, -4, -4, -3, -1, 0], [-5, -4, -4, -3, -1, 1], [-5, -4, -4, -3, -1], [-5, -4, -4, -3, 0, 0, 1], [-5, -4, -4, -3, 0, 0], [-5, -4, -4, -3, 0, 1], [-5, -4, -4, -3, 0], [-5, -4, -4, -3, 1], [-5, -4, -4, -3], [-5, -4, -4, -2, -1, 0, 0, 1], [-5, -4, -4, -2, -1, 0, 0], [-5, -4, -4, -2, -1, 0, 1], [-5, -4, -4, -2, -1, 0], [-5, -4, -4, -2, -1, 1], [-5, -4, -4, -2, -1], [-5, -4, -4, -2, 0, 0, 1], [-5, -4, -4, -2, 0, 0], [-5, -4, -4, -2, 0, 1], [-5, -4, -4, -2, 0], [-5, -4, -4, -2, 1], [-5, -4, -4, -2], [-5, -4, -4, -1, 0, 0, 1], [-5, -4, -4, -1, 0, 0], [-5, -4, -4, -1, 0, 1], [-5, -4, -4, -1, 0], [-5, -4, -4, -1, 1], [-5, -4, -4, -1], [-5, -4, -4, 0, 0, 1], [-5, -4, -4, 0, 0], [-5, -4, -4, 0, 1], [-5, -4, -4, 0], [-5, -4, -4, 1], [-5, -4, -4], [-5, -4, -3, -2, -1, 0, 0, 1], [-5, -4, -3, -2, -1, 0, 0], [-5, -4, -3, -2, -1, 0, 1], [-5, -4, -3, -2, -1, 0], [-5, -4, -3, -2, -1, 1], [-5, -4, -3, -2, -1], [-5, -4, -3, -2, 0, 0, 1], [-5, -4, -3, -2, 0, 0], [-5, -4, -3, -2, 0, 1], [-5, -4, -3, -2, 0], [-5, -4, -3, -2, 1], [-5, -4, -3, -2], [-5, -4, -3, -1, 0, 0, 1], [-5, -4, -3, -1, 0, 0], [-5, -4, -3, -1, 0, 1], [-5, -4, -3, -1, 0], [-5, -4, -3, -1, 1], [-5, -4, -3, -1], [-5, -4, -3, 0, 0, 1], [-5, -4, -3, 0, 0], [-5, -4, -3, 0, 1], [-5, -4, -3, 0], [-5, -4, -3, 1], [-5, -4, -3], [-5, -4, -2, -1, 0, 0, 1], [-5, -4, -2, -1, 0, 0], [-5, -4, -2, -1, 0, 1], [-5, -4, -2, -1, 0], [-5, -4, -2, -1, 1], [-5, -4, -2, -1], [-5, -4, -2, 0, 0, 1], [-5, -4, -2, 0, 0], [-5, -4, -2, 0, 1], [-5, -4, -2, 0], [-5, -4, -2, 1], [-5, -4, -2], [-5, -4, -1, 0, 0, 1], [-5, -4, -1, 0, 0], [-5, -4, -1, 0, 1], [-5, -4, -1, 0], [-5, -4, -1, 1], [-5, -4, -1], [-5, -4, 0, 0, 1], [-5, -4, 0, 0], [-5, -4, 0, 1], [-5, -4, 0], [-5, -4, 1], [-5, -4], [-5, -3, -2, -1, 0, 0, 1], [-5, -3, -2, -1, 0, 0], [-5, -3, -2, -1, 0, 1], [-5, -3, -2, -1, 0], [-5, -3, -2, -1, 1], [-5, -3, -2, -1], [-5, -3, -2, 0, 0, 1], [-5, -3, -2, 0, 0], [-5, -3, -2, 0, 1], [-5, -3, -2, 0], [-5, -3, -2, 1], [-5, -3, -2], [-5, -3, -1, 0, 0, 1], [-5, -3, -1, 0, 0], [-5, -3, -1, 0, 1], [-5, -3, -1, 0], [-5, -3, -1, 1], [-5, -3, -1], [-5, -3, 0, 0, 1], [-5, -3, 0, 0], [-5, -3, 0, 1], [-5, -3, 0], [-5, -3, 1], [-5, -3], [-5, -2, -1, 0, 0, 1], [-5, -2, -1, 0, 0], [-5, -2, -1, 0, 1], [-5, -2, -1, 0], [-5, -2, -1, 1], [-5, -2, -1], [-5, -2, 0, 0, 1], [-5, -2, 0, 0], [-5, -2, 0, 1], [-5, -2, 0], [-5, -2, 1], [-5, -2], [-5, -1, 0, 0, 1], [-5, -1, 0, 0], [-5, -1, 0, 1], [-5, -1, 0], [-5, -1, 1], [-5, -1], [-5, 0, 0, 1], [-5, 0, 0], [-5, 0, 1], [-5, 0], [-5, 1], [-5], [-4, -4, -3, -2, -1, 0, 0, 1], [-4, -4, -3, -2, -1, 0, 0], [-4, -4, -3, -2, -1, 0, 1], [-4, -4, -3, -2, -1, 0], [-4, -4, -3, -2, -1, 1], [-4, -4, -3, -2, -1], [-4, -4, -3, -2, 0, 0, 1], [-4, -4, -3, -2, 0, 0], [-4, -4, -3, -2, 0, 1], [-4, -4, -3, -2, 0], [-4, -4, -3, -2, 1], [-4, -4, -3, -2], [-4, -4, -3, -1, 0, 0, 1], [-4, -4, -3, -1, 0, 0], [-4, -4, -3, -1, 0, 1], [-4, -4, -3, -1, 0], [-4, -4, -3, -1, 1], [-4, -4, -3, -1], [-4, -4, -3, 0, 0, 1], [-4, -4, -3, 0, 0], [-4, -4, -3, 0, 1], [-4, -4, -3, 0], [-4, -4, -3, 1], [-4, -4, -3], [-4, -4, -2, -1, 0, 0, 1], [-4, -4, -2, -1, 0, 0], [-4, -4, -2, -1, 0, 1], [-4, -4, -2, -1, 0], [-4, -4, -2, -1, 1], [-4, -4, -2, -1], [-4, -4, -2, 0, 0, 1], [-4, -4, -2, 0, 0], [-4, -4, -2, 0, 1], [-4, -4, -2, 0], [-4, -4, -2, 1], [-4, -4, -2], [-4, -4, -1, 0, 0, 1], [-4, -4, -1, 0, 0], [-4, -4, -1, 0, 1], [-4, -4, -1, 0], [-4, -4, -1, 1], [-4, -4, -1], [-4, -4, 0, 0, 1], [-4, -4, 0, 0], [-4, -4, 0, 1], [-4, -4, 0], [-4, -4, 1], [-4, -4], [-4, -3, -2, -1, 0, 0, 1], [-4, -3, -2, -1, 0, 0], [-4, -3, -2, -1, 0, 1], [-4, -3, -2, -1, 0], [-4, -3, -2, -1, 1], [-4, -3, -2, -1], [-4, -3, -2, 0, 0, 1], [-4, -3, -2, 0, 0], [-4, -3, -2, 0, 1], [-4, -3, -2, 0], [-4, -3, -2, 1], [-4, -3, -2], [-4, -3, -1, 0, 0, 1], [-4, -3, -1, 0, 0], [-4, -3, -1, 0, 1], [-4, -3, -1, 0], [-4, -3, -1, 1], [-4, -3, -1], [-4, -3, 0, 0, 1], [-4, -3, 0, 0], [-4, -3, 0, 1], [-4, -3, 0], [-4, -3, 1], [-4, -3], [-4, -2, -1, 0, 0, 1], [-4, -2, -1, 0, 0], [-4, -2, -1, 0, 1], [-4, -2, -1, 0], [-4, -2, -1, 1], [-4, -2, -1], [-4, -2, 0, 0, 1], [-4, -2, 0, 0], [-4, -2, 0, 1], [-4, -2, 0], [-4, -2, 1], [-4, -2], [-4, -1, 0, 0, 1], [-4, -1, 0, 0], [-4, -1, 0, 1], [-4, -1, 0], [-4, -1, 1], [-4, -1], [-4, 0, 0, 1], [-4, 0, 0], [-4, 0, 1], [-4, 0], [-4, 1], [-4], [-3, -2, -1, 0, 0, 1], [-3, -2, -1, 0, 0], [-3, -2, -1, 0, 1], [-3, -2, -1, 0], [-3, -2, -1, 1], [-3, -2, -1], [-3, -2, 0, 0, 1], [-3, -2, 0, 0], [-3, -2, 0, 1], [-3, -2, 0], [-3, -2, 1], [-3, -2], [-3, -1, 0, 0, 1], [-3, -1, 0, 0], [-3, -1, 0, 1], [-3, -1, 0], [-3, -1, 1], [-3, -1], [-3, 0, 0, 1], [-3, 0, 0], [-3, 0, 1], [-3, 0], [-3, 1], [-3], [-2, -1, 0, 0, 1], [-2, -1, 0, 0], [-2, -1, 0, 1], [-2, -1, 0], [-2, -1, 1], [-2, -1], [-2, 0, 0, 1], [-2, 0, 0], [-2, 0, 1], [-2, 0], [-2, 1], [-2], [-1, 0, 0, 1], [-1, 0, 0], [-1, 0, 1], [-1, 0], [-1, 1], [-1], [0, 0, 1], [0, 0], [0, 1], [0], [1], []])\n assert answers_match(candidate(nums=[4, 4, 4, 3, 3, 2, 1, 0]), [[0, 1, 2, 3, 3, 4, 4, 4], [0, 1, 2, 3, 3, 4, 4], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 3], [0, 1, 2, 3, 4, 4, 4], [0, 1, 2, 3, 4, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3], [0, 1, 2, 4, 4, 4], [0, 1, 2, 4, 4], [0, 1, 2, 4], [0, 1, 2], [0, 1, 3, 3, 4, 4, 4], [0, 1, 3, 3, 4, 4], [0, 1, 3, 3, 4], [0, 1, 3, 3], [0, 1, 3, 4, 4, 4], [0, 1, 3, 4, 4], [0, 1, 3, 4], [0, 1, 3], [0, 1, 4, 4, 4], [0, 1, 4, 4], [0, 1, 4], [0, 1], [0, 2, 3, 3, 4, 4, 4], [0, 2, 3, 3, 4, 4], [0, 2, 3, 3, 4], [0, 2, 3, 3], [0, 2, 3, 4, 4, 4], [0, 2, 3, 4, 4], [0, 2, 3, 4], [0, 2, 3], [0, 2, 4, 4, 4], [0, 2, 4, 4], [0, 2, 4], [0, 2], [0, 3, 3, 4, 4, 4], [0, 3, 3, 4, 4], [0, 3, 3, 4], [0, 3, 3], [0, 3, 4, 4, 4], [0, 3, 4, 4], [0, 3, 4], [0, 3], [0, 4, 4, 4], [0, 4, 4], [0, 4], [0], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4], [2, 4, 4], [2, 4], [2], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4], [3, 4, 4], [3, 4], [3], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[-1, -1, 0, 0, 1, 1]), [[-1, -1, 0, 0, 1, 1], [-1, -1, 0, 0, 1], [-1, -1, 0, 0], [-1, -1, 0, 1, 1], [-1, -1, 0, 1], [-1, -1, 0], [-1, -1, 1, 1], [-1, -1, 1], [-1, -1], [-1, 0, 0, 1, 1], [-1, 0, 0, 1], [-1, 0, 0], [-1, 0, 1, 1], [-1, 0, 1], [-1, 0], [-1, 1, 1], [-1, 1], [-1], [0, 0, 1, 1], [0, 0, 1], [0, 0], [0, 1, 1], [0, 1], [0], [1, 1], [1], []])\n assert answers_match(candidate(nums=[7, 3, 3, 7, 3, 7]), [[3, 3, 3, 7, 7, 7], [3, 3, 3, 7, 7], [3, 3, 3, 7], [3, 3, 3], [3, 3, 7, 7, 7], [3, 3, 7, 7], [3, 3, 7], [3, 3], [3, 7, 7, 7], [3, 7, 7], [3, 7], [3], [7, 7, 7], [7, 7], [7], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4]), [[1, 2, 2, 3, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4, 4], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4, 4], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4, 4], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4, 4], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 3, 4, 4, 4, 4], [1, 3, 3, 3, 4, 4, 4], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3], [1, 3, 3, 4, 4, 4, 4], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4, 4], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4, 4], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [2, 2, 3, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4, 4], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4, 4], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 3, 4, 4, 4, 4], [2, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3], [2, 3, 3, 4, 4, 4, 4], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4, 4], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4, 4], [2, 4, 4, 4], [2, 4, 4], [2, 4], [2], [3, 3, 3, 4, 4, 4, 4], [3, 3, 3, 4, 4, 4], [3, 3, 3, 4, 4], [3, 3, 3, 4], [3, 3, 3], [3, 3, 4, 4, 4, 4], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4, 4], [3, 4, 4, 4], [3, 4, 4], [3, 4], [3], [4, 4, 4, 4], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[-2, -2, -2, 0, 0, 1, 1]), [[-2, -2, -2, 0, 0, 1, 1], [-2, -2, -2, 0, 0, 1], [-2, -2, -2, 0, 0], [-2, -2, -2, 0, 1, 1], [-2, -2, -2, 0, 1], [-2, -2, -2, 0], [-2, -2, -2, 1, 1], [-2, -2, -2, 1], [-2, -2, -2], [-2, -2, 0, 0, 1, 1], [-2, -2, 0, 0, 1], [-2, -2, 0, 0], [-2, -2, 0, 1, 1], [-2, -2, 0, 1], [-2, -2, 0], [-2, -2, 1, 1], [-2, -2, 1], [-2, -2], [-2, 0, 0, 1, 1], [-2, 0, 0, 1], [-2, 0, 0], [-2, 0, 1, 1], [-2, 0, 1], [-2, 0], [-2, 1, 1], [-2, 1], [-2], [0, 0, 1, 1], [0, 0, 1], [0, 0], [0, 1, 1], [0, 1], [0], [1, 1], [1], []])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1, 5, 4, 3, 2, 1]), [[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5, 5], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5, 5], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5, 5], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5, 5], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5, 5], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5, 5], [1, 1, 5], [1, 1], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5], [1, 5], [1], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5], [2, 5], [2], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5], [3, 5], [3], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5], [4, 5], [4], [5, 5], [5], []])\n assert answers_match(candidate(nums=[1, 2, 3, 2]), [[1, 2, 2, 3], [1, 2, 2], [1, 2, 3], [1, 2], [1, 3], [1], [2, 2, 3], [2, 2], [2, 3], [2], [3], []])\n assert answers_match(candidate(nums=[-1, 1, 0, -1, 1]), [[-1, -1, 0, 1, 1], [-1, -1, 0, 1], [-1, -1, 0], [-1, -1, 1, 1], [-1, -1, 1], [-1, -1], [-1, 0, 1, 1], [-1, 0, 1], [-1, 0], [-1, 1, 1], [-1, 1], [-1], [0, 1, 1], [0, 1], [0], [1, 1], [1], []])\n assert answers_match(candidate(nums=[-2, -2, -1, 0, 0, 1, 1, 2]), [[-2, -2, -1, 0, 0, 1, 1, 2], [-2, -2, -1, 0, 0, 1, 1], [-2, -2, -1, 0, 0, 1, 2], [-2, -2, -1, 0, 0, 1], [-2, -2, -1, 0, 0, 2], [-2, -2, -1, 0, 0], [-2, -2, -1, 0, 1, 1, 2], [-2, -2, -1, 0, 1, 1], [-2, -2, -1, 0, 1, 2], [-2, -2, -1, 0, 1], [-2, -2, -1, 0, 2], [-2, -2, -1, 0], [-2, -2, -1, 1, 1, 2], [-2, -2, -1, 1, 1], [-2, -2, -1, 1, 2], [-2, -2, -1, 1], [-2, -2, -1, 2], [-2, -2, -1], [-2, -2, 0, 0, 1, 1, 2], [-2, -2, 0, 0, 1, 1], [-2, -2, 0, 0, 1, 2], [-2, -2, 0, 0, 1], [-2, -2, 0, 0, 2], [-2, -2, 0, 0], [-2, -2, 0, 1, 1, 2], [-2, -2, 0, 1, 1], [-2, -2, 0, 1, 2], [-2, -2, 0, 1], [-2, -2, 0, 2], [-2, -2, 0], [-2, -2, 1, 1, 2], [-2, -2, 1, 1], [-2, -2, 1, 2], [-2, -2, 1], [-2, -2, 2], [-2, -2], [-2, -1, 0, 0, 1, 1, 2], [-2, -1, 0, 0, 1, 1], [-2, -1, 0, 0, 1, 2], [-2, -1, 0, 0, 1], [-2, -1, 0, 0, 2], [-2, -1, 0, 0], [-2, -1, 0, 1, 1, 2], [-2, -1, 0, 1, 1], [-2, -1, 0, 1, 2], [-2, -1, 0, 1], [-2, -1, 0, 2], [-2, -1, 0], [-2, -1, 1, 1, 2], [-2, -1, 1, 1], [-2, -1, 1, 2], [-2, -1, 1], [-2, -1, 2], [-2, -1], [-2, 0, 0, 1, 1, 2], [-2, 0, 0, 1, 1], [-2, 0, 0, 1, 2], [-2, 0, 0, 1], [-2, 0, 0, 2], [-2, 0, 0], [-2, 0, 1, 1, 2], [-2, 0, 1, 1], [-2, 0, 1, 2], [-2, 0, 1], [-2, 0, 2], [-2, 0], [-2, 1, 1, 2], [-2, 1, 1], [-2, 1, 2], [-2, 1], [-2, 2], [-2], [-1, 0, 0, 1, 1, 2], [-1, 0, 0, 1, 1], [-1, 0, 0, 1, 2], [-1, 0, 0, 1], [-1, 0, 0, 2], [-1, 0, 0], [-1, 0, 1, 1, 2], [-1, 0, 1, 1], [-1, 0, 1, 2], [-1, 0, 1], [-1, 0, 2], [-1, 0], [-1, 1, 1, 2], [-1, 1, 1], [-1, 1, 2], [-1, 1], [-1, 2], [-1], [0, 0, 1, 1, 2], [0, 0, 1, 1], [0, 0, 1, 2], [0, 0, 1], [0, 0, 2], [0, 0], [0, 1, 1, 2], [0, 1, 1], [0, 1, 2], [0, 1], [0, 2], [0], [1, 1, 2], [1, 1], [1, 2], [1], [2], []])\n assert answers_match(candidate(nums=[-5, -5, -5, 0, 0, 5, 5]), [[-5, -5, -5, 0, 0, 5, 5], [-5, -5, -5, 0, 0, 5], [-5, -5, -5, 0, 0], [-5, -5, -5, 0, 5, 5], [-5, -5, -5, 0, 5], [-5, -5, -5, 0], [-5, -5, -5, 5, 5], [-5, -5, -5, 5], [-5, -5, -5], [-5, -5, 0, 0, 5, 5], [-5, -5, 0, 0, 5], [-5, -5, 0, 0], [-5, -5, 0, 5, 5], [-5, -5, 0, 5], [-5, -5, 0], [-5, -5, 5, 5], [-5, -5, 5], [-5, -5], [-5, 0, 0, 5, 5], [-5, 0, 0, 5], [-5, 0, 0], [-5, 0, 5, 5], [-5, 0, 5], [-5, 0], [-5, 5, 5], [-5, 5], [-5], [0, 0, 5, 5], [0, 0, 5], [0, 0], [0, 5, 5], [0, 5], [0], [5, 5], [5], []])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0], [0], []])\n assert answers_match(candidate(nums=[-2, -1, 0, 1, 2, 2, 3, 4, 4, 5]), [[-2, -1, 0, 1, 2, 2, 3, 4, 4, 5], [-2, -1, 0, 1, 2, 2, 3, 4, 4], [-2, -1, 0, 1, 2, 2, 3, 4, 5], [-2, -1, 0, 1, 2, 2, 3, 4], [-2, -1, 0, 1, 2, 2, 3, 5], [-2, -1, 0, 1, 2, 2, 3], [-2, -1, 0, 1, 2, 2, 4, 4, 5], [-2, -1, 0, 1, 2, 2, 4, 4], [-2, -1, 0, 1, 2, 2, 4, 5], [-2, -1, 0, 1, 2, 2, 4], [-2, -1, 0, 1, 2, 2, 5], [-2, -1, 0, 1, 2, 2], [-2, -1, 0, 1, 2, 3, 4, 4, 5], [-2, -1, 0, 1, 2, 3, 4, 4], [-2, -1, 0, 1, 2, 3, 4, 5], [-2, -1, 0, 1, 2, 3, 4], [-2, -1, 0, 1, 2, 3, 5], [-2, -1, 0, 1, 2, 3], [-2, -1, 0, 1, 2, 4, 4, 5], [-2, -1, 0, 1, 2, 4, 4], [-2, -1, 0, 1, 2, 4, 5], [-2, -1, 0, 1, 2, 4], [-2, -1, 0, 1, 2, 5], [-2, -1, 0, 1, 2], [-2, -1, 0, 1, 3, 4, 4, 5], [-2, -1, 0, 1, 3, 4, 4], [-2, -1, 0, 1, 3, 4, 5], [-2, -1, 0, 1, 3, 4], [-2, -1, 0, 1, 3, 5], [-2, -1, 0, 1, 3], [-2, -1, 0, 1, 4, 4, 5], [-2, -1, 0, 1, 4, 4], [-2, -1, 0, 1, 4, 5], [-2, -1, 0, 1, 4], [-2, -1, 0, 1, 5], [-2, -1, 0, 1], [-2, -1, 0, 2, 2, 3, 4, 4, 5], [-2, -1, 0, 2, 2, 3, 4, 4], [-2, -1, 0, 2, 2, 3, 4, 5], [-2, -1, 0, 2, 2, 3, 4], [-2, -1, 0, 2, 2, 3, 5], [-2, -1, 0, 2, 2, 3], [-2, -1, 0, 2, 2, 4, 4, 5], [-2, -1, 0, 2, 2, 4, 4], [-2, -1, 0, 2, 2, 4, 5], [-2, -1, 0, 2, 2, 4], [-2, -1, 0, 2, 2, 5], [-2, -1, 0, 2, 2], [-2, -1, 0, 2, 3, 4, 4, 5], [-2, -1, 0, 2, 3, 4, 4], [-2, -1, 0, 2, 3, 4, 5], [-2, -1, 0, 2, 3, 4], [-2, -1, 0, 2, 3, 5], [-2, -1, 0, 2, 3], [-2, -1, 0, 2, 4, 4, 5], [-2, -1, 0, 2, 4, 4], [-2, -1, 0, 2, 4, 5], [-2, -1, 0, 2, 4], [-2, -1, 0, 2, 5], [-2, -1, 0, 2], [-2, -1, 0, 3, 4, 4, 5], [-2, -1, 0, 3, 4, 4], [-2, -1, 0, 3, 4, 5], [-2, -1, 0, 3, 4], [-2, -1, 0, 3, 5], [-2, -1, 0, 3], [-2, -1, 0, 4, 4, 5], [-2, -1, 0, 4, 4], [-2, -1, 0, 4, 5], [-2, -1, 0, 4], [-2, -1, 0, 5], [-2, -1, 0], [-2, -1, 1, 2, 2, 3, 4, 4, 5], [-2, -1, 1, 2, 2, 3, 4, 4], [-2, -1, 1, 2, 2, 3, 4, 5], [-2, -1, 1, 2, 2, 3, 4], [-2, -1, 1, 2, 2, 3, 5], [-2, -1, 1, 2, 2, 3], [-2, -1, 1, 2, 2, 4, 4, 5], [-2, -1, 1, 2, 2, 4, 4], [-2, -1, 1, 2, 2, 4, 5], [-2, -1, 1, 2, 2, 4], [-2, -1, 1, 2, 2, 5], [-2, -1, 1, 2, 2], [-2, -1, 1, 2, 3, 4, 4, 5], [-2, -1, 1, 2, 3, 4, 4], [-2, -1, 1, 2, 3, 4, 5], [-2, -1, 1, 2, 3, 4], [-2, -1, 1, 2, 3, 5], [-2, -1, 1, 2, 3], [-2, -1, 1, 2, 4, 4, 5], [-2, -1, 1, 2, 4, 4], [-2, -1, 1, 2, 4, 5], [-2, -1, 1, 2, 4], [-2, -1, 1, 2, 5], [-2, -1, 1, 2], [-2, -1, 1, 3, 4, 4, 5], [-2, -1, 1, 3, 4, 4], [-2, -1, 1, 3, 4, 5], [-2, -1, 1, 3, 4], [-2, -1, 1, 3, 5], [-2, -1, 1, 3], [-2, -1, 1, 4, 4, 5], [-2, -1, 1, 4, 4], [-2, -1, 1, 4, 5], [-2, -1, 1, 4], [-2, -1, 1, 5], [-2, -1, 1], [-2, -1, 2, 2, 3, 4, 4, 5], [-2, -1, 2, 2, 3, 4, 4], [-2, -1, 2, 2, 3, 4, 5], [-2, -1, 2, 2, 3, 4], [-2, -1, 2, 2, 3, 5], [-2, -1, 2, 2, 3], [-2, -1, 2, 2, 4, 4, 5], [-2, -1, 2, 2, 4, 4], [-2, -1, 2, 2, 4, 5], [-2, -1, 2, 2, 4], [-2, -1, 2, 2, 5], [-2, -1, 2, 2], [-2, -1, 2, 3, 4, 4, 5], [-2, -1, 2, 3, 4, 4], [-2, -1, 2, 3, 4, 5], [-2, -1, 2, 3, 4], [-2, -1, 2, 3, 5], [-2, -1, 2, 3], [-2, -1, 2, 4, 4, 5], [-2, -1, 2, 4, 4], [-2, -1, 2, 4, 5], [-2, -1, 2, 4], [-2, -1, 2, 5], [-2, -1, 2], [-2, -1, 3, 4, 4, 5], [-2, -1, 3, 4, 4], [-2, -1, 3, 4, 5], [-2, -1, 3, 4], [-2, -1, 3, 5], [-2, -1, 3], [-2, -1, 4, 4, 5], [-2, -1, 4, 4], [-2, -1, 4, 5], [-2, -1, 4], [-2, -1, 5], [-2, -1], [-2, 0, 1, 2, 2, 3, 4, 4, 5], [-2, 0, 1, 2, 2, 3, 4, 4], [-2, 0, 1, 2, 2, 3, 4, 5], [-2, 0, 1, 2, 2, 3, 4], [-2, 0, 1, 2, 2, 3, 5], [-2, 0, 1, 2, 2, 3], [-2, 0, 1, 2, 2, 4, 4, 5], [-2, 0, 1, 2, 2, 4, 4], [-2, 0, 1, 2, 2, 4, 5], [-2, 0, 1, 2, 2, 4], [-2, 0, 1, 2, 2, 5], [-2, 0, 1, 2, 2], [-2, 0, 1, 2, 3, 4, 4, 5], [-2, 0, 1, 2, 3, 4, 4], [-2, 0, 1, 2, 3, 4, 5], [-2, 0, 1, 2, 3, 4], [-2, 0, 1, 2, 3, 5], [-2, 0, 1, 2, 3], [-2, 0, 1, 2, 4, 4, 5], [-2, 0, 1, 2, 4, 4], [-2, 0, 1, 2, 4, 5], [-2, 0, 1, 2, 4], [-2, 0, 1, 2, 5], [-2, 0, 1, 2], [-2, 0, 1, 3, 4, 4, 5], [-2, 0, 1, 3, 4, 4], [-2, 0, 1, 3, 4, 5], [-2, 0, 1, 3, 4], [-2, 0, 1, 3, 5], [-2, 0, 1, 3], [-2, 0, 1, 4, 4, 5], [-2, 0, 1, 4, 4], [-2, 0, 1, 4, 5], [-2, 0, 1, 4], [-2, 0, 1, 5], [-2, 0, 1], [-2, 0, 2, 2, 3, 4, 4, 5], [-2, 0, 2, 2, 3, 4, 4], [-2, 0, 2, 2, 3, 4, 5], [-2, 0, 2, 2, 3, 4], [-2, 0, 2, 2, 3, 5], [-2, 0, 2, 2, 3], [-2, 0, 2, 2, 4, 4, 5], [-2, 0, 2, 2, 4, 4], [-2, 0, 2, 2, 4, 5], [-2, 0, 2, 2, 4], [-2, 0, 2, 2, 5], [-2, 0, 2, 2], [-2, 0, 2, 3, 4, 4, 5], [-2, 0, 2, 3, 4, 4], [-2, 0, 2, 3, 4, 5], [-2, 0, 2, 3, 4], [-2, 0, 2, 3, 5], [-2, 0, 2, 3], [-2, 0, 2, 4, 4, 5], [-2, 0, 2, 4, 4], [-2, 0, 2, 4, 5], [-2, 0, 2, 4], [-2, 0, 2, 5], [-2, 0, 2], [-2, 0, 3, 4, 4, 5], [-2, 0, 3, 4, 4], [-2, 0, 3, 4, 5], [-2, 0, 3, 4], [-2, 0, 3, 5], [-2, 0, 3], [-2, 0, 4, 4, 5], [-2, 0, 4, 4], [-2, 0, 4, 5], [-2, 0, 4], [-2, 0, 5], [-2, 0], [-2, 1, 2, 2, 3, 4, 4, 5], [-2, 1, 2, 2, 3, 4, 4], [-2, 1, 2, 2, 3, 4, 5], [-2, 1, 2, 2, 3, 4], [-2, 1, 2, 2, 3, 5], [-2, 1, 2, 2, 3], [-2, 1, 2, 2, 4, 4, 5], [-2, 1, 2, 2, 4, 4], [-2, 1, 2, 2, 4, 5], [-2, 1, 2, 2, 4], [-2, 1, 2, 2, 5], [-2, 1, 2, 2], [-2, 1, 2, 3, 4, 4, 5], [-2, 1, 2, 3, 4, 4], [-2, 1, 2, 3, 4, 5], [-2, 1, 2, 3, 4], [-2, 1, 2, 3, 5], [-2, 1, 2, 3], [-2, 1, 2, 4, 4, 5], [-2, 1, 2, 4, 4], [-2, 1, 2, 4, 5], [-2, 1, 2, 4], [-2, 1, 2, 5], [-2, 1, 2], [-2, 1, 3, 4, 4, 5], [-2, 1, 3, 4, 4], [-2, 1, 3, 4, 5], [-2, 1, 3, 4], [-2, 1, 3, 5], [-2, 1, 3], [-2, 1, 4, 4, 5], [-2, 1, 4, 4], [-2, 1, 4, 5], [-2, 1, 4], [-2, 1, 5], [-2, 1], [-2, 2, 2, 3, 4, 4, 5], [-2, 2, 2, 3, 4, 4], [-2, 2, 2, 3, 4, 5], [-2, 2, 2, 3, 4], [-2, 2, 2, 3, 5], [-2, 2, 2, 3], [-2, 2, 2, 4, 4, 5], [-2, 2, 2, 4, 4], [-2, 2, 2, 4, 5], [-2, 2, 2, 4], [-2, 2, 2, 5], [-2, 2, 2], [-2, 2, 3, 4, 4, 5], [-2, 2, 3, 4, 4], [-2, 2, 3, 4, 5], [-2, 2, 3, 4], [-2, 2, 3, 5], [-2, 2, 3], [-2, 2, 4, 4, 5], [-2, 2, 4, 4], [-2, 2, 4, 5], [-2, 2, 4], [-2, 2, 5], [-2, 2], [-2, 3, 4, 4, 5], [-2, 3, 4, 4], [-2, 3, 4, 5], [-2, 3, 4], [-2, 3, 5], [-2, 3], [-2, 4, 4, 5], [-2, 4, 4], [-2, 4, 5], [-2, 4], [-2, 5], [-2], [-1, 0, 1, 2, 2, 3, 4, 4, 5], [-1, 0, 1, 2, 2, 3, 4, 4], [-1, 0, 1, 2, 2, 3, 4, 5], [-1, 0, 1, 2, 2, 3, 4], [-1, 0, 1, 2, 2, 3, 5], [-1, 0, 1, 2, 2, 3], [-1, 0, 1, 2, 2, 4, 4, 5], [-1, 0, 1, 2, 2, 4, 4], [-1, 0, 1, 2, 2, 4, 5], [-1, 0, 1, 2, 2, 4], [-1, 0, 1, 2, 2, 5], [-1, 0, 1, 2, 2], [-1, 0, 1, 2, 3, 4, 4, 5], [-1, 0, 1, 2, 3, 4, 4], [-1, 0, 1, 2, 3, 4, 5], [-1, 0, 1, 2, 3, 4], [-1, 0, 1, 2, 3, 5], [-1, 0, 1, 2, 3], [-1, 0, 1, 2, 4, 4, 5], [-1, 0, 1, 2, 4, 4], [-1, 0, 1, 2, 4, 5], [-1, 0, 1, 2, 4], [-1, 0, 1, 2, 5], [-1, 0, 1, 2], [-1, 0, 1, 3, 4, 4, 5], [-1, 0, 1, 3, 4, 4], [-1, 0, 1, 3, 4, 5], [-1, 0, 1, 3, 4], [-1, 0, 1, 3, 5], [-1, 0, 1, 3], [-1, 0, 1, 4, 4, 5], [-1, 0, 1, 4, 4], [-1, 0, 1, 4, 5], [-1, 0, 1, 4], [-1, 0, 1, 5], [-1, 0, 1], [-1, 0, 2, 2, 3, 4, 4, 5], [-1, 0, 2, 2, 3, 4, 4], [-1, 0, 2, 2, 3, 4, 5], [-1, 0, 2, 2, 3, 4], [-1, 0, 2, 2, 3, 5], [-1, 0, 2, 2, 3], [-1, 0, 2, 2, 4, 4, 5], [-1, 0, 2, 2, 4, 4], [-1, 0, 2, 2, 4, 5], [-1, 0, 2, 2, 4], [-1, 0, 2, 2, 5], [-1, 0, 2, 2], [-1, 0, 2, 3, 4, 4, 5], [-1, 0, 2, 3, 4, 4], [-1, 0, 2, 3, 4, 5], [-1, 0, 2, 3, 4], [-1, 0, 2, 3, 5], [-1, 0, 2, 3], [-1, 0, 2, 4, 4, 5], [-1, 0, 2, 4, 4], [-1, 0, 2, 4, 5], [-1, 0, 2, 4], [-1, 0, 2, 5], [-1, 0, 2], [-1, 0, 3, 4, 4, 5], [-1, 0, 3, 4, 4], [-1, 0, 3, 4, 5], [-1, 0, 3, 4], [-1, 0, 3, 5], [-1, 0, 3], [-1, 0, 4, 4, 5], [-1, 0, 4, 4], [-1, 0, 4, 5], [-1, 0, 4], [-1, 0, 5], [-1, 0], [-1, 1, 2, 2, 3, 4, 4, 5], [-1, 1, 2, 2, 3, 4, 4], [-1, 1, 2, 2, 3, 4, 5], [-1, 1, 2, 2, 3, 4], [-1, 1, 2, 2, 3, 5], [-1, 1, 2, 2, 3], [-1, 1, 2, 2, 4, 4, 5], [-1, 1, 2, 2, 4, 4], [-1, 1, 2, 2, 4, 5], [-1, 1, 2, 2, 4], [-1, 1, 2, 2, 5], [-1, 1, 2, 2], [-1, 1, 2, 3, 4, 4, 5], [-1, 1, 2, 3, 4, 4], [-1, 1, 2, 3, 4, 5], [-1, 1, 2, 3, 4], [-1, 1, 2, 3, 5], [-1, 1, 2, 3], [-1, 1, 2, 4, 4, 5], [-1, 1, 2, 4, 4], [-1, 1, 2, 4, 5], [-1, 1, 2, 4], [-1, 1, 2, 5], [-1, 1, 2], [-1, 1, 3, 4, 4, 5], [-1, 1, 3, 4, 4], [-1, 1, 3, 4, 5], [-1, 1, 3, 4], [-1, 1, 3, 5], [-1, 1, 3], [-1, 1, 4, 4, 5], [-1, 1, 4, 4], [-1, 1, 4, 5], [-1, 1, 4], [-1, 1, 5], [-1, 1], [-1, 2, 2, 3, 4, 4, 5], [-1, 2, 2, 3, 4, 4], [-1, 2, 2, 3, 4, 5], [-1, 2, 2, 3, 4], [-1, 2, 2, 3, 5], [-1, 2, 2, 3], [-1, 2, 2, 4, 4, 5], [-1, 2, 2, 4, 4], [-1, 2, 2, 4, 5], [-1, 2, 2, 4], [-1, 2, 2, 5], [-1, 2, 2], [-1, 2, 3, 4, 4, 5], [-1, 2, 3, 4, 4], [-1, 2, 3, 4, 5], [-1, 2, 3, 4], [-1, 2, 3, 5], [-1, 2, 3], [-1, 2, 4, 4, 5], [-1, 2, 4, 4], [-1, 2, 4, 5], [-1, 2, 4], [-1, 2, 5], [-1, 2], [-1, 3, 4, 4, 5], [-1, 3, 4, 4], [-1, 3, 4, 5], [-1, 3, 4], [-1, 3, 5], [-1, 3], [-1, 4, 4, 5], [-1, 4, 4], [-1, 4, 5], [-1, 4], [-1, 5], [-1], [0, 1, 2, 2, 3, 4, 4, 5], [0, 1, 2, 2, 3, 4, 4], [0, 1, 2, 2, 3, 4, 5], [0, 1, 2, 2, 3, 4], [0, 1, 2, 2, 3, 5], [0, 1, 2, 2, 3], [0, 1, 2, 2, 4, 4, 5], [0, 1, 2, 2, 4, 4], [0, 1, 2, 2, 4, 5], [0, 1, 2, 2, 4], [0, 1, 2, 2, 5], [0, 1, 2, 2], [0, 1, 2, 3, 4, 4, 5], [0, 1, 2, 3, 4, 4], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5], [0, 1, 2, 3], [0, 1, 2, 4, 4, 5], [0, 1, 2, 4, 4], [0, 1, 2, 4, 5], [0, 1, 2, 4], [0, 1, 2, 5], [0, 1, 2], [0, 1, 3, 4, 4, 5], [0, 1, 3, 4, 4], [0, 1, 3, 4, 5], [0, 1, 3, 4], [0, 1, 3, 5], [0, 1, 3], [0, 1, 4, 4, 5], [0, 1, 4, 4], [0, 1, 4, 5], [0, 1, 4], [0, 1, 5], [0, 1], [0, 2, 2, 3, 4, 4, 5], [0, 2, 2, 3, 4, 4], [0, 2, 2, 3, 4, 5], [0, 2, 2, 3, 4], [0, 2, 2, 3, 5], [0, 2, 2, 3], [0, 2, 2, 4, 4, 5], [0, 2, 2, 4, 4], [0, 2, 2, 4, 5], [0, 2, 2, 4], [0, 2, 2, 5], [0, 2, 2], [0, 2, 3, 4, 4, 5], [0, 2, 3, 4, 4], [0, 2, 3, 4, 5], [0, 2, 3, 4], [0, 2, 3, 5], [0, 2, 3], [0, 2, 4, 4, 5], [0, 2, 4, 4], [0, 2, 4, 5], [0, 2, 4], [0, 2, 5], [0, 2], [0, 3, 4, 4, 5], [0, 3, 4, 4], [0, 3, 4, 5], [0, 3, 4], [0, 3, 5], [0, 3], [0, 4, 4, 5], [0, 4, 4], [0, 4, 5], [0, 4], [0, 5], [0], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5], [1, 4], [1, 5], [1], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5], [2, 4], [2, 5], [2], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5], [3, 4], [3, 5], [3], [4, 4, 5], [4, 4], [4, 5], [4], [5], []])\n assert answers_match(candidate(nums=[4, 4, 3, 2, 2, 1, 1]), [[1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4], [1, 1, 2, 2], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4], [1, 1, 2, 3], [1, 1, 2, 4, 4], [1, 1, 2, 4], [1, 1, 2], [1, 1, 3, 4, 4], [1, 1, 3, 4], [1, 1, 3], [1, 1, 4, 4], [1, 1, 4], [1, 1], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4], [1, 4], [1], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4], [2, 4], [2], [3, 4, 4], [3, 4], [3], [4, 4], [4], []])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4]), [[1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4], [1, 1, 2, 3], [1, 1, 2, 4, 4], [1, 1, 2, 4], [1, 1, 2], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4], [1, 1, 3, 3], [1, 1, 3, 4, 4], [1, 1, 3, 4], [1, 1, 3], [1, 1, 4, 4], [1, 1, 4], [1, 1], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4], [1, 4], [1], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4], [2, 4], [2], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4], [3, 4], [3], [4, 4], [4], []])\n assert answers_match(candidate(nums=[7, 7, 8, 8, 8, 9]), [[7, 7, 8, 8, 8, 9], [7, 7, 8, 8, 8], [7, 7, 8, 8, 9], [7, 7, 8, 8], [7, 7, 8, 9], [7, 7, 8], [7, 7, 9], [7, 7], [7, 8, 8, 8, 9], [7, 8, 8, 8], [7, 8, 8, 9], [7, 8, 8], [7, 8, 9], [7, 8], [7, 9], [7], [8, 8, 8, 9], [8, 8, 8], [8, 8, 9], [8, 8], [8, 9], [8], [9], []])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 1, 1, 1, 2, 2]), [[0, 0, 0, 0, 0, 1, 1, 1, 2, 2], [0, 0, 0, 0, 0, 1, 1, 1, 2], [0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 2, 2], [0, 0, 0, 0, 0, 1, 1, 2], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 2, 2], [0, 0, 0, 0, 0, 1, 2], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 2, 2], [0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 2, 2], [0, 0, 0, 0, 1, 1, 1, 2], [0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 1, 1, 2, 2], [0, 0, 0, 0, 1, 1, 2], [0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 2, 2], [0, 0, 0, 0, 1, 2], [0, 0, 0, 0, 1], [0, 0, 0, 0, 2, 2], [0, 0, 0, 0, 2], [0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 2, 2], [0, 0, 0, 1, 1, 1, 2], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 2, 2], [0, 0, 0, 1, 1, 2], [0, 0, 0, 1, 1], [0, 0, 0, 1, 2, 2], [0, 0, 0, 1, 2], [0, 0, 0, 1], [0, 0, 0, 2, 2], [0, 0, 0, 2], [0, 0, 0], [0, 0, 1, 1, 1, 2, 2], [0, 0, 1, 1, 1, 2], [0, 0, 1, 1, 1], [0, 0, 1, 1, 2, 2], [0, 0, 1, 1, 2], [0, 0, 1, 1], [0, 0, 1, 2, 2], [0, 0, 1, 2], [0, 0, 1], [0, 0, 2, 2], [0, 0, 2], [0, 0], [0, 1, 1, 1, 2, 2], [0, 1, 1, 1, 2], [0, 1, 1, 1], [0, 1, 1, 2, 2], [0, 1, 1, 2], [0, 1, 1], [0, 1, 2, 2], [0, 1, 2], [0, 1], [0, 2, 2], [0, 2], [0], [1, 1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1], [1, 1, 2, 2], [1, 1, 2], [1, 1], [1, 2, 2], [1, 2], [1], [2, 2], [2], []])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5]), [[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5, 5], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5, 5], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5, 5], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5, 5], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5, 5], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5, 5], [1, 1, 5], [1, 1], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5], [1, 5], [1], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5], [2, 5], [2], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5], [3, 5], [3], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5], [4, 5], [4], [5, 5], [5], []])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5]), [[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5, 5], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5, 5], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5, 5], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5, 5], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5, 5], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5, 5], [1, 1, 5], [1, 1], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5], [1, 5], [1], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5], [2, 5], [2], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5], [3, 5], [3], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5], [4, 5], [4], [5, 5], [5], []])\n assert answers_match(candidate(nums=[10, 9, 9, 8, 8, 7, 7, 6, 6, 5]), [[5, 6, 6, 7, 7, 8, 8, 9, 9, 10], [5, 6, 6, 7, 7, 8, 8, 9, 9], [5, 6, 6, 7, 7, 8, 8, 9, 10], [5, 6, 6, 7, 7, 8, 8, 9], [5, 6, 6, 7, 7, 8, 8, 10], [5, 6, 6, 7, 7, 8, 8], [5, 6, 6, 7, 7, 8, 9, 9, 10], [5, 6, 6, 7, 7, 8, 9, 9], [5, 6, 6, 7, 7, 8, 9, 10], [5, 6, 6, 7, 7, 8, 9], [5, 6, 6, 7, 7, 8, 10], [5, 6, 6, 7, 7, 8], [5, 6, 6, 7, 7, 9, 9, 10], [5, 6, 6, 7, 7, 9, 9], [5, 6, 6, 7, 7, 9, 10], [5, 6, 6, 7, 7, 9], [5, 6, 6, 7, 7, 10], [5, 6, 6, 7, 7], [5, 6, 6, 7, 8, 8, 9, 9, 10], [5, 6, 6, 7, 8, 8, 9, 9], [5, 6, 6, 7, 8, 8, 9, 10], [5, 6, 6, 7, 8, 8, 9], [5, 6, 6, 7, 8, 8, 10], [5, 6, 6, 7, 8, 8], [5, 6, 6, 7, 8, 9, 9, 10], [5, 6, 6, 7, 8, 9, 9], [5, 6, 6, 7, 8, 9, 10], [5, 6, 6, 7, 8, 9], [5, 6, 6, 7, 8, 10], [5, 6, 6, 7, 8], [5, 6, 6, 7, 9, 9, 10], [5, 6, 6, 7, 9, 9], [5, 6, 6, 7, 9, 10], [5, 6, 6, 7, 9], [5, 6, 6, 7, 10], [5, 6, 6, 7], [5, 6, 6, 8, 8, 9, 9, 10], [5, 6, 6, 8, 8, 9, 9], [5, 6, 6, 8, 8, 9, 10], [5, 6, 6, 8, 8, 9], [5, 6, 6, 8, 8, 10], [5, 6, 6, 8, 8], [5, 6, 6, 8, 9, 9, 10], [5, 6, 6, 8, 9, 9], [5, 6, 6, 8, 9, 10], [5, 6, 6, 8, 9], [5, 6, 6, 8, 10], [5, 6, 6, 8], [5, 6, 6, 9, 9, 10], [5, 6, 6, 9, 9], [5, 6, 6, 9, 10], [5, 6, 6, 9], [5, 6, 6, 10], [5, 6, 6], [5, 6, 7, 7, 8, 8, 9, 9, 10], [5, 6, 7, 7, 8, 8, 9, 9], [5, 6, 7, 7, 8, 8, 9, 10], [5, 6, 7, 7, 8, 8, 9], [5, 6, 7, 7, 8, 8, 10], [5, 6, 7, 7, 8, 8], [5, 6, 7, 7, 8, 9, 9, 10], [5, 6, 7, 7, 8, 9, 9], [5, 6, 7, 7, 8, 9, 10], [5, 6, 7, 7, 8, 9], [5, 6, 7, 7, 8, 10], [5, 6, 7, 7, 8], [5, 6, 7, 7, 9, 9, 10], [5, 6, 7, 7, 9, 9], [5, 6, 7, 7, 9, 10], [5, 6, 7, 7, 9], [5, 6, 7, 7, 10], [5, 6, 7, 7], [5, 6, 7, 8, 8, 9, 9, 10], [5, 6, 7, 8, 8, 9, 9], [5, 6, 7, 8, 8, 9, 10], [5, 6, 7, 8, 8, 9], [5, 6, 7, 8, 8, 10], [5, 6, 7, 8, 8], [5, 6, 7, 8, 9, 9, 10], [5, 6, 7, 8, 9, 9], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 9, 10], [5, 6, 7, 9, 9], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 8, 9, 9, 10], [5, 6, 8, 8, 9, 9], [5, 6, 8, 8, 9, 10], [5, 6, 8, 8, 9], [5, 6, 8, 8, 10], [5, 6, 8, 8], [5, 6, 8, 9, 9, 10], [5, 6, 8, 9, 9], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 9, 10], [5, 6, 9, 9], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 7, 8, 8, 9, 9, 10], [5, 7, 7, 8, 8, 9, 9], [5, 7, 7, 8, 8, 9, 10], [5, 7, 7, 8, 8, 9], [5, 7, 7, 8, 8, 10], [5, 7, 7, 8, 8], [5, 7, 7, 8, 9, 9, 10], [5, 7, 7, 8, 9, 9], [5, 7, 7, 8, 9, 10], [5, 7, 7, 8, 9], [5, 7, 7, 8, 10], [5, 7, 7, 8], [5, 7, 7, 9, 9, 10], [5, 7, 7, 9, 9], [5, 7, 7, 9, 10], [5, 7, 7, 9], [5, 7, 7, 10], [5, 7, 7], [5, 7, 8, 8, 9, 9, 10], [5, 7, 8, 8, 9, 9], [5, 7, 8, 8, 9, 10], [5, 7, 8, 8, 9], [5, 7, 8, 8, 10], [5, 7, 8, 8], [5, 7, 8, 9, 9, 10], [5, 7, 8, 9, 9], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 9, 10], [5, 7, 9, 9], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 8, 9, 9, 10], [5, 8, 8, 9, 9], [5, 8, 8, 9, 10], [5, 8, 8, 9], [5, 8, 8, 10], [5, 8, 8], [5, 8, 9, 9, 10], [5, 8, 9, 9], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 9, 10], [5, 9, 9], [5, 9, 10], [5, 9], [5, 10], [5], [6, 6, 7, 7, 8, 8, 9, 9, 10], [6, 6, 7, 7, 8, 8, 9, 9], [6, 6, 7, 7, 8, 8, 9, 10], [6, 6, 7, 7, 8, 8, 9], [6, 6, 7, 7, 8, 8, 10], [6, 6, 7, 7, 8, 8], [6, 6, 7, 7, 8, 9, 9, 10], [6, 6, 7, 7, 8, 9, 9], [6, 6, 7, 7, 8, 9, 10], [6, 6, 7, 7, 8, 9], [6, 6, 7, 7, 8, 10], [6, 6, 7, 7, 8], [6, 6, 7, 7, 9, 9, 10], [6, 6, 7, 7, 9, 9], [6, 6, 7, 7, 9, 10], [6, 6, 7, 7, 9], [6, 6, 7, 7, 10], [6, 6, 7, 7], [6, 6, 7, 8, 8, 9, 9, 10], [6, 6, 7, 8, 8, 9, 9], [6, 6, 7, 8, 8, 9, 10], [6, 6, 7, 8, 8, 9], [6, 6, 7, 8, 8, 10], [6, 6, 7, 8, 8], [6, 6, 7, 8, 9, 9, 10], [6, 6, 7, 8, 9, 9], [6, 6, 7, 8, 9, 10], [6, 6, 7, 8, 9], [6, 6, 7, 8, 10], [6, 6, 7, 8], [6, 6, 7, 9, 9, 10], [6, 6, 7, 9, 9], [6, 6, 7, 9, 10], [6, 6, 7, 9], [6, 6, 7, 10], [6, 6, 7], [6, 6, 8, 8, 9, 9, 10], [6, 6, 8, 8, 9, 9], [6, 6, 8, 8, 9, 10], [6, 6, 8, 8, 9], [6, 6, 8, 8, 10], [6, 6, 8, 8], [6, 6, 8, 9, 9, 10], [6, 6, 8, 9, 9], [6, 6, 8, 9, 10], [6, 6, 8, 9], [6, 6, 8, 10], [6, 6, 8], [6, 6, 9, 9, 10], [6, 6, 9, 9], [6, 6, 9, 10], [6, 6, 9], [6, 6, 10], [6, 6], [6, 7, 7, 8, 8, 9, 9, 10], [6, 7, 7, 8, 8, 9, 9], [6, 7, 7, 8, 8, 9, 10], [6, 7, 7, 8, 8, 9], [6, 7, 7, 8, 8, 10], [6, 7, 7, 8, 8], [6, 7, 7, 8, 9, 9, 10], [6, 7, 7, 8, 9, 9], [6, 7, 7, 8, 9, 10], [6, 7, 7, 8, 9], [6, 7, 7, 8, 10], [6, 7, 7, 8], [6, 7, 7, 9, 9, 10], [6, 7, 7, 9, 9], [6, 7, 7, 9, 10], [6, 7, 7, 9], [6, 7, 7, 10], [6, 7, 7], [6, 7, 8, 8, 9, 9, 10], [6, 7, 8, 8, 9, 9], [6, 7, 8, 8, 9, 10], [6, 7, 8, 8, 9], [6, 7, 8, 8, 10], [6, 7, 8, 8], [6, 7, 8, 9, 9, 10], [6, 7, 8, 9, 9], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 9, 10], [6, 7, 9, 9], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 8, 9, 9, 10], [6, 8, 8, 9, 9], [6, 8, 8, 9, 10], [6, 8, 8, 9], [6, 8, 8, 10], [6, 8, 8], [6, 8, 9, 9, 10], [6, 8, 9, 9], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 9, 10], [6, 9, 9], [6, 9, 10], [6, 9], [6, 10], [6], [7, 7, 8, 8, 9, 9, 10], [7, 7, 8, 8, 9, 9], [7, 7, 8, 8, 9, 10], [7, 7, 8, 8, 9], [7, 7, 8, 8, 10], [7, 7, 8, 8], [7, 7, 8, 9, 9, 10], [7, 7, 8, 9, 9], [7, 7, 8, 9, 10], [7, 7, 8, 9], [7, 7, 8, 10], [7, 7, 8], [7, 7, 9, 9, 10], [7, 7, 9, 9], [7, 7, 9, 10], [7, 7, 9], [7, 7, 10], [7, 7], [7, 8, 8, 9, 9, 10], [7, 8, 8, 9, 9], [7, 8, 8, 9, 10], [7, 8, 8, 9], [7, 8, 8, 10], [7, 8, 8], [7, 8, 9, 9, 10], [7, 8, 9, 9], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 9, 10], [7, 9, 9], [7, 9, 10], [7, 9], [7, 10], [7], [8, 8, 9, 9, 10], [8, 8, 9, 9], [8, 8, 9, 10], [8, 8, 9], [8, 8, 10], [8, 8], [8, 9, 9, 10], [8, 9, 9], [8, 9, 10], [8, 9], [8, 10], [8], [9, 9, 10], [9, 9], [9, 10], [9], [10], []])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 5, 5, 6, 7, 8]), [[1, 2, 3, 4, 5, 5, 5, 6, 7, 8], [1, 2, 3, 4, 5, 5, 5, 6, 7], [1, 2, 3, 4, 5, 5, 5, 6, 8], [1, 2, 3, 4, 5, 5, 5, 6], [1, 2, 3, 4, 5, 5, 5, 7, 8], [1, 2, 3, 4, 5, 5, 5, 7], [1, 2, 3, 4, 5, 5, 5, 8], [1, 2, 3, 4, 5, 5, 5], [1, 2, 3, 4, 5, 5, 6, 7, 8], [1, 2, 3, 4, 5, 5, 6, 7], [1, 2, 3, 4, 5, 5, 6, 8], [1, 2, 3, 4, 5, 5, 6], [1, 2, 3, 4, 5, 5, 7, 8], [1, 2, 3, 4, 5, 5, 7], [1, 2, 3, 4, 5, 5, 8], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8], [1, 2, 3, 4], [1, 2, 3, 5, 5, 5, 6, 7, 8], [1, 2, 3, 5, 5, 5, 6, 7], [1, 2, 3, 5, 5, 5, 6, 8], [1, 2, 3, 5, 5, 5, 6], [1, 2, 3, 5, 5, 5, 7, 8], [1, 2, 3, 5, 5, 5, 7], [1, 2, 3, 5, 5, 5, 8], [1, 2, 3, 5, 5, 5], [1, 2, 3, 5, 5, 6, 7, 8], [1, 2, 3, 5, 5, 6, 7], [1, 2, 3, 5, 5, 6, 8], [1, 2, 3, 5, 5, 6], [1, 2, 3, 5, 5, 7, 8], [1, 2, 3, 5, 5, 7], [1, 2, 3, 5, 5, 8], [1, 2, 3, 5, 5], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8], [1, 2, 3, 6], [1, 2, 3, 7, 8], [1, 2, 3, 7], [1, 2, 3, 8], [1, 2, 3], [1, 2, 4, 5, 5, 5, 6, 7, 8], [1, 2, 4, 5, 5, 5, 6, 7], [1, 2, 4, 5, 5, 5, 6, 8], [1, 2, 4, 5, 5, 5, 6], [1, 2, 4, 5, 5, 5, 7, 8], [1, 2, 4, 5, 5, 5, 7], [1, 2, 4, 5, 5, 5, 8], [1, 2, 4, 5, 5, 5], [1, 2, 4, 5, 5, 6, 7, 8], [1, 2, 4, 5, 5, 6, 7], [1, 2, 4, 5, 5, 6, 8], [1, 2, 4, 5, 5, 6], [1, 2, 4, 5, 5, 7, 8], [1, 2, 4, 5, 5, 7], [1, 2, 4, 5, 5, 8], [1, 2, 4, 5, 5], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8], [1, 2, 4, 6], [1, 2, 4, 7, 8], [1, 2, 4, 7], [1, 2, 4, 8], [1, 2, 4], [1, 2, 5, 5, 5, 6, 7, 8], [1, 2, 5, 5, 5, 6, 7], [1, 2, 5, 5, 5, 6, 8], [1, 2, 5, 5, 5, 6], [1, 2, 5, 5, 5, 7, 8], [1, 2, 5, 5, 5, 7], [1, 2, 5, 5, 5, 8], [1, 2, 5, 5, 5], [1, 2, 5, 5, 6, 7, 8], [1, 2, 5, 5, 6, 7], [1, 2, 5, 5, 6, 8], [1, 2, 5, 5, 6], [1, 2, 5, 5, 7, 8], [1, 2, 5, 5, 7], [1, 2, 5, 5, 8], [1, 2, 5, 5], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8], [1, 2, 5, 6], [1, 2, 5, 7, 8], [1, 2, 5, 7], [1, 2, 5, 8], [1, 2, 5], [1, 2, 6, 7, 8], [1, 2, 6, 7], [1, 2, 6, 8], [1, 2, 6], [1, 2, 7, 8], [1, 2, 7], [1, 2, 8], [1, 2], [1, 3, 4, 5, 5, 5, 6, 7, 8], [1, 3, 4, 5, 5, 5, 6, 7], [1, 3, 4, 5, 5, 5, 6, 8], [1, 3, 4, 5, 5, 5, 6], [1, 3, 4, 5, 5, 5, 7, 8], [1, 3, 4, 5, 5, 5, 7], [1, 3, 4, 5, 5, 5, 8], [1, 3, 4, 5, 5, 5], [1, 3, 4, 5, 5, 6, 7, 8], [1, 3, 4, 5, 5, 6, 7], [1, 3, 4, 5, 5, 6, 8], [1, 3, 4, 5, 5, 6], [1, 3, 4, 5, 5, 7, 8], [1, 3, 4, 5, 5, 7], [1, 3, 4, 5, 5, 8], [1, 3, 4, 5, 5], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8], [1, 3, 4, 6], [1, 3, 4, 7, 8], [1, 3, 4, 7], [1, 3, 4, 8], [1, 3, 4], [1, 3, 5, 5, 5, 6, 7, 8], [1, 3, 5, 5, 5, 6, 7], [1, 3, 5, 5, 5, 6, 8], [1, 3, 5, 5, 5, 6], [1, 3, 5, 5, 5, 7, 8], [1, 3, 5, 5, 5, 7], [1, 3, 5, 5, 5, 8], [1, 3, 5, 5, 5], [1, 3, 5, 5, 6, 7, 8], [1, 3, 5, 5, 6, 7], [1, 3, 5, 5, 6, 8], [1, 3, 5, 5, 6], [1, 3, 5, 5, 7, 8], [1, 3, 5, 5, 7], [1, 3, 5, 5, 8], [1, 3, 5, 5], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8], [1, 3, 5, 6], [1, 3, 5, 7, 8], [1, 3, 5, 7], [1, 3, 5, 8], [1, 3, 5], [1, 3, 6, 7, 8], [1, 3, 6, 7], [1, 3, 6, 8], [1, 3, 6], [1, 3, 7, 8], [1, 3, 7], [1, 3, 8], [1, 3], [1, 4, 5, 5, 5, 6, 7, 8], [1, 4, 5, 5, 5, 6, 7], [1, 4, 5, 5, 5, 6, 8], [1, 4, 5, 5, 5, 6], [1, 4, 5, 5, 5, 7, 8], [1, 4, 5, 5, 5, 7], [1, 4, 5, 5, 5, 8], [1, 4, 5, 5, 5], [1, 4, 5, 5, 6, 7, 8], [1, 4, 5, 5, 6, 7], [1, 4, 5, 5, 6, 8], [1, 4, 5, 5, 6], [1, 4, 5, 5, 7, 8], [1, 4, 5, 5, 7], [1, 4, 5, 5, 8], [1, 4, 5, 5], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8], [1, 4, 5, 6], [1, 4, 5, 7, 8], [1, 4, 5, 7], [1, 4, 5, 8], [1, 4, 5], [1, 4, 6, 7, 8], [1, 4, 6, 7], [1, 4, 6, 8], [1, 4, 6], [1, 4, 7, 8], [1, 4, 7], [1, 4, 8], [1, 4], [1, 5, 5, 5, 6, 7, 8], [1, 5, 5, 5, 6, 7], [1, 5, 5, 5, 6, 8], [1, 5, 5, 5, 6], [1, 5, 5, 5, 7, 8], [1, 5, 5, 5, 7], [1, 5, 5, 5, 8], [1, 5, 5, 5], [1, 5, 5, 6, 7, 8], [1, 5, 5, 6, 7], [1, 5, 5, 6, 8], [1, 5, 5, 6], [1, 5, 5, 7, 8], [1, 5, 5, 7], [1, 5, 5, 8], [1, 5, 5], [1, 5, 6, 7, 8], [1, 5, 6, 7], [1, 5, 6, 8], [1, 5, 6], [1, 5, 7, 8], [1, 5, 7], [1, 5, 8], [1, 5], [1, 6, 7, 8], [1, 6, 7], [1, 6, 8], [1, 6], [1, 7, 8], [1, 7], [1, 8], [1], [2, 3, 4, 5, 5, 5, 6, 7, 8], [2, 3, 4, 5, 5, 5, 6, 7], [2, 3, 4, 5, 5, 5, 6, 8], [2, 3, 4, 5, 5, 5, 6], [2, 3, 4, 5, 5, 5, 7, 8], [2, 3, 4, 5, 5, 5, 7], [2, 3, 4, 5, 5, 5, 8], [2, 3, 4, 5, 5, 5], [2, 3, 4, 5, 5, 6, 7, 8], [2, 3, 4, 5, 5, 6, 7], [2, 3, 4, 5, 5, 6, 8], [2, 3, 4, 5, 5, 6], [2, 3, 4, 5, 5, 7, 8], [2, 3, 4, 5, 5, 7], [2, 3, 4, 5, 5, 8], [2, 3, 4, 5, 5], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8], [2, 3, 4, 6], [2, 3, 4, 7, 8], [2, 3, 4, 7], [2, 3, 4, 8], [2, 3, 4], [2, 3, 5, 5, 5, 6, 7, 8], [2, 3, 5, 5, 5, 6, 7], [2, 3, 5, 5, 5, 6, 8], [2, 3, 5, 5, 5, 6], [2, 3, 5, 5, 5, 7, 8], [2, 3, 5, 5, 5, 7], [2, 3, 5, 5, 5, 8], [2, 3, 5, 5, 5], [2, 3, 5, 5, 6, 7, 8], [2, 3, 5, 5, 6, 7], [2, 3, 5, 5, 6, 8], [2, 3, 5, 5, 6], [2, 3, 5, 5, 7, 8], [2, 3, 5, 5, 7], [2, 3, 5, 5, 8], [2, 3, 5, 5], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8], [2, 3, 5, 6], [2, 3, 5, 7, 8], [2, 3, 5, 7], [2, 3, 5, 8], [2, 3, 5], [2, 3, 6, 7, 8], [2, 3, 6, 7], [2, 3, 6, 8], [2, 3, 6], [2, 3, 7, 8], [2, 3, 7], [2, 3, 8], [2, 3], [2, 4, 5, 5, 5, 6, 7, 8], [2, 4, 5, 5, 5, 6, 7], [2, 4, 5, 5, 5, 6, 8], [2, 4, 5, 5, 5, 6], [2, 4, 5, 5, 5, 7, 8], [2, 4, 5, 5, 5, 7], [2, 4, 5, 5, 5, 8], [2, 4, 5, 5, 5], [2, 4, 5, 5, 6, 7, 8], [2, 4, 5, 5, 6, 7], [2, 4, 5, 5, 6, 8], [2, 4, 5, 5, 6], [2, 4, 5, 5, 7, 8], [2, 4, 5, 5, 7], [2, 4, 5, 5, 8], [2, 4, 5, 5], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8], [2, 4, 5, 6], [2, 4, 5, 7, 8], [2, 4, 5, 7], [2, 4, 5, 8], [2, 4, 5], [2, 4, 6, 7, 8], [2, 4, 6, 7], [2, 4, 6, 8], [2, 4, 6], [2, 4, 7, 8], [2, 4, 7], [2, 4, 8], [2, 4], [2, 5, 5, 5, 6, 7, 8], [2, 5, 5, 5, 6, 7], [2, 5, 5, 5, 6, 8], [2, 5, 5, 5, 6], [2, 5, 5, 5, 7, 8], [2, 5, 5, 5, 7], [2, 5, 5, 5, 8], [2, 5, 5, 5], [2, 5, 5, 6, 7, 8], [2, 5, 5, 6, 7], [2, 5, 5, 6, 8], [2, 5, 5, 6], [2, 5, 5, 7, 8], [2, 5, 5, 7], [2, 5, 5, 8], [2, 5, 5], [2, 5, 6, 7, 8], [2, 5, 6, 7], [2, 5, 6, 8], [2, 5, 6], [2, 5, 7, 8], [2, 5, 7], [2, 5, 8], [2, 5], [2, 6, 7, 8], [2, 6, 7], [2, 6, 8], [2, 6], [2, 7, 8], [2, 7], [2, 8], [2], [3, 4, 5, 5, 5, 6, 7, 8], [3, 4, 5, 5, 5, 6, 7], [3, 4, 5, 5, 5, 6, 8], [3, 4, 5, 5, 5, 6], [3, 4, 5, 5, 5, 7, 8], [3, 4, 5, 5, 5, 7], [3, 4, 5, 5, 5, 8], [3, 4, 5, 5, 5], [3, 4, 5, 5, 6, 7, 8], [3, 4, 5, 5, 6, 7], [3, 4, 5, 5, 6, 8], [3, 4, 5, 5, 6], [3, 4, 5, 5, 7, 8], [3, 4, 5, 5, 7], [3, 4, 5, 5, 8], [3, 4, 5, 5], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8], [3, 4, 5, 6], [3, 4, 5, 7, 8], [3, 4, 5, 7], [3, 4, 5, 8], [3, 4, 5], [3, 4, 6, 7, 8], [3, 4, 6, 7], [3, 4, 6, 8], [3, 4, 6], [3, 4, 7, 8], [3, 4, 7], [3, 4, 8], [3, 4], [3, 5, 5, 5, 6, 7, 8], [3, 5, 5, 5, 6, 7], [3, 5, 5, 5, 6, 8], [3, 5, 5, 5, 6], [3, 5, 5, 5, 7, 8], [3, 5, 5, 5, 7], [3, 5, 5, 5, 8], [3, 5, 5, 5], [3, 5, 5, 6, 7, 8], [3, 5, 5, 6, 7], [3, 5, 5, 6, 8], [3, 5, 5, 6], [3, 5, 5, 7, 8], [3, 5, 5, 7], [3, 5, 5, 8], [3, 5, 5], [3, 5, 6, 7, 8], [3, 5, 6, 7], [3, 5, 6, 8], [3, 5, 6], [3, 5, 7, 8], [3, 5, 7], [3, 5, 8], [3, 5], [3, 6, 7, 8], [3, 6, 7], [3, 6, 8], [3, 6], [3, 7, 8], [3, 7], [3, 8], [3], [4, 5, 5, 5, 6, 7, 8], [4, 5, 5, 5, 6, 7], [4, 5, 5, 5, 6, 8], [4, 5, 5, 5, 6], [4, 5, 5, 5, 7, 8], [4, 5, 5, 5, 7], [4, 5, 5, 5, 8], [4, 5, 5, 5], [4, 5, 5, 6, 7, 8], [4, 5, 5, 6, 7], [4, 5, 5, 6, 8], [4, 5, 5, 6], [4, 5, 5, 7, 8], [4, 5, 5, 7], [4, 5, 5, 8], [4, 5, 5], [4, 5, 6, 7, 8], [4, 5, 6, 7], [4, 5, 6, 8], [4, 5, 6], [4, 5, 7, 8], [4, 5, 7], [4, 5, 8], [4, 5], [4, 6, 7, 8], [4, 6, 7], [4, 6, 8], [4, 6], [4, 7, 8], [4, 7], [4, 8], [4], [5, 5, 5, 6, 7, 8], [5, 5, 5, 6, 7], [5, 5, 5, 6, 8], [5, 5, 5, 6], [5, 5, 5, 7, 8], [5, 5, 5, 7], [5, 5, 5, 8], [5, 5, 5], [5, 5, 6, 7, 8], [5, 5, 6, 7], [5, 5, 6, 8], [5, 5, 6], [5, 5, 7, 8], [5, 5, 7], [5, 5, 8], [5, 5], [5, 6, 7, 8], [5, 6, 7], [5, 6, 8], [5, 6], [5, 7, 8], [5, 7], [5, 8], [5], [6, 7, 8], [6, 7], [6, 8], [6], [7, 8], [7], [8], []])\n assert answers_match(candidate(nums=[7, 6, 6, 5, 4, 4, 4, 3, 2, 1]), [[1, 2, 3, 4, 4, 4, 5, 6, 6, 7], [1, 2, 3, 4, 4, 4, 5, 6, 6], [1, 2, 3, 4, 4, 4, 5, 6, 7], [1, 2, 3, 4, 4, 4, 5, 6], [1, 2, 3, 4, 4, 4, 5, 7], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4, 6, 6, 7], [1, 2, 3, 4, 4, 4, 6, 6], [1, 2, 3, 4, 4, 4, 6, 7], [1, 2, 3, 4, 4, 4, 6], [1, 2, 3, 4, 4, 4, 7], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4, 5, 6, 6, 7], [1, 2, 3, 4, 4, 5, 6, 6], [1, 2, 3, 4, 4, 5, 6, 7], [1, 2, 3, 4, 4, 5, 6], [1, 2, 3, 4, 4, 5, 7], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4, 6, 6, 7], [1, 2, 3, 4, 4, 6, 6], [1, 2, 3, 4, 4, 6, 7], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 4, 7], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 6, 6, 7], [1, 2, 3, 4, 5, 6, 6], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 6, 7], [1, 2, 3, 4, 6, 6], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4], [1, 2, 3, 5, 6, 6, 7], [1, 2, 3, 5, 6, 6], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5], [1, 2, 3, 6, 6, 7], [1, 2, 3, 6, 6], [1, 2, 3, 6, 7], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3], [1, 2, 4, 4, 4, 5, 6, 6, 7], [1, 2, 4, 4, 4, 5, 6, 6], [1, 2, 4, 4, 4, 5, 6, 7], [1, 2, 4, 4, 4, 5, 6], [1, 2, 4, 4, 4, 5, 7], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4, 6, 6, 7], [1, 2, 4, 4, 4, 6, 6], [1, 2, 4, 4, 4, 6, 7], [1, 2, 4, 4, 4, 6], [1, 2, 4, 4, 4, 7], [1, 2, 4, 4, 4], [1, 2, 4, 4, 5, 6, 6, 7], [1, 2, 4, 4, 5, 6, 6], [1, 2, 4, 4, 5, 6, 7], [1, 2, 4, 4, 5, 6], [1, 2, 4, 4, 5, 7], [1, 2, 4, 4, 5], [1, 2, 4, 4, 6, 6, 7], [1, 2, 4, 4, 6, 6], [1, 2, 4, 4, 6, 7], [1, 2, 4, 4, 6], [1, 2, 4, 4, 7], [1, 2, 4, 4], [1, 2, 4, 5, 6, 6, 7], [1, 2, 4, 5, 6, 6], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5], [1, 2, 4, 6, 6, 7], [1, 2, 4, 6, 6], [1, 2, 4, 6, 7], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4], [1, 2, 5, 6, 6, 7], [1, 2, 5, 6, 6], [1, 2, 5, 6, 7], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5], [1, 2, 6, 6, 7], [1, 2, 6, 6], [1, 2, 6, 7], [1, 2, 6], [1, 2, 7], [1, 2], [1, 3, 4, 4, 4, 5, 6, 6, 7], [1, 3, 4, 4, 4, 5, 6, 6], [1, 3, 4, 4, 4, 5, 6, 7], [1, 3, 4, 4, 4, 5, 6], [1, 3, 4, 4, 4, 5, 7], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4, 6, 6, 7], [1, 3, 4, 4, 4, 6, 6], [1, 3, 4, 4, 4, 6, 7], [1, 3, 4, 4, 4, 6], [1, 3, 4, 4, 4, 7], [1, 3, 4, 4, 4], [1, 3, 4, 4, 5, 6, 6, 7], [1, 3, 4, 4, 5, 6, 6], [1, 3, 4, 4, 5, 6, 7], [1, 3, 4, 4, 5, 6], [1, 3, 4, 4, 5, 7], [1, 3, 4, 4, 5], [1, 3, 4, 4, 6, 6, 7], [1, 3, 4, 4, 6, 6], [1, 3, 4, 4, 6, 7], [1, 3, 4, 4, 6], [1, 3, 4, 4, 7], [1, 3, 4, 4], [1, 3, 4, 5, 6, 6, 7], [1, 3, 4, 5, 6, 6], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5], [1, 3, 4, 6, 6, 7], [1, 3, 4, 6, 6], [1, 3, 4, 6, 7], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4], [1, 3, 5, 6, 6, 7], [1, 3, 5, 6, 6], [1, 3, 5, 6, 7], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5], [1, 3, 6, 6, 7], [1, 3, 6, 6], [1, 3, 6, 7], [1, 3, 6], [1, 3, 7], [1, 3], [1, 4, 4, 4, 5, 6, 6, 7], [1, 4, 4, 4, 5, 6, 6], [1, 4, 4, 4, 5, 6, 7], [1, 4, 4, 4, 5, 6], [1, 4, 4, 4, 5, 7], [1, 4, 4, 4, 5], [1, 4, 4, 4, 6, 6, 7], [1, 4, 4, 4, 6, 6], [1, 4, 4, 4, 6, 7], [1, 4, 4, 4, 6], [1, 4, 4, 4, 7], [1, 4, 4, 4], [1, 4, 4, 5, 6, 6, 7], [1, 4, 4, 5, 6, 6], [1, 4, 4, 5, 6, 7], [1, 4, 4, 5, 6], [1, 4, 4, 5, 7], [1, 4, 4, 5], [1, 4, 4, 6, 6, 7], [1, 4, 4, 6, 6], [1, 4, 4, 6, 7], [1, 4, 4, 6], [1, 4, 4, 7], [1, 4, 4], [1, 4, 5, 6, 6, 7], [1, 4, 5, 6, 6], [1, 4, 5, 6, 7], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5], [1, 4, 6, 6, 7], [1, 4, 6, 6], [1, 4, 6, 7], [1, 4, 6], [1, 4, 7], [1, 4], [1, 5, 6, 6, 7], [1, 5, 6, 6], [1, 5, 6, 7], [1, 5, 6], [1, 5, 7], [1, 5], [1, 6, 6, 7], [1, 6, 6], [1, 6, 7], [1, 6], [1, 7], [1], [2, 3, 4, 4, 4, 5, 6, 6, 7], [2, 3, 4, 4, 4, 5, 6, 6], [2, 3, 4, 4, 4, 5, 6, 7], [2, 3, 4, 4, 4, 5, 6], [2, 3, 4, 4, 4, 5, 7], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4, 6, 6, 7], [2, 3, 4, 4, 4, 6, 6], [2, 3, 4, 4, 4, 6, 7], [2, 3, 4, 4, 4, 6], [2, 3, 4, 4, 4, 7], [2, 3, 4, 4, 4], [2, 3, 4, 4, 5, 6, 6, 7], [2, 3, 4, 4, 5, 6, 6], [2, 3, 4, 4, 5, 6, 7], [2, 3, 4, 4, 5, 6], [2, 3, 4, 4, 5, 7], [2, 3, 4, 4, 5], [2, 3, 4, 4, 6, 6, 7], [2, 3, 4, 4, 6, 6], [2, 3, 4, 4, 6, 7], [2, 3, 4, 4, 6], [2, 3, 4, 4, 7], [2, 3, 4, 4], [2, 3, 4, 5, 6, 6, 7], [2, 3, 4, 5, 6, 6], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5], [2, 3, 4, 6, 6, 7], [2, 3, 4, 6, 6], [2, 3, 4, 6, 7], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4], [2, 3, 5, 6, 6, 7], [2, 3, 5, 6, 6], [2, 3, 5, 6, 7], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5], [2, 3, 6, 6, 7], [2, 3, 6, 6], [2, 3, 6, 7], [2, 3, 6], [2, 3, 7], [2, 3], [2, 4, 4, 4, 5, 6, 6, 7], [2, 4, 4, 4, 5, 6, 6], [2, 4, 4, 4, 5, 6, 7], [2, 4, 4, 4, 5, 6], [2, 4, 4, 4, 5, 7], [2, 4, 4, 4, 5], [2, 4, 4, 4, 6, 6, 7], [2, 4, 4, 4, 6, 6], [2, 4, 4, 4, 6, 7], [2, 4, 4, 4, 6], [2, 4, 4, 4, 7], [2, 4, 4, 4], [2, 4, 4, 5, 6, 6, 7], [2, 4, 4, 5, 6, 6], [2, 4, 4, 5, 6, 7], [2, 4, 4, 5, 6], [2, 4, 4, 5, 7], [2, 4, 4, 5], [2, 4, 4, 6, 6, 7], [2, 4, 4, 6, 6], [2, 4, 4, 6, 7], [2, 4, 4, 6], [2, 4, 4, 7], [2, 4, 4], [2, 4, 5, 6, 6, 7], [2, 4, 5, 6, 6], [2, 4, 5, 6, 7], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5], [2, 4, 6, 6, 7], [2, 4, 6, 6], [2, 4, 6, 7], [2, 4, 6], [2, 4, 7], [2, 4], [2, 5, 6, 6, 7], [2, 5, 6, 6], [2, 5, 6, 7], [2, 5, 6], [2, 5, 7], [2, 5], [2, 6, 6, 7], [2, 6, 6], [2, 6, 7], [2, 6], [2, 7], [2], [3, 4, 4, 4, 5, 6, 6, 7], [3, 4, 4, 4, 5, 6, 6], [3, 4, 4, 4, 5, 6, 7], [3, 4, 4, 4, 5, 6], [3, 4, 4, 4, 5, 7], [3, 4, 4, 4, 5], [3, 4, 4, 4, 6, 6, 7], [3, 4, 4, 4, 6, 6], [3, 4, 4, 4, 6, 7], [3, 4, 4, 4, 6], [3, 4, 4, 4, 7], [3, 4, 4, 4], [3, 4, 4, 5, 6, 6, 7], [3, 4, 4, 5, 6, 6], [3, 4, 4, 5, 6, 7], [3, 4, 4, 5, 6], [3, 4, 4, 5, 7], [3, 4, 4, 5], [3, 4, 4, 6, 6, 7], [3, 4, 4, 6, 6], [3, 4, 4, 6, 7], [3, 4, 4, 6], [3, 4, 4, 7], [3, 4, 4], [3, 4, 5, 6, 6, 7], [3, 4, 5, 6, 6], [3, 4, 5, 6, 7], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5], [3, 4, 6, 6, 7], [3, 4, 6, 6], [3, 4, 6, 7], [3, 4, 6], [3, 4, 7], [3, 4], [3, 5, 6, 6, 7], [3, 5, 6, 6], [3, 5, 6, 7], [3, 5, 6], [3, 5, 7], [3, 5], [3, 6, 6, 7], [3, 6, 6], [3, 6, 7], [3, 6], [3, 7], [3], [4, 4, 4, 5, 6, 6, 7], [4, 4, 4, 5, 6, 6], [4, 4, 4, 5, 6, 7], [4, 4, 4, 5, 6], [4, 4, 4, 5, 7], [4, 4, 4, 5], [4, 4, 4, 6, 6, 7], [4, 4, 4, 6, 6], [4, 4, 4, 6, 7], [4, 4, 4, 6], [4, 4, 4, 7], [4, 4, 4], [4, 4, 5, 6, 6, 7], [4, 4, 5, 6, 6], [4, 4, 5, 6, 7], [4, 4, 5, 6], [4, 4, 5, 7], [4, 4, 5], [4, 4, 6, 6, 7], [4, 4, 6, 6], [4, 4, 6, 7], [4, 4, 6], [4, 4, 7], [4, 4], [4, 5, 6, 6, 7], [4, 5, 6, 6], [4, 5, 6, 7], [4, 5, 6], [4, 5, 7], [4, 5], [4, 6, 6, 7], [4, 6, 6], [4, 6, 7], [4, 6], [4, 7], [4], [5, 6, 6, 7], [5, 6, 6], [5, 6, 7], [5, 6], [5, 7], [5], [6, 6, 7], [6, 6], [6, 7], [6], [7], []])\n assert answers_match(candidate(nums=[0, 0, 0, 1, 1, 2, 2, 2, 3, 3]), [[0, 0, 0, 1, 1, 2, 2, 2, 3, 3], [0, 0, 0, 1, 1, 2, 2, 2, 3], [0, 0, 0, 1, 1, 2, 2, 2], [0, 0, 0, 1, 1, 2, 2, 3, 3], [0, 0, 0, 1, 1, 2, 2, 3], [0, 0, 0, 1, 1, 2, 2], [0, 0, 0, 1, 1, 2, 3, 3], [0, 0, 0, 1, 1, 2, 3], [0, 0, 0, 1, 1, 2], [0, 0, 0, 1, 1, 3, 3], [0, 0, 0, 1, 1, 3], [0, 0, 0, 1, 1], [0, 0, 0, 1, 2, 2, 2, 3, 3], [0, 0, 0, 1, 2, 2, 2, 3], [0, 0, 0, 1, 2, 2, 2], [0, 0, 0, 1, 2, 2, 3, 3], [0, 0, 0, 1, 2, 2, 3], [0, 0, 0, 1, 2, 2], [0, 0, 0, 1, 2, 3, 3], [0, 0, 0, 1, 2, 3], [0, 0, 0, 1, 2], [0, 0, 0, 1, 3, 3], [0, 0, 0, 1, 3], [0, 0, 0, 1], [0, 0, 0, 2, 2, 2, 3, 3], [0, 0, 0, 2, 2, 2, 3], [0, 0, 0, 2, 2, 2], [0, 0, 0, 2, 2, 3, 3], [0, 0, 0, 2, 2, 3], [0, 0, 0, 2, 2], [0, 0, 0, 2, 3, 3], [0, 0, 0, 2, 3], [0, 0, 0, 2], [0, 0, 0, 3, 3], [0, 0, 0, 3], [0, 0, 0], [0, 0, 1, 1, 2, 2, 2, 3, 3], [0, 0, 1, 1, 2, 2, 2, 3], [0, 0, 1, 1, 2, 2, 2], [0, 0, 1, 1, 2, 2, 3, 3], [0, 0, 1, 1, 2, 2, 3], [0, 0, 1, 1, 2, 2], [0, 0, 1, 1, 2, 3, 3], [0, 0, 1, 1, 2, 3], [0, 0, 1, 1, 2], [0, 0, 1, 1, 3, 3], [0, 0, 1, 1, 3], [0, 0, 1, 1], [0, 0, 1, 2, 2, 2, 3, 3], [0, 0, 1, 2, 2, 2, 3], [0, 0, 1, 2, 2, 2], [0, 0, 1, 2, 2, 3, 3], [0, 0, 1, 2, 2, 3], [0, 0, 1, 2, 2], [0, 0, 1, 2, 3, 3], [0, 0, 1, 2, 3], [0, 0, 1, 2], [0, 0, 1, 3, 3], [0, 0, 1, 3], [0, 0, 1], [0, 0, 2, 2, 2, 3, 3], [0, 0, 2, 2, 2, 3], [0, 0, 2, 2, 2], [0, 0, 2, 2, 3, 3], [0, 0, 2, 2, 3], [0, 0, 2, 2], [0, 0, 2, 3, 3], [0, 0, 2, 3], [0, 0, 2], [0, 0, 3, 3], [0, 0, 3], [0, 0], [0, 1, 1, 2, 2, 2, 3, 3], [0, 1, 1, 2, 2, 2, 3], [0, 1, 1, 2, 2, 2], [0, 1, 1, 2, 2, 3, 3], [0, 1, 1, 2, 2, 3], [0, 1, 1, 2, 2], [0, 1, 1, 2, 3, 3], [0, 1, 1, 2, 3], [0, 1, 1, 2], [0, 1, 1, 3, 3], [0, 1, 1, 3], [0, 1, 1], [0, 1, 2, 2, 2, 3, 3], [0, 1, 2, 2, 2, 3], [0, 1, 2, 2, 2], [0, 1, 2, 2, 3, 3], [0, 1, 2, 2, 3], [0, 1, 2, 2], [0, 1, 2, 3, 3], [0, 1, 2, 3], [0, 1, 2], [0, 1, 3, 3], [0, 1, 3], [0, 1], [0, 2, 2, 2, 3, 3], [0, 2, 2, 2, 3], [0, 2, 2, 2], [0, 2, 2, 3, 3], [0, 2, 2, 3], [0, 2, 2], [0, 2, 3, 3], [0, 2, 3], [0, 2], [0, 3, 3], [0, 3], [0], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[6, 6, 6, 6, 6, 6, 6, 6, 6, 6]), [[6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6], [6, 6, 6, 6], [6, 6, 6], [6, 6], [6], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 4, 4, 4]), [[1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4], [2, 4, 4], [2, 4], [2], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4], [3, 4, 4], [3, 4], [3], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[4, 4, 4, 4, 5, 5, 5]), [[4, 4, 4, 4, 5, 5, 5], [4, 4, 4, 4, 5, 5], [4, 4, 4, 4, 5], [4, 4, 4, 4], [4, 4, 4, 5, 5, 5], [4, 4, 4, 5, 5], [4, 4, 4, 5], [4, 4, 4], [4, 4, 5, 5, 5], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5, 5], [4, 5, 5], [4, 5], [4], [5, 5, 5], [5, 5], [5], []])\n assert answers_match(candidate(nums=[3, 1, 2, 3, 2, 1]), [[1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[5, 5, 4, 4, 4, 3, 3, 2, 2, 1]), [[1, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4, 5, 5], [1, 2, 2, 4, 4, 4, 5], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4, 5, 5], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 4, 5, 5], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 4, 5, 5], [1, 3, 3, 4, 4, 4, 5], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 4, 5, 5], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 4, 5, 5], [1, 4, 4, 4, 5], [1, 4, 4, 4], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5], [1, 5], [1], [2, 2, 3, 3, 4, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4, 5, 5], [2, 2, 3, 4, 4, 4, 5], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 4, 5, 5], [2, 2, 4, 4, 4, 5], [2, 2, 4, 4, 4], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 4, 5, 5], [2, 3, 3, 4, 4, 4, 5], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 4, 5, 5], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 4, 5, 5], [2, 4, 4, 4, 5], [2, 4, 4, 4], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5], [2, 5], [2], [3, 3, 4, 4, 4, 5, 5], [3, 3, 4, 4, 4, 5], [3, 3, 4, 4, 4], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 4, 5, 5], [3, 4, 4, 4, 5], [3, 4, 4, 4], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5], [3, 5], [3], [4, 4, 4, 5, 5], [4, 4, 4, 5], [4, 4, 4], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5], [4, 5], [4], [5, 5], [5], []])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [2], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [3], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [4], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [5], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [6], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [7], [8, 9, 10], [8, 9], [8, 10], [8], [9, 10], [9], [10], []])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, 5, 4, 3, 2, 1]), [[-5, -4, -3, -2, -1, 1, 2, 3, 4, 5], [-5, -4, -3, -2, -1, 1, 2, 3, 4], [-5, -4, -3, -2, -1, 1, 2, 3, 5], [-5, -4, -3, -2, -1, 1, 2, 3], [-5, -4, -3, -2, -1, 1, 2, 4, 5], [-5, -4, -3, -2, -1, 1, 2, 4], [-5, -4, -3, -2, -1, 1, 2, 5], [-5, -4, -3, -2, -1, 1, 2], [-5, -4, -3, -2, -1, 1, 3, 4, 5], [-5, -4, -3, -2, -1, 1, 3, 4], [-5, -4, -3, -2, -1, 1, 3, 5], [-5, -4, -3, -2, -1, 1, 3], [-5, -4, -3, -2, -1, 1, 4, 5], [-5, -4, -3, -2, -1, 1, 4], [-5, -4, -3, -2, -1, 1, 5], [-5, -4, -3, -2, -1, 1], [-5, -4, -3, -2, -1, 2, 3, 4, 5], [-5, -4, -3, -2, -1, 2, 3, 4], [-5, -4, -3, -2, -1, 2, 3, 5], [-5, -4, -3, -2, -1, 2, 3], [-5, -4, -3, -2, -1, 2, 4, 5], [-5, -4, -3, -2, -1, 2, 4], [-5, -4, -3, -2, -1, 2, 5], [-5, -4, -3, -2, -1, 2], [-5, -4, -3, -2, -1, 3, 4, 5], [-5, -4, -3, -2, -1, 3, 4], [-5, -4, -3, -2, -1, 3, 5], [-5, -4, -3, -2, -1, 3], [-5, -4, -3, -2, -1, 4, 5], [-5, -4, -3, -2, -1, 4], [-5, -4, -3, -2, -1, 5], [-5, -4, -3, -2, -1], [-5, -4, -3, -2, 1, 2, 3, 4, 5], [-5, -4, -3, -2, 1, 2, 3, 4], [-5, -4, -3, -2, 1, 2, 3, 5], [-5, -4, -3, -2, 1, 2, 3], [-5, -4, -3, -2, 1, 2, 4, 5], [-5, -4, -3, -2, 1, 2, 4], [-5, -4, -3, -2, 1, 2, 5], [-5, -4, -3, -2, 1, 2], [-5, -4, -3, -2, 1, 3, 4, 5], [-5, -4, -3, -2, 1, 3, 4], [-5, -4, -3, -2, 1, 3, 5], [-5, -4, -3, -2, 1, 3], [-5, -4, -3, -2, 1, 4, 5], [-5, -4, -3, -2, 1, 4], [-5, -4, -3, -2, 1, 5], [-5, -4, -3, -2, 1], [-5, -4, -3, -2, 2, 3, 4, 5], [-5, -4, -3, -2, 2, 3, 4], [-5, -4, -3, -2, 2, 3, 5], [-5, -4, -3, -2, 2, 3], [-5, -4, -3, -2, 2, 4, 5], [-5, -4, -3, -2, 2, 4], [-5, -4, -3, -2, 2, 5], [-5, -4, -3, -2, 2], [-5, -4, -3, -2, 3, 4, 5], [-5, -4, -3, -2, 3, 4], [-5, -4, -3, -2, 3, 5], [-5, -4, -3, -2, 3], [-5, -4, -3, -2, 4, 5], [-5, -4, -3, -2, 4], [-5, -4, -3, -2, 5], [-5, -4, -3, -2], [-5, -4, -3, -1, 1, 2, 3, 4, 5], [-5, -4, -3, -1, 1, 2, 3, 4], [-5, -4, -3, -1, 1, 2, 3, 5], [-5, -4, -3, -1, 1, 2, 3], [-5, -4, -3, -1, 1, 2, 4, 5], [-5, -4, -3, -1, 1, 2, 4], [-5, -4, -3, -1, 1, 2, 5], [-5, -4, -3, -1, 1, 2], [-5, -4, -3, -1, 1, 3, 4, 5], [-5, -4, -3, -1, 1, 3, 4], [-5, -4, -3, -1, 1, 3, 5], [-5, -4, -3, -1, 1, 3], [-5, -4, -3, -1, 1, 4, 5], [-5, -4, -3, -1, 1, 4], [-5, -4, -3, -1, 1, 5], [-5, -4, -3, -1, 1], [-5, -4, -3, -1, 2, 3, 4, 5], [-5, -4, -3, -1, 2, 3, 4], [-5, -4, -3, -1, 2, 3, 5], [-5, -4, -3, -1, 2, 3], [-5, -4, -3, -1, 2, 4, 5], [-5, -4, -3, -1, 2, 4], [-5, -4, -3, -1, 2, 5], [-5, -4, -3, -1, 2], [-5, -4, -3, -1, 3, 4, 5], [-5, -4, -3, -1, 3, 4], [-5, -4, -3, -1, 3, 5], [-5, -4, -3, -1, 3], [-5, -4, -3, -1, 4, 5], [-5, -4, -3, -1, 4], [-5, -4, -3, -1, 5], [-5, -4, -3, -1], [-5, -4, -3, 1, 2, 3, 4, 5], [-5, -4, -3, 1, 2, 3, 4], [-5, -4, -3, 1, 2, 3, 5], [-5, -4, -3, 1, 2, 3], [-5, -4, -3, 1, 2, 4, 5], [-5, -4, -3, 1, 2, 4], [-5, -4, -3, 1, 2, 5], [-5, -4, -3, 1, 2], [-5, -4, -3, 1, 3, 4, 5], [-5, -4, -3, 1, 3, 4], [-5, -4, -3, 1, 3, 5], [-5, -4, -3, 1, 3], [-5, -4, -3, 1, 4, 5], [-5, -4, -3, 1, 4], [-5, -4, -3, 1, 5], [-5, -4, -3, 1], [-5, -4, -3, 2, 3, 4, 5], [-5, -4, -3, 2, 3, 4], [-5, -4, -3, 2, 3, 5], [-5, -4, -3, 2, 3], [-5, -4, -3, 2, 4, 5], [-5, -4, -3, 2, 4], [-5, -4, -3, 2, 5], [-5, -4, -3, 2], [-5, -4, -3, 3, 4, 5], [-5, -4, -3, 3, 4], [-5, -4, -3, 3, 5], [-5, -4, -3, 3], [-5, -4, -3, 4, 5], [-5, -4, -3, 4], [-5, -4, -3, 5], [-5, -4, -3], [-5, -4, -2, -1, 1, 2, 3, 4, 5], [-5, -4, -2, -1, 1, 2, 3, 4], [-5, -4, -2, -1, 1, 2, 3, 5], [-5, -4, -2, -1, 1, 2, 3], [-5, -4, -2, -1, 1, 2, 4, 5], [-5, -4, -2, -1, 1, 2, 4], [-5, -4, -2, -1, 1, 2, 5], [-5, -4, -2, -1, 1, 2], [-5, -4, -2, -1, 1, 3, 4, 5], [-5, -4, -2, -1, 1, 3, 4], [-5, -4, -2, -1, 1, 3, 5], [-5, -4, -2, -1, 1, 3], [-5, -4, -2, -1, 1, 4, 5], [-5, -4, -2, -1, 1, 4], [-5, -4, -2, -1, 1, 5], [-5, -4, -2, -1, 1], [-5, -4, -2, -1, 2, 3, 4, 5], [-5, -4, -2, -1, 2, 3, 4], [-5, -4, -2, -1, 2, 3, 5], [-5, -4, -2, -1, 2, 3], [-5, -4, -2, -1, 2, 4, 5], [-5, -4, -2, -1, 2, 4], [-5, -4, -2, -1, 2, 5], [-5, -4, -2, -1, 2], [-5, -4, -2, -1, 3, 4, 5], [-5, -4, -2, -1, 3, 4], [-5, -4, -2, -1, 3, 5], [-5, -4, -2, -1, 3], [-5, -4, -2, -1, 4, 5], [-5, -4, -2, -1, 4], [-5, -4, -2, -1, 5], [-5, -4, -2, -1], [-5, -4, -2, 1, 2, 3, 4, 5], [-5, -4, -2, 1, 2, 3, 4], [-5, -4, -2, 1, 2, 3, 5], [-5, -4, -2, 1, 2, 3], [-5, -4, -2, 1, 2, 4, 5], [-5, -4, -2, 1, 2, 4], [-5, -4, -2, 1, 2, 5], [-5, -4, -2, 1, 2], [-5, -4, -2, 1, 3, 4, 5], [-5, -4, -2, 1, 3, 4], [-5, -4, -2, 1, 3, 5], [-5, -4, -2, 1, 3], [-5, -4, -2, 1, 4, 5], [-5, -4, -2, 1, 4], [-5, -4, -2, 1, 5], [-5, -4, -2, 1], [-5, -4, -2, 2, 3, 4, 5], [-5, -4, -2, 2, 3, 4], [-5, -4, -2, 2, 3, 5], [-5, -4, -2, 2, 3], [-5, -4, -2, 2, 4, 5], [-5, -4, -2, 2, 4], [-5, -4, -2, 2, 5], [-5, -4, -2, 2], [-5, -4, -2, 3, 4, 5], [-5, -4, -2, 3, 4], [-5, -4, -2, 3, 5], [-5, -4, -2, 3], [-5, -4, -2, 4, 5], [-5, -4, -2, 4], [-5, -4, -2, 5], [-5, -4, -2], [-5, -4, -1, 1, 2, 3, 4, 5], [-5, -4, -1, 1, 2, 3, 4], [-5, -4, -1, 1, 2, 3, 5], [-5, -4, -1, 1, 2, 3], [-5, -4, -1, 1, 2, 4, 5], [-5, -4, -1, 1, 2, 4], [-5, -4, -1, 1, 2, 5], [-5, -4, -1, 1, 2], [-5, -4, -1, 1, 3, 4, 5], [-5, -4, -1, 1, 3, 4], [-5, -4, -1, 1, 3, 5], [-5, -4, -1, 1, 3], [-5, -4, -1, 1, 4, 5], [-5, -4, -1, 1, 4], [-5, -4, -1, 1, 5], [-5, -4, -1, 1], [-5, -4, -1, 2, 3, 4, 5], [-5, -4, -1, 2, 3, 4], [-5, -4, -1, 2, 3, 5], [-5, -4, -1, 2, 3], [-5, -4, -1, 2, 4, 5], [-5, -4, -1, 2, 4], [-5, -4, -1, 2, 5], [-5, -4, -1, 2], [-5, -4, -1, 3, 4, 5], [-5, -4, -1, 3, 4], [-5, -4, -1, 3, 5], [-5, -4, -1, 3], [-5, -4, -1, 4, 5], [-5, -4, -1, 4], [-5, -4, -1, 5], [-5, -4, -1], [-5, -4, 1, 2, 3, 4, 5], [-5, -4, 1, 2, 3, 4], [-5, -4, 1, 2, 3, 5], [-5, -4, 1, 2, 3], [-5, -4, 1, 2, 4, 5], [-5, -4, 1, 2, 4], [-5, -4, 1, 2, 5], [-5, -4, 1, 2], [-5, -4, 1, 3, 4, 5], [-5, -4, 1, 3, 4], [-5, -4, 1, 3, 5], [-5, -4, 1, 3], [-5, -4, 1, 4, 5], [-5, -4, 1, 4], [-5, -4, 1, 5], [-5, -4, 1], [-5, -4, 2, 3, 4, 5], [-5, -4, 2, 3, 4], [-5, -4, 2, 3, 5], [-5, -4, 2, 3], [-5, -4, 2, 4, 5], [-5, -4, 2, 4], [-5, -4, 2, 5], [-5, -4, 2], [-5, -4, 3, 4, 5], [-5, -4, 3, 4], [-5, -4, 3, 5], [-5, -4, 3], [-5, -4, 4, 5], [-5, -4, 4], [-5, -4, 5], [-5, -4], [-5, -3, -2, -1, 1, 2, 3, 4, 5], [-5, -3, -2, -1, 1, 2, 3, 4], [-5, -3, -2, -1, 1, 2, 3, 5], [-5, -3, -2, -1, 1, 2, 3], [-5, -3, -2, -1, 1, 2, 4, 5], [-5, -3, -2, -1, 1, 2, 4], [-5, -3, -2, -1, 1, 2, 5], [-5, -3, -2, -1, 1, 2], [-5, -3, -2, -1, 1, 3, 4, 5], [-5, -3, -2, -1, 1, 3, 4], [-5, -3, -2, -1, 1, 3, 5], [-5, -3, -2, -1, 1, 3], [-5, -3, -2, -1, 1, 4, 5], [-5, -3, -2, -1, 1, 4], [-5, -3, -2, -1, 1, 5], [-5, -3, -2, -1, 1], [-5, -3, -2, -1, 2, 3, 4, 5], [-5, -3, -2, -1, 2, 3, 4], [-5, -3, -2, -1, 2, 3, 5], [-5, -3, -2, -1, 2, 3], [-5, -3, -2, -1, 2, 4, 5], [-5, -3, -2, -1, 2, 4], [-5, -3, -2, -1, 2, 5], [-5, -3, -2, -1, 2], [-5, -3, -2, -1, 3, 4, 5], [-5, -3, -2, -1, 3, 4], [-5, -3, -2, -1, 3, 5], [-5, -3, -2, -1, 3], [-5, -3, -2, -1, 4, 5], [-5, -3, -2, -1, 4], [-5, -3, -2, -1, 5], [-5, -3, -2, -1], [-5, -3, -2, 1, 2, 3, 4, 5], [-5, -3, -2, 1, 2, 3, 4], [-5, -3, -2, 1, 2, 3, 5], [-5, -3, -2, 1, 2, 3], [-5, -3, -2, 1, 2, 4, 5], [-5, -3, -2, 1, 2, 4], [-5, -3, -2, 1, 2, 5], [-5, -3, -2, 1, 2], [-5, -3, -2, 1, 3, 4, 5], [-5, -3, -2, 1, 3, 4], [-5, -3, -2, 1, 3, 5], [-5, -3, -2, 1, 3], [-5, -3, -2, 1, 4, 5], [-5, -3, -2, 1, 4], [-5, -3, -2, 1, 5], [-5, -3, -2, 1], [-5, -3, -2, 2, 3, 4, 5], [-5, -3, -2, 2, 3, 4], [-5, -3, -2, 2, 3, 5], [-5, -3, -2, 2, 3], [-5, -3, -2, 2, 4, 5], [-5, -3, -2, 2, 4], [-5, -3, -2, 2, 5], [-5, -3, -2, 2], [-5, -3, -2, 3, 4, 5], [-5, -3, -2, 3, 4], [-5, -3, -2, 3, 5], [-5, -3, -2, 3], [-5, -3, -2, 4, 5], [-5, -3, -2, 4], [-5, -3, -2, 5], [-5, -3, -2], [-5, -3, -1, 1, 2, 3, 4, 5], [-5, -3, -1, 1, 2, 3, 4], [-5, -3, -1, 1, 2, 3, 5], [-5, -3, -1, 1, 2, 3], [-5, -3, -1, 1, 2, 4, 5], [-5, -3, -1, 1, 2, 4], [-5, -3, -1, 1, 2, 5], [-5, -3, -1, 1, 2], [-5, -3, -1, 1, 3, 4, 5], [-5, -3, -1, 1, 3, 4], [-5, -3, -1, 1, 3, 5], [-5, -3, -1, 1, 3], [-5, -3, -1, 1, 4, 5], [-5, -3, -1, 1, 4], [-5, -3, -1, 1, 5], [-5, -3, -1, 1], [-5, -3, -1, 2, 3, 4, 5], [-5, -3, -1, 2, 3, 4], [-5, -3, -1, 2, 3, 5], [-5, -3, -1, 2, 3], [-5, -3, -1, 2, 4, 5], [-5, -3, -1, 2, 4], [-5, -3, -1, 2, 5], [-5, -3, -1, 2], [-5, -3, -1, 3, 4, 5], [-5, -3, -1, 3, 4], [-5, -3, -1, 3, 5], [-5, -3, -1, 3], [-5, -3, -1, 4, 5], [-5, -3, -1, 4], [-5, -3, -1, 5], [-5, -3, -1], [-5, -3, 1, 2, 3, 4, 5], [-5, -3, 1, 2, 3, 4], [-5, -3, 1, 2, 3, 5], [-5, -3, 1, 2, 3], [-5, -3, 1, 2, 4, 5], [-5, -3, 1, 2, 4], [-5, -3, 1, 2, 5], [-5, -3, 1, 2], [-5, -3, 1, 3, 4, 5], [-5, -3, 1, 3, 4], [-5, -3, 1, 3, 5], [-5, -3, 1, 3], [-5, -3, 1, 4, 5], [-5, -3, 1, 4], [-5, -3, 1, 5], [-5, -3, 1], [-5, -3, 2, 3, 4, 5], [-5, -3, 2, 3, 4], [-5, -3, 2, 3, 5], [-5, -3, 2, 3], [-5, -3, 2, 4, 5], [-5, -3, 2, 4], [-5, -3, 2, 5], [-5, -3, 2], [-5, -3, 3, 4, 5], [-5, -3, 3, 4], [-5, -3, 3, 5], [-5, -3, 3], [-5, -3, 4, 5], [-5, -3, 4], [-5, -3, 5], [-5, -3], [-5, -2, -1, 1, 2, 3, 4, 5], [-5, -2, -1, 1, 2, 3, 4], [-5, -2, -1, 1, 2, 3, 5], [-5, -2, -1, 1, 2, 3], [-5, -2, -1, 1, 2, 4, 5], [-5, -2, -1, 1, 2, 4], [-5, -2, -1, 1, 2, 5], [-5, -2, -1, 1, 2], [-5, -2, -1, 1, 3, 4, 5], [-5, -2, -1, 1, 3, 4], [-5, -2, -1, 1, 3, 5], [-5, -2, -1, 1, 3], [-5, -2, -1, 1, 4, 5], [-5, -2, -1, 1, 4], [-5, -2, -1, 1, 5], [-5, -2, -1, 1], [-5, -2, -1, 2, 3, 4, 5], [-5, -2, -1, 2, 3, 4], [-5, -2, -1, 2, 3, 5], [-5, -2, -1, 2, 3], [-5, -2, -1, 2, 4, 5], [-5, -2, -1, 2, 4], [-5, -2, -1, 2, 5], [-5, -2, -1, 2], [-5, -2, -1, 3, 4, 5], [-5, -2, -1, 3, 4], [-5, -2, -1, 3, 5], [-5, -2, -1, 3], [-5, -2, -1, 4, 5], [-5, -2, -1, 4], [-5, -2, -1, 5], [-5, -2, -1], [-5, -2, 1, 2, 3, 4, 5], [-5, -2, 1, 2, 3, 4], [-5, -2, 1, 2, 3, 5], [-5, -2, 1, 2, 3], [-5, -2, 1, 2, 4, 5], [-5, -2, 1, 2, 4], [-5, -2, 1, 2, 5], [-5, -2, 1, 2], [-5, -2, 1, 3, 4, 5], [-5, -2, 1, 3, 4], [-5, -2, 1, 3, 5], [-5, -2, 1, 3], [-5, -2, 1, 4, 5], [-5, -2, 1, 4], [-5, -2, 1, 5], [-5, -2, 1], [-5, -2, 2, 3, 4, 5], [-5, -2, 2, 3, 4], [-5, -2, 2, 3, 5], [-5, -2, 2, 3], [-5, -2, 2, 4, 5], [-5, -2, 2, 4], [-5, -2, 2, 5], [-5, -2, 2], [-5, -2, 3, 4, 5], [-5, -2, 3, 4], [-5, -2, 3, 5], [-5, -2, 3], [-5, -2, 4, 5], [-5, -2, 4], [-5, -2, 5], [-5, -2], [-5, -1, 1, 2, 3, 4, 5], [-5, -1, 1, 2, 3, 4], [-5, -1, 1, 2, 3, 5], [-5, -1, 1, 2, 3], [-5, -1, 1, 2, 4, 5], [-5, -1, 1, 2, 4], [-5, -1, 1, 2, 5], [-5, -1, 1, 2], [-5, -1, 1, 3, 4, 5], [-5, -1, 1, 3, 4], [-5, -1, 1, 3, 5], [-5, -1, 1, 3], [-5, -1, 1, 4, 5], [-5, -1, 1, 4], [-5, -1, 1, 5], [-5, -1, 1], [-5, -1, 2, 3, 4, 5], [-5, -1, 2, 3, 4], [-5, -1, 2, 3, 5], [-5, -1, 2, 3], [-5, -1, 2, 4, 5], [-5, -1, 2, 4], [-5, -1, 2, 5], [-5, -1, 2], [-5, -1, 3, 4, 5], [-5, -1, 3, 4], [-5, -1, 3, 5], [-5, -1, 3], [-5, -1, 4, 5], [-5, -1, 4], [-5, -1, 5], [-5, -1], [-5, 1, 2, 3, 4, 5], [-5, 1, 2, 3, 4], [-5, 1, 2, 3, 5], [-5, 1, 2, 3], [-5, 1, 2, 4, 5], [-5, 1, 2, 4], [-5, 1, 2, 5], [-5, 1, 2], [-5, 1, 3, 4, 5], [-5, 1, 3, 4], [-5, 1, 3, 5], [-5, 1, 3], [-5, 1, 4, 5], [-5, 1, 4], [-5, 1, 5], [-5, 1], [-5, 2, 3, 4, 5], [-5, 2, 3, 4], [-5, 2, 3, 5], [-5, 2, 3], [-5, 2, 4, 5], [-5, 2, 4], [-5, 2, 5], [-5, 2], [-5, 3, 4, 5], [-5, 3, 4], [-5, 3, 5], [-5, 3], [-5, 4, 5], [-5, 4], [-5, 5], [-5], [-4, -3, -2, -1, 1, 2, 3, 4, 5], [-4, -3, -2, -1, 1, 2, 3, 4], [-4, -3, -2, -1, 1, 2, 3, 5], [-4, -3, -2, -1, 1, 2, 3], [-4, -3, -2, -1, 1, 2, 4, 5], [-4, -3, -2, -1, 1, 2, 4], [-4, -3, -2, -1, 1, 2, 5], [-4, -3, -2, -1, 1, 2], [-4, -3, -2, -1, 1, 3, 4, 5], [-4, -3, -2, -1, 1, 3, 4], [-4, -3, -2, -1, 1, 3, 5], [-4, -3, -2, -1, 1, 3], [-4, -3, -2, -1, 1, 4, 5], [-4, -3, -2, -1, 1, 4], [-4, -3, -2, -1, 1, 5], [-4, -3, -2, -1, 1], [-4, -3, -2, -1, 2, 3, 4, 5], [-4, -3, -2, -1, 2, 3, 4], [-4, -3, -2, -1, 2, 3, 5], [-4, -3, -2, -1, 2, 3], [-4, -3, -2, -1, 2, 4, 5], [-4, -3, -2, -1, 2, 4], [-4, -3, -2, -1, 2, 5], [-4, -3, -2, -1, 2], [-4, -3, -2, -1, 3, 4, 5], [-4, -3, -2, -1, 3, 4], [-4, -3, -2, -1, 3, 5], [-4, -3, -2, -1, 3], [-4, -3, -2, -1, 4, 5], [-4, -3, -2, -1, 4], [-4, -3, -2, -1, 5], [-4, -3, -2, -1], [-4, -3, -2, 1, 2, 3, 4, 5], [-4, -3, -2, 1, 2, 3, 4], [-4, -3, -2, 1, 2, 3, 5], [-4, -3, -2, 1, 2, 3], [-4, -3, -2, 1, 2, 4, 5], [-4, -3, -2, 1, 2, 4], [-4, -3, -2, 1, 2, 5], [-4, -3, -2, 1, 2], [-4, -3, -2, 1, 3, 4, 5], [-4, -3, -2, 1, 3, 4], [-4, -3, -2, 1, 3, 5], [-4, -3, -2, 1, 3], [-4, -3, -2, 1, 4, 5], [-4, -3, -2, 1, 4], [-4, -3, -2, 1, 5], [-4, -3, -2, 1], [-4, -3, -2, 2, 3, 4, 5], [-4, -3, -2, 2, 3, 4], [-4, -3, -2, 2, 3, 5], [-4, -3, -2, 2, 3], [-4, -3, -2, 2, 4, 5], [-4, -3, -2, 2, 4], [-4, -3, -2, 2, 5], [-4, -3, -2, 2], [-4, -3, -2, 3, 4, 5], [-4, -3, -2, 3, 4], [-4, -3, -2, 3, 5], [-4, -3, -2, 3], [-4, -3, -2, 4, 5], [-4, -3, -2, 4], [-4, -3, -2, 5], [-4, -3, -2], [-4, -3, -1, 1, 2, 3, 4, 5], [-4, -3, -1, 1, 2, 3, 4], [-4, -3, -1, 1, 2, 3, 5], [-4, -3, -1, 1, 2, 3], [-4, -3, -1, 1, 2, 4, 5], [-4, -3, -1, 1, 2, 4], [-4, -3, -1, 1, 2, 5], [-4, -3, -1, 1, 2], [-4, -3, -1, 1, 3, 4, 5], [-4, -3, -1, 1, 3, 4], [-4, -3, -1, 1, 3, 5], [-4, -3, -1, 1, 3], [-4, -3, -1, 1, 4, 5], [-4, -3, -1, 1, 4], [-4, -3, -1, 1, 5], [-4, -3, -1, 1], [-4, -3, -1, 2, 3, 4, 5], [-4, -3, -1, 2, 3, 4], [-4, -3, -1, 2, 3, 5], [-4, -3, -1, 2, 3], [-4, -3, -1, 2, 4, 5], [-4, -3, -1, 2, 4], [-4, -3, -1, 2, 5], [-4, -3, -1, 2], [-4, -3, -1, 3, 4, 5], [-4, -3, -1, 3, 4], [-4, -3, -1, 3, 5], [-4, -3, -1, 3], [-4, -3, -1, 4, 5], [-4, -3, -1, 4], [-4, -3, -1, 5], [-4, -3, -1], [-4, -3, 1, 2, 3, 4, 5], [-4, -3, 1, 2, 3, 4], [-4, -3, 1, 2, 3, 5], [-4, -3, 1, 2, 3], [-4, -3, 1, 2, 4, 5], [-4, -3, 1, 2, 4], [-4, -3, 1, 2, 5], [-4, -3, 1, 2], [-4, -3, 1, 3, 4, 5], [-4, -3, 1, 3, 4], [-4, -3, 1, 3, 5], [-4, -3, 1, 3], [-4, -3, 1, 4, 5], [-4, -3, 1, 4], [-4, -3, 1, 5], [-4, -3, 1], [-4, -3, 2, 3, 4, 5], [-4, -3, 2, 3, 4], [-4, -3, 2, 3, 5], [-4, -3, 2, 3], [-4, -3, 2, 4, 5], [-4, -3, 2, 4], [-4, -3, 2, 5], [-4, -3, 2], [-4, -3, 3, 4, 5], [-4, -3, 3, 4], [-4, -3, 3, 5], [-4, -3, 3], [-4, -3, 4, 5], [-4, -3, 4], [-4, -3, 5], [-4, -3], [-4, -2, -1, 1, 2, 3, 4, 5], [-4, -2, -1, 1, 2, 3, 4], [-4, -2, -1, 1, 2, 3, 5], [-4, -2, -1, 1, 2, 3], [-4, -2, -1, 1, 2, 4, 5], [-4, -2, -1, 1, 2, 4], [-4, -2, -1, 1, 2, 5], [-4, -2, -1, 1, 2], [-4, -2, -1, 1, 3, 4, 5], [-4, -2, -1, 1, 3, 4], [-4, -2, -1, 1, 3, 5], [-4, -2, -1, 1, 3], [-4, -2, -1, 1, 4, 5], [-4, -2, -1, 1, 4], [-4, -2, -1, 1, 5], [-4, -2, -1, 1], [-4, -2, -1, 2, 3, 4, 5], [-4, -2, -1, 2, 3, 4], [-4, -2, -1, 2, 3, 5], [-4, -2, -1, 2, 3], [-4, -2, -1, 2, 4, 5], [-4, -2, -1, 2, 4], [-4, -2, -1, 2, 5], [-4, -2, -1, 2], [-4, -2, -1, 3, 4, 5], [-4, -2, -1, 3, 4], [-4, -2, -1, 3, 5], [-4, -2, -1, 3], [-4, -2, -1, 4, 5], [-4, -2, -1, 4], [-4, -2, -1, 5], [-4, -2, -1], [-4, -2, 1, 2, 3, 4, 5], [-4, -2, 1, 2, 3, 4], [-4, -2, 1, 2, 3, 5], [-4, -2, 1, 2, 3], [-4, -2, 1, 2, 4, 5], [-4, -2, 1, 2, 4], [-4, -2, 1, 2, 5], [-4, -2, 1, 2], [-4, -2, 1, 3, 4, 5], [-4, -2, 1, 3, 4], [-4, -2, 1, 3, 5], [-4, -2, 1, 3], [-4, -2, 1, 4, 5], [-4, -2, 1, 4], [-4, -2, 1, 5], [-4, -2, 1], [-4, -2, 2, 3, 4, 5], [-4, -2, 2, 3, 4], [-4, -2, 2, 3, 5], [-4, -2, 2, 3], [-4, -2, 2, 4, 5], [-4, -2, 2, 4], [-4, -2, 2, 5], [-4, -2, 2], [-4, -2, 3, 4, 5], [-4, -2, 3, 4], [-4, -2, 3, 5], [-4, -2, 3], [-4, -2, 4, 5], [-4, -2, 4], [-4, -2, 5], [-4, -2], [-4, -1, 1, 2, 3, 4, 5], [-4, -1, 1, 2, 3, 4], [-4, -1, 1, 2, 3, 5], [-4, -1, 1, 2, 3], [-4, -1, 1, 2, 4, 5], [-4, -1, 1, 2, 4], [-4, -1, 1, 2, 5], [-4, -1, 1, 2], [-4, -1, 1, 3, 4, 5], [-4, -1, 1, 3, 4], [-4, -1, 1, 3, 5], [-4, -1, 1, 3], [-4, -1, 1, 4, 5], [-4, -1, 1, 4], [-4, -1, 1, 5], [-4, -1, 1], [-4, -1, 2, 3, 4, 5], [-4, -1, 2, 3, 4], [-4, -1, 2, 3, 5], [-4, -1, 2, 3], [-4, -1, 2, 4, 5], [-4, -1, 2, 4], [-4, -1, 2, 5], [-4, -1, 2], [-4, -1, 3, 4, 5], [-4, -1, 3, 4], [-4, -1, 3, 5], [-4, -1, 3], [-4, -1, 4, 5], [-4, -1, 4], [-4, -1, 5], [-4, -1], [-4, 1, 2, 3, 4, 5], [-4, 1, 2, 3, 4], [-4, 1, 2, 3, 5], [-4, 1, 2, 3], [-4, 1, 2, 4, 5], [-4, 1, 2, 4], [-4, 1, 2, 5], [-4, 1, 2], [-4, 1, 3, 4, 5], [-4, 1, 3, 4], [-4, 1, 3, 5], [-4, 1, 3], [-4, 1, 4, 5], [-4, 1, 4], [-4, 1, 5], [-4, 1], [-4, 2, 3, 4, 5], [-4, 2, 3, 4], [-4, 2, 3, 5], [-4, 2, 3], [-4, 2, 4, 5], [-4, 2, 4], [-4, 2, 5], [-4, 2], [-4, 3, 4, 5], [-4, 3, 4], [-4, 3, 5], [-4, 3], [-4, 4, 5], [-4, 4], [-4, 5], [-4], [-3, -2, -1, 1, 2, 3, 4, 5], [-3, -2, -1, 1, 2, 3, 4], [-3, -2, -1, 1, 2, 3, 5], [-3, -2, -1, 1, 2, 3], [-3, -2, -1, 1, 2, 4, 5], [-3, -2, -1, 1, 2, 4], [-3, -2, -1, 1, 2, 5], [-3, -2, -1, 1, 2], [-3, -2, -1, 1, 3, 4, 5], [-3, -2, -1, 1, 3, 4], [-3, -2, -1, 1, 3, 5], [-3, -2, -1, 1, 3], [-3, -2, -1, 1, 4, 5], [-3, -2, -1, 1, 4], [-3, -2, -1, 1, 5], [-3, -2, -1, 1], [-3, -2, -1, 2, 3, 4, 5], [-3, -2, -1, 2, 3, 4], [-3, -2, -1, 2, 3, 5], [-3, -2, -1, 2, 3], [-3, -2, -1, 2, 4, 5], [-3, -2, -1, 2, 4], [-3, -2, -1, 2, 5], [-3, -2, -1, 2], [-3, -2, -1, 3, 4, 5], [-3, -2, -1, 3, 4], [-3, -2, -1, 3, 5], [-3, -2, -1, 3], [-3, -2, -1, 4, 5], [-3, -2, -1, 4], [-3, -2, -1, 5], [-3, -2, -1], [-3, -2, 1, 2, 3, 4, 5], [-3, -2, 1, 2, 3, 4], [-3, -2, 1, 2, 3, 5], [-3, -2, 1, 2, 3], [-3, -2, 1, 2, 4, 5], [-3, -2, 1, 2, 4], [-3, -2, 1, 2, 5], [-3, -2, 1, 2], [-3, -2, 1, 3, 4, 5], [-3, -2, 1, 3, 4], [-3, -2, 1, 3, 5], [-3, -2, 1, 3], [-3, -2, 1, 4, 5], [-3, -2, 1, 4], [-3, -2, 1, 5], [-3, -2, 1], [-3, -2, 2, 3, 4, 5], [-3, -2, 2, 3, 4], [-3, -2, 2, 3, 5], [-3, -2, 2, 3], [-3, -2, 2, 4, 5], [-3, -2, 2, 4], [-3, -2, 2, 5], [-3, -2, 2], [-3, -2, 3, 4, 5], [-3, -2, 3, 4], [-3, -2, 3, 5], [-3, -2, 3], [-3, -2, 4, 5], [-3, -2, 4], [-3, -2, 5], [-3, -2], [-3, -1, 1, 2, 3, 4, 5], [-3, -1, 1, 2, 3, 4], [-3, -1, 1, 2, 3, 5], [-3, -1, 1, 2, 3], [-3, -1, 1, 2, 4, 5], [-3, -1, 1, 2, 4], [-3, -1, 1, 2, 5], [-3, -1, 1, 2], [-3, -1, 1, 3, 4, 5], [-3, -1, 1, 3, 4], [-3, -1, 1, 3, 5], [-3, -1, 1, 3], [-3, -1, 1, 4, 5], [-3, -1, 1, 4], [-3, -1, 1, 5], [-3, -1, 1], [-3, -1, 2, 3, 4, 5], [-3, -1, 2, 3, 4], [-3, -1, 2, 3, 5], [-3, -1, 2, 3], [-3, -1, 2, 4, 5], [-3, -1, 2, 4], [-3, -1, 2, 5], [-3, -1, 2], [-3, -1, 3, 4, 5], [-3, -1, 3, 4], [-3, -1, 3, 5], [-3, -1, 3], [-3, -1, 4, 5], [-3, -1, 4], [-3, -1, 5], [-3, -1], [-3, 1, 2, 3, 4, 5], [-3, 1, 2, 3, 4], [-3, 1, 2, 3, 5], [-3, 1, 2, 3], [-3, 1, 2, 4, 5], [-3, 1, 2, 4], [-3, 1, 2, 5], [-3, 1, 2], [-3, 1, 3, 4, 5], [-3, 1, 3, 4], [-3, 1, 3, 5], [-3, 1, 3], [-3, 1, 4, 5], [-3, 1, 4], [-3, 1, 5], [-3, 1], [-3, 2, 3, 4, 5], [-3, 2, 3, 4], [-3, 2, 3, 5], [-3, 2, 3], [-3, 2, 4, 5], [-3, 2, 4], [-3, 2, 5], [-3, 2], [-3, 3, 4, 5], [-3, 3, 4], [-3, 3, 5], [-3, 3], [-3, 4, 5], [-3, 4], [-3, 5], [-3], [-2, -1, 1, 2, 3, 4, 5], [-2, -1, 1, 2, 3, 4], [-2, -1, 1, 2, 3, 5], [-2, -1, 1, 2, 3], [-2, -1, 1, 2, 4, 5], [-2, -1, 1, 2, 4], [-2, -1, 1, 2, 5], [-2, -1, 1, 2], [-2, -1, 1, 3, 4, 5], [-2, -1, 1, 3, 4], [-2, -1, 1, 3, 5], [-2, -1, 1, 3], [-2, -1, 1, 4, 5], [-2, -1, 1, 4], [-2, -1, 1, 5], [-2, -1, 1], [-2, -1, 2, 3, 4, 5], [-2, -1, 2, 3, 4], [-2, -1, 2, 3, 5], [-2, -1, 2, 3], [-2, -1, 2, 4, 5], [-2, -1, 2, 4], [-2, -1, 2, 5], [-2, -1, 2], [-2, -1, 3, 4, 5], [-2, -1, 3, 4], [-2, -1, 3, 5], [-2, -1, 3], [-2, -1, 4, 5], [-2, -1, 4], [-2, -1, 5], [-2, -1], [-2, 1, 2, 3, 4, 5], [-2, 1, 2, 3, 4], [-2, 1, 2, 3, 5], [-2, 1, 2, 3], [-2, 1, 2, 4, 5], [-2, 1, 2, 4], [-2, 1, 2, 5], [-2, 1, 2], [-2, 1, 3, 4, 5], [-2, 1, 3, 4], [-2, 1, 3, 5], [-2, 1, 3], [-2, 1, 4, 5], [-2, 1, 4], [-2, 1, 5], [-2, 1], [-2, 2, 3, 4, 5], [-2, 2, 3, 4], [-2, 2, 3, 5], [-2, 2, 3], [-2, 2, 4, 5], [-2, 2, 4], [-2, 2, 5], [-2, 2], [-2, 3, 4, 5], [-2, 3, 4], [-2, 3, 5], [-2, 3], [-2, 4, 5], [-2, 4], [-2, 5], [-2], [-1, 1, 2, 3, 4, 5], [-1, 1, 2, 3, 4], [-1, 1, 2, 3, 5], [-1, 1, 2, 3], [-1, 1, 2, 4, 5], [-1, 1, 2, 4], [-1, 1, 2, 5], [-1, 1, 2], [-1, 1, 3, 4, 5], [-1, 1, 3, 4], [-1, 1, 3, 5], [-1, 1, 3], [-1, 1, 4, 5], [-1, 1, 4], [-1, 1, 5], [-1, 1], [-1, 2, 3, 4, 5], [-1, 2, 3, 4], [-1, 2, 3, 5], [-1, 2, 3], [-1, 2, 4, 5], [-1, 2, 4], [-1, 2, 5], [-1, 2], [-1, 3, 4, 5], [-1, 3, 4], [-1, 3, 5], [-1, 3], [-1, 4, 5], [-1, 4], [-1, 5], [-1], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [1], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [2], [3, 4, 5], [3, 4], [3, 5], [3], [4, 5], [4], [5], []])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0], [0], []])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [2], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [3], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [4], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [5], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [6], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [7], [8, 9, 10], [8, 9], [8, 10], [8], [9, 10], [9], [10], []])\n assert answers_match(candidate(nums=[-2, -1, 0, 0, 1, 2]), [[-2, -1, 0, 0, 1, 2], [-2, -1, 0, 0, 1], [-2, -1, 0, 0, 2], [-2, -1, 0, 0], [-2, -1, 0, 1, 2], [-2, -1, 0, 1], [-2, -1, 0, 2], [-2, -1, 0], [-2, -1, 1, 2], [-2, -1, 1], [-2, -1, 2], [-2, -1], [-2, 0, 0, 1, 2], [-2, 0, 0, 1], [-2, 0, 0, 2], [-2, 0, 0], [-2, 0, 1, 2], [-2, 0, 1], [-2, 0, 2], [-2, 0], [-2, 1, 2], [-2, 1], [-2, 2], [-2], [-1, 0, 0, 1, 2], [-1, 0, 0, 1], [-1, 0, 0, 2], [-1, 0, 0], [-1, 0, 1, 2], [-1, 0, 1], [-1, 0, 2], [-1, 0], [-1, 1, 2], [-1, 1], [-1, 2], [-1], [0, 0, 1, 2], [0, 0, 1], [0, 0, 2], [0, 0], [0, 1, 2], [0, 1], [0, 2], [0], [1, 2], [1], [2], []])\n assert answers_match(candidate(nums=[6, 6, 6, 6, 6, 6, 6]), [[6, 6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6, 6], [6, 6, 6, 6, 6], [6, 6, 6, 6], [6, 6, 6], [6, 6], [6], []])\n assert answers_match(candidate(nums=[10, 1, 2, 3, 4, 5, 6, 7, 8, 9]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [2], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [3], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [4], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [5], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [6], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [7], [8, 9, 10], [8, 9], [8, 10], [8], [9, 10], [9], [10], []])\n assert answers_match(candidate(nums=[0, 1, 1, 2, 2, 2, 3]), [[0, 1, 1, 2, 2, 2, 3], [0, 1, 1, 2, 2, 2], [0, 1, 1, 2, 2, 3], [0, 1, 1, 2, 2], [0, 1, 1, 2, 3], [0, 1, 1, 2], [0, 1, 1, 3], [0, 1, 1], [0, 1, 2, 2, 2, 3], [0, 1, 2, 2, 2], [0, 1, 2, 2, 3], [0, 1, 2, 2], [0, 1, 2, 3], [0, 1, 2], [0, 1, 3], [0, 1], [0, 2, 2, 2, 3], [0, 2, 2, 2], [0, 2, 2, 3], [0, 2, 2], [0, 2, 3], [0, 2], [0, 3], [0], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3], [1, 1], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3], [1, 2], [1, 3], [1], [2, 2, 2, 3], [2, 2, 2], [2, 2, 3], [2, 2], [2, 3], [2], [3], []])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -1, -2, -3, -4, -5]), [[-5, -5, -4, -4, -3, -3, -2, -2, -1, -1], [-5, -5, -4, -4, -3, -3, -2, -2, -1], [-5, -5, -4, -4, -3, -3, -2, -2], [-5, -5, -4, -4, -3, -3, -2, -1, -1], [-5, -5, -4, -4, -3, -3, -2, -1], [-5, -5, -4, -4, -3, -3, -2], [-5, -5, -4, -4, -3, -3, -1, -1], [-5, -5, -4, -4, -3, -3, -1], [-5, -5, -4, -4, -3, -3], [-5, -5, -4, -4, -3, -2, -2, -1, -1], [-5, -5, -4, -4, -3, -2, -2, -1], [-5, -5, -4, -4, -3, -2, -2], [-5, -5, -4, -4, -3, -2, -1, -1], [-5, -5, -4, -4, -3, -2, -1], [-5, -5, -4, -4, -3, -2], [-5, -5, -4, -4, -3, -1, -1], [-5, -5, -4, -4, -3, -1], [-5, -5, -4, -4, -3], [-5, -5, -4, -4, -2, -2, -1, -1], [-5, -5, -4, -4, -2, -2, -1], [-5, -5, -4, -4, -2, -2], [-5, -5, -4, -4, -2, -1, -1], [-5, -5, -4, -4, -2, -1], [-5, -5, -4, -4, -2], [-5, -5, -4, -4, -1, -1], [-5, -5, -4, -4, -1], [-5, -5, -4, -4], [-5, -5, -4, -3, -3, -2, -2, -1, -1], [-5, -5, -4, -3, -3, -2, -2, -1], [-5, -5, -4, -3, -3, -2, -2], [-5, -5, -4, -3, -3, -2, -1, -1], [-5, -5, -4, -3, -3, -2, -1], [-5, -5, -4, -3, -3, -2], [-5, -5, -4, -3, -3, -1, -1], [-5, -5, -4, -3, -3, -1], [-5, -5, -4, -3, -3], [-5, -5, -4, -3, -2, -2, -1, -1], [-5, -5, -4, -3, -2, -2, -1], [-5, -5, -4, -3, -2, -2], [-5, -5, -4, -3, -2, -1, -1], [-5, -5, -4, -3, -2, -1], [-5, -5, -4, -3, -2], [-5, -5, -4, -3, -1, -1], [-5, -5, -4, -3, -1], [-5, -5, -4, -3], [-5, -5, -4, -2, -2, -1, -1], [-5, -5, -4, -2, -2, -1], [-5, -5, -4, -2, -2], [-5, -5, -4, -2, -1, -1], [-5, -5, -4, -2, -1], [-5, -5, -4, -2], [-5, -5, -4, -1, -1], [-5, -5, -4, -1], [-5, -5, -4], [-5, -5, -3, -3, -2, -2, -1, -1], [-5, -5, -3, -3, -2, -2, -1], [-5, -5, -3, -3, -2, -2], [-5, -5, -3, -3, -2, -1, -1], [-5, -5, -3, -3, -2, -1], [-5, -5, -3, -3, -2], [-5, -5, -3, -3, -1, -1], [-5, -5, -3, -3, -1], [-5, -5, -3, -3], [-5, -5, -3, -2, -2, -1, -1], [-5, -5, -3, -2, -2, -1], [-5, -5, -3, -2, -2], [-5, -5, -3, -2, -1, -1], [-5, -5, -3, -2, -1], [-5, -5, -3, -2], [-5, -5, -3, -1, -1], [-5, -5, -3, -1], [-5, -5, -3], [-5, -5, -2, -2, -1, -1], [-5, -5, -2, -2, -1], [-5, -5, -2, -2], [-5, -5, -2, -1, -1], [-5, -5, -2, -1], [-5, -5, -2], [-5, -5, -1, -1], [-5, -5, -1], [-5, -5], [-5, -4, -4, -3, -3, -2, -2, -1, -1], [-5, -4, -4, -3, -3, -2, -2, -1], [-5, -4, -4, -3, -3, -2, -2], [-5, -4, -4, -3, -3, -2, -1, -1], [-5, -4, -4, -3, -3, -2, -1], [-5, -4, -4, -3, -3, -2], [-5, -4, -4, -3, -3, -1, -1], [-5, -4, -4, -3, -3, -1], [-5, -4, -4, -3, -3], [-5, -4, -4, -3, -2, -2, -1, -1], [-5, -4, -4, -3, -2, -2, -1], [-5, -4, -4, -3, -2, -2], [-5, -4, -4, -3, -2, -1, -1], [-5, -4, -4, -3, -2, -1], [-5, -4, -4, -3, -2], [-5, -4, -4, -3, -1, -1], [-5, -4, -4, -3, -1], [-5, -4, -4, -3], [-5, -4, -4, -2, -2, -1, -1], [-5, -4, -4, -2, -2, -1], [-5, -4, -4, -2, -2], [-5, -4, -4, -2, -1, -1], [-5, -4, -4, -2, -1], [-5, -4, -4, -2], [-5, -4, -4, -1, -1], [-5, -4, -4, -1], [-5, -4, -4], [-5, -4, -3, -3, -2, -2, -1, -1], [-5, -4, -3, -3, -2, -2, -1], [-5, -4, -3, -3, -2, -2], [-5, -4, -3, -3, -2, -1, -1], [-5, -4, -3, -3, -2, -1], [-5, -4, -3, -3, -2], [-5, -4, -3, -3, -1, -1], [-5, -4, -3, -3, -1], [-5, -4, -3, -3], [-5, -4, -3, -2, -2, -1, -1], [-5, -4, -3, -2, -2, -1], [-5, -4, -3, -2, -2], [-5, -4, -3, -2, -1, -1], [-5, -4, -3, -2, -1], [-5, -4, -3, -2], [-5, -4, -3, -1, -1], [-5, -4, -3, -1], [-5, -4, -3], [-5, -4, -2, -2, -1, -1], [-5, -4, -2, -2, -1], [-5, -4, -2, -2], [-5, -4, -2, -1, -1], [-5, -4, -2, -1], [-5, -4, -2], [-5, -4, -1, -1], [-5, -4, -1], [-5, -4], [-5, -3, -3, -2, -2, -1, -1], [-5, -3, -3, -2, -2, -1], [-5, -3, -3, -2, -2], [-5, -3, -3, -2, -1, -1], [-5, -3, -3, -2, -1], [-5, -3, -3, -2], [-5, -3, -3, -1, -1], [-5, -3, -3, -1], [-5, -3, -3], [-5, -3, -2, -2, -1, -1], [-5, -3, -2, -2, -1], [-5, -3, -2, -2], [-5, -3, -2, -1, -1], [-5, -3, -2, -1], [-5, -3, -2], [-5, -3, -1, -1], [-5, -3, -1], [-5, -3], [-5, -2, -2, -1, -1], [-5, -2, -2, -1], [-5, -2, -2], [-5, -2, -1, -1], [-5, -2, -1], [-5, -2], [-5, -1, -1], [-5, -1], [-5], [-4, -4, -3, -3, -2, -2, -1, -1], [-4, -4, -3, -3, -2, -2, -1], [-4, -4, -3, -3, -2, -2], [-4, -4, -3, -3, -2, -1, -1], [-4, -4, -3, -3, -2, -1], [-4, -4, -3, -3, -2], [-4, -4, -3, -3, -1, -1], [-4, -4, -3, -3, -1], [-4, -4, -3, -3], [-4, -4, -3, -2, -2, -1, -1], [-4, -4, -3, -2, -2, -1], [-4, -4, -3, -2, -2], [-4, -4, -3, -2, -1, -1], [-4, -4, -3, -2, -1], [-4, -4, -3, -2], [-4, -4, -3, -1, -1], [-4, -4, -3, -1], [-4, -4, -3], [-4, -4, -2, -2, -1, -1], [-4, -4, -2, -2, -1], [-4, -4, -2, -2], [-4, -4, -2, -1, -1], [-4, -4, -2, -1], [-4, -4, -2], [-4, -4, -1, -1], [-4, -4, -1], [-4, -4], [-4, -3, -3, -2, -2, -1, -1], [-4, -3, -3, -2, -2, -1], [-4, -3, -3, -2, -2], [-4, -3, -3, -2, -1, -1], [-4, -3, -3, -2, -1], [-4, -3, -3, -2], [-4, -3, -3, -1, -1], [-4, -3, -3, -1], [-4, -3, -3], [-4, -3, -2, -2, -1, -1], [-4, -3, -2, -2, -1], [-4, -3, -2, -2], [-4, -3, -2, -1, -1], [-4, -3, -2, -1], [-4, -3, -2], [-4, -3, -1, -1], [-4, -3, -1], [-4, -3], [-4, -2, -2, -1, -1], [-4, -2, -2, -1], [-4, -2, -2], [-4, -2, -1, -1], [-4, -2, -1], [-4, -2], [-4, -1, -1], [-4, -1], [-4], [-3, -3, -2, -2, -1, -1], [-3, -3, -2, -2, -1], [-3, -3, -2, -2], [-3, -3, -2, -1, -1], [-3, -3, -2, -1], [-3, -3, -2], [-3, -3, -1, -1], [-3, -3, -1], [-3, -3], [-3, -2, -2, -1, -1], [-3, -2, -2, -1], [-3, -2, -2], [-3, -2, -1, -1], [-3, -2, -1], [-3, -2], [-3, -1, -1], [-3, -1], [-3], [-2, -2, -1, -1], [-2, -2, -1], [-2, -2], [-2, -1, -1], [-2, -1], [-2], [-1, -1], [-1], []])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]), [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 9], [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 8, 9], [0, 1, 2, 3, 4, 5, 6, 8], [0, 1, 2, 3, 4, 5, 6, 9], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 7, 8, 9], [0, 1, 2, 3, 4, 5, 7, 8], [0, 1, 2, 3, 4, 5, 7, 9], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 8, 9], [0, 1, 2, 3, 4, 5, 8], [0, 1, 2, 3, 4, 5, 9], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 6, 7, 8, 9], [0, 1, 2, 3, 4, 6, 7, 8], [0, 1, 2, 3, 4, 6, 7, 9], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6, 8, 9], [0, 1, 2, 3, 4, 6, 8], [0, 1, 2, 3, 4, 6, 9], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 7, 8, 9], [0, 1, 2, 3, 4, 7, 8], [0, 1, 2, 3, 4, 7, 9], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4, 8, 9], [0, 1, 2, 3, 4, 8], [0, 1, 2, 3, 4, 9], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5, 6, 7, 8, 9], [0, 1, 2, 3, 5, 6, 7, 8], [0, 1, 2, 3, 5, 6, 7, 9], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6, 8, 9], [0, 1, 2, 3, 5, 6, 8], [0, 1, 2, 3, 5, 6, 9], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 7, 8, 9], [0, 1, 2, 3, 5, 7, 8], [0, 1, 2, 3, 5, 7, 9], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5, 8, 9], [0, 1, 2, 3, 5, 8], [0, 1, 2, 3, 5, 9], [0, 1, 2, 3, 5], [0, 1, 2, 3, 6, 7, 8, 9], [0, 1, 2, 3, 6, 7, 8], [0, 1, 2, 3, 6, 7, 9], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6, 8, 9], [0, 1, 2, 3, 6, 8], [0, 1, 2, 3, 6, 9], [0, 1, 2, 3, 6], [0, 1, 2, 3, 7, 8, 9], [0, 1, 2, 3, 7, 8], [0, 1, 2, 3, 7, 9], [0, 1, 2, 3, 7], [0, 1, 2, 3, 8, 9], [0, 1, 2, 3, 8], [0, 1, 2, 3, 9], [0, 1, 2, 3], [0, 1, 2, 4, 5, 6, 7, 8, 9], [0, 1, 2, 4, 5, 6, 7, 8], [0, 1, 2, 4, 5, 6, 7, 9], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6, 8, 9], [0, 1, 2, 4, 5, 6, 8], [0, 1, 2, 4, 5, 6, 9], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5, 7, 8, 9], [0, 1, 2, 4, 5, 7, 8], [0, 1, 2, 4, 5, 7, 9], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5, 8, 9], [0, 1, 2, 4, 5, 8], [0, 1, 2, 4, 5, 9], [0, 1, 2, 4, 5], [0, 1, 2, 4, 6, 7, 8, 9], [0, 1, 2, 4, 6, 7, 8], [0, 1, 2, 4, 6, 7, 9], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6, 8, 9], [0, 1, 2, 4, 6, 8], [0, 1, 2, 4, 6, 9], [0, 1, 2, 4, 6], [0, 1, 2, 4, 7, 8, 9], [0, 1, 2, 4, 7, 8], [0, 1, 2, 4, 7, 9], [0, 1, 2, 4, 7], [0, 1, 2, 4, 8, 9], [0, 1, 2, 4, 8], [0, 1, 2, 4, 9], [0, 1, 2, 4], [0, 1, 2, 5, 6, 7, 8, 9], [0, 1, 2, 5, 6, 7, 8], [0, 1, 2, 5, 6, 7, 9], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6, 8, 9], [0, 1, 2, 5, 6, 8], [0, 1, 2, 5, 6, 9], [0, 1, 2, 5, 6], [0, 1, 2, 5, 7, 8, 9], [0, 1, 2, 5, 7, 8], [0, 1, 2, 5, 7, 9], [0, 1, 2, 5, 7], [0, 1, 2, 5, 8, 9], [0, 1, 2, 5, 8], [0, 1, 2, 5, 9], [0, 1, 2, 5], [0, 1, 2, 6, 7, 8, 9], [0, 1, 2, 6, 7, 8], [0, 1, 2, 6, 7, 9], [0, 1, 2, 6, 7], [0, 1, 2, 6, 8, 9], [0, 1, 2, 6, 8], [0, 1, 2, 6, 9], [0, 1, 2, 6], [0, 1, 2, 7, 8, 9], [0, 1, 2, 7, 8], [0, 1, 2, 7, 9], [0, 1, 2, 7], [0, 1, 2, 8, 9], [0, 1, 2, 8], [0, 1, 2, 9], [0, 1, 2], [0, 1, 3, 4, 5, 6, 7, 8, 9], [0, 1, 3, 4, 5, 6, 7, 8], [0, 1, 3, 4, 5, 6, 7, 9], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6, 8, 9], [0, 1, 3, 4, 5, 6, 8], [0, 1, 3, 4, 5, 6, 9], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5, 7, 8, 9], [0, 1, 3, 4, 5, 7, 8], [0, 1, 3, 4, 5, 7, 9], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5, 8, 9], [0, 1, 3, 4, 5, 8], [0, 1, 3, 4, 5, 9], [0, 1, 3, 4, 5], [0, 1, 3, 4, 6, 7, 8, 9], [0, 1, 3, 4, 6, 7, 8], [0, 1, 3, 4, 6, 7, 9], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6, 8, 9], [0, 1, 3, 4, 6, 8], [0, 1, 3, 4, 6, 9], [0, 1, 3, 4, 6], [0, 1, 3, 4, 7, 8, 9], [0, 1, 3, 4, 7, 8], [0, 1, 3, 4, 7, 9], [0, 1, 3, 4, 7], [0, 1, 3, 4, 8, 9], [0, 1, 3, 4, 8], [0, 1, 3, 4, 9], [0, 1, 3, 4], [0, 1, 3, 5, 6, 7, 8, 9], [0, 1, 3, 5, 6, 7, 8], [0, 1, 3, 5, 6, 7, 9], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6, 8, 9], [0, 1, 3, 5, 6, 8], [0, 1, 3, 5, 6, 9], [0, 1, 3, 5, 6], [0, 1, 3, 5, 7, 8, 9], [0, 1, 3, 5, 7, 8], [0, 1, 3, 5, 7, 9], [0, 1, 3, 5, 7], [0, 1, 3, 5, 8, 9], [0, 1, 3, 5, 8], [0, 1, 3, 5, 9], [0, 1, 3, 5], [0, 1, 3, 6, 7, 8, 9], [0, 1, 3, 6, 7, 8], [0, 1, 3, 6, 7, 9], [0, 1, 3, 6, 7], [0, 1, 3, 6, 8, 9], [0, 1, 3, 6, 8], [0, 1, 3, 6, 9], [0, 1, 3, 6], [0, 1, 3, 7, 8, 9], [0, 1, 3, 7, 8], [0, 1, 3, 7, 9], [0, 1, 3, 7], [0, 1, 3, 8, 9], [0, 1, 3, 8], [0, 1, 3, 9], [0, 1, 3], [0, 1, 4, 5, 6, 7, 8, 9], [0, 1, 4, 5, 6, 7, 8], [0, 1, 4, 5, 6, 7, 9], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6, 8, 9], [0, 1, 4, 5, 6, 8], [0, 1, 4, 5, 6, 9], [0, 1, 4, 5, 6], [0, 1, 4, 5, 7, 8, 9], [0, 1, 4, 5, 7, 8], [0, 1, 4, 5, 7, 9], [0, 1, 4, 5, 7], [0, 1, 4, 5, 8, 9], [0, 1, 4, 5, 8], [0, 1, 4, 5, 9], [0, 1, 4, 5], [0, 1, 4, 6, 7, 8, 9], [0, 1, 4, 6, 7, 8], [0, 1, 4, 6, 7, 9], [0, 1, 4, 6, 7], [0, 1, 4, 6, 8, 9], [0, 1, 4, 6, 8], [0, 1, 4, 6, 9], [0, 1, 4, 6], [0, 1, 4, 7, 8, 9], [0, 1, 4, 7, 8], [0, 1, 4, 7, 9], [0, 1, 4, 7], [0, 1, 4, 8, 9], [0, 1, 4, 8], [0, 1, 4, 9], [0, 1, 4], [0, 1, 5, 6, 7, 8, 9], [0, 1, 5, 6, 7, 8], [0, 1, 5, 6, 7, 9], [0, 1, 5, 6, 7], [0, 1, 5, 6, 8, 9], [0, 1, 5, 6, 8], [0, 1, 5, 6, 9], [0, 1, 5, 6], [0, 1, 5, 7, 8, 9], [0, 1, 5, 7, 8], [0, 1, 5, 7, 9], [0, 1, 5, 7], [0, 1, 5, 8, 9], [0, 1, 5, 8], [0, 1, 5, 9], [0, 1, 5], [0, 1, 6, 7, 8, 9], [0, 1, 6, 7, 8], [0, 1, 6, 7, 9], [0, 1, 6, 7], [0, 1, 6, 8, 9], [0, 1, 6, 8], [0, 1, 6, 9], [0, 1, 6], [0, 1, 7, 8, 9], [0, 1, 7, 8], [0, 1, 7, 9], [0, 1, 7], [0, 1, 8, 9], [0, 1, 8], [0, 1, 9], [0, 1], [0, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 3, 4, 5, 6, 7, 8], [0, 2, 3, 4, 5, 6, 7, 9], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6, 8, 9], [0, 2, 3, 4, 5, 6, 8], [0, 2, 3, 4, 5, 6, 9], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 7, 8, 9], [0, 2, 3, 4, 5, 7, 8], [0, 2, 3, 4, 5, 7, 9], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5, 8, 9], [0, 2, 3, 4, 5, 8], [0, 2, 3, 4, 5, 9], [0, 2, 3, 4, 5], [0, 2, 3, 4, 6, 7, 8, 9], [0, 2, 3, 4, 6, 7, 8], [0, 2, 3, 4, 6, 7, 9], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6, 8, 9], [0, 2, 3, 4, 6, 8], [0, 2, 3, 4, 6, 9], [0, 2, 3, 4, 6], [0, 2, 3, 4, 7, 8, 9], [0, 2, 3, 4, 7, 8], [0, 2, 3, 4, 7, 9], [0, 2, 3, 4, 7], [0, 2, 3, 4, 8, 9], [0, 2, 3, 4, 8], [0, 2, 3, 4, 9], [0, 2, 3, 4], [0, 2, 3, 5, 6, 7, 8, 9], [0, 2, 3, 5, 6, 7, 8], [0, 2, 3, 5, 6, 7, 9], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6, 8, 9], [0, 2, 3, 5, 6, 8], [0, 2, 3, 5, 6, 9], [0, 2, 3, 5, 6], [0, 2, 3, 5, 7, 8, 9], [0, 2, 3, 5, 7, 8], [0, 2, 3, 5, 7, 9], [0, 2, 3, 5, 7], [0, 2, 3, 5, 8, 9], [0, 2, 3, 5, 8], [0, 2, 3, 5, 9], [0, 2, 3, 5], [0, 2, 3, 6, 7, 8, 9], [0, 2, 3, 6, 7, 8], [0, 2, 3, 6, 7, 9], [0, 2, 3, 6, 7], [0, 2, 3, 6, 8, 9], [0, 2, 3, 6, 8], [0, 2, 3, 6, 9], [0, 2, 3, 6], [0, 2, 3, 7, 8, 9], [0, 2, 3, 7, 8], [0, 2, 3, 7, 9], [0, 2, 3, 7], [0, 2, 3, 8, 9], [0, 2, 3, 8], [0, 2, 3, 9], [0, 2, 3], [0, 2, 4, 5, 6, 7, 8, 9], [0, 2, 4, 5, 6, 7, 8], [0, 2, 4, 5, 6, 7, 9], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6, 8, 9], [0, 2, 4, 5, 6, 8], [0, 2, 4, 5, 6, 9], [0, 2, 4, 5, 6], [0, 2, 4, 5, 7, 8, 9], [0, 2, 4, 5, 7, 8], [0, 2, 4, 5, 7, 9], [0, 2, 4, 5, 7], [0, 2, 4, 5, 8, 9], [0, 2, 4, 5, 8], [0, 2, 4, 5, 9], [0, 2, 4, 5], [0, 2, 4, 6, 7, 8, 9], [0, 2, 4, 6, 7, 8], [0, 2, 4, 6, 7, 9], [0, 2, 4, 6, 7], [0, 2, 4, 6, 8, 9], [0, 2, 4, 6, 8], [0, 2, 4, 6, 9], [0, 2, 4, 6], [0, 2, 4, 7, 8, 9], [0, 2, 4, 7, 8], [0, 2, 4, 7, 9], [0, 2, 4, 7], [0, 2, 4, 8, 9], [0, 2, 4, 8], [0, 2, 4, 9], [0, 2, 4], [0, 2, 5, 6, 7, 8, 9], [0, 2, 5, 6, 7, 8], [0, 2, 5, 6, 7, 9], [0, 2, 5, 6, 7], [0, 2, 5, 6, 8, 9], [0, 2, 5, 6, 8], [0, 2, 5, 6, 9], [0, 2, 5, 6], [0, 2, 5, 7, 8, 9], [0, 2, 5, 7, 8], [0, 2, 5, 7, 9], [0, 2, 5, 7], [0, 2, 5, 8, 9], [0, 2, 5, 8], [0, 2, 5, 9], [0, 2, 5], [0, 2, 6, 7, 8, 9], [0, 2, 6, 7, 8], [0, 2, 6, 7, 9], [0, 2, 6, 7], [0, 2, 6, 8, 9], [0, 2, 6, 8], [0, 2, 6, 9], [0, 2, 6], [0, 2, 7, 8, 9], [0, 2, 7, 8], [0, 2, 7, 9], [0, 2, 7], [0, 2, 8, 9], [0, 2, 8], [0, 2, 9], [0, 2], [0, 3, 4, 5, 6, 7, 8, 9], [0, 3, 4, 5, 6, 7, 8], [0, 3, 4, 5, 6, 7, 9], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6, 8, 9], [0, 3, 4, 5, 6, 8], [0, 3, 4, 5, 6, 9], [0, 3, 4, 5, 6], [0, 3, 4, 5, 7, 8, 9], [0, 3, 4, 5, 7, 8], [0, 3, 4, 5, 7, 9], [0, 3, 4, 5, 7], [0, 3, 4, 5, 8, 9], [0, 3, 4, 5, 8], [0, 3, 4, 5, 9], [0, 3, 4, 5], [0, 3, 4, 6, 7, 8, 9], [0, 3, 4, 6, 7, 8], [0, 3, 4, 6, 7, 9], [0, 3, 4, 6, 7], [0, 3, 4, 6, 8, 9], [0, 3, 4, 6, 8], [0, 3, 4, 6, 9], [0, 3, 4, 6], [0, 3, 4, 7, 8, 9], [0, 3, 4, 7, 8], [0, 3, 4, 7, 9], [0, 3, 4, 7], [0, 3, 4, 8, 9], [0, 3, 4, 8], [0, 3, 4, 9], [0, 3, 4], [0, 3, 5, 6, 7, 8, 9], [0, 3, 5, 6, 7, 8], [0, 3, 5, 6, 7, 9], [0, 3, 5, 6, 7], [0, 3, 5, 6, 8, 9], [0, 3, 5, 6, 8], [0, 3, 5, 6, 9], [0, 3, 5, 6], [0, 3, 5, 7, 8, 9], [0, 3, 5, 7, 8], [0, 3, 5, 7, 9], [0, 3, 5, 7], [0, 3, 5, 8, 9], [0, 3, 5, 8], [0, 3, 5, 9], [0, 3, 5], [0, 3, 6, 7, 8, 9], [0, 3, 6, 7, 8], [0, 3, 6, 7, 9], [0, 3, 6, 7], [0, 3, 6, 8, 9], [0, 3, 6, 8], [0, 3, 6, 9], [0, 3, 6], [0, 3, 7, 8, 9], [0, 3, 7, 8], [0, 3, 7, 9], [0, 3, 7], [0, 3, 8, 9], [0, 3, 8], [0, 3, 9], [0, 3], [0, 4, 5, 6, 7, 8, 9], [0, 4, 5, 6, 7, 8], [0, 4, 5, 6, 7, 9], [0, 4, 5, 6, 7], [0, 4, 5, 6, 8, 9], [0, 4, 5, 6, 8], [0, 4, 5, 6, 9], [0, 4, 5, 6], [0, 4, 5, 7, 8, 9], [0, 4, 5, 7, 8], [0, 4, 5, 7, 9], [0, 4, 5, 7], [0, 4, 5, 8, 9], [0, 4, 5, 8], [0, 4, 5, 9], [0, 4, 5], [0, 4, 6, 7, 8, 9], [0, 4, 6, 7, 8], [0, 4, 6, 7, 9], [0, 4, 6, 7], [0, 4, 6, 8, 9], [0, 4, 6, 8], [0, 4, 6, 9], [0, 4, 6], [0, 4, 7, 8, 9], [0, 4, 7, 8], [0, 4, 7, 9], [0, 4, 7], [0, 4, 8, 9], [0, 4, 8], [0, 4, 9], [0, 4], [0, 5, 6, 7, 8, 9], [0, 5, 6, 7, 8], [0, 5, 6, 7, 9], [0, 5, 6, 7], [0, 5, 6, 8, 9], [0, 5, 6, 8], [0, 5, 6, 9], [0, 5, 6], [0, 5, 7, 8, 9], [0, 5, 7, 8], [0, 5, 7, 9], [0, 5, 7], [0, 5, 8, 9], [0, 5, 8], [0, 5, 9], [0, 5], [0, 6, 7, 8, 9], [0, 6, 7, 8], [0, 6, 7, 9], [0, 6, 7], [0, 6, 8, 9], [0, 6, 8], [0, 6, 9], [0, 6], [0, 7, 8, 9], [0, 7, 8], [0, 7, 9], [0, 7], [0, 8, 9], [0, 8], [0, 9], [0], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9], [1, 2, 3, 7], [1, 2, 3, 8, 9], [1, 2, 3, 8], [1, 2, 3, 9], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9], [1, 2, 4, 7], [1, 2, 4, 8, 9], [1, 2, 4, 8], [1, 2, 4, 9], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9], [1, 2, 5, 7], [1, 2, 5, 8, 9], [1, 2, 5, 8], [1, 2, 5, 9], [1, 2, 5], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9], [1, 2, 6, 7], [1, 2, 6, 8, 9], [1, 2, 6, 8], [1, 2, 6, 9], [1, 2, 6], [1, 2, 7, 8, 9], [1, 2, 7, 8], [1, 2, 7, 9], [1, 2, 7], [1, 2, 8, 9], [1, 2, 8], [1, 2, 9], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9], [1, 3, 4, 7], [1, 3, 4, 8, 9], [1, 3, 4, 8], [1, 3, 4, 9], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9], [1, 3, 5, 7], [1, 3, 5, 8, 9], [1, 3, 5, 8], [1, 3, 5, 9], [1, 3, 5], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9], [1, 3, 6, 7], [1, 3, 6, 8, 9], [1, 3, 6, 8], [1, 3, 6, 9], [1, 3, 6], [1, 3, 7, 8, 9], [1, 3, 7, 8], [1, 3, 7, 9], [1, 3, 7], [1, 3, 8, 9], [1, 3, 8], [1, 3, 9], [1, 3], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9], [1, 4, 5, 7], [1, 4, 5, 8, 9], [1, 4, 5, 8], [1, 4, 5, 9], [1, 4, 5], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9], [1, 4, 6, 7], [1, 4, 6, 8, 9], [1, 4, 6, 8], [1, 4, 6, 9], [1, 4, 6], [1, 4, 7, 8, 9], [1, 4, 7, 8], [1, 4, 7, 9], [1, 4, 7], [1, 4, 8, 9], [1, 4, 8], [1, 4, 9], [1, 4], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9], [1, 5, 6, 7], [1, 5, 6, 8, 9], [1, 5, 6, 8], [1, 5, 6, 9], [1, 5, 6], [1, 5, 7, 8, 9], [1, 5, 7, 8], [1, 5, 7, 9], [1, 5, 7], [1, 5, 8, 9], [1, 5, 8], [1, 5, 9], [1, 5], [1, 6, 7, 8, 9], [1, 6, 7, 8], [1, 6, 7, 9], [1, 6, 7], [1, 6, 8, 9], [1, 6, 8], [1, 6, 9], [1, 6], [1, 7, 8, 9], [1, 7, 8], [1, 7, 9], [1, 7], [1, 8, 9], [1, 8], [1, 9], [1], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9], [2, 3, 4, 7], [2, 3, 4, 8, 9], [2, 3, 4, 8], [2, 3, 4, 9], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9], [2, 3, 5, 7], [2, 3, 5, 8, 9], [2, 3, 5, 8], [2, 3, 5, 9], [2, 3, 5], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9], [2, 3, 6, 7], [2, 3, 6, 8, 9], [2, 3, 6, 8], [2, 3, 6, 9], [2, 3, 6], [2, 3, 7, 8, 9], [2, 3, 7, 8], [2, 3, 7, 9], [2, 3, 7], [2, 3, 8, 9], [2, 3, 8], [2, 3, 9], [2, 3], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9], [2, 4, 5, 7], [2, 4, 5, 8, 9], [2, 4, 5, 8], [2, 4, 5, 9], [2, 4, 5], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9], [2, 4, 6, 7], [2, 4, 6, 8, 9], [2, 4, 6, 8], [2, 4, 6, 9], [2, 4, 6], [2, 4, 7, 8, 9], [2, 4, 7, 8], [2, 4, 7, 9], [2, 4, 7], [2, 4, 8, 9], [2, 4, 8], [2, 4, 9], [2, 4], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9], [2, 5, 6, 7], [2, 5, 6, 8, 9], [2, 5, 6, 8], [2, 5, 6, 9], [2, 5, 6], [2, 5, 7, 8, 9], [2, 5, 7, 8], [2, 5, 7, 9], [2, 5, 7], [2, 5, 8, 9], [2, 5, 8], [2, 5, 9], [2, 5], [2, 6, 7, 8, 9], [2, 6, 7, 8], [2, 6, 7, 9], [2, 6, 7], [2, 6, 8, 9], [2, 6, 8], [2, 6, 9], [2, 6], [2, 7, 8, 9], [2, 7, 8], [2, 7, 9], [2, 7], [2, 8, 9], [2, 8], [2, 9], [2], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9], [3, 4, 5, 7], [3, 4, 5, 8, 9], [3, 4, 5, 8], [3, 4, 5, 9], [3, 4, 5], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9], [3, 4, 6, 7], [3, 4, 6, 8, 9], [3, 4, 6, 8], [3, 4, 6, 9], [3, 4, 6], [3, 4, 7, 8, 9], [3, 4, 7, 8], [3, 4, 7, 9], [3, 4, 7], [3, 4, 8, 9], [3, 4, 8], [3, 4, 9], [3, 4], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9], [3, 5, 6, 7], [3, 5, 6, 8, 9], [3, 5, 6, 8], [3, 5, 6, 9], [3, 5, 6], [3, 5, 7, 8, 9], [3, 5, 7, 8], [3, 5, 7, 9], [3, 5, 7], [3, 5, 8, 9], [3, 5, 8], [3, 5, 9], [3, 5], [3, 6, 7, 8, 9], [3, 6, 7, 8], [3, 6, 7, 9], [3, 6, 7], [3, 6, 8, 9], [3, 6, 8], [3, 6, 9], [3, 6], [3, 7, 8, 9], [3, 7, 8], [3, 7, 9], [3, 7], [3, 8, 9], [3, 8], [3, 9], [3], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9], [4, 5, 6, 7], [4, 5, 6, 8, 9], [4, 5, 6, 8], [4, 5, 6, 9], [4, 5, 6], [4, 5, 7, 8, 9], [4, 5, 7, 8], [4, 5, 7, 9], [4, 5, 7], [4, 5, 8, 9], [4, 5, 8], [4, 5, 9], [4, 5], [4, 6, 7, 8, 9], [4, 6, 7, 8], [4, 6, 7, 9], [4, 6, 7], [4, 6, 8, 9], [4, 6, 8], [4, 6, 9], [4, 6], [4, 7, 8, 9], [4, 7, 8], [4, 7, 9], [4, 7], [4, 8, 9], [4, 8], [4, 9], [4], [5, 6, 7, 8, 9], [5, 6, 7, 8], [5, 6, 7, 9], [5, 6, 7], [5, 6, 8, 9], [5, 6, 8], [5, 6, 9], [5, 6], [5, 7, 8, 9], [5, 7, 8], [5, 7, 9], [5, 7], [5, 8, 9], [5, 8], [5, 9], [5], [6, 7, 8, 9], [6, 7, 8], [6, 7, 9], [6, 7], [6, 8, 9], [6, 8], [6, 9], [6], [7, 8, 9], [7, 8], [7, 9], [7], [8, 9], [8], [9], []])\n assert answers_match(candidate(nums=[3, 3, 1, 1, 2, 2]), [[1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 5, 4, 3, 2, 1]), [[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5, 5], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5, 5], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5, 5], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5, 5], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5, 5], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5, 5], [1, 1, 5], [1, 1], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5], [1, 5], [1], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5], [2, 5], [2], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5], [3, 5], [3], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5], [4, 5], [4], [5, 5], [5], []])\n assert answers_match(candidate(nums=[7, 7, 7, 7, 7, 7, 7, 7, 7, 7]), [[7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7], [7, 7, 7, 7], [7, 7, 7], [7, 7], [7], []])\n assert answers_match(candidate(nums=[3, 3, 3, 2, 2, 1, 1, 1]), [[1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2], [1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 3], [1, 1, 1, 2], [1, 1, 1, 3, 3, 3], [1, 1, 1, 3, 3], [1, 1, 1, 3], [1, 1, 1], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3, 3], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3, 3], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3, 3], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3, 3], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3, 3], [2, 3, 3], [2, 3], [2], [3, 3, 3], [3, 3], [3], []])\n assert answers_match(candidate(nums=[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]), [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [-10, -9, -8, -7, -6, -5, -4, -3, -2], [-10, -9, -8, -7, -6, -5, -4, -3, -1], [-10, -9, -8, -7, -6, -5, -4, -3], [-10, -9, -8, -7, -6, -5, -4, -2, -1], [-10, -9, -8, -7, -6, -5, -4, -2], [-10, -9, -8, -7, -6, -5, -4, -1], [-10, -9, -8, -7, -6, -5, -4], [-10, -9, -8, -7, -6, -5, -3, -2, -1], [-10, -9, -8, -7, -6, -5, -3, -2], [-10, -9, -8, -7, -6, -5, -3, -1], [-10, -9, -8, -7, -6, -5, -3], [-10, -9, -8, -7, -6, -5, -2, -1], [-10, -9, -8, -7, -6, -5, -2], [-10, -9, -8, -7, -6, -5, -1], [-10, -9, -8, -7, -6, -5], [-10, -9, -8, -7, -6, -4, -3, -2, -1], [-10, -9, -8, -7, -6, -4, -3, -2], [-10, -9, -8, -7, -6, -4, -3, -1], [-10, -9, -8, -7, -6, -4, -3], [-10, -9, -8, -7, -6, -4, -2, -1], [-10, -9, -8, -7, -6, -4, -2], [-10, -9, -8, -7, -6, -4, -1], [-10, -9, -8, -7, -6, -4], [-10, -9, -8, -7, -6, -3, -2, -1], [-10, -9, -8, -7, -6, -3, -2], [-10, -9, -8, -7, -6, -3, -1], [-10, -9, -8, -7, -6, -3], [-10, -9, -8, -7, -6, -2, -1], [-10, -9, -8, -7, -6, -2], [-10, -9, -8, -7, -6, -1], [-10, -9, -8, -7, -6], [-10, -9, -8, -7, -5, -4, -3, -2, -1], [-10, -9, -8, -7, -5, -4, -3, -2], [-10, -9, -8, -7, -5, -4, -3, -1], [-10, -9, -8, -7, -5, -4, -3], [-10, -9, -8, -7, -5, -4, -2, -1], [-10, -9, -8, -7, -5, -4, -2], [-10, -9, -8, -7, -5, -4, -1], [-10, -9, -8, -7, -5, -4], [-10, -9, -8, -7, -5, -3, -2, -1], [-10, -9, -8, -7, -5, -3, -2], [-10, -9, -8, -7, -5, -3, -1], [-10, -9, -8, -7, -5, -3], [-10, -9, -8, -7, -5, -2, -1], [-10, -9, -8, -7, -5, -2], [-10, -9, -8, -7, -5, -1], [-10, -9, -8, -7, -5], [-10, -9, -8, -7, -4, -3, -2, -1], [-10, -9, -8, -7, -4, -3, -2], [-10, -9, -8, -7, -4, -3, -1], [-10, -9, -8, -7, -4, -3], [-10, -9, -8, -7, -4, -2, -1], [-10, -9, -8, -7, -4, -2], [-10, -9, -8, -7, -4, -1], [-10, -9, -8, -7, -4], [-10, -9, -8, -7, -3, -2, -1], [-10, -9, -8, -7, -3, -2], [-10, -9, -8, -7, -3, -1], [-10, -9, -8, -7, -3], [-10, -9, -8, -7, -2, -1], [-10, -9, -8, -7, -2], [-10, -9, -8, -7, -1], [-10, -9, -8, -7], [-10, -9, -8, -6, -5, -4, -3, -2, -1], [-10, -9, -8, -6, -5, -4, -3, -2], [-10, -9, -8, -6, -5, -4, -3, -1], [-10, -9, -8, -6, -5, -4, -3], [-10, -9, -8, -6, -5, -4, -2, -1], [-10, -9, -8, -6, -5, -4, -2], [-10, -9, -8, -6, -5, -4, -1], [-10, -9, -8, -6, -5, -4], [-10, -9, -8, -6, -5, -3, -2, -1], [-10, -9, -8, -6, -5, -3, -2], [-10, -9, -8, -6, -5, -3, -1], [-10, -9, -8, -6, -5, -3], [-10, -9, -8, -6, -5, -2, -1], [-10, -9, -8, -6, -5, -2], [-10, -9, -8, -6, -5, -1], [-10, -9, -8, -6, -5], [-10, -9, -8, -6, -4, -3, -2, -1], [-10, -9, -8, -6, -4, -3, -2], [-10, -9, -8, -6, -4, -3, -1], [-10, -9, -8, -6, -4, -3], [-10, -9, -8, -6, -4, -2, -1], [-10, -9, -8, -6, -4, -2], [-10, -9, -8, -6, -4, -1], [-10, -9, -8, -6, -4], [-10, -9, -8, -6, -3, -2, -1], [-10, -9, -8, -6, -3, -2], [-10, -9, -8, -6, -3, -1], [-10, -9, -8, -6, -3], [-10, -9, -8, -6, -2, -1], [-10, -9, -8, -6, -2], [-10, -9, -8, -6, -1], [-10, -9, -8, -6], [-10, -9, -8, -5, -4, -3, -2, -1], [-10, -9, -8, -5, -4, -3, -2], [-10, -9, -8, -5, -4, -3, -1], [-10, -9, -8, -5, -4, -3], [-10, -9, -8, -5, -4, -2, -1], [-10, -9, -8, -5, -4, -2], [-10, -9, -8, -5, -4, -1], [-10, -9, -8, -5, -4], [-10, -9, -8, -5, -3, -2, -1], [-10, -9, -8, -5, -3, -2], [-10, -9, -8, -5, -3, -1], [-10, -9, -8, -5, -3], [-10, -9, -8, -5, -2, -1], [-10, -9, -8, -5, -2], [-10, -9, -8, -5, -1], [-10, -9, -8, -5], [-10, -9, -8, -4, -3, -2, -1], [-10, -9, -8, -4, -3, -2], [-10, -9, -8, -4, -3, -1], [-10, -9, -8, -4, -3], [-10, -9, -8, -4, -2, -1], [-10, -9, -8, -4, -2], [-10, -9, -8, -4, -1], [-10, -9, -8, -4], [-10, -9, -8, -3, -2, -1], [-10, -9, -8, -3, -2], [-10, -9, -8, -3, -1], [-10, -9, -8, -3], [-10, -9, -8, -2, -1], [-10, -9, -8, -2], [-10, -9, -8, -1], [-10, -9, -8], [-10, -9, -7, -6, -5, -4, -3, -2, -1], [-10, -9, -7, -6, -5, -4, -3, -2], [-10, -9, -7, -6, -5, -4, -3, -1], [-10, -9, -7, -6, -5, -4, -3], [-10, -9, -7, -6, -5, -4, -2, -1], [-10, -9, -7, -6, -5, -4, -2], [-10, -9, -7, -6, -5, -4, -1], [-10, -9, -7, -6, -5, -4], [-10, -9, -7, -6, -5, -3, -2, -1], [-10, -9, -7, -6, -5, -3, -2], [-10, -9, -7, -6, -5, -3, -1], [-10, -9, -7, -6, -5, -3], [-10, -9, -7, -6, -5, -2, -1], [-10, -9, -7, -6, -5, -2], [-10, -9, -7, -6, -5, -1], [-10, -9, -7, -6, -5], [-10, -9, -7, -6, -4, -3, -2, -1], [-10, -9, -7, -6, -4, -3, -2], [-10, -9, -7, -6, -4, -3, -1], [-10, -9, -7, -6, -4, -3], [-10, -9, -7, -6, -4, -2, -1], [-10, -9, -7, -6, -4, -2], [-10, -9, -7, -6, -4, -1], [-10, -9, -7, -6, -4], [-10, -9, -7, -6, -3, -2, -1], [-10, -9, -7, -6, -3, -2], [-10, -9, -7, -6, -3, -1], [-10, -9, -7, -6, -3], [-10, -9, -7, -6, -2, -1], [-10, -9, -7, -6, -2], [-10, -9, -7, -6, -1], [-10, -9, -7, -6], [-10, -9, -7, -5, -4, -3, -2, -1], [-10, -9, -7, -5, -4, -3, -2], [-10, -9, -7, -5, -4, -3, -1], [-10, -9, -7, -5, -4, -3], [-10, -9, -7, -5, -4, -2, -1], [-10, -9, -7, -5, -4, -2], [-10, -9, -7, -5, -4, -1], [-10, -9, -7, -5, -4], [-10, -9, -7, -5, -3, -2, -1], [-10, -9, -7, -5, -3, -2], [-10, -9, -7, -5, -3, -1], [-10, -9, -7, -5, -3], [-10, -9, -7, -5, -2, -1], [-10, -9, -7, -5, -2], [-10, -9, -7, -5, -1], [-10, -9, -7, -5], [-10, -9, -7, -4, -3, -2, -1], [-10, -9, -7, -4, -3, -2], [-10, -9, -7, -4, -3, -1], [-10, -9, -7, -4, -3], [-10, -9, -7, -4, -2, -1], [-10, -9, -7, -4, -2], [-10, -9, -7, -4, -1], [-10, -9, -7, -4], [-10, -9, -7, -3, -2, -1], [-10, -9, -7, -3, -2], [-10, -9, -7, -3, -1], [-10, -9, -7, -3], [-10, -9, -7, -2, -1], [-10, -9, -7, -2], [-10, -9, -7, -1], [-10, -9, -7], [-10, -9, -6, -5, -4, -3, -2, -1], [-10, -9, -6, -5, -4, -3, -2], [-10, -9, -6, -5, -4, -3, -1], [-10, -9, -6, -5, -4, -3], [-10, -9, -6, -5, -4, -2, -1], [-10, -9, -6, -5, -4, -2], [-10, -9, -6, -5, -4, -1], [-10, -9, -6, -5, -4], [-10, -9, -6, -5, -3, -2, -1], [-10, -9, -6, -5, -3, -2], [-10, -9, -6, -5, -3, -1], [-10, -9, -6, -5, -3], [-10, -9, -6, -5, -2, -1], [-10, -9, -6, -5, -2], [-10, -9, -6, -5, -1], [-10, -9, -6, -5], [-10, -9, -6, -4, -3, -2, -1], [-10, -9, -6, -4, -3, -2], [-10, -9, -6, -4, -3, -1], [-10, -9, -6, -4, -3], [-10, -9, -6, -4, -2, -1], [-10, -9, -6, -4, -2], [-10, -9, -6, -4, -1], [-10, -9, -6, -4], [-10, -9, -6, -3, -2, -1], [-10, -9, -6, -3, -2], [-10, -9, -6, -3, -1], [-10, -9, -6, -3], [-10, -9, -6, -2, -1], [-10, -9, -6, -2], [-10, -9, -6, -1], [-10, -9, -6], [-10, -9, -5, -4, -3, -2, -1], [-10, -9, -5, -4, -3, -2], [-10, -9, -5, -4, -3, -1], [-10, -9, -5, -4, -3], [-10, -9, -5, -4, -2, -1], [-10, -9, -5, -4, -2], [-10, -9, -5, -4, -1], [-10, -9, -5, -4], [-10, -9, -5, -3, -2, -1], [-10, -9, -5, -3, -2], [-10, -9, -5, -3, -1], [-10, -9, -5, -3], [-10, -9, -5, -2, -1], [-10, -9, -5, -2], [-10, -9, -5, -1], [-10, -9, -5], [-10, -9, -4, -3, -2, -1], [-10, -9, -4, -3, -2], [-10, -9, -4, -3, -1], [-10, -9, -4, -3], [-10, -9, -4, -2, -1], [-10, -9, -4, -2], [-10, -9, -4, -1], [-10, -9, -4], [-10, -9, -3, -2, -1], [-10, -9, -3, -2], [-10, -9, -3, -1], [-10, -9, -3], [-10, -9, -2, -1], [-10, -9, -2], [-10, -9, -1], [-10, -9], [-10, -8, -7, -6, -5, -4, -3, -2, -1], [-10, -8, -7, -6, -5, -4, -3, -2], [-10, -8, -7, -6, -5, -4, -3, -1], [-10, -8, -7, -6, -5, -4, -3], [-10, -8, -7, -6, -5, -4, -2, -1], [-10, -8, -7, -6, -5, -4, -2], [-10, -8, -7, -6, -5, -4, -1], [-10, -8, -7, -6, -5, -4], [-10, -8, -7, -6, -5, -3, -2, -1], [-10, -8, -7, -6, -5, -3, -2], [-10, -8, -7, -6, -5, -3, -1], [-10, -8, -7, -6, -5, -3], [-10, -8, -7, -6, -5, -2, -1], [-10, -8, -7, -6, -5, -2], [-10, -8, -7, -6, -5, -1], [-10, -8, -7, -6, -5], [-10, -8, -7, -6, -4, -3, -2, -1], [-10, -8, -7, -6, -4, -3, -2], [-10, -8, -7, -6, -4, -3, -1], [-10, -8, -7, -6, -4, -3], [-10, -8, -7, -6, -4, -2, -1], [-10, -8, -7, -6, -4, -2], [-10, -8, -7, -6, -4, -1], [-10, -8, -7, -6, -4], [-10, -8, -7, -6, -3, -2, -1], [-10, -8, -7, -6, -3, -2], [-10, -8, -7, -6, -3, -1], [-10, -8, -7, -6, -3], [-10, -8, -7, -6, -2, -1], [-10, -8, -7, -6, -2], [-10, -8, -7, -6, -1], [-10, -8, -7, -6], [-10, -8, -7, -5, -4, -3, -2, -1], [-10, -8, -7, -5, -4, -3, -2], [-10, -8, -7, -5, -4, -3, -1], [-10, -8, -7, -5, -4, -3], [-10, -8, -7, -5, -4, -2, -1], [-10, -8, -7, -5, -4, -2], [-10, -8, -7, -5, -4, -1], [-10, -8, -7, -5, -4], [-10, -8, -7, -5, -3, -2, -1], [-10, -8, -7, -5, -3, -2], [-10, -8, -7, -5, -3, -1], [-10, -8, -7, -5, -3], [-10, -8, -7, -5, -2, -1], [-10, -8, -7, -5, -2], [-10, -8, -7, -5, -1], [-10, -8, -7, -5], [-10, -8, -7, -4, -3, -2, -1], [-10, -8, -7, -4, -3, -2], [-10, -8, -7, -4, -3, -1], [-10, -8, -7, -4, -3], [-10, -8, -7, -4, -2, -1], [-10, -8, -7, -4, -2], [-10, -8, -7, -4, -1], [-10, -8, -7, -4], [-10, -8, -7, -3, -2, -1], [-10, -8, -7, -3, -2], [-10, -8, -7, -3, -1], [-10, -8, -7, -3], [-10, -8, -7, -2, -1], [-10, -8, -7, -2], [-10, -8, -7, -1], [-10, -8, -7], [-10, -8, -6, -5, -4, -3, -2, -1], [-10, -8, -6, -5, -4, -3, -2], [-10, -8, -6, -5, -4, -3, -1], [-10, -8, -6, -5, -4, -3], [-10, -8, -6, -5, -4, -2, -1], [-10, -8, -6, -5, -4, -2], [-10, -8, -6, -5, -4, -1], [-10, -8, -6, -5, -4], [-10, -8, -6, -5, -3, -2, -1], [-10, -8, -6, -5, -3, -2], [-10, -8, -6, -5, -3, -1], [-10, -8, -6, -5, -3], [-10, -8, -6, -5, -2, -1], [-10, -8, -6, -5, -2], [-10, -8, -6, -5, -1], [-10, -8, -6, -5], [-10, -8, -6, -4, -3, -2, -1], [-10, -8, -6, -4, -3, -2], [-10, -8, -6, -4, -3, -1], [-10, -8, -6, -4, -3], [-10, -8, -6, -4, -2, -1], [-10, -8, -6, -4, -2], [-10, -8, -6, -4, -1], [-10, -8, -6, -4], [-10, -8, -6, -3, -2, -1], [-10, -8, -6, -3, -2], [-10, -8, -6, -3, -1], [-10, -8, -6, -3], [-10, -8, -6, -2, -1], [-10, -8, -6, -2], [-10, -8, -6, -1], [-10, -8, -6], [-10, -8, -5, -4, -3, -2, -1], [-10, -8, -5, -4, -3, -2], [-10, -8, -5, -4, -3, -1], [-10, -8, -5, -4, -3], [-10, -8, -5, -4, -2, -1], [-10, -8, -5, -4, -2], [-10, -8, -5, -4, -1], [-10, -8, -5, -4], [-10, -8, -5, -3, -2, -1], [-10, -8, -5, -3, -2], [-10, -8, -5, -3, -1], [-10, -8, -5, -3], [-10, -8, -5, -2, -1], [-10, -8, -5, -2], [-10, -8, -5, -1], [-10, -8, -5], [-10, -8, -4, -3, -2, -1], [-10, -8, -4, -3, -2], [-10, -8, -4, -3, -1], [-10, -8, -4, -3], [-10, -8, -4, -2, -1], [-10, -8, -4, -2], [-10, -8, -4, -1], [-10, -8, -4], [-10, -8, -3, -2, -1], [-10, -8, -3, -2], [-10, -8, -3, -1], [-10, -8, -3], [-10, -8, -2, -1], [-10, -8, -2], [-10, -8, -1], [-10, -8], [-10, -7, -6, -5, -4, -3, -2, -1], [-10, -7, -6, -5, -4, -3, -2], [-10, -7, -6, -5, -4, -3, -1], [-10, -7, -6, -5, -4, -3], [-10, -7, -6, -5, -4, -2, -1], [-10, -7, -6, -5, -4, -2], [-10, -7, -6, -5, -4, -1], [-10, -7, -6, -5, -4], [-10, -7, -6, -5, -3, -2, -1], [-10, -7, -6, -5, -3, -2], [-10, -7, -6, -5, -3, -1], [-10, -7, -6, -5, -3], [-10, -7, -6, -5, -2, -1], [-10, -7, -6, -5, -2], [-10, -7, -6, -5, -1], [-10, -7, -6, -5], [-10, -7, -6, -4, -3, -2, -1], [-10, -7, -6, -4, -3, -2], [-10, -7, -6, -4, -3, -1], [-10, -7, -6, -4, -3], [-10, -7, -6, -4, -2, -1], [-10, -7, -6, -4, -2], [-10, -7, -6, -4, -1], [-10, -7, -6, -4], [-10, -7, -6, -3, -2, -1], [-10, -7, -6, -3, -2], [-10, -7, -6, -3, -1], [-10, -7, -6, -3], [-10, -7, -6, -2, -1], [-10, -7, -6, -2], [-10, -7, -6, -1], [-10, -7, -6], [-10, -7, -5, -4, -3, -2, -1], [-10, -7, -5, -4, -3, -2], [-10, -7, -5, -4, -3, -1], [-10, -7, -5, -4, -3], [-10, -7, -5, -4, -2, -1], [-10, -7, -5, -4, -2], [-10, -7, -5, -4, -1], [-10, -7, -5, -4], [-10, -7, -5, -3, -2, -1], [-10, -7, -5, -3, -2], [-10, -7, -5, -3, -1], [-10, -7, -5, -3], [-10, -7, -5, -2, -1], [-10, -7, -5, -2], [-10, -7, -5, -1], [-10, -7, -5], [-10, -7, -4, -3, -2, -1], [-10, -7, -4, -3, -2], [-10, -7, -4, -3, -1], [-10, -7, -4, -3], [-10, -7, -4, -2, -1], [-10, -7, -4, -2], [-10, -7, -4, -1], [-10, -7, -4], [-10, -7, -3, -2, -1], [-10, -7, -3, -2], [-10, -7, -3, -1], [-10, -7, -3], [-10, -7, -2, -1], [-10, -7, -2], [-10, -7, -1], [-10, -7], [-10, -6, -5, -4, -3, -2, -1], [-10, -6, -5, -4, -3, -2], [-10, -6, -5, -4, -3, -1], [-10, -6, -5, -4, -3], [-10, -6, -5, -4, -2, -1], [-10, -6, -5, -4, -2], [-10, -6, -5, -4, -1], [-10, -6, -5, -4], [-10, -6, -5, -3, -2, -1], [-10, -6, -5, -3, -2], [-10, -6, -5, -3, -1], [-10, -6, -5, -3], [-10, -6, -5, -2, -1], [-10, -6, -5, -2], [-10, -6, -5, -1], [-10, -6, -5], [-10, -6, -4, -3, -2, -1], [-10, -6, -4, -3, -2], [-10, -6, -4, -3, -1], [-10, -6, -4, -3], [-10, -6, -4, -2, -1], [-10, -6, -4, -2], [-10, -6, -4, -1], [-10, -6, -4], [-10, -6, -3, -2, -1], [-10, -6, -3, -2], [-10, -6, -3, -1], [-10, -6, -3], [-10, -6, -2, -1], [-10, -6, -2], [-10, -6, -1], [-10, -6], [-10, -5, -4, -3, -2, -1], [-10, -5, -4, -3, -2], [-10, -5, -4, -3, -1], [-10, -5, -4, -3], [-10, -5, -4, -2, -1], [-10, -5, -4, -2], [-10, -5, -4, -1], [-10, -5, -4], [-10, -5, -3, -2, -1], [-10, -5, -3, -2], [-10, -5, -3, -1], [-10, -5, -3], [-10, -5, -2, -1], [-10, -5, -2], [-10, -5, -1], [-10, -5], [-10, -4, -3, -2, -1], [-10, -4, -3, -2], [-10, -4, -3, -1], [-10, -4, -3], [-10, -4, -2, -1], [-10, -4, -2], [-10, -4, -1], [-10, -4], [-10, -3, -2, -1], [-10, -3, -2], [-10, -3, -1], [-10, -3], [-10, -2, -1], [-10, -2], [-10, -1], [-10], [-9, -8, -7, -6, -5, -4, -3, -2, -1], [-9, -8, -7, -6, -5, -4, -3, -2], [-9, -8, -7, -6, -5, -4, -3, -1], [-9, -8, -7, -6, -5, -4, -3], [-9, -8, -7, -6, -5, -4, -2, -1], [-9, -8, -7, -6, -5, -4, -2], [-9, -8, -7, -6, -5, -4, -1], [-9, -8, -7, -6, -5, -4], [-9, -8, -7, -6, -5, -3, -2, -1], [-9, -8, -7, -6, -5, -3, -2], [-9, -8, -7, -6, -5, -3, -1], [-9, -8, -7, -6, -5, -3], [-9, -8, -7, -6, -5, -2, -1], [-9, -8, -7, -6, -5, -2], [-9, -8, -7, -6, -5, -1], [-9, -8, -7, -6, -5], [-9, -8, -7, -6, -4, -3, -2, -1], [-9, -8, -7, -6, -4, -3, -2], [-9, -8, -7, -6, -4, -3, -1], [-9, -8, -7, -6, -4, -3], [-9, -8, -7, -6, -4, -2, -1], [-9, -8, -7, -6, -4, -2], [-9, -8, -7, -6, -4, -1], [-9, -8, -7, -6, -4], [-9, -8, -7, -6, -3, -2, -1], [-9, -8, -7, -6, -3, -2], [-9, -8, -7, -6, -3, -1], [-9, -8, -7, -6, -3], [-9, -8, -7, -6, -2, -1], [-9, -8, -7, -6, -2], [-9, -8, -7, -6, -1], [-9, -8, -7, -6], [-9, -8, -7, -5, -4, -3, -2, -1], [-9, -8, -7, -5, -4, -3, -2], [-9, -8, -7, -5, -4, -3, -1], [-9, -8, -7, -5, -4, -3], [-9, -8, -7, -5, -4, -2, -1], [-9, -8, -7, -5, -4, -2], [-9, -8, -7, -5, -4, -1], [-9, -8, -7, -5, -4], [-9, -8, -7, -5, -3, -2, -1], [-9, -8, -7, -5, -3, -2], [-9, -8, -7, -5, -3, -1], [-9, -8, -7, -5, -3], [-9, -8, -7, -5, -2, -1], [-9, -8, -7, -5, -2], [-9, -8, -7, -5, -1], [-9, -8, -7, -5], [-9, -8, -7, -4, -3, -2, -1], [-9, -8, -7, -4, -3, -2], [-9, -8, -7, -4, -3, -1], [-9, -8, -7, -4, -3], [-9, -8, -7, -4, -2, -1], [-9, -8, -7, -4, -2], [-9, -8, -7, -4, -1], [-9, -8, -7, -4], [-9, -8, -7, -3, -2, -1], [-9, -8, -7, -3, -2], [-9, -8, -7, -3, -1], [-9, -8, -7, -3], [-9, -8, -7, -2, -1], [-9, -8, -7, -2], [-9, -8, -7, -1], [-9, -8, -7], [-9, -8, -6, -5, -4, -3, -2, -1], [-9, -8, -6, -5, -4, -3, -2], [-9, -8, -6, -5, -4, -3, -1], [-9, -8, -6, -5, -4, -3], [-9, -8, -6, -5, -4, -2, -1], [-9, -8, -6, -5, -4, -2], [-9, -8, -6, -5, -4, -1], [-9, -8, -6, -5, -4], [-9, -8, -6, -5, -3, -2, -1], [-9, -8, -6, -5, -3, -2], [-9, -8, -6, -5, -3, -1], [-9, -8, -6, -5, -3], [-9, -8, -6, -5, -2, -1], [-9, -8, -6, -5, -2], [-9, -8, -6, -5, -1], [-9, -8, -6, -5], [-9, -8, -6, -4, -3, -2, -1], [-9, -8, -6, -4, -3, -2], [-9, -8, -6, -4, -3, -1], [-9, -8, -6, -4, -3], [-9, -8, -6, -4, -2, -1], [-9, -8, -6, -4, -2], [-9, -8, -6, -4, -1], [-9, -8, -6, -4], [-9, -8, -6, -3, -2, -1], [-9, -8, -6, -3, -2], [-9, -8, -6, -3, -1], [-9, -8, -6, -3], [-9, -8, -6, -2, -1], [-9, -8, -6, -2], [-9, -8, -6, -1], [-9, -8, -6], [-9, -8, -5, -4, -3, -2, -1], [-9, -8, -5, -4, -3, -2], [-9, -8, -5, -4, -3, -1], [-9, -8, -5, -4, -3], [-9, -8, -5, -4, -2, -1], [-9, -8, -5, -4, -2], [-9, -8, -5, -4, -1], [-9, -8, -5, -4], [-9, -8, -5, -3, -2, -1], [-9, -8, -5, -3, -2], [-9, -8, -5, -3, -1], [-9, -8, -5, -3], [-9, -8, -5, -2, -1], [-9, -8, -5, -2], [-9, -8, -5, -1], [-9, -8, -5], [-9, -8, -4, -3, -2, -1], [-9, -8, -4, -3, -2], [-9, -8, -4, -3, -1], [-9, -8, -4, -3], [-9, -8, -4, -2, -1], [-9, -8, -4, -2], [-9, -8, -4, -1], [-9, -8, -4], [-9, -8, -3, -2, -1], [-9, -8, -3, -2], [-9, -8, -3, -1], [-9, -8, -3], [-9, -8, -2, -1], [-9, -8, -2], [-9, -8, -1], [-9, -8], [-9, -7, -6, -5, -4, -3, -2, -1], [-9, -7, -6, -5, -4, -3, -2], [-9, -7, -6, -5, -4, -3, -1], [-9, -7, -6, -5, -4, -3], [-9, -7, -6, -5, -4, -2, -1], [-9, -7, -6, -5, -4, -2], [-9, -7, -6, -5, -4, -1], [-9, -7, -6, -5, -4], [-9, -7, -6, -5, -3, -2, -1], [-9, -7, -6, -5, -3, -2], [-9, -7, -6, -5, -3, -1], [-9, -7, -6, -5, -3], [-9, -7, -6, -5, -2, -1], [-9, -7, -6, -5, -2], [-9, -7, -6, -5, -1], [-9, -7, -6, -5], [-9, -7, -6, -4, -3, -2, -1], [-9, -7, -6, -4, -3, -2], [-9, -7, -6, -4, -3, -1], [-9, -7, -6, -4, -3], [-9, -7, -6, -4, -2, -1], [-9, -7, -6, -4, -2], [-9, -7, -6, -4, -1], [-9, -7, -6, -4], [-9, -7, -6, -3, -2, -1], [-9, -7, -6, -3, -2], [-9, -7, -6, -3, -1], [-9, -7, -6, -3], [-9, -7, -6, -2, -1], [-9, -7, -6, -2], [-9, -7, -6, -1], [-9, -7, -6], [-9, -7, -5, -4, -3, -2, -1], [-9, -7, -5, -4, -3, -2], [-9, -7, -5, -4, -3, -1], [-9, -7, -5, -4, -3], [-9, -7, -5, -4, -2, -1], [-9, -7, -5, -4, -2], [-9, -7, -5, -4, -1], [-9, -7, -5, -4], [-9, -7, -5, -3, -2, -1], [-9, -7, -5, -3, -2], [-9, -7, -5, -3, -1], [-9, -7, -5, -3], [-9, -7, -5, -2, -1], [-9, -7, -5, -2], [-9, -7, -5, -1], [-9, -7, -5], [-9, -7, -4, -3, -2, -1], [-9, -7, -4, -3, -2], [-9, -7, -4, -3, -1], [-9, -7, -4, -3], [-9, -7, -4, -2, -1], [-9, -7, -4, -2], [-9, -7, -4, -1], [-9, -7, -4], [-9, -7, -3, -2, -1], [-9, -7, -3, -2], [-9, -7, -3, -1], [-9, -7, -3], [-9, -7, -2, -1], [-9, -7, -2], [-9, -7, -1], [-9, -7], [-9, -6, -5, -4, -3, -2, -1], [-9, -6, -5, -4, -3, -2], [-9, -6, -5, -4, -3, -1], [-9, -6, -5, -4, -3], [-9, -6, -5, -4, -2, -1], [-9, -6, -5, -4, -2], [-9, -6, -5, -4, -1], [-9, -6, -5, -4], [-9, -6, -5, -3, -2, -1], [-9, -6, -5, -3, -2], [-9, -6, -5, -3, -1], [-9, -6, -5, -3], [-9, -6, -5, -2, -1], [-9, -6, -5, -2], [-9, -6, -5, -1], [-9, -6, -5], [-9, -6, -4, -3, -2, -1], [-9, -6, -4, -3, -2], [-9, -6, -4, -3, -1], [-9, -6, -4, -3], [-9, -6, -4, -2, -1], [-9, -6, -4, -2], [-9, -6, -4, -1], [-9, -6, -4], [-9, -6, -3, -2, -1], [-9, -6, -3, -2], [-9, -6, -3, -1], [-9, -6, -3], [-9, -6, -2, -1], [-9, -6, -2], [-9, -6, -1], [-9, -6], [-9, -5, -4, -3, -2, -1], [-9, -5, -4, -3, -2], [-9, -5, -4, -3, -1], [-9, -5, -4, -3], [-9, -5, -4, -2, -1], [-9, -5, -4, -2], [-9, -5, -4, -1], [-9, -5, -4], [-9, -5, -3, -2, -1], [-9, -5, -3, -2], [-9, -5, -3, -1], [-9, -5, -3], [-9, -5, -2, -1], [-9, -5, -2], [-9, -5, -1], [-9, -5], [-9, -4, -3, -2, -1], [-9, -4, -3, -2], [-9, -4, -3, -1], [-9, -4, -3], [-9, -4, -2, -1], [-9, -4, -2], [-9, -4, -1], [-9, -4], [-9, -3, -2, -1], [-9, -3, -2], [-9, -3, -1], [-9, -3], [-9, -2, -1], [-9, -2], [-9, -1], [-9], [-8, -7, -6, -5, -4, -3, -2, -1], [-8, -7, -6, -5, -4, -3, -2], [-8, -7, -6, -5, -4, -3, -1], [-8, -7, -6, -5, -4, -3], [-8, -7, -6, -5, -4, -2, -1], [-8, -7, -6, -5, -4, -2], [-8, -7, -6, -5, -4, -1], [-8, -7, -6, -5, -4], [-8, -7, -6, -5, -3, -2, -1], [-8, -7, -6, -5, -3, -2], [-8, -7, -6, -5, -3, -1], [-8, -7, -6, -5, -3], [-8, -7, -6, -5, -2, -1], [-8, -7, -6, -5, -2], [-8, -7, -6, -5, -1], [-8, -7, -6, -5], [-8, -7, -6, -4, -3, -2, -1], [-8, -7, -6, -4, -3, -2], [-8, -7, -6, -4, -3, -1], [-8, -7, -6, -4, -3], [-8, -7, -6, -4, -2, -1], [-8, -7, -6, -4, -2], [-8, -7, -6, -4, -1], [-8, -7, -6, -4], [-8, -7, -6, -3, -2, -1], [-8, -7, -6, -3, -2], [-8, -7, -6, -3, -1], [-8, -7, -6, -3], [-8, -7, -6, -2, -1], [-8, -7, -6, -2], [-8, -7, -6, -1], [-8, -7, -6], [-8, -7, -5, -4, -3, -2, -1], [-8, -7, -5, -4, -3, -2], [-8, -7, -5, -4, -3, -1], [-8, -7, -5, -4, -3], [-8, -7, -5, -4, -2, -1], [-8, -7, -5, -4, -2], [-8, -7, -5, -4, -1], [-8, -7, -5, -4], [-8, -7, -5, -3, -2, -1], [-8, -7, -5, -3, -2], [-8, -7, -5, -3, -1], [-8, -7, -5, -3], [-8, -7, -5, -2, -1], [-8, -7, -5, -2], [-8, -7, -5, -1], [-8, -7, -5], [-8, -7, -4, -3, -2, -1], [-8, -7, -4, -3, -2], [-8, -7, -4, -3, -1], [-8, -7, -4, -3], [-8, -7, -4, -2, -1], [-8, -7, -4, -2], [-8, -7, -4, -1], [-8, -7, -4], [-8, -7, -3, -2, -1], [-8, -7, -3, -2], [-8, -7, -3, -1], [-8, -7, -3], [-8, -7, -2, -1], [-8, -7, -2], [-8, -7, -1], [-8, -7], [-8, -6, -5, -4, -3, -2, -1], [-8, -6, -5, -4, -3, -2], [-8, -6, -5, -4, -3, -1], [-8, -6, -5, -4, -3], [-8, -6, -5, -4, -2, -1], [-8, -6, -5, -4, -2], [-8, -6, -5, -4, -1], [-8, -6, -5, -4], [-8, -6, -5, -3, -2, -1], [-8, -6, -5, -3, -2], [-8, -6, -5, -3, -1], [-8, -6, -5, -3], [-8, -6, -5, -2, -1], [-8, -6, -5, -2], [-8, -6, -5, -1], [-8, -6, -5], [-8, -6, -4, -3, -2, -1], [-8, -6, -4, -3, -2], [-8, -6, -4, -3, -1], [-8, -6, -4, -3], [-8, -6, -4, -2, -1], [-8, -6, -4, -2], [-8, -6, -4, -1], [-8, -6, -4], [-8, -6, -3, -2, -1], [-8, -6, -3, -2], [-8, -6, -3, -1], [-8, -6, -3], [-8, -6, -2, -1], [-8, -6, -2], [-8, -6, -1], [-8, -6], [-8, -5, -4, -3, -2, -1], [-8, -5, -4, -3, -2], [-8, -5, -4, -3, -1], [-8, -5, -4, -3], [-8, -5, -4, -2, -1], [-8, -5, -4, -2], [-8, -5, -4, -1], [-8, -5, -4], [-8, -5, -3, -2, -1], [-8, -5, -3, -2], [-8, -5, -3, -1], [-8, -5, -3], [-8, -5, -2, -1], [-8, -5, -2], [-8, -5, -1], [-8, -5], [-8, -4, -3, -2, -1], [-8, -4, -3, -2], [-8, -4, -3, -1], [-8, -4, -3], [-8, -4, -2, -1], [-8, -4, -2], [-8, -4, -1], [-8, -4], [-8, -3, -2, -1], [-8, -3, -2], [-8, -3, -1], [-8, -3], [-8, -2, -1], [-8, -2], [-8, -1], [-8], [-7, -6, -5, -4, -3, -2, -1], [-7, -6, -5, -4, -3, -2], [-7, -6, -5, -4, -3, -1], [-7, -6, -5, -4, -3], [-7, -6, -5, -4, -2, -1], [-7, -6, -5, -4, -2], [-7, -6, -5, -4, -1], [-7, -6, -5, -4], [-7, -6, -5, -3, -2, -1], [-7, -6, -5, -3, -2], [-7, -6, -5, -3, -1], [-7, -6, -5, -3], [-7, -6, -5, -2, -1], [-7, -6, -5, -2], [-7, -6, -5, -1], [-7, -6, -5], [-7, -6, -4, -3, -2, -1], [-7, -6, -4, -3, -2], [-7, -6, -4, -3, -1], [-7, -6, -4, -3], [-7, -6, -4, -2, -1], [-7, -6, -4, -2], [-7, -6, -4, -1], [-7, -6, -4], [-7, -6, -3, -2, -1], [-7, -6, -3, -2], [-7, -6, -3, -1], [-7, -6, -3], [-7, -6, -2, -1], [-7, -6, -2], [-7, -6, -1], [-7, -6], [-7, -5, -4, -3, -2, -1], [-7, -5, -4, -3, -2], [-7, -5, -4, -3, -1], [-7, -5, -4, -3], [-7, -5, -4, -2, -1], [-7, -5, -4, -2], [-7, -5, -4, -1], [-7, -5, -4], [-7, -5, -3, -2, -1], [-7, -5, -3, -2], [-7, -5, -3, -1], [-7, -5, -3], [-7, -5, -2, -1], [-7, -5, -2], [-7, -5, -1], [-7, -5], [-7, -4, -3, -2, -1], [-7, -4, -3, -2], [-7, -4, -3, -1], [-7, -4, -3], [-7, -4, -2, -1], [-7, -4, -2], [-7, -4, -1], [-7, -4], [-7, -3, -2, -1], [-7, -3, -2], [-7, -3, -1], [-7, -3], [-7, -2, -1], [-7, -2], [-7, -1], [-7], [-6, -5, -4, -3, -2, -1], [-6, -5, -4, -3, -2], [-6, -5, -4, -3, -1], [-6, -5, -4, -3], [-6, -5, -4, -2, -1], [-6, -5, -4, -2], [-6, -5, -4, -1], [-6, -5, -4], [-6, -5, -3, -2, -1], [-6, -5, -3, -2], [-6, -5, -3, -1], [-6, -5, -3], [-6, -5, -2, -1], [-6, -5, -2], [-6, -5, -1], [-6, -5], [-6, -4, -3, -2, -1], [-6, -4, -3, -2], [-6, -4, -3, -1], [-6, -4, -3], [-6, -4, -2, -1], [-6, -4, -2], [-6, -4, -1], [-6, -4], [-6, -3, -2, -1], [-6, -3, -2], [-6, -3, -1], [-6, -3], [-6, -2, -1], [-6, -2], [-6, -1], [-6], [-5, -4, -3, -2, -1], [-5, -4, -3, -2], [-5, -4, -3, -1], [-5, -4, -3], [-5, -4, -2, -1], [-5, -4, -2], [-5, -4, -1], [-5, -4], [-5, -3, -2, -1], [-5, -3, -2], [-5, -3, -1], [-5, -3], [-5, -2, -1], [-5, -2], [-5, -1], [-5], [-4, -3, -2, -1], [-4, -3, -2], [-4, -3, -1], [-4, -3], [-4, -2, -1], [-4, -2], [-4, -1], [-4], [-3, -2, -1], [-3, -2], [-3, -1], [-3], [-2, -1], [-2], [-1], []])\n assert answers_match(candidate(nums=[4, 4, 4, 4, 4, 4, 4, 4, 4, 4]), [[4, 4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4], [4, 4, 4, 4, 4], [4, 4, 4, 4], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[-1, -2, -3, -2, -1]), [[-3, -2, -2, -1, -1], [-3, -2, -2, -1], [-3, -2, -2], [-3, -2, -1, -1], [-3, -2, -1], [-3, -2], [-3, -1, -1], [-3, -1], [-3], [-2, -2, -1, -1], [-2, -2, -1], [-2, -2], [-2, -1, -1], [-2, -1], [-2], [-1, -1], [-1], []])\n assert answers_match(candidate(nums=[-5, -5, -5, -5, 0, 0, 0, 5, 5, 5]), [[-5, -5, -5, -5, 0, 0, 0, 5, 5, 5], [-5, -5, -5, -5, 0, 0, 0, 5, 5], [-5, -5, -5, -5, 0, 0, 0, 5], [-5, -5, -5, -5, 0, 0, 0], [-5, -5, -5, -5, 0, 0, 5, 5, 5], [-5, -5, -5, -5, 0, 0, 5, 5], [-5, -5, -5, -5, 0, 0, 5], [-5, -5, -5, -5, 0, 0], [-5, -5, -5, -5, 0, 5, 5, 5], [-5, -5, -5, -5, 0, 5, 5], [-5, -5, -5, -5, 0, 5], [-5, -5, -5, -5, 0], [-5, -5, -5, -5, 5, 5, 5], [-5, -5, -5, -5, 5, 5], [-5, -5, -5, -5, 5], [-5, -5, -5, -5], [-5, -5, -5, 0, 0, 0, 5, 5, 5], [-5, -5, -5, 0, 0, 0, 5, 5], [-5, -5, -5, 0, 0, 0, 5], [-5, -5, -5, 0, 0, 0], [-5, -5, -5, 0, 0, 5, 5, 5], [-5, -5, -5, 0, 0, 5, 5], [-5, -5, -5, 0, 0, 5], [-5, -5, -5, 0, 0], [-5, -5, -5, 0, 5, 5, 5], [-5, -5, -5, 0, 5, 5], [-5, -5, -5, 0, 5], [-5, -5, -5, 0], [-5, -5, -5, 5, 5, 5], [-5, -5, -5, 5, 5], [-5, -5, -5, 5], [-5, -5, -5], [-5, -5, 0, 0, 0, 5, 5, 5], [-5, -5, 0, 0, 0, 5, 5], [-5, -5, 0, 0, 0, 5], [-5, -5, 0, 0, 0], [-5, -5, 0, 0, 5, 5, 5], [-5, -5, 0, 0, 5, 5], [-5, -5, 0, 0, 5], [-5, -5, 0, 0], [-5, -5, 0, 5, 5, 5], [-5, -5, 0, 5, 5], [-5, -5, 0, 5], [-5, -5, 0], [-5, -5, 5, 5, 5], [-5, -5, 5, 5], [-5, -5, 5], [-5, -5], [-5, 0, 0, 0, 5, 5, 5], [-5, 0, 0, 0, 5, 5], [-5, 0, 0, 0, 5], [-5, 0, 0, 0], [-5, 0, 0, 5, 5, 5], [-5, 0, 0, 5, 5], [-5, 0, 0, 5], [-5, 0, 0], [-5, 0, 5, 5, 5], [-5, 0, 5, 5], [-5, 0, 5], [-5, 0], [-5, 5, 5, 5], [-5, 5, 5], [-5, 5], [-5], [0, 0, 0, 5, 5, 5], [0, 0, 0, 5, 5], [0, 0, 0, 5], [0, 0, 0], [0, 0, 5, 5, 5], [0, 0, 5, 5], [0, 0, 5], [0, 0], [0, 5, 5, 5], [0, 5, 5], [0, 5], [0], [5, 5, 5], [5, 5], [5], []])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 2, 3, 3]), [[0, 0, 1, 1, 2, 2, 3, 3], [0, 0, 1, 1, 2, 2, 3], [0, 0, 1, 1, 2, 2], [0, 0, 1, 1, 2, 3, 3], [0, 0, 1, 1, 2, 3], [0, 0, 1, 1, 2], [0, 0, 1, 1, 3, 3], [0, 0, 1, 1, 3], [0, 0, 1, 1], [0, 0, 1, 2, 2, 3, 3], [0, 0, 1, 2, 2, 3], [0, 0, 1, 2, 2], [0, 0, 1, 2, 3, 3], [0, 0, 1, 2, 3], [0, 0, 1, 2], [0, 0, 1, 3, 3], [0, 0, 1, 3], [0, 0, 1], [0, 0, 2, 2, 3, 3], [0, 0, 2, 2, 3], [0, 0, 2, 2], [0, 0, 2, 3, 3], [0, 0, 2, 3], [0, 0, 2], [0, 0, 3, 3], [0, 0, 3], [0, 0], [0, 1, 1, 2, 2, 3, 3], [0, 1, 1, 2, 2, 3], [0, 1, 1, 2, 2], [0, 1, 1, 2, 3, 3], [0, 1, 1, 2, 3], [0, 1, 1, 2], [0, 1, 1, 3, 3], [0, 1, 1, 3], [0, 1, 1], [0, 1, 2, 2, 3, 3], [0, 1, 2, 2, 3], [0, 1, 2, 2], [0, 1, 2, 3, 3], [0, 1, 2, 3], [0, 1, 2], [0, 1, 3, 3], [0, 1, 3], [0, 1], [0, 2, 2, 3, 3], [0, 2, 2, 3], [0, 2, 2], [0, 2, 3, 3], [0, 2, 3], [0, 2], [0, 3, 3], [0, 3], [0], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -1, -2, -3, -4]), [[-4, -4, -3, -3, -2, -2, -1, -1], [-4, -4, -3, -3, -2, -2, -1], [-4, -4, -3, -3, -2, -2], [-4, -4, -3, -3, -2, -1, -1], [-4, -4, -3, -3, -2, -1], [-4, -4, -3, -3, -2], [-4, -4, -3, -3, -1, -1], [-4, -4, -3, -3, -1], [-4, -4, -3, -3], [-4, -4, -3, -2, -2, -1, -1], [-4, -4, -3, -2, -2, -1], [-4, -4, -3, -2, -2], [-4, -4, -3, -2, -1, -1], [-4, -4, -3, -2, -1], [-4, -4, -3, -2], [-4, -4, -3, -1, -1], [-4, -4, -3, -1], [-4, -4, -3], [-4, -4, -2, -2, -1, -1], [-4, -4, -2, -2, -1], [-4, -4, -2, -2], [-4, -4, -2, -1, -1], [-4, -4, -2, -1], [-4, -4, -2], [-4, -4, -1, -1], [-4, -4, -1], [-4, -4], [-4, -3, -3, -2, -2, -1, -1], [-4, -3, -3, -2, -2, -1], [-4, -3, -3, -2, -2], [-4, -3, -3, -2, -1, -1], [-4, -3, -3, -2, -1], [-4, -3, -3, -2], [-4, -3, -3, -1, -1], [-4, -3, -3, -1], [-4, -3, -3], [-4, -3, -2, -2, -1, -1], [-4, -3, -2, -2, -1], [-4, -3, -2, -2], [-4, -3, -2, -1, -1], [-4, -3, -2, -1], [-4, -3, -2], [-4, -3, -1, -1], [-4, -3, -1], [-4, -3], [-4, -2, -2, -1, -1], [-4, -2, -2, -1], [-4, -2, -2], [-4, -2, -1, -1], [-4, -2, -1], [-4, -2], [-4, -1, -1], [-4, -1], [-4], [-3, -3, -2, -2, -1, -1], [-3, -3, -2, -2, -1], [-3, -3, -2, -2], [-3, -3, -2, -1, -1], [-3, -3, -2, -1], [-3, -3, -2], [-3, -3, -1, -1], [-3, -3, -1], [-3, -3], [-3, -2, -2, -1, -1], [-3, -2, -2, -1], [-3, -2, -2], [-3, -2, -1, -1], [-3, -2, -1], [-3, -2], [-3, -1, -1], [-3, -1], [-3], [-2, -2, -1, -1], [-2, -2, -1], [-2, -2], [-2, -1, -1], [-2, -1], [-2], [-1, -1], [-1], []])\n assert answers_match(candidate(nums=[3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3], [3, 3, 3], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4]), [[1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 3, 3, 4], [1, 3, 3, 3], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4], [1, 3], [1, 4], [1], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [2, 3, 3, 3, 4], [2, 3, 3, 3], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4], [2, 3], [2, 4], [2], [3, 3, 3, 4], [3, 3, 3], [3, 3, 4], [3, 3], [3, 4], [3], [4], []])\n assert answers_match(candidate(nums=[7, 8, 7, 8, 9]), [[7, 7, 8, 8, 9], [7, 7, 8, 8], [7, 7, 8, 9], [7, 7, 8], [7, 7, 9], [7, 7], [7, 8, 8, 9], [7, 8, 8], [7, 8, 9], [7, 8], [7, 9], [7], [8, 8, 9], [8, 8], [8, 9], [8], [9], []])\n assert answers_match(candidate(nums=[-10, 0, 10, -10, 0, 10, -10, 0, 10]), [[-10, -10, -10, 0, 0, 0, 10, 10, 10], [-10, -10, -10, 0, 0, 0, 10, 10], [-10, -10, -10, 0, 0, 0, 10], [-10, -10, -10, 0, 0, 0], [-10, -10, -10, 0, 0, 10, 10, 10], [-10, -10, -10, 0, 0, 10, 10], [-10, -10, -10, 0, 0, 10], [-10, -10, -10, 0, 0], [-10, -10, -10, 0, 10, 10, 10], [-10, -10, -10, 0, 10, 10], [-10, -10, -10, 0, 10], [-10, -10, -10, 0], [-10, -10, -10, 10, 10, 10], [-10, -10, -10, 10, 10], [-10, -10, -10, 10], [-10, -10, -10], [-10, -10, 0, 0, 0, 10, 10, 10], [-10, -10, 0, 0, 0, 10, 10], [-10, -10, 0, 0, 0, 10], [-10, -10, 0, 0, 0], [-10, -10, 0, 0, 10, 10, 10], [-10, -10, 0, 0, 10, 10], [-10, -10, 0, 0, 10], [-10, -10, 0, 0], [-10, -10, 0, 10, 10, 10], [-10, -10, 0, 10, 10], [-10, -10, 0, 10], [-10, -10, 0], [-10, -10, 10, 10, 10], [-10, -10, 10, 10], [-10, -10, 10], [-10, -10], [-10, 0, 0, 0, 10, 10, 10], [-10, 0, 0, 0, 10, 10], [-10, 0, 0, 0, 10], [-10, 0, 0, 0], [-10, 0, 0, 10, 10, 10], [-10, 0, 0, 10, 10], [-10, 0, 0, 10], [-10, 0, 0], [-10, 0, 10, 10, 10], [-10, 0, 10, 10], [-10, 0, 10], [-10, 0], [-10, 10, 10, 10], [-10, 10, 10], [-10, 10], [-10], [0, 0, 0, 10, 10, 10], [0, 0, 0, 10, 10], [0, 0, 0, 10], [0, 0, 0], [0, 0, 10, 10, 10], [0, 0, 10, 10], [0, 0, 10], [0, 0], [0, 10, 10, 10], [0, 10, 10], [0, 10], [0], [10, 10, 10], [10, 10], [10], []])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3]), [[1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3, 3], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3, 3], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3, 3], [2, 3, 3], [2, 3], [2], [3, 3, 3], [3, 3], [3], []])\n assert answers_match(candidate(nums=[9, 9, 8, 8, 7, 7, 6, 6, 5, 5]), [[5, 5, 6, 6, 7, 7, 8, 8, 9, 9], [5, 5, 6, 6, 7, 7, 8, 8, 9], [5, 5, 6, 6, 7, 7, 8, 8], [5, 5, 6, 6, 7, 7, 8, 9, 9], [5, 5, 6, 6, 7, 7, 8, 9], [5, 5, 6, 6, 7, 7, 8], [5, 5, 6, 6, 7, 7, 9, 9], [5, 5, 6, 6, 7, 7, 9], [5, 5, 6, 6, 7, 7], [5, 5, 6, 6, 7, 8, 8, 9, 9], [5, 5, 6, 6, 7, 8, 8, 9], [5, 5, 6, 6, 7, 8, 8], [5, 5, 6, 6, 7, 8, 9, 9], [5, 5, 6, 6, 7, 8, 9], [5, 5, 6, 6, 7, 8], [5, 5, 6, 6, 7, 9, 9], [5, 5, 6, 6, 7, 9], [5, 5, 6, 6, 7], [5, 5, 6, 6, 8, 8, 9, 9], [5, 5, 6, 6, 8, 8, 9], [5, 5, 6, 6, 8, 8], [5, 5, 6, 6, 8, 9, 9], [5, 5, 6, 6, 8, 9], [5, 5, 6, 6, 8], [5, 5, 6, 6, 9, 9], [5, 5, 6, 6, 9], [5, 5, 6, 6], [5, 5, 6, 7, 7, 8, 8, 9, 9], [5, 5, 6, 7, 7, 8, 8, 9], [5, 5, 6, 7, 7, 8, 8], [5, 5, 6, 7, 7, 8, 9, 9], [5, 5, 6, 7, 7, 8, 9], [5, 5, 6, 7, 7, 8], [5, 5, 6, 7, 7, 9, 9], [5, 5, 6, 7, 7, 9], [5, 5, 6, 7, 7], [5, 5, 6, 7, 8, 8, 9, 9], [5, 5, 6, 7, 8, 8, 9], [5, 5, 6, 7, 8, 8], [5, 5, 6, 7, 8, 9, 9], [5, 5, 6, 7, 8, 9], [5, 5, 6, 7, 8], [5, 5, 6, 7, 9, 9], [5, 5, 6, 7, 9], [5, 5, 6, 7], [5, 5, 6, 8, 8, 9, 9], [5, 5, 6, 8, 8, 9], [5, 5, 6, 8, 8], [5, 5, 6, 8, 9, 9], [5, 5, 6, 8, 9], [5, 5, 6, 8], [5, 5, 6, 9, 9], [5, 5, 6, 9], [5, 5, 6], [5, 5, 7, 7, 8, 8, 9, 9], [5, 5, 7, 7, 8, 8, 9], [5, 5, 7, 7, 8, 8], [5, 5, 7, 7, 8, 9, 9], [5, 5, 7, 7, 8, 9], [5, 5, 7, 7, 8], [5, 5, 7, 7, 9, 9], [5, 5, 7, 7, 9], [5, 5, 7, 7], [5, 5, 7, 8, 8, 9, 9], [5, 5, 7, 8, 8, 9], [5, 5, 7, 8, 8], [5, 5, 7, 8, 9, 9], [5, 5, 7, 8, 9], [5, 5, 7, 8], [5, 5, 7, 9, 9], [5, 5, 7, 9], [5, 5, 7], [5, 5, 8, 8, 9, 9], [5, 5, 8, 8, 9], [5, 5, 8, 8], [5, 5, 8, 9, 9], [5, 5, 8, 9], [5, 5, 8], [5, 5, 9, 9], [5, 5, 9], [5, 5], [5, 6, 6, 7, 7, 8, 8, 9, 9], [5, 6, 6, 7, 7, 8, 8, 9], [5, 6, 6, 7, 7, 8, 8], [5, 6, 6, 7, 7, 8, 9, 9], [5, 6, 6, 7, 7, 8, 9], [5, 6, 6, 7, 7, 8], [5, 6, 6, 7, 7, 9, 9], [5, 6, 6, 7, 7, 9], [5, 6, 6, 7, 7], [5, 6, 6, 7, 8, 8, 9, 9], [5, 6, 6, 7, 8, 8, 9], [5, 6, 6, 7, 8, 8], [5, 6, 6, 7, 8, 9, 9], [5, 6, 6, 7, 8, 9], [5, 6, 6, 7, 8], [5, 6, 6, 7, 9, 9], [5, 6, 6, 7, 9], [5, 6, 6, 7], [5, 6, 6, 8, 8, 9, 9], [5, 6, 6, 8, 8, 9], [5, 6, 6, 8, 8], [5, 6, 6, 8, 9, 9], [5, 6, 6, 8, 9], [5, 6, 6, 8], [5, 6, 6, 9, 9], [5, 6, 6, 9], [5, 6, 6], [5, 6, 7, 7, 8, 8, 9, 9], [5, 6, 7, 7, 8, 8, 9], [5, 6, 7, 7, 8, 8], [5, 6, 7, 7, 8, 9, 9], [5, 6, 7, 7, 8, 9], [5, 6, 7, 7, 8], [5, 6, 7, 7, 9, 9], [5, 6, 7, 7, 9], [5, 6, 7, 7], [5, 6, 7, 8, 8, 9, 9], [5, 6, 7, 8, 8, 9], [5, 6, 7, 8, 8], [5, 6, 7, 8, 9, 9], [5, 6, 7, 8, 9], [5, 6, 7, 8], [5, 6, 7, 9, 9], [5, 6, 7, 9], [5, 6, 7], [5, 6, 8, 8, 9, 9], [5, 6, 8, 8, 9], [5, 6, 8, 8], [5, 6, 8, 9, 9], [5, 6, 8, 9], [5, 6, 8], [5, 6, 9, 9], [5, 6, 9], [5, 6], [5, 7, 7, 8, 8, 9, 9], [5, 7, 7, 8, 8, 9], [5, 7, 7, 8, 8], [5, 7, 7, 8, 9, 9], [5, 7, 7, 8, 9], [5, 7, 7, 8], [5, 7, 7, 9, 9], [5, 7, 7, 9], [5, 7, 7], [5, 7, 8, 8, 9, 9], [5, 7, 8, 8, 9], [5, 7, 8, 8], [5, 7, 8, 9, 9], [5, 7, 8, 9], [5, 7, 8], [5, 7, 9, 9], [5, 7, 9], [5, 7], [5, 8, 8, 9, 9], [5, 8, 8, 9], [5, 8, 8], [5, 8, 9, 9], [5, 8, 9], [5, 8], [5, 9, 9], [5, 9], [5], [6, 6, 7, 7, 8, 8, 9, 9], [6, 6, 7, 7, 8, 8, 9], [6, 6, 7, 7, 8, 8], [6, 6, 7, 7, 8, 9, 9], [6, 6, 7, 7, 8, 9], [6, 6, 7, 7, 8], [6, 6, 7, 7, 9, 9], [6, 6, 7, 7, 9], [6, 6, 7, 7], [6, 6, 7, 8, 8, 9, 9], [6, 6, 7, 8, 8, 9], [6, 6, 7, 8, 8], [6, 6, 7, 8, 9, 9], [6, 6, 7, 8, 9], [6, 6, 7, 8], [6, 6, 7, 9, 9], [6, 6, 7, 9], [6, 6, 7], [6, 6, 8, 8, 9, 9], [6, 6, 8, 8, 9], [6, 6, 8, 8], [6, 6, 8, 9, 9], [6, 6, 8, 9], [6, 6, 8], [6, 6, 9, 9], [6, 6, 9], [6, 6], [6, 7, 7, 8, 8, 9, 9], [6, 7, 7, 8, 8, 9], [6, 7, 7, 8, 8], [6, 7, 7, 8, 9, 9], [6, 7, 7, 8, 9], [6, 7, 7, 8], [6, 7, 7, 9, 9], [6, 7, 7, 9], [6, 7, 7], [6, 7, 8, 8, 9, 9], [6, 7, 8, 8, 9], [6, 7, 8, 8], [6, 7, 8, 9, 9], [6, 7, 8, 9], [6, 7, 8], [6, 7, 9, 9], [6, 7, 9], [6, 7], [6, 8, 8, 9, 9], [6, 8, 8, 9], [6, 8, 8], [6, 8, 9, 9], [6, 8, 9], [6, 8], [6, 9, 9], [6, 9], [6], [7, 7, 8, 8, 9, 9], [7, 7, 8, 8, 9], [7, 7, 8, 8], [7, 7, 8, 9, 9], [7, 7, 8, 9], [7, 7, 8], [7, 7, 9, 9], [7, 7, 9], [7, 7], [7, 8, 8, 9, 9], [7, 8, 8, 9], [7, 8, 8], [7, 8, 9, 9], [7, 8, 9], [7, 8], [7, 9, 9], [7, 9], [7], [8, 8, 9, 9], [8, 8, 9], [8, 8], [8, 9, 9], [8, 9], [8], [9, 9], [9], []])\n assert answers_match(candidate(nums=[7, 8, 8, 9, 9, 9, 9]), [[7, 8, 8, 9, 9, 9, 9], [7, 8, 8, 9, 9, 9], [7, 8, 8, 9, 9], [7, 8, 8, 9], [7, 8, 8], [7, 8, 9, 9, 9, 9], [7, 8, 9, 9, 9], [7, 8, 9, 9], [7, 8, 9], [7, 8], [7, 9, 9, 9, 9], [7, 9, 9, 9], [7, 9, 9], [7, 9], [7], [8, 8, 9, 9, 9, 9], [8, 8, 9, 9, 9], [8, 8, 9, 9], [8, 8, 9], [8, 8], [8, 9, 9, 9, 9], [8, 9, 9, 9], [8, 9, 9], [8, 9], [8], [9, 9, 9, 9], [9, 9, 9], [9, 9], [9], []])\n assert answers_match(candidate(nums=[4, 4, 4, 3, 3, 2, 1]), [[1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4], [1, 4, 4], [1, 4], [1], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4], [2, 4, 4], [2, 4], [2], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4], [3, 4, 4], [3, 4], [3], [4, 4, 4], [4, 4], [4], []])\n assert answers_match(candidate(nums=[3, 1, 2, 2, 3, 1]), [[1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3], [1, 3], [1], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3], [2, 3], [2], [3, 3], [3], []])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 2, 3, 3, 4, 4, 5]), [[1, 1, 2, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 2, 2, 2, 3, 3, 5], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 2, 3, 4, 4], [1, 1, 2, 2, 2, 3, 4, 5], [1, 1, 2, 2, 2, 3, 4], [1, 1, 2, 2, 2, 3, 5], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2, 4, 4, 5], [1, 1, 2, 2, 2, 4, 4], [1, 1, 2, 2, 2, 4, 5], [1, 1, 2, 2, 2, 4], [1, 1, 2, 2, 2, 5], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5], [1, 1], [1, 2, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 2, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 4, 5], [1, 2, 2, 2, 3, 3, 4], [1, 2, 2, 2, 3, 3, 5], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3, 4, 4, 5], [1, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 3, 4, 5], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 4, 5], [1, 2, 2, 2, 4, 4], [1, 2, 2, 2, 4, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 5], [1, 2, 2, 2], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5], [1, 4], [1, 5], [1], [2, 2, 2, 3, 3, 4, 4, 5], [2, 2, 2, 3, 3, 4, 4], [2, 2, 2, 3, 3, 4, 5], [2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3, 5], [2, 2, 2, 3, 3], [2, 2, 2, 3, 4, 4, 5], [2, 2, 2, 3, 4, 4], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 4], [2, 2, 2, 3, 5], [2, 2, 2, 3], [2, 2, 2, 4, 4, 5], [2, 2, 2, 4, 4], [2, 2, 2, 4, 5], [2, 2, 2, 4], [2, 2, 2, 5], [2, 2, 2], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5], [2, 4], [2, 5], [2], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5], [3, 3], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5], [3, 4], [3, 5], [3], [4, 4, 5], [4, 4], [4, 5], [4], [5], []])\n", "comparison": "unordered"}, "public_tests": ["[1,2,2]", "[0]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().subsetsWithDup", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:49+00:00", "tests_total": 103, "tests_dropped": 5, "flags": ["any_order"], "topic_tags": ["array", "backtracking", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def subsets_with_dup(nums)", "container": null, "callable": "subsets_with_dup", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 91, "task_id": "decode-ways", "difficulty": "Medium", "problem_description": "You have intercepted a secret message encoded as a string of numbers. The message is decoded via the following mapping:\n\n\"1\" -> 'A'\n\"2\" -> 'B'\n...\n\"25\" -> 'Y'\n\"26\" -> 'Z'\n\nHowever, while decoding the message, you realize that there are many different ways you can decode the message because some codes are contained in other codes (\"2\" and \"5\" vs \"25\").\n\nFor example, \"11106\" can be decoded into:\n\n- \"AAJF\" with the grouping (1, 1, 10, 6)\n- \"KJF\" with the grouping (11, 10, 6)\n- The grouping (1, 11, 06) is invalid because \"06\" is not a valid code (only \"6\" is valid).\n\nNote: there may be strings that are impossible to decode.\nGiven a string s containing only digits, return the number of ways to decode it. If the entire string cannot be decoded in any valid way, return 0.\n\nThe test cases are generated so that the answer fits in a 32-bit integer.\n\nExample 1:\n\nInput: s = \"12\"\nOutput: 2\nExplanation:\n\"12\" could be decoded as \"AB\" (1 2) or \"L\" (12).\n\nExample 2:\n\nInput: s = \"226\"\nOutput: 3\nExplanation:\n\"226\" could be decoded as \"BZ\" (2 26), \"VF\" (22 6), or \"BBF\" (2 2 6).\n\nExample 3:\n\nInput: s = \"06\"\nOutput: 0\nExplanation:\n\"06\" cannot be mapped to \"F\" because of the leading zero (\"6\" is different from \"06\"). In this case, the string is not a valid encoding, so return 0.\n\nConstraints:\n\n- 1 <= s.length <= 100\n- s contains only digits and may contain leading zero(s).\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"100100100\") == 0\n assert candidate(s = \"101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010\") == 1\n assert candidate(s = \"1111001111001111001111001111001111001111001111001111001111\") == 0\n assert candidate(s = \"2611055971756562\") == 4\n assert candidate(s = \"10011\") == 0\n assert candidate(s = \"11106\") == 2\n assert candidate(s = \"30\") == 0\n assert candidate(s = \"10101010101010101010101010101010\") == 1\n assert candidate(s = \"260260260260260260260260260260260260260260260260260260260\") == 0\n assert candidate(s = \"50633191395000636099666\") == 0\n assert candidate(s = \"12212212212212212212212212212212\") == 3524578\n assert candidate(s = \"120123\") == 3\n assert candidate(s = \"1201234\") == 3\n assert candidate(s = \"999999999999999999999999999999999999999999999999999999999\") == 1\n assert candidate(s = \"1230123\") == 0\n assert candidate(s = \"1234567890\") == 0\n assert candidate(s = \"123456789\") == 3\n assert candidate(s = \"2626262626262626262626262626262626262626262626262626262626\") == 536870912\n assert candidate(s = \"1234567891011121314151617181920212223242526\") == 259584\n assert candidate(s = \"200\") == 0\n assert candidate(s = \"0\") == 0\n assert candidate(s = \"100\") == 0\n assert candidate(s = \"1231231231231231231231231231231231231231231231231231231231\") == 1162261467\n assert candidate(s = \"47575625458446174945557469461\") == 4\n assert candidate(s = \"2200\") == 0\n assert candidate(s = \"010\") == 0\n assert candidate(s = \"99999999999999999999999999999999\") == 1\n assert candidate(s = \"230\") == 0\n assert candidate(s = \"2020202020202020202020202020202020202020202020202020202020\") == 1\n assert candidate(s = \"99999\") == 1\n assert candidate(s = \"3\") == 1\n assert candidate(s = \"11111111111111111111111111111111\") == 3524578\n assert candidate(s = \"27\") == 1\n assert candidate(s = \"1000000000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \"301\") == 0\n assert candidate(s = \"000\") == 0\n assert candidate(s = \"61105709526116709637291338570167016761\") == 0\n assert candidate(s = \"1010101010101010101010101010101010101010101010101010101010\") == 1\n assert candidate(s = \"10\") == 1\n assert candidate(s = \"1101101101101101101101101101101101101101101101101101101101\") == 1\n assert candidate(s = \"101010101010101010101010101010101010101010101010101010\") == 1\n assert candidate(s = \"110\") == 1\n assert candidate(s = \"12\") == 2\n assert candidate(s = \"226\") == 3\n assert candidate(s = \"1\") == 1\n assert candidate(s = \"2222002222002222002222002222002222002222002222002222002222\") == 0\n assert candidate(s = \"2323232323232323232323232323232323232323232323232323232323\") == 536870912\n assert candidate(s = \"1010101010101010101010101010101010101010101010101010101010101010\") == 1\n assert candidate(s = \"1000\") == 0\n assert candidate(s = \"1001001001001001001001001001001001\") == 0\n assert candidate(s = \"2101\") == 1\n assert candidate(s = \"20\") == 1\n assert candidate(s = \"1001001001001001001001001001001001001001001001001001001001\") == 0\n assert candidate(s = \"06\") == 0\n assert candidate(s = \"1234567890123456789012345678901234567890123456789012345679\") == 0\n assert candidate(s = \"12321213213213213213213213213213213213213213213213\") == 114791256\n assert candidate(s = \"12345678987654321\") == 6\n assert candidate(s = \"2525252525252525252525252525252525252525252525252525252525\") == 536870912\n assert candidate(s = \"12345678901234567890123456789012345678901234567890\") == 0\n assert candidate(s = \"1010101010101010101010101010101010101010101010101010101010101\") == 1\n assert candidate(s = \"10101010101010101010101010101010101010101010101010\") == 1\n assert candidate(s = \"1201201201201201201201201201201201201201201201201201201201\") == 1\n assert candidate(s = \"122522201\") == 10\n assert candidate(s = \"20202020202020202020202020202020202020202020202020202020202\") == 1\n assert candidate(s = \"200200200200200200200200200200200200200200200200200\") == 0\n assert candidate(s = \"25252525252525252525252525252525252525252525252525252525250\") == 0\n assert candidate(s = \"120120120120120\") == 1\n assert candidate(s = \"191919191919191919191919191919191919191919191919191919191919\") == 1073741824\n assert candidate(s = \"9999999999999999999999999999999999999999999999999999999999\") == 1\n assert candidate(s = \"1234567890123456789012345678901234567890123456789012345678\") == 0\n assert candidate(s = \"112233445566778899\") == 8\n assert candidate(s = \"99999999999999999999999999999999999999\") == 1\n assert candidate(s = \"11111111111111111111111111111111111110\") == 24157817\n assert candidate(s = \"192939495969798991011121314151617181920212223242526272829\") == 173056\n assert candidate(s = \"20202020202020202020202020202020202020202020202020\") == 1\n assert candidate(s = \"1234567890987654321012345678909876543210\") == 0\n assert candidate(s = \"272727\") == 1\n assert candidate(s = \"3030303030303030303030303030303030303030303030303030303030303\") == 0\n assert candidate(s = \"001\") == 0\n assert candidate(s = \"11110011110011110011110011110011110011110011110011\") == 0\n assert candidate(s = \"2511452311222112511452311222112511452311222112511\") == 143748000\n assert candidate(s = \"1234567898765432123456789876543212345678987654321234567898\") == 375\n assert candidate(s = \"30515015150150150150150150150150150150150150150150\") == 0\n assert candidate(s = \"11213141516171819202122232425262728293031323334353637383940\") == 0\n assert candidate(s = \"10203040506070809010111213141516171819202122232425262728293031\") == 0\n assert candidate(s = \"0102030405060708091011121314151617181920212223242526\") == 0\n assert candidate(s = \"01010101010101010101010101010101010101010101010101010101010\") == 0\n assert candidate(s = \"111222333444555666777888999000111222333444555666777888999000\") == 0\n assert candidate(s = \"1234567890123456789012345678901234567890123456789012345670\") == 0\n assert candidate(s = \"0000000000000000000000000000000000000000000000000000000000\") == 0\n assert candidate(s = \"1234056789\") == 0\n assert candidate(s = \"19019019019019019019019019019019019019019019019019\") == 0\n assert candidate(s = \"12223242526272829303132333435363738394041424344454647484950\") == 0\n assert candidate(s = \"11111111111111111111111111111111111111\") == 63245986\n assert candidate(s = \"30313233343536373839404142434445464748495051525354555657585960\") == 0\n assert candidate(s = \"270029\") == 0\n assert candidate(s = \"11001100110011001100\") == 0\n assert candidate(s = \"12345678987654321234567898765432123456789\") == 75\n assert candidate(s = \"1122334455667788991011121314151617181920212223242526\") == 692224\n assert candidate(s = \"10101010101010101010101010101010101010101010101010101010101\") == 1\n assert candidate(s = \"273747576787980\") == 0\n assert candidate(s = \"129129129\") == 8\n assert candidate(s = \"301010\") == 0\n assert candidate(s = \"1101111011111011111011111011111011111011111011111\") == 375000\n assert candidate(s = \"123456789012345678901234567890123456789012345678901234567890\") == 0\n assert candidate(s = \"1101010101010101010101010101010101010101010101010101010101\") == 1\n assert candidate(s = \"111000111000111000111000111000111000111000111000111000\") == 0\n assert candidate(s = \"1225232125\") == 50\n assert candidate(s = \"212223242526212223242526212223242526212223242526\") == 116985856\n assert candidate(s = \"262626262626262626262626262626262626262626262626262626262\") == 268435456\n assert candidate(s = \"0123456789\") == 0\n assert candidate(s = \"11223344556677889911223344556677889911223344556677889911\") == 1024\n assert candidate(s = \"11223344556677889910111213141516171819202122232425262728293031\") == 0\n assert candidate(s = \"26262626262626262626262626262626262626\") == 524288\n assert candidate(s = \"101010101010101010101010101010101010101010101010101010101010\") == 1\n assert candidate(s = \"12121212121212121212121212121212121212\") == 63245986\n assert candidate(s = \"25242322212019181716151413121110987654321\") == 51200\n assert candidate(s = \"101010101010101010101010101010101010101010101010101010101010100\") == 0\n assert candidate(s = \"101112131415161718192021222324252620212223242526\") == 8998912\n assert candidate(s = \"11121314151617181920212223242526\") == 86528\n assert candidate(s = \"22222222222222222222222222222222222222\") == 63245986\n assert candidate(s = \"1230011010101010101010101010101010101010101010101010101010\") == 0\n assert candidate(s = \"2727272727272727272727272727272727272727272727272727272727\") == 1\n assert candidate(s = \"1230450678901234567890\") == 0\n assert candidate(s = \"11223344556677889911223344556677889911223344556677889911222\") == 4096\n assert candidate(s = \"33333333333333333333333333333333333333333333333333333333333\") == 1\n assert candidate(s = \"21012101210121012101210121012101210121012101210121\") == 6144\n assert candidate(s = \"112358132134558914423337761098765534211\") == 360\n assert candidate(s = \"262626262626262626262626262626262626262626262626262626262626\") == 1073741824\n assert candidate(s = \"102030405060708090\") == 0\n assert candidate(s = \"9999999999999999999999999999999999999999999999999\") == 1\n assert candidate(s = \"25252525252525252525252525252525252525252525252525\") == 33554432\n assert candidate(s = \"222333444555666777888999\") == 5\n assert candidate(s = \"272727272727272727272727272727272727272727272727272727272\") == 1\n assert candidate(s = \"101010\") == 1\n assert candidate(s = \"102233445566778899112233445566778899112233445566\") == 192\n assert candidate(s = \"110110110\") == 1\n assert candidate(s = \"110110110110110110110110110110110110110110110110110110110110\") == 1\n assert candidate(s = \"26262626262626262626262626262626262626262626262626\") == 33554432\n assert candidate(s = \"112233445566778899112233445566778899112233445566\") == 512\n", "comparison": "exact"}, "public_tests": ["\"12\"", "\"226\"", "\"06\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().numDecodings", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:51+00:00", "tests_total": 176, "tests_dropped": 36, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def num_decodings(s)", "container": null, "callable": "num_decodings", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 93, "task_id": "restore-ip-addresses", "difficulty": "Medium", "problem_description": "A valid IP address consists of exactly four integers separated by single dots. Each integer is between 0 and 255 (inclusive) and cannot have leading zeros.\n\n- For example, \"0.1.2.201\" and \"192.168.1.1\" are valid IP addresses, but \"0.011.255.245\", \"192.168.1.312\" and \"192.168@1.1\" are invalid IP addresses.\n\nGiven a string s containing only digits, return all possible valid IP addresses that can be formed by inserting dots into s. You are not allowed to reorder or remove any digits in s. You may return the valid IP addresses in any order.\n\nExample 1:\n\nInput: s = \"25525511135\"\nOutput: [\"255.255.11.135\",\"255.255.111.35\"]\n\nExample 2:\n\nInput: s = \"0000\"\nOutput: [\"0.0.0.0\"]\n\nExample 3:\n\nInput: s = \"101023\"\nOutput: [\"1.0.10.23\",\"1.0.102.3\",\"10.1.0.23\",\"10.10.2.3\",\"101.0.2.3\"]\n\nConstraints:\n\n- 1 <= s.length <= 20\n- s consists of digits only.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(s='101023'), ['1.0.10.23', '1.0.102.3', '10.1.0.23', '10.10.2.3', '101.0.2.3'])\n assert answers_match(candidate(s='1111'), ['1.1.1.1'])\n assert answers_match(candidate(s='9876543210'), [])\n assert answers_match(candidate(s='00000000000000000000'), [])\n assert answers_match(candidate(s='222333444'), ['22.233.34.44', '222.33.34.44'])\n assert answers_match(candidate(s='0000'), ['0.0.0.0'])\n assert answers_match(candidate(s='25525511135'), ['255.255.11.135', '255.255.111.35'])\n assert answers_match(candidate(s='256256256256'), [])\n assert answers_match(candidate(s='010010'), ['0.10.0.10', '0.100.1.0'])\n assert answers_match(candidate(s='99999999999999999999'), [])\n assert answers_match(candidate(s='11111111111111111111'), [])\n assert answers_match(candidate(s='19216811'), ['1.92.168.11', '19.2.168.11', '19.21.68.11', '19.216.8.11', '19.216.81.1', '192.1.68.11', '192.16.8.11', '192.16.81.1', '192.168.1.1'])\n assert answers_match(candidate(s='255025502550'), [])\n assert answers_match(candidate(s='22222222'), ['2.2.222.222', '2.22.22.222', '2.22.222.22', '2.222.2.222', '2.222.22.22', '2.222.222.2', '22.2.22.222', '22.2.222.22', '22.22.2.222', '22.22.22.22', '22.22.222.2', '22.222.2.22', '22.222.22.2', '222.2.2.222', '222.2.22.22', '222.2.222.2', '222.22.2.22', '222.22.22.2', '222.222.2.2'])\n assert answers_match(candidate(s='1'), [])\n assert answers_match(candidate(s='123123123123'), ['123.123.123.123'])\n assert answers_match(candidate(s='19216801'), ['19.216.80.1', '192.16.80.1', '192.168.0.1'])\n assert answers_match(candidate(s='22222222222222222222'), [])\n assert answers_match(candidate(s='123456789'), ['123.45.67.89'])\n assert answers_match(candidate(s='100100100'), ['10.0.100.100', '100.10.0.100', '100.100.10.0'])\n assert answers_match(candidate(s='001001001001001'), [])\n assert answers_match(candidate(s='0100100'), ['0.10.0.100', '0.100.10.0'])\n assert answers_match(candidate(s='0001000100010001'), [])\n assert answers_match(candidate(s='1100110011001100'), [])\n assert answers_match(candidate(s='19216811001'), [])\n assert answers_match(candidate(s='999999999'), [])\n assert answers_match(candidate(s='1111111'), ['1.1.11.111', '1.1.111.11', '1.11.1.111', '1.11.11.11', '1.11.111.1', '1.111.1.11', '1.111.11.1', '11.1.1.111', '11.1.11.11', '11.1.111.1', '11.11.1.11', '11.11.11.1', '11.111.1.1', '111.1.1.11', '111.1.11.1', '111.11.1.1'])\n assert answers_match(candidate(s='2552552550'), ['255.255.25.50', '255.255.255.0'])\n assert answers_match(candidate(s='255000255000255'), [])\n assert answers_match(candidate(s='255255255000'), [])\n assert answers_match(candidate(s='0000000000'), [])\n assert answers_match(candidate(s='0000000000000000'), [])\n assert answers_match(candidate(s='222222222222222222'), [])\n assert answers_match(candidate(s='10000000000000000000'), [])\n assert answers_match(candidate(s='1230456789'), [])\n assert answers_match(candidate(s='01001001001001'), [])\n assert answers_match(candidate(s='1111222233334444'), [])\n assert answers_match(candidate(s='000256'), [])\n assert answers_match(candidate(s='255255255100'), ['255.255.255.100'])\n assert answers_match(candidate(s='123456789012'), [])\n assert answers_match(candidate(s='01020304'), [])\n assert answers_match(candidate(s='3333333333'), [])\n assert answers_match(candidate(s='100100'), ['1.0.0.100', '10.0.10.0', '100.1.0.0'])\n assert answers_match(candidate(s='012345678910'), [])\n assert answers_match(candidate(s='12345678901234567'), [])\n assert answers_match(candidate(s='02552552550'), [])\n assert answers_match(candidate(s='111111111111'), ['111.111.111.111'])\n assert answers_match(candidate(s='192168111111001'), [])\n assert answers_match(candidate(s='00000001'), [])\n assert answers_match(candidate(s='1230123012301230'), [])\n assert answers_match(candidate(s='100100100100100'), [])\n assert answers_match(candidate(s='999999999999999999'), [])\n assert answers_match(candidate(s='000255255000'), [])\n assert answers_match(candidate(s='0000100100100'), [])\n assert answers_match(candidate(s='2550255255255255'), [])\n assert answers_match(candidate(s='1001001001'), ['100.100.100.1'])\n assert answers_match(candidate(s='1111111111111111'), [])\n assert answers_match(candidate(s='1234567890123'), [])\n assert answers_match(candidate(s='192168011001001'), [])\n assert answers_match(candidate(s='12345678901234567890'), [])\n assert answers_match(candidate(s='1921681111001'), [])\n assert answers_match(candidate(s='222222222222'), ['222.222.222.222'])\n assert answers_match(candidate(s='000000000000'), [])\n assert answers_match(candidate(s='1921680101'), ['19.216.80.101', '192.16.80.101', '192.168.0.101'])\n assert answers_match(candidate(s='99999999'), ['99.99.99.99'])\n assert answers_match(candidate(s='00000'), [])\n assert answers_match(candidate(s='102030405'), [])\n assert answers_match(candidate(s='1001001001001001'), [])\n assert answers_match(candidate(s='0102030405'), [])\n assert answers_match(candidate(s='111222333'), ['1.112.223.33', '11.12.223.33', '11.122.23.33', '11.122.233.3', '111.2.223.33', '111.22.23.33', '111.22.233.3', '111.222.3.33', '111.222.33.3'])\n assert answers_match(candidate(s='0000111122223333'), [])\n assert answers_match(candidate(s='255255255255'), ['255.255.255.255'])\n assert answers_match(candidate(s='1921681001'), ['192.168.100.1'])\n assert answers_match(candidate(s='192168111001'), [])\n assert answers_match(candidate(s='1000000000000000'), [])\n assert answers_match(candidate(s='255025502550255'), [])\n assert answers_match(candidate(s='19216811111001'), [])\n assert answers_match(candidate(s='19216811111'), ['192.168.11.111', '192.168.111.11'])\n assert answers_match(candidate(s='1234567890123456'), [])\n assert answers_match(candidate(s='255000255000'), [])\n assert answers_match(candidate(s='0123456789'), [])\n assert answers_match(candidate(s='1234567890123456789'), [])\n assert answers_match(candidate(s='00000000'), [])\n assert answers_match(candidate(s='11111'), ['1.1.1.11', '1.1.11.1', '1.11.1.1', '11.1.1.1'])\n assert answers_match(candidate(s='255000000'), [])\n assert answers_match(candidate(s='192168001001'), [])\n assert answers_match(candidate(s='255255111350'), [])\n assert answers_match(candidate(s='00010001000100010001'), [])\n assert answers_match(candidate(s='123456789012345678'), [])\n assert answers_match(candidate(s='0000255255255'), [])\n assert answers_match(candidate(s='9999999999'), [])\n assert answers_match(candidate(s='255255255255255'), [])\n assert answers_match(candidate(s='01001001001001001001'), [])\n assert answers_match(candidate(s='255000255000255000'), [])\n assert answers_match(candidate(s='2222222222'), ['2.222.222.222', '22.22.222.222', '22.222.22.222', '22.222.222.22', '222.2.222.222', '222.22.22.222', '222.22.222.22', '222.222.2.222', '222.222.22.22', '222.222.222.2'])\n assert answers_match(candidate(s='2552551000'), ['255.255.100.0'])\n assert answers_match(candidate(s='2552550000'), [])\n assert answers_match(candidate(s='2550255025502550'), [])\n assert answers_match(candidate(s='123123123123123123'), [])\n assert answers_match(candidate(s='192168001'), [])\n assert answers_match(candidate(s='12345678901234'), [])\n assert answers_match(candidate(s='010010010010'), [])\n assert answers_match(candidate(s='123456789012345'), [])\n assert answers_match(candidate(s='1234567890'), [])\n assert answers_match(candidate(s='0255025502550255'), [])\n assert answers_match(candidate(s='9216811135'), ['92.168.11.135', '92.168.111.35'])\n assert answers_match(candidate(s='001001001'), [])\n assert answers_match(candidate(s='00112233445566778899'), [])\n assert answers_match(candidate(s='11101110111011101110'), [])\n assert answers_match(candidate(s='2222222222222222'), [])\n assert answers_match(candidate(s='100100100100'), ['100.100.100.100'])\n assert answers_match(candidate(s='19216801100101'), [])\n assert answers_match(candidate(s='123456'), ['1.2.34.56', '1.23.4.56', '1.23.45.6', '1.234.5.6', '12.3.4.56', '12.3.45.6', '12.34.5.6', '123.4.5.6'])\n assert answers_match(candidate(s='11111111'), ['1.1.111.111', '1.11.11.111', '1.11.111.11', '1.111.1.111', '1.111.11.11', '1.111.111.1', '11.1.11.111', '11.1.111.11', '11.11.1.111', '11.11.11.11', '11.11.111.1', '11.111.1.11', '11.111.11.1', '111.1.1.111', '111.1.11.11', '111.1.111.1', '111.11.1.11', '111.11.11.1', '111.111.1.1'])\n assert answers_match(candidate(s='19216801001'), [])\n assert answers_match(candidate(s='999999999999'), [])\n assert answers_match(candidate(s='22222222222222222220'), [])\n assert answers_match(candidate(s='10000000000000000001'), [])\n assert answers_match(candidate(s='192168100'), ['1.92.168.100', '19.2.168.100', '19.21.68.100', '19.216.8.100', '192.1.68.100', '192.16.8.100', '192.168.10.0'])\n assert answers_match(candidate(s='200200200200'), ['200.200.200.200'])\n assert answers_match(candidate(s='25525511135111'), [])\n assert answers_match(candidate(s='110110110110110'), [])\n assert answers_match(candidate(s='333333333333'), [])\n assert answers_match(candidate(s='025525511135'), [])\n assert answers_match(candidate(s='001001001001001001'), [])\n", "comparison": "unordered"}, "public_tests": ["\"25525511135\"", "\"0000\"", "\"101023\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().restoreIpAddresses", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:38:56+00:00", "tests_total": 143, "tests_dropped": 18, "flags": ["any_order"], "topic_tags": ["string", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def restore_ip_addresses(s)", "container": null, "callable": "restore_ip_addresses", "parameters": [{"name": "s", "type": "String"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 96, "task_id": "unique-binary-search-trees", "difficulty": "Medium", "problem_description": "Given an integer n, return the number of structurally unique BST's (binary search trees) which has exactly n nodes of unique values from 1 to n.\n\nExample 1:\n\nInput: n = 3\nOutput: 5\n\nExample 2:\n\nInput: n = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= n <= 19\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == 5\n assert candidate(n = 4) == 14\n assert candidate(n = 19) == 1767263190\n assert candidate(n = 1) == 1\n assert candidate(n = 10) == 16796\n assert candidate(n = 5) == 42\n assert candidate(n = 8) == 1430\n assert candidate(n = 15) == 9694845\n assert candidate(n = 12) == 208012\n assert candidate(n = 18) == 477638700\n assert candidate(n = 9) == 4862\n assert candidate(n = 6) == 132\n assert candidate(n = 2) == 2\n assert candidate(n = 7) == 429\n", "comparison": "exact"}, "public_tests": ["3", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().numTrees", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:00+00:00", "tests_total": 14, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["math", "dynamic-programming", "tree", "binary-search-tree", "binary-tree"]}, "language": "ruby", "interface": {"raw_signature": "def num_trees(n)", "container": null, "callable": "num_trees", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 97, "task_id": "interleaving-string", "difficulty": "Medium", "problem_description": "Given strings s1, s2, and s3, find whether s3 is formed by an interleaving of s1 and s2.\n\nAn interleaving of two strings s and t is a configuration where s and t are divided into n and m substrings respectively, such that:\n\n- s = s_1 + s_2 + ... + s_n\n- t = t_1 + t_2 + ... + t_m\n- |n - m| <= 1\n- The interleaving is s_1 + t_1 + s_2 + t_2 + s_3 + t_3 + ... or t_1 + s_1 + t_2 + s_2 + t_3 + s_3 + ...\n\nNote: a + b is the concatenation of strings a and b.\n\nExample 1:\n\nInput: s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbcbcac\"\nOutput: true\nExplanation: One way to obtain s3 is:\nSplit s1 into s1 = \"aa\" + \"bc\" + \"c\", and s2 into s2 = \"dbbc\" + \"a\".\nInterleaving the two splits, we get \"aa\" + \"dbbc\" + \"bc\" + \"a\" + \"c\" = \"aadbbcbcac\".\nSince s3 can be obtained by interleaving s1 and s2, we return true.\n\nExample 2:\n\nInput: s1 = \"aabcc\", s2 = \"dbbca\", s3 = \"aadbbbaccc\"\nOutput: false\nExplanation: Notice how it is impossible to interleave s2 with any other string to obtain s3.\n\nExample 3:\n\nInput: s1 = \"\", s2 = \"\", s3 = \"\"\nOutput: true\n\nConstraints:\n\n- 0 <= s1.length, s2.length <= 100\n- 0 <= s3.length <= 200\n- s1, s2, and s3 consist of lowercase English letters.\n\nFollow up: Could you solve it using only O(s2.length) additional memory space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s1 = \"abc\",s2 = \"abc\",s3 = \"aabbcc\") == True\n assert candidate(s1 = \"\",s2 = \"a\",s3 = \"a\") == True\n assert candidate(s1 = \"\",s2 = \"b\",s3 = \"b\") == True\n assert candidate(s1 = \"a\",s2 = \"\",s3 = \"a\") == True\n assert candidate(s1 = \"abc\",s2 = \"\",s3 = \"abc\") == True\n assert candidate(s1 = \"aab\",s2 = \"dbbc\",s3 = \"aadbbcbc\") == False\n assert candidate(s1 = \"aabcc\",s2 = \"dbbca\",s3 = \"aadbbbaccc\") == False\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"defabc\") == True\n assert candidate(s1 = \"a\",s2 = \"a\",s3 = \"aa\") == True\n assert candidate(s1 = \"aaaa\",s2 = \"bbbb\",s3 = \"abababab\") == True\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"abcdef\") == True\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"abcfde\") == False\n assert candidate(s1 = \"\",s2 = \"abc\",s3 = \"abc\") == True\n assert candidate(s1 = \"a\",s2 = \"b\",s3 = \"ba\") == True\n assert candidate(s1 = \"a\",s2 = \"a\",s3 = \"ab\") == False\n assert candidate(s1 = \"aabcc\",s2 = \"dbbca\",s3 = \"aadbbcbcac\") == True\n assert candidate(s1 = \"ab\",s2 = \"cd\",s3 = \"abcd\") == True\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"adbcef\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"aaddbbccceedeff\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"aabbccddeeff\") == True\n assert candidate(s1 = \"a\",s2 = \"b\",s3 = \"ab\") == True\n assert candidate(s1 = \"\",s2 = \"def\",s3 = \"def\") == True\n assert candidate(s1 = \"\",s2 = \"\",s3 = \"\") == True\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"cabdef\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"aadddbbbeeffcc\") == False\n assert candidate(s1 = \"\",s2 = \"abcdef\",s3 = \"abcdef\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"klmnopqrstu\",s3 = \"ackbgdenfphiojqmrstnu\") == False\n assert candidate(s1 = \"abc\",s2 = \"defghijkl\",s3 = \"adbecfghijkl\") == True\n assert candidate(s1 = \"aaa\",s2 = \"bb\",s3 = \"aaabb\") == True\n assert candidate(s1 = \"xy\",s2 = \"xxyy\",s3 = \"xxxyyy\") == True\n assert candidate(s1 = \"abcde\",s2 = \"xyz\",s3 = \"axbyczde\") == True\n assert candidate(s1 = \"abcdef\",s2 = \"ghijkl\",s3 = \"aghbciidfjkel\") == False\n assert candidate(s1 = \"abcdefgh\",s2 = \"hgfedcba\",s3 = \"ahbgcfeddaehbgcfecba\") == False\n assert candidate(s1 = \"abcd\",s2 = \"efgh\",s3 = \"aebfcgdh\") == True\n assert candidate(s1 = \"aaa\",s2 = \"bbb\",s3 = \"ababab\") == True\n assert candidate(s1 = \"mississippi\",s2 = \"pwwkew\",s3 = \"mpiswimppwisikew\") == False\n assert candidate(s1 = \"abcd\",s2 = \"efgh\",s3 = \"aebcfdgh\") == True\n assert candidate(s1 = \"aaa\",s2 = \"bbb\",s3 = \"aababbab\") == False\n assert candidate(s1 = \"a\",s2 = \"ababababab\",s3 = \"abababababa\") == True\n assert candidate(s1 = \"abcabc\",s2 = \"defdef\",s3 = \"abcdefabcdef\") == True\n assert candidate(s1 = \"zzzz\",s2 = \"zzzz\",s3 = \"zzzzzzzz\") == True\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",s2 = \"zyxwvutsrqponmlkjihgfedcba\",s3 = \"azbycxdwevfugthvisjrkqlpmqonnpmojniklhgfeidchbegaf\") == False\n assert candidate(s1 = \"aaabbb\",s2 = \"aaabbb\",s3 = \"aaabbaabbb\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"klmnopqrst\",s3 = \"akblcfdmengoqhpristj\") == False\n assert candidate(s1 = \"abcabcabc\",s2 = \"bcdbcd\",s3 = \"abcbcadbcabc\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"klmnopqrst\",s3 = \"akblcmfdgnheijopqrst\") == False\n assert candidate(s1 = \"aabb\",s2 = \"ccdd\",s3 = \"accbbd\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"klm\",s3 = \"akbclmdefghij\") == True\n assert candidate(s1 = \"abcdefg\",s2 = \"hijklmn\",s3 = \"haijbckldemfnfg\") == False\n assert candidate(s1 = \"aabb\",s2 = \"bbcc\",s3 = \"aabbccbb\") == True\n assert candidate(s1 = \"aabbaa\",s2 = \"bbccbb\",s3 = \"aabbabbbccba\") == False\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"gghhiijjkkllmm\",s3 = \"agbhchdijejfkflglhlimkmjmmnnoopp\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"aaddbbeeffcc\") == True\n assert candidate(s1 = \"abcde\",s2 = \"fghij\",s3 = \"afbgchidiej\") == False\n assert candidate(s1 = \"xxxx\",s2 = \"yyyy\",s3 = \"xxyxyyxxyy\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"klmnopqrst\",s3 = \"akbldmconepfqgrhtisj\") == False\n assert candidate(s1 = \"\",s2 = \"abcd\",s3 = \"abcd\") == True\n assert candidate(s1 = \"abcd\",s2 = \"\",s3 = \"abcd\") == True\n assert candidate(s1 = \"abcde\",s2 = \"fghij\",s3 = \"afbgchdije\") == True\n assert candidate(s1 = \"aab\",s2 = \"bc\",s3 = \"aabbcc\") == False\n assert candidate(s1 = \"xyz\",s2 = \"uvw\",s3 = \"xuzyvw\") == False\n assert candidate(s1 = \"aabb\",s2 = \"ccdd\",s3 = \"accdbdb\") == False\n assert candidate(s1 = \"abc\",s2 = \"abc\",s3 = \"aabbbc\") == False\n assert candidate(s1 = \"abcd\",s2 = \"efgh\",s3 = \"aebfcdgh\") == True\n assert candidate(s1 = \"aaaaaa\",s2 = \"bbbbbb\",s3 = \"abababababab\") == True\n assert candidate(s1 = \"aabb\",s2 = \"ccdd\",s3 = \"acbdcbad\") == False\n assert candidate(s1 = \"xyz\",s2 = \"abc\",s3 = \"xyzabc\") == True\n assert candidate(s1 = \"aaa\",s2 = \"bbb\",s3 = \"aaabbb\") == True\n assert candidate(s1 = \"abcdefg\",s2 = \"hijklmn\",s3 = \"ahbicdjekflgmn\") == True\n assert candidate(s1 = \"abc\",s2 = \"defg\",s3 = \"adbcefeg\") == False\n assert candidate(s1 = \"zzz\",s2 = \"zzz\",s3 = \"zzzzzzz\") == False\n assert candidate(s1 = \"\",s2 = \"aabbccddeeff\",s3 = \"aabbccddeeff\") == True\n assert candidate(s1 = \"abcabcabc\",s2 = \"abcabcabc\",s3 = \"aabbaabbaabbaabcabc\") == False\n assert candidate(s1 = \"\",s2 = \"abcde\",s3 = \"abcde\") == True\n assert candidate(s1 = \"abcd\",s2 = \"aabb\",s3 = \"aabaabdc\") == False\n assert candidate(s1 = \"ababab\",s2 = \"bababa\",s3 = \"babababababa\") == True\n assert candidate(s1 = \"abc\",s2 = \"\",s3 = \"acb\") == False\n assert candidate(s1 = \"abcdefgh\",s2 = \"ijklmnop\",s3 = \"aicfbjdhekgmlonp\") == False\n assert candidate(s1 = \"abcd\",s2 = \"ef\",s3 = \"aebcfed\") == False\n assert candidate(s1 = \"abcdef\",s2 = \"ghijkl\",s3 = \"agbhicjkldfe\") == False\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"zzzxxx\",s3 = \"azzbzxcxzddeeff\") == False\n assert candidate(s1 = \"abcdexyz\",s2 = \"mnopqr\",s3 = \"ambonpdqcrxezy\") == False\n assert candidate(s1 = \"abcabc\",s2 = \"xyzxyz\",s3 = \"axbyczaxbycz\") == True\n assert candidate(s1 = \"aab\",s2 = \"dbb\",s3 = \"aadbb\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"addbeeffcc\") == False\n assert candidate(s1 = \"abcd\",s2 = \"abdc\",s3 = \"aabbbdcc\") == False\n assert candidate(s1 = \"\",s2 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",s3 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == True\n assert candidate(s1 = \"abcd\",s2 = \"efgh\",s3 = \"abcdghfe\") == False\n assert candidate(s1 = \"aab\",s2 = \"cdd\",s3 = \"aadbb\") == False\n assert candidate(s1 = \"abababab\",s2 = \"babababa\",s3 = \"abbabababaabab\") == False\n assert candidate(s1 = \"abacabadabacaba\",s2 = \"cdcdcdc\",s3 = \"acbacabaacbadabacaba\") == False\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"abcdefg\") == False\n assert candidate(s1 = \"\",s2 = \"z\",s3 = \"z\") == True\n assert candidate(s1 = \"ab\",s2 = \"cd\",s3 = \"cabd\") == True\n assert candidate(s1 = \"abcdef\",s2 = \"\",s3 = \"abcdef\") == True\n assert candidate(s1 = \"aaabbb\",s2 = \"ccdddd\",s3 = \"aaacbbbddddd\") == False\n assert candidate(s1 = \"xxyy\",s2 = \"aabb\",s3 = \"xaayybb\") == False\n assert candidate(s1 = \"ab\",s2 = \"cd\",s3 = \"cadb\") == True\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"abdecf\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"adabdbcecefef\") == False\n assert candidate(s1 = \"aa\",s2 = \"aa\",s3 = \"aaaa\") == True\n assert candidate(s1 = \"abc\",s2 = \"abc\",s3 = \"abacbc\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"klmnopqrst\",s3 = \"akblcmndfoegphiqjrst\") == False\n assert candidate(s1 = \"abcde\",s2 = \"fghij\",s3 = \"afbgchdeij\") == True\n assert candidate(s1 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",s2 = \"\",s3 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == True\n assert candidate(s1 = \"zzzz\",s2 = \"zzz\",s3 = \"zzzzzzz\") == True\n assert candidate(s1 = \"abcd\",s2 = \"efgh\",s3 = \"abcdefghe\") == False\n assert candidate(s1 = \"abc\",s2 = \"abcd\",s3 = \"abcabcd\") == True\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"\",s3 = \"aabbccddeeff\") == True\n assert candidate(s1 = \"abcdefghijk\",s2 = \"lmnopqrstuvwxyz\",s3 = \"abcdefghijklmnoqrstuvwxyz\") == False\n assert candidate(s1 = \"abc\",s2 = \"abc\",s3 = \"abccba\") == False\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"dabcef\") == True\n assert candidate(s1 = \"abcde\",s2 = \"\",s3 = \"abcde\") == True\n assert candidate(s1 = \"abcdef\",s2 = \"ghijkl\",s3 = \"aghbidejfkfl\") == False\n assert candidate(s1 = \"z\",s2 = \"\",s3 = \"z\") == True\n assert candidate(s1 = \"zxy\",s2 = \"xzy\",s3 = \"zxzyxy\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"klmnopqrst\",s3 = \"akblcmnodpefqgrstihj\") == False\n assert candidate(s1 = \"aab\",s2 = \"acc\",s3 = \"aaabcac\") == False\n assert candidate(s1 = \"aabbaabbaabb\",s2 = \"bbccbbccbbcc\",s3 = \"aabbaabbccbaabbccbaabbccbb\") == False\n assert candidate(s1 = \"xxxx\",s2 = \"yyyy\",s3 = \"xyxxyxyyxyyx\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"ddeeff\",s3 = \"aadbbccddeeff\") == False\n assert candidate(s1 = \"ababab\",s2 = \"bababa\",s3 = \"abababababab\") == True\n assert candidate(s1 = \"aabb\",s2 = \"ccdd\",s3 = \"acabcd\") == False\n assert candidate(s1 = \"aabb\",s2 = \"ccdd\",s3 = \"acbdad\") == False\n assert candidate(s1 = \"aaaaa\",s2 = \"bbbbb\",s3 = \"ababababab\") == True\n assert candidate(s1 = \"abcabcabc\",s2 = \"xyzxyzxyz\",s3 = \"axbyczaxbyczaxbycz\") == True\n assert candidate(s1 = \"aabcc\",s2 = \"dbbca\",s3 = \"aadbbcbcacd\") == False\n assert candidate(s1 = \"aabb\",s2 = \"ccdd\",s3 = \"acabcdbd\") == True\n assert candidate(s1 = \"abc\",s2 = \"def\",s3 = \"dabecf\") == True\n assert candidate(s1 = \"abcde\",s2 = \"fghij\",s3 = \"abcdefghij\") == True\n assert candidate(s1 = \"abcabcabc\",s2 = \"xyzxyzxyz\",s3 = \"axbxcyzaybzcyzabc\") == False\n", "comparison": "exact"}, "public_tests": ["\"aabcc\"\n\"dbbca\"\n\"aadbbcbcac\"", "\"aabcc\"\n\"dbbca\"\n\"aadbbbaccc\"", "\"\"\n\"\"\n\"\""], "hints": [], "metadata": {"canonical_parameter_names": ["s1", "s2", "s3"], "leetcode_dataset_entry_point": "Solution().isInterleave", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:03+00:00", "tests_total": 132, "tests_dropped": 1, "flags": ["has_images"], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def is_interleave(s1, s2, s3)", "container": null, "callable": "is_interleave", "parameters": [{"name": "s1", "type": "String"}, {"name": "s2", "type": "String"}, {"name": "s3", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 115, "task_id": "distinct-subsequences", "difficulty": "Hard", "problem_description": "Given two strings s and t, return the number of distinct subsequences of s which equals t.\n\nThe test cases are generated so that the answer fits on a 32-bit signed integer.\n\nExample 1:\n\nInput: s = \"rabbbit\", t = \"rabbit\"\nOutput: 3\nExplanation:\nAs shown below, there are 3 ways you can generate \"rabbit\" from s.\nrabbbit\nrabbbit\nrabbbit\n\nExample 2:\n\nInput: s = \"babgbag\", t = \"bag\"\nOutput: 5\nExplanation:\nAs shown below, there are 5 ways you can generate \"bag\" from s.\nbabgbag\nbabgbag\nbabgbag\nbabgbag\nbabgbag\n\nConstraints:\n\n- 1 <= s.length, t.length <= 1000\n- s and t consist of English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abc\",t = \"abcd\") == 0\n assert candidate(s = \"abcd\",t = \"abcd\") == 1\n assert candidate(s = \"rabbbit\",t = \"rabbit\") == 3\n assert candidate(s = \"aaa\",t = \"a\") == 3\n assert candidate(s = \"mississippi\",t = \"isip\") == 16\n assert candidate(s = \"aaaaa\",t = \"aa\") == 10\n assert candidate(s = \"abcde\",t = \"ae\") == 1\n assert candidate(s = \"abcd\",t = \"ab\") == 1\n assert candidate(s = \"a\",t = \"a\") == 1\n assert candidate(s = \"abcdabcabc\",t = \"abc\") == 10\n assert candidate(s = \"babgbag\",t = \"bag\") == 5\n assert candidate(s = \"abc\",t = \"abc\") == 1\n assert candidate(s = \"pppp\",t = \"p\") == 4\n assert candidate(s = \"abab\",t = \"aba\") == 1\n assert candidate(s = \"leetcodeisgood\",t = \"code\") == 1\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"acegikmoqsuwy\") == 1\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzz\",t = \"zzz\") == 1140\n assert candidate(s = \"dynamicprogramming\",t = \"dpm\") == 2\n assert candidate(s = \"ababababab\",t = \"abab\") == 35\n assert candidate(s = \"abcdabcdabcd\",t = \"abcd\") == 15\n assert candidate(s = \"abcdabcdabcdabcd\",t = \"abcd\") == 35\n assert candidate(s = \"zzzzzzzzzz\",t = \"zzzz\") == 210\n assert candidate(s = \"aaaabbbbccccdddd\",t = \"abcd\") == 256\n assert candidate(s = \"abracadabra\",t = \"abrac\") == 1\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefgabcdefg\",t = \"abcdefg\") == 330\n assert candidate(s = \"abcabcabcabcabcabcabcabc\",t = \"abcabc\") == 924\n assert candidate(s = \"ababcabcabc\",t = \"abc\") == 19\n assert candidate(s = \"abcdefghikjlmnopqrstuvwxyz\",t = \"xyz\") == 1\n assert candidate(s = \"abcabcabcabc\",t = \"abc\") == 20\n assert candidate(s = \"abcbabc\",t = \"abc\") == 5\n assert candidate(s = \"xyzxyzxyz\",t = \"xyzyx\") == 1\n assert candidate(s = \"aabbbccc\",t = \"abc\") == 18\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzzzz\") == 64512240\n assert candidate(s = \"xyzxyzxyzxyz\",t = \"xyz\") == 20\n assert candidate(s = \"aabbccddeeffgg\",t = \"aabbcc\") == 1\n assert candidate(s = \"abcdeabcdeabcde\",t = \"abc\") == 10\n assert candidate(s = \"xyzzxyzzxyzzxyzz\",t = \"xyz\") == 40\n assert candidate(s = \"xxyxyxyxyxyxyxyx\",t = \"xyx\") == 112\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"abc\") == 8\n assert candidate(s = \"xyxxyxyxyx\",t = \"xyx\") == 27\n assert candidate(s = \"mississippi\",t = \"issi\") == 15\n assert candidate(s = \"pneumonoultramicroscopicsilicovolcanoconiosis\",t = \"pneumo\") == 23\n assert candidate(s = \"pppppppppppp\",t = \"pppp\") == 495\n assert candidate(s = \"aaaaabaaaaabaabaaabaababab\",t = \"aab\") == 686\n assert candidate(s = \"abcdefg\",t = \"xyz\") == 0\n assert candidate(s = \"rabbbitrabbbitrabbbit\",t = \"rabbit\") == 126\n assert candidate(s = \"leetcodeleetcode\",t = \"leet\") == 12\n assert candidate(s = \"xyzxyzxyzxyz\",t = \"xyzxyz\") == 28\n assert candidate(s = \"abcdefghijk\",t = \"acegi\") == 1\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"abcdefghijklmnopqrstuvwxyz\") == 67108864\n assert candidate(s = \"aabbccddeeffgg\",t = \"abcde\") == 32\n assert candidate(s = \"longerstringexample\",t = \"long\") == 3\n assert candidate(s = \"abracadabra\",t = \"abra\") == 9\n assert candidate(s = \"xxyyzzxxxyyzz\",t = \"xyxz\") == 24\n assert candidate(s = \"pppppppp\",t = \"pp\") == 28\n assert candidate(s = \"attatchmentattach\",t = \"attach\") == 32\n assert candidate(s = \"abcdefghijabcdefghij\",t = \"abcde\") == 6\n assert candidate(s = \"abcdabcdeabcdeabcd\",t = \"abcd\") == 35\n assert candidate(s = \"abcdefghij\",t = \"abcdefghijk\") == 0\n assert candidate(s = \"zzzzzzzzzz\",t = \"zz\") == 45\n assert candidate(s = \"ppppppppp\",t = \"ppp\") == 84\n assert candidate(s = \"abcdefghij\",t = \"j\") == 1\n assert candidate(s = \"abcdabcdabcdabcdabcd\",t = \"abcd\") == 70\n assert candidate(s = \"repeatedsequence\",t = \"seq\") == 1\n assert candidate(s = \"aaaaaaaaaaaaaab\",t = \"aaab\") == 364\n assert candidate(s = \"aabbaabbaabbaabbaabb\",t = \"aabb\") == 415\n assert candidate(s = \"mixedcharacters\",t = \"mix\") == 1\n assert candidate(s = \"abababababab\",t = \"ababab\") == 84\n assert candidate(s = \"abcabcabcabc\",t = \"abcabc\") == 28\n assert candidate(s = \"aaaaaaabbaaaaa\",t = \"aaaaaab\") == 14\n assert candidate(s = \"abcabcabc\",t = \"abc\") == 10\n assert candidate(s = \"abcdabcdabcd\",t = \"abca\") == 5\n assert candidate(s = \"babgbagbabgbagbabgbag\",t = \"bagbag\") == 329\n assert candidate(s = \"anappleperap\",t = \"ape\") == 10\n assert candidate(s = \"zzzzzzzzzz\",t = \"zzz\") == 120\n assert candidate(s = \"aaaaaaaaaa\",t = \"aaaaa\") == 252\n assert candidate(s = \"abcdefghij\",t = \"af\") == 1\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\",t = \"abcabc\") == 3003\n assert candidate(s = \"complexpattern\",t = \"comp\") == 2\n assert candidate(s = \"abcdefghij\",t = \"a\") == 1\n assert candidate(s = \"aabbaabbaabbaabbaabb\",t = \"aab\") == 190\n assert candidate(s = \"abracadabraabracadabra\",t = \"abra\") == 103\n assert candidate(s = \"leetcodeleetcodeleetcode\",t = \"leet\") == 51\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmnoonnpooqqrrssttuuvvwwxxyyzz\",t = \"abcxyz\") == 64\n assert candidate(s = \"abcdefabcdefabcdef\",t = \"abcdef\") == 28\n assert candidate(s = \"abcdefghij\",t = \"acegi\") == 1\n assert candidate(s = \"pppppppppp\",t = \"pp\") == 45\n assert candidate(s = \"hellohellohello\",t = \"hellohello\") == 17\n assert candidate(s = \"abcdefghij\",t = \"aceg\") == 1\n assert candidate(s = \"aabbccddeeffgg\",t = \"abcdefg\") == 128\n assert candidate(s = \"hellohellohello\",t = \"he\") == 6\n assert candidate(s = \"thisisaverylongstringthisisaverylongstring\",t = \"thisisaverylongstring\") == 73\n assert candidate(s = \"subsequenceexample\",t = \"subseq\") == 1\n assert candidate(s = \"abracadabra\",t = \"aca\") == 6\n assert candidate(s = \"abcdeabcde\",t = \"abc\") == 4\n assert candidate(s = \"aaaaabaaaabaaaab\",t = \"aaab\") == 380\n assert candidate(s = \"abcdefghijabcdefghijabcdefghij\",t = \"abcde\") == 21\n", "comparison": "exact"}, "public_tests": ["\"rabbbit\"\n\"rabbit\"", "\"babgbag\"\n\"bag\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().numDistinct", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:43+00:00", "tests_total": 101, "tests_dropped": 4, "flags": ["figure_reference"], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def num_distinct(s, t)", "container": null, "callable": "num_distinct", "parameters": [{"name": "s", "type": "String"}, {"name": "t", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 118, "task_id": "pascals-triangle", "difficulty": "Easy", "problem_description": "Given an integer numRows, return the first numRows of Pascal's triangle.\n\nIn Pascal's triangle, each number is the sum of the two numbers directly above it as shown:\n\nExample 1:\n\nInput: numRows = 5\nOutput: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]\n\nExample 2:\n\nInput: numRows = 1\nOutput: [[1]]\n\nConstraints:\n\n- 1 <= numRows <= 30\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(numRows = 10) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1]]\n assert candidate(numRows = 3) == [[1], [1, 1], [1, 2, 1]]\n assert candidate(numRows = 1) == [[1]]\n assert candidate(numRows = 5) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]\n assert candidate(numRows = 30) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1], [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1], [1, 17, 136, 680, 2380, 6188, 12376, 19448, 24310, 24310, 19448, 12376, 6188, 2380, 680, 136, 17, 1], [1, 18, 153, 816, 3060, 8568, 18564, 31824, 43758, 48620, 43758, 31824, 18564, 8568, 3060, 816, 153, 18, 1], [1, 19, 171, 969, 3876, 11628, 27132, 50388, 75582, 92378, 92378, 75582, 50388, 27132, 11628, 3876, 969, 171, 19, 1], [1, 20, 190, 1140, 4845, 15504, 38760, 77520, 125970, 167960, 184756, 167960, 125970, 77520, 38760, 15504, 4845, 1140, 190, 20, 1], [1, 21, 210, 1330, 5985, 20349, 54264, 116280, 203490, 293930, 352716, 352716, 293930, 203490, 116280, 54264, 20349, 5985, 1330, 210, 21, 1], [1, 22, 231, 1540, 7315, 26334, 74613, 170544, 319770, 497420, 646646, 705432, 646646, 497420, 319770, 170544, 74613, 26334, 7315, 1540, 231, 22, 1], [1, 23, 253, 1771, 8855, 33649, 100947, 245157, 490314, 817190, 1144066, 1352078, 1352078, 1144066, 817190, 490314, 245157, 100947, 33649, 8855, 1771, 253, 23, 1], [1, 24, 276, 2024, 10626, 42504, 134596, 346104, 735471, 1307504, 1961256, 2496144, 2704156, 2496144, 1961256, 1307504, 735471, 346104, 134596, 42504, 10626, 2024, 276, 24, 1], [1, 25, 300, 2300, 12650, 53130, 177100, 480700, 1081575, 2042975, 3268760, 4457400, 5200300, 5200300, 4457400, 3268760, 2042975, 1081575, 480700, 177100, 53130, 12650, 2300, 300, 25, 1], [1, 26, 325, 2600, 14950, 65780, 230230, 657800, 1562275, 3124550, 5311735, 7726160, 9657700, 10400600, 9657700, 7726160, 5311735, 3124550, 1562275, 657800, 230230, 65780, 14950, 2600, 325, 26, 1], [1, 27, 351, 2925, 17550, 80730, 296010, 888030, 2220075, 4686825, 8436285, 13037895, 17383860, 20058300, 20058300, 17383860, 13037895, 8436285, 4686825, 2220075, 888030, 296010, 80730, 17550, 2925, 351, 27, 1], [1, 28, 378, 3276, 20475, 98280, 376740, 1184040, 3108105, 6906900, 13123110, 21474180, 30421755, 37442160, 40116600, 37442160, 30421755, 21474180, 13123110, 6906900, 3108105, 1184040, 376740, 98280, 20475, 3276, 378, 28, 1], [1, 29, 406, 3654, 23751, 118755, 475020, 1560780, 4292145, 10015005, 20030010, 34597290, 51895935, 67863915, 77558760, 77558760, 67863915, 51895935, 34597290, 20030010, 10015005, 4292145, 1560780, 475020, 118755, 23751, 3654, 406, 29, 1]]\n assert candidate(numRows = 17) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1], [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1]]\n assert candidate(numRows = 2) == [[1], [1, 1]]\n assert candidate(numRows = 16) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1]]\n assert candidate(numRows = 12) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1]]\n assert candidate(numRows = 28) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1], [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1], [1, 17, 136, 680, 2380, 6188, 12376, 19448, 24310, 24310, 19448, 12376, 6188, 2380, 680, 136, 17, 1], [1, 18, 153, 816, 3060, 8568, 18564, 31824, 43758, 48620, 43758, 31824, 18564, 8568, 3060, 816, 153, 18, 1], [1, 19, 171, 969, 3876, 11628, 27132, 50388, 75582, 92378, 92378, 75582, 50388, 27132, 11628, 3876, 969, 171, 19, 1], [1, 20, 190, 1140, 4845, 15504, 38760, 77520, 125970, 167960, 184756, 167960, 125970, 77520, 38760, 15504, 4845, 1140, 190, 20, 1], [1, 21, 210, 1330, 5985, 20349, 54264, 116280, 203490, 293930, 352716, 352716, 293930, 203490, 116280, 54264, 20349, 5985, 1330, 210, 21, 1], [1, 22, 231, 1540, 7315, 26334, 74613, 170544, 319770, 497420, 646646, 705432, 646646, 497420, 319770, 170544, 74613, 26334, 7315, 1540, 231, 22, 1], [1, 23, 253, 1771, 8855, 33649, 100947, 245157, 490314, 817190, 1144066, 1352078, 1352078, 1144066, 817190, 490314, 245157, 100947, 33649, 8855, 1771, 253, 23, 1], [1, 24, 276, 2024, 10626, 42504, 134596, 346104, 735471, 1307504, 1961256, 2496144, 2704156, 2496144, 1961256, 1307504, 735471, 346104, 134596, 42504, 10626, 2024, 276, 24, 1], [1, 25, 300, 2300, 12650, 53130, 177100, 480700, 1081575, 2042975, 3268760, 4457400, 5200300, 5200300, 4457400, 3268760, 2042975, 1081575, 480700, 177100, 53130, 12650, 2300, 300, 25, 1], [1, 26, 325, 2600, 14950, 65780, 230230, 657800, 1562275, 3124550, 5311735, 7726160, 9657700, 10400600, 9657700, 7726160, 5311735, 3124550, 1562275, 657800, 230230, 65780, 14950, 2600, 325, 26, 1], [1, 27, 351, 2925, 17550, 80730, 296010, 888030, 2220075, 4686825, 8436285, 13037895, 17383860, 20058300, 20058300, 17383860, 13037895, 8436285, 4686825, 2220075, 888030, 296010, 80730, 17550, 2925, 351, 27, 1]]\n assert candidate(numRows = 7) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1]]\n assert candidate(numRows = 20) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1], [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1], [1, 17, 136, 680, 2380, 6188, 12376, 19448, 24310, 24310, 19448, 12376, 6188, 2380, 680, 136, 17, 1], [1, 18, 153, 816, 3060, 8568, 18564, 31824, 43758, 48620, 43758, 31824, 18564, 8568, 3060, 816, 153, 18, 1], [1, 19, 171, 969, 3876, 11628, 27132, 50388, 75582, 92378, 92378, 75582, 50388, 27132, 11628, 3876, 969, 171, 19, 1]]\n assert candidate(numRows = 18) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1], [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1], [1, 17, 136, 680, 2380, 6188, 12376, 19448, 24310, 24310, 19448, 12376, 6188, 2380, 680, 136, 17, 1]]\n assert candidate(numRows = 15) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1]]\n assert candidate(numRows = 25) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1], [1, 5, 10, 10, 5, 1], [1, 6, 15, 20, 15, 6, 1], [1, 7, 21, 35, 35, 21, 7, 1], [1, 8, 28, 56, 70, 56, 28, 8, 1], [1, 9, 36, 84, 126, 126, 84, 36, 9, 1], [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1], [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1], [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1], [1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1], [1, 14, 91, 364, 1001, 2002, 3003, 3432, 3003, 2002, 1001, 364, 91, 14, 1], [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1], [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1], [1, 17, 136, 680, 2380, 6188, 12376, 19448, 24310, 24310, 19448, 12376, 6188, 2380, 680, 136, 17, 1], [1, 18, 153, 816, 3060, 8568, 18564, 31824, 43758, 48620, 43758, 31824, 18564, 8568, 3060, 816, 153, 18, 1], [1, 19, 171, 969, 3876, 11628, 27132, 50388, 75582, 92378, 92378, 75582, 50388, 27132, 11628, 3876, 969, 171, 19, 1], [1, 20, 190, 1140, 4845, 15504, 38760, 77520, 125970, 167960, 184756, 167960, 125970, 77520, 38760, 15504, 4845, 1140, 190, 20, 1], [1, 21, 210, 1330, 5985, 20349, 54264, 116280, 203490, 293930, 352716, 352716, 293930, 203490, 116280, 54264, 20349, 5985, 1330, 210, 21, 1], [1, 22, 231, 1540, 7315, 26334, 74613, 170544, 319770, 497420, 646646, 705432, 646646, 497420, 319770, 170544, 74613, 26334, 7315, 1540, 231, 22, 1], [1, 23, 253, 1771, 8855, 33649, 100947, 245157, 490314, 817190, 1144066, 1352078, 1352078, 1144066, 817190, 490314, 245157, 100947, 33649, 8855, 1771, 253, 23, 1], [1, 24, 276, 2024, 10626, 42504, 134596, 346104, 735471, 1307504, 1961256, 2496144, 2704156, 2496144, 1961256, 1307504, 735471, 346104, 134596, 42504, 10626, 2024, 276, 24, 1]]\n assert candidate(numRows = 4) == [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]]\n", "comparison": "exact"}, "public_tests": ["5", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["numRows"], "leetcode_dataset_entry_point": "Solution().generate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:46+00:00", "tests_total": 16, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def generate(num_rows)", "container": null, "callable": "generate", "parameters": [{"name": "num_rows", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 119, "task_id": "pascals-triangle-ii", "difficulty": "Easy", "problem_description": "Given an integer rowIndex, return the rowIndex^th (0-indexed) row of the Pascal's triangle.\n\nIn Pascal's triangle, each number is the sum of the two numbers directly above it as shown:\n\nExample 1:\n\nInput: rowIndex = 3\nOutput: [1,3,3,1]\n\nExample 2:\n\nInput: rowIndex = 0\nOutput: [1]\n\nExample 3:\n\nInput: rowIndex = 1\nOutput: [1,1]\n\nConstraints:\n\n- 0 <= rowIndex <= 33\n\nFollow up: Could you optimize your algorithm to use only O(rowIndex) extra space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(rowIndex = 0) == [1]\n assert candidate(rowIndex = 10) == [1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1]\n assert candidate(rowIndex = 15) == [1, 15, 105, 455, 1365, 3003, 5005, 6435, 6435, 5005, 3003, 1365, 455, 105, 15, 1]\n assert candidate(rowIndex = 1) == [1, 1]\n assert candidate(rowIndex = 3) == [1, 3, 3, 1]\n assert candidate(rowIndex = 20) == [1, 20, 190, 1140, 4845, 15504, 38760, 77520, 125970, 167960, 184756, 167960, 125970, 77520, 38760, 15504, 4845, 1140, 190, 20, 1]\n assert candidate(rowIndex = 5) == [1, 5, 10, 10, 5, 1]\n assert candidate(rowIndex = 33) == [1, 33, 528, 5456, 40920, 237336, 1107568, 4272048, 13884156, 38567100, 92561040, 193536720, 354817320, 573166440, 818809200, 1037158320, 1166803110, 1166803110, 1037158320, 818809200, 573166440, 354817320, 193536720, 92561040, 38567100, 13884156, 4272048, 1107568, 237336, 40920, 5456, 528, 33, 1]\n assert candidate(rowIndex = 11) == [1, 11, 55, 165, 330, 462, 462, 330, 165, 55, 11, 1]\n assert candidate(rowIndex = 7) == [1, 7, 21, 35, 35, 21, 7, 1]\n assert candidate(rowIndex = 8) == [1, 8, 28, 56, 70, 56, 28, 8, 1]\n assert candidate(rowIndex = 30) == [1, 30, 435, 4060, 27405, 142506, 593775, 2035800, 5852925, 14307150, 30045015, 54627300, 86493225, 119759850, 145422675, 155117520, 145422675, 119759850, 86493225, 54627300, 30045015, 14307150, 5852925, 2035800, 593775, 142506, 27405, 4060, 435, 30, 1]\n assert candidate(rowIndex = 25) == [1, 25, 300, 2300, 12650, 53130, 177100, 480700, 1081575, 2042975, 3268760, 4457400, 5200300, 5200300, 4457400, 3268760, 2042975, 1081575, 480700, 177100, 53130, 12650, 2300, 300, 25, 1]\n assert candidate(rowIndex = 16) == [1, 16, 120, 560, 1820, 4368, 8008, 11440, 12870, 11440, 8008, 4368, 1820, 560, 120, 16, 1]\n assert candidate(rowIndex = 29) == [1, 29, 406, 3654, 23751, 118755, 475020, 1560780, 4292145, 10015005, 20030010, 34597290, 51895935, 67863915, 77558760, 77558760, 67863915, 51895935, 34597290, 20030010, 10015005, 4292145, 1560780, 475020, 118755, 23751, 3654, 406, 29, 1]\n assert candidate(rowIndex = 22) == [1, 22, 231, 1540, 7315, 26334, 74613, 170544, 319770, 497420, 646646, 705432, 646646, 497420, 319770, 170544, 74613, 26334, 7315, 1540, 231, 22, 1]\n assert candidate(rowIndex = 12) == [1, 12, 66, 220, 495, 792, 924, 792, 495, 220, 66, 12, 1]\n assert candidate(rowIndex = 28) == [1, 28, 378, 3276, 20475, 98280, 376740, 1184040, 3108105, 6906900, 13123110, 21474180, 30421755, 37442160, 40116600, 37442160, 30421755, 21474180, 13123110, 6906900, 3108105, 1184040, 376740, 98280, 20475, 3276, 378, 28, 1]\n assert candidate(rowIndex = 18) == [1, 18, 153, 816, 3060, 8568, 18564, 31824, 43758, 48620, 43758, 31824, 18564, 8568, 3060, 816, 153, 18, 1]\n assert candidate(rowIndex = 27) == [1, 27, 351, 2925, 17550, 80730, 296010, 888030, 2220075, 4686825, 8436285, 13037895, 17383860, 20058300, 20058300, 17383860, 13037895, 8436285, 4686825, 2220075, 888030, 296010, 80730, 17550, 2925, 351, 27, 1]\n", "comparison": "exact"}, "public_tests": ["3", "0", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["rowIndex"], "leetcode_dataset_entry_point": "Solution().getRow", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:48+00:00", "tests_total": 20, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def get_row(row_index)", "container": null, "callable": "get_row", "parameters": [{"name": "row_index", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 120, "task_id": "triangle", "difficulty": "Medium", "problem_description": "Given a triangle array, return the minimum path sum from top to bottom.\n\nFor each step, you may move to an adjacent number of the row below. More formally, if you are on index i on the current row, you may move to either index i or index i + 1 on the next row.\n\nExample 1:\n\nInput: triangle = [[2],[3,4],[6,5,7],[4,1,8,3]]\nOutput: 11\nExplanation: The triangle looks like:\n 2\n 3 4\n 6 5 7\n4 1 8 3\nThe minimum path sum from top to bottom is 2 + 3 + 5 + 1 = 11 (underlined above).\n\nExample 2:\n\nInput: triangle = [[-10]]\nOutput: -10\n\nConstraints:\n\n- 1 <= triangle.length <= 200\n- triangle[0].length == 1\n- triangle[i].length == triangle[i - 1].length + 1\n- -10^4 <= triangle[i][j] <= 10^4\n\nFollow up: Could you do this using only O(n) extra space, where n is the total number of rows in the triangle?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(triangle = [[-10]]) == -10\n assert candidate(triangle = [[-1], [2, 3], [1, -1, -3], [-2, 1, -1, -2]]) == -3\n assert candidate(triangle = [[0], [1, 2], [3, 4, 5], [6, 7, 8, 9]]) == 10\n assert candidate(triangle = [[-1], [2, -2], [3, -3, 3], [-4, -4, 4, 4]]) == -10\n assert candidate(triangle = [[-1], [2, 3], [1, -1, -3]]) == -1\n assert candidate(triangle = [[2], [3, 4], [6, 5, 7], [4, 1, 8, 3]]) == 11\n assert candidate(triangle = [[0], [1, 0], [1, 1, 1], [1, 2, 3, 4]]) == 3\n assert candidate(triangle = [[0], [-1, -2], [-3, -4, -5]]) == -7\n assert candidate(triangle = [[0], [10000, -10000], [10000, 10000, 10000]]) == 0\n assert candidate(triangle = [[3], [7, 4], [2, 4, 6], [8, 5, 9, 3]]) == 16\n assert candidate(triangle = [[-1], [2, -3], [4, -5, 6], [-7, 8, -9, 10]]) == -18\n assert candidate(triangle = [[1], [2, 3], [4, 5, 6]]) == 7\n assert candidate(triangle = [[1], [2, 3], [4, 5, 6], [7, 8, 9, 10]]) == 14\n assert candidate(triangle = [[10], [20, 30], [40, 50, 60], [70, 80, 90, 100], [110, 120, 130, 140, 150]]) == 250\n assert candidate(triangle = [[5], [9, 6], [4, 6, 8], [4, 2, 6, 5], [8, 4, 9, 6, 1]]) == 23\n assert candidate(triangle = [[-10000], [10000, -10000], [10000, 10000, 10000], [10000, -10000, 10000, -10000], [10000, 10000, 10000, 10000, 10000]]) == -10000\n assert candidate(triangle = [[-1], [0, -2], [0, -1, 0], [-1, 0, -1, 0]]) == -5\n assert candidate(triangle = [[5], [9, 4], [2, 6, 7], [4, 6, 8, 4], [9, 5, 2, 1, 3]]) == 21\n assert candidate(triangle = [[1], [2, 1], [1, 2, 3], [4, 1, 2, 3], [3, 4, 1, 2, 3]]) == 6\n assert candidate(triangle = [[-1], [-2, -3], [-4, -5, -6], [-7, -8, -9, -10], [-11, -12, -13, -14, -15]]) == -35\n assert candidate(triangle = [[-1], [0, -1], [0, 0, -1], [0, 0, 0, -1], [0, 0, 0, 0, -1]]) == -5\n assert candidate(triangle = [[-1], [-1, -2], [-1, -2, -3], [-1, -2, -3, -4], [-1, -2, -3, -4, -5]]) == -15\n assert candidate(triangle = [[1], [-2, 3], [-4, 5, -6], [-7, -8, 9, 10], [-11, 12, -13, 14, -15]]) == -26\n assert candidate(triangle = [[1], [2, 1], [3, 3, 2], [4, 6, 5, 4], [5, 7, 9, 8, 5]]) == 13\n assert candidate(triangle = [[100], [90, 110], [80, 90, 100], [70, 80, 90, 100], [60, 70, 80, 90, 100]]) == 400\n assert candidate(triangle = [[1], [2, 3], [1, 1, 1], [3, 2, 1, 4], [4, 5, 2, 3, 1]]) == 7\n assert candidate(triangle = [[1], [2, 2], [3, 3, 3], [4, 4, 4, 4], [5, 5, 5, 5, 5], [6, 6, 6, 6, 6, 6], [7, 7, 7, 7, 7, 7, 7], [8, 8, 8, 8, 8, 8, 8, 8]]) == 36\n assert candidate(triangle = [[-5], [3, -8], [6, -7, -4], [2, -6, 5, -7], [8, -4, -3, 5, -2]]) == -30\n assert candidate(triangle = [[-7], [10, -3], [-6, 1, -4], [6, -5, 8, -6], [4, 3, -6, 2, -5]]) == -25\n assert candidate(triangle = [[-10000], [10000, -10000], [0, 0, 0], [10000, 10000, -10000, -10000], [10000, -10000, 10000, -10000, 10000]]) == -40000\n assert candidate(triangle = [[-1], [-2, -2], [-3, -3, -3], [-4, -4, -4, -4], [-5, -5, -5, -5, -5], [-6, -6, -6, -6, -6, -6]]) == -21\n assert candidate(triangle = [[5], [4, 4], [3, 3, 3], [2, 2, 2, 2], [1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0]]) == 15\n assert candidate(triangle = [[5], [9, 6], [4, 6, 8], [4, 2, 6, 5], [4, 4, 1, 7, 6]]) == 20\n assert candidate(triangle = [[9999], [9998, 9999], [9997, 9998, 9999], [9996, 9997, 9998, 9999]]) == 39990\n assert candidate(triangle = [[0], [0, 0], [0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 0\n assert candidate(triangle = [[7], [3, 8], [8, 1, 0], [2, 7, 4, 4], [4, 5, 2, 6, 5]]) == 17\n assert candidate(triangle = [[1], [2, 3], [4, 5, 6], [7, 8, 9, 10], [11, 12, 13, 14, 15]]) == 25\n assert candidate(triangle = [[-9999], [-9998, -9999], [-9997, -9998, -9999], [-9996, -9997, -9998, -9999]]) == -39996\n assert candidate(triangle = [[-1], [0, -1], [-1, 0, -1], [-1, -1, 0, -1]]) == -4\n assert candidate(triangle = [[-100], [100, -200], [300, -400, 500], [-600, 700, -800, 900], [1000, -1100, 1200, -1300, 1400]]) == -2800\n assert candidate(triangle = [[5], [3, 4], [1, 6, 5], [9, 4, 3, 8], [8, 9, 6, 4, 5]]) == 19\n assert candidate(triangle = [[-10], [10, -20], [20, 30, -40], [-40, 50, 60, 70], [-70, 80, -90, 100, 110]]) == -100\n assert candidate(triangle = [[1], [9, 2], [8, 7, 3], [6, 5, 4, 9], [5, 7, 8, 4, 6], [1, 5, 6, 7, 2, 3]]) == 16\n assert candidate(triangle = [[-100], [200, -300], [400, -500, 600], [-700, 800, -900, 1000], [-1100, 1200, -1300, 1400, -1500]]) == -3100\n assert candidate(triangle = [[10], [-10, 20], [-20, 30, 40], [-30, 40, 50, 60], [-40, 50, 60, 70, 80]]) == -90\n assert candidate(triangle = [[1], [2, 2], [3, 3, 3], [4, 4, 4, 4], [5, 5, 5, 5, 5], [6, 6, 6, 6, 6, 6]]) == 21\n assert candidate(triangle = [[10], [5, 3], [2, 3, 4], [7, 1, 0, 2], [6, 3, 2, 5, 4]]) == 18\n assert candidate(triangle = [[-1], [3, -2], [1, -4, 7], [-8, 2, 3, -1], [1, -1, 2, -2, 3]]) == -6\n assert candidate(triangle = [[-1000], [-500, 2500], [-200, 1000, -750], [-1000, 500, -250, 1000], [-750, 1250, -375, 625, -1000]]) == -3450\n assert candidate(triangle = [[-1], [2, 3], [-4, 5, 6], [7, -8, 9, 10], [-11, 12, -13, 14, 15], [16, -17, 18, -19, 20, 21]]) == -43\n assert candidate(triangle = [[10], [9, 11], [7, 15, 12], [4, 8, 10, 13], [6, 7, 12, 7, 8]]) == 36\n assert candidate(triangle = [[1], [2, 2], [3, 3, 3], [4, 4, 4, 4], [5, 5, 5, 5, 5]]) == 15\n assert candidate(triangle = [[-1000], [-500, 500], [-250, 0, 250], [-125, -50, 50, 125], [-62, -25, 0, 25, 62]]) == -1937\n assert candidate(triangle = [[0], [1, -1], [2, -2, 2], [-3, 3, -3, 3], [4, -4, 4, -4, 4]]) == -10\n assert candidate(triangle = [[0], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]) == 4\n assert candidate(triangle = [[-5000], [-4000, 4000], [-3000, -2000, 3000], [-1000, 0, 2000, -3000], [-4000, 1000, -2000, 3000, 4000]]) == -17000\n assert candidate(triangle = [[-100], [100, -200], [300, -400, 500], [1000, -1000, 1000, -1000], [2000, -2000, 2000, -2000, 2000]]) == -3700\n assert candidate(triangle = [[10000], [-10000, 10000], [-10000, -10000, -10000], [-10000, -10000, -10000, -10000]]) == -20000\n assert candidate(triangle = [[5], [7, 8], [2, 3, 4], [4, 9, 6, 1], [7, 8, 4, 5, 9]]) == 23\n assert candidate(triangle = [[9999], [10000, 9999], [10000, 10000, 9999], [10000, 10000, 10000, 9999], [10000, 10000, 10000, 10000, 9999]]) == 49995\n assert candidate(triangle = [[-5], [-2, -3], [-1, -2, -4], [3, 2, -1, -1], [-1, -2, -3, -4, -5]]) == -18\n assert candidate(triangle = [[-10], [100, -200], [300, 400, -500], [-600, 700, -800, 900]]) == -1510\n assert candidate(triangle = [[-10], [20, 30], [-10, -20, -30], [40, 50, 60, 70], [-80, -90, -100, -110, -120]]) == -60\n assert candidate(triangle = [[1], [2, 2], [3, 3, 3], [4, 4, 4, 4], [5, 5, 5, 5, 5], [6, 6, 6, 6, 6, 6], [7, 7, 7, 7, 7, 7, 7], [8, 8, 8, 8, 8, 8, 8, 8], [9, 9, 9, 9, 9, 9, 9, 9, 9]]) == 45\n assert candidate(triangle = [[-10000], [-9000, -9000], [-8000, -8000, -8000], [-7000, -7000, -7000, -7000], [-6000, -6000, -6000, -6000, -6000]]) == -40000\n assert candidate(triangle = [[100], [-50, 100], [-25, 50, -75], [20, -20, 20, -20]]) == 5\n assert candidate(triangle = [[10000], [9999, -9999], [9998, -9998, -9998], [9997, -9997, -9997, -9997]]) == -19994\n assert candidate(triangle = [[10000], [10000, 10000], [10000, 10000, 10000], [10000, 10000, 10000, 10000], [10000, 10000, 10000, 10000, 10000]]) == 50000\n assert candidate(triangle = [[100], [200, 300], [400, 500, 600], [700, 800, 900, 1000], [1100, 1200, 1300, 1400, 1500], [1600, 1700, 1800, 1900, 2000, 2100]]) == 4100\n assert candidate(triangle = [[5], [3, 8], [6, 7, 4], [2, 6, 5, 7], [8, 4, 3, 5, 2]]) == 20\n assert candidate(triangle = [[1], [2, 3], [4, 5, 6], [7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20, 21]]) == 41\n assert candidate(triangle = [[1], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]]) == 7\n assert candidate(triangle = [[1], [1, 9999], [9999, 9999, 9999], [9999, 9999, 9999, 9999], [9999, 9999, 9999, 9999, 9999]]) == 29999\n assert candidate(triangle = [[-100], [-50, 20], [-15, -25, 30], [-5, -10, 15, 20], [10, 20, 30, -40, -50]]) == -200\n assert candidate(triangle = [[-5], [10, -4], [-6, 1, -5], [7, -8, 9, -2], [4, 3, -7, 2, -6], [1, 5, 6, 7, 2, -3]]) == -25\n assert candidate(triangle = [[0], [1, 1], [1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == 5\n assert candidate(triangle = [[-10000], [10000, -9999], [9998, -9997, 9996], [9995, -9994, 9993, -9992], [9991, -9990, 9989, -9988, 9987]]) == -49980\n assert candidate(triangle = [[-10000], [10000, -10000], [10000, -10000, 10000], [-10000, 10000, -10000, 10000]]) == -40000\n assert candidate(triangle = [[100], [101, 102], [103, 104, 105], [106, 107, 108, 109], [110, 111, 112, 113, 114]]) == 520\n assert candidate(triangle = [[-1], [0, -2], [1, 2, -3], [0, -1, 2, 3], [-1, 0, 2, -2, 3]]) == -6\n assert candidate(triangle = [[-100], [-200, -300], [-400, -500, -600], [-700, -800, -900, -1000]]) == -2000\n assert candidate(triangle = [[10000], [-10000, 10000], [-10000, -10000, 10000], [10000, 10000, -10000, 10000]]) == -20000\n assert candidate(triangle = [[100], [-200, 300], [-400, 500, 600], [-700, 800, -900, 1000], [-1100, 1200, 1300, 1400, 1500]]) == -2300\n assert candidate(triangle = [[-1000], [1000, -1000], [500, -500, 500], [250, -250, 250, -250]]) == -2750\n assert candidate(triangle = [[-5], [-4, -6], [-3, -6, -9], [-2, -6, -9, -12], [-1, -6, -9, -12, -15]]) == -47\n assert candidate(triangle = [[-100], [-200, 150], [-50, -100, -150], [200, 300, 400, 500]]) == -150\n assert candidate(triangle = [[-1], [2, 3], [-4, -5, -6], [-7, 8, -9, 10], [-11, -12, 13, -14, 15]]) == -27\n", "comparison": "exact"}, "public_tests": ["[[2],[3,4],[6,5,7],[4,1,8,3]]", "[[-10]]"], "hints": [], "metadata": {"canonical_parameter_names": ["triangle"], "leetcode_dataset_entry_point": "Solution().minimumTotal", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:50+00:00", "tests_total": 92, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def minimum_total(triangle)", "container": null, "callable": "minimum_total", "parameters": [{"name": "triangle", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 121, "task_id": "best-time-to-buy-and-sell-stock", "difficulty": "Easy", "problem_description": "You are given an array prices where prices[i] is the price of a given stock on the i^th day.\n\nYou want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.\n\nReturn the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.\n\nExample 1:\n\nInput: prices = [7,1,5,3,6,4]\nOutput: 5\nExplanation: Buy on day 2 (price = 1) and sell on day 5 (price = 6), profit = 6-1 = 5.\nNote that buying on day 2 and selling on day 1 is not allowed because you must buy before you sell.\n\nExample 2:\n\nInput: prices = [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transactions are done and the max profit = 0.\n\nConstraints:\n\n- 1 <= prices.length <= 10^5\n- 0 <= prices[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(prices = [10, 9, 8, 2]) == 0\n assert candidate(prices = [1]) == 0\n assert candidate(prices = [2, 1, 2, 1, 0, 1, 2]) == 2\n assert candidate(prices = [2, 1]) == 0\n assert candidate(prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 4\n assert candidate(prices = [7, 1, 5, 3, 6, 4]) == 5\n assert candidate(prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(prices = [1, 2]) == 1\n assert candidate(prices = [8, 9, 7, 9, 8, 7, 9, 10, 7, 9, 8, 10, 11, 10, 12]) == 5\n assert candidate(prices = [1, 2, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6]) == 5\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 1, 2, 3, 8, 2, 10]) == 9\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [8, 6, 7, 3, 3, 5, 1, 0, 6, 5]) == 6\n assert candidate(prices = [1, 5, 3, 8, 12, 10, 9, 15, 18, 5, 7]) == 17\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 1, 5, 3, 7, 10, 4, 8, 12, 6, 14, 2, 18, 9, 20, 1, 22, 10, 24, 5, 26, 11, 28, 12, 30, 13, 32, 14, 34, 15, 36, 16, 38, 17, 40]) == 40\n assert candidate(prices = [8, 3, 6, 2, 8, 8, 8, 4, 2, 0, 9, 5, 7, 6, 2]) == 9\n assert candidate(prices = [4, 1, 2, 3, 5, 6, 1, 2, 3, 1, 5, 6, 7, 8, 1, 2, 3, 1]) == 7\n assert candidate(prices = [897, 456, 680, 509, 535, 695, 890, 456, 509, 535, 695, 890, 456, 509, 535, 695]) == 434\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(prices = [100, 180, 260, 40, 310, 535, 695, 10, 1]) == 655\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(prices = [100, 90, 80, 50, 20, 10]) == 0\n assert candidate(prices = [1, 2, 3, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7, 5, 6, 7, 8]) == 7\n assert candidate(prices = [3, 2, 6, 5, 0, 3]) == 4\n assert candidate(prices = [100, 180, 260, 40, 310, 535, 695]) == 655\n assert candidate(prices = [1, 9, 2, 8, 3, 7, 4, 6, 5, 10]) == 9\n assert candidate(prices = [1, 9, 6, 9, 1, 7, 1, 1, 5, 9, 9, 9, 8, 9, 8, 9, 10, 9, 8, 9, 10]) == 9\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 8\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(prices = [8, 6, 4, 6, 8, 9, 3, 4, 5, 1]) == 5\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 10, 2, 8, 15]) == 14\n assert candidate(prices = [5, 2, 3, 4, 1, 6, 8, 7, 8, 9]) == 8\n assert candidate(prices = [100, 180, 260, 310, 40, 535, 695]) == 655\n assert candidate(prices = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 9\n assert candidate(prices = [10, 10, 10, 5, 5, 5, 10, 10, 15, 15]) == 10\n assert candidate(prices = [8, 5, 12, 9, 19, 1, 7, 17, 3, 18]) == 17\n assert candidate(prices = [30, 15, 50, 10, 60, 35, 100, 40, 90, 50, 120, 60, 130, 70, 140, 80, 150, 90]) == 140\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [50, 20, 30, 10, 50, 20, 30, 10, 50, 20, 30, 10, 50, 20, 30, 10, 50, 20, 30, 10, 50]) == 40\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 1\n assert candidate(prices = [8, 4, 6, 2, 3, 10, 14, 11, 13]) == 12\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 0\n assert candidate(prices = [1, 5, 3, 7, 10, 4, 8, 12, 6, 14, 2, 18, 9, 20, 1, 22, 10, 24, 5, 26, 11, 28, 12, 30, 13, 32, 14, 34, 15, 36]) == 35\n assert candidate(prices = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 8, 9, 2, 1, 5, 6, 3, 10]) == 9\n assert candidate(prices = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 10\n assert candidate(prices = [1, 3, 2, 5, 7, 11, 8, 12, 14, 15]) == 14\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3]) == 2\n assert candidate(prices = [10, 1, 1, 6, 9, 1, 2, 1, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [1, 5, 3, 8, 12, 7, 9, 2, 3, 15, 10]) == 14\n assert candidate(prices = [8, 6, 7, 8, 4, 9, 1, 9, 4, 5]) == 8\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [1, 2, 1, 3, 1, 2, 3, 1, 2, 3, 4]) == 3\n assert candidate(prices = [5, 2, 3, 0, 3, 1, 6, 2, 8, 3, 4]) == 8\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 10, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == 9\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [1, 5, 3, 6, 7, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [10, 1, 1, 1, 10, 1, 1, 1, 10, 1, 1, 1, 10, 1, 1, 1]) == 9\n assert candidate(prices = [1, 9, 1, 9, 1, 9, 1, 9, 1, 9]) == 8\n assert candidate(prices = [100, 200, 300, 100, 150, 200, 250, 100, 150, 200, 250, 300, 100, 150, 200, 250]) == 200\n assert candidate(prices = [1, 3, 2, 8, 4, 9, 3, 5, 2, 10, 1, 3, 7, 2, 4, 9, 1, 6, 3, 5]) == 9\n assert candidate(prices = [1, 9, 18, 2, 7, 21, 12, 17, 6, 19]) == 20\n assert candidate(prices = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1]) == 2\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(prices = [5, 11, 3, 50, 60, 90, 70, 80, 65, 30, 55, 95]) == 92\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [8, 6, 4, 3, 3, 5, 10, 0, 6, 2, 9, 10, 4, 7, 1]) == 10\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5]) == 5\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [2, 2, 5, 11, 1, 3, 4, 11, 1, 2, 11, 3, 4]) == 10\n assert candidate(prices = [1, 7, 2, 9, 4, 6, 3, 8, 5, 10]) == 9\n assert candidate(prices = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(prices = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 1\n assert candidate(prices = [10, 22, 5, 75, 65, 80]) == 75\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9]) == 9\n assert candidate(prices = [1, 9, 6, 9, 2, 8, 7, 1, 9, 4, 9, 2, 3, 8, 1, 6, 5, 8, 1, 1, 5]) == 8\n assert candidate(prices = [5, 3, 6, 7, 2, 8, 1, 4, 9, 10, 1, 11]) == 10\n assert candidate(prices = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(prices = [1, 2, 3, 2, 4, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(prices = [1, 9, 6, 9, 1, 7, 1, 1, 5, 9, 9, 9, 8]) == 8\n assert candidate(prices = [1, 9, 6, 9, 1, 7, 1, 1, 5, 9, 9, 9]) == 8\n assert candidate(prices = [5, 2, 6, 1, 9, 12, 9, 12, 12, 1, 5, 3, 3, 5, 2, 8, 10, 9, 1, 2]) == 11\n assert candidate(prices = [1, 3, 2, 8, 4, 9, 3, 5, 10, 6, 2, 3, 1, 5, 20, 3, 1, 2, 3, 10]) == 19\n assert candidate(prices = [10, 7, 5, 8, 11, 9]) == 6\n assert candidate(prices = [1, 5, 3, 7, 10, 4, 8, 12, 6, 14, 2, 18, 9, 20, 1, 22, 10, 24, 5, 26, 11, 28, 12, 30, 13, 32]) == 31\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 4\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 9\n assert candidate(prices = [1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100]) == 99\n assert candidate(prices = [1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]) == 3\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [5, 9, 1, 6, 2, 8, 3, 7, 4, 10]) == 9\n assert candidate(prices = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(prices = [10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1]) == 9\n assert candidate(prices = [310, 310, 275, 275, 260, 260, 260, 230, 230, 230]) == 0\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 8\n assert candidate(prices = [1, 3, 2, 4, 7, 5, 8, 11, 9, 13]) == 12\n", "comparison": "exact"}, "public_tests": ["[7,1,5,3,6,4]", "[7,6,4,3,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:52+00:00", "tests_total": 99, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_profit(prices)", "container": null, "callable": "max_profit", "parameters": [{"name": "prices", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 122, "task_id": "best-time-to-buy-and-sell-stock-ii", "difficulty": "Medium", "problem_description": "You are given an integer array prices where prices[i] is the price of a given stock on the i^th day.\n\nOn each day, you may decide to buy and/or sell the stock. You can only hold at most one share of the stock at any time. However, you can sell and buy the stock multiple times on the same day, ensuring you never hold more than one share of the stock.\n\nFind and return the maximum profit you can achieve.\n\nExample 1:\n\nInput: prices = [7,1,5,3,6,4]\nOutput: 7\nExplanation: Buy on day 2 (price = 1) and sell on day 3 (price = 5), profit = 5-1 = 4.\nThen buy on day 4 (price = 3) and sell on day 5 (price = 6), profit = 6-3 = 3.\nTotal profit is 4 + 3 = 7.\n\nExample 2:\n\nInput: prices = [1,2,3,4,5]\nOutput: 4\nExplanation: Buy on day 1 (price = 1) and sell on day 5 (price = 5), profit = 5-1 = 4.\nTotal profit is 4.\n\nExample 3:\n\nInput: prices = [7,6,4,3,1]\nOutput: 0\nExplanation: There is no way to make a positive profit, so we never buy the stock to achieve the maximum profit of 0.\n\nConstraints:\n\n- 1 <= prices.length <= 3 * 10^4\n- 0 <= prices[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [1, 2, 2, 3, 4, 4, 5]) == 4\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1]) == 3\n assert candidate(prices = [6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [1, 9, 6, 9, 1, 7, 1, 1, 5, 9, 9, 9]) == 25\n assert candidate(prices = [1, 2, 2, 3, 0, 4]) == 6\n assert candidate(prices = [1, 2]) == 1\n assert candidate(prices = [1]) == 0\n assert candidate(prices = [1, 3, 2, 8, 4, 9]) == 13\n assert candidate(prices = [7, 1, 5, 3, 6, 4]) == 7\n assert candidate(prices = [3, 2, 6, 5, 0, 3]) == 7\n assert candidate(prices = [1, 2, 2, 3, 4, 5]) == 4\n assert candidate(prices = [10, 9, 8, 2]) == 0\n assert candidate(prices = [1, 100]) == 99\n assert candidate(prices = [1, 9, 6, 9, 1, 7, 1, 1, 5, 9, 9, 9, 8, 9]) == 26\n assert candidate(prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 4, 5, 6]) == 7\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 8\n assert candidate(prices = [1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 2, 8, 3, 10, 2, 5, 8, 12]) == 30\n assert candidate(prices = [1, 2, 3, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10]) == 16\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [30, 28, 25, 22, 20, 18, 15, 13, 10, 8, 5, 3, 1, 0, 2, 4, 6, 8]) == 8\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 12\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]) == 15\n assert candidate(prices = [2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15]) == 26\n assert candidate(prices = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(prices = [100, 101, 102, 98, 97, 96, 100, 105, 110, 108, 107, 109, 112, 115, 118, 120, 119, 117, 116, 115, 114, 113, 112, 111, 110, 109]) == 29\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 19\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 10, 8, 12, 15, 10, 18, 14, 20, 25, 22, 27, 30]) == 47\n assert candidate(prices = [5, 2, 4, 9, 8, 10, 3, 2, 6, 4, 8]) == 17\n assert candidate(prices = [8, 6, 4, 6, 8, 7, 4, 12, 14, 13, 11, 10, 8, 6, 4, 2, 0]) == 14\n assert candidate(prices = [1, 5, 3, 8, 12, 4, 7, 15, 10, 18, 14, 20, 25, 22, 27, 30]) == 51\n assert candidate(prices = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]) == 48\n assert candidate(prices = [5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 8\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [5, 3, 2, 6, 7, 8, 4, 5, 6, 1, 2, 3]) == 10\n assert candidate(prices = [5, 2, 3, 7, 6, 1, 8, 4, 9]) == 17\n assert candidate(prices = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [10, 7, 5, 8, 11, 9]) == 6\n assert candidate(prices = [8, 6, 4, 2, 0, 2, 4, 6, 8, 10, 12, 14, 16]) == 16\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 0, 0, 1, 8]) == 11\n assert candidate(prices = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2]) == 10\n assert candidate(prices = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80]) == 0\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 10\n assert candidate(prices = [1, 3, 2, 5, 7, 8, 9, 10, 12, 11, 13, 15, 14, 16, 17]) == 19\n assert candidate(prices = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9]) == 8\n assert candidate(prices = [10, 9, 8, 2, 3, 6, 8, 5, 8, 10]) == 11\n assert candidate(prices = [5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8]) == 8\n assert candidate(prices = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [5, 3, 5, 10, 4, 8, 2, 6, 7, 2, 3, 1, 5, 9, 10, 3, 2, 1, 5, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 44\n assert candidate(prices = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [10, 7, 5, 8, 11, 9, 12, 10, 14, 13, 15]) == 15\n assert candidate(prices = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14]) == 26\n assert candidate(prices = [1, 2, 3, 2, 4, 5, 3, 6, 7, 5, 8, 9, 7, 10, 11, 9]) == 17\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 1\n assert candidate(prices = [7, 1, 3, 4, 6, 2, 5, 7, 8, 1, 9, 11, 13, 10]) == 23\n assert candidate(prices = [2, 1, 2, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 26\n assert candidate(prices = [1, 5, 1, 3, 1, 5, 1, 3, 1, 5]) == 16\n assert candidate(prices = [1, 2, 2, 3, 0, 1, 2, 1, 2, 3]) == 6\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 4, 5, 2, 3, 0, 4, 2, 3]) == 15\n assert candidate(prices = [1, 3, 2, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 10, 15, 11, 16, 12, 17, 13, 18, 14, 19, 15, 20]) == 68\n assert candidate(prices = [10, 9, 10, 8, 11, 7, 12, 6, 13, 5, 14, 4, 15, 3, 16, 2, 17, 1]) == 64\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 23\n assert candidate(prices = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 28\n assert candidate(prices = [8, 6, 4, 3, 3, 5, 7, 9, 10, 8, 11, 13, 12, 15, 17]) == 17\n assert candidate(prices = [1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15]) == 27\n assert candidate(prices = [1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6]) == 5\n assert candidate(prices = [1, 2, 2, 2, 3, 4, 4, 5, 5, 5, 6, 7, 8, 8, 8, 9, 10, 10, 11, 12]) == 11\n assert candidate(prices = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80]) == 0\n assert candidate(prices = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == 9\n assert candidate(prices = [1, 2, 2, 3, 4, 5, 6, 5, 6, 7, 8, 9, 10, 11, 12, 13, 12, 14, 15]) == 16\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [10, 7, 15, 8, 12, 9, 20, 18, 25, 17]) == 30\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30]) == 30\n assert candidate(prices = [7, 2, 5, 3, 10, 1, 3, 8, 1, 9, 2, 6]) == 29\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]) == 12\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10]) == 18\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 10, 8, 6, 8, 12, 10, 8, 10, 14, 12, 10, 12, 16, 14, 12, 14, 18, 16, 14, 16]) == 39\n assert candidate(prices = [1, 5, 3, 8, 12, 10, 14, 18, 22, 20, 25, 28, 26, 30, 32, 31, 35, 38]) == 46\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 5, 8, 2, 9, 1, 5, 7, 3, 8]) == 29\n assert candidate(prices = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == 9\n assert candidate(prices = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 14\n assert candidate(prices = [8, 12, 4, 6, 10, 3, 12, 7, 9, 8]) == 21\n assert candidate(prices = [1, 3, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == 13\n assert candidate(prices = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 0\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 9\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2]) == 5\n assert candidate(prices = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15]) == 26\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 8\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(prices = [10, 9, 8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 17\n assert candidate(prices = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 15\n assert candidate(prices = [10, 5, 10, 20, 10, 15, 10, 25, 15, 30, 20, 35, 25, 40, 30]) == 80\n assert candidate(prices = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 101]) == 1\n assert candidate(prices = [5, 3, 6, 7, 4, 3, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 21\n assert candidate(prices = [1, 3, 2, 8, 4, 9, 5, 10, 6, 11, 7, 12, 8, 13, 9, 14, 10, 15, 11, 16]) == 48\n assert candidate(prices = [2, 2, 5, 0, 1, 5, 0, 3, 1, 2, 5]) == 15\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50]) == 50\n assert candidate(prices = [10, 7, 5, 8, 11, 9]) == 6\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 8\n assert candidate(prices = [1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10, 12, 14, 13, 15]) == 18\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 10\n assert candidate(prices = [1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100]) == 990\n assert candidate(prices = [1, 2, 2, 6, 3, 5, 4, 8, 7, 9, 10, 11, 10, 12, 13, 14, 15, 16]) == 21\n assert candidate(prices = [1, 2, 3, 2, 1, 4, 5, 4, 3, 2, 1, 6, 7, 6, 5, 4, 3, 2, 1]) == 12\n assert candidate(prices = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 4\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 20, 15, 16, 14, 22, 25, 30, 35, 40]) == 46\n assert candidate(prices = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 23\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(prices = [1, 5, 3, 9, 7, 8, 4, 10, 1, 12, 11, 13]) == 30\n assert candidate(prices = [5, 3, 5, 2, 8, 4, 9, 10, 1, 11, 13, 12, 14, 15, 13, 16, 18, 17, 20, 22]) == 39\n assert candidate(prices = [10, 7, 5, 8, 11, 9, 12, 15, 13, 17, 20, 18]) == 19\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [10, 1, 10, 1, 10, 1, 10, 1, 10, 1]) == 36\n assert candidate(prices = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16]) == 23\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 14\n", "comparison": "exact"}, "public_tests": ["[7,1,5,3,6,4]", "[1,2,3,4,5]", "[7,6,4,3,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:55+00:00", "tests_total": 125, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def max_profit(prices)", "container": null, "callable": "max_profit", "parameters": [{"name": "prices", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 123, "task_id": "best-time-to-buy-and-sell-stock-iii", "difficulty": "Hard", "problem_description": "You are given an array prices where prices[i] is the price of a given stock on the i^th day.\n\nFind the maximum profit you can achieve. You may complete at most two transactions.\n\nNote: You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).\n\nExample 1:\n\nInput: prices = [3,3,5,0,0,3,1,4]\nOutput: 6\nExplanation: Buy on day 4 (price = 0) and sell on day 6 (price = 3), profit = 3-0 = 3.\nThen buy on day 7 (price = 1) and sell on day 8 (price = 4), profit = 4-1 = 3.\n\nExample 2:\n\nInput: prices = [1,2,3,4,5]\nOutput: 4\nExplanation: Buy on day 1 (price = 1) and sell on day 5 (price = 5), profit = 5-1 = 4.\nNote that you cannot buy on day 1, buy on day 2 and sell them later, as you are engaging multiple transactions at the same time. You must sell before buying again.\n\nExample 3:\n\nInput: prices = [7,6,4,3,1]\nOutput: 0\nExplanation: In this case, no transaction is done, i.e. max profit = 0.\n\nConstraints:\n\n- 1 <= prices.length <= 10^5\n- 0 <= prices[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(prices = [1, 5, 1, 5, 1, 5, 1, 5]) == 8\n assert candidate(prices = [2, 1, 4, 5, 2, 9, 7]) == 11\n assert candidate(prices = [10, 22, 5, 75, 65, 80]) == 87\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [3, 2, 6, 5, 0, 3]) == 7\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [1, 4, 2, 8, 2, 6, 7, 8, 2, 4, 5, 2, 1]) == 13\n assert candidate(prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(prices = [1, 3, 2, 8, 4, 9]) == 12\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 6\n assert candidate(prices = [1, 2]) == 1\n assert candidate(prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(prices = [3, 3, 3, 3, 3]) == 0\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 13\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 1, 2, 3, 4]) == 7\n assert candidate(prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 10\n assert candidate(prices = [10, 22, 5, 75, 65, 80, 120, 130, 110, 140, 150, 160]) == 175\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 13\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 7, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 10\n assert candidate(prices = [7, 6, 4, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]) == 6\n assert candidate(prices = [1, 3, 5, 4, 3, 6, 7, 8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 18\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 100\n assert candidate(prices = [10, 1, 9, 1, 8, 1, 7, 1, 6, 1, 5, 1, 4, 1, 3, 1, 2, 1]) == 15\n assert candidate(prices = [5, 11, 3, 50, 60, 90, 30, 80, 100, 50, 80, 120]) == 177\n assert candidate(prices = [1, 2, 3, 4, 5, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 14\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 19\n assert candidate(prices = [31, 41, 48, 54, 37, 76, 56, 99, 1, 180]) == 247\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 24\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 2, 10]) == 12\n assert candidate(prices = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 18\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 2, 8, 10, 4]) == 13\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 18\n assert candidate(prices = [1, 100, 2, 98, 3, 96, 4, 94, 5, 92, 6, 90, 7, 88, 8, 86, 9, 84, 10, 82]) == 195\n assert candidate(prices = [10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1]) == 18\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(prices = [2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 2\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 6, 8, 2, 5]) == 11\n assert candidate(prices = [100, 180, 260, 40, 310, 535, 695]) == 815\n assert candidate(prices = [90, 80, 70, 60, 50, 40, 30, 20, 10, 0]) == 0\n assert candidate(prices = [8, 6, 4, 3, 3, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 5\n assert candidate(prices = [5, 2, 10, 1, 3, 12, 6, 9, 1, 15]) == 25\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 2, 8, 10, 5, 6, 7, 3, 10, 4, 5, 6, 1, 10]) == 18\n assert candidate(prices = [5, 2, 4, 0, 0, 3, 5, 7, 8, 2, 8]) == 14\n assert candidate(prices = [1, 4, 3, 0, 5, 8, 3, 1, 5, 6, 4, 10, 2, 5, 12, 8, 9, 1, 10]) == 21\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 10, 8, 6, 2, 9, 5, 7, 1, 10]) == 19\n assert candidate(prices = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10, 3, 5, 7, 9, 11]) == 17\n assert candidate(prices = [100, 180, 260, 310, 40, 535, 695]) == 865\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9, 1, 2, 1, 3, 5, 7]) == 17\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 1, 4, 6, 8, 2, 5, 7, 8, 1]) == 14\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 10, 12, 15, 14, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 17\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 13\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 14]) == 22\n assert candidate(prices = [8, 12, 15, 7, 3, 18, 20, 15]) == 24\n assert candidate(prices = [100, 180, 260, 310, 40, 535, 695, 10, 5, 11, 3, 8, 10, 5, 11, 3, 8, 10, 5, 11]) == 865\n assert candidate(prices = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(prices = [5, 2, 3, 0, 3, 2, 5, 4, 1, 6, 7, 8, 1, 10]) == 17\n assert candidate(prices = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [5, 0, 3, 12, 6, 9, 21, 18, 13, 8, 12, 3, 20, 15, 18]) == 38\n assert candidate(prices = [90, 80, 70, 60, 50, 40, 30]) == 0\n assert candidate(prices = [10, 7, 5, 8, 11, 9, 1, 15]) == 20\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 11\n assert candidate(prices = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 18\n assert candidate(prices = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(prices = [100, 180, 260, 310, 40, 535, 695, 10, 20, 30, 100, 150]) == 865\n assert candidate(prices = [12, 14, 17, 10, 14, 13, 12, 15]) == 10\n assert candidate(prices = [3, 1, 4, 8, 7, 2, 5, 1, 3, 5, 2, 9]) == 15\n assert candidate(prices = [1, 2, 3, 2, 1, 4, 5, 4, 6, 7, 8, 9, 10, 8, 12, 15]) == 16\n assert candidate(prices = [100, 30, 15, 10, 8, 25, 80]) == 72\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 14, 13, 12, 11, 10]) == 18\n assert candidate(prices = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 0\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 2, 5, 7, 3]) == 9\n assert candidate(prices = [1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21, 1, 23, 1, 25, 1, 27]) == 50\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 1, 4, 7, 8, 10, 11, 12, 10, 13, 14, 15, 16, 17, 18, 19]) == 23\n assert candidate(prices = [30, 50, 10, 60, 40, 90, 55]) == 100\n assert candidate(prices = [8, 6, 4, 3, 3, 5, 8, 6, 4, 3, 3, 5, 8, 6, 4, 3, 3, 5, 8, 6, 4, 3, 3, 5]) == 10\n assert candidate(prices = [5, 1, 7, 8, 3, 6, 1, 2, 9, 10, 4, 5, 11, 12, 6, 7, 13, 14, 8, 9]) == 20\n assert candidate(prices = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 135\n assert candidate(prices = [1, 2, 3, 1, 4, 5, 2, 7, 8, 1, 9, 10, 1, 11, 12, 1, 13, 14]) == 24\n assert candidate(prices = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 38\n assert candidate(prices = [10, 22, 5, 75, 65, 80, 10, 90, 50, 20, 120, 15, 8, 90]) == 197\n assert candidate(prices = [7, 6, 5, 8, 3, 8, 2, 6, 5, 7, 3, 8, 5, 6, 8, 9, 1, 2, 4, 5, 6]) == 12\n assert candidate(prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 10\n assert candidate(prices = [1, 7, 4, 3, 8, 8, 6, 4, 10, 9, 3]) == 13\n assert candidate(prices = [90, 80, 70, 60, 50, 40, 30, 20, 10]) == 0\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 1, 2, 5, 1, 3, 7]) == 11\n assert candidate(prices = [10, 22, 5, 75, 65, 80]) == 87\n assert candidate(prices = [3, 8, 4, 0, 5, 6, 2, 9, 8, 1, 10]) == 18\n assert candidate(prices = [1, 3, 2, 8, 4, 9, 3, 5, 7, 1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22]) == 29\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9]) == 17\n assert candidate(prices = [31, 41, 48, 54, 37, 44, 66, 59, 56, 78, 100]) == 86\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 10, 15, 20, 5, 25, 30, 5, 35, 40]) == 65\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4, 2, 5, 1, 4, 7, 1, 10]) == 16\n assert candidate(prices = [5, 3, 10, 1, 7, 8, 2, 9, 4]) == 15\n assert candidate(prices = [100, 30, 15, 10, 8, 25, 80, 50, 150, 40, 60, 70, 90, 120, 130, 50, 20, 100, 140, 150]) == 272\n assert candidate(prices = [1, 2, 3, 4, 5, 0, 100, 101, 102, 103]) == 107\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 1, 4, 7, 8, 10, 9, 11, 12, 8, 10, 5, 7, 3, 4, 2, 1, 5, 6, 8, 9, 10, 1]) == 21\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 2\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 190\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 8, 3, 8, 2, 6]) == 11\n assert candidate(prices = [50, 10, 5, 3, 8, 20, 30, 25, 20, 15, 10, 5, 10, 15, 20, 25, 30, 35, 40, 45]) == 67\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 14\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 21\n assert candidate(prices = [1, 2, 3, 10, 1, 2, 3, 10, 1, 2, 3, 10, 1, 2, 3, 10, 1, 2, 3, 10]) == 18\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 8, 2, 9, 10, 15, 20, 2, 18, 25]) == 42\n assert candidate(prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 13\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 20\n assert candidate(prices = [80, 70, 60, 50, 40, 30, 20, 10]) == 0\n assert candidate(prices = [100, 180, 260, 40, 310, 535, 695]) == 815\n assert candidate(prices = [5, 3, 10, 1, 4, 9, 2, 8, 0, 7, 3, 6, 1, 5, 2, 4]) == 15\n", "comparison": "exact"}, "public_tests": ["[3,3,5,0,0,3,1,4]", "[1,2,3,4,5]", "[7,6,4,3,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:39:57+00:00", "tests_total": 117, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_profit(prices)", "container": null, "callable": "max_profit", "parameters": [{"name": "prices", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 127, "task_id": "word-ladder", "difficulty": "Hard", "problem_description": "A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s_1 -> s_2 -> ... -> s_k such that:\n\n- Every adjacent pair of words differs by a single letter.\n- Every s_i for 1 <= i <= k is in wordList. Note that beginWord does not need to be in wordList.\n- s_k == endWord\n\nGiven two words, beginWord and endWord, and a dictionary wordList, return the number of words in the shortest transformation sequence from beginWord to endWord, or 0 if no such sequence exists.\n\nExample 1:\n\nInput: beginWord = \"hit\", endWord = \"cog\", wordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]\nOutput: 5\nExplanation: One shortest transformation sequence is \"hit\" -> \"hot\" -> \"dot\" -> \"dog\" -> cog\", which is 5 words long.\n\nExample 2:\n\nInput: beginWord = \"hit\", endWord = \"cog\", wordList = [\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]\nOutput: 0\nExplanation: The endWord \"cog\" is not in wordList, therefore there is no valid transformation sequence.\n\nConstraints:\n\n- 1 <= beginWord.length <= 10\n- endWord.length == beginWord.length\n- 1 <= wordList.length <= 5000\n- wordList[i].length == beginWord.length\n- beginWord, endWord, and wordList[i] consist of lowercase English letters.\n- beginWord != endWord\n- All the words in wordList are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(beginWord = \"leet\",endWord = \"code\",wordList = ['lest', 'leet', 'lose', 'code', 'lode', 'robe', 'home', 'dote', 'cake']) == 0\n assert candidate(beginWord = \"talk\",endWord = \"tell\",wordList = ['talk', 'tell', 'tall', 'toll', 'toll']) == 3\n assert candidate(beginWord = \"talk\",endWord = \"walk\",wordList = ['talk', 'walk', 'tall', 'tale', 'tali', 'wali', 'wali', 'wale', 'wall', 'walk']) == 2\n assert candidate(beginWord = \"leet\",endWord = \"code\",wordList = ['lest', 'leet', 'lose', 'code', 'lode', 'robe', 'lost']) == 6\n assert candidate(beginWord = \"red\",endWord = \"tax\",wordList = ['ted', 'tex', 'red', 'tax', 'tad', 'den', 'rex', 'pee']) == 4\n assert candidate(beginWord = \"cat\",endWord = \"dog\",wordList = ['bat', 'rat', 'hat', 'hot', 'dot', 'dog']) == 5\n assert candidate(beginWord = \"hit\",endWord = \"cog\",wordList = ['hot', 'dot', 'dog', 'lot', 'log']) == 0\n assert candidate(beginWord = \"hit\",endWord = \"cog\",wordList = ['hot', 'dot', 'dog', 'lot', 'log', 'cog']) == 5\n assert candidate(beginWord = \"abcf\",endWord = \"aefh\",wordList = ['abcf', 'aefg', 'aefh', 'aegh', 'cefh', 'cefh', 'aegh', 'cefg', 'abcf', 'abef']) == 0\n assert candidate(beginWord = \"machine\",endWord = \"natural\",wordList = ['machene', 'machenr', 'machrne', 'machren', 'machenl', 'machenm', 'machene', 'machrne', 'machren', 'machenl', 'machenm', 'machane', 'machrne', 'machren', 'machenl', 'machenm', 'machenl', 'machene', 'machrne', 'machren', 'machenl', 'machenm', 'nachenl', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'nachene', 'nachrne', 'nachren', 'nachenl', 'nachenm', 'natural']) == 0\n assert candidate(beginWord = \"physics\",endWord = \"chemist\",wordList = ['phyiscs', 'phyisic', 'phyisct', 'phyisci', 'phyicsi', 'physics', 'physisi', 'physcii', 'physici', 'phyiscs', 'phyiscs', 'phyiscs', 'phyiscs', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'physcis', 'chemics', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist', 'chemist']) == 0\n", "comparison": "exact"}, "public_tests": ["\"hit\"\n\"cog\"\n[\"hot\",\"dot\",\"dog\",\"lot\",\"log\",\"cog\"]", "\"hit\"\n\"cog\"\n[\"hot\",\"dot\",\"dog\",\"lot\",\"log\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["beginWord", "endWord", "wordList"], "leetcode_dataset_entry_point": "Solution().ladderLength", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:04+00:00", "tests_total": 13, "tests_dropped": 2, "flags": [], "topic_tags": ["hash-table", "string", "breadth-first-search", "bidirectional-search"]}, "language": "ruby", "interface": {"raw_signature": "def ladder_length(begin_word, end_word, word_list)", "container": null, "callable": "ladder_length", "parameters": [{"name": "begin_word", "type": "String"}, {"name": "end_word", "type": "String"}, {"name": "word_list", "type": "String[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 128, "task_id": "longest-consecutive-sequence", "difficulty": "Medium", "problem_description": "Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.\n\nYou must write an algorithm that runs in O(n) time.\n\nExample 1:\n\nInput: nums = [100,4,200,1,3,2]\nOutput: 4\nExplanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4.\n\nExample 2:\n\nInput: nums = [0,3,7,2,5,8,4,6,0,1]\nOutput: 9\n\nExample 3:\n\nInput: nums = [1,0,1,2]\nOutput: 3\n\nConstraints:\n\n- 0 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-1, -2, -3, -4]) == 4\n assert candidate(nums = [10, 5, 12, 3, 9, 7, 8, 11]) == 6\n assert candidate(nums = [1, 9, 3, 10, 4, 20, 2]) == 4\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [10, 5, 12, 3, 14, 7, 16, 20, 18, 11, 9, 8, 13, 6, 4, 19, 15, 17, 2, 1]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [10, 5, 12, 3, 7, 8, 9, 2, 1, 0]) == 4\n assert candidate(nums = [1000000000, -1000000000, 500000000, -500000000]) == 1\n assert candidate(nums = [-1, -2, -3, -4, -5]) == 5\n assert candidate(nums = [0, 0, 0, 0, 0]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [10, 5, 12, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8]) == 12\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 10\n assert candidate(nums = [100, 4, 200, 1, 3, 2]) == 4\n assert candidate(nums = []) == 0\n assert candidate(nums = [0, 3, 7, 2, 5, 8, 4, 6, 0, 1]) == 9\n assert candidate(nums = [5, 4, 3, 2, 1]) == 5\n assert candidate(nums = [1, 2, 0, 1]) == 3\n assert candidate(nums = [1, 0, 1, 2]) == 3\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 10\n assert candidate(nums = [1000000000, -1000000000, 0]) == 1\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5]) == 5\n assert candidate(nums = [5]) == 1\n assert candidate(nums = [-1, 0, 1]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 50\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]) == 11\n assert candidate(nums = [-10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 9\n assert candidate(nums = [500000000, 500000001, 500000002, 500000003, 500000004, 500000005, 500000006, 500000007, 500000008, 500000009]) == 10\n assert candidate(nums = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64]) == 15\n assert candidate(nums = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 11, 20, 12, 19, 13, 18, 14, 17, 15, 16, 21, 30, 22, 29, 23, 28, 24, 27, 25, 26]) == 30\n assert candidate(nums = [100, 200, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 10, 11, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 30, 31, 32]) == 3\n assert candidate(nums = [10, 5, 0, 5, 3, 15, 10, 5, 3, 6, 7, 100, 200, 300, 400, 500, 600, 700, 800, 900]) == 3\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000]) == 1\n assert candidate(nums = [-10, -5, -3, -1, -2, 0, -8, -9, -7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 14\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 19]) == 3\n assert candidate(nums = [100, 200, 300, 400, 500, 101, 102, 103, 104, 105]) == 6\n assert candidate(nums = [5, 1, 3, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 14\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 10\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 30\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]) == 1\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 10\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]) == 1\n assert candidate(nums = [-1000000000, -999999999, -999999998, -999999997, -999999996, -999999995, -999999994, -999999993, -999999992, -999999991]) == 10\n assert candidate(nums = [10, 5, 0, -5, -10, -15, -20, -25, -30]) == 1\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 21\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 101, 102, 103, 104, 105]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 10\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 101, 201, 301, 401, 501, 601, 701, 801, 901, 1001]) == 2\n assert candidate(nums = [10, 15, 1, 3, 2, 8, 7, 4, 12, 14, 11, 6, 9, 5]) == 12\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20]) == 6\n assert candidate(nums = [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009]) == 10\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25]) == 7\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]) == 2\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 1\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 11\n assert candidate(nums = [10, 5, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 10\n assert candidate(nums = [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 31\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 11, 12, 13, 14, 15, 16, 17, 8, 6, 4, 1, 0]) == 19\n assert candidate(nums = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 12\n assert candidate(nums = [100, 200, 300, 400, 500, 101, 201, 301, 401, 501]) == 2\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30]) == 30\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 31\n assert candidate(nums = [5, 3, 8, 1, 2, 7, 4, 6, 9, 0, 11, 12, 13, 14, 15]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 25\n assert candidate(nums = [5, 100, 50, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]) == 11\n assert candidate(nums = [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 100, 101, 102, 103, 104, 200, 201, 202, 203, 204]) == 5\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98]) == 1\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 10\n assert candidate(nums = [-5, -3, -4, -2, -1, 0, 1, 2, 3, 4, 5]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 30\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]) == 1\n assert candidate(nums = [5, 3, 8, 9, 11, 12, 13, 14, 10]) == 7\n assert candidate(nums = [10, 5, 15, 3, 8, 2, 20, 25, 18, 7, 6, 11, 12, 13, 14, 16, 17, 19, 4, 9]) == 19\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 1\n assert candidate(nums = [-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 1\n assert candidate(nums = [5, 3, 1, 2, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 15\n assert candidate(nums = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 31\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 11\n assert candidate(nums = [5, 2, 9, 1, 5, 6, 7, 3, 8, 4, 10, 11, 12, 13, 14]) == 14\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 21\n assert candidate(nums = [42, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53]) == 13\n assert candidate(nums = [5, 3, 8, 6, 2, 7, 4, 1, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 21\n assert candidate(nums = [5, 1, 9, 11, 7, 3, 8, 4, 2, 10, 6, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 5\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 11\n assert candidate(nums = [10, 5, 0, -5, -10, 15, 20, 25, 30, 35, 40]) == 1\n assert candidate(nums = [500000000, 500000001, 500000002, 500000003, 500000004, 500000005, 500000006, 500000007, 500000008, 500000009]) == 10\n assert candidate(nums = [-10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5, 10, 11, 12]) == 9\n assert candidate(nums = [5, 3, 8, 4, 7, 6, 9, 1, 2, 0]) == 10\n assert candidate(nums = [10, 5, 9, 1, 11, 8, 6, 7, 3, 4, 2]) == 11\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 20\n assert candidate(nums = [-1, -2, -3, -4, -5, 0, 1, 2, 3, 4, 5]) == 11\n assert candidate(nums = [10, 5, 9, 1, 11, 5, 7, 8, 2, 12, 3, 6, 4]) == 12\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 10\n assert candidate(nums = [100, 200, 300, 400, 500, 501, 502, 503, 504, 505]) == 6\n assert candidate(nums = [5, 4, 3, 2, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 10\n assert candidate(nums = [10, 5, 9, 1, 11, 13, 8, 2, 4, 6, 7, 3]) == 11\n assert candidate(nums = [-1, -2, -3, 0, 1, 2, 3, 4, 5]) == 9\n assert candidate(nums = [10, 5, 0, 5, 3, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]) == 1\n assert candidate(nums = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980]) == 21\n assert candidate(nums = [-1, -2, -3, -4, 0, 1, 2, 3, 4, 5]) == 10\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 1\n assert candidate(nums = [5, 3, 8, 9, 11, 1, 7, 10, 12, 6, 2, 4]) == 12\n assert candidate(nums = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 20]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]) == 11\n assert candidate(nums = [200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190]) == 11\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1, 3, 5, 2, 4, 6, 8, 7, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 21\n assert candidate(nums = [500000000, 500000001, 500000002, 500000003, 500000004, 500000005, 500000006, 500000007, 500000008, 500000009, 500000010]) == 11\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 24]) == 5\n", "comparison": "exact"}, "public_tests": ["[100,4,200,1,3,2]", "[0,3,7,2,5,8,4,6,0,1]", "[1,0,1,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().longestConsecutive", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:06+00:00", "tests_total": 138, "tests_dropped": 12, "flags": [], "topic_tags": ["array", "hash-table", "union-find"]}, "language": "ruby", "interface": {"raw_signature": "def longest_consecutive(nums)", "container": null, "callable": "longest_consecutive", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 131, "task_id": "palindrome-partitioning", "difficulty": "Medium", "problem_description": "Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s.\n\nExample 1:\n\nInput: s = \"aab\"\nOutput: [[\"a\",\"a\",\"b\"],[\"aa\",\"b\"]]\n\nExample 2:\n\nInput: s = \"a\"\nOutput: [[\"a\"]]\n\nConstraints:\n\n- 1 <= s.length <= 16\n- s contains only lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"madam\") == [['m', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm'], ['madam']]\n assert candidate(s = \"deified\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'd'], ['deified']]\n assert candidate(s = \"repaper\") == [['r', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'pap', 'e', 'r'], ['r', 'epape', 'r'], ['repaper']]\n assert candidate(s = \"aaab\") == [['a', 'a', 'a', 'b'], ['a', 'aa', 'b'], ['aa', 'a', 'b'], ['aaa', 'b']]\n assert candidate(s = \"aabbaa\") == [['a', 'a', 'b', 'b', 'a', 'a'], ['a', 'a', 'b', 'b', 'aa'], ['a', 'a', 'bb', 'a', 'a'], ['a', 'a', 'bb', 'aa'], ['a', 'abba', 'a'], ['aa', 'b', 'b', 'a', 'a'], ['aa', 'b', 'b', 'aa'], ['aa', 'bb', 'a', 'a'], ['aa', 'bb', 'aa'], ['aabbaa']]\n assert candidate(s = \"abcdedcba\") == [['a', 'b', 'c', 'd', 'e', 'd', 'c', 'b', 'a'], ['a', 'b', 'c', 'ded', 'c', 'b', 'a'], ['a', 'b', 'cdedc', 'b', 'a'], ['a', 'bcdedcb', 'a'], ['abcdedcba']]\n assert candidate(s = \"refer\") == [['r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r'], ['refer']]\n assert candidate(s = \"kayak\") == [['k', 'a', 'y', 'a', 'k'], ['k', 'aya', 'k'], ['kayak']]\n assert candidate(s = \"a\") == [['a']]\n assert candidate(s = \"aabaa\") == [['a', 'a', 'b', 'a', 'a'], ['a', 'a', 'b', 'aa'], ['a', 'aba', 'a'], ['aa', 'b', 'a', 'a'], ['aa', 'b', 'aa'], ['aabaa']]\n assert candidate(s = \"noonnoon\") == [['n', 'o', 'o', 'n', 'n', 'o', 'o', 'n'], ['n', 'o', 'o', 'n', 'n', 'oo', 'n'], ['n', 'o', 'o', 'n', 'noon'], ['n', 'o', 'o', 'nn', 'o', 'o', 'n'], ['n', 'o', 'o', 'nn', 'oo', 'n'], ['n', 'o', 'onno', 'o', 'n'], ['n', 'oo', 'n', 'n', 'o', 'o', 'n'], ['n', 'oo', 'n', 'n', 'oo', 'n'], ['n', 'oo', 'n', 'noon'], ['n', 'oo', 'nn', 'o', 'o', 'n'], ['n', 'oo', 'nn', 'oo', 'n'], ['n', 'oonnoo', 'n'], ['noon', 'n', 'o', 'o', 'n'], ['noon', 'n', 'oo', 'n'], ['noon', 'noon'], ['noonnoon']]\n assert candidate(s = \"civic\") == [['c', 'i', 'v', 'i', 'c'], ['c', 'ivi', 'c'], ['civic']]\n assert candidate(s = \"rotor\") == [['r', 'o', 't', 'o', 'r'], ['r', 'oto', 'r'], ['rotor']]\n assert candidate(s = \"racecar\") == [['r', 'a', 'c', 'e', 'c', 'a', 'r'], ['r', 'a', 'cec', 'a', 'r'], ['r', 'aceca', 'r'], ['racecar']]\n assert candidate(s = \"abcb\") == [['a', 'b', 'c', 'b'], ['a', 'bcb']]\n assert candidate(s = \"aabb\") == [['a', 'a', 'b', 'b'], ['a', 'a', 'bb'], ['aa', 'b', 'b'], ['aa', 'bb']]\n assert candidate(s = \"abba\") == [['a', 'b', 'b', 'a'], ['a', 'bb', 'a'], ['abba']]\n assert candidate(s = \"noon\") == [['n', 'o', 'o', 'n'], ['n', 'oo', 'n'], ['noon']]\n assert candidate(s = \"banana\") == [['b', 'a', 'n', 'a', 'n', 'a'], ['b', 'a', 'n', 'ana'], ['b', 'a', 'nan', 'a'], ['b', 'ana', 'n', 'a'], ['b', 'anana']]\n assert candidate(s = \"deeee\") == [['d', 'e', 'e', 'e', 'e'], ['d', 'e', 'e', 'ee'], ['d', 'e', 'ee', 'e'], ['d', 'e', 'eee'], ['d', 'ee', 'e', 'e'], ['d', 'ee', 'ee'], ['d', 'eee', 'e'], ['d', 'eeee']]\n assert candidate(s = \"abc\") == [['a', 'b', 'c']]\n assert candidate(s = \"ababa\") == [['a', 'b', 'a', 'b', 'a'], ['a', 'b', 'aba'], ['a', 'bab', 'a'], ['aba', 'b', 'a'], ['ababa']]\n assert candidate(s = \"aabaaa\") == [['a', 'a', 'b', 'a', 'a', 'a'], ['a', 'a', 'b', 'a', 'aa'], ['a', 'a', 'b', 'aa', 'a'], ['a', 'a', 'b', 'aaa'], ['a', 'aba', 'a', 'a'], ['a', 'aba', 'aa'], ['aa', 'b', 'a', 'a', 'a'], ['aa', 'b', 'a', 'aa'], ['aa', 'b', 'aa', 'a'], ['aa', 'b', 'aaa'], ['aabaa', 'a']]\n assert candidate(s = \"aaaa\") == [['a', 'a', 'a', 'a'], ['a', 'a', 'aa'], ['a', 'aa', 'a'], ['a', 'aaa'], ['aa', 'a', 'a'], ['aa', 'aa'], ['aaa', 'a'], ['aaaa']]\n assert candidate(s = \"aab\") == [['a', 'a', 'b'], ['aa', 'b']]\n assert candidate(s = \"redder\") == [['r', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'dd', 'e', 'r'], ['r', 'edde', 'r'], ['redder']]\n assert candidate(s = \"ababab\") == [['a', 'b', 'a', 'b', 'a', 'b'], ['a', 'b', 'a', 'bab'], ['a', 'b', 'aba', 'b'], ['a', 'bab', 'a', 'b'], ['a', 'babab'], ['aba', 'b', 'a', 'b'], ['aba', 'bab'], ['ababa', 'b']]\n assert candidate(s = \"level\") == [['l', 'e', 'v', 'e', 'l'], ['l', 'eve', 'l'], ['level']]\n assert candidate(s = \"bb\") == [['b', 'b'], ['bb']]\n assert candidate(s = \"abcdefg\") == [['a', 'b', 'c', 'd', 'e', 'f', 'g']]\n assert candidate(s = \"babad\") == [['b', 'a', 'b', 'a', 'd'], ['b', 'aba', 'd'], ['bab', 'a', 'd']]\n assert candidate(s = \"repaperrepaper\") == [['r', 'e', 'p', 'a', 'p', 'e', 'r', 'r', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'p', 'a', 'p', 'e', 'r', 'r', 'e', 'pap', 'e', 'r'], ['r', 'e', 'p', 'a', 'p', 'e', 'r', 'r', 'epape', 'r'], ['r', 'e', 'p', 'a', 'p', 'e', 'r', 'repaper'], ['r', 'e', 'p', 'a', 'p', 'e', 'rr', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'p', 'a', 'p', 'e', 'rr', 'e', 'pap', 'e', 'r'], ['r', 'e', 'p', 'a', 'p', 'e', 'rr', 'epape', 'r'], ['r', 'e', 'p', 'a', 'p', 'erre', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'p', 'a', 'p', 'erre', 'pap', 'e', 'r'], ['r', 'e', 'p', 'a', 'perrep', 'a', 'p', 'e', 'r'], ['r', 'e', 'p', 'aperrepa', 'p', 'e', 'r'], ['r', 'e', 'pap', 'e', 'r', 'r', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'pap', 'e', 'r', 'r', 'e', 'pap', 'e', 'r'], ['r', 'e', 'pap', 'e', 'r', 'r', 'epape', 'r'], ['r', 'e', 'pap', 'e', 'r', 'repaper'], ['r', 'e', 'pap', 'e', 'rr', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'pap', 'e', 'rr', 'e', 'pap', 'e', 'r'], ['r', 'e', 'pap', 'e', 'rr', 'epape', 'r'], ['r', 'e', 'pap', 'erre', 'p', 'a', 'p', 'e', 'r'], ['r', 'e', 'pap', 'erre', 'pap', 'e', 'r'], ['r', 'e', 'paperrepap', 'e', 'r'], ['r', 'epape', 'r', 'r', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'epape', 'r', 'r', 'e', 'pap', 'e', 'r'], ['r', 'epape', 'r', 'r', 'epape', 'r'], ['r', 'epape', 'r', 'repaper'], ['r', 'epape', 'rr', 'e', 'p', 'a', 'p', 'e', 'r'], ['r', 'epape', 'rr', 'e', 'pap', 'e', 'r'], ['r', 'epape', 'rr', 'epape', 'r'], ['r', 'epaperrepape', 'r'], ['repaper', 'r', 'e', 'p', 'a', 'p', 'e', 'r'], ['repaper', 'r', 'e', 'pap', 'e', 'r'], ['repaper', 'r', 'epape', 'r'], ['repaper', 'repaper'], ['repaperrepaper']]\n assert candidate(s = \"referrefer\") == [['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r'], ['r', 'e', 'f', 'e', 'r', 'refer'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'efe', 'r'], ['r', 'e', 'f', 'erre', 'f', 'e', 'r'], ['r', 'e', 'ferref', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r', 'r', 'efe', 'r'], ['r', 'efe', 'r', 'refer'], ['r', 'efe', 'rr', 'e', 'f', 'e', 'r'], ['r', 'efe', 'rr', 'efe', 'r'], ['r', 'eferrefe', 'r'], ['refer', 'r', 'e', 'f', 'e', 'r'], ['refer', 'r', 'efe', 'r'], ['refer', 'refer'], ['referrefer']]\n assert candidate(s = \"rotorrotor\") == [['r', 'o', 't', 'o', 'r', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'oto', 'r'], ['r', 'o', 't', 'o', 'r', 'rotor'], ['r', 'o', 't', 'o', 'rr', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'rr', 'oto', 'r'], ['r', 'o', 't', 'orro', 't', 'o', 'r'], ['r', 'o', 'torrot', 'o', 'r'], ['r', 'oto', 'r', 'r', 'o', 't', 'o', 'r'], ['r', 'oto', 'r', 'r', 'oto', 'r'], ['r', 'oto', 'r', 'rotor'], ['r', 'oto', 'rr', 'o', 't', 'o', 'r'], ['r', 'oto', 'rr', 'oto', 'r'], ['r', 'otorroto', 'r'], ['rotor', 'r', 'o', 't', 'o', 'r'], ['rotor', 'r', 'oto', 'r'], ['rotor', 'rotor'], ['rotorrotor']]\n assert candidate(s = \"zzzz\") == [['z', 'z', 'z', 'z'], ['z', 'z', 'zz'], ['z', 'zz', 'z'], ['z', 'zzz'], ['zz', 'z', 'z'], ['zz', 'zz'], ['zzz', 'z'], ['zzzz']]\n assert candidate(s = \"rotorlevelrotor\") == [['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'rotor'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'r', 'oto', 'r'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'rotor'], ['r', 'o', 't', 'o', 'r', 'level', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'level', 'r', 'oto', 'r'], ['r', 'o', 't', 'o', 'r', 'level', 'rotor'], ['r', 'o', 't', 'o', 'rlevelr', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'rlevelr', 'oto', 'r'], ['r', 'o', 't', 'orlevelro', 't', 'o', 'r'], ['r', 'o', 'torlevelrot', 'o', 'r'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'rotor'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'r', 'oto', 'r'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'rotor'], ['r', 'oto', 'r', 'level', 'r', 'o', 't', 'o', 'r'], ['r', 'oto', 'r', 'level', 'r', 'oto', 'r'], ['r', 'oto', 'r', 'level', 'rotor'], ['r', 'oto', 'rlevelr', 'o', 't', 'o', 'r'], ['r', 'oto', 'rlevelr', 'oto', 'r'], ['r', 'otorlevelroto', 'r'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'r', 'o', 't', 'o', 'r'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'r', 'oto', 'r'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'rotor'], ['rotor', 'l', 'eve', 'l', 'r', 'o', 't', 'o', 'r'], ['rotor', 'l', 'eve', 'l', 'r', 'oto', 'r'], ['rotor', 'l', 'eve', 'l', 'rotor'], ['rotor', 'level', 'r', 'o', 't', 'o', 'r'], ['rotor', 'level', 'r', 'oto', 'r'], ['rotor', 'level', 'rotor'], ['rotorlevelrotor']]\n assert candidate(s = \"levelmadam\") == [['l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['l', 'e', 'v', 'e', 'l', 'madam'], ['l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['l', 'eve', 'l', 'm', 'ada', 'm'], ['l', 'eve', 'l', 'madam'], ['level', 'm', 'a', 'd', 'a', 'm'], ['level', 'm', 'ada', 'm'], ['level', 'madam']]\n assert candidate(s = \"abcbbbabc\") == [['a', 'b', 'c', 'b', 'b', 'b', 'a', 'b', 'c'], ['a', 'b', 'c', 'b', 'b', 'bab', 'c'], ['a', 'b', 'c', 'b', 'bb', 'a', 'b', 'c'], ['a', 'b', 'c', 'bb', 'b', 'a', 'b', 'c'], ['a', 'b', 'c', 'bb', 'bab', 'c'], ['a', 'b', 'c', 'bbb', 'a', 'b', 'c'], ['a', 'bcb', 'b', 'b', 'a', 'b', 'c'], ['a', 'bcb', 'b', 'bab', 'c'], ['a', 'bcb', 'bb', 'a', 'b', 'c']]\n assert candidate(s = \"tattarrattat\") == [['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'atta', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'atta', 't'], ['t', 'a', 't', 't', 'arra', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'arra', 't', 'tat'], ['t', 'a', 't', 't', 'arra', 'tt', 'a', 't'], ['t', 'a', 't', 'tarrat', 't', 'a', 't'], ['t', 'a', 't', 'tarrat', 'tat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 'tat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'atta', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 'tat'], ['t', 'a', 'tt', 'a', 'rr', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'atta', 't'], ['t', 'a', 'tt', 'arra', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'arra', 't', 'tat'], ['t', 'a', 'tt', 'arra', 'tt', 'a', 't'], ['t', 'a', 'ttarratt', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 't', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 'tat'], ['t', 'atta', 'r', 'r', 'a', 'tt', 'a', 't'], ['t', 'atta', 'r', 'r', 'atta', 't'], ['t', 'atta', 'rr', 'a', 't', 't', 'a', 't'], ['t', 'atta', 'rr', 'a', 't', 'tat'], ['t', 'atta', 'rr', 'a', 'tt', 'a', 't'], ['t', 'atta', 'rr', 'atta', 't'], ['t', 'attarratta', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 'tat'], ['tat', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'atta', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 't', 'a', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 'tat'], ['tat', 't', 'a', 'rr', 'a', 'tt', 'a', 't'], ['tat', 't', 'a', 'rr', 'atta', 't'], ['tat', 't', 'arra', 't', 't', 'a', 't'], ['tat', 't', 'arra', 't', 'tat'], ['tat', 't', 'arra', 'tt', 'a', 't'], ['tat', 'tarrat', 't', 'a', 't'], ['tat', 'tarrat', 'tat'], ['tattarrattat']]\n assert candidate(s = \"aaaabaaaa\") == [['a', 'a', 'a', 'a', 'b', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'b', 'a', 'a', 'aa'], ['a', 'a', 'a', 'a', 'b', 'a', 'aa', 'a'], ['a', 'a', 'a', 'a', 'b', 'a', 'aaa'], ['a', 'a', 'a', 'a', 'b', 'aa', 'a', 'a'], ['a', 'a', 'a', 'a', 'b', 'aa', 'aa'], ['a', 'a', 'a', 'a', 'b', 'aaa', 'a'], ['a', 'a', 'a', 'a', 'b', 'aaaa'], ['a', 'a', 'a', 'aba', 'a', 'a', 'a'], ['a', 'a', 'a', 'aba', 'a', 'aa'], ['a', 'a', 'a', 'aba', 'aa', 'a'], ['a', 'a', 'a', 'aba', 'aaa'], ['a', 'a', 'aa', 'b', 'a', 'a', 'a', 'a'], ['a', 'a', 'aa', 'b', 'a', 'a', 'aa'], ['a', 'a', 'aa', 'b', 'a', 'aa', 'a'], ['a', 'a', 'aa', 'b', 'a', 'aaa'], ['a', 'a', 'aa', 'b', 'aa', 'a', 'a'], ['a', 'a', 'aa', 'b', 'aa', 'aa'], ['a', 'a', 'aa', 'b', 'aaa', 'a'], ['a', 'a', 'aa', 'b', 'aaaa'], ['a', 'a', 'aabaa', 'a', 'a'], ['a', 'a', 'aabaa', 'aa'], ['a', 'aa', 'a', 'b', 'a', 'a', 'a', 'a'], ['a', 'aa', 'a', 'b', 'a', 'a', 'aa'], ['a', 'aa', 'a', 'b', 'a', 'aa', 'a'], ['a', 'aa', 'a', 'b', 'a', 'aaa'], ['a', 'aa', 'a', 'b', 'aa', 'a', 'a'], ['a', 'aa', 'a', 'b', 'aa', 'aa'], ['a', 'aa', 'a', 'b', 'aaa', 'a'], ['a', 'aa', 'a', 'b', 'aaaa'], ['a', 'aa', 'aba', 'a', 'a', 'a'], ['a', 'aa', 'aba', 'a', 'aa'], ['a', 'aa', 'aba', 'aa', 'a'], ['a', 'aa', 'aba', 'aaa'], ['a', 'aaa', 'b', 'a', 'a', 'a', 'a'], ['a', 'aaa', 'b', 'a', 'a', 'aa'], ['a', 'aaa', 'b', 'a', 'aa', 'a'], ['a', 'aaa', 'b', 'a', 'aaa'], ['a', 'aaa', 'b', 'aa', 'a', 'a'], ['a', 'aaa', 'b', 'aa', 'aa'], ['a', 'aaa', 'b', 'aaa', 'a'], ['a', 'aaa', 'b', 'aaaa'], ['a', 'aaabaaa', 'a'], ['aa', 'a', 'a', 'b', 'a', 'a', 'a', 'a'], ['aa', 'a', 'a', 'b', 'a', 'a', 'aa'], ['aa', 'a', 'a', 'b', 'a', 'aa', 'a'], ['aa', 'a', 'a', 'b', 'a', 'aaa'], ['aa', 'a', 'a', 'b', 'aa', 'a', 'a'], ['aa', 'a', 'a', 'b', 'aa', 'aa'], ['aa', 'a', 'a', 'b', 'aaa', 'a'], ['aa', 'a', 'a', 'b', 'aaaa'], ['aa', 'a', 'aba', 'a', 'a', 'a'], ['aa', 'a', 'aba', 'a', 'aa'], ['aa', 'a', 'aba', 'aa', 'a'], ['aa', 'a', 'aba', 'aaa'], ['aa', 'aa', 'b', 'a', 'a', 'a', 'a'], ['aa', 'aa', 'b', 'a', 'a', 'aa'], ['aa', 'aa', 'b', 'a', 'aa', 'a'], ['aa', 'aa', 'b', 'a', 'aaa'], ['aa', 'aa', 'b', 'aa', 'a', 'a'], ['aa', 'aa', 'b', 'aa', 'aa'], ['aa', 'aa', 'b', 'aaa', 'a'], ['aa', 'aa', 'b', 'aaaa'], ['aa', 'aabaa', 'a', 'a'], ['aa', 'aabaa', 'aa'], ['aaa', 'a', 'b', 'a', 'a', 'a', 'a'], ['aaa', 'a', 'b', 'a', 'a', 'aa'], ['aaa', 'a', 'b', 'a', 'aa', 'a'], ['aaa', 'a', 'b', 'a', 'aaa'], ['aaa', 'a', 'b', 'aa', 'a', 'a'], ['aaa', 'a', 'b', 'aa', 'aa'], ['aaa', 'a', 'b', 'aaa', 'a'], ['aaa', 'a', 'b', 'aaaa'], ['aaa', 'aba', 'a', 'a', 'a'], ['aaa', 'aba', 'a', 'aa'], ['aaa', 'aba', 'aa', 'a'], ['aaa', 'aba', 'aaa'], ['aaaa', 'b', 'a', 'a', 'a', 'a'], ['aaaa', 'b', 'a', 'a', 'aa'], ['aaaa', 'b', 'a', 'aa', 'a'], ['aaaa', 'b', 'a', 'aaa'], ['aaaa', 'b', 'aa', 'a', 'a'], ['aaaa', 'b', 'aa', 'aa'], ['aaaa', 'b', 'aaa', 'a'], ['aaaa', 'b', 'aaaa'], ['aaaabaaaa']]\n assert candidate(s = \"noonabccba\") == [['n', 'o', 'o', 'n', 'a', 'b', 'c', 'c', 'b', 'a'], ['n', 'o', 'o', 'n', 'a', 'b', 'cc', 'b', 'a'], ['n', 'o', 'o', 'n', 'a', 'bccb', 'a'], ['n', 'o', 'o', 'n', 'abccba'], ['n', 'oo', 'n', 'a', 'b', 'c', 'c', 'b', 'a'], ['n', 'oo', 'n', 'a', 'b', 'cc', 'b', 'a'], ['n', 'oo', 'n', 'a', 'bccb', 'a'], ['n', 'oo', 'n', 'abccba'], ['noon', 'a', 'b', 'c', 'c', 'b', 'a'], ['noon', 'a', 'b', 'cc', 'b', 'a'], ['noon', 'a', 'bccb', 'a'], ['noon', 'abccba']]\n assert candidate(s = \"madamadam\") == [['m', 'a', 'd', 'a', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'madam'], ['m', 'a', 'd', 'ama', 'd', 'a', 'm'], ['m', 'a', 'damad', 'a', 'm'], ['m', 'ada', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'ada', 'm'], ['m', 'ada', 'madam'], ['m', 'adamada', 'm'], ['madam', 'a', 'd', 'a', 'm'], ['madam', 'ada', 'm'], ['madamadam']]\n assert candidate(s = \"racecarrace\") == [['r', 'a', 'c', 'e', 'c', 'a', 'r', 'r', 'a', 'c', 'e'], ['r', 'a', 'c', 'e', 'c', 'a', 'rr', 'a', 'c', 'e'], ['r', 'a', 'c', 'e', 'c', 'arra', 'c', 'e'], ['r', 'a', 'c', 'e', 'carrac', 'e'], ['r', 'a', 'c', 'ecarrace'], ['r', 'a', 'cec', 'a', 'r', 'r', 'a', 'c', 'e'], ['r', 'a', 'cec', 'a', 'rr', 'a', 'c', 'e'], ['r', 'a', 'cec', 'arra', 'c', 'e'], ['r', 'aceca', 'r', 'r', 'a', 'c', 'e'], ['r', 'aceca', 'rr', 'a', 'c', 'e'], ['racecar', 'r', 'a', 'c', 'e']]\n assert candidate(s = \"rotorlevel\") == [['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l'], ['r', 'o', 't', 'o', 'r', 'level'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l'], ['r', 'oto', 'r', 'l', 'eve', 'l'], ['r', 'oto', 'r', 'level'], ['rotor', 'l', 'e', 'v', 'e', 'l'], ['rotor', 'l', 'eve', 'l'], ['rotor', 'level']]\n assert candidate(s = \"abccbaabccba\") == [['a', 'b', 'c', 'c', 'b', 'a', 'a', 'b', 'c', 'c', 'b', 'a'], ['a', 'b', 'c', 'c', 'b', 'a', 'a', 'b', 'cc', 'b', 'a'], ['a', 'b', 'c', 'c', 'b', 'a', 'a', 'bccb', 'a'], ['a', 'b', 'c', 'c', 'b', 'a', 'abccba'], ['a', 'b', 'c', 'c', 'b', 'aa', 'b', 'c', 'c', 'b', 'a'], ['a', 'b', 'c', 'c', 'b', 'aa', 'b', 'cc', 'b', 'a'], ['a', 'b', 'c', 'c', 'b', 'aa', 'bccb', 'a'], ['a', 'b', 'c', 'c', 'baab', 'c', 'c', 'b', 'a'], ['a', 'b', 'c', 'c', 'baab', 'cc', 'b', 'a'], ['a', 'b', 'c', 'cbaabc', 'c', 'b', 'a'], ['a', 'b', 'cc', 'b', 'a', 'a', 'b', 'c', 'c', 'b', 'a'], ['a', 'b', 'cc', 'b', 'a', 'a', 'b', 'cc', 'b', 'a'], ['a', 'b', 'cc', 'b', 'a', 'a', 'bccb', 'a'], ['a', 'b', 'cc', 'b', 'a', 'abccba'], ['a', 'b', 'cc', 'b', 'aa', 'b', 'c', 'c', 'b', 'a'], ['a', 'b', 'cc', 'b', 'aa', 'b', 'cc', 'b', 'a'], ['a', 'b', 'cc', 'b', 'aa', 'bccb', 'a'], ['a', 'b', 'cc', 'baab', 'c', 'c', 'b', 'a'], ['a', 'b', 'cc', 'baab', 'cc', 'b', 'a'], ['a', 'b', 'ccbaabcc', 'b', 'a'], ['a', 'bccb', 'a', 'a', 'b', 'c', 'c', 'b', 'a'], ['a', 'bccb', 'a', 'a', 'b', 'cc', 'b', 'a'], ['a', 'bccb', 'a', 'a', 'bccb', 'a'], ['a', 'bccb', 'a', 'abccba'], ['a', 'bccb', 'aa', 'b', 'c', 'c', 'b', 'a'], ['a', 'bccb', 'aa', 'b', 'cc', 'b', 'a'], ['a', 'bccb', 'aa', 'bccb', 'a'], ['a', 'bccbaabccb', 'a'], ['abccba', 'a', 'b', 'c', 'c', 'b', 'a'], ['abccba', 'a', 'b', 'cc', 'b', 'a'], ['abccba', 'a', 'bccb', 'a'], ['abccba', 'abccba'], ['abccbaabccba']]\n assert candidate(s = \"nooncivicrotor\") == [['n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'r', 'o', 't', 'o', 'r'], ['n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'r', 'oto', 'r'], ['n', 'o', 'o', 'n', 'c', 'i', 'v', 'i', 'c', 'rotor'], ['n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'r', 'o', 't', 'o', 'r'], ['n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'r', 'oto', 'r'], ['n', 'o', 'o', 'n', 'c', 'ivi', 'c', 'rotor'], ['n', 'o', 'o', 'n', 'civic', 'r', 'o', 't', 'o', 'r'], ['n', 'o', 'o', 'n', 'civic', 'r', 'oto', 'r'], ['n', 'o', 'o', 'n', 'civic', 'rotor'], ['n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'r', 'o', 't', 'o', 'r'], ['n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'r', 'oto', 'r'], ['n', 'oo', 'n', 'c', 'i', 'v', 'i', 'c', 'rotor'], ['n', 'oo', 'n', 'c', 'ivi', 'c', 'r', 'o', 't', 'o', 'r'], ['n', 'oo', 'n', 'c', 'ivi', 'c', 'r', 'oto', 'r'], ['n', 'oo', 'n', 'c', 'ivi', 'c', 'rotor'], ['n', 'oo', 'n', 'civic', 'r', 'o', 't', 'o', 'r'], ['n', 'oo', 'n', 'civic', 'r', 'oto', 'r'], ['n', 'oo', 'n', 'civic', 'rotor'], ['noon', 'c', 'i', 'v', 'i', 'c', 'r', 'o', 't', 'o', 'r'], ['noon', 'c', 'i', 'v', 'i', 'c', 'r', 'oto', 'r'], ['noon', 'c', 'i', 'v', 'i', 'c', 'rotor'], ['noon', 'c', 'ivi', 'c', 'r', 'o', 't', 'o', 'r'], ['noon', 'c', 'ivi', 'c', 'r', 'oto', 'r'], ['noon', 'c', 'ivi', 'c', 'rotor'], ['noon', 'civic', 'r', 'o', 't', 'o', 'r'], ['noon', 'civic', 'r', 'oto', 'r'], ['noon', 'civic', 'rotor']]\n assert candidate(s = \"aabbccddeee\") == [['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'e'], ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'ee'], ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'ee', 'e'], ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'eee'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'e', 'e', 'e'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'e', 'ee'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'ee', 'e'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'eee'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'e', 'e', 'e'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'e', 'ee'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'ee', 'e'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'eee'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'e', 'e', 'e'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'e', 'ee'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'ee', 'e'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'eee'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'e', 'e', 'e'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'e', 'ee'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'ee', 'e'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'eee'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'e', 'e', 'e'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'e', 'ee'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'ee', 'e'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'eee'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'e', 'e', 'e'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'e', 'ee'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'ee', 'e'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'eee'], ['a', 'a', 'bb', 'cc', 'dd', 'e', 'e', 'e'], ['a', 'a', 'bb', 'cc', 'dd', 'e', 'ee'], ['a', 'a', 'bb', 'cc', 'dd', 'ee', 'e'], ['a', 'a', 'bb', 'cc', 'dd', 'eee'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'e'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'ee'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'ee', 'e'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'eee'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'e', 'e', 'e'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'e', 'ee'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'ee', 'e'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'eee'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'e', 'e', 'e'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'e', 'ee'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'ee', 'e'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'eee'], ['aa', 'b', 'b', 'cc', 'dd', 'e', 'e', 'e'], ['aa', 'b', 'b', 'cc', 'dd', 'e', 'ee'], ['aa', 'b', 'b', 'cc', 'dd', 'ee', 'e'], ['aa', 'b', 'b', 'cc', 'dd', 'eee'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'e', 'e', 'e'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'e', 'ee'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'ee', 'e'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'eee'], ['aa', 'bb', 'c', 'c', 'dd', 'e', 'e', 'e'], ['aa', 'bb', 'c', 'c', 'dd', 'e', 'ee'], ['aa', 'bb', 'c', 'c', 'dd', 'ee', 'e'], ['aa', 'bb', 'c', 'c', 'dd', 'eee'], ['aa', 'bb', 'cc', 'd', 'd', 'e', 'e', 'e'], ['aa', 'bb', 'cc', 'd', 'd', 'e', 'ee'], ['aa', 'bb', 'cc', 'd', 'd', 'ee', 'e'], ['aa', 'bb', 'cc', 'd', 'd', 'eee'], ['aa', 'bb', 'cc', 'dd', 'e', 'e', 'e'], ['aa', 'bb', 'cc', 'dd', 'e', 'ee'], ['aa', 'bb', 'cc', 'dd', 'ee', 'e'], ['aa', 'bb', 'cc', 'dd', 'eee']]\n assert candidate(s = \"madamracecar\") == [['m', 'a', 'd', 'a', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['m', 'a', 'd', 'a', 'm', 'r', 'a', 'cec', 'a', 'r'], ['m', 'a', 'd', 'a', 'm', 'r', 'aceca', 'r'], ['m', 'a', 'd', 'a', 'm', 'racecar'], ['m', 'ada', 'm', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['m', 'ada', 'm', 'r', 'a', 'cec', 'a', 'r'], ['m', 'ada', 'm', 'r', 'aceca', 'r'], ['m', 'ada', 'm', 'racecar'], ['madam', 'r', 'a', 'c', 'e', 'c', 'a', 'r'], ['madam', 'r', 'a', 'cec', 'a', 'r'], ['madam', 'r', 'aceca', 'r'], ['madam', 'racecar']]\n assert candidate(s = \"levelrefer\") == [['l', 'e', 'v', 'e', 'l', 'r', 'e', 'f', 'e', 'r'], ['l', 'e', 'v', 'e', 'l', 'r', 'efe', 'r'], ['l', 'e', 'v', 'e', 'l', 'refer'], ['l', 'eve', 'l', 'r', 'e', 'f', 'e', 'r'], ['l', 'eve', 'l', 'r', 'efe', 'r'], ['l', 'eve', 'l', 'refer'], ['level', 'r', 'e', 'f', 'e', 'r'], ['level', 'r', 'efe', 'r'], ['level', 'refer']]\n assert candidate(s = \"xyxzxyzxzxyx\") == [['x', 'y', 'x', 'z', 'x', 'y', 'z', 'x', 'z', 'x', 'y', 'x'], ['x', 'y', 'x', 'z', 'x', 'y', 'z', 'x', 'z', 'xyx'], ['x', 'y', 'x', 'z', 'x', 'y', 'z', 'xzx', 'y', 'x'], ['x', 'y', 'x', 'z', 'x', 'y', 'zxz', 'x', 'y', 'x'], ['x', 'y', 'x', 'z', 'x', 'y', 'zxz', 'xyx'], ['x', 'y', 'xzx', 'y', 'z', 'x', 'z', 'x', 'y', 'x'], ['x', 'y', 'xzx', 'y', 'z', 'x', 'z', 'xyx'], ['x', 'y', 'xzx', 'y', 'z', 'xzx', 'y', 'x'], ['x', 'y', 'xzx', 'y', 'zxz', 'x', 'y', 'x'], ['x', 'y', 'xzx', 'y', 'zxz', 'xyx'], ['x', 'yxzxy', 'z', 'x', 'z', 'x', 'y', 'x'], ['x', 'yxzxy', 'z', 'x', 'z', 'xyx'], ['x', 'yxzxy', 'z', 'xzx', 'y', 'x'], ['x', 'yxzxy', 'zxz', 'x', 'y', 'x'], ['x', 'yxzxy', 'zxz', 'xyx'], ['xyx', 'z', 'x', 'y', 'z', 'x', 'z', 'x', 'y', 'x'], ['xyx', 'z', 'x', 'y', 'z', 'x', 'z', 'xyx'], ['xyx', 'z', 'x', 'y', 'z', 'xzx', 'y', 'x'], ['xyx', 'z', 'x', 'y', 'zxz', 'x', 'y', 'x'], ['xyx', 'z', 'x', 'y', 'zxz', 'xyx']]\n assert candidate(s = \"refercivic\") == [['r', 'e', 'f', 'e', 'r', 'c', 'i', 'v', 'i', 'c'], ['r', 'e', 'f', 'e', 'r', 'c', 'ivi', 'c'], ['r', 'e', 'f', 'e', 'r', 'civic'], ['r', 'efe', 'r', 'c', 'i', 'v', 'i', 'c'], ['r', 'efe', 'r', 'c', 'ivi', 'c'], ['r', 'efe', 'r', 'civic'], ['refer', 'c', 'i', 'v', 'i', 'c'], ['refer', 'c', 'ivi', 'c'], ['refer', 'civic']]\n assert candidate(s = \"noonlevelmadam\") == [['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'madam'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'madam'], ['n', 'o', 'o', 'n', 'level', 'm', 'a', 'd', 'a', 'm'], ['n', 'o', 'o', 'n', 'level', 'm', 'ada', 'm'], ['n', 'o', 'o', 'n', 'level', 'madam'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'madam'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'madam'], ['n', 'oo', 'n', 'level', 'm', 'a', 'd', 'a', 'm'], ['n', 'oo', 'n', 'level', 'm', 'ada', 'm'], ['n', 'oo', 'n', 'level', 'madam'], ['noon', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['noon', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['noon', 'l', 'e', 'v', 'e', 'l', 'madam'], ['noon', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['noon', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['noon', 'l', 'eve', 'l', 'madam'], ['noon', 'level', 'm', 'a', 'd', 'a', 'm'], ['noon', 'level', 'm', 'ada', 'm'], ['noon', 'level', 'madam']]\n assert candidate(s = \"abacabacabac\") == [['a', 'b', 'a', 'c', 'a', 'b', 'a', 'c', 'a', 'b', 'a', 'c'], ['a', 'b', 'a', 'c', 'a', 'b', 'a', 'c', 'aba', 'c'], ['a', 'b', 'a', 'c', 'a', 'b', 'a', 'cabac'], ['a', 'b', 'a', 'c', 'a', 'b', 'aca', 'b', 'a', 'c'], ['a', 'b', 'a', 'c', 'a', 'bacab', 'a', 'c'], ['a', 'b', 'a', 'c', 'aba', 'c', 'a', 'b', 'a', 'c'], ['a', 'b', 'a', 'c', 'aba', 'c', 'aba', 'c'], ['a', 'b', 'a', 'c', 'aba', 'cabac'], ['a', 'b', 'a', 'c', 'abacaba', 'c'], ['a', 'b', 'a', 'cabac', 'a', 'b', 'a', 'c'], ['a', 'b', 'a', 'cabac', 'aba', 'c'], ['a', 'b', 'a', 'cabacabac'], ['a', 'b', 'aca', 'b', 'a', 'c', 'a', 'b', 'a', 'c'], ['a', 'b', 'aca', 'b', 'a', 'c', 'aba', 'c'], ['a', 'b', 'aca', 'b', 'a', 'cabac'], ['a', 'b', 'aca', 'b', 'aca', 'b', 'a', 'c'], ['a', 'b', 'aca', 'bacab', 'a', 'c'], ['a', 'b', 'acabaca', 'b', 'a', 'c'], ['a', 'bacab', 'a', 'c', 'a', 'b', 'a', 'c'], ['a', 'bacab', 'a', 'c', 'aba', 'c'], ['a', 'bacab', 'a', 'cabac'], ['a', 'bacab', 'aca', 'b', 'a', 'c'], ['a', 'bacabacab', 'a', 'c'], ['aba', 'c', 'a', 'b', 'a', 'c', 'a', 'b', 'a', 'c'], ['aba', 'c', 'a', 'b', 'a', 'c', 'aba', 'c'], ['aba', 'c', 'a', 'b', 'a', 'cabac'], ['aba', 'c', 'a', 'b', 'aca', 'b', 'a', 'c'], ['aba', 'c', 'a', 'bacab', 'a', 'c'], ['aba', 'c', 'aba', 'c', 'a', 'b', 'a', 'c'], ['aba', 'c', 'aba', 'c', 'aba', 'c'], ['aba', 'c', 'aba', 'cabac'], ['aba', 'c', 'abacaba', 'c'], ['aba', 'cabac', 'a', 'b', 'a', 'c'], ['aba', 'cabac', 'aba', 'c'], ['aba', 'cabacabac'], ['abacaba', 'c', 'a', 'b', 'a', 'c'], ['abacaba', 'c', 'aba', 'c'], ['abacaba', 'cabac'], ['abacabacaba', 'c']]\n assert candidate(s = \"madaminnakayak\") == [['m', 'a', 'd', 'a', 'm', 'i', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['m', 'a', 'd', 'a', 'm', 'i', 'n', 'n', 'a', 'k', 'aya', 'k'], ['m', 'a', 'd', 'a', 'm', 'i', 'n', 'n', 'a', 'kayak'], ['m', 'a', 'd', 'a', 'm', 'i', 'n', 'n', 'aka', 'y', 'a', 'k'], ['m', 'a', 'd', 'a', 'm', 'i', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['m', 'a', 'd', 'a', 'm', 'i', 'nn', 'a', 'k', 'aya', 'k'], ['m', 'a', 'd', 'a', 'm', 'i', 'nn', 'a', 'kayak'], ['m', 'a', 'd', 'a', 'm', 'i', 'nn', 'aka', 'y', 'a', 'k'], ['m', 'ada', 'm', 'i', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['m', 'ada', 'm', 'i', 'n', 'n', 'a', 'k', 'aya', 'k'], ['m', 'ada', 'm', 'i', 'n', 'n', 'a', 'kayak'], ['m', 'ada', 'm', 'i', 'n', 'n', 'aka', 'y', 'a', 'k'], ['m', 'ada', 'm', 'i', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['m', 'ada', 'm', 'i', 'nn', 'a', 'k', 'aya', 'k'], ['m', 'ada', 'm', 'i', 'nn', 'a', 'kayak'], ['m', 'ada', 'm', 'i', 'nn', 'aka', 'y', 'a', 'k'], ['madam', 'i', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['madam', 'i', 'n', 'n', 'a', 'k', 'aya', 'k'], ['madam', 'i', 'n', 'n', 'a', 'kayak'], ['madam', 'i', 'n', 'n', 'aka', 'y', 'a', 'k'], ['madam', 'i', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['madam', 'i', 'nn', 'a', 'k', 'aya', 'k'], ['madam', 'i', 'nn', 'a', 'kayak'], ['madam', 'i', 'nn', 'aka', 'y', 'a', 'k']]\n assert candidate(s = \"atoyotaatoyota\") == [['a', 't', 'o', 'y', 'o', 't', 'a', 'a', 't', 'o', 'y', 'o', 't', 'a'], ['a', 't', 'o', 'y', 'o', 't', 'a', 'a', 't', 'oyo', 't', 'a'], ['a', 't', 'o', 'y', 'o', 't', 'a', 'a', 'toyot', 'a'], ['a', 't', 'o', 'y', 'o', 't', 'a', 'atoyota'], ['a', 't', 'o', 'y', 'o', 't', 'aa', 't', 'o', 'y', 'o', 't', 'a'], ['a', 't', 'o', 'y', 'o', 't', 'aa', 't', 'oyo', 't', 'a'], ['a', 't', 'o', 'y', 'o', 't', 'aa', 'toyot', 'a'], ['a', 't', 'o', 'y', 'o', 'taat', 'o', 'y', 'o', 't', 'a'], ['a', 't', 'o', 'y', 'o', 'taat', 'oyo', 't', 'a'], ['a', 't', 'o', 'y', 'otaato', 'y', 'o', 't', 'a'], ['a', 't', 'o', 'yotaatoy', 'o', 't', 'a'], ['a', 't', 'oyo', 't', 'a', 'a', 't', 'o', 'y', 'o', 't', 'a'], ['a', 't', 'oyo', 't', 'a', 'a', 't', 'oyo', 't', 'a'], ['a', 't', 'oyo', 't', 'a', 'a', 'toyot', 'a'], ['a', 't', 'oyo', 't', 'a', 'atoyota'], ['a', 't', 'oyo', 't', 'aa', 't', 'o', 'y', 'o', 't', 'a'], ['a', 't', 'oyo', 't', 'aa', 't', 'oyo', 't', 'a'], ['a', 't', 'oyo', 't', 'aa', 'toyot', 'a'], ['a', 't', 'oyo', 'taat', 'o', 'y', 'o', 't', 'a'], ['a', 't', 'oyo', 'taat', 'oyo', 't', 'a'], ['a', 't', 'oyotaatoyo', 't', 'a'], ['a', 'toyot', 'a', 'a', 't', 'o', 'y', 'o', 't', 'a'], ['a', 'toyot', 'a', 'a', 't', 'oyo', 't', 'a'], ['a', 'toyot', 'a', 'a', 'toyot', 'a'], ['a', 'toyot', 'a', 'atoyota'], ['a', 'toyot', 'aa', 't', 'o', 'y', 'o', 't', 'a'], ['a', 'toyot', 'aa', 't', 'oyo', 't', 'a'], ['a', 'toyot', 'aa', 'toyot', 'a'], ['a', 'toyotaatoyot', 'a'], ['atoyota', 'a', 't', 'o', 'y', 'o', 't', 'a'], ['atoyota', 'a', 't', 'oyo', 't', 'a'], ['atoyota', 'a', 'toyot', 'a'], ['atoyota', 'atoyota'], ['atoyotaatoyota']]\n assert candidate(s = \"madammadam\") == [['m', 'a', 'd', 'a', 'm', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'madam'], ['m', 'a', 'd', 'a', 'mm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'mm', 'ada', 'm'], ['m', 'a', 'd', 'amma', 'd', 'a', 'm'], ['m', 'a', 'dammad', 'a', 'm'], ['m', 'ada', 'm', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'madam'], ['m', 'ada', 'mm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'mm', 'ada', 'm'], ['m', 'adammada', 'm'], ['madam', 'm', 'a', 'd', 'a', 'm'], ['madam', 'm', 'ada', 'm'], ['madam', 'madam'], ['madammadam']]\n assert candidate(s = \"madamlevelmadam\") == [['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'l', 'e', 'v', 'e', 'l', 'madam'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'l', 'eve', 'l', 'madam'], ['m', 'a', 'd', 'a', 'm', 'level', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'level', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'level', 'madam'], ['m', 'a', 'd', 'a', 'mlevelm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'mlevelm', 'ada', 'm'], ['m', 'a', 'd', 'amlevelma', 'd', 'a', 'm'], ['m', 'a', 'damlevelmad', 'a', 'm'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'l', 'e', 'v', 'e', 'l', 'madam'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'l', 'eve', 'l', 'madam'], ['m', 'ada', 'm', 'level', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'level', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'level', 'madam'], ['m', 'ada', 'mlevelm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'mlevelm', 'ada', 'm'], ['m', 'adamlevelmada', 'm'], ['madam', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['madam', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['madam', 'l', 'e', 'v', 'e', 'l', 'madam'], ['madam', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['madam', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['madam', 'l', 'eve', 'l', 'madam'], ['madam', 'level', 'm', 'a', 'd', 'a', 'm'], ['madam', 'level', 'm', 'ada', 'm'], ['madam', 'level', 'madam'], ['madamlevelmadam']]\n assert candidate(s = \"xyxyxyxyxy\") == [['x', 'y', 'x', 'y', 'x', 'y', 'x', 'y', 'x', 'y'], ['x', 'y', 'x', 'y', 'x', 'y', 'x', 'yxy'], ['x', 'y', 'x', 'y', 'x', 'y', 'xyx', 'y'], ['x', 'y', 'x', 'y', 'x', 'yxy', 'x', 'y'], ['x', 'y', 'x', 'y', 'x', 'yxyxy'], ['x', 'y', 'x', 'y', 'xyx', 'y', 'x', 'y'], ['x', 'y', 'x', 'y', 'xyx', 'yxy'], ['x', 'y', 'x', 'y', 'xyxyx', 'y'], ['x', 'y', 'x', 'yxy', 'x', 'y', 'x', 'y'], ['x', 'y', 'x', 'yxy', 'x', 'yxy'], ['x', 'y', 'x', 'yxy', 'xyx', 'y'], ['x', 'y', 'x', 'yxyxy', 'x', 'y'], ['x', 'y', 'x', 'yxyxyxy'], ['x', 'y', 'xyx', 'y', 'x', 'y', 'x', 'y'], ['x', 'y', 'xyx', 'y', 'x', 'yxy'], ['x', 'y', 'xyx', 'y', 'xyx', 'y'], ['x', 'y', 'xyx', 'yxy', 'x', 'y'], ['x', 'y', 'xyx', 'yxyxy'], ['x', 'y', 'xyxyx', 'y', 'x', 'y'], ['x', 'y', 'xyxyx', 'yxy'], ['x', 'y', 'xyxyxyx', 'y'], ['x', 'yxy', 'x', 'y', 'x', 'y', 'x', 'y'], ['x', 'yxy', 'x', 'y', 'x', 'yxy'], ['x', 'yxy', 'x', 'y', 'xyx', 'y'], ['x', 'yxy', 'x', 'yxy', 'x', 'y'], ['x', 'yxy', 'x', 'yxyxy'], ['x', 'yxy', 'xyx', 'y', 'x', 'y'], ['x', 'yxy', 'xyx', 'yxy'], ['x', 'yxy', 'xyxyx', 'y'], ['x', 'yxyxy', 'x', 'y', 'x', 'y'], ['x', 'yxyxy', 'x', 'yxy'], ['x', 'yxyxy', 'xyx', 'y'], ['x', 'yxyxyxy', 'x', 'y'], ['x', 'yxyxyxyxy'], ['xyx', 'y', 'x', 'y', 'x', 'y', 'x', 'y'], ['xyx', 'y', 'x', 'y', 'x', 'yxy'], ['xyx', 'y', 'x', 'y', 'xyx', 'y'], ['xyx', 'y', 'x', 'yxy', 'x', 'y'], ['xyx', 'y', 'x', 'yxyxy'], ['xyx', 'y', 'xyx', 'y', 'x', 'y'], ['xyx', 'y', 'xyx', 'yxy'], ['xyx', 'y', 'xyxyx', 'y'], ['xyx', 'yxy', 'x', 'y', 'x', 'y'], ['xyx', 'yxy', 'x', 'yxy'], ['xyx', 'yxy', 'xyx', 'y'], ['xyx', 'yxyxy', 'x', 'y'], ['xyx', 'yxyxyxy'], ['xyxyx', 'y', 'x', 'y', 'x', 'y'], ['xyxyx', 'y', 'x', 'yxy'], ['xyxyx', 'y', 'xyx', 'y'], ['xyxyx', 'yxy', 'x', 'y'], ['xyxyx', 'yxyxy'], ['xyxyxyx', 'y', 'x', 'y'], ['xyxyxyx', 'yxy'], ['xyxyxyxyx', 'y']]\n assert candidate(s = \"stepsonnodenoses\") == [['s', 't', 'e', 'p', 's', 'o', 'n', 'n', 'o', 'd', 'e', 'n', 'o', 's', 'e', 's'], ['s', 't', 'e', 'p', 's', 'o', 'n', 'n', 'o', 'd', 'e', 'n', 'o', 'ses'], ['s', 't', 'e', 'p', 's', 'o', 'nn', 'o', 'd', 'e', 'n', 'o', 's', 'e', 's'], ['s', 't', 'e', 'p', 's', 'o', 'nn', 'o', 'd', 'e', 'n', 'o', 'ses'], ['s', 't', 'e', 'p', 's', 'onno', 'd', 'e', 'n', 'o', 's', 'e', 's'], ['s', 't', 'e', 'p', 's', 'onno', 'd', 'e', 'n', 'o', 'ses']]\n assert candidate(s = \"racecaranakayak\") == [['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'a', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'ana', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'ana', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'ana', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'a', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'a', 'kayak'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'ana', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'ana', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'a', 'r', 'ana', 'kayak'], ['r', 'a', 'cec', 'ara', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'ara', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'ara', 'n', 'a', 'kayak'], ['r', 'a', 'cec', 'ara', 'n', 'aka', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'a', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'a', 'n', 'a', 'k', 'aya', 'k'], ['r', 'aceca', 'r', 'a', 'n', 'a', 'kayak'], ['r', 'aceca', 'r', 'a', 'n', 'aka', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'ana', 'k', 'a', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'ana', 'k', 'aya', 'k'], ['r', 'aceca', 'r', 'ana', 'kayak'], ['racecar', 'a', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['racecar', 'a', 'n', 'a', 'k', 'aya', 'k'], ['racecar', 'a', 'n', 'a', 'kayak'], ['racecar', 'a', 'n', 'aka', 'y', 'a', 'k'], ['racecar', 'ana', 'k', 'a', 'y', 'a', 'k'], ['racecar', 'ana', 'k', 'aya', 'k'], ['racecar', 'ana', 'kayak']]\n assert candidate(s = \"abcbaaabcb\") == [['a', 'b', 'c', 'b', 'a', 'a', 'a', 'b', 'c', 'b'], ['a', 'b', 'c', 'b', 'a', 'a', 'a', 'bcb'], ['a', 'b', 'c', 'b', 'a', 'aa', 'b', 'c', 'b'], ['a', 'b', 'c', 'b', 'a', 'aa', 'bcb'], ['a', 'b', 'c', 'b', 'aa', 'a', 'b', 'c', 'b'], ['a', 'b', 'c', 'b', 'aa', 'a', 'bcb'], ['a', 'b', 'c', 'b', 'aaa', 'b', 'c', 'b'], ['a', 'b', 'c', 'b', 'aaa', 'bcb'], ['a', 'b', 'c', 'baaab', 'c', 'b'], ['a', 'b', 'cbaaabc', 'b'], ['a', 'bcb', 'a', 'a', 'a', 'b', 'c', 'b'], ['a', 'bcb', 'a', 'a', 'a', 'bcb'], ['a', 'bcb', 'a', 'aa', 'b', 'c', 'b'], ['a', 'bcb', 'a', 'aa', 'bcb'], ['a', 'bcb', 'aa', 'a', 'b', 'c', 'b'], ['a', 'bcb', 'aa', 'a', 'bcb'], ['a', 'bcb', 'aaa', 'b', 'c', 'b'], ['a', 'bcb', 'aaa', 'bcb'], ['a', 'bcbaaabcb'], ['abcba', 'a', 'a', 'b', 'c', 'b'], ['abcba', 'a', 'a', 'bcb'], ['abcba', 'aa', 'b', 'c', 'b'], ['abcba', 'aa', 'bcb']]\n assert candidate(s = \"levelannakayak\") == [['l', 'e', 'v', 'e', 'l', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['l', 'e', 'v', 'e', 'l', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['l', 'e', 'v', 'e', 'l', 'a', 'n', 'n', 'a', 'kayak'], ['l', 'e', 'v', 'e', 'l', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['l', 'e', 'v', 'e', 'l', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['l', 'e', 'v', 'e', 'l', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['l', 'e', 'v', 'e', 'l', 'a', 'nn', 'a', 'kayak'], ['l', 'e', 'v', 'e', 'l', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['l', 'e', 'v', 'e', 'l', 'anna', 'k', 'a', 'y', 'a', 'k'], ['l', 'e', 'v', 'e', 'l', 'anna', 'k', 'aya', 'k'], ['l', 'e', 'v', 'e', 'l', 'anna', 'kayak'], ['l', 'eve', 'l', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['l', 'eve', 'l', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['l', 'eve', 'l', 'a', 'n', 'n', 'a', 'kayak'], ['l', 'eve', 'l', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['l', 'eve', 'l', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['l', 'eve', 'l', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['l', 'eve', 'l', 'a', 'nn', 'a', 'kayak'], ['l', 'eve', 'l', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['l', 'eve', 'l', 'anna', 'k', 'a', 'y', 'a', 'k'], ['l', 'eve', 'l', 'anna', 'k', 'aya', 'k'], ['l', 'eve', 'l', 'anna', 'kayak'], ['level', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['level', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['level', 'a', 'n', 'n', 'a', 'kayak'], ['level', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['level', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['level', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['level', 'a', 'nn', 'a', 'kayak'], ['level', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['level', 'anna', 'k', 'a', 'y', 'a', 'k'], ['level', 'anna', 'k', 'aya', 'k'], ['level', 'anna', 'kayak']]\n assert candidate(s = \"noonabac\") == [['n', 'o', 'o', 'n', 'a', 'b', 'a', 'c'], ['n', 'o', 'o', 'n', 'aba', 'c'], ['n', 'oo', 'n', 'a', 'b', 'a', 'c'], ['n', 'oo', 'n', 'aba', 'c'], ['noon', 'a', 'b', 'a', 'c'], ['noon', 'aba', 'c']]\n assert candidate(s = \"aabbaba\") == [['a', 'a', 'b', 'b', 'a', 'b', 'a'], ['a', 'a', 'b', 'b', 'aba'], ['a', 'a', 'b', 'bab', 'a'], ['a', 'a', 'bb', 'a', 'b', 'a'], ['a', 'a', 'bb', 'aba'], ['a', 'abba', 'b', 'a'], ['aa', 'b', 'b', 'a', 'b', 'a'], ['aa', 'b', 'b', 'aba'], ['aa', 'b', 'bab', 'a'], ['aa', 'bb', 'a', 'b', 'a'], ['aa', 'bb', 'aba']]\n assert candidate(s = \"abcbaabcba\") == [['a', 'b', 'c', 'b', 'a', 'a', 'b', 'c', 'b', 'a'], ['a', 'b', 'c', 'b', 'a', 'a', 'bcb', 'a'], ['a', 'b', 'c', 'b', 'a', 'abcba'], ['a', 'b', 'c', 'b', 'aa', 'b', 'c', 'b', 'a'], ['a', 'b', 'c', 'b', 'aa', 'bcb', 'a'], ['a', 'b', 'c', 'baab', 'c', 'b', 'a'], ['a', 'b', 'cbaabc', 'b', 'a'], ['a', 'bcb', 'a', 'a', 'b', 'c', 'b', 'a'], ['a', 'bcb', 'a', 'a', 'bcb', 'a'], ['a', 'bcb', 'a', 'abcba'], ['a', 'bcb', 'aa', 'b', 'c', 'b', 'a'], ['a', 'bcb', 'aa', 'bcb', 'a'], ['a', 'bcbaabcb', 'a'], ['abcba', 'a', 'b', 'c', 'b', 'a'], ['abcba', 'a', 'bcb', 'a'], ['abcba', 'abcba'], ['abcbaabcba']]\n assert candidate(s = \"deifiedcivic\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'c', 'ivi', 'c'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'civic'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'i', 'v', 'i', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'c', 'ivi', 'c'], ['d', 'e', 'ifi', 'e', 'd', 'civic'], ['d', 'eifie', 'd', 'c', 'i', 'v', 'i', 'c'], ['d', 'eifie', 'd', 'c', 'ivi', 'c'], ['d', 'eifie', 'd', 'civic'], ['deified', 'c', 'i', 'v', 'i', 'c'], ['deified', 'c', 'ivi', 'c'], ['deified', 'civic']]\n assert candidate(s = \"kayaksapakayak\") == [['k', 'a', 'y', 'a', 'k', 's', 'a', 'p', 'a', 'k', 'a', 'y', 'a', 'k'], ['k', 'a', 'y', 'a', 'k', 's', 'a', 'p', 'a', 'k', 'aya', 'k'], ['k', 'a', 'y', 'a', 'k', 's', 'a', 'p', 'a', 'kayak'], ['k', 'a', 'y', 'a', 'k', 's', 'a', 'p', 'aka', 'y', 'a', 'k'], ['k', 'a', 'y', 'a', 'k', 's', 'apa', 'k', 'a', 'y', 'a', 'k'], ['k', 'a', 'y', 'a', 'k', 's', 'apa', 'k', 'aya', 'k'], ['k', 'a', 'y', 'a', 'k', 's', 'apa', 'kayak'], ['k', 'aya', 'k', 's', 'a', 'p', 'a', 'k', 'a', 'y', 'a', 'k'], ['k', 'aya', 'k', 's', 'a', 'p', 'a', 'k', 'aya', 'k'], ['k', 'aya', 'k', 's', 'a', 'p', 'a', 'kayak'], ['k', 'aya', 'k', 's', 'a', 'p', 'aka', 'y', 'a', 'k'], ['k', 'aya', 'k', 's', 'apa', 'k', 'a', 'y', 'a', 'k'], ['k', 'aya', 'k', 's', 'apa', 'k', 'aya', 'k'], ['k', 'aya', 'k', 's', 'apa', 'kayak'], ['kayak', 's', 'a', 'p', 'a', 'k', 'a', 'y', 'a', 'k'], ['kayak', 's', 'a', 'p', 'a', 'k', 'aya', 'k'], ['kayak', 's', 'a', 'p', 'a', 'kayak'], ['kayak', 's', 'a', 'p', 'aka', 'y', 'a', 'k'], ['kayak', 's', 'apa', 'k', 'a', 'y', 'a', 'k'], ['kayak', 's', 'apa', 'k', 'aya', 'k'], ['kayak', 's', 'apa', 'kayak']]\n assert candidate(s = \"repaperlevel\") == [['r', 'e', 'p', 'a', 'p', 'e', 'r', 'l', 'e', 'v', 'e', 'l'], ['r', 'e', 'p', 'a', 'p', 'e', 'r', 'l', 'eve', 'l'], ['r', 'e', 'p', 'a', 'p', 'e', 'r', 'level'], ['r', 'e', 'pap', 'e', 'r', 'l', 'e', 'v', 'e', 'l'], ['r', 'e', 'pap', 'e', 'r', 'l', 'eve', 'l'], ['r', 'e', 'pap', 'e', 'r', 'level'], ['r', 'epape', 'r', 'l', 'e', 'v', 'e', 'l'], ['r', 'epape', 'r', 'l', 'eve', 'l'], ['r', 'epape', 'r', 'level'], ['repaper', 'l', 'e', 'v', 'e', 'l'], ['repaper', 'l', 'eve', 'l'], ['repaper', 'level']]\n assert candidate(s = \"levellevel\") == [['l', 'e', 'v', 'e', 'l', 'l', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'l', 'l', 'eve', 'l'], ['l', 'e', 'v', 'e', 'l', 'level'], ['l', 'e', 'v', 'e', 'll', 'e', 'v', 'e', 'l'], ['l', 'e', 'v', 'e', 'll', 'eve', 'l'], ['l', 'e', 'v', 'elle', 'v', 'e', 'l'], ['l', 'e', 'vellev', 'e', 'l'], ['l', 'eve', 'l', 'l', 'e', 'v', 'e', 'l'], ['l', 'eve', 'l', 'l', 'eve', 'l'], ['l', 'eve', 'l', 'level'], ['l', 'eve', 'll', 'e', 'v', 'e', 'l'], ['l', 'eve', 'll', 'eve', 'l'], ['l', 'evelleve', 'l'], ['level', 'l', 'e', 'v', 'e', 'l'], ['level', 'l', 'eve', 'l'], ['level', 'level'], ['levellevel']]\n assert candidate(s = \"aibohphobia\") == [['a', 'i', 'b', 'o', 'h', 'p', 'h', 'o', 'b', 'i', 'a'], ['a', 'i', 'b', 'o', 'hph', 'o', 'b', 'i', 'a'], ['a', 'i', 'b', 'ohpho', 'b', 'i', 'a'], ['a', 'i', 'bohphob', 'i', 'a'], ['a', 'ibohphobi', 'a'], ['aibohphobia']]\n assert candidate(s = \"referredder\") == [['r', 'e', 'f', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'edde', 'r'], ['r', 'e', 'f', 'e', 'r', 'redder'], ['r', 'e', 'f', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'edde', 'r'], ['r', 'e', 'f', 'erre', 'd', 'd', 'e', 'r'], ['r', 'e', 'f', 'erre', 'dd', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'efe', 'r', 'r', 'edde', 'r'], ['r', 'efe', 'r', 'redder'], ['r', 'efe', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'efe', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'efe', 'rr', 'edde', 'r'], ['refer', 'r', 'e', 'd', 'd', 'e', 'r'], ['refer', 'r', 'e', 'dd', 'e', 'r'], ['refer', 'r', 'edde', 'r'], ['refer', 'redder']]\n assert candidate(s = \"stats\") == [['s', 't', 'a', 't', 's'], ['s', 'tat', 's'], ['stats']]\n assert candidate(s = \"referreferrefer\") == [['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r', 'refer'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'rr', 'efe', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'erre', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'e', 'ferref', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r', 'r', 'efe', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r', 'refer'], ['r', 'e', 'f', 'e', 'r', 'r', 'efe', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'efe', 'rr', 'efe', 'r'], ['r', 'e', 'f', 'e', 'r', 'r', 'eferrefe', 'r'], ['r', 'e', 'f', 'e', 'r', 'refer', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'r', 'refer', 'r', 'efe', 'r'], ['r', 'e', 'f', 'e', 'r', 'refer', 'refer'], ['r', 'e', 'f', 'e', 'r', 'referrefer'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r', 'r', 'efe', 'r'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r', 'refer'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'rr', 'efe', 'r'], ['r', 'e', 'f', 'e', 'rr', 'e', 'f', 'erre', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'e', 'ferref', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'efe', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'efe', 'r', 'r', 'efe', 'r'], ['r', 'e', 'f', 'e', 'rr', 'efe', 'r', 'refer'], ['r', 'e', 'f', 'e', 'rr', 'efe', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rr', 'efe', 'rr', 'efe', 'r'], ['r', 'e', 'f', 'e', 'rr', 'eferrefe', 'r'], ['r', 'e', 'f', 'e', 'rreferr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'e', 'rreferr', 'efe', 'r'], ['r', 'e', 'f', 'erre', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'erre', 'f', 'e', 'r', 'r', 'efe', 'r'], ['r', 'e', 'f', 'erre', 'f', 'e', 'r', 'refer'], ['r', 'e', 'f', 'erre', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'f', 'erre', 'f', 'e', 'rr', 'efe', 'r'], ['r', 'e', 'f', 'erre', 'f', 'erre', 'f', 'e', 'r'], ['r', 'e', 'f', 'erre', 'ferref', 'e', 'r'], ['r', 'e', 'f', 'erreferre', 'f', 'e', 'r'], ['r', 'e', 'ferref', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'e', 'ferref', 'e', 'r', 'r', 'efe', 'r'], ['r', 'e', 'ferref', 'e', 'r', 'refer'], ['r', 'e', 'ferref', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'e', 'ferref', 'e', 'rr', 'efe', 'r'], ['r', 'e', 'ferref', 'erre', 'f', 'e', 'r'], ['r', 'e', 'ferreferref', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r'], ['r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r', 'refer'], ['r', 'efe', 'r', 'r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'f', 'e', 'rr', 'efe', 'r'], ['r', 'efe', 'r', 'r', 'e', 'f', 'erre', 'f', 'e', 'r'], ['r', 'efe', 'r', 'r', 'e', 'ferref', 'e', 'r'], ['r', 'efe', 'r', 'r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r', 'r', 'efe', 'r', 'r', 'efe', 'r'], ['r', 'efe', 'r', 'r', 'efe', 'r', 'refer'], ['r', 'efe', 'r', 'r', 'efe', 'rr', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r', 'r', 'efe', 'rr', 'efe', 'r'], ['r', 'efe', 'r', 'r', 'eferrefe', 'r'], ['r', 'efe', 'r', 'refer', 'r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'r', 'refer', 'r', 'efe', 'r'], ['r', 'efe', 'r', 'refer', 'refer'], ['r', 'efe', 'r', 'referrefer'], ['r', 'efe', 'rr', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'rr', 'e', 'f', 'e', 'r', 'r', 'efe', 'r'], ['r', 'efe', 'rr', 'e', 'f', 'e', 'r', 'refer'], ['r', 'efe', 'rr', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['r', 'efe', 'rr', 'e', 'f', 'e', 'rr', 'efe', 'r'], ['r', 'efe', 'rr', 'e', 'f', 'erre', 'f', 'e', 'r'], ['r', 'efe', 'rr', 'e', 'ferref', 'e', 'r'], ['r', 'efe', 'rr', 'efe', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'efe', 'rr', 'efe', 'r', 'r', 'efe', 'r'], ['r', 'efe', 'rr', 'efe', 'r', 'refer'], ['r', 'efe', 'rr', 'efe', 'rr', 'e', 'f', 'e', 'r'], ['r', 'efe', 'rr', 'efe', 'rr', 'efe', 'r'], ['r', 'efe', 'rr', 'eferrefe', 'r'], ['r', 'efe', 'rreferr', 'e', 'f', 'e', 'r'], ['r', 'efe', 'rreferr', 'efe', 'r'], ['r', 'eferrefe', 'r', 'r', 'e', 'f', 'e', 'r'], ['r', 'eferrefe', 'r', 'r', 'efe', 'r'], ['r', 'eferrefe', 'r', 'refer'], ['r', 'eferrefe', 'rr', 'e', 'f', 'e', 'r'], ['r', 'eferrefe', 'rr', 'efe', 'r'], ['r', 'eferreferrefe', 'r'], ['refer', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'f', 'e', 'r'], ['refer', 'r', 'e', 'f', 'e', 'r', 'r', 'efe', 'r'], ['refer', 'r', 'e', 'f', 'e', 'r', 'refer'], ['refer', 'r', 'e', 'f', 'e', 'rr', 'e', 'f', 'e', 'r'], ['refer', 'r', 'e', 'f', 'e', 'rr', 'efe', 'r'], ['refer', 'r', 'e', 'f', 'erre', 'f', 'e', 'r'], ['refer', 'r', 'e', 'ferref', 'e', 'r'], ['refer', 'r', 'efe', 'r', 'r', 'e', 'f', 'e', 'r'], ['refer', 'r', 'efe', 'r', 'r', 'efe', 'r'], ['refer', 'r', 'efe', 'r', 'refer'], ['refer', 'r', 'efe', 'rr', 'e', 'f', 'e', 'r'], ['refer', 'r', 'efe', 'rr', 'efe', 'r'], ['refer', 'r', 'eferrefe', 'r'], ['refer', 'refer', 'r', 'e', 'f', 'e', 'r'], ['refer', 'refer', 'r', 'efe', 'r'], ['refer', 'refer', 'refer'], ['refer', 'referrefer'], ['referrefer', 'r', 'e', 'f', 'e', 'r'], ['referrefer', 'r', 'efe', 'r'], ['referrefer', 'refer'], ['referreferrefer']]\n assert candidate(s = \"rotorarotor\") == [['r', 'o', 't', 'o', 'r', 'a', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'r', 'a', 'r', 'oto', 'r'], ['r', 'o', 't', 'o', 'r', 'a', 'rotor'], ['r', 'o', 't', 'o', 'rar', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'o', 'rar', 'oto', 'r'], ['r', 'o', 't', 'oraro', 't', 'o', 'r'], ['r', 'o', 'torarot', 'o', 'r'], ['r', 'oto', 'r', 'a', 'r', 'o', 't', 'o', 'r'], ['r', 'oto', 'r', 'a', 'r', 'oto', 'r'], ['r', 'oto', 'r', 'a', 'rotor'], ['r', 'oto', 'rar', 'o', 't', 'o', 'r'], ['r', 'oto', 'rar', 'oto', 'r'], ['r', 'otoraroto', 'r'], ['rotor', 'a', 'r', 'o', 't', 'o', 'r'], ['rotor', 'a', 'r', 'oto', 'r'], ['rotor', 'a', 'rotor'], ['rotorarotor']]\n assert candidate(s = \"aaaaa\") == [['a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'aa'], ['a', 'a', 'aa', 'a'], ['a', 'a', 'aaa'], ['a', 'aa', 'a', 'a'], ['a', 'aa', 'aa'], ['a', 'aaa', 'a'], ['a', 'aaaa'], ['aa', 'a', 'a', 'a'], ['aa', 'a', 'aa'], ['aa', 'aa', 'a'], ['aa', 'aaa'], ['aaa', 'a', 'a'], ['aaa', 'aa'], ['aaaa', 'a'], ['aaaaa']]\n assert candidate(s = \"redderredder\") == [['r', 'e', 'd', 'd', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'd', 'd', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'e', 'd', 'd', 'e', 'r', 'r', 'edde', 'r'], ['r', 'e', 'd', 'd', 'e', 'r', 'redder'], ['r', 'e', 'd', 'd', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'd', 'd', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'e', 'd', 'd', 'e', 'rr', 'edde', 'r'], ['r', 'e', 'd', 'd', 'erre', 'd', 'd', 'e', 'r'], ['r', 'e', 'd', 'd', 'erre', 'dd', 'e', 'r'], ['r', 'e', 'd', 'derred', 'd', 'e', 'r'], ['r', 'e', 'dd', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'dd', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'e', 'dd', 'e', 'r', 'r', 'edde', 'r'], ['r', 'e', 'dd', 'e', 'r', 'redder'], ['r', 'e', 'dd', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'e', 'dd', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'e', 'dd', 'e', 'rr', 'edde', 'r'], ['r', 'e', 'dd', 'erre', 'd', 'd', 'e', 'r'], ['r', 'e', 'dd', 'erre', 'dd', 'e', 'r'], ['r', 'e', 'dderredd', 'e', 'r'], ['r', 'edde', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'edde', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'edde', 'r', 'r', 'edde', 'r'], ['r', 'edde', 'r', 'redder'], ['r', 'edde', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'edde', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'edde', 'rr', 'edde', 'r'], ['r', 'edderredde', 'r'], ['redder', 'r', 'e', 'd', 'd', 'e', 'r'], ['redder', 'r', 'e', 'dd', 'e', 'r'], ['redder', 'r', 'edde', 'r'], ['redder', 'redder'], ['redderredder']]\n assert candidate(s = \"racecarabc\") == [['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'b', 'c'], ['r', 'a', 'c', 'e', 'c', 'ara', 'b', 'c'], ['r', 'a', 'cec', 'a', 'r', 'a', 'b', 'c'], ['r', 'a', 'cec', 'ara', 'b', 'c'], ['r', 'aceca', 'r', 'a', 'b', 'c'], ['racecar', 'a', 'b', 'c']]\n assert candidate(s = \"abcbabcba\") == [['a', 'b', 'c', 'b', 'a', 'b', 'c', 'b', 'a'], ['a', 'b', 'c', 'b', 'a', 'bcb', 'a'], ['a', 'b', 'c', 'b', 'abcba'], ['a', 'b', 'c', 'bab', 'c', 'b', 'a'], ['a', 'b', 'cbabc', 'b', 'a'], ['a', 'bcb', 'a', 'b', 'c', 'b', 'a'], ['a', 'bcb', 'a', 'bcb', 'a'], ['a', 'bcb', 'abcba'], ['a', 'bcbabcb', 'a'], ['abcba', 'b', 'c', 'b', 'a'], ['abcba', 'bcb', 'a'], ['abcbabcba']]\n assert candidate(s = \"deifiedrotor\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'o', 't', 'o', 'r'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'r', 'oto', 'r'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'rotor'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'o', 't', 'o', 'r'], ['d', 'e', 'ifi', 'e', 'd', 'r', 'oto', 'r'], ['d', 'e', 'ifi', 'e', 'd', 'rotor'], ['d', 'eifie', 'd', 'r', 'o', 't', 'o', 'r'], ['d', 'eifie', 'd', 'r', 'oto', 'r'], ['d', 'eifie', 'd', 'rotor'], ['deified', 'r', 'o', 't', 'o', 'r'], ['deified', 'r', 'oto', 'r'], ['deified', 'rotor']]\n assert candidate(s = \"noonracecarrace\") == [['n', 'o', 'o', 'n', 'r', 'a', 'c', 'e', 'c', 'a', 'r', 'r', 'a', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'a', 'c', 'e', 'c', 'a', 'rr', 'a', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'a', 'c', 'e', 'c', 'arra', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'a', 'c', 'e', 'carrac', 'e'], ['n', 'o', 'o', 'n', 'r', 'a', 'c', 'ecarrace'], ['n', 'o', 'o', 'n', 'r', 'a', 'cec', 'a', 'r', 'r', 'a', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'a', 'cec', 'a', 'rr', 'a', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'a', 'cec', 'arra', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'aceca', 'r', 'r', 'a', 'c', 'e'], ['n', 'o', 'o', 'n', 'r', 'aceca', 'rr', 'a', 'c', 'e'], ['n', 'o', 'o', 'n', 'racecar', 'r', 'a', 'c', 'e'], ['n', 'oo', 'n', 'r', 'a', 'c', 'e', 'c', 'a', 'r', 'r', 'a', 'c', 'e'], ['n', 'oo', 'n', 'r', 'a', 'c', 'e', 'c', 'a', 'rr', 'a', 'c', 'e'], ['n', 'oo', 'n', 'r', 'a', 'c', 'e', 'c', 'arra', 'c', 'e'], ['n', 'oo', 'n', 'r', 'a', 'c', 'e', 'carrac', 'e'], ['n', 'oo', 'n', 'r', 'a', 'c', 'ecarrace'], ['n', 'oo', 'n', 'r', 'a', 'cec', 'a', 'r', 'r', 'a', 'c', 'e'], ['n', 'oo', 'n', 'r', 'a', 'cec', 'a', 'rr', 'a', 'c', 'e'], ['n', 'oo', 'n', 'r', 'a', 'cec', 'arra', 'c', 'e'], ['n', 'oo', 'n', 'r', 'aceca', 'r', 'r', 'a', 'c', 'e'], ['n', 'oo', 'n', 'r', 'aceca', 'rr', 'a', 'c', 'e'], ['n', 'oo', 'n', 'racecar', 'r', 'a', 'c', 'e'], ['noon', 'r', 'a', 'c', 'e', 'c', 'a', 'r', 'r', 'a', 'c', 'e'], ['noon', 'r', 'a', 'c', 'e', 'c', 'a', 'rr', 'a', 'c', 'e'], ['noon', 'r', 'a', 'c', 'e', 'c', 'arra', 'c', 'e'], ['noon', 'r', 'a', 'c', 'e', 'carrac', 'e'], ['noon', 'r', 'a', 'c', 'ecarrace'], ['noon', 'r', 'a', 'cec', 'a', 'r', 'r', 'a', 'c', 'e'], ['noon', 'r', 'a', 'cec', 'a', 'rr', 'a', 'c', 'e'], ['noon', 'r', 'a', 'cec', 'arra', 'c', 'e'], ['noon', 'r', 'aceca', 'r', 'r', 'a', 'c', 'e'], ['noon', 'r', 'aceca', 'rr', 'a', 'c', 'e'], ['noon', 'racecar', 'r', 'a', 'c', 'e']]\n assert candidate(s = \"civiccivic\") == [['c', 'i', 'v', 'i', 'c', 'c', 'i', 'v', 'i', 'c'], ['c', 'i', 'v', 'i', 'c', 'c', 'ivi', 'c'], ['c', 'i', 'v', 'i', 'c', 'civic'], ['c', 'i', 'v', 'i', 'cc', 'i', 'v', 'i', 'c'], ['c', 'i', 'v', 'i', 'cc', 'ivi', 'c'], ['c', 'i', 'v', 'icci', 'v', 'i', 'c'], ['c', 'i', 'vicciv', 'i', 'c'], ['c', 'ivi', 'c', 'c', 'i', 'v', 'i', 'c'], ['c', 'ivi', 'c', 'c', 'ivi', 'c'], ['c', 'ivi', 'c', 'civic'], ['c', 'ivi', 'cc', 'i', 'v', 'i', 'c'], ['c', 'ivi', 'cc', 'ivi', 'c'], ['c', 'iviccivi', 'c'], ['civic', 'c', 'i', 'v', 'i', 'c'], ['civic', 'c', 'ivi', 'c'], ['civic', 'civic'], ['civiccivic']]\n assert candidate(s = \"detartrated\") == [['d', 'e', 't', 'a', 'r', 't', 'r', 'a', 't', 'e', 'd'], ['d', 'e', 't', 'a', 'rtr', 'a', 't', 'e', 'd'], ['d', 'e', 't', 'artra', 't', 'e', 'd'], ['d', 'e', 'tartrat', 'e', 'd'], ['d', 'etartrate', 'd'], ['detartrated']]\n assert candidate(s = \"abccbaabba\") == [['a', 'b', 'c', 'c', 'b', 'a', 'a', 'b', 'b', 'a'], ['a', 'b', 'c', 'c', 'b', 'a', 'a', 'bb', 'a'], ['a', 'b', 'c', 'c', 'b', 'a', 'abba'], ['a', 'b', 'c', 'c', 'b', 'aa', 'b', 'b', 'a'], ['a', 'b', 'c', 'c', 'b', 'aa', 'bb', 'a'], ['a', 'b', 'c', 'c', 'baab', 'b', 'a'], ['a', 'b', 'cc', 'b', 'a', 'a', 'b', 'b', 'a'], ['a', 'b', 'cc', 'b', 'a', 'a', 'bb', 'a'], ['a', 'b', 'cc', 'b', 'a', 'abba'], ['a', 'b', 'cc', 'b', 'aa', 'b', 'b', 'a'], ['a', 'b', 'cc', 'b', 'aa', 'bb', 'a'], ['a', 'b', 'cc', 'baab', 'b', 'a'], ['a', 'bccb', 'a', 'a', 'b', 'b', 'a'], ['a', 'bccb', 'a', 'a', 'bb', 'a'], ['a', 'bccb', 'a', 'abba'], ['a', 'bccb', 'aa', 'b', 'b', 'a'], ['a', 'bccb', 'aa', 'bb', 'a'], ['abccba', 'a', 'b', 'b', 'a'], ['abccba', 'a', 'bb', 'a'], ['abccba', 'abba']]\n assert candidate(s = \"abccba\") == [['a', 'b', 'c', 'c', 'b', 'a'], ['a', 'b', 'cc', 'b', 'a'], ['a', 'bccb', 'a'], ['abccba']]\n assert candidate(s = \"aaabaaa\") == [['a', 'a', 'a', 'b', 'a', 'a', 'a'], ['a', 'a', 'a', 'b', 'a', 'aa'], ['a', 'a', 'a', 'b', 'aa', 'a'], ['a', 'a', 'a', 'b', 'aaa'], ['a', 'a', 'aba', 'a', 'a'], ['a', 'a', 'aba', 'aa'], ['a', 'aa', 'b', 'a', 'a', 'a'], ['a', 'aa', 'b', 'a', 'aa'], ['a', 'aa', 'b', 'aa', 'a'], ['a', 'aa', 'b', 'aaa'], ['a', 'aabaa', 'a'], ['aa', 'a', 'b', 'a', 'a', 'a'], ['aa', 'a', 'b', 'a', 'aa'], ['aa', 'a', 'b', 'aa', 'a'], ['aa', 'a', 'b', 'aaa'], ['aa', 'aba', 'a', 'a'], ['aa', 'aba', 'aa'], ['aaa', 'b', 'a', 'a', 'a'], ['aaa', 'b', 'a', 'aa'], ['aaa', 'b', 'aa', 'a'], ['aaa', 'b', 'aaa'], ['aaabaaa']]\n assert candidate(s = \"aabbccddeeff\") == [['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f'], ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'ff'], ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'ee', 'f', 'f'], ['a', 'a', 'b', 'b', 'c', 'c', 'd', 'd', 'ee', 'ff'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'e', 'e', 'f', 'f'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'e', 'e', 'ff'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'ee', 'f', 'f'], ['a', 'a', 'b', 'b', 'c', 'c', 'dd', 'ee', 'ff'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'e', 'e', 'f', 'f'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'e', 'e', 'ff'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'ee', 'f', 'f'], ['a', 'a', 'b', 'b', 'cc', 'd', 'd', 'ee', 'ff'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'e', 'e', 'f', 'f'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'e', 'e', 'ff'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'ee', 'f', 'f'], ['a', 'a', 'b', 'b', 'cc', 'dd', 'ee', 'ff'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'e', 'e', 'ff'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'ee', 'f', 'f'], ['a', 'a', 'bb', 'c', 'c', 'd', 'd', 'ee', 'ff'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'e', 'e', 'f', 'f'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'e', 'e', 'ff'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'ee', 'f', 'f'], ['a', 'a', 'bb', 'c', 'c', 'dd', 'ee', 'ff'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'e', 'e', 'f', 'f'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'e', 'e', 'ff'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'ee', 'f', 'f'], ['a', 'a', 'bb', 'cc', 'd', 'd', 'ee', 'ff'], ['a', 'a', 'bb', 'cc', 'dd', 'e', 'e', 'f', 'f'], ['a', 'a', 'bb', 'cc', 'dd', 'e', 'e', 'ff'], ['a', 'a', 'bb', 'cc', 'dd', 'ee', 'f', 'f'], ['a', 'a', 'bb', 'cc', 'dd', 'ee', 'ff'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'e', 'e', 'ff'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'ee', 'f', 'f'], ['aa', 'b', 'b', 'c', 'c', 'd', 'd', 'ee', 'ff'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'e', 'e', 'f', 'f'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'e', 'e', 'ff'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'ee', 'f', 'f'], ['aa', 'b', 'b', 'c', 'c', 'dd', 'ee', 'ff'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'e', 'e', 'f', 'f'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'e', 'e', 'ff'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'ee', 'f', 'f'], ['aa', 'b', 'b', 'cc', 'd', 'd', 'ee', 'ff'], ['aa', 'b', 'b', 'cc', 'dd', 'e', 'e', 'f', 'f'], ['aa', 'b', 'b', 'cc', 'dd', 'e', 'e', 'ff'], ['aa', 'b', 'b', 'cc', 'dd', 'ee', 'f', 'f'], ['aa', 'b', 'b', 'cc', 'dd', 'ee', 'ff'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'e', 'e', 'f', 'f'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'e', 'e', 'ff'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'ee', 'f', 'f'], ['aa', 'bb', 'c', 'c', 'd', 'd', 'ee', 'ff'], ['aa', 'bb', 'c', 'c', 'dd', 'e', 'e', 'f', 'f'], ['aa', 'bb', 'c', 'c', 'dd', 'e', 'e', 'ff'], ['aa', 'bb', 'c', 'c', 'dd', 'ee', 'f', 'f'], ['aa', 'bb', 'c', 'c', 'dd', 'ee', 'ff'], ['aa', 'bb', 'cc', 'd', 'd', 'e', 'e', 'f', 'f'], ['aa', 'bb', 'cc', 'd', 'd', 'e', 'e', 'ff'], ['aa', 'bb', 'cc', 'd', 'd', 'ee', 'f', 'f'], ['aa', 'bb', 'cc', 'd', 'd', 'ee', 'ff'], ['aa', 'bb', 'cc', 'dd', 'e', 'e', 'f', 'f'], ['aa', 'bb', 'cc', 'dd', 'e', 'e', 'ff'], ['aa', 'bb', 'cc', 'dd', 'ee', 'f', 'f'], ['aa', 'bb', 'cc', 'dd', 'ee', 'ff']]\n assert candidate(s = \"xyzyzyzyx\") == [['x', 'y', 'z', 'y', 'z', 'y', 'z', 'y', 'x'], ['x', 'y', 'z', 'y', 'z', 'yzy', 'x'], ['x', 'y', 'z', 'y', 'zyz', 'y', 'x'], ['x', 'y', 'z', 'yzy', 'z', 'y', 'x'], ['x', 'y', 'z', 'yzyzy', 'x'], ['x', 'y', 'zyz', 'y', 'z', 'y', 'x'], ['x', 'y', 'zyz', 'yzy', 'x'], ['x', 'y', 'zyzyz', 'y', 'x'], ['x', 'yzy', 'z', 'y', 'z', 'y', 'x'], ['x', 'yzy', 'z', 'yzy', 'x'], ['x', 'yzy', 'zyz', 'y', 'x'], ['x', 'yzyzy', 'z', 'y', 'x'], ['x', 'yzyzyzy', 'x'], ['xyzyzyzyx']]\n assert candidate(s = \"madamimadam\") == [['m', 'a', 'd', 'a', 'm', 'i', 'm', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'm', 'i', 'm', 'ada', 'm'], ['m', 'a', 'd', 'a', 'm', 'i', 'madam'], ['m', 'a', 'd', 'a', 'mim', 'a', 'd', 'a', 'm'], ['m', 'a', 'd', 'a', 'mim', 'ada', 'm'], ['m', 'a', 'd', 'amima', 'd', 'a', 'm'], ['m', 'a', 'damimad', 'a', 'm'], ['m', 'ada', 'm', 'i', 'm', 'a', 'd', 'a', 'm'], ['m', 'ada', 'm', 'i', 'm', 'ada', 'm'], ['m', 'ada', 'm', 'i', 'madam'], ['m', 'ada', 'mim', 'a', 'd', 'a', 'm'], ['m', 'ada', 'mim', 'ada', 'm'], ['m', 'adamimada', 'm'], ['madam', 'i', 'm', 'a', 'd', 'a', 'm'], ['madam', 'i', 'm', 'ada', 'm'], ['madam', 'i', 'madam'], ['madamimadam']]\n assert candidate(s = \"xyzyzyzyzyz\") == [['x', 'y', 'z', 'y', 'z', 'y', 'z', 'y', 'z', 'y', 'z'], ['x', 'y', 'z', 'y', 'z', 'y', 'z', 'y', 'zyz'], ['x', 'y', 'z', 'y', 'z', 'y', 'z', 'yzy', 'z'], ['x', 'y', 'z', 'y', 'z', 'y', 'zyz', 'y', 'z'], ['x', 'y', 'z', 'y', 'z', 'y', 'zyzyz'], ['x', 'y', 'z', 'y', 'z', 'yzy', 'z', 'y', 'z'], ['x', 'y', 'z', 'y', 'z', 'yzy', 'zyz'], ['x', 'y', 'z', 'y', 'z', 'yzyzy', 'z'], ['x', 'y', 'z', 'y', 'zyz', 'y', 'z', 'y', 'z'], ['x', 'y', 'z', 'y', 'zyz', 'y', 'zyz'], ['x', 'y', 'z', 'y', 'zyz', 'yzy', 'z'], ['x', 'y', 'z', 'y', 'zyzyz', 'y', 'z'], ['x', 'y', 'z', 'y', 'zyzyzyz'], ['x', 'y', 'z', 'yzy', 'z', 'y', 'z', 'y', 'z'], ['x', 'y', 'z', 'yzy', 'z', 'y', 'zyz'], ['x', 'y', 'z', 'yzy', 'z', 'yzy', 'z'], ['x', 'y', 'z', 'yzy', 'zyz', 'y', 'z'], ['x', 'y', 'z', 'yzy', 'zyzyz'], ['x', 'y', 'z', 'yzyzy', 'z', 'y', 'z'], ['x', 'y', 'z', 'yzyzy', 'zyz'], ['x', 'y', 'z', 'yzyzyzy', 'z'], ['x', 'y', 'zyz', 'y', 'z', 'y', 'z', 'y', 'z'], ['x', 'y', 'zyz', 'y', 'z', 'y', 'zyz'], ['x', 'y', 'zyz', 'y', 'z', 'yzy', 'z'], ['x', 'y', 'zyz', 'y', 'zyz', 'y', 'z'], ['x', 'y', 'zyz', 'y', 'zyzyz'], ['x', 'y', 'zyz', 'yzy', 'z', 'y', 'z'], ['x', 'y', 'zyz', 'yzy', 'zyz'], ['x', 'y', 'zyz', 'yzyzy', 'z'], ['x', 'y', 'zyzyz', 'y', 'z', 'y', 'z'], ['x', 'y', 'zyzyz', 'y', 'zyz'], ['x', 'y', 'zyzyz', 'yzy', 'z'], ['x', 'y', 'zyzyzyz', 'y', 'z'], ['x', 'y', 'zyzyzyzyz'], ['x', 'yzy', 'z', 'y', 'z', 'y', 'z', 'y', 'z'], ['x', 'yzy', 'z', 'y', 'z', 'y', 'zyz'], ['x', 'yzy', 'z', 'y', 'z', 'yzy', 'z'], ['x', 'yzy', 'z', 'y', 'zyz', 'y', 'z'], ['x', 'yzy', 'z', 'y', 'zyzyz'], ['x', 'yzy', 'z', 'yzy', 'z', 'y', 'z'], ['x', 'yzy', 'z', 'yzy', 'zyz'], ['x', 'yzy', 'z', 'yzyzy', 'z'], ['x', 'yzy', 'zyz', 'y', 'z', 'y', 'z'], ['x', 'yzy', 'zyz', 'y', 'zyz'], ['x', 'yzy', 'zyz', 'yzy', 'z'], ['x', 'yzy', 'zyzyz', 'y', 'z'], ['x', 'yzy', 'zyzyzyz'], ['x', 'yzyzy', 'z', 'y', 'z', 'y', 'z'], ['x', 'yzyzy', 'z', 'y', 'zyz'], ['x', 'yzyzy', 'z', 'yzy', 'z'], ['x', 'yzyzy', 'zyz', 'y', 'z'], ['x', 'yzyzy', 'zyzyz'], ['x', 'yzyzyzy', 'z', 'y', 'z'], ['x', 'yzyzyzy', 'zyz'], ['x', 'yzyzyzyzy', 'z']]\n assert candidate(s = \"rotatorrotor\") == [['r', 'o', 't', 'a', 't', 'o', 'r', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'a', 't', 'o', 'r', 'r', 'oto', 'r'], ['r', 'o', 't', 'a', 't', 'o', 'r', 'rotor'], ['r', 'o', 't', 'a', 't', 'o', 'rr', 'o', 't', 'o', 'r'], ['r', 'o', 't', 'a', 't', 'o', 'rr', 'oto', 'r'], ['r', 'o', 't', 'a', 't', 'orro', 't', 'o', 'r'], ['r', 'o', 't', 'a', 'torrot', 'o', 'r'], ['r', 'o', 'tat', 'o', 'r', 'r', 'o', 't', 'o', 'r'], ['r', 'o', 'tat', 'o', 'r', 'r', 'oto', 'r'], ['r', 'o', 'tat', 'o', 'r', 'rotor'], ['r', 'o', 'tat', 'o', 'rr', 'o', 't', 'o', 'r'], ['r', 'o', 'tat', 'o', 'rr', 'oto', 'r'], ['r', 'o', 'tat', 'orro', 't', 'o', 'r'], ['r', 'otato', 'r', 'r', 'o', 't', 'o', 'r'], ['r', 'otato', 'r', 'r', 'oto', 'r'], ['r', 'otato', 'r', 'rotor'], ['r', 'otato', 'rr', 'o', 't', 'o', 'r'], ['r', 'otato', 'rr', 'oto', 'r'], ['rotator', 'r', 'o', 't', 'o', 'r'], ['rotator', 'r', 'oto', 'r'], ['rotator', 'rotor']]\n assert candidate(s = \"racecarannakayak\") == [['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'n', 'a', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'nn', 'a', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'anna', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'anna', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'a', 'r', 'anna', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'n', 'a', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'ara', 'n', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'nn', 'a', 'k', 'aya', 'k'], ['r', 'a', 'c', 'e', 'c', 'ara', 'nn', 'a', 'kayak'], ['r', 'a', 'c', 'e', 'c', 'ara', 'nn', 'aka', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'n', 'a', 'kayak'], ['r', 'a', 'cec', 'a', 'r', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'a', 'r', 'a', 'nn', 'a', 'kayak'], ['r', 'a', 'cec', 'a', 'r', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'anna', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'a', 'r', 'anna', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'a', 'r', 'anna', 'kayak'], ['r', 'a', 'cec', 'ara', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'ara', 'n', 'n', 'a', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'ara', 'n', 'n', 'a', 'kayak'], ['r', 'a', 'cec', 'ara', 'n', 'n', 'aka', 'y', 'a', 'k'], ['r', 'a', 'cec', 'ara', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'a', 'cec', 'ara', 'nn', 'a', 'k', 'aya', 'k'], ['r', 'a', 'cec', 'ara', 'nn', 'a', 'kayak'], ['r', 'a', 'cec', 'ara', 'nn', 'aka', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['r', 'aceca', 'r', 'a', 'n', 'n', 'a', 'kayak'], ['r', 'aceca', 'r', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['r', 'aceca', 'r', 'a', 'nn', 'a', 'kayak'], ['r', 'aceca', 'r', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'anna', 'k', 'a', 'y', 'a', 'k'], ['r', 'aceca', 'r', 'anna', 'k', 'aya', 'k'], ['r', 'aceca', 'r', 'anna', 'kayak'], ['racecar', 'a', 'n', 'n', 'a', 'k', 'a', 'y', 'a', 'k'], ['racecar', 'a', 'n', 'n', 'a', 'k', 'aya', 'k'], ['racecar', 'a', 'n', 'n', 'a', 'kayak'], ['racecar', 'a', 'n', 'n', 'aka', 'y', 'a', 'k'], ['racecar', 'a', 'nn', 'a', 'k', 'a', 'y', 'a', 'k'], ['racecar', 'a', 'nn', 'a', 'k', 'aya', 'k'], ['racecar', 'a', 'nn', 'a', 'kayak'], ['racecar', 'a', 'nn', 'aka', 'y', 'a', 'k'], ['racecar', 'anna', 'k', 'a', 'y', 'a', 'k'], ['racecar', 'anna', 'k', 'aya', 'k'], ['racecar', 'anna', 'kayak']]\n assert candidate(s = \"tattarrattattat\") == [['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 't', 'atta', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 'tat', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 'tat', 'tat'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 't', 'tattat'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 'tt', 'atta', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'a', 'ttatt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'atta', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'atta', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'atta', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'r', 'r', 'attatta', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 't', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 't', 'atta', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 'tat', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 'tat', 'tat'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 't', 'tattat'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 'tt', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 'tt', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 'tt', 'atta', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'a', 'ttatt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'atta', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'atta', 't', 'tat'], ['t', 'a', 't', 't', 'a', 'rr', 'atta', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'a', 'rr', 'attatta', 't'], ['t', 'a', 't', 't', 'arra', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'arra', 't', 't', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'arra', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'arra', 't', 't', 'atta', 't'], ['t', 'a', 't', 't', 'arra', 't', 'tat', 't', 'a', 't'], ['t', 'a', 't', 't', 'arra', 't', 'tat', 'tat'], ['t', 'a', 't', 't', 'arra', 't', 'tattat'], ['t', 'a', 't', 't', 'arra', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 't', 'arra', 'tt', 'a', 't', 'tat'], ['t', 'a', 't', 't', 'arra', 'tt', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 't', 'arra', 'tt', 'atta', 't'], ['t', 'a', 't', 't', 'arra', 'ttatt', 'a', 't'], ['t', 'a', 't', 'tarrat', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 't', 'tarrat', 't', 'a', 't', 'tat'], ['t', 'a', 't', 'tarrat', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 't', 'tarrat', 't', 'atta', 't'], ['t', 'a', 't', 'tarrat', 'tat', 't', 'a', 't'], ['t', 'a', 't', 'tarrat', 'tat', 'tat'], ['t', 'a', 't', 'tarrat', 'tattat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 't', 'a', 't', 'tat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 't', 'atta', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 'tat', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 'tat', 'tat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 't', 'tattat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 'tt', 'a', 't', 'tat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 'tt', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 'tt', 'atta', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'a', 'ttatt', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'atta', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'atta', 't', 'tat'], ['t', 'a', 'tt', 'a', 'r', 'r', 'atta', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'r', 'r', 'attatta', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 't', 'a', 't', 'tat'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 't', 'atta', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 'tat', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 'tat', 'tat'], ['t', 'a', 'tt', 'a', 'rr', 'a', 't', 'tattat'], ['t', 'a', 'tt', 'a', 'rr', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 'tt', 'a', 't', 'tat'], ['t', 'a', 'tt', 'a', 'rr', 'a', 'tt', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 'tt', 'atta', 't'], ['t', 'a', 'tt', 'a', 'rr', 'a', 'ttatt', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'atta', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'atta', 't', 'tat'], ['t', 'a', 'tt', 'a', 'rr', 'atta', 'tt', 'a', 't'], ['t', 'a', 'tt', 'a', 'rr', 'attatta', 't'], ['t', 'a', 'tt', 'arra', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'arra', 't', 't', 'a', 't', 'tat'], ['t', 'a', 'tt', 'arra', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'arra', 't', 't', 'atta', 't'], ['t', 'a', 'tt', 'arra', 't', 'tat', 't', 'a', 't'], ['t', 'a', 'tt', 'arra', 't', 'tat', 'tat'], ['t', 'a', 'tt', 'arra', 't', 'tattat'], ['t', 'a', 'tt', 'arra', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'a', 'tt', 'arra', 'tt', 'a', 't', 'tat'], ['t', 'a', 'tt', 'arra', 'tt', 'a', 'tt', 'a', 't'], ['t', 'a', 'tt', 'arra', 'tt', 'atta', 't'], ['t', 'a', 'tt', 'arra', 'ttatt', 'a', 't'], ['t', 'a', 'ttarratt', 'a', 't', 't', 'a', 't'], ['t', 'a', 'ttarratt', 'a', 't', 'tat'], ['t', 'a', 'ttarratt', 'a', 'tt', 'a', 't'], ['t', 'a', 'ttarratt', 'atta', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 't', 'a', 't', 'tat'], ['t', 'atta', 'r', 'r', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 't', 'atta', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 'tat', 't', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 't', 'tat', 'tat'], ['t', 'atta', 'r', 'r', 'a', 't', 'tattat'], ['t', 'atta', 'r', 'r', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 'tt', 'a', 't', 'tat'], ['t', 'atta', 'r', 'r', 'a', 'tt', 'a', 'tt', 'a', 't'], ['t', 'atta', 'r', 'r', 'a', 'tt', 'atta', 't'], ['t', 'atta', 'r', 'r', 'a', 'ttatt', 'a', 't'], ['t', 'atta', 'r', 'r', 'atta', 't', 't', 'a', 't'], ['t', 'atta', 'r', 'r', 'atta', 't', 'tat'], ['t', 'atta', 'r', 'r', 'atta', 'tt', 'a', 't'], ['t', 'atta', 'r', 'r', 'attatta', 't'], ['t', 'atta', 'rr', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['t', 'atta', 'rr', 'a', 't', 't', 'a', 't', 'tat'], ['t', 'atta', 'rr', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['t', 'atta', 'rr', 'a', 't', 't', 'atta', 't'], ['t', 'atta', 'rr', 'a', 't', 'tat', 't', 'a', 't'], ['t', 'atta', 'rr', 'a', 't', 'tat', 'tat'], ['t', 'atta', 'rr', 'a', 't', 'tattat'], ['t', 'atta', 'rr', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['t', 'atta', 'rr', 'a', 'tt', 'a', 't', 'tat'], ['t', 'atta', 'rr', 'a', 'tt', 'a', 'tt', 'a', 't'], ['t', 'atta', 'rr', 'a', 'tt', 'atta', 't'], ['t', 'atta', 'rr', 'a', 'ttatt', 'a', 't'], ['t', 'atta', 'rr', 'atta', 't', 't', 'a', 't'], ['t', 'atta', 'rr', 'atta', 't', 'tat'], ['t', 'atta', 'rr', 'atta', 'tt', 'a', 't'], ['t', 'atta', 'rr', 'attatta', 't'], ['t', 'attarratta', 't', 't', 'a', 't'], ['t', 'attarratta', 't', 'tat'], ['t', 'attarratta', 'tt', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 't', 'tat'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 't', 'atta', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 'tat', 't', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 'tat', 'tat'], ['tat', 't', 'a', 'r', 'r', 'a', 't', 'tattat'], ['tat', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 't', 'tat'], ['tat', 't', 'a', 'r', 'r', 'a', 'tt', 'a', 'tt', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 'tt', 'atta', 't'], ['tat', 't', 'a', 'r', 'r', 'a', 'ttatt', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'atta', 't', 't', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'atta', 't', 'tat'], ['tat', 't', 'a', 'r', 'r', 'atta', 'tt', 'a', 't'], ['tat', 't', 'a', 'r', 'r', 'attatta', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 't', 'a', 't', 't', 'a', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 't', 'a', 't', 'tat'], ['tat', 't', 'a', 'rr', 'a', 't', 't', 'a', 'tt', 'a', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 't', 'atta', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 'tat', 't', 'a', 't'], ['tat', 't', 'a', 'rr', 'a', 't', 'tat', 'tat'], ['tat', 't', 'a', 'rr', 'a', 't', 'tattat'], ['tat', 't', 'a', 'rr', 'a', 'tt', 'a', 't', 't', 'a', 't'], ['tat', 't', 'a', 'rr', 'a', 'tt', 'a', 't', 'tat'], ['tat', 't', 'a', 'rr', 'a', 'tt', 'a', 'tt', 'a', 't'], ['tat', 't', 'a', 'rr', 'a', 'tt', 'atta', 't'], ['tat', 't', 'a', 'rr', 'a', 'ttatt', 'a', 't'], ['tat', 't', 'a', 'rr', 'atta', 't', 't', 'a', 't'], ['tat', 't', 'a', 'rr', 'atta', 't', 'tat'], ['tat', 't', 'a', 'rr', 'atta', 'tt', 'a', 't'], ['tat', 't', 'a', 'rr', 'attatta', 't'], ['tat', 't', 'arra', 't', 't', 'a', 't', 't', 'a', 't'], ['tat', 't', 'arra', 't', 't', 'a', 't', 'tat'], ['tat', 't', 'arra', 't', 't', 'a', 'tt', 'a', 't'], ['tat', 't', 'arra', 't', 't', 'atta', 't'], ['tat', 't', 'arra', 't', 'tat', 't', 'a', 't'], ['tat', 't', 'arra', 't', 'tat', 'tat'], ['tat', 't', 'arra', 't', 'tattat'], ['tat', 't', 'arra', 'tt', 'a', 't', 't', 'a', 't'], ['tat', 't', 'arra', 'tt', 'a', 't', 'tat'], ['tat', 't', 'arra', 'tt', 'a', 'tt', 'a', 't'], ['tat', 't', 'arra', 'tt', 'atta', 't'], ['tat', 't', 'arra', 'ttatt', 'a', 't'], ['tat', 'tarrat', 't', 'a', 't', 't', 'a', 't'], ['tat', 'tarrat', 't', 'a', 't', 'tat'], ['tat', 'tarrat', 't', 'a', 'tt', 'a', 't'], ['tat', 'tarrat', 't', 'atta', 't'], ['tat', 'tarrat', 'tat', 't', 'a', 't'], ['tat', 'tarrat', 'tat', 'tat'], ['tat', 'tarrat', 'tattat'], ['tattarrattat', 't', 'a', 't'], ['tattarrattat', 'tat']]\n assert candidate(s = \"rotorreferredder\") == [['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'edde', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'r', 'redder'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'e', 'rr', 'edde', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'erre', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'f', 'erre', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'r', 'r', 'edde', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'r', 'redder'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'efe', 'rr', 'edde', 'r'], ['r', 'o', 't', 'o', 'r', 'refer', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'refer', 'r', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'refer', 'r', 'edde', 'r'], ['r', 'o', 't', 'o', 'r', 'refer', 'redder'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'r', 'r', 'edde', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'r', 'redder'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'e', 'rr', 'edde', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'erre', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'f', 'erre', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'efe', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'efe', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'efe', 'r', 'r', 'edde', 'r'], ['r', 'o', 't', 'o', 'rr', 'efe', 'r', 'redder'], ['r', 'o', 't', 'o', 'rr', 'efe', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'efe', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'efe', 'rr', 'edde', 'r'], ['r', 'o', 't', 'o', 'rreferr', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rreferr', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rreferr', 'edde', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'r', 'r', 'edde', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'r', 'redder'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'e', 'rr', 'edde', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'erre', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'e', 'f', 'erre', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'efe', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'efe', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'efe', 'r', 'r', 'edde', 'r'], ['r', 'oto', 'r', 'r', 'efe', 'r', 'redder'], ['r', 'oto', 'r', 'r', 'efe', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'efe', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'efe', 'rr', 'edde', 'r'], ['r', 'oto', 'r', 'refer', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'refer', 'r', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'refer', 'r', 'edde', 'r'], ['r', 'oto', 'r', 'refer', 'redder'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'r', 'r', 'edde', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'r', 'redder'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'e', 'rr', 'edde', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'erre', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rr', 'e', 'f', 'erre', 'dd', 'e', 'r'], ['r', 'oto', 'rr', 'efe', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rr', 'efe', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'rr', 'efe', 'r', 'r', 'edde', 'r'], ['r', 'oto', 'rr', 'efe', 'r', 'redder'], ['r', 'oto', 'rr', 'efe', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rr', 'efe', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'rr', 'efe', 'rr', 'edde', 'r'], ['r', 'oto', 'rreferr', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rreferr', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'rreferr', 'edde', 'r'], ['rotor', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['rotor', 'r', 'e', 'f', 'e', 'r', 'r', 'e', 'dd', 'e', 'r'], ['rotor', 'r', 'e', 'f', 'e', 'r', 'r', 'edde', 'r'], ['rotor', 'r', 'e', 'f', 'e', 'r', 'redder'], ['rotor', 'r', 'e', 'f', 'e', 'rr', 'e', 'd', 'd', 'e', 'r'], ['rotor', 'r', 'e', 'f', 'e', 'rr', 'e', 'dd', 'e', 'r'], ['rotor', 'r', 'e', 'f', 'e', 'rr', 'edde', 'r'], ['rotor', 'r', 'e', 'f', 'erre', 'd', 'd', 'e', 'r'], ['rotor', 'r', 'e', 'f', 'erre', 'dd', 'e', 'r'], ['rotor', 'r', 'efe', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['rotor', 'r', 'efe', 'r', 'r', 'e', 'dd', 'e', 'r'], ['rotor', 'r', 'efe', 'r', 'r', 'edde', 'r'], ['rotor', 'r', 'efe', 'r', 'redder'], ['rotor', 'r', 'efe', 'rr', 'e', 'd', 'd', 'e', 'r'], ['rotor', 'r', 'efe', 'rr', 'e', 'dd', 'e', 'r'], ['rotor', 'r', 'efe', 'rr', 'edde', 'r'], ['rotor', 'refer', 'r', 'e', 'd', 'd', 'e', 'r'], ['rotor', 'refer', 'r', 'e', 'dd', 'e', 'r'], ['rotor', 'refer', 'r', 'edde', 'r'], ['rotor', 'refer', 'redder']]\n assert candidate(s = \"deifiedmadam\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd', 'm', 'a', 'd', 'a', 'm'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'm', 'ada', 'm'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'madam'], ['d', 'e', 'ifi', 'e', 'd', 'm', 'a', 'd', 'a', 'm'], ['d', 'e', 'ifi', 'e', 'd', 'm', 'ada', 'm'], ['d', 'e', 'ifi', 'e', 'd', 'madam'], ['d', 'eifie', 'd', 'm', 'a', 'd', 'a', 'm'], ['d', 'eifie', 'd', 'm', 'ada', 'm'], ['d', 'eifie', 'd', 'madam'], ['deified', 'm', 'a', 'd', 'a', 'm'], ['deified', 'm', 'ada', 'm'], ['deified', 'madam']]\n assert candidate(s = \"noonhighnoon\") == [['n', 'o', 'o', 'n', 'h', 'i', 'g', 'h', 'n', 'o', 'o', 'n'], ['n', 'o', 'o', 'n', 'h', 'i', 'g', 'h', 'n', 'oo', 'n'], ['n', 'o', 'o', 'n', 'h', 'i', 'g', 'h', 'noon'], ['n', 'oo', 'n', 'h', 'i', 'g', 'h', 'n', 'o', 'o', 'n'], ['n', 'oo', 'n', 'h', 'i', 'g', 'h', 'n', 'oo', 'n'], ['n', 'oo', 'n', 'h', 'i', 'g', 'h', 'noon'], ['noon', 'h', 'i', 'g', 'h', 'n', 'o', 'o', 'n'], ['noon', 'h', 'i', 'g', 'h', 'n', 'oo', 'n'], ['noon', 'h', 'i', 'g', 'h', 'noon']]\n assert candidate(s = \"aabbababa\") == [['a', 'a', 'b', 'b', 'a', 'b', 'a', 'b', 'a'], ['a', 'a', 'b', 'b', 'a', 'b', 'aba'], ['a', 'a', 'b', 'b', 'a', 'bab', 'a'], ['a', 'a', 'b', 'b', 'aba', 'b', 'a'], ['a', 'a', 'b', 'b', 'ababa'], ['a', 'a', 'b', 'bab', 'a', 'b', 'a'], ['a', 'a', 'b', 'bab', 'aba'], ['a', 'a', 'b', 'babab', 'a'], ['a', 'a', 'bb', 'a', 'b', 'a', 'b', 'a'], ['a', 'a', 'bb', 'a', 'b', 'aba'], ['a', 'a', 'bb', 'a', 'bab', 'a'], ['a', 'a', 'bb', 'aba', 'b', 'a'], ['a', 'a', 'bb', 'ababa'], ['a', 'abba', 'b', 'a', 'b', 'a'], ['a', 'abba', 'b', 'aba'], ['a', 'abba', 'bab', 'a'], ['aa', 'b', 'b', 'a', 'b', 'a', 'b', 'a'], ['aa', 'b', 'b', 'a', 'b', 'aba'], ['aa', 'b', 'b', 'a', 'bab', 'a'], ['aa', 'b', 'b', 'aba', 'b', 'a'], ['aa', 'b', 'b', 'ababa'], ['aa', 'b', 'bab', 'a', 'b', 'a'], ['aa', 'b', 'bab', 'aba'], ['aa', 'b', 'babab', 'a'], ['aa', 'bb', 'a', 'b', 'a', 'b', 'a'], ['aa', 'bb', 'a', 'b', 'aba'], ['aa', 'bb', 'a', 'bab', 'a'], ['aa', 'bb', 'aba', 'b', 'a'], ['aa', 'bb', 'ababa']]\n assert candidate(s = \"noonlevelnoon\") == [['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n'], ['n', 'o', 'o', 'n', 'l', 'e', 'v', 'e', 'l', 'noon'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'n', 'o', 'o', 'n'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'n', 'oo', 'n'], ['n', 'o', 'o', 'n', 'l', 'eve', 'l', 'noon'], ['n', 'o', 'o', 'n', 'level', 'n', 'o', 'o', 'n'], ['n', 'o', 'o', 'n', 'level', 'n', 'oo', 'n'], ['n', 'o', 'o', 'n', 'level', 'noon'], ['n', 'o', 'o', 'nleveln', 'o', 'o', 'n'], ['n', 'o', 'o', 'nleveln', 'oo', 'n'], ['n', 'o', 'onlevelno', 'o', 'n'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n'], ['n', 'oo', 'n', 'l', 'e', 'v', 'e', 'l', 'noon'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'n', 'o', 'o', 'n'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'n', 'oo', 'n'], ['n', 'oo', 'n', 'l', 'eve', 'l', 'noon'], ['n', 'oo', 'n', 'level', 'n', 'o', 'o', 'n'], ['n', 'oo', 'n', 'level', 'n', 'oo', 'n'], ['n', 'oo', 'n', 'level', 'noon'], ['n', 'oo', 'nleveln', 'o', 'o', 'n'], ['n', 'oo', 'nleveln', 'oo', 'n'], ['n', 'oonlevelnoo', 'n'], ['noon', 'l', 'e', 'v', 'e', 'l', 'n', 'o', 'o', 'n'], ['noon', 'l', 'e', 'v', 'e', 'l', 'n', 'oo', 'n'], ['noon', 'l', 'e', 'v', 'e', 'l', 'noon'], ['noon', 'l', 'eve', 'l', 'n', 'o', 'o', 'n'], ['noon', 'l', 'eve', 'l', 'n', 'oo', 'n'], ['noon', 'l', 'eve', 'l', 'noon'], ['noon', 'level', 'n', 'o', 'o', 'n'], ['noon', 'level', 'n', 'oo', 'n'], ['noon', 'level', 'noon'], ['noonlevelnoon']]\n assert candidate(s = \"abacdfgdcaba\") == [['a', 'b', 'a', 'c', 'd', 'f', 'g', 'd', 'c', 'a', 'b', 'a'], ['a', 'b', 'a', 'c', 'd', 'f', 'g', 'd', 'c', 'aba'], ['aba', 'c', 'd', 'f', 'g', 'd', 'c', 'a', 'b', 'a'], ['aba', 'c', 'd', 'f', 'g', 'd', 'c', 'aba']]\n assert candidate(s = \"abbaabba\") == [['a', 'b', 'b', 'a', 'a', 'b', 'b', 'a'], ['a', 'b', 'b', 'a', 'a', 'bb', 'a'], ['a', 'b', 'b', 'a', 'abba'], ['a', 'b', 'b', 'aa', 'b', 'b', 'a'], ['a', 'b', 'b', 'aa', 'bb', 'a'], ['a', 'b', 'baab', 'b', 'a'], ['a', 'bb', 'a', 'a', 'b', 'b', 'a'], ['a', 'bb', 'a', 'a', 'bb', 'a'], ['a', 'bb', 'a', 'abba'], ['a', 'bb', 'aa', 'b', 'b', 'a'], ['a', 'bb', 'aa', 'bb', 'a'], ['a', 'bbaabb', 'a'], ['abba', 'a', 'b', 'b', 'a'], ['abba', 'a', 'bb', 'a'], ['abba', 'abba'], ['abbaabba']]\n assert candidate(s = \"deifieddeified\") == [['d', 'e', 'i', 'f', 'i', 'e', 'd', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'd', 'eifie', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'd', 'deified'], ['d', 'e', 'i', 'f', 'i', 'e', 'dd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'dd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'e', 'dd', 'eifie', 'd'], ['d', 'e', 'i', 'f', 'i', 'edde', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'f', 'i', 'edde', 'ifi', 'e', 'd'], ['d', 'e', 'i', 'f', 'ieddei', 'f', 'i', 'e', 'd'], ['d', 'e', 'i', 'fieddeif', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'd', 'eifie', 'd'], ['d', 'e', 'ifi', 'e', 'd', 'deified'], ['d', 'e', 'ifi', 'e', 'dd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'dd', 'e', 'ifi', 'e', 'd'], ['d', 'e', 'ifi', 'e', 'dd', 'eifie', 'd'], ['d', 'e', 'ifi', 'edde', 'i', 'f', 'i', 'e', 'd'], ['d', 'e', 'ifi', 'edde', 'ifi', 'e', 'd'], ['d', 'e', 'ifieddeifi', 'e', 'd'], ['d', 'eifie', 'd', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'eifie', 'd', 'd', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'd', 'd', 'eifie', 'd'], ['d', 'eifie', 'd', 'deified'], ['d', 'eifie', 'dd', 'e', 'i', 'f', 'i', 'e', 'd'], ['d', 'eifie', 'dd', 'e', 'ifi', 'e', 'd'], ['d', 'eifie', 'dd', 'eifie', 'd'], ['d', 'eifieddeifie', 'd'], ['deified', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['deified', 'd', 'e', 'ifi', 'e', 'd'], ['deified', 'd', 'eifie', 'd'], ['deified', 'deified'], ['deifieddeified']]\n assert candidate(s = \"wowzowwow\") == [['w', 'o', 'w', 'z', 'o', 'w', 'w', 'o', 'w'], ['w', 'o', 'w', 'z', 'o', 'w', 'wow'], ['w', 'o', 'w', 'z', 'o', 'ww', 'o', 'w'], ['w', 'o', 'w', 'z', 'owwo', 'w'], ['wow', 'z', 'o', 'w', 'w', 'o', 'w'], ['wow', 'z', 'o', 'w', 'wow'], ['wow', 'z', 'o', 'ww', 'o', 'w'], ['wow', 'z', 'owwo', 'w']]\n assert candidate(s = \"kayaklevelmadam\") == [['k', 'a', 'y', 'a', 'k', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['k', 'a', 'y', 'a', 'k', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['k', 'a', 'y', 'a', 'k', 'l', 'e', 'v', 'e', 'l', 'madam'], ['k', 'a', 'y', 'a', 'k', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['k', 'a', 'y', 'a', 'k', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['k', 'a', 'y', 'a', 'k', 'l', 'eve', 'l', 'madam'], ['k', 'a', 'y', 'a', 'k', 'level', 'm', 'a', 'd', 'a', 'm'], ['k', 'a', 'y', 'a', 'k', 'level', 'm', 'ada', 'm'], ['k', 'a', 'y', 'a', 'k', 'level', 'madam'], ['k', 'aya', 'k', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['k', 'aya', 'k', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['k', 'aya', 'k', 'l', 'e', 'v', 'e', 'l', 'madam'], ['k', 'aya', 'k', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['k', 'aya', 'k', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['k', 'aya', 'k', 'l', 'eve', 'l', 'madam'], ['k', 'aya', 'k', 'level', 'm', 'a', 'd', 'a', 'm'], ['k', 'aya', 'k', 'level', 'm', 'ada', 'm'], ['k', 'aya', 'k', 'level', 'madam'], ['kayak', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['kayak', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['kayak', 'l', 'e', 'v', 'e', 'l', 'madam'], ['kayak', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['kayak', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['kayak', 'l', 'eve', 'l', 'madam'], ['kayak', 'level', 'm', 'a', 'd', 'a', 'm'], ['kayak', 'level', 'm', 'ada', 'm'], ['kayak', 'level', 'madam']]\n assert candidate(s = \"ababababa\") == [['a', 'b', 'a', 'b', 'a', 'b', 'a', 'b', 'a'], ['a', 'b', 'a', 'b', 'a', 'b', 'aba'], ['a', 'b', 'a', 'b', 'a', 'bab', 'a'], ['a', 'b', 'a', 'b', 'aba', 'b', 'a'], ['a', 'b', 'a', 'b', 'ababa'], ['a', 'b', 'a', 'bab', 'a', 'b', 'a'], ['a', 'b', 'a', 'bab', 'aba'], ['a', 'b', 'a', 'babab', 'a'], ['a', 'b', 'aba', 'b', 'a', 'b', 'a'], ['a', 'b', 'aba', 'b', 'aba'], ['a', 'b', 'aba', 'bab', 'a'], ['a', 'b', 'ababa', 'b', 'a'], ['a', 'b', 'abababa'], ['a', 'bab', 'a', 'b', 'a', 'b', 'a'], ['a', 'bab', 'a', 'b', 'aba'], ['a', 'bab', 'a', 'bab', 'a'], ['a', 'bab', 'aba', 'b', 'a'], ['a', 'bab', 'ababa'], ['a', 'babab', 'a', 'b', 'a'], ['a', 'babab', 'aba'], ['a', 'bababab', 'a'], ['aba', 'b', 'a', 'b', 'a', 'b', 'a'], ['aba', 'b', 'a', 'b', 'aba'], ['aba', 'b', 'a', 'bab', 'a'], ['aba', 'b', 'aba', 'b', 'a'], ['aba', 'b', 'ababa'], ['aba', 'bab', 'a', 'b', 'a'], ['aba', 'bab', 'aba'], ['aba', 'babab', 'a'], ['ababa', 'b', 'a', 'b', 'a'], ['ababa', 'b', 'aba'], ['ababa', 'bab', 'a'], ['abababa', 'b', 'a'], ['ababababa']]\n assert candidate(s = \"xyxzyx\") == [['x', 'y', 'x', 'z', 'y', 'x'], ['xyx', 'z', 'y', 'x']]\n assert candidate(s = \"steponnopest\") == [['s', 't', 'e', 'p', 'o', 'n', 'n', 'o', 'p', 'e', 's', 't'], ['s', 't', 'e', 'p', 'o', 'nn', 'o', 'p', 'e', 's', 't'], ['s', 't', 'e', 'p', 'onno', 'p', 'e', 's', 't'], ['s', 't', 'e', 'ponnop', 'e', 's', 't'], ['s', 't', 'eponnope', 's', 't']]\n assert candidate(s = \"mississippi\") == [['m', 'i', 's', 's', 'i', 's', 's', 'i', 'p', 'p', 'i'], ['m', 'i', 's', 's', 'i', 's', 's', 'i', 'pp', 'i'], ['m', 'i', 's', 's', 'i', 's', 's', 'ippi'], ['m', 'i', 's', 's', 'i', 'ss', 'i', 'p', 'p', 'i'], ['m', 'i', 's', 's', 'i', 'ss', 'i', 'pp', 'i'], ['m', 'i', 's', 's', 'i', 'ss', 'ippi'], ['m', 'i', 's', 's', 'issi', 'p', 'p', 'i'], ['m', 'i', 's', 's', 'issi', 'pp', 'i'], ['m', 'i', 's', 'sis', 's', 'i', 'p', 'p', 'i'], ['m', 'i', 's', 'sis', 's', 'i', 'pp', 'i'], ['m', 'i', 's', 'sis', 's', 'ippi'], ['m', 'i', 'ss', 'i', 's', 's', 'i', 'p', 'p', 'i'], ['m', 'i', 'ss', 'i', 's', 's', 'i', 'pp', 'i'], ['m', 'i', 'ss', 'i', 's', 's', 'ippi'], ['m', 'i', 'ss', 'i', 'ss', 'i', 'p', 'p', 'i'], ['m', 'i', 'ss', 'i', 'ss', 'i', 'pp', 'i'], ['m', 'i', 'ss', 'i', 'ss', 'ippi'], ['m', 'i', 'ss', 'issi', 'p', 'p', 'i'], ['m', 'i', 'ss', 'issi', 'pp', 'i'], ['m', 'i', 'ssiss', 'i', 'p', 'p', 'i'], ['m', 'i', 'ssiss', 'i', 'pp', 'i'], ['m', 'i', 'ssiss', 'ippi'], ['m', 'issi', 's', 's', 'i', 'p', 'p', 'i'], ['m', 'issi', 's', 's', 'i', 'pp', 'i'], ['m', 'issi', 's', 's', 'ippi'], ['m', 'issi', 'ss', 'i', 'p', 'p', 'i'], ['m', 'issi', 'ss', 'i', 'pp', 'i'], ['m', 'issi', 'ss', 'ippi'], ['m', 'ississi', 'p', 'p', 'i'], ['m', 'ississi', 'pp', 'i']]\n assert candidate(s = \"redividerdeified\") == [['r', 'e', 'd', 'i', 'v', 'i', 'd', 'e', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'e', 'd', 'i', 'v', 'i', 'd', 'e', 'r', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'e', 'd', 'i', 'v', 'i', 'd', 'e', 'r', 'd', 'eifie', 'd'], ['r', 'e', 'd', 'i', 'v', 'i', 'd', 'e', 'r', 'deified'], ['r', 'e', 'd', 'ivi', 'd', 'e', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'e', 'd', 'ivi', 'd', 'e', 'r', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'e', 'd', 'ivi', 'd', 'e', 'r', 'd', 'eifie', 'd'], ['r', 'e', 'd', 'ivi', 'd', 'e', 'r', 'deified'], ['r', 'e', 'divid', 'e', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'e', 'divid', 'e', 'r', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'e', 'divid', 'e', 'r', 'd', 'eifie', 'd'], ['r', 'e', 'divid', 'e', 'r', 'deified'], ['r', 'edivide', 'r', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['r', 'edivide', 'r', 'd', 'e', 'ifi', 'e', 'd'], ['r', 'edivide', 'r', 'd', 'eifie', 'd'], ['r', 'edivide', 'r', 'deified'], ['redivider', 'd', 'e', 'i', 'f', 'i', 'e', 'd'], ['redivider', 'd', 'e', 'ifi', 'e', 'd'], ['redivider', 'd', 'eifie', 'd'], ['redivider', 'deified']]\n assert candidate(s = \"rotorlevelmadam\") == [['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['r', 'o', 't', 'o', 'r', 'l', 'e', 'v', 'e', 'l', 'madam'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['r', 'o', 't', 'o', 'r', 'l', 'eve', 'l', 'madam'], ['r', 'o', 't', 'o', 'r', 'level', 'm', 'a', 'd', 'a', 'm'], ['r', 'o', 't', 'o', 'r', 'level', 'm', 'ada', 'm'], ['r', 'o', 't', 'o', 'r', 'level', 'madam'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['r', 'oto', 'r', 'l', 'e', 'v', 'e', 'l', 'madam'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['r', 'oto', 'r', 'l', 'eve', 'l', 'madam'], ['r', 'oto', 'r', 'level', 'm', 'a', 'd', 'a', 'm'], ['r', 'oto', 'r', 'level', 'm', 'ada', 'm'], ['r', 'oto', 'r', 'level', 'madam'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'm', 'a', 'd', 'a', 'm'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'm', 'ada', 'm'], ['rotor', 'l', 'e', 'v', 'e', 'l', 'madam'], ['rotor', 'l', 'eve', 'l', 'm', 'a', 'd', 'a', 'm'], ['rotor', 'l', 'eve', 'l', 'm', 'ada', 'm'], ['rotor', 'l', 'eve', 'l', 'madam'], ['rotor', 'level', 'm', 'a', 'd', 'a', 'm'], ['rotor', 'level', 'm', 'ada', 'm'], ['rotor', 'level', 'madam']]\n assert candidate(s = \"rotorredder\") == [['r', 'o', 't', 'o', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'r', 'r', 'edde', 'r'], ['r', 'o', 't', 'o', 'r', 'redder'], ['r', 'o', 't', 'o', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'o', 't', 'o', 'rr', 'edde', 'r'], ['r', 'oto', 'r', 'r', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'r', 'r', 'edde', 'r'], ['r', 'oto', 'r', 'redder'], ['r', 'oto', 'rr', 'e', 'd', 'd', 'e', 'r'], ['r', 'oto', 'rr', 'e', 'dd', 'e', 'r'], ['r', 'oto', 'rr', 'edde', 'r'], ['rotor', 'r', 'e', 'd', 'd', 'e', 'r'], ['rotor', 'r', 'e', 'dd', 'e', 'r'], ['rotor', 'r', 'edde', 'r'], ['rotor', 'redder']]\n", "comparison": "exact"}, "public_tests": ["\"aab\"", "\"a\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().partition", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:12+00:00", "tests_total": 128, "tests_dropped": 19, "flags": [], "topic_tags": ["string", "dynamic-programming", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def partition(s)", "container": null, "callable": "partition", "parameters": [{"name": "s", "type": "String"}], "return_type": "String[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 132, "task_id": "palindrome-partitioning-ii", "difficulty": "Hard", "problem_description": "Given a string s, partition s such that every substring of the partition is a palindrome.\n\nReturn the minimum cuts needed for a palindrome partitioning of s.\n\nExample 1:\n\nInput: s = \"aab\"\nOutput: 1\nExplanation: The palindrome partitioning [\"aa\",\"b\"] could be produced using 1 cut.\n\nExample 2:\n\nInput: s = \"a\"\nOutput: 0\n\nExample 3:\n\nInput: s = \"ab\"\nOutput: 1\n\nConstraints:\n\n- 1 <= s.length <= 2000\n- s consists of lowercase English letters only.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcba\") == 0\n assert candidate(s = \"aabbaa\") == 0\n assert candidate(s = \"abcdcba\") == 0\n assert candidate(s = \"abababab\") == 1\n assert candidate(s = \"a\") == 0\n assert candidate(s = \"ab\") == 1\n assert candidate(s = \"noonnoon\") == 0\n assert candidate(s = \"aabaa\") == 0\n assert candidate(s = \"aabb\") == 1\n assert candidate(s = \"racecar\") == 0\n assert candidate(s = \"abba\") == 0\n assert candidate(s = \"abcdabcdabcd\") == 11\n assert candidate(s = \"abc\") == 2\n assert candidate(s = \"abcd\") == 3\n assert candidate(s = \"abccba\") == 0\n assert candidate(s = \"aab\") == 1\n assert candidate(s = \"abcbm\") == 2\n assert candidate(s = \"aabbcc\") == 2\n assert candidate(s = \"mississippi\") == 3\n assert candidate(s = \"leet\") == 2\n assert candidate(s = \"abcdefg\") == 6\n assert candidate(s = \"ababcbabcba\") == 2\n assert candidate(s = \"abacdcbaabcdeedcba\") == 4\n assert candidate(s = \"abacdfgdcabaedcba\") == 12\n assert candidate(s = \"aabcbabcbabcba\") == 1\n assert candidate(s = \"abaaabaaabaaab\") == 1\n assert candidate(s = \"abcabcabcabc\") == 11\n assert candidate(s = \"abcdeedcbaeedcba\") == 5\n assert candidate(s = \"acbbccaaa\") == 3\n assert candidate(s = \"aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb\") == 1\n assert candidate(s = \"aabaaabaaabaaa\") == 1\n assert candidate(s = \"abacdbacabcbaabcbaabcba\") == 6\n assert candidate(s = \"aabbababaabbaabb\") == 4\n assert candidate(s = \"abacdbacabcbaab\") == 5\n assert candidate(s = \"abacba\") == 3\n assert candidate(s = \"aaaaabaaaabaaabaaa\") == 2\n assert candidate(s = \"abacdbacabcbaabcbaabcbaabcbaabcba\") == 6\n assert candidate(s = \"abacdcbaabcdeedcbaabcdeedcba\") == 4\n assert candidate(s = \"aaaabaaaaa\") == 1\n assert candidate(s = \"noonmoonnoon\") == 3\n assert candidate(s = \"abccbaabccba\") == 0\n assert candidate(s = \"abacabacaba\") == 0\n assert candidate(s = \"aaaaabbbbb\") == 1\n assert candidate(s = \"abbbabbabbbabbabbbabbabbbabbbabbb\") == 1\n assert candidate(s = \"abbaabbabbabba\") == 1\n assert candidate(s = \"noonnoonnoonnoon\") == 0\n assert candidate(s = \"abcdcbe\") == 2\n assert candidate(s = \"ababbbababbbaba\") == 0\n assert candidate(s = \"abacaba\") == 0\n assert candidate(s = \"madamracecar\") == 1\n assert candidate(s = \"abcbac\") == 1\n assert candidate(s = \"abcdedcbafedcbabcd\") == 3\n assert candidate(s = \"aaaabaaa\") == 1\n assert candidate(s = \"aabbaabbaabbaabb\") == 1\n assert candidate(s = \"abbbabbabbbabbabbbabbabbb\") == 1\n assert candidate(s = \"abcbaababcba\") == 3\n assert candidate(s = \"abbabbaabbabba\") == 0\n assert candidate(s = \"abacabadabacabadabacabadabacaba\") == 0\n assert candidate(s = \"abab\") == 1\n assert candidate(s = \"abcdcbaefghfeabcdcba\") == 7\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 0\n assert candidate(s = \"racecarabcba\") == 1\n assert candidate(s = \"xyzyxzyxyzyx\") == 3\n assert candidate(s = \"aabbccddeeeffffggg\") == 6\n assert candidate(s = \"levelup\") == 2\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == 0\n assert candidate(s = \"abababababababab\") == 1\n assert candidate(s = \"abcdeedcba\") == 0\n assert candidate(s = \"ababababababab\") == 1\n assert candidate(s = \"noon\") == 0\n assert candidate(s = \"aaaaaa\") == 0\n assert candidate(s = \"xyxzyzyxzyxzyx\") == 9\n assert candidate(s = \"abababababab\") == 1\n assert candidate(s = \"deeee\") == 1\n assert candidate(s = \"abcbaabcba\") == 0\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 0\n assert candidate(s = \"xyzyxzyzyxzyx\") == 6\n assert candidate(s = \"abcdeedcbaabcdeedcbaabcdeedcbaabcdeedcba\") == 0\n assert candidate(s = \"zyxxyzyxyzyx\") == 2\n assert candidate(s = \"abcdabcdabcdabcd\") == 15\n assert candidate(s = \"level\") == 0\n assert candidate(s = \"bananaabananabana\") == 4\n assert candidate(s = \"abcdefghiijihgfedcba\") == 17\n assert candidate(s = \"aabaabaaa\") == 1\n assert candidate(s = \"abacdbacabcbaabcbaabcbaabcbaab\") == 5\n assert candidate(s = \"abcdabcdabcdabcdabcd\") == 19\n assert candidate(s = \"madam\") == 0\n assert candidate(s = \"abbbba\") == 0\n assert candidate(s = \"aaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaa\") == 0\n assert candidate(s = \"ababababcba\") == 2\n assert candidate(s = \"rotorcarcarecat\") == 10\n assert candidate(s = \"abacabadabacaba\") == 0\n assert candidate(s = \"abababa\") == 0\n assert candidate(s = \"aabbccddeeefffggg\") == 6\n assert candidate(s = \"ababbabaababbabaababbab\") == 1\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzz\") == 0\n assert candidate(s = \"abacdbacabcbaabcbaabcbaabcba\") == 6\n assert candidate(s = \"abbabbabb\") == 1\n assert candidate(s = \"abbbabbbbabb\") == 2\n assert candidate(s = \"abcbabcba\") == 0\n assert candidate(s = \"banana\") == 1\n assert candidate(s = \"abcbddcba\") == 5\n assert candidate(s = \"abcbaeabcdedcba\") == 2\n assert candidate(s = \"abcbabcbabcba\") == 0\n assert candidate(s = \"bcbabbc\") == 3\n assert candidate(s = \"ababababababababababababab\") == 1\n assert candidate(s = \"anana\") == 0\n assert candidate(s = \"aababababababababababababababababababababababababababababababababababababab\") == 1\n assert candidate(s = \"aabbccddeeffgg\") == 6\n assert candidate(s = \"abbacdcba\") == 3\n assert candidate(s = \"aabbccddeeff\") == 5\n assert candidate(s = \"abaca\") == 2\n assert candidate(s = \"abacdbacaba\") == 4\n assert candidate(s = \"madamimadam\") == 0\n assert candidate(s = \"abcdefghij\") == 9\n assert candidate(s = \"abcbaabcbaabcbaabcbaabcbaabcba\") == 0\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 25\n assert candidate(s = \"aabbabba\") == 1\n assert candidate(s = \"bananaabananabananaabananabanana\") == 6\n assert candidate(s = \"aabbccddeeefffgggbbb\") == 7\n assert candidate(s = \"abacdbacabcbaabcbaab\") == 5\n assert candidate(s = \"racecarannakayak\") == 2\n assert candidate(s = \"amanaplanacanalpanama\") == 0\n assert candidate(s = \"aaaaaaaaaaaaaaaaaab\") == 1\n assert candidate(s = \"noonracecar\") == 1\n assert candidate(s = \"noonnoonnoon\") == 0\n assert candidate(s = \"abacdbacabcba\") == 6\n assert candidate(s = \"noonmoonnoonnoonnoonnoonnoon\") == 3\n assert candidate(s = \"abcdedcba\") == 0\n assert candidate(s = \"abcdeedcbabacdcba\") == 5\n assert candidate(s = \"mamad\") == 2\n assert candidate(s = \"aaaaaaaaaabbbbbbbbbccccccccc\") == 2\n assert candidate(s = \"abcdefgfedcbamnoponmabcdedcba\") == 2\n assert candidate(s = \"noonhighnoon\") == 5\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 0\n assert candidate(s = \"racecarlevelmadamracecar\") == 3\n assert candidate(s = \"abacdfgdcaba\") == 7\n assert candidate(s = \"aabaaabbaabbaabb\") == 2\n assert candidate(s = \"abcdabcabcde\") == 11\n assert candidate(s = \"ababababab\") == 1\n assert candidate(s = \"abcdedcbaabcdedcbaabcdedcba\") == 0\n assert candidate(s = \"abacdbacabcbaabcba\") == 6\n assert candidate(s = \"rotor\") == 0\n assert candidate(s = \"abcadacbdb\") == 3\n assert candidate(s = \"xyzzazxzyx\") == 6\n assert candidate(s = \"aabba\") == 1\n assert candidate(s = \"abcabcabcabcabcabcabcabc\") == 23\n assert candidate(s = \"ababbbababbbababb\") == 1\n assert candidate(s = \"aabbccddeeefff\") == 5\n assert candidate(s = \"abacdbacabcbaabcbaabcbaab\") == 5\n assert candidate(s = \"abcdcbabcdcbabcdcbabcdcb\") == 1\n assert candidate(s = \"aabbccddeeefffggghhhhiiiii\") == 8\n assert candidate(s = \"abcabcabcabcabc\") == 14\n assert candidate(s = \"abacdcaba\") == 0\n assert candidate(s = \"aaaaabbbbbccccc\") == 2\n assert candidate(s = \"aabbababab\") == 2\n assert candidate(s = \"xyxzyzyx\") == 3\n assert candidate(s = \"abbab\") == 1\n", "comparison": "exact"}, "public_tests": ["\"aab\"", "\"a\"", "\"ab\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().minCut", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:15+00:00", "tests_total": 158, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def min_cut(s)", "container": null, "callable": "min_cut", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 134, "task_id": "gas-station", "difficulty": "Medium", "problem_description": "There are n gas stations along a circular route, where the amount of gas at the i^th station is gas[i].\n\nYou have a car with an unlimited gas tank and it costs cost[i] of gas to travel from the i^th station to its next (i + 1)^th station. You begin the journey with an empty tank at one of the gas stations.\n\nGiven two integer arrays gas and cost, return the starting gas station's index if you can travel around the circuit once in the clockwise direction, otherwise return -1. If there exists a solution, it is guaranteed to be unique.\n\nExample 1:\n\nInput: gas = [1,2,3,4,5], cost = [3,4,5,1,2]\nOutput: 3\nExplanation:\nStart at station 3 (index 3) and fill up with 4 unit of gas. Your tank = 0 + 4 = 4\nTravel to station 4. Your tank = 4 - 1 + 5 = 8\nTravel to station 0. Your tank = 8 - 2 + 1 = 7\nTravel to station 1. Your tank = 7 - 3 + 2 = 6\nTravel to station 2. Your tank = 6 - 4 + 3 = 5\nTravel to station 3. The cost is 5. Your gas is just enough to travel back to station 3.\nTherefore, return 3 as the starting index.\n\nExample 2:\n\nInput: gas = [2,3,4], cost = [3,4,3]\nOutput: -1\nExplanation:\nYou can't start at station 0 or 1, as there is not enough gas to travel to the next station.\nLet's start at station 2 and fill up with 4 unit of gas. Your tank = 0 + 4 = 4\nTravel to station 0. Your tank = 4 - 3 + 2 = 3\nTravel to station 1. Your tank = 3 - 3 + 3 = 3\nYou cannot travel back to station 2, as it requires 4 unit of gas but you only have 3.\nTherefore, you can't travel around the circuit once no matter where you start.\n\nConstraints:\n\n- n == gas.length == cost.length\n- 1 <= n <= 10^5\n- 0 <= gas[i], cost[i] <= 10^4\n- The input is generated such that the answer is unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(gas = [1, 2, 3, 4, 5],cost = [3, 4, 5, 1, 2]) == 3\n assert candidate(gas = [1, 1, 1, 1],cost = [1, 1, 1, 1]) == 3\n assert candidate(gas = [1, 1, 1, 1, 1],cost = [1, 1, 1, 1, 1]) == 4\n assert candidate(gas = [5, 1, 2, 3, 4],cost = [4, 5, 1, 2, 3]) == 2\n assert candidate(gas = [1, 2, 3, 4, 5],cost = [5, 4, 3, 2, 1]) == 3\n assert candidate(gas = [2, 3, 4],cost = [3, 4, 3]) == -1\n assert candidate(gas = [5, 8, 2, 8],cost = [6, 5, 6, 6]) == 3\n assert candidate(gas = [0, 0, 0, 0, 0],cost = [0, 0, 0, 0, 0]) == 4\n assert candidate(gas = [10, 20, 30, 40, 50],cost = [15, 25, 35, 45, 55]) == -1\n assert candidate(gas = [3, 1, 1],cost = [1, 2, 2]) == 0\n assert candidate(gas = [10, 1, 2, 3, 4],cost = [3, 4, 5, 1, 2]) == 4\n assert candidate(gas = [3, 3, 4],cost = [3, 4, 4]) == -1\n assert candidate(gas = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],cost = [101, 99, 101, 99, 101, 99, 101, 99, 101, 99]) == 9\n assert candidate(gas = [100, 50, 20, 5, 10],cost = [10, 20, 50, 100, 5]) == 4\n assert candidate(gas = [20, 20, 20, 20, 20, 20, 20, 20, 20, 20],cost = [19, 19, 19, 19, 19, 19, 19, 19, 19, 20]) == 9\n assert candidate(gas = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],cost = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 9\n assert candidate(gas = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],cost = [2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == -1\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [10, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(gas = [100, 50, 25, 75, 200, 300],cost = [200, 150, 200, 20, 100, 50]) == 3\n assert candidate(gas = [50, 60, 70, 80, 90, 100, 110, 120, 130, 140],cost = [100, 110, 120, 130, 140, 150, 160, 170, 180, 190]) == -1\n assert candidate(gas = [10, 20, 30, 40, 50],cost = [50, 10, 20, 30, 40]) == 1\n assert candidate(gas = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == -1\n assert candidate(gas = [6, 5, 4, 3, 2, 1],cost = [1, 2, 3, 4, 5, 6]) == 0\n assert candidate(gas = [10, 30, 20, 10, 5, 40, 10, 30, 20, 10],cost = [15, 25, 10, 15, 10, 30, 10, 20, 15, 15]) == 7\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [1, 2, 3, 4, 5, 6, 7, 8, 10, 1]) == 9\n assert candidate(gas = [5, 8, 2, 8, 4],cost = [6, 5, 6, 6, 8]) == -1\n assert candidate(gas = [3, 3, 4, 4, 1, 1, 2, 2],cost = [3, 3, 3, 3, 2, 2, 2, 2]) == 7\n assert candidate(gas = [1, 10, 10, 10, 1],cost = [10, 1, 1, 1, 10]) == 2\n assert candidate(gas = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],cost = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 9\n assert candidate(gas = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 19\n assert candidate(gas = [3, 3, 4, 4, 5, 5, 6, 6, 7, 7],cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 9\n assert candidate(gas = [100, 200, 300, 400, 500],cost = [500, 100, 200, 300, 400]) == 1\n assert candidate(gas = [30, 25, 20, 15, 10, 5, 0],cost = [5, 10, 15, 20, 25, 30, 1]) == -1\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],cost = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(gas = [10, 20, 30, 40, 50],cost = [9, 19, 29, 39, 49]) == 4\n assert candidate(gas = [10, 20, 30, 40, 50],cost = [5, 10, 15, 20, 25]) == 4\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],cost = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(gas = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 0\n assert candidate(gas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],cost = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 5\n assert candidate(gas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],cost = [90, 80, 70, 60, 50, 40, 30, 20, 10, 150]) == -1\n assert candidate(gas = [2, 3, 4, 5, 1, 6],cost = [3, 4, 5, 1, 6, 2]) == 5\n assert candidate(gas = [15, 20, 5, 20, 15, 20, 15, 20, 15, 20],cost = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 9\n assert candidate(gas = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5],cost = [5, 3, 5, 3, 9, 2, 6, 5, 3, 5, 3]) == -1\n assert candidate(gas = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100],cost = [99, 99, 99, 99, 99, 99, 99, 99, 99, 100]) == 9\n assert candidate(gas = [10, 0, 10, 0, 10],cost = [0, 10, 0, 10, 0]) == 4\n assert candidate(gas = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],cost = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 100]) == -1\n assert candidate(gas = [10, 20, 30, 40, 50],cost = [40, 30, 20, 10, 5]) == 4\n assert candidate(gas = [15, 10, 10, 10, 10],cost = [10, 10, 10, 15, 10]) == 4\n assert candidate(gas = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],cost = [4, 4, 4, 4, 4, 4, 4, 4, 4, 5]) == 9\n assert candidate(gas = [8, 6, 7, 4, 5],cost = [5, 6, 7, 3, 4]) == 4\n assert candidate(gas = [5, 8, 2, 8, 4, 7, 6, 6, 1, 4],cost = [4, 4, 5, 7, 1, 5, 4, 4, 5, 4]) == 9\n assert candidate(gas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],cost = [150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 8\n assert candidate(gas = [1, 1, 1, 1, 1],cost = [2, 2, 2, 2, 2]) == -1\n assert candidate(gas = [10, 20, 30, 10, 5, 15],cost = [20, 15, 10, 5, 15, 10]) == 2\n assert candidate(gas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],cost = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 9\n assert candidate(gas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(gas = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],cost = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(gas = [3, 3, 4, 5, 1, 2],cost = [4, 1, 5, 1, 2, 3]) == 3\n assert candidate(gas = [20, 30, 10, 40, 50, 60],cost = [50, 10, 60, 10, 20, 30]) == 4\n assert candidate(gas = [3, 5, 7, 2, 8, 10, 6, 4, 12, 9],cost = [4, 4, 8, 5, 5, 6, 7, 8, 3, 2]) == 9\n assert candidate(gas = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],cost = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20]) == -1\n assert candidate(gas = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 19\n assert candidate(gas = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20],cost = [11, 9, 11, 9, 11, 9, 11, 9, 11, 9]) == 9\n assert candidate(gas = [5, 5, 5, 5, 5, 5, 5],cost = [6, 6, 6, 6, 6, 6, 6]) == -1\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],cost = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4]) == 11\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 20]) == 7\n assert candidate(gas = [2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [10, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(gas = [2, 2, 2, 2, 2],cost = [1, 1, 1, 1, 1]) == 4\n assert candidate(gas = [4, 3, 2, 1, 5, 6, 7],cost = [5, 4, 3, 2, 6, 7, 1]) == 6\n assert candidate(gas = [2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [3, 4, 5, 6, 7, 8, 9, 10, 2]) == 8\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 5\n assert candidate(gas = [30, 20, 10, 40, 50, 20, 10, 60, 70, 80],cost = [20, 30, 40, 50, 60, 70, 80, 90, 10, 10]) == -1\n assert candidate(gas = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500],cost = [400, 450, 500, 50, 100, 150, 200, 250, 300, 350]) == 3\n assert candidate(gas = [100, 20, 10, 15, 5],cost = [70, 15, 10, 10, 5]) == 4\n assert candidate(gas = [1, 6, 3, 4, 5, 2, 8],cost = [2, 5, 4, 3, 6, 1, 5]) == 6\n assert candidate(gas = [1, 6, 3, 4, 5, 6, 7, 8, 9, 10],cost = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 7\n assert candidate(gas = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],cost = [110, 9, 19, 29, 39, 49, 59, 69, 79, 89]) == -1\n assert candidate(gas = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],cost = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 9\n assert candidate(gas = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1],cost = [0, 0, 0, 0, 0, 0, 0, 0, 1, 0]) == 9\n assert candidate(gas = [2, 5, 7, 3, 8, 4, 6],cost = [6, 2, 4, 8, 7, 3, 5]) == 1\n assert candidate(gas = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15],cost = [14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14]) == 19\n assert candidate(gas = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],cost = [2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == -1\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],cost = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 5\n assert candidate(gas = [3, 2, 6, 5, 10, 1],cost = [6, 5, 4, 3, 1, 2]) == 4\n assert candidate(gas = [20, 20, 20, 20, 20],cost = [15, 15, 15, 15, 15]) == 4\n assert candidate(gas = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],cost = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 9\n assert candidate(gas = [2, 4, 5, 3, 1],cost = [3, 4, 3, 2, 2]) == 2\n assert candidate(gas = [3, 2, 6, 5, 4],cost = [2, 3, 4, 5, 3]) == 4\n assert candidate(gas = [20, 30, 10, 40, 50],cost = [35, 15, 25, 20, 40]) == 3\n assert candidate(gas = [8, 1, 3, 5, 2, 6, 7],cost = [7, 2, 5, 4, 1, 3, 6]) == 5\n assert candidate(gas = [50, 30, 10, 20, 40],cost = [30, 40, 15, 25, 30]) == 4\n assert candidate(gas = [5, 5, 5, 5, 5],cost = [4, 4, 4, 4, 4]) == 4\n assert candidate(gas = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],cost = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1]) == 14\n assert candidate(gas = [2, 3, 6, 5, 1, 3, 4],cost = [3, 4, 3, 1, 2, 4, 3]) == 3\n assert candidate(gas = [1, 3, 5, 7, 9],cost = [9, 7, 5, 3, 1]) == 3\n assert candidate(gas = [1000, 1000, 1000, 1000, 1000],cost = [999, 999, 999, 999, 5000]) == -1\n", "comparison": "exact"}, "public_tests": ["[1,2,3,4,5]\n[3,4,5,1,2]", "[2,3,4]\n[3,4,3]"], "hints": [], "metadata": {"canonical_parameter_names": ["gas", "cost"], "leetcode_dataset_entry_point": "Solution().canCompleteCircuit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:17+00:00", "tests_total": 96, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def can_complete_circuit(gas, cost)", "container": null, "callable": "can_complete_circuit", "parameters": [{"name": "gas", "type": "Integer[]"}, {"name": "cost", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 135, "task_id": "candy", "difficulty": "Hard", "problem_description": "There are n children standing in a line.\n\nEach child is assigned a rating value given in the integer array ratings.\n\nYou are giving candies to these children subjected to the following requirements:\n\n- Each child must have at least one candy.\n- Children with a higher rating get more candies than their neighbors.\n\nReturn the minimum number of candies you need to have to distribute the candies to the children.\n\nExample 1:\n\nInput: ratings = [1,0,2]\nOutput: 5\nExplanation: You can allocate to the first, second and third child with 2, 1, 2 candies respectively.\n\nExample 2:\n\nInput: ratings = [1,2,2]\nOutput: 4\nExplanation: You can allocate to the first, second and third child with 1, 2, 1 candies respectively.\nThe third child gets 1 candy because it satisfies the above two conditions.\n\nConstraints:\n\n- 1 <= n == ratings.length <= 5 * 10^4\n- 0 <= ratings[i] <= 5 * 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(ratings = [50, 40, 30, 20, 10]) == 15\n assert candidate(ratings = [1]) == 1\n assert candidate(ratings = [1, 3, 4, 5, 2]) == 11\n assert candidate(ratings = [1, 1, 1, 1]) == 4\n assert candidate(ratings = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 24\n assert candidate(ratings = [5, 4, 3, 2, 1]) == 15\n assert candidate(ratings = [10, 20, 30, 40, 50, 45, 35, 25, 15, 5]) == 31\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 66\n assert candidate(ratings = [1, 3, 2, 2, 3, 1]) == 8\n assert candidate(ratings = [1, 3, 4, 3, 2]) == 9\n assert candidate(ratings = [1, 6, 10, 8, 7, 3, 2]) == 18\n assert candidate(ratings = [10, 20, 30, 40, 50]) == 15\n assert candidate(ratings = [1, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 22\n assert candidate(ratings = [1, 1, 1, 1, 1]) == 5\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 55\n assert candidate(ratings = [1, 3, 2, 4, 5, 6]) == 13\n assert candidate(ratings = [1, 2, 2]) == 4\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 55\n assert candidate(ratings = [1, 3, 2, 2, 1]) == 7\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(ratings = [10, 20, 15, 10, 15, 20, 10]) == 13\n assert candidate(ratings = [1, 2, 3, 4, 5]) == 15\n assert candidate(ratings = [1, 0, 2]) == 5\n assert candidate(ratings = [1, 2, 3, 4, 5, 4, 3, 2, 1, 0]) == 31\n assert candidate(ratings = [1, 2, 2, 3, 3, 4, 5, 5, 6]) == 15\n assert candidate(ratings = [1, 6, 10, 8, 7, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 123\n assert candidate(ratings = [1, 2, 2, 2, 1, 2, 3, 2, 1]) == 15\n assert candidate(ratings = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6]) == 16\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 66\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 109\n assert candidate(ratings = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 19\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 55\n assert candidate(ratings = [1, 2, 2, 3, 2, 2, 3, 2, 2, 1, 2, 2, 3, 2, 2, 1, 2, 2]) == 26\n assert candidate(ratings = [10, 10, 10, 10, 10]) == 5\n assert candidate(ratings = [1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 8]) == 31\n assert candidate(ratings = [1, 2, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 48\n assert candidate(ratings = [1, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 84\n assert candidate(ratings = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 15\n assert candidate(ratings = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 259\n assert candidate(ratings = [1, 2, 2, 2, 1]) == 7\n assert candidate(ratings = [1, 3, 2, 2, 3, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 47\n assert candidate(ratings = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 33\n assert candidate(ratings = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10]) == 28\n assert candidate(ratings = [1, 3, 2, 2, 3, 1, 2, 3, 4, 3, 2, 1]) == 23\n assert candidate(ratings = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 124\n assert candidate(ratings = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(ratings = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5]) == 45\n assert candidate(ratings = [5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5]) == 60\n assert candidate(ratings = [1, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 57\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(ratings = [3, 3, 3, 3, 3, 2, 1, 1, 2, 3, 3, 3, 3, 3, 4, 5, 4, 3, 2, 1]) == 37\n assert candidate(ratings = [10, 20, 10, 50, 20, 30, 10]) == 10\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 154\n assert candidate(ratings = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 210\n assert candidate(ratings = [5, 3, 8, 6, 7, 2, 4, 1]) == 12\n assert candidate(ratings = [1, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4]) == 66\n assert candidate(ratings = [1, 2, 2, 3, 3, 3, 2, 1]) == 13\n assert candidate(ratings = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 20\n assert candidate(ratings = [20, 19, 20, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 193\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 6, 7, 8, 9, 10]) == 41\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 110\n assert candidate(ratings = [1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3]) == 90\n assert candidate(ratings = [5, 2, 3, 1, 4, 6, 1]) == 12\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == 69\n assert candidate(ratings = [1, 2, 2, 3, 3, 4, 4, 3, 2, 1, 1, 2, 3, 3, 4, 4]) == 29\n assert candidate(ratings = [3, 3, 3, 2, 1, 2, 3, 3, 3]) == 15\n assert candidate(ratings = [1, 2, 3, 4, 3, 2, 3, 4, 5, 6, 7]) == 33\n assert candidate(ratings = [5, 3, 8, 6, 7, 2, 4, 1]) == 12\n assert candidate(ratings = [1, 3, 2, 2, 3, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 43\n assert candidate(ratings = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 46\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 210\n assert candidate(ratings = [3, 2, 1, 4, 3, 5, 4, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 66\n assert candidate(ratings = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14]) == 22\n assert candidate(ratings = [1, 2, 2, 3, 3, 3, 2, 1, 2, 3, 4, 4, 3, 2, 1]) == 32\n assert candidate(ratings = [5, 4, 3, 2, 1, 2, 3, 4, 5]) == 29\n assert candidate(ratings = [1, 2, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == 28\n assert candidate(ratings = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 49\n assert candidate(ratings = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 109\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 225\n assert candidate(ratings = [1, 1, 1, 1, 1, 1, 1, 1, 1]) == 9\n assert candidate(ratings = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 21\n assert candidate(ratings = [7, 3, 5, 4, 6, 5, 4, 3, 5, 6, 7]) == 25\n assert candidate(ratings = [1, 3, 2, 2, 3, 1, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 72\n assert candidate(ratings = [5, 3, 8, 6, 7, 9, 2]) == 12\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 400\n assert candidate(ratings = [1, 2, 2, 2, 3, 4, 4, 3, 2, 1]) == 20\n assert candidate(ratings = [1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1]) == 38\n assert candidate(ratings = [10, 20, 15, 10, 5, 10, 20, 30, 25, 20, 15, 10, 5]) == 37\n assert candidate(ratings = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10]) == 28\n assert candidate(ratings = [1, 2, 3, 4, 3, 2, 3, 4, 5, 6, 5, 4, 5, 6, 7, 8, 7, 6, 7, 8, 9]) == 56\n assert candidate(ratings = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3]) == 38\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 36\n assert candidate(ratings = [3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 41\n assert candidate(ratings = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 106\n assert candidate(ratings = [1, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4]) == 34\n assert candidate(ratings = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5]) == 16\n assert candidate(ratings = [1, 3, 2, 3, 1, 5, 2, 4, 1]) == 13\n assert candidate(ratings = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 21\n assert candidate(ratings = [5, 3, 4, 2, 1, 6, 7, 8, 9, 1]) == 24\n assert candidate(ratings = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]) == 15\n assert candidate(ratings = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 10\n assert candidate(ratings = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 56\n assert candidate(ratings = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == 60\n assert candidate(ratings = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == 26\n assert candidate(ratings = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3]) == 29\n assert candidate(ratings = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 29\n assert candidate(ratings = [5, 3, 1, 2, 5, 4, 3, 2, 1]) == 23\n assert candidate(ratings = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 48\n assert candidate(ratings = [1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 207\n assert candidate(ratings = [3, 2, 1, 4, 5, 6, 5, 4, 3, 2, 1]) == 32\n assert candidate(ratings = [1, 2, 3, 4, 5, 4, 3, 2, 1]) == 25\n assert candidate(ratings = [1, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == 12\n", "comparison": "exact"}, "public_tests": ["[1,0,2]", "[1,2,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["ratings"], "leetcode_dataset_entry_point": "Solution().candy", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:19+00:00", "tests_total": 112, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def candy(ratings)", "container": null, "callable": "candy", "parameters": [{"name": "ratings", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 136, "task_id": "single-number", "difficulty": "Easy", "problem_description": "Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.\n\nYou must implement a solution with a linear runtime complexity and use only constant extra space.\n\nExample 1:\n\nInput: nums = [2,2,1]\nOutput: 1\n\nExample 2:\n\nInput: nums = [4,1,2,1,2]\nOutput: 4\n\nExample 3:\n\nInput: nums = [1]\nOutput: 1\n\nConstraints:\n\n- 1 <= nums.length <= 3 * 10^4\n- -3 * 10^4 <= nums[i] <= 3 * 10^4\n- Each element in the array appears twice except for one element which appears only once.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-1, 2, -1, -2, 2]) == -2\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [10, 1, 10, 2, 2]) == 1\n assert candidate(nums = [3, 3, 7, 7, 10]) == 10\n assert candidate(nums = [10, 10, 20, 20, 30]) == 30\n assert candidate(nums = [3, 3, 5, 7, 5, 7, 9]) == 9\n assert candidate(nums = [-1, -1, -2]) == -2\n assert candidate(nums = [5, 7, 5, 7, 9]) == 9\n assert candidate(nums = [3, 3, 2, 2, 5]) == 5\n assert candidate(nums = [0, 1, 0, 1, 2]) == 2\n assert candidate(nums = [0, 1, 0, 1, 99]) == 99\n assert candidate(nums = [2, 2, 1]) == 1\n assert candidate(nums = [4, 1, 2, 1, 2]) == 4\n assert candidate(nums = [100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600]) == 600\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == 21\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 1\n assert candidate(nums = [-1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8]) == -8\n assert candidate(nums = [100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000, 1000, 1]) == 1\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15]) == 14\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 100]) == 100\n assert candidate(nums = [123, 123, 456, 456, 789, 789, 101, 101, 202, 202, 303, 303, 404]) == 404\n assert candidate(nums = [10, 20, 10, 30, 30, 50, 50]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 10\n assert candidate(nums = [-10000, 10000, -10000, 20000, 20000, 30000, 30000]) == 10000\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == 0\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 4\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16]) == 17\n assert candidate(nums = [10000, -10000, 10000, -10000, 20000, -20000, 20000, -20000, 30000]) == 30000\n assert candidate(nums = [-1000, 500, -1000, 500, 10000, 9999, 10000, 9999, 8888]) == 8888\n assert candidate(nums = [1000, 2000, 1000, 3000, 4000, 3000, 5000, 6000, 5000, 7000, 8000, 6000, 7000, 8000, 9000]) == 11096\n assert candidate(nums = [100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000, 1000, 1100]) == 1100\n assert candidate(nums = [5, 7, 5, 7, 9, 10, 11, 11, 10, 12, 12, 13, 13, 14, 14, 15, 15]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8]) == 9\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21]) == 21\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 0\n assert candidate(nums = [10000, 10000, 5000, 5000, 7, 7, 3, 3, 2]) == 2\n assert candidate(nums = [-1000, 1000, -1000, 2000, 2000, 3000, 3000, 4000]) == 3144\n assert candidate(nums = [-100, -100, -50, -50, 1, 1, 2, 2, 3, 3, 4]) == 4\n assert candidate(nums = [-1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7]) == -7\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13]) == 13\n assert candidate(nums = [5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == 10\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 11\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 1\n assert candidate(nums = [999, 999, 888, 888, 777, 777, 666, 666, 555, 555, 444, 444, 333, 333, 222, 222, 111, 111, 101]) == 101\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 15\n assert candidate(nums = [1000, 1000, 2000, 2000, 3000, 3000, 4000, 4000, 5000, 5000, 6000, 6000, 7000, 7000, 8000, 8000, 9000, 9000, 10000, 10000, 10001]) == 10001\n assert candidate(nums = [9999, -9999, 8888, -8888, 7777, -7777, 6666, -6666, 5555]) == 5567\n assert candidate(nums = [0, 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7]) == 7\n assert candidate(nums = [3, 3, 7, 7, 5, 5, 2, 2, 8, 8, 4, 4, 6, 6, 9, 9, 1, 1, 11, 11, 10]) == 10\n assert candidate(nums = [-10000, -10000, -9999, -9999, -9998, -9998, 0]) == 0\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == 1\n assert candidate(nums = [-10000, -10000, 0, 0, 5000, 5000, 7000, 8000, 8000]) == 7000\n assert candidate(nums = [12345, -12345, 12345, -12345, 6789]) == 6789\n assert candidate(nums = [-30000, -30000, -20000, -20000, -10000, -10000, 0, 0, 10000]) == 10000\n assert candidate(nums = [-1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9, -9, -10]) == -10\n assert candidate(nums = [10, 20, 10, 20, 30, 40, 50, 40, 50, 60, 70, 60, 70]) == 30\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == 8\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50, 60]) == 60\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 2\n assert candidate(nums = [10, 20, 10, 2, 2, 30, 30]) == 20\n assert candidate(nums = [12345, -12345, 6789, -6789, 11111]) == 11111\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == 10\n assert candidate(nums = [100, 200, 300, 400, 500, 100, 200, 300, 400]) == 500\n assert candidate(nums = [-1, -1, -2, -2, -3, -3, -4, -4, -5]) == -5\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7]) == 7\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90, 90, 100, 100, 110]) == 110\n assert candidate(nums = [1000, 1000, 2000, 2000, 3000, 3000, 4000, 4000, 5000, 5000, 6000, 6000, 7000, 7000, 8000, 8000, 9000, 9000, 9999]) == 9999\n assert candidate(nums = [5, 7, 7, 5, 3, 9, 3, 8, 8, 6, 6]) == 9\n assert candidate(nums = [-30000, -30000, -29999, -29999, -29998, -29998, 0, 0, 1, 1, 2, 2, 3, 3]) == 0\n assert candidate(nums = [7, 7, 8, 8, 9, 9, 10, 10, 11]) == 11\n assert candidate(nums = [1000, 1000, 2000, 2000, 3000, 3000, 4000, 4000, 5000, 5000, 6000, 6000, 7000, 7000, 8000, 8000, 9000, 9000, 10000]) == 10000\n assert candidate(nums = [100, 200, 300, 100, 200, 300, 400]) == 400\n assert candidate(nums = [10, 20, 10, 20, 30, 30, 40]) == 40\n assert candidate(nums = [5, 7, 5, 7, 8, 8, 9, 10, 9, 10, 11]) == 11\n assert candidate(nums = [-1000, -1000, -2000, -2000, -3000, -3000, -4000, -4000, -5000, -5000, -6000]) == -6000\n assert candidate(nums = [1000, 2000, 3000, 1000, 4000, 2000, 5000, 3000, 4000]) == 5000\n assert candidate(nums = [9999, 8888, 7777, 6666, 5555, 4444, 3333, 2222, 1111, 0, 0, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888]) == 9999\n assert candidate(nums = [-1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9]) == -9\n assert candidate(nums = [-100, -200, -100, -300, -200, -400, -300]) == -400\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6]) == 6\n", "comparison": "exact"}, "public_tests": ["[2,2,1]", "[4,1,2,1,2]", "[1]"], "hints": ["Think about the XOR (^) operator's property."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:21+00:00", "tests_total": 108, "tests_dropped": 23, "flags": [], "topic_tags": ["array", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def single_number(nums)", "container": null, "callable": "single_number", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 137, "task_id": "single-number-ii", "difficulty": "Medium", "problem_description": "Given an integer array nums where every element appears three times except for one, which appears exactly once. Find the single element and return it.\n\nYou must implement a solution with a linear runtime complexity and use only constant extra space.\n\nExample 1:\n\nInput: nums = [2,2,3,2]\nOutput: 3\n\nExample 2:\n\nInput: nums = [0,1,0,1,0,1,99]\nOutput: 99\n\nConstraints:\n\n- 1 <= nums.length <= 3 * 10^4\n- -2^31 <= nums[i] <= 2^31 - 1\n- Each element in nums appears exactly three times except for one element which appears once.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 7]) == 7\n assert candidate(nums = [-1, -1, -1, 100]) == 100\n assert candidate(nums = [-2, -2, -2, 1]) == 1\n assert candidate(nums = [1000000, 1000000, 1000000, 2000000]) == 2000000\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3]) == 3\n assert candidate(nums = [7, 7, 7, 10]) == 10\n assert candidate(nums = [4, 4, 4, 9]) == 9\n assert candidate(nums = [4, 1, 4, 4]) == 1\n assert candidate(nums = [1, 1, 1, 2]) == 2\n assert candidate(nums = [2, 2, 3, 2]) == 3\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 99]) == 99\n assert candidate(nums = [10, 10, 3, 10]) == 3\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3]) == 3\n assert candidate(nums = [-2, -2, -2, 3]) == 3\n assert candidate(nums = [1, 1, 1, 2, 3, 3, 3]) == 2\n assert candidate(nums = [-1, -1, -1, 2, 2, 2, 3]) == 3\n assert candidate(nums = [5, 5, 5, 100, 100, 100, -1]) == -1\n assert candidate(nums = [5, 5, 5, 3, 3, 3, 7, 7, 7, 9, 9, 9, 11]) == 11\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4]) == 4\n assert candidate(nums = [3, 3, 3, 10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40, 50, 50, 50, 60]) == 60\n assert candidate(nums = [-1000000, -1000000, -1000000, 999999, 999999, 999999, 888888]) == 888888\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6]) == 6\n assert candidate(nums = [123456789, 123456789, 123456789, 987654321]) == 987654321\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 3\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8]) == 8\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 4]) == 4\n assert candidate(nums = [123456789, 123456789, 123456789, -987654321]) == -987654321\n assert candidate(nums = [0, 0, 0, 100, 100, 100, 200, 200, 200, 300, 300, 300, 400, 400, 400, 500]) == 500\n assert candidate(nums = [1, 1, 1, 1000000000, 2, 2, 2]) == 1000000000\n assert candidate(nums = [7, 7, 7, 8, 8, 8, 9, 9, 9, 10]) == 10\n assert candidate(nums = [-1, -2, -3, -1, -1, -2, -2, -3, -3, 0]) == 0\n assert candidate(nums = [-1, -1, -1, -2, -2, -2, -3, -3, -3, 5]) == 5\n assert candidate(nums = [-2, -2, -2, 0, 0, 0, 1, 1, 1, 100, 100, 100, 99]) == 99\n assert candidate(nums = [-10, -10, -10, -20, -20, -20, -30]) == -30\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4]) == 4\n assert candidate(nums = [1000, 1000, 1000, 2000, 2000, 2000, 3000, 3000, 3000, 4000, 4000, 4000, 5000]) == 5000\n assert candidate(nums = [123, 123, 123, 456, 456, 456, 789, 789, 789, 101112, 101112, 101112, 131415]) == 131415\n assert candidate(nums = [-3, -3, -3, -5, -5, -5, -7, -7, -7, 1]) == 1\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10]) == 11\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4]) == 4\n assert candidate(nums = [2147483647, 2147483647, 2147483647, 0, 0, 0, -1]) == -1\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11]) == 11\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8]) == 8\n assert candidate(nums = [4, 4, 4, 5, 5, 5, 6, 6, 6, 7]) == 7\n assert candidate(nums = [-2147483648, -2147483648, -2147483648, 0, 0, 0, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1000000000, 1000000000, 1000000000, 2]) == 2\n assert candidate(nums = [-1000000, -1000000, -1000000, 500000, 500000, 500000, 600000]) == 600000\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 3\n assert candidate(nums = [-100, -100, -100, -200, -200, -200, -300, -300, -300, 0]) == 0\n assert candidate(nums = [1000000, 1000000, 1000000, 2000000, 2000000, 2000000, 3000000, 3000000, 3000000, 4000000]) == 4000000\n assert candidate(nums = [1000000000, 1000000000, 1000000000, -1000000000, -1000000000, -1000000000, 123456789]) == 123456789\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8]) == 9\n assert candidate(nums = [-1, -1, -1, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3]) == 3\n assert candidate(nums = [3, 3, 3, 1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9]) == 0\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000001, 1000000001, 1000000001, 1000000002]) == 1000000002\n assert candidate(nums = [1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 5]) == 7\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5]) == 5\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 2147483647, 2147483647, 2147483647, -1]) == -1\n assert candidate(nums = [500000000, 500000000, 500000000, -500000000, -500000000, -500000000, 0]) == 0\n assert candidate(nums = [5, 5, 5, 7, 8, 8, 8, 9, 9, 9, 7, 7]) == 0\n assert candidate(nums = [-2147483648, -2147483648, -2147483648, 2147483647]) == 2147483647\n assert candidate(nums = [-5, -5, -5, -6, -6, -6, 7, 7, 7, 8]) == 8\n assert candidate(nums = [-2147483648, -2147483648, -2147483648, 0, 0, 0, 42]) == 42\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5]) == 5\n assert candidate(nums = [9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1]) == 1\n assert candidate(nums = [1, 1, 1, 2, 2, 2, -3, -3, -3, 4]) == 4\n assert candidate(nums = [5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11]) == 11\n assert candidate(nums = [100, 100, 100, 200, 200, 200, 300, 300, 300, 400, 400, 400, 500]) == 500\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5]) == 5\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7]) == 7\n assert candidate(nums = [10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40, 50]) == 50\n assert candidate(nums = [999999999, 999999999, 999999999, -999999999]) == -999999999\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10]) == 10\n assert candidate(nums = [7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11]) == 11\n assert candidate(nums = [10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40, 50, 50, 50, 60, 60, 60, 70, 70, 70, 80, 80, 80, 90, 90, 90, 100]) == 100\n assert candidate(nums = [10, 20, 30, 10, 10, 20, 20, 30, 30, 40]) == 40\n assert candidate(nums = [999999999, 999999999, 999999999, 888888888, 888888888, 888888888, 777777777]) == 777777777\n assert candidate(nums = [5, 5, 5, 7, 7, 7, 9, 9, 9, 11, 11, 11, 13]) == 13\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9]) == 9\n assert candidate(nums = [15, 15, 15, 20, 20, 20, 25, 25, 25, 30, 30, 30, 35, 35, 35, 40]) == 40\n assert candidate(nums = [1000000000, 1000000000, 1000000000, -1000000000]) == -1000000000\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7]) == 7\n assert candidate(nums = [999999999, 999999999, 999999999, 1000000000, 1000000000, 1000000000, 1]) == 1\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10]) == 10\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7]) == 7\n assert candidate(nums = [-100, -100, -100, -200, -200, -200, -300, -300, -300, -400, -400, -400, -500]) == -500\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10]) == 13\n assert candidate(nums = [-2, -2, -2, 0, 0, 0, 10, 10, 10, 20]) == 20\n assert candidate(nums = [30, 30, 30, 40, 40, 40, 50, 50, 50, 60, 60, 60, 70, 70, 70, 80, 80, 80, 90, 90, 90, 100]) == 100\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 4, 5, 6, 5, 6, 5, 6, 7]) == 7\n assert candidate(nums = [-2147483648, -2147483648, -2147483648, 0, 1, 1, 1]) == 0\n assert candidate(nums = [-2147483648, -2147483648, -2147483648, 0, 0, 0, 2147483647]) == 2147483647\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5]) == 5\n assert candidate(nums = [7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21]) == 21\n assert candidate(nums = [2147483647, 2147483647, 2147483647, -2147483648, -2147483648, -2147483648, 1]) == 1\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 2147483647]) == 2147483647\n", "comparison": "exact"}, "public_tests": ["[2,2,3,2]", "[0,1,0,1,0,1,99]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:24+00:00", "tests_total": 98, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def single_number(nums)", "container": null, "callable": "single_number", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 139, "task_id": "word-break", "difficulty": "Medium", "problem_description": "Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.\n\nNote that the same word in the dictionary may be reused multiple times in the segmentation.\n\nExample 1:\n\nInput: s = \"leetcode\", wordDict = [\"leet\",\"code\"]\nOutput: true\nExplanation: Return true because \"leetcode\" can be segmented as \"leet code\".\n\nExample 2:\n\nInput: s = \"applepenapple\", wordDict = [\"apple\",\"pen\"]\nOutput: true\nExplanation: Return true because \"applepenapple\" can be segmented as \"apple pen apple\".\nNote that you are allowed to reuse a dictionary word.\n\nExample 3:\n\nInput: s = \"catsandog\", wordDict = [\"cats\",\"dog\",\"sand\",\"and\",\"cat\"]\nOutput: false\n\nConstraints:\n\n- 1 <= s.length <= 300\n- 1 <= wordDict.length <= 1000\n- 1 <= wordDict[i].length <= 20\n- s and wordDict[i] consist of only lowercase English letters.\n- All the strings of wordDict are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"cars\",wordDict = ['car', 'ca', 'rs']) == True\n assert candidate(s = \"goals\",wordDict = ['go', 'goal', 'goals']) == True\n assert candidate(s = \"pineapplepenapple\",wordDict = ['apple', 'pen', 'applepen', 'pine', 'pineapple']) == True\n assert candidate(s = \"leetcode\",wordDict = ['leet', 'code']) == True\n assert candidate(s = \"applepenapple\",wordDict = ['apple', 'pen']) == True\n assert candidate(s = \"catsandog\",wordDict = ['cats', 'dog', 'sand', 'and', 'cat']) == False\n assert candidate(s = \"abcd\",wordDict = ['a', 'abc', 'b', 'cd']) == True\n assert candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragi', 'listic', 'expi', 'ali', 'docious']) == True\n assert candidate(s = \"skyscraper\",wordDict = ['sky', 'sc', 'raper', 'scra', 'per']) == True\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",wordDict = ['a', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']) == True\n assert candidate(s = \"abcdabcdabcd\",wordDict = ['a', 'ab', 'abc', 'abcd']) == True\n assert candidate(s = \"abcd\",wordDict = ['a', 'b', 'c', 'd', 'abc', 'bc', 'abcd', 'cd']) == True\n assert candidate(s = \"wordbreakproblem\",wordDict = ['word', 'break', 'problem', 'pro', 'gram', 'wordbreak', 'breakprob']) == True\n assert candidate(s = \"aaaaaaaaaaaaaab\",wordDict = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == False\n assert candidate(s = \"interviewquestionsarehard\",wordDict = ['interview', 'questions', 'are', 'hard', 'inter', 'view', 'quest', 'ions', 'ques', 'tionsare', 'arehard']) == True\n assert candidate(s = \"complexwordbreakproblem\",wordDict = ['complex', 'word', 'break', 'problem', 'wordbreak', 'breakprob', 'lem', 'prob', 'lemp', 'complexword']) == True\n assert candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragilistic', 'expiali', 'docious', 'superca', 'li', 'fragi', 'listicex', 'piali', 'do']) == True\n assert candidate(s = \"aabbccddeeff\",wordDict = ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'abc', 'def', 'ef', 'fe', 'efg', 'gh', 'abcdefgh']) == True\n assert candidate(s = \"helplineshorthelpline\",wordDict = ['help', 'line', 'short', 'helpline']) == True\n assert candidate(s = \"leetleetcodeleet\",wordDict = ['leet', 'code', 'leetcode']) == True\n assert candidate(s = \"racecar\",wordDict = ['race', 'car', 'racec', 'arc', 'cec', 'er', 'c', 'ra', 'ec', 'ce']) == True\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\",wordDict = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'ba']) == False\n assert candidate(s = \"mississippi\",wordDict = ['mis', 'sis', 'ip', 'is']) == False\n assert candidate(s = \"aaaaaaa\",wordDict = ['aa', 'aaa']) == True\n assert candidate(s = \"mississippi\",wordDict = ['mis', 'is', 'ip', 'i', 'ssip']) == False\n assert candidate(s = \"banana\",wordDict = ['ba', 'na', 'nan', 'ban', 'nana', 'an']) == True\n assert candidate(s = \"thisisatest\",wordDict = ['this', 'is', 'a', 'test', 'thisis', 'isatest']) == True\n assert candidate(s = \"abcdefgh\",wordDict = ['a', 'abc', 'abcd', 'efg', 'h']) == True\n assert candidate(s = \"abcdabcdeabcdabcde\",wordDict = ['abc', 'abcd', 'abcde', 'de', 'abcdabcde']) == True\n assert candidate(s = \"ababcabcabcabab\",wordDict = ['ab', 'abc', 'ababc', 'ababcabc', 'ababcabcabc', 'abab']) == True\n assert candidate(s = \"ababababab\",wordDict = ['ab', 'aba', 'bab', 'baba']) == True\n assert candidate(s = \"aaaaaaa\",wordDict = ['aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa']) == True\n assert candidate(s = \"dynamicprogramming\",wordDict = ['dynamic', 'programming', 'dyna', 'mic', 'prog', 'gram', 'ming']) == True\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",wordDict = ['a', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog', 'aquick', 'brownfox', 'jump', 'sover', 'thelazy', 'zydog', 'quickbr', 'ownfo', 'xjump', 'soverth']) == True\n assert candidate(s = \"aabbccddeeff\",wordDict = ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'abc', 'def', 'ef', 'cd', 'ab', 'de', 'fe', 'bc', 'dc', 'ad', 'da', 'fb', 'bf', 'ba', 'ac', 'ca', 'ea', 'ae', 'be', 'eb']) == True\n assert candidate(s = \"mississippi\",wordDict = ['missi', 'pi', 'ssippi', 'issipi', 'ippi']) == True\n assert candidate(s = \"abcdefghij\",wordDict = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij']) == True\n assert candidate(s = \"abcdefghijk\",wordDict = ['abc', 'def', 'ghi', 'jkl']) == False\n assert candidate(s = \"thefastbrownfoxjumpedoverthelazydog\",wordDict = ['the', 'fast', 'brown', 'fox', 'jumped', 'over', 'lazy', 'dog']) == True\n assert candidate(s = \"solutionsarefun\",wordDict = ['solution', 'solutions', 'are', 'fun', 'solu', 'tions', 'sol', 'u', 'n']) == True\n assert candidate(s = \"bcbcbc\",wordDict = ['b', 'c', 'bc', 'cb']) == True\n assert candidate(s = \"programming\",wordDict = ['pro', 'gram', 'ming', 'gramm', 'ing', 'program']) == True\n assert candidate(s = \"xyzzyzyxzyzyzyzyxzyz\",wordDict = ['xyz', 'zyz', 'zx', 'zyxzy', 'zyzyz', 'zyzyzy']) == False\n assert candidate(s = \"mississippi\",wordDict = ['miss', 'issi', 'ssippi', 'ppi', 'ipi', 'i']) == True\n assert candidate(s = \"exampleexampleexampleexample\",wordDict = ['ex', 'ample', 'example', 'pleexam', 'ampleex']) == True\n assert candidate(s = \"abcdefgh\",wordDict = ['ab', 'abc', 'cd', 'efgh', 'abcd']) == True\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",wordDict = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yz', 'mnopqr', 'stuvwx', 'yzab', 'cdefghijklmnop', 'qrstuvwxyza', 'bcdefghijklmnopq', 'rstuvwxyzabcde']) == True\n assert candidate(s = \"supercalifragilisticexpialidocious\",wordDict = ['super', 'cali', 'fragilistic', 'expiali', 'docious', 'superfragilistic']) == True\n assert candidate(s = \"ababababab\",wordDict = ['a', 'ab', 'aba', 'ababa']) == True\n assert candidate(s = \"thisisaverylongwordthatcanbebrokenintomultiplesubwords\",wordDict = ['this', 'is', 'a', 'very', 'long', 'word', 'that', 'can', 'be', 'broken', 'into', 'multiple', 'sub', 'words', 'averylong', 'bebroken']) == True\n assert candidate(s = \"interview\",wordDict = ['in', 'ter', 'view', 'int', 'ent', 'rview', 'terview', 'erview']) == True\n assert candidate(s = \"abcdefghij\",wordDict = ['ab', 'abc', 'cd', 'efg', 'hij', 'abcdefghij']) == True\n assert candidate(s = \"thisisatutorial\",wordDict = ['this', 'is', 'a', 'tu', 'torial', 'tuto', 'rial', 'ial', 'al']) == True\n assert candidate(s = \"abcdabcde\",wordDict = ['ab', 'cd', 'ef', 'de', 'abcde', 'abcd']) == True\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\",wordDict = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa']) == False\n assert candidate(s = \"findingthesolutionisfun\",wordDict = ['find', 'finding', 'the', 'solution', 'is', 'fun', 'solutions', 'funny']) == True\n assert candidate(s = \"abcd\",wordDict = ['a', 'ab', 'abc', 'abcd', 'abcde']) == True\n assert candidate(s = \"xxyzzyyx\",wordDict = ['xy', 'xyz', 'zy', 'zyx', 'yx', 'xx', 'zz', 'zyxzyx']) == False\n assert candidate(s = \"thelongestword\",wordDict = ['the', 'long', 'est', 'word', 'longest', 'estword', 'ongestwor', 'ngestwo', 'gestw', 'estwo', 'stwo', 'two', 'thelo', 'hello', 'world']) == True\n assert candidate(s = \"thecodecanbeanything\",wordDict = ['the', 'code', 'can', 'be', 'anything', 'any', 'thing']) == True\n assert candidate(s = \"a\",wordDict = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == True\n assert candidate(s = \"abcdabcd\",wordDict = ['ab', 'abcd', 'cd']) == True\n assert candidate(s = \"thisisaverylongstringthatshouldnotmatch\",wordDict = ['this', 'is', 'very', 'long', 'string', 'that', 'should', 'not', 'match']) == False\n assert candidate(s = \"programmingproblemsolver\",wordDict = ['pro', 'gram', 'ming', 'problem', 'problemsolver', 'solver']) == True\n assert candidate(s = \"aaaaaaa\",wordDict = ['aaa', 'aaaa', 'aa']) == True\n assert candidate(s = \"skilfullyskilled\",wordDict = ['skill', 'ful', 'ly', 'ski', 'lly', 'ed']) == False\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab\",wordDict = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == False\n assert candidate(s = \"abracadabra\",wordDict = ['abra', 'cad', 'bra', 'a', 'ab', 'rac']) == True\n assert candidate(s = \"complexstringwithwords\",wordDict = ['complex', 'string', 'with', 'words', 'complexstring', 'stringwith', 'withwords']) == True\n", "comparison": "exact"}, "public_tests": ["\"leetcode\"\n[\"leet\",\"code\"]", "\"applepenapple\"\n[\"apple\",\"pen\"]", "\"catsandog\"\n[\"cats\",\"dog\",\"sand\",\"and\",\"cat\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "wordDict"], "leetcode_dataset_entry_point": "Solution().wordBreak", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:26+00:00", "tests_total": 87, "tests_dropped": 18, "flags": [], "topic_tags": ["array", "hash-table", "string", "dynamic-programming", "trie", "memoization", "brute-force-search"]}, "language": "ruby", "interface": {"raw_signature": "def word_break(s, word_dict)", "container": null, "callable": "word_break", "parameters": [{"name": "s", "type": "String"}, {"name": "word_dict", "type": "String[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 140, "task_id": "word-break-ii", "difficulty": "Hard", "problem_description": "Given a string s and a dictionary of strings wordDict, add spaces in s to construct a sentence where each word is a valid dictionary word. Return all such possible sentences in any order.\n\nNote that the same word in the dictionary may be reused multiple times in the segmentation.\n\nExample 1:\n\nInput: s = \"catsanddog\", wordDict = [\"cat\",\"cats\",\"and\",\"sand\",\"dog\"]\nOutput: [\"cats and dog\",\"cat sand dog\"]\n\nExample 2:\n\nInput: s = \"pineapplepenapple\", wordDict = [\"apple\",\"pen\",\"applepen\",\"pine\",\"pineapple\"]\nOutput: [\"pine apple pen apple\",\"pineapple pen apple\",\"pine applepen apple\"]\nExplanation: Note that you are allowed to reuse a dictionary word.\n\nExample 3:\n\nInput: s = \"catsandog\", wordDict = [\"cats\",\"dog\",\"sand\",\"and\",\"cat\"]\nOutput: []\n\nConstraints:\n\n- 1 <= s.length <= 20\n- 1 <= wordDict.length <= 1000\n- 1 <= wordDict[i].length <= 10\n- s and wordDict[i] consist of only lowercase English letters.\n- All the strings of wordDict are unique.\n- Input is generated in a way that the length of the answer doesn't exceed 10^5.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(s='aaaaaaa', wordDict=['aa', 'aaa']), ['aa aa aaa', 'aa aaa aa', 'aaa aa aa'])\n assert answers_match(candidate(s='pineapplepenapple', wordDict=['apple', 'pen', 'applepen', 'pine', 'pineapple']), ['pine apple pen apple', 'pine applepen apple', 'pineapple pen apple'])\n assert answers_match(candidate(s='a', wordDict=['a']), ['a'])\n assert answers_match(candidate(s='catsanddog', wordDict=['cat', 'cats', 'and', 'sand', 'dog']), ['cat sand dog', 'cats and dog'])\n assert answers_match(candidate(s='catsandog', wordDict=['cats', 'dog', 'sand', 'and', 'cat']), [])\n assert answers_match(candidate(s='abcd', wordDict=['a', 'abc', 'b', 'cd']), ['a b cd'])\n assert answers_match(candidate(s='leetcodeleet', wordDict=['leet', 'code']), ['leet code leet'])\n assert answers_match(candidate(s='exampleofquestion', wordDict=['example', 'of', 'question', 'ex', 'ample', 'que', 'stion', 'exam', 'ple', 'quest', 'uest', 'ion']), ['ex ample of que stion', 'ex ample of quest ion', 'ex ample of question', 'exam ple of que stion', 'exam ple of quest ion', 'exam ple of question', 'example of que stion', 'example of quest ion', 'example of question'])\n assert answers_match(candidate(s='amazingrace', wordDict=['amazing', 'race', 'amaz', 'ing', 'zing', 'ace', 'rac']), ['amaz ing race', 'amazing race'])\n assert answers_match(candidate(s='wordbreakproblem', wordDict=['word', 'break', 'problem', 'wordbreak', 'prob', 'lem']), ['word break prob lem', 'word break problem', 'wordbreak prob lem', 'wordbreak problem'])\n assert answers_match(candidate(s='amazingrace', wordDict=['amazing', 'race', 'amazingr', 'acer', 'age', 'maze', 'rang', 'racer', 'ace', 'zing']), ['amazing race', 'amazingr ace'])\n assert answers_match(candidate(s='mississippi', wordDict=['mis', 'is', 'sip', 'issi', 'ppi', 'ippi', 'pi', 'pippi', 'miss', 'sipi']), ['miss is sip pi', 'miss issi ppi'])\n assert answers_match(candidate(s='abcd', wordDict=['a', 'ab', 'abc', 'abcd', 'b', 'bc', 'bcd', 'c', 'cd', 'd']), ['a b c d', 'a b cd', 'a bc d', 'a bcd', 'ab c d', 'ab cd', 'abc d', 'abcd'])\n assert answers_match(candidate(s='optimization', wordDict=['opt', 'im', 'iza', 'tio', 'n', 'on', 'optim', 'optimiz', 'optimiza', 'ization']), ['opt im iza tio n', 'opt im ization', 'optim iza tio n', 'optim ization', 'optimiza tio n'])\n assert answers_match(candidate(s='thisisatest', wordDict=['this', 'is', 'a', 'test', 'thisis', 'ate', 'st']), ['this is a test', 'this is ate st', 'thisis a test', 'thisis ate st'])\n assert answers_match(candidate(s='sololeveltwo', wordDict=['sol', 'olev', 'el', 'elv', 'ello', 'lev', 'leve', 'vel', 'velt', 'velto', 'veltwo', 'o', 'l', 'v', 't', 'w', 'two', 'to', 'level', 'levelt', 'levelto', 'leveltwo']), ['sol o lev el t w o', 'sol o lev el two', 'sol o leve l t w o', 'sol o leve l two', 'sol o level t w o', 'sol o level two', 'sol o levelt w o', 'sol o leveltwo', 'sol olev el t w o', 'sol olev el two'])\n assert answers_match(candidate(s='solvetheproblem', wordDict=['solve', 'the', 'problem', 'sol', 've', 'prob', 'lem', 'othe', 'probem', 'solvethe', 'heproblem']), ['sol ve the prob lem', 'sol ve the problem', 'solve the prob lem', 'solve the problem', 'solvethe prob lem', 'solvethe problem'])\n assert answers_match(candidate(s='thethreefishes', wordDict=['the', 'three', 'threefish', 'fish', 'fishes']), ['the three fishes'])\n assert answers_match(candidate(s='abcd', wordDict=['a', 'b', 'c', 'd', 'ab', 'bc', 'cd', 'abcd']), ['a b c d', 'a b cd', 'a bc d', 'ab c d', 'ab cd', 'abcd'])\n assert answers_match(candidate(s='canadaday', wordDict=['can', 'ada', 'day', 'canada', 'anada', 'aday']), ['can ada day', 'canada day'])\n assert answers_match(candidate(s='abcdefgh', wordDict=['ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh']), ['abcdefgh'])\n assert answers_match(candidate(s='aquickbrownfox', wordDict=['a', 'quick', 'brown', 'fox', 'quickbrown', 'brownfox']), ['a quick brown fox', 'a quick brownfox', 'a quickbrown fox'])\n assert answers_match(candidate(s='wordbreakproblem', wordDict=['word', 'break', 'problem', 'wordbreak', 'pro', 'blem']), ['word break pro blem', 'word break problem', 'wordbreak pro blem', 'wordbreak problem'])\n", "comparison": "unordered"}, "public_tests": ["\"catsanddog\"\n[\"cat\",\"cats\",\"and\",\"sand\",\"dog\"]", "\"pineapplepenapple\"\n[\"apple\",\"pen\",\"applepen\",\"pine\",\"pineapple\"]", "\"catsandog\"\n[\"cats\",\"dog\",\"sand\",\"and\",\"cat\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "wordDict"], "leetcode_dataset_entry_point": "Solution().wordBreak", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:28+00:00", "tests_total": 59, "tests_dropped": 36, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "string", "dynamic-programming", "backtracking", "trie", "memoization"]}, "language": "ruby", "interface": {"raw_signature": "def word_break(s, word_dict)", "container": null, "callable": "word_break", "parameters": [{"name": "s", "type": "String"}, {"name": "word_dict", "type": "String[]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 149, "task_id": "max-points-on-a-line", "difficulty": "Hard", "problem_description": "Given an array of points where points[i] = [x_i, y_i] represents a point on the X-Y plane, return the maximum number of points that lie on the same straight line.\n\nExample 1:\n\nInput: points = [[1,1],[2,2],[3,3]]\nOutput: 3\n\nExample 2:\n\nInput: points = [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]\nOutput: 4\n\nConstraints:\n\n- 1 <= points.length <= 300\n- points[i].length == 2\n- -10^4 <= x_i, y_i <= 10^4\n- All the points are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]) == 6\n assert candidate(points = [[0, 0], [1, 1], [0, 1], [1, 0]]) == 2\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7]]) == 6\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4]]) == 4\n assert candidate(points = [[1, 1], [2, 2], [2, 3], [3, 2], [3, 3]]) == 3\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 4], [4, 5], [5, 6], [7, 8]]) == 4\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == 5\n assert candidate(points = [[-4, -4], [-8, -582], [-5, -26], [0, 3], [-1, 1], [0, -7], [1, -1], [5, 5], [-8, -6722], [-6, -576], [-6, -3608]]) == 2\n assert candidate(points = [[-1, -1], [2, 2], [3, 3]]) == 3\n assert candidate(points = [[1, 1], [3, 2], [5, 3], [4, 1], [2, 3], [1, 4]]) == 4\n assert candidate(points = [[-1, -1], [0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]) == 6\n assert candidate(points = [[1, 1]]) == 1\n assert candidate(points = [[1, 1], [2, 2], [3, 3]]) == 3\n assert candidate(points = [[0, 0], [1, 1], [1, -1], [2, 2], [2, -2], [3, 3], [3, -3], [4, 4], [4, -4], [5, 5], [5, -5], [6, 6], [6, -6], [7, 7], [7, -7], [8, 8], [8, -8], [9, 9], [9, -9], [10, 10], [10, -10]]) == 11\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 5], [5, 7], [6, 9], [7, 11], [8, 13], [9, 15]]) == 7\n assert candidate(points = [[1, 1], [1, 6], [2, 2], [2, 7], [3, 3], [3, 8], [4, 4], [4, 9], [5, 5], [5, 10]]) == 5\n assert candidate(points = [[-10000, -10000], [10000, 10000], [5000, 5000], [0, 0], [-5000, -5000]]) == 5\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15]]) == 15\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [5, 1], [6, 2], [7, 3], [8, 4], [9, 5], [1, 6], [2, 7], [3, 8], [4, 9]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 9\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0]]) == 10\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [1, 0], [1, 1], [1, 2], [1, 3], [1, 4]]) == 5\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [2, 1], [3, 2], [4, 3], [3, 1], [4, 2], [5, 3]]) == 3\n assert candidate(points = [[-10, -10], [0, 0], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50]]) == 7\n assert candidate(points = [[-1, -2], [0, -1], [1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6]]) == 9\n assert candidate(points = [[1, 1], [2, 2], [3, 4], [5, 5], [6, 6], [7, 8], [9, 9], [10, 10], [11, 12], [13, 13], [14, 14], [15, 16], [17, 17], [18, 18], [19, 20], [21, 21], [22, 22], [23, 24], [25, 25], [26, 26], [27, 28]]) == 14\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9]]) == 5\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 6\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]) == 8\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 5], [5, 8], [6, 11], [7, 14], [8, 17]]) == 5\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [1, 1], [2, 2], [3, 3], [4, 4]]) == 5\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8]]) == 9\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2]]) == 3\n assert candidate(points = [[1, 1], [1, 2], [2, 1], [2, 2], [3, 1], [3, 2], [4, 1], [4, 2], [5, 1], [5, 2], [6, 1], [6, 2]]) == 6\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [2, 2], [2, 4], [2, 6], [2, 8], [3, 3], [3, 6], [3, 9], [3, 12]]) == 4\n assert candidate(points = [[-10000, -10000], [10000, 10000], [5000, 5000], [-5000, -5000], [0, 0], [2500, 2500], [-2500, -2500], [7500, 7500], [-7500, -7500], [10000, -10000], [-10000, 10000]]) == 9\n assert candidate(points = [[1, 1], [1, 6], [2, 2], [2, 5], [3, 3], [3, 4], [4, 4], [4, 3], [5, 5], [5, 2], [6, 6], [6, 1]]) == 6\n assert candidate(points = [[1, 1], [1, 2], [2, 2], [3, 2], [4, 2], [5, 2]]) == 5\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]) == 7\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11], [1, 12], [1, 13], [1, 14], [1, 15], [1, 16], [1, 17], [1, 18], [1, 19], [1, 20]]) == 20\n assert candidate(points = [[0, 0], [1, 1], [2, 3], [3, 6], [4, 10], [5, 15], [6, 21], [7, 28], [8, 36], [9, 45]]) == 2\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [2, 2], [3, 3], [4, 4], [5, 5]]) == 5\n assert candidate(points = [[-1, -1], [-2, -2], [-3, -3], [-4, -4], [-5, -5], [-6, -6], [-7, -7], [-8, -8], [-9, -9]]) == 9\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [10, 5]]) == 7\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 8\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [2, 1], [3, 1], [4, 1], [5, 1], [2, 2], [3, 2], [4, 2], [5, 2]]) == 5\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [5, 1], [6, 2], [7, 3], [8, 4], [9, 5]]) == 10\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3]]) == 4\n assert candidate(points = [[0, 0], [1, 1], [-1, -1], [2, 2], [-2, -2], [3, 3], [-3, -3], [4, 4], [-4, -4], [5, 5], [-5, -5]]) == 11\n assert candidate(points = [[1, 1], [2, 1], [1, 2], [2, 2], [3, 3], [3, 4], [4, 3], [4, 4], [5, 5], [5, 6]]) == 5\n assert candidate(points = [[10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80], [90, 90]]) == 9\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16]]) == 15\n assert candidate(points = [[1, 1], [2, 3], [3, 5], [4, 7], [5, 9], [6, 11], [7, 13], [8, 15], [9, 17], [10, 19]]) == 10\n assert candidate(points = [[-100, 100], [0, 0], [100, -100], [50, 50], [75, 25], [25, 75], [0, 100], [100, 0]]) == 5\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 3], [2, 6], [3, 9], [4, 12], [5, 15]]) == 5\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [0, 10]]) == 11\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15], [16, 16], [17, 17], [18, 18], [19, 19], [20, 20]]) == 20\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]) == 7\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0]]) == 11\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 6], [2, 5], [3, 4], [4, 3], [5, 2], [6, 1], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0]]) == 6\n assert candidate(points = [[1, 1], [2, 3], [3, 2], [4, 6], [5, 5], [6, 4], [7, 7], [8, 9], [9, 8]]) == 3\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [2, 2], [2, 3], [2, 4], [3, 3], [3, 4], [4, 4]]) == 4\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]) == 8\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9]]) == 9\n assert candidate(points = [[1, 1], [1, 3], [1, 5], [1, 7], [1, 9], [2, 2], [2, 4], [2, 6], [2, 8], [2, 10]]) == 5\n assert candidate(points = [[-1, 1], [-2, 2], [-3, 3], [-4, 4], [-5, 5], [-6, 6], [-7, 7], [-8, 8], [-9, 9], [-10, 10]]) == 10\n assert candidate(points = [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12], [7, 14], [8, 16], [9, 18], [10, 20]]) == 10\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [2, 1], [2, 2], [2, 3], [2, 4], [3, 1], [3, 2], [3, 3], [3, 4]]) == 4\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 9\n assert candidate(points = [[0, 0], [1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12], [7, 14], [8, 16], [9, 18]]) == 10\n assert candidate(points = [[-5, -5], [0, 0], [5, 5], [10, 10], [15, 15], [20, 20], [25, 25], [30, 30], [35, 35], [40, 40]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12], [7, 14], [8, 16], [9, 18], [10, 20]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == 5\n assert candidate(points = [[-10000, 10000], [10000, -10000], [0, 0], [5000, 5000], [-5000, -5000], [2000, 2000], [-2000, -2000], [3000, 3000], [-3000, -3000]]) == 7\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20], [20, 21]]) == 17\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == 10\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [0, 1], [1, 1], [2, 1], [0, 2], [1, 2], [2, 2]]) == 3\n assert candidate(points = [[-1000, -1000], [-1000, -999], [-1000, -998], [-1000, -997], [-1000, -996], [-1000, -995], [-1000, -994], [-1000, -993], [-1000, -992], [-1000, -991], [-1000, -990]]) == 11\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [1, 2], [2, 3]]) == 4\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 11\n assert candidate(points = [[-1, 1], [-2, 2], [-3, 3], [-4, 4], [-5, 5], [-6, 6], [-7, 7], [-8, 8], [-9, 9]]) == 9\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12]]) == 6\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0], [17, 0], [18, 0], [19, 0], [20, 0]]) == 21\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == 10\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9]]) == 5\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0]]) == 10\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [0, 1], [1, 2], [2, 3], [3, 4]]) == 4\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [0, 1], [1, 1], [2, 1], [3, 1], [4, 1]]) == 5\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 6], [5, 5], [6, 8], [7, 7], [8, 10], [9, 9], [10, 12]]) == 6\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15], [16, 16], [17, 17], [18, 18], [19, 19]]) == 20\n assert candidate(points = [[1, 1], [2, 2], [3, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 8\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 12]]) == 6\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [1, 0], [1, 1], [1, 2], [1, 3], [2, 0], [2, 1], [2, 2], [2, 3], [3, 0], [3, 1], [3, 2], [3, 3]]) == 4\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [5, 5], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11]]) == 10\n", "comparison": "exact"}, "public_tests": ["[[1,1],[2,2],[3,3]]", "[[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]"], "hints": [], "metadata": {"canonical_parameter_names": ["points"], "leetcode_dataset_entry_point": "Solution().maxPoints", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:44+00:00", "tests_total": 108, "tests_dropped": 11, "flags": ["has_images"], "topic_tags": ["array", "hash-table", "math", "geometry", "euclidean-algorithm", "greatest-common-divisor"]}, "language": "ruby", "interface": {"raw_signature": "def max_points(points)", "container": null, "callable": "max_points", "parameters": [{"name": "points", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 150, "task_id": "evaluate-reverse-polish-notation", "difficulty": "Medium", "problem_description": "You are given an array of strings tokens that represents an arithmetic expression in a Reverse Polish Notation.\n\nEvaluate the expression. Return an integer that represents the value of the expression.\n\nNote that:\n\n- The valid operators are '+', '-', '*', and '/'.\n- Each operand may be an integer or another expression.\n- The division between two integers always truncates toward zero.\n- There will not be any division by zero.\n- The input represents a valid arithmetic expression in a reverse polish notation.\n- The answer and all the intermediate calculations can be represented in a 32-bit integer.\n\nExample 1:\n\nInput: tokens = [\"2\",\"1\",\"+\",\"3\",\"*\"]\nOutput: 9\nExplanation: ((2 + 1) * 3) = 9\n\nExample 2:\n\nInput: tokens = [\"4\",\"13\",\"5\",\"/\",\"+\"]\nOutput: 6\nExplanation: (4 + (13 / 5)) = 6\n\nExample 3:\n\nInput: tokens = [\"10\",\"6\",\"9\",\"3\",\"+\",\"-11\",\"*\",\"/\",\"*\",\"17\",\"+\",\"5\",\"+\"]\nOutput: 22\nExplanation: ((10 * (6 / ((9 + 3) * -11))) + 17) + 5\n= ((10 * (6 / (12 * -11))) + 17) + 5\n= ((10 * (6 / -132)) + 17) + 5\n= ((10 * 0) + 17) + 5\n= (0 + 17) + 5\n= 17 + 5\n= 22\n\nConstraints:\n\n- 1 <= tokens.length <= 10^4\n- tokens[i] is either an operator: \"+\", \"-\", \"*\", or \"/\", or an integer in the range [-200, 200].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(tokens = ['4', '13', '5', '/', '+']) == 6\n assert candidate(tokens = ['2', '1', '+', '3', '*']) == 9\n assert candidate(tokens = ['10', '6', '9', '3', '+', '-11', '*', '/', '*', '17', '+', '5', '+']) == 22\n assert candidate(tokens = ['20', '5', '/', '2', '+', '10', '3', '/', '-', '3', '4', '*', '+', '2', '-', '1', '*']) == 13\n assert candidate(tokens = ['100', '50', '/', '3', '-', '2', '*', '4', '1', '+', '/', '5', '-', '2', '*']) == -10\n assert candidate(tokens = ['-10', '-3', '/', '2', '*']) == 6\n assert candidate(tokens = ['20', '5', '*']) == 100\n assert candidate(tokens = ['3', '-4', '+', '2', '*', '5', '/', '10', '+']) == 10\n assert candidate(tokens = ['8', '4', '+', '3', '*', '2', '/', '7', '-', '1', '+', '5', '*']) == 60\n assert candidate(tokens = ['17', '5', '+', '3', '8', '*', '-', '10', '2', '/', '+']) == 3\n assert candidate(tokens = ['10', '-5', '*', '2', '-', '3', '*']) == -156\n assert candidate(tokens = ['100', '50', '-', '20', '*', '2', '/', '3', '+', '5', '-', '6', '*', '7', '/', '8', '+', '9', '-']) == 425\n assert candidate(tokens = ['100', '50', '/', '20', '10', '/', '*', '30', '2', '*', '+']) == 64\n assert candidate(tokens = ['100', '-50', '/', '20', '-10', '/', '*']) == 4\n assert candidate(tokens = ['1', '2', '+', '3', '4', '+', '*', '5', '6', '+', '7', '8', '+', '*', '9', '10', '+', '*']) == 21\n assert candidate(tokens = ['8', '4', '*', '6', '2', '/', '-', '5', '+', '3', '2', '*']) == 34\n assert candidate(tokens = ['-10', '-5', '/', '2', '*', '-1', '+']) == 3\n assert candidate(tokens = ['8', '12', '+', '3', '/', '4', '*', '5', '2', '/', '-', '7', '+', '2', '*']) == 58\n assert candidate(tokens = ['1', '2', '+', '3', '4', '+', '*']) == 21\n assert candidate(tokens = ['3', '8', '2', '/', '+', '4', '*', '10', '5', '/', '-', '2', '*']) == 52\n assert candidate(tokens = ['20', '5', '+', '3', '*', '2', '-', '8', '/', '4', '*']) == 36\n assert candidate(tokens = ['5', '2', '/', '1', '+', '4', '*']) == 12\n assert candidate(tokens = ['7', '3', '+', '2', '*', '5', '-']) == 15\n assert candidate(tokens = ['8', '2', '/', '3', '4', '+', '*', '1', '5', '-', '*']) == -112\n assert candidate(tokens = ['20', '10', '/', '5', '*']) == 10\n assert candidate(tokens = ['1', '3', '2', '*', '+', '5', '-', '1', '2', '+', '/']) == 0\n assert candidate(tokens = ['10', '5', '2', '/', '+', '3', '-14', '*', '8', '/']) == 12\n assert candidate(tokens = ['-1', '3', '*', -1, '2', '+', '*', '4', '1', '-']) == -3\n assert candidate(tokens = ['10', '5', '+', '20', '-', '2', '/', '15', '*', '3', '-', '10', '/', '2', '+', '1', '-', '7', '*', '3', '/', '2', '*']) == -8\n assert candidate(tokens = ['12', '-3', '*', '4', '/', '8', '+', '2', '-', '5', '*', '-2', '/']) == 7\n assert candidate(tokens = ['5', '8', '4', '/', '+']) == 7\n assert candidate(tokens = ['10', '4', '2', '+', '*']) == 60\n assert candidate(tokens = ['10', '3', '5', '/', '2', '*', '+', '8', '3', '2', '*', '-', '4', '*', '2', '/', '+']) == 14\n assert candidate(tokens = ['12', '3', '*']) == 36\n assert candidate(tokens = ['17', '5', '+', '3', '*', '2', '-', '1', '+', '4', '/', '2', '*', '3', '+', '1', '-', '9', '/', '3', '*', '-11', '+', '-2', '*', '-3', '+', '17', '/', '5', '-', '7', '+', '-4', '*']) == -8\n assert candidate(tokens = ['18', '4', '-']) == 14\n assert candidate(tokens = ['10', '20', '+', '30', '*', '40', '+', '50', '*', '60', '-']) == 46940\n assert candidate(tokens = ['10', '-5', '*', '2', '+', '20', '-10', '/', '*', '3', '+', '2', '*']) == 198\n assert candidate(tokens = ['10', '20', '30', '40', '+', '*']) == 10\n assert candidate(tokens = ['8', '3', '-', '2', '1', '/', '*']) == 10\n assert candidate(tokens = ['9', '3', '+', '6', '2', '/', '-', '11', '*', '7', '/', '2', '+']) == 16\n assert candidate(tokens = ['1', '2', '3', '4', '+', '*', '5', '/']) == 1\n assert candidate(tokens = ['1', '2', '3', '+', '4', '/', '+', '5', '-', '6', '*']) == -18\n assert candidate(tokens = ['1', '1', '+', '1', '1', '+', '1', '1', '+', '1', '1', '+', '1', '1', '+']) == 2\n assert candidate(tokens = ['-7', '3', '/', '2', '-3', '*']) == -2\n assert candidate(tokens = ['9', '3', '+', '6', '2', '/', '*']) == 36\n assert candidate(tokens = ['9', '3', '-', '4', '/', '8', '2', '*', '+', '6', '1', '-', '*', '3', '+', '5', '-', '11', '/']) == 7\n assert candidate(tokens = ['7', '-8', '*', '2', '/', '3', '+', '1', '-', '5', '11', '+', '2', '/', '*', '4', '-']) == -212\n assert candidate(tokens = ['100', '50', '+', '25', '-', '10', '*', '5', '/']) == 250\n assert candidate(tokens = ['7', '-3', '*', '2', '1', '+', '*', '5', '-', '3', '+', '2', '*']) == -130\n assert candidate(tokens = ['10', '3', '/', '5', '+', '-3', '*', '7', '2', '/', '+', '8', '-', '2', '*', '3', '+', '6', '-', '4', '/', '9', '+', '11', '-', '13', '*', '15', '/', '17', '+', '19', '-']) == -16\n assert candidate(tokens = ['5', '8', '4', '2', '+', '*']) == 5\n assert candidate(tokens = ['5', '3', '+', '2', '*', '8', '4', '/', '-']) == 14\n assert candidate(tokens = ['-1', '-2', '*']) == 2\n assert candidate(tokens = ['15', '7', '1', '1', '+', '-', '3', '/', '2', '1', '1', '+', '+', '-']) == 15\n assert candidate(tokens = ['20', '4', '/', '5', '2', '*', '+']) == 15\n assert candidate(tokens = ['8', '4', '+', '2', '/', '3', '*', '1', '+', '6', '-']) == 13\n assert candidate(tokens = ['9', '3', '/', '2', '1', '+', '*']) == 9\n assert candidate(tokens = ['18', '7', '+', '3', '-', '1', '*', '2', '+', '5', '/', '9', '+', '1', '+', '-11', '*', '13', '-', '5', '+', '9', '+', '15', '+', '1', '-', '7', '*', '8', '+', '-3', '-', '2', '-']) == -964\n assert candidate(tokens = ['10', '-5', '+', '20', '-10', '/', '2', '*']) == 5\n assert candidate(tokens = ['5', '-2', '*']) == -10\n assert candidate(tokens = ['10', '20', '5', '/', '2', '*']) == 10\n assert candidate(tokens = ['13', '7', '2', '+', '/']) == 1\n assert candidate(tokens = ['-1', '-1', '*', '-2', '-', '2', '*', '-3', '/', '4', '-']) == -6\n assert candidate(tokens = ['1', '3', '-']) == -2\n assert candidate(tokens = ['15', '11', '+']) == 26\n assert candidate(tokens = ['10', '20', '+', '30', '40', '+', '50', '60', '+', '70', '80', '+', '90', '*']) == 30\n assert candidate(tokens = ['6', '3', '1', '+', '*', '4', '/']) == 6\n assert candidate(tokens = ['15', '7', '1', '1', '+', '-', '/', '3', '*', '2', '1', '1', '+', '+', '-']) == 5\n assert candidate(tokens = ['100', '50', '+', '20', '*', '4', '/', '2', '+', '8', '-', '3', '*']) == 2232\n assert candidate(tokens = ['1', '2', '+', '3', '4', '+', '*', '5', '6', '+', '*', '7', '8', '+', '*', '9', '10', '+', '*']) == 65835\n assert candidate(tokens = ['100', '50', '-']) == 50\n assert candidate(tokens = ['100', '200', '+', '50', '-', '2', '/', '3', '*', '10', '+']) == 385\n assert candidate(tokens = ['5', '3', '+', '7', '4', '-', '*']) == 24\n assert candidate(tokens = ['1', '2', '+', '3', '*', '4', '+', '5', '*', '6', '+', '7', '*', '8', '+', '9', '+', '10', '+', '11', '+', '12', '+', '13', '+', '14', '+', '15', '+', '16', '+', '17', '+', '18', '+', '19', '+']) == 659\n assert candidate(tokens = ['100', '50', '/', '20', '*', '10', '-', '5', '+', '2', '*', '3', '/', '1', '+', '4', '-']) == 20\n assert candidate(tokens = ['18', '5', '+', '12', '-', '3', '/', '2', '*', '4', '-']) == 2\n assert candidate(tokens = ['8', '3', '2', '*', '1', '-', '2', '/']) == 8\n assert candidate(tokens = ['-11', '-12', '-', '13', '-14', '-', '*']) == 27\n assert candidate(tokens = ['20', '5', '2', '/', '*']) == 40\n assert candidate(tokens = ['0', '3', '/', '5', '+']) == 5\n assert candidate(tokens = ['3', '-4', '*', '2', '/', '5', '-']) == -11\n assert candidate(tokens = ['1', '2', '3', '+', '*']) == 5\n assert candidate(tokens = ['100', '50', '2', '*', '-', '30', '20', '+', '/', '10', '+']) == 10\n assert candidate(tokens = ['7', '-3', '*', '11', '5', '-', '/', '2', '2', '+', '*']) == -12\n assert candidate(tokens = ['7', '-3', '*', '2', '1', '+', '-', '15', '5', '/', '+']) == -21\n assert candidate(tokens = ['2', '3', '4', '5', '+', '*', '6', '/']) == 2\n assert candidate(tokens = ['10', '6', '9', '3', '+', '-11', '*']) == 10\n assert candidate(tokens = ['7', '-3', '*']) == -21\n assert candidate(tokens = ['10', '5', '-', '3', '*', '4', '+', '2', '/']) == 9\n assert candidate(tokens = ['7', '-3', '*', '2', '+', '15', '5', '/', '*']) == -57\n assert candidate(tokens = ['15', '-3', '/', '7', '+', '2', '*', '10', '-', '5', '*']) == -30\n assert candidate(tokens = ['100', '50', '/', '25', '*', '5', '+', '3', '-', '2', '*']) == 104\n assert candidate(tokens = ['7', '-8', '*', '5', '+', '3', '-12', '/', '4', '*']) == -51\n assert candidate(tokens = ['7', '8', '3', '*', '+', '2', '/', '4', '-', '10', '5', '*', '+']) == 61\n assert candidate(tokens = ['5', '2', '/', '10', '2', '/', '-', '3', '*', '7', '+', '-1', '*']) == 2\n assert candidate(tokens = ['5', '2', '/', '-1', '*', '3', '-']) == -5\n", "comparison": "exact"}, "public_tests": ["[\"2\",\"1\",\"+\",\"3\",\"*\"]", "[\"4\",\"13\",\"5\",\"/\",\"+\"]", "[\"10\",\"6\",\"9\",\"3\",\"+\",\"-11\",\"*\",\"/\",\"*\",\"17\",\"+\",\"5\",\"+\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["tokens"], "leetcode_dataset_entry_point": "Solution().evalRPN", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:46+00:00", "tests_total": 97, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "math", "stack"]}, "language": "ruby", "interface": {"raw_signature": "def eval_rpn(tokens)", "container": null, "callable": "eval_rpn", "parameters": [{"name": "tokens", "type": "String[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 152, "task_id": "maximum-product-subarray", "difficulty": "Medium", "problem_description": "Given an integer array nums, find a subarray that has the largest product, and return the product.\n\nThe test cases are generated so that the answer will fit in a 32-bit integer.\n\nNote that the product of an array with a single element is the value of that element.\n\nExample 1:\n\nInput: nums = [2,3,-2,4]\nOutput: 6\nExplanation: [2,3] has the largest product 6.\n\nExample 2:\n\nInput: nums = [-2,0,-1]\nOutput: 0\nExplanation: The result cannot be 2, because [-2,-1] is not a subarray.\n\nConstraints:\n\n- 1 <= nums.length <= 2 * 10^4\n- -10 <= nums[i] <= 10\n- The product of any subarray of nums is guaranteed to fit in a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [2, -5, -2, -4, 3]) == 24\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [-2, 3, -4]) == 24\n assert candidate(nums = [3, -1, 4]) == 4\n assert candidate(nums = [-1, -2, -3, 0]) == 6\n assert candidate(nums = [0, 2]) == 2\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10]) == 3628800\n assert candidate(nums = [2, 3, -2, 4]) == 6\n assert candidate(nums = [1, 2, -1, 4]) == 4\n assert candidate(nums = [0, 2, 0]) == 2\n assert candidate(nums = [-1, -2, -3, -4]) == 24\n assert candidate(nums = [-1]) == -1\n assert candidate(nums = [-2, 0, -1]) == 0\n assert candidate(nums = [-2, 3, -4, 5, 7, -8, 2, 3]) == 20160\n assert candidate(nums = [1, 2, 3, 4, 5]) == 120\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 3628800\n assert candidate(nums = [0, 2, 3, -2, 4, -1, 5]) == 240\n assert candidate(nums = [-1, 0, -1, 0, -1, 0, -1, 0, -1, 0]) == 0\n assert candidate(nums = [2, 3, -2, 4, -1, 5, 6]) == 1440\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1]) == 1\n assert candidate(nums = [-2, -3, 7, -4, 0, 5, -8, 3, 6]) == 84\n assert candidate(nums = [5, 0, 5, -1, 0, 5, -1, 0, 5, -1]) == 5\n assert candidate(nums = [0, 2, -3, 4, -5, 6]) == 720\n assert candidate(nums = [0, 2, -3, 4, -5, 6]) == 720\n assert candidate(nums = [2, 3, 0, -1, 4, 5, 0, -2, 3, 0]) == 20\n assert candidate(nums = [2, 3, 0, -1, -2, 4, 0, 5, 6, 0, -7, 8, -9]) == 504\n assert candidate(nums = [1, 0, -1, 0, 1, -1, 0, 1, 0]) == 1\n assert candidate(nums = [5, 6, -3, 4, 0, 2, 3, -2, 4]) == 30\n assert candidate(nums = [10, -10, 10, -10, 10, -10]) == 100000\n assert candidate(nums = [5, 6, -3, 4, 0, -1, 2, -5]) == 30\n assert candidate(nums = [0, 2, 3, -2, 4, -1, 5, 6]) == 1440\n assert candidate(nums = [2, -5, 3, 1, -4, 2]) == 240\n assert candidate(nums = [5, 3, -1, 2, 0, -6, -2, 0, 5, 3, -1, 2, 0, -6, -2]) == 15\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 2, -3, 4, -1, 2, 1, -5, 4]) == 160\n assert candidate(nums = [10, -2, -3, 5, -10, 0, 9, 6]) == 300\n assert candidate(nums = [-2, 0, -1, 0, 1, 2, -3]) == 2\n assert candidate(nums = [5, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1814400\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == 2880\n assert candidate(nums = [-1, -2, 0, 1, -3, 4, -5, 6, -7, 8, -9, 10]) == 1814400\n assert candidate(nums = [1, 0, -1, 0, 1, 0, -1, 0, 1]) == 1\n assert candidate(nums = [10, -10, 10, -10, 10, -10, 10]) == 100000\n assert candidate(nums = [-10, 0, 0, 0, 0, 0, 0, 0, 0, -10]) == 0\n assert candidate(nums = [-10, 0, 10, 0, -10, 0, 10, 0, -10, 0]) == 10\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 3628800\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [-3, -1, 0, 2, 4, -2, 0, -1]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 3628800\n assert candidate(nums = [3, -1, 4, 1, 5, -9, 2, 6, 5, 3, 5]) == 486000\n assert candidate(nums = [5, 3, -2, 5, -1, 5, -1, 0, 5]) == 750\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == 1\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10]) == 1814400\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 120\n assert candidate(nums = [-10, 0, 5, 2, -3, -2, 4, 5, 0, -1, 2]) == 1200\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10]) == 1814400\n assert candidate(nums = [3, -1, 4, 1, 5, -9, 2, 6, -5, 3, 5]) == 162000\n assert candidate(nums = [0, 2, -3, 4, -1, 0, 5, -2]) == 24\n assert candidate(nums = [2, -5, -2, -4, 3]) == 24\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 3628800\n assert candidate(nums = [3, -1, 4, -1, 5, -9, 2, 6, -5, 3, 5]) == 486000\n assert candidate(nums = [1, 0, -1, 0, -2, 0, 1, 0, -1, 0, -2, 0]) == 1\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1]) == 1\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10]) == 3628800\n assert candidate(nums = [10, -10, 0, 10, -10, 0, 10]) == 10\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9]) == 362880\n assert candidate(nums = [0, 2, -3, -4, 5, 0, 1]) == 120\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == 1\n assert candidate(nums = [-10, -10, -10, -10, -10]) == 10000\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 3628800\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == 1\n assert candidate(nums = [10, -10, 10, -10, 10]) == 100000\n assert candidate(nums = [5, -3, 1, -2, 0, 4, -2, 3, -1]) == 30\n assert candidate(nums = [10, -10, 10, -10, 10, -10]) == 100000\n assert candidate(nums = [1, 2, 3, 0, -1, -2, -3, -4, 5, 6]) == 720\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8]) == 40320\n assert candidate(nums = [10, -10, 10, -10, 10, -10, 10, -10]) == 100000000\n assert candidate(nums = [2, 0, 1, 0, 2, 3, -2, 4, -1, 5]) == 240\n", "comparison": "exact"}, "public_tests": ["[2,3,-2,4]", "[-2,0,-1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxProduct", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:50+00:00", "tests_total": 91, "tests_dropped": 11, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_product(nums)", "container": null, "callable": "max_product", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 153, "task_id": "find-minimum-in-rotated-sorted-array", "difficulty": "Medium", "problem_description": "Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become:\n\n- [4,5,6,7,0,1,2] if it was rotated 4 times.\n- [0,1,2,4,5,6,7] if it was rotated 7 times.\n\nNotice that rotating an array [a[0], a[1], a[2], ..., a[n-1]] 1 time results in the array [a[n-1], a[0], a[1], a[2], ..., a[n-2]].\n\nGiven the sorted rotated array nums of unique elements, return the minimum element of this array.\n\nYou must write an algorithm that runs in O(log n) time.\n\nExample 1:\n\nInput: nums = [3,4,5,1,2]\nOutput: 1\nExplanation: The original array was [1,2,3,4,5] rotated 3 times.\n\nExample 2:\n\nInput: nums = [4,5,6,7,0,1,2]\nOutput: 0\nExplanation: The original array was [0,1,2,4,5,6,7] and it was rotated 4 times.\n\nExample 3:\n\nInput: nums = [11,13,15,17]\nOutput: 11\nExplanation: The original array was [11,13,15,17] and it was rotated 4 times.\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 5000\n- -5000 <= nums[i] <= 5000\n- All the integers of nums are unique.\n- nums is sorted and rotated between 1 and n times.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2]) == 0\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 1, 0]) == 1\n assert candidate(nums = [1, 3, 2]) == 1\n assert candidate(nums = [10, 15, 1, 3, 8]) == 1\n assert candidate(nums = [11, 13, 15, 17]) == 11\n assert candidate(nums = [7, 8, 9, 10, 11, 1, 2, 3, 4, 5, 6]) == 1\n assert candidate(nums = [10, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(nums = [2, 1, 3]) == 2\n assert candidate(nums = [5, 1, 2, 3, 4]) == 1\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 1]) == 1\n assert candidate(nums = [3, 1, 2]) == 1\n assert candidate(nums = [2, 1]) == 1\n assert candidate(nums = [3, 4, 5, 1, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]) == 1\n assert candidate(nums = [2, 3, 1]) == 1\n assert candidate(nums = [6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [59, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57]) == 1\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, -1000, -900, -800, -700, -600, -500, -400, -300, -200, -100]) == -1000\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 0\n assert candidate(nums = [3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 0\n assert candidate(nums = [40, 50, 60, 70, 80, 90, 100, 0, 10, 20, 30]) == 0\n assert candidate(nums = [100, 200, 300, 400, 500, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 0\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1]) == 0\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 1, 2, 3]) == 1\n assert candidate(nums = [0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 1\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]) == 1\n assert candidate(nums = [15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 0\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == -10\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 0, 1]) == 0\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2]) == 1\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [-5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985, -4984, -4983, -4982, -4981, -4980, -4979, -4978, -4977, -4976, -4975, -4974, -4973, -4972, -4971, -4970, -4969, -4968, -4967, -4966, -4965, -4964, -4963, -4962, -4961, -4960, -4959, -4958, -4957, -4956, -4955, -4954, -4953, -4952, -4951, -4950, -4949, -4948, -4947, -4946, -4945, -4944, -4943, -4942, -4941, -4940, -4939, -4938, -4937, -4936, -4935, -4934, -4933, -4932, -4931, -4930, -4929, -4928, -4927, -4926, -4925, -4924, -4923, -4922, -4921, -4920, -4919, -4918, -4917, -4916, -4915, -4914, -4913, -4912, -4911, -4910, -4909, -4908, -4907, -4906, -4905, -4904, -4903, -4902, -4901, -4900, -4899, -4898, -4897, -4896, -4895, -4894, -4893, -4892, -4891, -4890, -4889, -4888, -4887, -4886, -4885, -4884, -4883, -4882, -4881, -4880, -4879, -4878, -4877, -4876, -4875, -4874, -4873, -4872, -4871, -4870, -4869, -4868, -4867, -4866, -4865, -4864, -4863, -4862, -4861, -4860, -4859, -4858, -4857, -4856, -4855, -4854, -4853, -4852, -4851, -4850, -4849, -4848, -4847, -4846, -4845, -4844, -4843, -4842, -4841, -4840, -4839, -4838, -4837, -4836, -4835, -4834, -4833, -4832, -4831, -4830, -4829, -4828, -4827, -4826, -4825, -4824, -4823, -4822, -4821, -4820, -4819, -4818, -4817, -4816, -4815, -4814, -4813, -4812, -4811, -4810, -4809, -4808, -4807, -4806, -4805, -4804, -4803, -4802, -4801, 5000]) == -5000\n assert candidate(nums = [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 1, 2]) == 1\n assert candidate(nums = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 0\n assert candidate(nums = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 0\n assert candidate(nums = [5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985, -4984, -4983, -4982, -4981, -4980, -4979, -4978, -4977, -4976, -4975, -4974, -4973, -4972, -4971, -4970, -4969, -4968, -4967, -4966, -4965, -4964, -4963, -4962, -4961, -4960, -4959, -4958, -4957, -4956, -4955, -4954, -4953, -4952, -4951, -4950, -4949, -4948, -4947, -4946, -4945, -4944, -4943, -4942, -4941, -4940, -4939, -4938, -4937, -4936, -4935, -4934, -4933, -4932, -4931, -4930, -4929, -4928, -4927, -4926, -4925, -4924, -4923, -4922, -4921, -4920, -4919, -4918, -4917, -4916, -4915, -4914, -4913, -4912, -4911, -4910, -4909, -4908, -4907, -4906, -4905, -4904, -4903, -4902, -4901, -4900, -4899, -4898, -4897, -4896, -4895, -4894, -4893, -4892, -4891, -4890, -4889, -4888, -4887, -4886, -4885, -4884, -4883, -4882, -4881, -4880, -4879, -4878, -4877, -4876, -4875, -4874, -4873, -4872, -4871, -4870, -4869, -4868, -4867, -4866, -4865, -4864, -4863, -4862, -4861, -4860, -4859, -4858, -4857, -4856, -4855, -4854, -4853, -4852, -4851, -4850, -4849, -4848, -4847, -4846, -4845, -4844, -4843, -4842, -4841, -4840, -4839, -4838, -4837, -4836, -4835, -4834, -4833, -4832, -4831, -4830, -4829, -4828, -4827, -4826, -4825, -4824, -4823, -4822, -4821, -4820, -4819, -4818, -4817, -4816, -4815, -4814, -4813, -4812, -4811, -4810, -4809, -4808, -4807, -4806, -4805, -4804, -4803, -4802, -4801, -4800]) == -4999\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4]) == 1\n assert candidate(nums = [1, 0]) == 0\n assert candidate(nums = [1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0]) == 0\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 1, 2]) == 1\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [5000, -5000, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]) == -5000\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 0\n assert candidate(nums = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n assert candidate(nums = [7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 3030]) == 0\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 0\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == 0\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1, 2]) == 1\n assert candidate(nums = [0, 1]) == 0\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 0, 1, 2, 3]) == 0\n assert candidate(nums = [999, -999, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == -999\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == -10\n assert candidate(nums = [5000, 4999, 4998, 4997, 4996, 4995, 4994, 4993, 4992, 4991, 4990, 4989, 4988, 4987, 4986, 4985, 4984, 4983, 4982, 4981, 4980, 4979, 4978, 4977, 4976, 4975, 4974, 4973, 4972, 4971, 4970, 4969, 4968, 4967, 4966, 4965, 4964, 4963, 4962, 4961, 4960, 4959, 4958, 4957, 4956, 4955, 4954, 4953, 4952, 4951, 4950, 4949, 4948, 4947, 4946, 4945, 4944, 4943, 4942, 4941, 4940, 4939, 4938, 4937, 4936, 4935, 4934, 4933, 4932, 4931, 4930, 4929, 4928, 4927, 4926, 4925, 4924, 4923, 4922, 4921, 4920, 4919, 4918, 4917, 4916, 4915, 4914, 4913, 4912, 4911, 4910, 4909, 4908, 4907, 4906, 4905, 4904, 4903, 4902, 4901, 4900, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 4999\n assert candidate(nums = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8]) == 0\n assert candidate(nums = [7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3, 4, 5, 6]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0]) == 0\n assert candidate(nums = [1, -5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991]) == -5000\n assert candidate(nums = [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0]) == 0\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0, 1]) == 0\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 0\n assert candidate(nums = [20, 21, 22, 23, 24, 25, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 0\n assert candidate(nums = [-2, -1, 0, 1, 2]) == -2\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991]) == -4999\n assert candidate(nums = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 0\n assert candidate(nums = [-5000]) == -5000\n assert candidate(nums = [99, 100, 0, 1, 2, 3, 4, 5, 6, 7, 8]) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0]) == 0\n assert candidate(nums = [999, -999, -500, -250, -100, -50, -25, -10, -5, -1, 0, 1, 5, 10, 25, 50, 100, 250, 500]) == -999\n assert candidate(nums = [4999, -4999, 4998, -4998, 4997, -4997, 4996, -4996, 4995, -4995, 4994, -4994, 4993, -4993, 4992, -4992, 4991, -4991, 4990, -4990, 4989, -4989, 4988, -4988, 4987, -4987, 4986, -4986, 4985, -4985, 4984, -4984, 4983, -4983, 4982, -4982, 4981, -4981, 4980, -4980, 4979, -4979, 4978, -4978, 4977, -4977, 4976, -4976, 4975, -4975, 4974, -4974, 4973, -4973, 4972, -4972, 4971, -4971, 4970, -4970, 4969, -4969, 4968, -4968, 4967, -4967, 4966, -4966, 4965, -4965, 4964, -4964, 4963, -4963, 4962, -4962, 4961, -4961, 4960, -4960, 4959, -4959, 4958, -4958, 4957, -4957, 4956, -4956, 4955, -4955, 4954, -4954, 4953, -4953, 4952, -4952, 4951, -4951, 4950, -4950, 4949, -4949, 4948, -4948, 4947, -4947, 4946, -4946, 4945, -4945, 4944, -4944, 4943, -4943, 4942, -4942, 4941, -4941, 4940, -4940, 4939, -4939, 4938, -4938, 4937, -4937, 4936, -4936, 4935, -4935, 4934, -4934, 4933, -4933, 4932, -4932, 4931, -4931, 4930, -4930, 4929, -4929, 4928, -4928, 4927, -4927, 4926, -4926, 4925, -4925, 4924, -4924, 4923, -4923, 4922, -4922, 4921, -4921, 4920, -4920, 4919, -4919, 4918, -4918, 4917, -4917, 4916, -4916, 4915, -4915, 4914, -4914, 4913, -4913, 4912, -4912, 4911, -4911, 4910, -4910, 4909, -4909, 4908, -4908, 4907, -4907, 4906, -4906, 4905, -4905, 4904, -4904, 4903, -4903, 4902, -4902, 4901, -4901, 4900, -4900, 4899, -4899, 4898, -4898, 4897, -4897, 4896, -4896, 4895, -4895, 4894, -4894, 4893, -4893, 4892, -4892, 4891, -4891, 4890, -4890, 4889, -4889, 4888, -4888, 4887, -4887, 4886, -4886, 4885, -4885, 4884, -4884, 4883, -4883, 4882, -4882, 4881, -4881, 4880, -4880, 4879, -4879, 4878, -4878, 4877, -4877, 4876, -4876, 4875, -4875, 4874, -4874, 4873, -4873, 4872, -4872, 4871, -4871, 4870, -4870, 4869, -4869, 4868, -4868, 4867, -4867, 4866, -4866, 4865, -4865, 4864, -4864, 4863, -4863, 4862, -4862, 4861, -4861, 4860, -4860, 4859, -4859, 4858, -4858, 4857, -4857, 4856, -4856, 4855, -4855, 4854, -4854, 4853, -4853, 4852, -4852, 4851, -4851, 4850, -4850, 4849, -4849, 4848, -4848, 4847, -4847, 4846, -4846, 4845, -4845, 4844, -4844, 4843, -4843, 4842, -4842, 4841, -4841, 4840, -4840, 4839, -4839, 4838, -4838, 4837, -4837, 4836, -4836, 4835, -4835, 4834, -4834, 4833, -4833, 4832, -4832, 4831, -4831, 4830, -4830, 4829, -4829, 4828, -4828, 4827, -4827, 4826, -4826, 4825, -4825, 4824, -4824, 4823, -4823, 4822, -4822, 4821, -4821, 4820, -4820, 4819, -4819, 4818, -4818, 4817, -4817, 4816, -4816, 4815, -4815, 4814, -4814, 4813, -4813, 4812, -4812, 4811, -4811, 4810, -4810, 4809, -4809, 4808, -4808, 4807, -4807, 4806, -4806, 4805, -4805, 4804, -4804, 4803, -4803, 4802, -4802, 4801, -4801, 4800, -4800]) == -4999\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 0, 1, 2, 3]) == 0\n assert candidate(nums = [100, 200, 300, 400, 500, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 1\n assert candidate(nums = [40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39]) == 0\n assert candidate(nums = [5000]) == 5000\n assert candidate(nums = [1000, 2000, 3000, 4000, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == -1\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == -1\n assert candidate(nums = [20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 0]) == 10\n assert candidate(nums = [5000, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 0\n assert candidate(nums = [20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 1\n assert candidate(nums = [15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 0\n", "comparison": "exact"}, "public_tests": ["[3,4,5,1,2]", "[4,5,6,7,0,1,2]", "[11,13,15,17]"], "hints": ["Array was originally in ascending order. Now that the array is rotated, there would be a point in the array where there is a small deflection from the increasing sequence. eg. The array would be something like [4, 5, 6, 7, 0, 1, 2].", "You can divide the search space into two and see which direction to go. Can you think of an algorithm which has O(logN) search complexity?", "1. All the elements to the left of inflection point > first element of the array.\n2. All the elements to the right of inflection point < first element of the array."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMin", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:52+00:00", "tests_total": 95, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def find_min(nums)", "container": null, "callable": "find_min", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 154, "task_id": "find-minimum-in-rotated-sorted-array-ii", "difficulty": "Hard", "problem_description": "Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,4,4,5,6,7] might become:\n\n- [4,5,6,7,0,1,4] if it was rotated 4 times.\n- [0,1,4,4,5,6,7] if it was rotated 7 times.\n\nNotice that rotating an array [a[0], a[1], a[2], ..., a[n-1]] 1 time results in the array [a[n-1], a[0], a[1], a[2], ..., a[n-2]].\n\nGiven the sorted rotated array nums that may contain duplicates, return the minimum element of this array.\n\nYou must decrease the overall operation steps as much as possible.\n\nExample 1:\n\nInput: nums = [1,3,5]\nOutput: 1\n\nExample 2:\n\nInput: nums = [2,2,2,0,1]\nOutput: 0\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 5000\n- -5000 <= nums[i] <= 5000\n- nums is sorted and rotated between 1 and n times.\n\nFollow up: This problem is similar to Find Minimum in Rotated Sorted Array, but nums may contain duplicates. Would this affect the runtime complexity? How and why?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]) == 0\n assert candidate(nums = [1, 3, 5]) == 1\n assert candidate(nums = [2, 2, 2, 0, 1]) == 0\n assert candidate(nums = [5, 1, 2, 3, 4]) == 1\n assert candidate(nums = [3, 4, 5, 1, 2]) == 1\n assert candidate(nums = [15, 17, 11, 13]) == 11\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == 0\n assert candidate(nums = [0, 1, 4, 4, 5, 6, 7]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 1, 3]) == 1\n assert candidate(nums = [4, 4, 5, 6, 7, 0, 1, 2, 3]) == 0\n assert candidate(nums = [11, 13, 15, 17]) == 11\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2]) == 0\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4]) == 1\n assert candidate(nums = [4, 4, 4, 4, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [10, 1, 10, 10, 10]) == 1\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 4]) == 0\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 0, 1]) == 0\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(nums = [100, 200, 300, 400, 500, 1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [104, 105, 106, 107, 108, 109, 0, 100, 101, 102, 103]) == 0\n assert candidate(nums = [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3]) == 0\n assert candidate(nums = [7, 8, 9, 10, 1, 2, 3, 4, 5, 6]) == 1\n assert candidate(nums = [3, 4, 5, 1, 2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 0\n assert candidate(nums = [6, 7, 1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [6, 7, 0, 1, 2, 4, 5]) == 0\n assert candidate(nums = [108, 109, 0, 100, 101, 102, 103, 104, 105, 106, 107]) == 0\n assert candidate(nums = [106, 107, 108, 109, 0, 100, 101, 102, 103, 104, 105]) == 0\n assert candidate(nums = [2, 5, 6, 0, 0, 1, 2]) == 0\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2]) == 0\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 1]) == 0\n assert candidate(nums = [11, 13, 15, 17, 19, 2, 5, 7]) == 2\n assert candidate(nums = [8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 0]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 0, 1, 2, 2, 3]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 1, 1]) == 1\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 0\n assert candidate(nums = [11, 13, 15, 17, 19, 1, 3, 5, 7]) == 1\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == 1\n assert candidate(nums = [2, 3, 4, 5, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 0]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]) == 0\n assert candidate(nums = [5, 6, 7, 0, 1, 2, 3]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 1]) == 0\n assert candidate(nums = [103, 104, 105, 106, 107, 108, 109, 0, 100, 101, 102]) == 0\n assert candidate(nums = [1, 0, 1, 1, 1, 1]) == 0\n assert candidate(nums = [6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5]) == 0\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 1]) == 1\n assert candidate(nums = [3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8]) == 0\n assert candidate(nums = [7, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6]) == 0\n assert candidate(nums = [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [4, 4, 4, 4, 4, 0, 1, 2, 3]) == 0\n assert candidate(nums = [1, 2, 2, 2, 0, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 0]) == 0\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [109, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [5, 5, 5, 5, 5, 1, 2, 3, 4]) == 1\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2]) == 0\n assert candidate(nums = [100, 101, 102, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 0\n assert candidate(nums = [15, 17, 19, 0, 1, 3, 5, 7, 9, 11, 13]) == 0\n assert candidate(nums = [2, 2, 2, 2, 1, 2, 2, 2]) == 1\n assert candidate(nums = [2, 0, 1, 1, 1, 2, 2]) == 0\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 1, 2]) == 1\n assert candidate(nums = [107, 108, 109, 0, 100, 101, 102, 103, 104, 105, 106]) == 0\n assert candidate(nums = [2, 2, 2, 0, 1, 2]) == 0\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == 0\n assert candidate(nums = [105, 106, 107, 108, 109, 0, 100, 101, 102, 103, 104]) == 0\n assert candidate(nums = [2, 2, 2, 0, 1, 1, 2]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 0, 1]) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 0, 0, 0]) == 0\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1]) == 0\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4]) == 0\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3]) == 0\n assert candidate(nums = [101, 102, 103, 104, 105, 106, 107, 108, 109, 0, 100]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 1, 3, 3, 3]) == 1\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 0, 5]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 0\n assert candidate(nums = [4, 4, 4, 4, 0, 1, 4]) == 0\n assert candidate(nums = [1, 2, 0, 1, 1, 1]) == 0\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1]) == 0\n assert candidate(nums = [6, 7, 1, 2, 2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(nums = [11, 13, 15, 17, 19, 0, 1, 3, 5, 7, 9]) == 0\n assert candidate(nums = [102, 103, 104, 105, 106, 107, 108, 109, 0, 100, 101]) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 5, 10]) == 5\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 0]) == 0\n assert candidate(nums = [2, 2, 0, 2, 2, 2, 2, 2, 2, 2]) == 0\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 6, 6, 6, 0, 1, 2]) == 0\n assert candidate(nums = [0, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [2, 2, 2, 0, 1, 2, 2, 2, 2, 2]) == 0\n assert candidate(nums = [1, 1, 0, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1]) == 0\n assert candidate(nums = [11, 13, 15, 17, 19, 21, 2, 3, 5, 7, 9]) == 2\n assert candidate(nums = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15]) == 0\n assert candidate(nums = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [4, 5, 1, 2, 3]) == 1\n assert candidate(nums = [0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 1, 3, 3]) == 1\n assert candidate(nums = [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 0\n", "comparison": "exact"}, "public_tests": ["[1,3,5]", "[2,2,2,0,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMin", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:40:55+00:00", "tests_total": 120, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def find_min(nums)", "container": null, "callable": "find_min", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 162, "task_id": "find-peak-element", "difficulty": "Medium", "problem_description": "A peak element is an element that is strictly greater than its neighbors.\n\nGiven a 0-indexed integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks.\n\nYou may imagine that nums[-1] = nums[n] = -∞. In other words, an element is always considered to be strictly greater than a neighbor that is outside the array.\n\nYou must write an algorithm that runs in O(log n) time.\n\nExample 1:\n\nInput: nums = [1,2,3,1]\nOutput: 2\nExplanation: 3 is a peak element and your function should return the index number 2.\n\nExample 2:\n\nInput: nums = [1,2,1,3,5,6,4]\nOutput: 5\nExplanation: Your function can return either index number 1 where the peak element is 2, or index number 5 where the peak element is 6.\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- -2^31 <= nums[i] <= 2^31 - 1\n- nums[i] != nums[i + 1] for all valid i.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 1]) == 2\n assert candidate(nums = [1, 2, 2, 3, 1]) == 3\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [2, 1]) == 0\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(nums = [6, 5, 4, 3, 2, 3, 2]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5]) == 4\n assert candidate(nums = [1, 3, 20, 4, 1, 0]) == 2\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1]) == 3\n assert candidate(nums = [1, 3, 2]) == 1\n assert candidate(nums = [10, 20, 15, 2, 23, 90, 67]) == 5\n assert candidate(nums = [5, 4, 3, 2, 1]) == 0\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1]) == 5\n assert candidate(nums = [1, 2]) == 1\n assert candidate(nums = [1, 3, 2, 1]) == 1\n assert candidate(nums = [1, 2, 1, 3, 5, 6, 4]) == 5\n assert candidate(nums = [1, 3, 2, 1, 3, 5, 4, 6, 5, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 11\n assert candidate(nums = [1, 2, 3, 2, 1, 0, -1, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 19\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 11\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(nums = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10]) == 5\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 17\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 4\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14]) == 13\n assert candidate(nums = [5, 1, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 29\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 12\n assert candidate(nums = [1, 10, 8, 9, 10, 6, 7, 8, 9, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 33\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 6\n assert candidate(nums = [1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1]) == 10\n assert candidate(nums = [1, 3, 5, 4, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 12\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 15\n assert candidate(nums = [5, 1, 4, 3, 2, 1, 0, -1, -2, -3, -4]) == 2\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 19\n assert candidate(nums = [1, 3, 20, 4, 1, 0, -5, 2, 23, 1, 2, 1]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 17\n assert candidate(nums = [1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2, 1]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 23\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3]) == 9\n assert candidate(nums = [1, 10, 8, 6, 7, 9, 5, 3, 4, 2, 1]) == 1\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 0\n assert candidate(nums = [1, 2, 1, 3, 5, 6, 4, 7, 8, 9, 0]) == 5\n assert candidate(nums = [5, 1, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 18, 17, 16, 15, 14]) == 9\n assert candidate(nums = [1, 10, 8, 9, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == 9\n assert candidate(nums = [1, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 5\n assert candidate(nums = [1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14, 16, 15, 17, 16, 18, 17, 19, 18, 20]) == 31\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]) == 49\n assert candidate(nums = [1, 100, 2, 3, 4, 5, 6, 7, 8, 9]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 39\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 13\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 14, 12, 10, 8, 6, 4, 2]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 29\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]) == 39\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4]) == 5\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 3, 2, 1]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]) == 29\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3]) == 8\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 9\n assert candidate(nums = [1, 3, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22, 25, 24, 27, 26, 29, 28]) == 20\n assert candidate(nums = [5, 1, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == 17\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 13\n assert candidate(nums = [1, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 24\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [5, 1, 4, 3, 2]) == 2\n", "comparison": "exact"}, "public_tests": ["[1,2,3,1]", "[1,2,1,3,5,6,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findPeakElement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:06+00:00", "tests_total": 92, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def find_peak_element(nums)", "container": null, "callable": "find_peak_element", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 164, "task_id": "maximum-gap", "difficulty": "Medium", "problem_description": "Given an integer array nums, return the maximum difference between two successive elements in its sorted form. If the array contains less than two elements, return 0.\n\nYou must write an algorithm that runs in linear time and uses linear extra space.\n\nExample 1:\n\nInput: nums = [3,6,9,1]\nOutput: 3\nExplanation: The sorted form of the array is [1,3,6,9], either (3,6) or (6,9) has the maximum difference 3.\n\nExample 2:\n\nInput: nums = [10]\nOutput: 0\nExplanation: The array contains less than 2 elements, therefore return 0.\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- 0 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1000000000]) == 999999999\n assert candidate(nums = [8, 10, 58, 59, 9, 29, 90, 1, 7, 2, 45]) == 31\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [10]) == 0\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [1000000000]) == 0\n assert candidate(nums = [5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [0, 999999999]) == 999999999\n assert candidate(nums = [1, 3, 6, 9, 12, 15, 18, 21, 24, 27]) == 3\n assert candidate(nums = [0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [5, 5, 5, 5]) == 0\n assert candidate(nums = [9, 3, 1, 10]) == 6\n assert candidate(nums = [100, 100, 100, 100]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 3, 100, 10000, 100000]) == 90000\n assert candidate(nums = [1, 3, 100, 1000000000]) == 999999900\n assert candidate(nums = [5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 3, 100, 10000]) == 9900\n assert candidate(nums = [3, 6, 9, 1]) == 3\n assert candidate(nums = [100, 300, 200, 400]) == 100\n assert candidate(nums = [5, 3, 8, 4, 9, 2, 1, 7, 6, 10]) == 1\n assert candidate(nums = [8, 15, 1, 17, 3, 19, 2, 11, 7]) == 4\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996]) == 1\n assert candidate(nums = [100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000]) == 100000\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]) == 100\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 100\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 100\n assert candidate(nums = [999999999, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 999999979\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 1000000000, 1, 1000000000, 1]) == 999999999\n assert candidate(nums = [8, 1, 5, 3, 7, 10, 2, 6, 4, 9]) == 1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 2\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992]) == 999999982\n assert candidate(nums = [1, 1000000000, 2, 999999999, 3, 999999998, 4, 999999997]) == 999999993\n assert candidate(nums = [5, 3, 8, 6, 2, 7, 4, 1]) == 1\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 1\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000]) == 100000000\n assert candidate(nums = [123456789, 234567890, 345678901, 456789012, 567890123, 678901234, 789012345, 890123456, 901234567]) == 111111101\n assert candidate(nums = [3, 6, 9, 1, 15, 10, 20, 5, 8]) == 5\n assert candidate(nums = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97]) == 4\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 100\n assert candidate(nums = [1000000000, 0, 500000000, 250000000, 750000000]) == 250000000\n assert candidate(nums = [999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010]) == 1\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 900000000\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 1\n assert candidate(nums = [5, 3, 8, 6, 2, 7, 4, 1, 9]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 1\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990]) == 1\n assert candidate(nums = [1, 3, 6, 9, 12, 15, 18, 21, 24, 27]) == 3\n assert candidate(nums = [123456789, 987654321, 111111111, 222222222, 333333333, 444444444, 555555555, 666666666, 777777777, 888888888]) == 111111111\n assert candidate(nums = [9, 3, 5, 1, 7, 8, 2, 6, 4]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 1\n assert candidate(nums = [987654321, 123456789, 876543210, 234567891, 765432109, 345678912, 654321098, 456789123, 543210987, 111111111]) == 111111111\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125]) == 500000000\n assert candidate(nums = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95]) == 10\n assert candidate(nums = [1, 1000000000, 2, 999999998, 3, 999999997]) == 999999994\n assert candidate(nums = [5, 3, 1, 4, 2, 8, 6, 7, 9, 0]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]) == 8192\n assert candidate(nums = [1, 1000000000, 2, 999999999, 3, 888888888, 4]) == 888888884\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 1\n assert candidate(nums = [1000000000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 999999970\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 1\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(nums = [5, 3, 1, 9, 7, 2, 8, 6, 4, 0]) == 1\n assert candidate(nums = [10, 1, 2, 9, 3, 8, 4, 7, 5, 6]) == 1\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 900000000\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 1\n assert candidate(nums = [1, 1000000000, 2, 999999998, 3]) == 999999995\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 10\n assert candidate(nums = [999999999, 0, 999999998, 1, 999999997, 2]) == 999999995\n assert candidate(nums = [500000000, 400000000, 300000000, 200000000, 100000000, 0, 600000000, 700000000, 800000000, 900000000]) == 100000000\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 10\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(nums = [10, 100, 1000, 10000, 100000, 1000000]) == 900000\n assert candidate(nums = [1, 1000000000, 2, 999999998, 3, 999999997]) == 999999994\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250]) == 10\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == 3\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992]) == 1\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 0\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000, 600000000, 700000000, 800000000, 900000000, 1000000000]) == 100000000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000]) == 100000000\n assert candidate(nums = [1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 900000000\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995]) == 1\n assert candidate(nums = [1, 1000000000, 1, 1000000000, 1, 1000000000, 1, 1000000000, 1, 1000000000]) == 999999999\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 10\n assert candidate(nums = [500000000, 250000000, 750000000, 125000000, 375000000]) == 250000000\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990]) == 1\n assert candidate(nums = [9, 3, 7, 1, 5, 11, 13, 17, 19, 23]) == 4\n assert candidate(nums = [25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27]) == 1\n assert candidate(nums = [500000000, 500000001, 500000002, 500000003, 500000004, 500000005, 500000006, 500000007, 500000008, 500000009]) == 1\n assert candidate(nums = [123456789, 234567891, 345678912, 456789123, 567891234, 678912345, 789123456, 891234567, 912345678, 123456789]) == 111111102\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 2\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 10\n assert candidate(nums = [500, 250, 750, 1000, 0, 125, 375, 625, 875, 925, 975, 1025]) == 125\n assert candidate(nums = [1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1]) == 900000000\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 1\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995]) == 1\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3]) == 2\n assert candidate(nums = [1, 3, 100, 999999999, 2]) == 999999899\n assert candidate(nums = [1000000000, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 999999991\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000]) == 90000\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 10\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 1\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105]) == 14\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 100\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 10\n assert candidate(nums = [1000000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000]) == 1000000\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995]) == 1\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 0, 999999999]) == 899999999\n", "comparison": "exact"}, "public_tests": ["[3,6,9,1]", "[10]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maximumGap", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:11+00:00", "tests_total": 127, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "sorting", "bucket-sort", "radix-sort", "pigeonhole-principle"]}, "language": "ruby", "interface": {"raw_signature": "def maximum_gap(nums)", "container": null, "callable": "maximum_gap", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 165, "task_id": "compare-version-numbers", "difficulty": "Medium", "problem_description": "Given two version strings, version1 and version2, compare them. A version string consists of revisions separated by dots '.'. The value of the revision is its integer conversion ignoring leading zeros.\n\nTo compare version strings, compare their revision values in left-to-right order. If one of the version strings has fewer revisions, treat the missing revision values as 0.\n\nReturn the following:\n\n- If version1 < version2, return -1.\n- If version1 > version2, return 1.\n- Otherwise, return 0.\n\nExample 1:\n\nInput: version1 = \"1.2\", version2 = \"1.10\"\nOutput: -1\nExplanation:\nversion1's second revision is \"2\" and version2's second revision is \"10\": 2 < 10, so version1 < version2.\n\nExample 2:\n\nInput: version1 = \"1.01\", version2 = \"1.001\"\nOutput: 0\nExplanation:\nIgnoring leading zeroes, both \"01\" and \"001\" represent the same integer \"1\".\n\nExample 3:\n\nInput: version1 = \"1.0\", version2 = \"1.0.0.0\"\nOutput: 0\nExplanation:\nversion1 has less revisions, which means every missing revision are treated as \"0\".\n\nConstraints:\n\n- 1 <= version1.length, version2.length <= 500\n- version1 and version2 only contain digits and '.'.\n- version1 and version2 are valid version numbers.\n- All the given revisions in version1 and version2 can be stored in a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(version1 = \"0\",version2 = \"0.0.0\") == 0\n assert candidate(version1 = \"1.1.1.1\",version2 = \"1.1.1.1\") == 0\n assert candidate(version1 = \"1.2.3.4\",version2 = \"1.2.3\") == 1\n assert candidate(version1 = \"1.1.1.1\",version2 = \"1.1.1\") == 1\n assert candidate(version1 = \"1.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"5.0000\",version2 = \"5.00000\") == 0\n assert candidate(version1 = \"0.0.1\",version2 = \"0.0.2\") == -1\n assert candidate(version1 = \"5.5.5.5\",version2 = \"5.5.5\") == 1\n assert candidate(version1 = \"5.12\",version2 = \"5.10.0\") == 1\n assert candidate(version1 = \"1.2.3\",version2 = \"1.2.3\") == 0\n assert candidate(version1 = \"1.2\",version2 = \"1.10\") == -1\n assert candidate(version1 = \"1.0.0.1\",version2 = \"1\") == 1\n assert candidate(version1 = \"2.0\",version2 = \"1.9\") == 1\n assert candidate(version1 = \"1.01\",version2 = \"1.001\") == 0\n assert candidate(version1 = \"0.1\",version2 = \"1.1\") == -1\n assert candidate(version1 = \"1.10.0\",version2 = \"1.1\") == 1\n assert candidate(version1 = \"1.0\",version2 = \"1.0.0.0\") == 0\n assert candidate(version1 = \"0.1\",version2 = \"0.0.1\") == 1\n assert candidate(version1 = \"1.1.1\",version2 = \"1.1.1\") == 0\n assert candidate(version1 = \"10.0.0\",version2 = \"10\") == 0\n assert candidate(version1 = \"10.5.2\",version2 = \"10.5.2\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0\",version2 = \"1.0\") == 0\n assert candidate(version1 = \"1\",version2 = \"1.0\") == 0\n assert candidate(version1 = \"1.0.1\",version2 = \"1\") == 1\n assert candidate(version1 = \"7.5.2.4\",version2 = \"7.5.3\") == -1\n assert candidate(version1 = \"1.2.3\",version2 = \"1.2.4\") == -1\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9\",version2 = \"1.2.3.4.5.6.7.8.9.0.0.0\") == 0\n assert candidate(version1 = \"123456789.987654321\",version2 = \"123456789.987654321.0\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0.0\",version2 = \"1.0.0.0.0.0.0.0.0.0\") == 0\n assert candidate(version1 = \"1.2.3.4.5\",version2 = \"1.2.3.4.6\") == -1\n assert candidate(version1 = \"1.23.456.7890\",version2 = \"1.23.456.7890.0\") == 0\n assert candidate(version1 = \"1.0.0.1\",version2 = \"1.0\") == 1\n assert candidate(version1 = \"001.002.003\",version2 = \"1.2.3\") == 0\n assert candidate(version1 = \"99999.99999.99999.99999\",version2 = \"100000.0.0.0\") == -1\n assert candidate(version1 = \"1.001.0001.00001\",version2 = \"1.1.1.1\") == 0\n assert candidate(version1 = \"1000000000\",version2 = \"1\") == 1\n assert candidate(version1 = \"1.2.3\",version2 = \"1.2.3.0\") == 0\n assert candidate(version1 = \"1.999999999.999999999\",version2 = \"2\") == -1\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"0.0.0.0.0.0.0.0\",version2 = \"0\") == 0\n assert candidate(version1 = \"1.001.00001.000000001\",version2 = \"1.1.1.1\") == 0\n assert candidate(version1 = \"3.14159.26535\",version2 = \"3.14159.26535.0\") == 0\n assert candidate(version1 = \"1.0.0\",version2 = \"1.0\") == 0\n assert candidate(version1 = \"1.1.1.1.1\",version2 = \"1.1.1.1.2\") == -1\n assert candidate(version1 = \"1.2\",version2 = \"1.02\") == 0\n assert candidate(version1 = \"1.000001\",version2 = \"1.00001\") == 0\n assert candidate(version1 = \"1.0.10.0.0\",version2 = \"1.0.10\") == 0\n assert candidate(version1 = \"1.2.3\",version2 = \"1.2.0.3\") == 1\n assert candidate(version1 = \"999999999\",version2 = \"1000000000\") == -1\n assert candidate(version1 = \"99999.99999.99999\",version2 = \"100000\") == -1\n assert candidate(version1 = \"1.000000000.000000000\",version2 = \"1.0\") == 0\n assert candidate(version1 = \"1.0.10\",version2 = \"1.0.1\") == 1\n assert candidate(version1 = \"1000.1000.1000\",version2 = \"1000.1000\") == 1\n assert candidate(version1 = \"100000.99999.88888\",version2 = \"100000.99999.88889\") == -1\n assert candidate(version1 = \"0.1.2.3.4.5.6.7.8.9\",version2 = \"0.1.2.3.4.5.6.7.8.10\") == -1\n assert candidate(version1 = \"1.010.0010\",version2 = \"1.10.10\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.10\",version2 = \"1.2.3.4.5.6.7.8.9\") == 1\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9\",version2 = \"1.2.3.4.5.6.7.8.9\") == 0\n assert candidate(version1 = \"1.1.1.1.1.1.1.1.1.1\",version2 = \"1.1.1.1.1.1.1.1.1.1\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"1.0.1\",version2 = \"1.1.0\") == -1\n assert candidate(version1 = \"1.010.001\",version2 = \"1.10.1\") == 0\n assert candidate(version1 = \"2.0.0.0\",version2 = \"1.9.9.9\") == 1\n assert candidate(version1 = \"1.2.3.4.5.6\",version2 = \"1.2.3.4.5.6.0\") == 0\n assert candidate(version1 = \"5.5.5\",version2 = \"5.05.005\") == 0\n assert candidate(version1 = \"0.0.0.0.0.1\",version2 = \"0.0.0.0.0.0\") == 1\n assert candidate(version1 = \"1.1.1.1.1.1.1.1.1.1\",version2 = \"1.1.1.1.1.1.1.1.1.1.0\") == 0\n assert candidate(version1 = \"1.2.3.4.5\",version2 = \"1.2.3.4.5.6\") == -1\n assert candidate(version1 = \"2.0\",version2 = \"2.0.0.0.0.0\") == 0\n assert candidate(version1 = \"9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9\",version2 = \"9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.9.0\") == 0\n assert candidate(version1 = \"2.5.0.0.0\",version2 = \"2.5\") == 0\n assert candidate(version1 = \"1.0.0\",version2 = \"1.0.0.0\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.10\",version2 = \"1.2.3.4.5.6.7.8.9.9\") == 1\n assert candidate(version1 = \"0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0\",version2 = \"0\") == 0\n assert candidate(version1 = \"0.0.0.0.0\",version2 = \"0\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9\",version2 = \"1.2.3.4.5.6.7.8.9.0\") == 0\n assert candidate(version1 = \"2.0.0\",version2 = \"2\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9\",version2 = \"1.2.3.4.5.6.7.8.10\") == -1\n assert candidate(version1 = \"1.2.3.4\",version2 = \"1.2.3.4.0.0\") == 0\n assert candidate(version1 = \"10.0.0.0\",version2 = \"10\") == 0\n assert candidate(version1 = \"9.8.7.6.5.4.3.2.1\",version2 = \"9.8.7.6.5.4.3.2.0\") == 1\n assert candidate(version1 = \"1.0.0\",version2 = \"1.0.0.0.0.0\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.10\",version2 = \"1.2.3.4.5.6.7.8.9.10.0.0\") == 0\n assert candidate(version1 = \"1.10.100.1000\",version2 = \"1.10.100.1000.0\") == 0\n assert candidate(version1 = \"1.001.002.003\",version2 = \"1.1.2.3\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0.0.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.10.11\",version2 = \"1.2.3.4.5.6.7.8.9.10\") == 1\n assert candidate(version1 = \"1.0.0.0.0.0.0\",version2 = \"1.0.0.0.0\") == 0\n assert candidate(version1 = \"1.2.3.0.0.0.0\",version2 = \"1.2.3\") == 0\n assert candidate(version1 = \"1.0.0.0.1\",version2 = \"1\") == 1\n assert candidate(version1 = \"1.2.3.4.5\",version2 = \"1.2.3.4.5.0.0\") == 0\n assert candidate(version1 = \"1.1.1.1.1.1.1.1.1.1\",version2 = \"1.1.1.1.1.1.1.1.1.2\") == -1\n assert candidate(version1 = \"1.2.0.0.0\",version2 = \"1.2\") == 0\n assert candidate(version1 = \"1.2.3.4.5\",version2 = \"1.2.3.4\") == 1\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.10\",version2 = \"1.2.3.4.5.6.7.8.9.11\") == -1\n assert candidate(version1 = \"1.000000001\",version2 = \"1.1\") == 0\n assert candidate(version1 = \"1.200.300.400\",version2 = \"1.200.300.400.000.000\") == 0\n assert candidate(version1 = \"9.9.9.9\",version2 = \"9.9.9.9.0\") == 0\n assert candidate(version1 = \"2.3.4.5.6\",version2 = \"2.3.4.5.0\") == 1\n assert candidate(version1 = \"1.002.003\",version2 = \"1.2.3\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.0\",version2 = \"1.2.3.4.5.6.7.8.9\") == 0\n assert candidate(version1 = \"1.20.3.4\",version2 = \"1.20.3.5\") == -1\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0\",version2 = \"1.0.0\") == 0\n assert candidate(version1 = \"1.2.3.4.5.6.7.8.9.10.11.12.13.14.15\",version2 = \"1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.0\") == 0\n assert candidate(version1 = \"0.0.0.0.0.0.0.0.0.0\",version2 = \"0\") == 0\n assert candidate(version1 = \"1.100.100\",version2 = \"1.99.99\") == 1\n assert candidate(version1 = \"1.000000000.000000000.000000000.000000000\",version2 = \"1.0.0.0\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1\",version2 = \"1\") == 1\n assert candidate(version1 = \"1.20.3\",version2 = \"1.19.99\") == 1\n assert candidate(version1 = \"1.0.0.0.0.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"1.2.3.4\",version2 = \"1.2.3.4.5\") == -1\n assert candidate(version1 = \"123456789.987654321\",version2 = \"123456789.987654320\") == 1\n assert candidate(version1 = \"1000000000.1000000000\",version2 = \"1000000000.1000000000.0\") == 0\n assert candidate(version1 = \"1.0.0.0.0.0.0.0\",version2 = \"1\") == 0\n assert candidate(version1 = \"0001.0002.0003\",version2 = \"1.2.3\") == 0\n assert candidate(version1 = \"1.00001.00002\",version2 = \"1.1.2\") == 0\n assert candidate(version1 = \"999999999.999999999.999999999\",version2 = \"1000000000\") == -1\n assert candidate(version1 = \"1.0.0.0.0\",version2 = \"1\") == 0\n", "comparison": "exact"}, "public_tests": ["\"1.2\"\n\"1.10\"", "\"1.01\"\n\"1.001\"", "\"1.0\"\n\"1.0.0.0\""], "hints": ["You can use two pointers for each version string to traverse them together while comparing the corresponding segments.", "Utilize the substring method to extract each version segment delimited by '.'. Ensure you're extracting the segments correctly by adjusting the start and end indices accordingly."], "metadata": {"canonical_parameter_names": ["version1", "version2"], "leetcode_dataset_entry_point": "Solution().compareVersion", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:13+00:00", "tests_total": 119, "tests_dropped": 0, "flags": [], "topic_tags": ["two-pointers", "string"]}, "language": "ruby", "interface": {"raw_signature": "def compare_version(version1, version2)", "container": null, "callable": "compare_version", "parameters": [{"name": "version1", "type": "String"}, {"name": "version2", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 166, "task_id": "fraction-to-recurring-decimal", "difficulty": "Medium", "problem_description": "Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.\n\nIf the fractional part is repeating, enclose the repeating part in parentheses\n\nIf multiple answers are possible, return any of them.\n\nIt is guaranteed that the length of the answer string is less than 10^4 for all the given inputs.\n\nNote that if the fraction can be represented as a finite length string, you must return it.\n\nExample 1:\n\nInput: numerator = 1, denominator = 2\nOutput: \"0.5\"\n\nExample 2:\n\nInput: numerator = 2, denominator = 1\nOutput: \"2\"\n\nExample 3:\n\nInput: numerator = 4, denominator = 333\nOutput: \"0.(012)\"\n\nConstraints:\n\n- -2^31 <= numerator, denominator <= 2^31 - 1\n- denominator != 0\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(numerator = 7,denominator = -3) == \"-2.(3)\"\n assert candidate(numerator = 1,denominator = 6) == \"0.1(6)\"\n assert candidate(numerator = 4,denominator = 333) == \"0.(012)\"\n assert candidate(numerator = 22,denominator = 7) == \"3.(142857)\"\n assert candidate(numerator = -1,denominator = 1) == \"-1\"\n assert candidate(numerator = -1,denominator = 2) == \"-0.5\"\n assert candidate(numerator = 5,denominator = 2) == \"2.5\"\n assert candidate(numerator = 7,denominator = 6) == \"1.1(6)\"\n assert candidate(numerator = 1,denominator = 13) == \"0.(076923)\"\n assert candidate(numerator = 1,denominator = -2) == \"-0.5\"\n assert candidate(numerator = -1,denominator = -2) == \"0.5\"\n assert candidate(numerator = 2,denominator = 1) == \"2\"\n assert candidate(numerator = 11,denominator = 6) == \"1.8(3)\"\n assert candidate(numerator = 1,denominator = 2) == \"0.5\"\n assert candidate(numerator = 0,denominator = 1) == \"0\"\n assert candidate(numerator = -1,denominator = -1) == \"1\"\n assert candidate(numerator = 1,denominator = -1) == \"-1\"\n assert candidate(numerator = -50,denominator = 8) == \"-6.25\"\n assert candidate(numerator = -2147483648,denominator = 1) == \"-2147483648\"\n assert candidate(numerator = 1,denominator = 17) == \"0.(0588235294117647)\"\n assert candidate(numerator = 1,denominator = 3) == \"0.(3)\"\n assert candidate(numerator = 2,denominator = 3) == \"0.(6)\"\n assert candidate(numerator = 1,denominator = 7) == \"0.(142857)\"\n assert candidate(numerator = 1,denominator = 666) == \"0.0(015)\"\n assert candidate(numerator = 1,denominator = 997) == \"0.(0010030090270812437311935807422266800401203610832497492477432296890672016048144433299899699097291875626880641925777331995987963891675025075225677031093279839518555667)\"\n assert candidate(numerator = -2147483648,denominator = 2) == \"-1073741824\"\n assert candidate(numerator = 1000,denominator = 777) == \"1.(287001)\"\n assert candidate(numerator = 2147483647,denominator = 3) == \"715827882.(3)\"\n assert candidate(numerator = 7,denominator = 12) == \"0.58(3)\"\n assert candidate(numerator = 1,denominator = 999) == \"0.(001)\"\n assert candidate(numerator = 5,denominator = 20) == \"0.25\"\n assert candidate(numerator = 22,denominator = 3) == \"7.(3)\"\n assert candidate(numerator = 789,denominator = 321) == \"2.(45794392523364485981308411214953271028037383177570093)\"\n assert candidate(numerator = 111,denominator = 400) == \"0.2775\"\n assert candidate(numerator = -21,denominator = 6) == \"-3.5\"\n assert candidate(numerator = 29,denominator = 37) == \"0.(783)\"\n assert candidate(numerator = 1,denominator = 1000000000) == \"0.000000001\"\n assert candidate(numerator = 1,denominator = 10001) == \"0.(00009999)\"\n assert candidate(numerator = 1234567890,denominator = 100000000) == \"12.3456789\"\n assert candidate(numerator = 100,denominator = 999) == \"0.(100)\"\n assert candidate(numerator = 10,denominator = 16) == \"0.625\"\n assert candidate(numerator = 100,denominator = 101) == \"0.(9900)\"\n assert candidate(numerator = 111111111,denominator = 333333333) == \"0.(3)\"\n assert candidate(numerator = 123,denominator = 456) == \"0.269(736842105263157894)\"\n assert candidate(numerator = 500,denominator = 22) == \"22.(72)\"\n assert candidate(numerator = 1,denominator = 199) == \"0.(005025125628140703517587939698492462311557788944723618090452261306532663316582914572864321608040201)\"\n assert candidate(numerator = 1,denominator = 333) == \"0.(003)\"\n assert candidate(numerator = 1,denominator = 1001) == \"0.(000999)\"\n assert candidate(numerator = 1,denominator = 99) == \"0.(01)\"\n assert candidate(numerator = 123456,denominator = 111111) == \"1.(111105)\"\n assert candidate(numerator = 5,denominator = 22) == \"0.2(27)\"\n assert candidate(numerator = 1,denominator = 1000) == \"0.001\"\n assert candidate(numerator = 77,denominator = 22) == \"3.5\"\n assert candidate(numerator = -22,denominator = 7) == \"-3.(142857)\"\n assert candidate(numerator = 10,denominator = -3) == \"-3.(3)\"\n assert candidate(numerator = 1,denominator = 1111111111) == \"0.(0000000009)\"\n assert candidate(numerator = -1,denominator = -6) == \"0.1(6)\"\n assert candidate(numerator = 99,denominator = 77) == \"1.(285714)\"\n assert candidate(numerator = 1,denominator = 33333) == \"0.(00003)\"\n assert candidate(numerator = 111,denominator = 990) == \"0.1(12)\"\n assert candidate(numerator = -2,denominator = -3) == \"0.(6)\"\n assert candidate(numerator = 50,denominator = 22) == \"2.(27)\"\n assert candidate(numerator = 1,denominator = 100000) == \"0.00001\"\n assert candidate(numerator = 123456,denominator = 789012) == \"0.(156469103131511307812808930662651518608082006357317759425712)\"\n assert candidate(numerator = 5,denominator = 12) == \"0.41(6)\"\n assert candidate(numerator = 100,denominator = 777) == \"0.(128700)\"\n assert candidate(numerator = 123456,denominator = 987654) == \"0.(124999240624753203044790989557071606048271965688388848726375836072146723447685120497664161740852565777083877552260204484566457484098682332071757923321325079430650814961514862492330310007350752388994526423221087546853452727372136395944328681906821619717026408033582610914348547163277828065294121220589396691553924755025545383302249573231111300111172536131074242599128844716874532984223219872546458577599037719687258898359141966721139184370234920326349106063459470624327952906584694640025758008371352720689634224131122842614923849850251201331640432783140654520712719231633750280968841314873427333863883505762139372695296125971240940653305712324356505415864260155884550662478965305663724340710410730883487537133449568371109720610659198464239500877837785297280221616072025223408197607664222490872309533500598387694476000704700229027574433961691037549587203615841175148381923224125047840640548208178167657904488818958866161631502530238322327454756422795837408647157810326288356043715714207607117472313178501783013079479250830756519995868998657424563662983190469536902599493344835337071484548232478175555407055507293039870237957827336293884295512396041528713496831886470363102868008432102740433390640851958276886439988092996130223742322716254882782836904421993937148029573109611260623659702689403374056096568231384675200019440006318002053350667338966885164237678377245472604778596553043879739260915259797459434174316106652734662138765195098688407073732298962997162974077966575339136985219520196344063811820738841740123565540158800551610179273308263825185743185366535244123954340285160592677192620087601528470496752911444696219526271346038187462410925283550717153983075044499389462301575248011955603885571262810660413464634376006172202005965651938836880121986039645462884775437552017204405591431817215340594985693370350345363862243255229057949443833569245910004920751599244269754387670175992807197662339240260253084582252489232059000419175136231919275373764496473461353874940009355503040538488175008656877813485289382719049383691049699591152367124519315468777527352696389626326628556154280750141243795904233668875942384681275021414381959674136894094490580709438730567587434465916201422765462398775279601965870638907957645086234653026262233535225898948417158235576426562338632760055647018085280877716285257792708782630354354865165331178732633088105753634369931170227630323979855293452970372215370969995565248558705781579379013298179321908279620190876562034882661336864934481103706358704566578984138169844905199594189868111707136304819299066272196538463875000759375246796955209010442928393951728034311611151273624163927853276552314879502335838259147434222916122447739795515433542515901317667928242076678674920569349185038485137507669689992649247611005473576778912453146547272627863604055671318093178380282973591966417389085651452836722171934705878779410603308446075244974454616697750426768888699888827463868925757400871155283125467015776780127453541422400962280312741101640858033278860815629765079673650893936540529375672047093415305359974241991628647279310365775868877157385076150149748798668359567216859345479287280768366249719031158685126572666136116494237860627304703874028759059346694287675643494584135739844115449337521034694336275659289589269116512462866550431628890279389340801535760499122162214702719778383927974776591802392335777509127690466499401612305523999295299770972425566038308962450412796384158824851618076775874952159359451791821832342095511181041133838368497469761677672545243577204162591352842189673711643956284285792392882527686821498216986920520749169243480004131001342575436337016809530463097400506655164662928515451767521824444592944492706960129762042172663706115704487603958471286503168113529636897131991567897259566609359148041723113560011907003869776257677283745117217163095578006062851970426890388739376340297310596625943903431768615324799980559993681997946649332661033114835762321622754527395221403446956120260739084740202540565825683893347265337861234804901311592926267701037002837025922033424660863014780479803655936188179261158259876434459841199448389820726691736174814256814633464755876045659714839407322807379912398471529503247088555303780473728653961812537589074716449282846016924955500610537698424751988044396114428737189339586535365623993827797994034348061163119878013960354537115224562447982795594408568182784659405014306629649654636137756744770942050556166430754089995079248400755730245612329824007192802337660759739746915417747510767940999580824863768080724626235503526538646125059990644496959461511824991343122186514710617280950616308950300408847632875480684531222472647303610373673371443845719249858756204095766331124057615318724978585618040325863105905509419290561269432412565534083798577234537601224720398034129361092042354913765346973737766464774101051582841764423573437661367239944352981914719122283714742207291217369645645134834668821267366911894246365630068829772369676020144706547029627784629030004434751441294218420620986701820678091720379809123437965117338663135065518896293641295433421015861830155094800405810131888292863695180700933727803461536)\"\n assert candidate(numerator = -5,denominator = 2) == \"-2.5\"\n assert candidate(numerator = 100,denominator = 77) == \"1.(298701)\"\n assert candidate(numerator = 1,denominator = 27) == \"0.(037)\"\n assert candidate(numerator = 100,denominator = 99) == \"1.(01)\"\n assert candidate(numerator = -1,denominator = -333) == \"0.(003)\"\n assert candidate(numerator = -1,denominator = 3) == \"-0.(3)\"\n assert candidate(numerator = 1,denominator = -2147483648) == \"-0.0000000004656612873077392578125\"\n assert candidate(numerator = 100,denominator = 33) == \"3.(03)\"\n assert candidate(numerator = 10,denominator = 3) == \"3.(3)\"\n assert candidate(numerator = 111,denominator = 999) == \"0.(1)\"\n assert candidate(numerator = 4,denominator = 11) == \"0.(36)\"\n assert candidate(numerator = 2147483647,denominator = 1) == \"2147483647\"\n assert candidate(numerator = 100,denominator = -3) == \"-33.(3)\"\n assert candidate(numerator = 1,denominator = 3333) == \"0.(0003)\"\n assert candidate(numerator = 1,denominator = 10007) == \"0.(0000999300489657239932047566703307684620765464175077445787948436094733686419506345558109323473568502048566003797341860697511741780753472569201558908763865294293994204057159988008394124113120815429199560307784550814429899070650544618766863195762965923853302688118317177975417207954431897671629859098630958329169581293094833616468472069551314080143899270510642550214849605276306585390226841211152193464574797641650844408913760367742580193864294993504546817227940441690816428500049965024482861996602378335165384231038273208753872289397421804736684320975317277905466173678425102428300189867093034875587089037673628460077945438193264714699710202857999400419706205656040771459978015389227540721494953532527230938343159788148296192665134405915858898770860397721594883581492954931547916458479064654741680823423603477565704007194963525532127510742480263815329269511342060557609673228739882082542220445688018387129009693214749675227340861397022084540821425002498251224143099830118916758269211551913660437693614469871090236834216048765863895273308683921255121415009493354651743779354451883681423003897271909663235734985510142899970020985310282802038572998900769461377036074747676626361546917157989407414809633256720295792944938543019886079744179074647746577395822923953232737084041171180173878285200359748176276606375537124013190766463475567103027880483661436994104127111022284400919356450484660737483761367043069851104227041071250124912561207154991505945837913460577595683021884680723493554511841710802438293194763665434196062756070750474667732587188967722594184071150194863595483161786749275507144998501049265514140101928649945038473068851803737383831318077345857899470370740481662836014789647246927150994303987208953732387328869791146197661636854202058559008693914260017987408813830318776856200659538323173778355151394024183071849705206355551114220045967822524233036874188068352153492555211352053562506245628060357749575297291895673028879784151094234036174677725592085540121914659738183271709803137803537523733386629359448386129709203557509743179774158089337463775357249925052463275707005096432497251923653442590186869191565903867292894973518537024083141800739482362346357549715199360447686619366443489557309883081842710102927950434695713000899370440691515938842810032976916158688917757569701209153592485260317777555711002298391126211651843709403417607674627760567602678125312281403017887478764864594783651443989207554711701808733886279604277006095732986909163585490156890176876186669331467972419306485460177875487158988707904466873188767862496252623163785350254821624862596182672129509343459578295193364644748675926851204157090036974118117317877485759968022384330968322174477865494154092135505146397521734785650044968522034575796942140501648845807934445887878485060457679624263015888877785550114919556310582592185470170880383731388028380133906265614070150894373938243229739182572199460377735585090436694313980213850304786649345458179274507844508843809333466573398620965324273008893774357949435395223343659438393124812631158189267512741081243129809133606475467172978914759668232237433796342560207854501848705905865893874287998401119216548416108723893274707704606775257319876086739282502248426101728789847107025082442290396722294393924253022883981213150794443889277505745977815529129609273508544019186569401419006695313280703507544718696912161486959128609973018886779254521834715699010692515239332467272908963725392225442190466673328669931048266213650444688717897471769761167182971919656240631557909463375637054062156490456680323773358648945737983411611871689817128010392725092435295293294693714399920055960827420805436194663735385230338762865993804336964125112421305086439492355351254122114519836114719696212651144199060657539722194463875287298890776456480463675427200959328470070950334765664035175377235934845608074347956430498650944338962726091735784950534625761966623363645448186269611272109523333666433496552413310682522234435894873588488058359148595982812031577895473168781852703107824522834016188667932447286899170580593584490856400519636254621764764664734685719996002798041371040271809733186769261516938143299690216848206255621065254321974617767562706105725991805735984810632557209953032876986109723193764364944538822824023183771360047966423503547516738283201758768861796742280403717397821524932547216948136304586789247526731288098331168182272409313480563605476166683321674827620665534126111721794743679424402917957429799140601578894773658439092635155391226141700809433396622364344958529029679224542820025981812731088238233236734285999800139902068552013590486659338463075846907164984510842410312781053262716098730888378135305286299590286799240531627860497651643849305486159688218247226941141201159188568002398321175177375836914160087938443089837114020185869891076246627360847406815229339462376336564404916558409113620465674028180273808334166083741381033276706305586089737183971220145897871489957030078944738682921954631757769561307085040471669831118217247926451483961227141001299090636554411911661836714299990006995103427600679524332966923153792345358249225542120515639052663135804936544418906765264314979514339962026581393024882582192465274307984410912361347057060057959428400119916058758868791845708004396922154491855701009293494553812331368042370340761466973118816828220245827920455681023283701409013690416708304187069051663835315279304486859198561007294893574497851503947236934146097731587888478065354252023583491555910862396322574198061357050064954531827720595583091835714999500349755171380033976216648346157689617267912461277106025781952633156790246827220945338263215748975716998101329069651244129109623263715399220545618067352853002897971420005995802937943439592285400219846107724592785050464674727690616568402118517038073348655940841411012291396022784051164185070450684520835415209353452583191765763965224342959928050364744678724892575197361846707304886579394423903267712601179174577795543119816128709903067852503247726591386029779154591785749975017487758569001698810832417307884480863395623063855301289097631657839512341361047266913160787448785849905066453482562206455481163185769961027280903367642650144898571000299790146897171979614270010992305386229639252523233736384530828420105925851903667432797042070550614569801139202558209253522534226041770760467672629159588288198261217147996402518237233936244628759868092335365244328969721195163385630058958728889777155990806435495153392625162386329569301488957729589287498750874387928450084940541620865394224043169781153192765064454881582891975617068052363345658039372439292495253322674128110322774058159288498051364045168382132507244928550014989507344858598980713500549615269311481962626161686819226541421005296292595183371639852103527530728490056960127910462676126711302088538023383631457979414409913060857399820125911861696812231437993404616768262216448486059758169281502947936444488857799540321774757669631258119316478465074447886479464374937543719396422504247027081043269711202158489057659638253222744079144598780853402618167282901968621964624762666133706405516138702907964424902568202258419106625362246427500749475367242929949035675027480763465574098131308084340961327071050264814629759168581992605176376536424502848006395523133806335565104426901169181572898970720495653042869991006295593084840611571899670230838413110822424302987908464075147396822224442889977016088737883481562905965823923253722394323973218746877185969821125212351354052163485560107924452882981912661137203957229939042670130908364145098431098231238133306685320275806935145398221245128410112920955331268112321375037473768362146497451783751374038173278704906565404217048066353552513240731487958429099630258818826821225142400319776156690316778255221345058459078644948536024782652143499550314779654242030578594983511541920655541121215149395423203757369841111222144498850804436894174078145298291196162686119716198660937343859298491056260617567702608174278005396222644149095633056860197861496952133506545418207254921554911561906665334266013790346757269911062256420505646047766563405616068751873688418107324872589187568701908663935245328270210852403317677625662036574397921454981512940941341061257120015988807834515838912761067252922953932247426801239132607174977515738982712101528929749175577096032777056060757469771160187868492055561107224942540221844708703907264914559808134305985809933046867192964924552813030878385130408713900269811132207454781652843009893074847606675327270910362746077745578095333266713300689517337863495553112821025282302388328170280803437593684420905366243629459378435095433196762266413510542620165883881283101828719896072749075647047067053062856000799440391725791945638053362646147696612371340061956630358748875786949135605076446487458778854801638852803037873488558009393424602778055361247127011092235435195363245727990406715299290496652343359648246227640651543919256520435695013490556610372739082642150494653742380333766363545518137303887278904766663335665034475866893174777655641051264115119416408514040171879684221045268312181472968921754771659838113320675527131008294194064155091435994803637453782352353352653142800039972019586289597281902668132307384830618567003097831517937443789347456780253822324372938942740081942640151893674427900469671230138902768062356350554611771759768162286399520335764964524832617167982412311382032577195962826021784750674527830518636954132107524732687119016688318177275906865194363945238333166783251723793344658738882782052563205755970820425702008593984211052263415609073648446087738582991905666033776356550414709703207754571799740181872689117617667632657140001998600979314479864095133406615369241530928350154891575896872189467372839012691116218646947137004097132007594683721395023483561506945138403117817527730588587988408114319976016788248226241630858399120615569101628859798141301089237533726391525931847706605376236634355950834415908863795343259718197261916658339162586189667232936944139102628160287798541021285100429699210552613170780453682422304386929149595283301688817827520735485160387728589987009093634455880883381632857)\"\n assert candidate(numerator = 999,denominator = 77) == \"12.(974025)\"\n", "comparison": "exact"}, "public_tests": ["1\n2", "2\n1", "4\n333"], "hints": ["No scary math, just apply elementary math knowledge. Still remember how to perform a long division?", "Try a long division on 4/9, the repeating part is obvious. Now try 4/333. Do you see a pattern?", "Notice that once the remainder starts repeating, so does the divided result.", "Be wary of edge cases! List out as many test cases as you can think of and test your code thoroughly."], "metadata": {"canonical_parameter_names": ["numerator", "denominator"], "leetcode_dataset_entry_point": "Solution().fractionToDecimal", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:15+00:00", "tests_total": 83, "tests_dropped": 0, "flags": ["multiple_answers"], "topic_tags": ["hash-table", "math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def fraction_to_decimal(numerator, denominator)", "container": null, "callable": "fraction_to_decimal", "parameters": [{"name": "numerator", "type": "Integer"}, {"name": "denominator", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 167, "task_id": "two-sum-ii-input-array-is-sorted", "difficulty": "Medium", "problem_description": "You are given a 1-indexed array of integers numbers that is already sorted in non-decreasing order.\n\nFind two numbers such that they add up to a specific target number. Let these two numbers be numbers[index_1] and numbers[index_2] where 1 <= index_1 < index_2 <= numbers.length.\n\nReturn the indices of the two numbers index_1 and index_2 as an integer array [index_1, index_2] of length 2.\n\nThe tests are generated such that there is exactly one solution. You may not use the same element twice.\n\nYour solution must use only constant extra space.\n\nExample 1:\n\nInput: numbers = [2,7,11,15], target = 9\nOutput: [1,2]\nExplanation: The sum of 2 and 7 is 9. Therefore, index_1 = 1, index_2 = 2. We return [1, 2].\n\nExample 2:\n\nInput: numbers = [2,3,4], target = 6\nOutput: [1,3]\nExplanation: The sum of 2 and 4 is 6. Therefore index_1 = 1, index_2 = 3. We return [1, 3].\n\nExample 3:\n\nInput: numbers = [-1,0], target = -1\nOutput: [1,2]\nExplanation: The sum of -1 and 0 is -1. Therefore index_1 = 1, index_2 = 2. We return [1, 2].\n\nConstraints:\n\n- 2 <= numbers.length <= 3 * 10^4\n- -1000 <= numbers[i] <= 1000\n- numbers is sorted in non-decreasing order.\n- -1000 <= target <= 1000\n- The tests are generated such that there is exactly one solution.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(numbers = [-3, -2, -1, 0, 0, 1, 2, 3],target = 0) == [1, 8]\n assert candidate(numbers = [-10, -5, 0, 5, 10],target = 0) == [1, 5]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9],target = 17) == [8, 9]\n assert candidate(numbers = [-10, -5, -3, 3, 5, 6, 7, 8, 9],target = 0) == [2, 5]\n assert candidate(numbers = [5, 25, 75],target = 100) == [2, 3]\n assert candidate(numbers = [-10, -5, -2, -1, 0, 1, 2, 5, 10],target = 0) == [1, 9]\n assert candidate(numbers = [-10, -5, -3, -1, 0, 2, 3, 5, 6, 9],target = -8) == [1, 6]\n assert candidate(numbers = [1, 2, 3, 4, 4, 9, 56, 90],target = 8) == [4, 5]\n assert candidate(numbers = [1, 3, 5, 7, 9],target = 10) == [1, 5]\n assert candidate(numbers = [-1000, -500, 0, 500, 1000],target = 0) == [1, 5]\n assert candidate(numbers = [-1, 0],target = -1) == [1, 2]\n assert candidate(numbers = [2, 3, 4],target = 6) == [1, 3]\n assert candidate(numbers = [2, 7, 11, 15],target = 9) == [1, 2]\n assert candidate(numbers = [-50, -25, 0, 25, 50, 75, 100],target = 25) == [1, 6]\n assert candidate(numbers = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40],target = 65) == [9, 14]\n assert candidate(numbers = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110],target = 219) == [10, 11]\n assert candidate(numbers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],target = 1) == [1, 11]\n assert candidate(numbers = [-500, -450, -400, -350, -300, -250, -200, -150, -100, -50, 0],target = -250) == [6, 11]\n assert candidate(numbers = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 40) == [6, 15]\n assert candidate(numbers = [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30],target = 51) == [9, 12]\n assert candidate(numbers = [-999, -500, -100, 0, 100, 500, 999],target = 500) == [4, 6]\n assert candidate(numbers = [-3, -2, -1, 0, 1, 2, 3],target = 0) == [1, 7]\n assert candidate(numbers = [-10, -5, 0, 3, 7, 9, 11],target = 2) == [2, 5]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 13) == [1, 12]\n assert candidate(numbers = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],target = 70) == [15, 20]\n assert candidate(numbers = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = 0) == [1, 11]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 29) == [14, 15]\n assert candidate(numbers = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],target = 1) == [2, 11]\n assert candidate(numbers = [-10, -5, 0, 3, 7, 9, 11, 15],target = 8) == None\n assert candidate(numbers = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59],target = 108) == [25, 30]\n assert candidate(numbers = [-10, -5, 0, 5, 10, 15],target = 5) == [1, 6]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 38) == [18, 20]\n assert candidate(numbers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == [1, 2]\n assert candidate(numbers = [-50, -20, -10, 0, 10, 20, 30, 40, 50],target = 0) == [1, 9]\n assert candidate(numbers = [1, 1, 2, 2, 3, 4, 5],target = 4) == [1, 5]\n assert candidate(numbers = [1, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8, 9],target = 8) == [1, 13]\n assert candidate(numbers = [-10, -5, 0, 5, 10],target = 0) == [1, 5]\n assert candidate(numbers = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120],target = 210) == None\n assert candidate(numbers = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7],target = 5) == [1, 12]\n assert candidate(numbers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],target = 1) == [1, 15]\n assert candidate(numbers = [1, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 30) == [5, 10]\n assert candidate(numbers = [1, 1, 1, 1, 1, 1, 1, 1, 1, 9],target = 10) == [1, 10]\n assert candidate(numbers = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31],target = 58) == [14, 16]\n assert candidate(numbers = [1, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 38) == [9, 10]\n assert candidate(numbers = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2],target = 3) == [1, 15]\n assert candidate(numbers = [-10, -5, -1, 0, 2, 5, 8, 12],target = -3) == [2, 5]\n assert candidate(numbers = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],target = 58) == None\n assert candidate(numbers = [-50, -25, -10, -5, 0, 5, 10, 25, 50],target = 0) == [1, 9]\n assert candidate(numbers = [-50, -25, 0, 25, 50],target = 25) == [2, 5]\n assert candidate(numbers = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75],target = 130) == [11, 15]\n assert candidate(numbers = [3, 3, 3, 3, 3],target = 6) == [1, 2]\n assert candidate(numbers = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 2) == [1, 2]\n assert candidate(numbers = [-100, -90, -80, -70, -60, -50, -40, -30, -20, -10],target = -80) == [4, 10]\n assert candidate(numbers = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],target = 120) == [3, 19]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],target = 28) == [13, 15]\n assert candidate(numbers = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2],target = 3) == [1, 21]\n assert candidate(numbers = [-500, -250, -100, -50, -25, -10, -5, 0, 5, 10, 25, 50, 100, 250, 500],target = 0) == [1, 15]\n assert candidate(numbers = [100, 150, 200, 250, 300, 350, 400, 450, 500],target = 750) == [4, 9]\n assert candidate(numbers = [-999, -998, -997, -996, -995, -994, -993, -992, -991, -990, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999],target = 0) == [1, 20]\n assert candidate(numbers = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10],target = 15) == [1, 15]\n assert candidate(numbers = [-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],target = -500) == [1, 16]\n assert candidate(numbers = [-100, -50, -25, -10, -5, 0, 5, 10, 25, 50, 100],target = 0) == [1, 11]\n assert candidate(numbers = [100, 150, 200, 250, 300, 350, 400, 450, 500],target = 800) == [5, 9]\n assert candidate(numbers = [-100, -50, -25, 0, 25, 50, 100, 150, 200, 250, 300],target = 200) == [1, 11]\n assert candidate(numbers = [-50, -20, -10, -5, 0, 5, 10, 20, 50],target = 0) == [1, 9]\n assert candidate(numbers = [-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100, 0, 100, 200, 300, 400],target = -500) == [2, 15]\n assert candidate(numbers = [-10, -5, 0, 3, 8, 12, 15],target = 5) == [1, 7]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 39) == [19, 20]\n assert candidate(numbers = [-5, 0, 2, 3, 7, 11],target = 5) == [3, 4]\n assert candidate(numbers = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],target = 190) == [17, 19]\n assert candidate(numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 18) == [8, 10]\n assert candidate(numbers = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67],target = 94) == [14, 17]\n assert candidate(numbers = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 8) == [1, 11]\n assert candidate(numbers = [-100, -50, -10, 0, 50, 100, 150],target = 0) == [1, 6]\n assert candidate(numbers = [1, 3, 6, 8, 12, 14, 16, 18, 20, 23, 26, 28, 30, 32, 35, 37, 40, 42, 45, 47],target = 87) == [17, 20]\n assert candidate(numbers = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 7) == [1, 10]\n assert candidate(numbers = [-100, -50, -10, 0, 10, 50, 100],target = 0) == [1, 7]\n assert candidate(numbers = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],target = 768) == [9, 10]\n", "comparison": "exact"}, "public_tests": ["[2,7,11,15]\n9", "[2,3,4]\n6", "[-1,0]\n-1"], "hints": [], "metadata": {"canonical_parameter_names": ["numbers", "target"], "leetcode_dataset_entry_point": "Solution().twoSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:17+00:00", "tests_total": 89, "tests_dropped": 11, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def two_sum(numbers, target)", "container": null, "callable": "two_sum", "parameters": [{"name": "numbers", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 168, "task_id": "excel-sheet-column-title", "difficulty": "Easy", "problem_description": "Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet.\n\nFor example:\n\nA -> 1\nB -> 2\nC -> 3\n...\nZ -> 26\nAA -> 27\nAB -> 28\n...\n\nExample 1:\n\nInput: columnNumber = 1\nOutput: \"A\"\n\nExample 2:\n\nInput: columnNumber = 28\nOutput: \"AB\"\n\nExample 3:\n\nInput: columnNumber = 701\nOutput: \"ZY\"\n\nConstraints:\n\n- 1 <= columnNumber <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(columnNumber = 1) == \"A\"\n assert candidate(columnNumber = 28) == \"AB\"\n assert candidate(columnNumber = 1045) == \"ANE\"\n assert candidate(columnNumber = 2147483647) == \"FXSHRXW\"\n assert candidate(columnNumber = 456976) == \"YYYZ\"\n assert candidate(columnNumber = 52) == \"AZ\"\n assert candidate(columnNumber = 701) == \"ZY\"\n assert candidate(columnNumber = 1048576) == \"BGQCV\"\n assert candidate(columnNumber = 26) == \"Z\"\n assert candidate(columnNumber = 134217728) == \"KGRJXH\"\n assert candidate(columnNumber = 702) == \"ZZ\"\n assert candidate(columnNumber = 1047) == \"ANG\"\n assert candidate(columnNumber = 1046527) == \"BGNCA\"\n assert candidate(columnNumber = 351) == \"MM\"\n assert candidate(columnNumber = 27) == \"AA\"\n assert candidate(columnNumber = 4194304) == \"IDPOJ\"\n assert candidate(columnNumber = 466527) == \"ZNCI\"\n assert candidate(columnNumber = 1048575) == \"BGQCU\"\n assert candidate(columnNumber = 703) == \"AAA\"\n assert candidate(columnNumber = 1234567) == \"BRFGI\"\n assert candidate(columnNumber = 2702) == \"CYX\"\n assert candidate(columnNumber = 16384) == \"XFD\"\n assert candidate(columnNumber = 1000) == \"ALL\"\n assert candidate(columnNumber = 1379) == \"BAA\"\n assert candidate(columnNumber = 123456) == \"FZPH\"\n assert candidate(columnNumber = 4095) == \"FAM\"\n assert candidate(columnNumber = 676) == \"YZ\"\n assert candidate(columnNumber = 10000000) == \"UVXWJ\"\n assert candidate(columnNumber = 14776336) == \"AFHRLP\"\n assert candidate(columnNumber = 1378) == \"AZZ\"\n assert candidate(columnNumber = 140625) == \"GYZQ\"\n assert candidate(columnNumber = 728) == \"AAZ\"\n assert candidate(columnNumber = 2704) == \"CYZ\"\n assert candidate(columnNumber = 18278) == \"ZZZ\"\n assert candidate(columnNumber = 234567890) == \"SSGWWX\"\n assert candidate(columnNumber = 255) == \"IU\"\n assert candidate(columnNumber = 99999999) == \"HJUNYU\"\n assert candidate(columnNumber = 11829215) == \"YVZUU\"\n", "comparison": "exact"}, "public_tests": ["1", "28", "701"], "hints": [], "metadata": {"canonical_parameter_names": ["columnNumber"], "leetcode_dataset_entry_point": "Solution().convertToTitle", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:20+00:00", "tests_total": 38, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def convert_to_title(column_number)", "container": null, "callable": "convert_to_title", "parameters": [{"name": "column_number", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 169, "task_id": "majority-element", "difficulty": "Easy", "problem_description": "Given an array nums of size n, return the majority element.\n\nThe majority element is the element that appears more than ⌊n / 2⌋ times. You may assume that the majority element always exists in the array.\n\nExample 1:\n\nInput: nums = [3,2,3]\nOutput: 3\n\nExample 2:\n\nInput: nums = [2,2,1,1,1,2,2]\nOutput: 2\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 5 * 10^4\n- -10^9 <= nums[i] <= 10^9\n- The input is generated such that a majority element will exist in the array.\n\nFollow-up: Could you solve the problem in linear time and in O(1) space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 2, 2, 2, 2, 2]) == 2\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 3]) == 1\n assert candidate(nums = [2, 2, 1, 1, 1, 2, 2]) == 2\n assert candidate(nums = [-1, 100, -1, -1, -1, -1, 1, 1, 1, 1]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 4, 4, 4]) == 4\n assert candidate(nums = [4, 4, 4, 4, 2, 2, 3]) == 4\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1, 1, 1, 1, 1]) == 1000000000\n assert candidate(nums = [5, 5, 4, 5, 5, 6, 5, 5]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1000000000, -1000000000, 1000000000, 1000000000, 1000000000]) == 1000000000\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3]) == 3\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0]) == 7\n assert candidate(nums = [-1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, 1, 1, 1, 1, 1]) == -1000000000\n assert candidate(nums = [1, 1, 2, 2, 1, 1, 1]) == 1\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == 8\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [3, 2, 3]) == 3\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [4, 4, 4, 4, 4, 4, 5, 5, 5, 5]) == 4\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8]) == 7\n assert candidate(nums = [4, 4, 4, 4, 1, 2, 3]) == 4\n assert candidate(nums = [100, 200, 100, 300, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 100\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 9\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 0\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1, 2, 3]) == 1000000000\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 7\n assert candidate(nums = [1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 1]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-1, -1, -1, -1, -1, 1, 2, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-1, 100, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 500000000, 500000000, 500000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 1000000000\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 10, 10, 10, 10, 10]) == 10\n assert candidate(nums = [5, 4, 3, 2, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7]) == 7\n assert candidate(nums = [2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n", "comparison": "exact"}, "public_tests": ["[3,2,3]", "[2,2,1,1,1,2,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().majorityElement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:22+00:00", "tests_total": 45, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "divide-and-conquer", "sorting", "counting", "boyer-moore-majority-vote-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def majority_element(nums)", "container": null, "callable": "majority_element", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 171, "task_id": "excel-sheet-column-number", "difficulty": "Easy", "problem_description": "Given a string columnTitle that represents the column title as appears in an Excel sheet, return its corresponding column number.\n\nFor example:\n\nA -> 1\nB -> 2\nC -> 3\n...\nZ -> 26\nAA -> 27\nAB -> 28\n...\n\nExample 1:\n\nInput: columnTitle = \"A\"\nOutput: 1\n\nExample 2:\n\nInput: columnTitle = \"AB\"\nOutput: 28\n\nExample 3:\n\nInput: columnTitle = \"ZY\"\nOutput: 701\n\nConstraints:\n\n- 1 <= columnTitle.length <= 7\n- columnTitle consists only of uppercase English letters.\n- columnTitle is in the range [\"A\", \"FXSHRXW\"].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(columnTitle = \"MAD\") == 8818\n assert candidate(columnTitle = \"AAA\") == 703\n assert candidate(columnTitle = \"ZY\") == 701\n assert candidate(columnTitle = \"AC\") == 29\n assert candidate(columnTitle = \"Z\") == 26\n assert candidate(columnTitle = \"ZYZ\") == 18252\n assert candidate(columnTitle = \"FXSHRXW\") == 2147483647\n assert candidate(columnTitle = \"ZAB\") == 17604\n assert candidate(columnTitle = \"BZ\") == 78\n assert candidate(columnTitle = \"M\") == 13\n assert candidate(columnTitle = \"ABC\") == 731\n assert candidate(columnTitle = \"ZZZ\") == 18278\n assert candidate(columnTitle = \"AB\") == 28\n assert candidate(columnTitle = \"A\") == 1\n assert candidate(columnTitle = \"XYZ\") == 16900\n assert candidate(columnTitle = \"ZYZY\") == 474577\n assert candidate(columnTitle = \"AAN\") == 716\n assert candidate(columnTitle = \"ACB\") == 756\n assert candidate(columnTitle = \"AAI\") == 711\n assert candidate(columnTitle = \"AAD\") == 706\n assert candidate(columnTitle = \"FXSHRXV\") == 2147483646\n assert candidate(columnTitle = \"ASDFGH\") == 20638470\n assert candidate(columnTitle = \"SS\") == 513\n assert candidate(columnTitle = \"GH\") == 190\n assert candidate(columnTitle = \"AAR\") == 720\n assert candidate(columnTitle = \"ALIBABA\") == 455640953\n assert candidate(columnTitle = \"PQ\") == 433\n assert candidate(columnTitle = \"AAE\") == 707\n assert candidate(columnTitle = \"UU\") == 567\n assert candidate(columnTitle = \"LO\") == 327\n assert candidate(columnTitle = \"RT\") == 488\n assert candidate(columnTitle = \"QWJH\") == 314608\n assert candidate(columnTitle = \"EEEEE\") == 2376275\n assert candidate(columnTitle = \"AAB\") == 704\n assert candidate(columnTitle = \"WORLD\") == 10786572\n assert candidate(columnTitle = \"IK\") == 245\n assert candidate(columnTitle = \"COLUMN\") == 42724228\n assert candidate(columnTitle = \"AZZ\") == 1378\n assert candidate(columnTitle = \"II\") == 243\n assert candidate(columnTitle = \"BAA\") == 1379\n assert candidate(columnTitle = \"AAM\") == 715\n assert candidate(columnTitle = \"DDDDD\") == 1901020\n assert candidate(columnTitle = \"TUVW\") == 366311\n assert candidate(columnTitle = \"ABB\") == 730\n assert candidate(columnTitle = \"BB\") == 54\n assert candidate(columnTitle = \"MZZ\") == 9490\n assert candidate(columnTitle = \"AZY\") == 1377\n assert candidate(columnTitle = \"VV\") == 594\n assert candidate(columnTitle = \"TRE\") == 13993\n assert candidate(columnTitle = \"AAQ\") == 719\n assert candidate(columnTitle = \"MN\") == 352\n assert candidate(columnTitle = \"TY\") == 545\n assert candidate(columnTitle = \"HJKL\") == 147666\n assert candidate(columnTitle = \"ADZ\") == 806\n assert candidate(columnTitle = \"AAAA\") == 18279\n assert candidate(columnTitle = \"CB\") == 80\n assert candidate(columnTitle = \"LL\") == 324\n assert candidate(columnTitle = \"NO\") == 379\n assert candidate(columnTitle = \"ABCDEFG\") == 334123303\n assert candidate(columnTitle = \"BCD\") == 1434\n assert candidate(columnTitle = \"STUVWX\") == 235270254\n assert candidate(columnTitle = \"PO\") == 431\n assert candidate(columnTitle = \"CVBNM\") == 1759329\n assert candidate(columnTitle = \"QWERTY\") == 212594433\n assert candidate(columnTitle = \"ZXCVBN\") == 319950866\n assert candidate(columnTitle = \"QRSTU\") == 8098345\n assert candidate(columnTitle = \"UVWX\") == 384590\n assert candidate(columnTitle = \"DF\") == 110\n assert candidate(columnTitle = \"WW\") == 621\n assert candidate(columnTitle = \"CC\") == 81\n assert candidate(columnTitle = \"AAO\") == 717\n assert candidate(columnTitle = \"GG\") == 189\n assert candidate(columnTitle = \"QWEN\") == 314484\n assert candidate(columnTitle = \"SD\") == 498\n assert candidate(columnTitle = \"WZYZ\") == 422500\n assert candidate(columnTitle = \"FXSH\") == 122182\n assert candidate(columnTitle = \"PQRST\") == 7623090\n assert candidate(columnTitle = \"AAU\") == 723\n assert candidate(columnTitle = \"UI\") == 555\n assert candidate(columnTitle = \"NUMBER\") == 176165748\n assert candidate(columnTitle = \"MM\") == 351\n assert candidate(columnTitle = \"BAC\") == 1381\n assert candidate(columnTitle = \"FF\") == 162\n assert candidate(columnTitle = \"WX\") == 622\n assert candidate(columnTitle = \"FXSHRXU\") == 2147483645\n assert candidate(columnTitle = \"YUIOP\") == 11799986\n assert candidate(columnTitle = \"MATH\") == 229692\n assert candidate(columnTitle = \"MIX\") == 9046\n assert candidate(columnTitle = \"LM\") == 325\n assert candidate(columnTitle = \"XY\") == 649\n assert candidate(columnTitle = \"BBZ\") == 1430\n assert candidate(columnTitle = \"AAF\") == 708\n assert candidate(columnTitle = \"IO\") == 249\n assert candidate(columnTitle = \"TU\") == 541\n assert candidate(columnTitle = \"AEZ\") == 832\n assert candidate(columnTitle = \"ER\") == 148\n assert candidate(columnTitle = \"ZZ\") == 702\n assert candidate(columnTitle = \"OL\") == 402\n assert candidate(columnTitle = \"AAV\") == 724\n assert candidate(columnTitle = \"AFZ\") == 858\n assert candidate(columnTitle = \"AAT\") == 722\n assert candidate(columnTitle = \"FGHTY\") == 2870841\n assert candidate(columnTitle = \"QQ\") == 459\n assert candidate(columnTitle = \"MID\") == 9026\n assert candidate(columnTitle = \"DEF\") == 2840\n assert candidate(columnTitle = \"ST\") == 514\n assert candidate(columnTitle = \"ACZ\") == 780\n assert candidate(columnTitle = \"ABZ\") == 754\n assert candidate(columnTitle = \"RS\") == 487\n assert candidate(columnTitle = \"QQQQQ\") == 8079335\n assert candidate(columnTitle = \"AS\") == 45\n assert candidate(columnTitle = \"XYZZY\") == 11425101\n assert candidate(columnTitle = \"CODING\") == 42575527\n assert candidate(columnTitle = \"AXX\") == 1324\n assert candidate(columnTitle = \"FG\") == 163\n assert candidate(columnTitle = \"AAH\") == 710\n assert candidate(columnTitle = \"QW\") == 465\n assert candidate(columnTitle = \"XYZZ\") == 439426\n assert candidate(columnTitle = \"MIXED\") == 6115230\n assert candidate(columnTitle = \"AGZ\") == 884\n assert candidate(columnTitle = \"AAL\") == 714\n assert candidate(columnTitle = \"UY\") == 571\n assert candidate(columnTitle = \"TR\") == 538\n assert candidate(columnTitle = \"UV\") == 568\n assert candidate(columnTitle = \"AXY\") == 1325\n assert candidate(columnTitle = \"AAK\") == 713\n assert candidate(columnTitle = \"VBN\") == 14938\n assert candidate(columnTitle = \"ZZZZ\") == 475254\n assert candidate(columnTitle = \"HJ\") == 218\n assert candidate(columnTitle = \"CAT\") == 2074\n assert candidate(columnTitle = \"BNM\") == 1729\n assert candidate(columnTitle = \"ZZZZZ\") == 12356630\n assert candidate(columnTitle = \"XYZXYZ\") == 297051300\n assert candidate(columnTitle = \"SHEET\") == 8826682\n assert candidate(columnTitle = \"OP\") == 406\n assert candidate(columnTitle = \"BBA\") == 1405\n assert candidate(columnTitle = \"NN\") == 378\n assert candidate(columnTitle = \"EE\") == 135\n assert candidate(columnTitle = \"ZZZZZZ\") == 321272406\n assert candidate(columnTitle = \"MNO\") == 9167\n assert candidate(columnTitle = \"QR\") == 460\n assert candidate(columnTitle = \"AAJ\") == 712\n assert candidate(columnTitle = \"AAX\") == 726\n assert candidate(columnTitle = \"QQQQ\") == 310743\n assert candidate(columnTitle = \"HH\") == 216\n assert candidate(columnTitle = \"AZX\") == 1376\n assert candidate(columnTitle = \"AAZ\") == 728\n assert candidate(columnTitle = \"AAG\") == 709\n assert candidate(columnTitle = \"TITLE\") == 9311541\n assert candidate(columnTitle = \"BN\") == 66\n assert candidate(columnTitle = \"TT\") == 540\n assert candidate(columnTitle = \"ABCD\") == 19010\n assert candidate(columnTitle = \"AXZ\") == 1326\n assert candidate(columnTitle = \"PYTHON\") == 201883748\n assert candidate(columnTitle = \"AAS\") == 721\n assert candidate(columnTitle = \"AAC\") == 705\n assert candidate(columnTitle = \"AA\") == 27\n assert candidate(columnTitle = \"OO\") == 405\n assert candidate(columnTitle = \"EXCEL\") == 2708874\n assert candidate(columnTitle = \"HELLO\") == 3752127\n assert candidate(columnTitle = \"GHJKL\") == 3346498\n assert candidate(columnTitle = \"AXB\") == 1302\n assert candidate(columnTitle = \"YY\") == 675\n assert candidate(columnTitle = \"TUVWX\") == 9524110\n assert candidate(columnTitle = \"DD\") == 108\n assert candidate(columnTitle = \"XX\") == 648\n assert candidate(columnTitle = \"JK\") == 271\n assert candidate(columnTitle = \"KL\") == 298\n assert candidate(columnTitle = \"RR\") == 486\n assert candidate(columnTitle = \"CA\") == 79\n assert candidate(columnTitle = \"JJ\") == 270\n assert candidate(columnTitle = \"DA\") == 105\n assert candidate(columnTitle = \"PP\") == 432\n assert candidate(columnTitle = \"CVB\") == 2602\n assert candidate(columnTitle = \"OPQR\") == 274916\n assert candidate(columnTitle = \"CODE\") == 62977\n assert candidate(columnTitle = \"AAP\") == 718\n assert candidate(columnTitle = \"TREND\") == 9459636\n assert candidate(columnTitle = \"BEE\") == 1487\n assert candidate(columnTitle = \"VW\") == 595\n assert candidate(columnTitle = \"LMNO\") == 220079\n assert candidate(columnTitle = \"AAW\") == 725\n assert candidate(columnTitle = \"ABCDEF\") == 12850896\n assert candidate(columnTitle = \"YZ\") == 676\n assert candidate(columnTitle = \"KK\") == 297\n", "comparison": "exact"}, "public_tests": ["\"A\"", "\"AB\"", "\"ZY\""], "hints": [], "metadata": {"canonical_parameter_names": ["columnTitle"], "leetcode_dataset_entry_point": "Solution().titleToNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:24+00:00", "tests_total": 201, "tests_dropped": 16, "flags": [], "topic_tags": ["math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def title_to_number(column_title)", "container": null, "callable": "title_to_number", "parameters": [{"name": "column_title", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 172, "task_id": "factorial-trailing-zeroes", "difficulty": "Medium", "problem_description": "Given an integer n, return the number of trailing zeroes in n!.\n\nNote that n! = n * (n - 1) * (n - 2) * ... * 3 * 2 * 1.\n\nExample 1:\n\nInput: n = 3\nOutput: 0\nExplanation: 3! = 6, no trailing zero.\n\nExample 2:\n\nInput: n = 5\nOutput: 1\nExplanation: 5! = 120, one trailing zero.\n\nExample 3:\n\nInput: n = 0\nOutput: 0\n\nConstraints:\n\n- 0 <= n <= 10^4\n\nFollow up: Could you write a solution that works in logarithmic time complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 0\n assert candidate(n = 3) == 0\n assert candidate(n = 10000) == 2499\n assert candidate(n = 25) == 6\n assert candidate(n = 100) == 24\n assert candidate(n = 1000) == 249\n assert candidate(n = 10) == 2\n assert candidate(n = 5) == 1\n assert candidate(n = 625) == 156\n assert candidate(n = 1875) == 468\n assert candidate(n = 4000) == 999\n assert candidate(n = 29) == 6\n assert candidate(n = 2345) == 583\n assert candidate(n = 49) == 10\n assert candidate(n = 125) == 31\n assert candidate(n = 4096) == 1021\n assert candidate(n = 2000) == 499\n assert candidate(n = 7500) == 1874\n assert candidate(n = 50) == 12\n assert candidate(n = 2304) == 573\n assert candidate(n = 30) == 7\n assert candidate(n = 4) == 0\n assert candidate(n = 99) == 22\n assert candidate(n = 2050) == 511\n assert candidate(n = 1024) == 253\n assert candidate(n = 250) == 62\n assert candidate(n = 2048) == 509\n assert candidate(n = 8192) == 2045\n assert candidate(n = 375) == 93\n assert candidate(n = 999) == 246\n assert candidate(n = 8000) == 1998\n assert candidate(n = 18) == 3\n assert candidate(n = 5000) == 1249\n assert candidate(n = 9999) == 2495\n assert candidate(n = 20) == 4\n assert candidate(n = 149) == 35\n assert candidate(n = 19) == 3\n assert candidate(n = 249) == 59\n assert candidate(n = 1250) == 312\n assert candidate(n = 24) == 4\n assert candidate(n = 7654) == 1911\n assert candidate(n = 150) == 37\n assert candidate(n = 8750) == 2186\n assert candidate(n = 15) == 3\n assert candidate(n = 2500) == 624\n assert candidate(n = 4999) == 1245\n assert candidate(n = 200) == 49\n assert candidate(n = 14) == 2\n assert candidate(n = 1234) == 305\n assert candidate(n = 9) == 1\n assert candidate(n = 3125) == 781\n assert candidate(n = 9876) == 2467\n assert candidate(n = 7812) == 1950\n assert candidate(n = 124) == 28\n assert candidate(n = 1249) == 308\n assert candidate(n = 499) == 121\n assert candidate(n = 199) == 47\n assert candidate(n = 1) == 0\n assert candidate(n = 500) == 124\n assert candidate(n = 180) == 44\n", "comparison": "exact"}, "public_tests": ["3", "5", "0"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().trailingZeroes", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:27+00:00", "tests_total": 71, "tests_dropped": 11, "flags": [], "topic_tags": ["math"]}, "language": "ruby", "interface": {"raw_signature": "def trailing_zeroes(n)", "container": null, "callable": "trailing_zeroes", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 174, "task_id": "dungeon-game", "difficulty": "Hard", "problem_description": "The demons had captured the princess and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of m x n rooms laid out in a 2D grid. Our valiant knight was initially positioned in the top-left room and must fight his way through dungeon to rescue the princess.\n\nThe knight has an initial health point represented by a positive integer. If at any point his health point drops to 0 or below, he dies immediately.\n\nSome of the rooms are guarded by demons (represented by negative integers), so the knight loses health upon entering these rooms; other rooms are either empty (represented as 0) or contain magic orbs that increase the knight's health (represented by positive integers).\n\nTo reach the princess as quickly as possible, the knight decides to move only rightward or downward in each step.\n\nReturn the knight's minimum initial health so that he can rescue the princess.\n\nNote that any room can contain threats or power-ups, even the first room the knight enters and the bottom-right room where the princess is imprisoned.\n\nExample 1:\n\nInput: dungeon = [[-2,-3,3],[-5,-10,1],[10,30,-5]]\nOutput: 7\nExplanation: The initial health of the knight must be at least 7 if he follows the optimal path: RIGHT-> RIGHT -> DOWN -> DOWN.\n\nExample 2:\n\nInput: dungeon = [[0]]\nOutput: 1\n\nConstraints:\n\n- m == dungeon.length\n- n == dungeon[i].length\n- 1 <= m, n <= 200\n- -1000 <= dungeon[i][j] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(dungeon = [[1, -3, 3], [0, -2, 0], [-3, -3, -3]]) == 3\n assert candidate(dungeon = [[-5, -4, -6], [-6, -5, -8], [3, 3, 1]]) == 12\n assert candidate(dungeon = [[-2, -3, 3], [-5, -10, 1], [10, 30, -5]]) == 7\n assert candidate(dungeon = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) == 1\n assert candidate(dungeon = [[1, 6, 7, -6, 5, 3], [4, -8, -5, 5, -9, 3], [-3, 1, -2, 6, -6, 2], [-8, -6, -3, -8, -9, -5], [-5, -8, -8, -1, 5, -9]]) == 1\n assert candidate(dungeon = [[-2, -1], [-1, 10]]) == 4\n assert candidate(dungeon = [[0]]) == 1\n assert candidate(dungeon = [[100, 50, -50], [10, -10, -10], [10, 10, -10]]) == 1\n assert candidate(dungeon = [[-1, -2, -6, -3], [-2, -3, -3, -5], [-1, -3, -5, -7], [-8, -8, -3, -4]]) == 20\n assert candidate(dungeon = [[-2, -1, 1], [-1, -2, -2], [-3, 3, 1]]) == 5\n assert candidate(dungeon = [[-3, 5, -10], [0, 0, -3], [3, 1, -2]]) == 4\n assert candidate(dungeon = [[-10, -50, 20], [-30, -10, 10], [10, 30, -5]]) == 41\n assert candidate(dungeon = [[-1, -1, -1], [-1, -1, -1], [-1, -1, 100]]) == 5\n assert candidate(dungeon = [[1, -1, 1, -1, 1], [1, -1, 1, -1, 1], [-1, 1, -1, 1, -1], [1, -1, 1, -1, 1], [-1, 1, -1, 1, -1]]) == 1\n assert candidate(dungeon = [[-2, -3, 3, -5], [-5, -10, 1, 20], [10, 30, -5, 15], [-10, -20, 5, 30]]) == 6\n assert candidate(dungeon = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) == 1\n assert candidate(dungeon = [[10, -15, 20, -25, 30], [-35, 40, -45, 50, -55], [60, -65, 70, -75, 80], [-85, 90, -95, 100, -105], [110, -115, 120, -125, 130]]) == 21\n assert candidate(dungeon = [[-10, -20, -30, 40], [-50, -60, 70, -80], [90, -100, 110, -120], [-130, 140, -150, 160]]) == 61\n assert candidate(dungeon = [[-10, 20, -30, 40, -50, 60], [-20, 30, -40, 50, -60, 70], [30, -40, 50, -60, 70, -80], [40, -50, 60, -70, 80, -90]]) == 11\n assert candidate(dungeon = [[0, -10, 20, -30, 40], [10, -20, 30, -40, 50], [-10, 20, -30, 40, -50], [20, -30, 40, -50, 60], [-30, 40, -50, 60, -70]]) == 11\n assert candidate(dungeon = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == 1\n assert candidate(dungeon = [[1, -1, 1, -1, 1], [-1, 1, -1, 1, -1], [1, -1, 1, -1, 1], [-1, 1, -1, 1, -1], [1, -1, 1, -1, 1]]) == 1\n assert candidate(dungeon = [[-1, -2, -3], [-2, -3, -4], [-3, -4, -5], [-4, -5, -6], [-5, -6, -7]]) == 29\n assert candidate(dungeon = [[-1, -3, -5, -7, -9], [-2, -4, -6, -8, -10], [-3, -6, -9, -12, -15], [-4, -8, -12, -16, -20], [-5, -10, -15, -20, -25]]) == 86\n assert candidate(dungeon = [[-20, -20, -20, -20], [20, 20, 20, 20], [-10, -10, -10, -10], [10, 10, 10, 10]]) == 21\n assert candidate(dungeon = [[-1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1000]]) == 2\n assert candidate(dungeon = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 1\n assert candidate(dungeon = [[-5, 0, 5, -10, 10], [-2, 3, -4, 5, -6], [0, 1, -2, 3, -4], [5, -6, 7, -8, 9], [10, -11, 12, -13, 14]]) == 6\n assert candidate(dungeon = [[-100, -200, 300], [400, -500, 100], [-200, 100, -300], [50, 100, -100]]) == 101\n assert candidate(dungeon = [[-1, 2, -3, 4, -5], [5, -4, 3, -2, 1], [-1, 2, -3, 4, -5], [5, -4, 3, -2, 1], [-1, 2, -3, 4, -5]]) == 2\n assert candidate(dungeon = [[-10, -20, -30], [10, 20, 30], [-10, -20, -30], [10, 20, 30], [-10, -20, -30]]) == 11\n assert candidate(dungeon = [[-30, -20, -10], [0, 10, 20], [10, 20, 30], [-10, -20, -30]]) == 31\n assert candidate(dungeon = [[-1, 2, -3, 4], [-5, 6, -7, 8], [-9, 10, -11, 12], [-13, 14, -15, 16]]) == 2\n assert candidate(dungeon = [[1000, -1000, 1000], [-1000, 1000, -1000], [1000, -1000, 1000]]) == 1\n assert candidate(dungeon = [[-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1]]) == 10\n assert candidate(dungeon = [[-5, -5, -5, -5], [-5, 0, 0, -5], [-5, 0, 0, -5], [-5, -5, -5, -5]]) == 21\n assert candidate(dungeon = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == 1\n assert candidate(dungeon = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == 1\n assert candidate(dungeon = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1]]) == 1\n assert candidate(dungeon = [[100, -100, 100, -100], [100, -100, 100, -100], [100, -100, 100, -100], [100, -100, 100, -100]]) == 1\n assert candidate(dungeon = [[1000, -1000, 1000, -1000], [1000, 1000, -1000, 1000], [-1000, 1000, 1000, -1000], [-1000, -1000, 1000, 1000]]) == 1\n assert candidate(dungeon = [[-1000, 1000, -1000, 1000], [-1000, 1000, -1000, 1000], [1000, -1000, 1000, -1000], [1000, -1000, 1000, -1000]]) == 1001\n assert candidate(dungeon = [[-500, 500, -500, 500], [500, -500, 500, -500], [-500, 500, -500, 500], [500, -500, 500, -1]]) == 501\n assert candidate(dungeon = [[-50, -10, -20, -15], [20, 30, -10, 10], [-5, 15, 20, -20], [10, -10, 30, -30]]) == 51\n assert candidate(dungeon = [[-20, -30, 40, 10], [-15, -25, 35, 5], [-10, -5, 25, -5], [5, 10, -15, 20]]) == 46\n assert candidate(dungeon = [[-20, -30, 10, 50], [-50, -10, 20, 30], [-10, 5, -100, 10], [100, 10, -5, 20]]) == 51\n assert candidate(dungeon = [[1, -2, 3, -4, 5], [6, -7, 8, -9, 10], [-11, 12, -13, 14, -15], [16, -17, 18, -19, 20], [21, -22, 23, -24, 25]]) == 2\n assert candidate(dungeon = [[10, -10, 20, -20, 30], [-30, 40, -50, 60, -70], [80, -90, 100, -110, 120], [-130, 140, -150, 160, -170]]) == 31\n assert candidate(dungeon = [[100, -100, 200, -200], [-200, 300, -300, 400], [400, -400, 500, -500], [-500, 600, -600, 700]]) == 1\n assert candidate(dungeon = [[-1, -2, -3, -4, -5], [10, 9, 8, 7, 6], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == 2\n assert candidate(dungeon = [[-10, -20, -30, -40, -50], [-9, -18, -27, -36, -45], [-8, -16, -24, -32, -40], [-7, -14, -21, -28, -35], [-6, -12, -18, -24, -30]]) == 125\n assert candidate(dungeon = [[-1, -2, -3, -4, -5, 6, 7, 8, 9, 10], [-10, -9, -8, -7, -6, 5, 4, 3, 2, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4], [-4, -3, -2, -1, 0, 1, 2, 3, 4, 5], [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6], [-2, -1, 0, 1, 2, 3, 4, 5, 6, 7], [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]) == 12\n assert candidate(dungeon = [[-20, -30, 40, 50], [-10, -20, -10, 10], [30, 10, -20, -30], [50, 50, 50, -5]]) == 31\n assert candidate(dungeon = [[-20, -30, 30, -50], [10, 20, -40, 60], [-30, -40, 20, -10], [50, 10, -20, -60]]) == 41\n assert candidate(dungeon = [[1, -3, 2, 4, -1], [2, -2, 3, -2, -2], [1, -1, -2, -3, 3], [-1, 3, -2, -3, 4]]) == 1\n assert candidate(dungeon = [[0, -10, 5, 0, 0], [-5, 0, 0, -10, -1], [0, 0, 10, 0, -20], [0, 10, -20, 0, 10], [-10, -20, 0, 10, 0]]) == 6\n assert candidate(dungeon = [[-2, -1, -6], [-1, 10, -1], [-2, -3, -4], [1, 2, -5]]) == 4\n assert candidate(dungeon = [[1000, -1000, 1000], [-1000, 1000, -1000], [1000, -1000, 1000], [-1000, 1000, -1000], [1000, -1000, 1000]]) == 1\n assert candidate(dungeon = [[10, -10, 20, -20], [5, -5, 10, -10], [0, 0, 0, 0], [-5, 5, -15, 15]]) == 1\n assert candidate(dungeon = [[-5, -4, -3, -2, -1, 0, 1, 2, 3, 4], [4, 3, 2, 1, 0, -1, -2, -3, -4, -5], [5, 4, 3, 2, 1, 0, -1, -2, -3, -4], [4, 3, 2, 1, 0, -1, -2, -3, -4, -5], [3, 2, 1, 0, -1, -2, -3, -4, -5, -4], [2, 1, 0, -1, -2, -3, -4, -5, -4, -3], [1, 0, -1, -2, -3, -4, -5, -4, -3, -2], [0, -1, -2, -3, -4, -5, -4, -3, -2, -1]]) == 12\n assert candidate(dungeon = [[-1, -2, -3, -4, -5], [5, 4, 3, 2, 1], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [-5, -4, -3, -2, -1]]) == 2\n assert candidate(dungeon = [[-10, -20, -30, -40], [-30, -40, -50, -60], [-40, -50, -60, -70], [-50, -60, -70, -80]]) == 311\n assert candidate(dungeon = [[-2, -3, -2, -5], [-3, -2, -2, -5], [-2, -2, -2, -5], [-5, -5, -5, -20]]) == 37\n assert candidate(dungeon = [[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7]]) == 1\n assert candidate(dungeon = [[-50, -50, -50, -50], [-50, -50, -50, -50], [-50, -50, -50, -50], [-50, -50, -50, 100]]) == 301\n assert candidate(dungeon = [[-1, 100, 200, -300], [100, -200, -300, 400], [200, -300, 400, -500], [300, 400, -500, 600]]) == 2\n assert candidate(dungeon = [[-1, -2, -3, -4], [-2, -3, -4, -5], [-3, -4, -5, -6], [-4, -5, -6, -7]]) == 29\n assert candidate(dungeon = [[-20, -15, -10, -5], [-10, -5, 0, 5], [0, 5, 10, 15], [5, 10, 15, 20]]) == 31\n assert candidate(dungeon = [[10, -15, 10], [-10, 20, -10], [10, -5, 20], [-15, 10, -20]]) == 1\n assert candidate(dungeon = [[-5, 10, 15, -20], [-10, 20, -15, 25], [5, -10, 30, -35], [-15, 25, -20, 30]]) == 6\n assert candidate(dungeon = [[1, -1, 1, -1], [-1, 1, -1, 1], [1, -1, 1, -1], [-1, 1, -1, 1]]) == 1\n assert candidate(dungeon = [[-1000, 1000, -1000, 1000], [-1000, 1000, -1000, 1000], [-1000, 1000, -1000, 1000], [-1000, 1000, -1000, 1000]]) == 1001\n assert candidate(dungeon = [[-1, 2, -3, 4, -5], [6, -7, 8, -9, 10], [-11, 12, -13, 14, -15], [16, -17, 18, -19, 20], [-21, 22, -23, 24, -25]]) == 6\n assert candidate(dungeon = [[-100, -200, 300], [-400, -500, 600], [700, 800, -900]]) == 301\n assert candidate(dungeon = [[-10, -20, -30, -40], [-40, -50, -60, -70], [-70, -80, -90, -100], [100, 100, 100, 100]]) == 121\n assert candidate(dungeon = [[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, 1000]]) == 7\n assert candidate(dungeon = [[-5, -10, 15, -20, 25], [-30, 35, -40, 45, -50], [-60, 65, -70, 75, -80], [-90, 95, -100, 105, -110], [120, -125, 130, -135, 140]]) == 16\n assert candidate(dungeon = [[-20, -30, 30, -10], [10, -5, -50, 20], [0, 20, -30, 10], [-10, 50, -10, 20]]) == 21\n assert candidate(dungeon = [[-100, 100, -50, 50], [-200, 200, -150, 150], [100, -100, 50, -50], [-50, 50, -25, 25]]) == 101\n assert candidate(dungeon = [[100, -100, 0, -100], [100, -100, 0, 100], [0, 100, -100, 0], [-100, 0, 100, -100]]) == 1\n assert candidate(dungeon = [[10, -30, 20, -40, 50], [30, -10, -50, 10, 0], [0, 20, 30, -20, -10], [-10, 10, 20, -30, 40], [-50, 40, -30, 20, 10]]) == 1\n assert candidate(dungeon = [[-2, -3, 4, 1], [-3, -2, 1, -1], [3, -4, 2, -4], [4, 2, -4, 3]]) == 6\n assert candidate(dungeon = [[-1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1]]) == 2\n assert candidate(dungeon = [[-2, -3, 3, -4], [3, -5, -10, 1], [10, 30, -5, 20], [10, 10, -10, -20]]) == 3\n assert candidate(dungeon = [[0, -5, 10, -10, 20], [-5, 10, -5, 0, 5], [10, -5, 0, 5, -10], [0, 5, -10, 15, -5]]) == 6\n assert candidate(dungeon = [[-20, 10, -30, 40], [-10, -5, 5, -15], [20, -20, 10, -10], [-30, 20, -10, 5]]) == 21\n assert candidate(dungeon = [[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, 10]]) == 7\n assert candidate(dungeon = [[-1, -2, -3, -4, -5], [-5, -6, -7, -8, -9], [-9, -10, -11, -12, -13], [-13, -14, -15, -16, -17], [-17, -18, -19, -20, 100]]) == 55\n assert candidate(dungeon = [[-1, -1, -10], [-5, -5, -5], [-2, -1, 10]]) == 9\n assert candidate(dungeon = [[-5, -10, 100], [-50, -100, 200], [-100, -200, 300], [-200, -300, 400]]) == 16\n assert candidate(dungeon = [[-1, -3, -5, -7], [-9, -11, -13, -15], [-17, -19, -21, -23], [-25, -27, -29, -31]]) == 86\n assert candidate(dungeon = [[-10, -20, -30], [10, 20, 30], [-10, -20, -30], [10, 20, 30], [-10, -20, 100]]) == 11\n assert candidate(dungeon = [[-2, -3, 3, -5], [1, 2, -4, 6], [-3, -4, 2, -1], [5, 1, -2, -6]]) == 5\n assert candidate(dungeon = [[10, -10, 0, 10], [-10, 10, -10, 10], [0, -10, 10, -10], [10, -10, 10, 0]]) == 1\n assert candidate(dungeon = [[-20, -30, 10, 50], [-10, -40, 20, 10], [30, -10, -20, 40], [-50, 10, 5, -15]]) == 31\n assert candidate(dungeon = [[-2, -3, 3, -4], [5, -6, 7, -8], [-9, 10, -11, 12], [13, -14, 15, -16]]) == 6\n assert candidate(dungeon = [[1, -1, -1, 1], [-1, -2, -1, 1], [-1, -2, -1, -1], [1, 1, -1, -1]]) == 2\n assert candidate(dungeon = [[-1, -2, -3, -4], [-2, -3, -4, -5], [-3, -4, -5, -6], [-4, -5, -6, -7]]) == 29\n", "comparison": "exact"}, "public_tests": ["[[-2,-3,3],[-5,-10,1],[10,30,-5]]", "[[0]]"], "hints": [], "metadata": {"canonical_parameter_names": ["dungeon"], "leetcode_dataset_entry_point": "Solution().calculateMinimumHP", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:29+00:00", "tests_total": 98, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def calculate_minimum_hp(dungeon)", "container": null, "callable": "calculate_minimum_hp", "parameters": [{"name": "dungeon", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 179, "task_id": "largest-number", "difficulty": "Medium", "problem_description": "Given a list of non-negative integers nums, arrange them such that they form the largest number and return it.\n\nSince the result may be very large, so you need to return a string instead of an integer.\n\nExample 1:\n\nInput: nums = [10,2]\nOutput: \"210\"\n\nExample 2:\n\nInput: nums = [3,30,34,5,9]\nOutput: \"9534330\"\n\nConstraints:\n\n- 1 <= nums.length <= 100\n- 0 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 0]) == \"0\"\n assert candidate(nums = [1]) == \"1\"\n assert candidate(nums = [3, 30, 34, 5, 9]) == \"9534330\"\n assert candidate(nums = [10, 2]) == \"210\"\n assert candidate(nums = [111311, 1113]) == \"1113111311\"\n assert candidate(nums = [10, 100, 1000]) == \"101001000\"\n assert candidate(nums = [9, 99, 999, 9999]) == \"9999999999\"\n assert candidate(nums = [3, 30, 34, 5, 9, 10]) == \"953433010\"\n assert candidate(nums = [10, 20, 30, 40, 50]) == \"5040302010\"\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == \"9876543210\"\n assert candidate(nums = [34323, 3432]) == \"343234323\"\n assert candidate(nums = [121, 12]) == \"12121\"\n assert candidate(nums = [100, 10, 1]) == \"110100\"\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000]) == \"1101001000100001000001000000\"\n assert candidate(nums = [12, 121, 1212, 12121]) == \"12121212121121\"\n assert candidate(nums = [12345, 1234, 123, 12, 1]) == \"123451234123121\"\n assert candidate(nums = [233, 23, 2]) == \"233232\"\n assert candidate(nums = [11, 111, 1111, 11111]) == \"11111111111111\"\n assert candidate(nums = [123, 12, 121, 1212, 1]) == \"1231212121211\"\n assert candidate(nums = [12, 121, 12121, 1212]) == \"12121212121121\"\n assert candidate(nums = [33, 3, 333, 3333]) == \"3333333333\"\n assert candidate(nums = [82, 828, 8282, 82828]) == \"82882828828282\"\n assert candidate(nums = [233, 23, 2333]) == \"233323323\"\n assert candidate(nums = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == \"99989796959493929190\"\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == \"9876543210\"\n assert candidate(nums = [30, 3, 34, 5, 9, 31]) == \"953433130\"\n assert candidate(nums = [56, 565, 5656, 56565]) == \"56565656565565\"\n assert candidate(nums = [21, 212, 2121]) == \"212212121\"\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000]) == \"110100100010000100000\"\n assert candidate(nums = [12, 121, 1211]) == \"121211211\"\n assert candidate(nums = [34323, 3432, 343, 34]) == \"34343343234323\"\n assert candidate(nums = [830, 8308]) == \"8308830\"\n assert candidate(nums = [1000000, 10000, 100, 1]) == \"1100100001000000\"\n assert candidate(nums = [987, 98, 9, 9876]) == \"9989879876\"\n assert candidate(nums = [3, 30, 34, 5, 9, 300, 303]) == \"9534330330300\"\n assert candidate(nums = [830, 83, 83083]) == \"8383083830\"\n assert candidate(nums = [0, 0, 0, 1]) == \"1000\"\n assert candidate(nums = [999, 99, 9, 100, 10]) == \"99999910100\"\n assert candidate(nums = [10, 100, 1000, 10000, 100000]) == \"10100100010000100000\"\n assert candidate(nums = [12, 21, 121, 122, 212, 211]) == \"2122121112212121\"\n assert candidate(nums = [90, 900, 9000, 90000, 900000, 9000000, 90000000]) == \"90900900090000900000900000090000000\"\n assert candidate(nums = [34323, 3432]) == \"343234323\"\n assert candidate(nums = [1000, 100, 10, 1]) == \"1101001000\"\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0]) == \"1000000000\"\n assert candidate(nums = [45, 454, 4545, 45454]) == \"45454545454454\"\n assert candidate(nums = [839, 8399, 83998, 83983]) == \"83998839983983983\"\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == \"0\"\n assert candidate(nums = [789, 7897, 78978, 789789, 7897897, 78978978]) == \"789789789789789787897897789787897\"\n assert candidate(nums = [33, 333, 3333, 33333]) == \"33333333333333\"\n assert candidate(nums = [830, 83, 834, 835, 832]) == \"83835834832830\"\n assert candidate(nums = [55, 555, 5, 5555, 55555]) == \"555555555555555\"\n assert candidate(nums = [0, 0, 0, 0, 1]) == \"10000\"\n assert candidate(nums = [11, 111, 1111, 11111, 111111, 1111111]) == \"111111111111111111111111111\"\n assert candidate(nums = [101, 10, 1, 100]) == \"110110100\"\n assert candidate(nums = [2, 22, 222, 2222, 22222, 222222, 2222222, 22222222]) == \"222222222222222222222222222222222222\"\n assert candidate(nums = [987, 98, 9, 999, 99, 998, 9989]) == \"999999998999898987\"\n assert candidate(nums = [12, 121, 1213, 12131]) == \"12131213112121\"\n assert candidate(nums = [111311, 1113, 11113, 11131, 111]) == \"11131113111131111113111\"\n assert candidate(nums = [100, 1000, 10, 1]) == \"1101001000\"\n assert candidate(nums = [5, 55, 555, 5555, 55555]) == \"555555555555555\"\n assert candidate(nums = [7, 77, 777, 7777, 77777]) == \"777777777777777\"\n assert candidate(nums = [987654321, 98765432, 9876543, 987654, 98765, 9876, 987, 98, 9]) == \"998987987698765987654987654398765432987654321\"\n assert candidate(nums = [0, 0, 0, 1]) == \"1000\"\n assert candidate(nums = [9, 99, 999, 9999, 99999, 999999]) == \"999999999999999999999\"\n assert candidate(nums = [12, 121, 12121, 1212, 1]) == \"121212121211211\"\n assert candidate(nums = [7, 77, 777, 7777]) == \"7777777777\"\n assert candidate(nums = [21, 212, 2121, 211]) == \"212212121211\"\n assert candidate(nums = [9999, 999, 99, 9]) == \"9999999999\"\n assert candidate(nums = [34, 343, 3434]) == \"343434343\"\n assert candidate(nums = [7, 70, 707, 77, 700]) == \"77770770700\"\n assert candidate(nums = [123, 1234, 12345, 123456]) == \"123456123451234123\"\n assert candidate(nums = [999, 9999, 99999]) == \"999999999999\"\n assert candidate(nums = [1111, 111, 11, 1]) == \"1111111111\"\n assert candidate(nums = [1, 34, 3, 98, 9, 76, 45, 6]) == \"998766453431\"\n assert candidate(nums = [9, 98, 989, 9898]) == \"9989989898\"\n assert candidate(nums = [99, 9, 999, 9999]) == \"9999999999\"\n assert candidate(nums = [300, 30, 3]) == \"330300\"\n assert candidate(nums = [987, 98, 9]) == \"998987\"\n assert candidate(nums = [8, 89, 898, 8989, 89898, 898989]) == \"898989898989898988988\"\n assert candidate(nums = [10, 101, 1011, 10111]) == \"10111101110110\"\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == \"9876543210\"\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == \"98765432110\"\n assert candidate(nums = [345, 3453, 34534]) == \"345345343453\"\n assert candidate(nums = [555, 55, 5]) == \"555555\"\n assert candidate(nums = [12, 121]) == \"12121\"\n assert candidate(nums = [7, 77, 777, 7777, 77777]) == \"777777777777777\"\n assert candidate(nums = [0, 4, 44, 444, 4444]) == \"44444444440\"\n assert candidate(nums = [111, 11, 1111, 11111, 1]) == \"111111111111111\"\n assert candidate(nums = [90, 909, 9090]) == \"909909090\"\n assert candidate(nums = [1000, 10, 100, 1]) == \"1101001000\"\n assert candidate(nums = [67, 676, 6767, 67676, 676767, 6767676]) == \"676767676767676767667676676\"\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == \"98765432110\"\n assert candidate(nums = [7, 77, 777, 7777, 77777, 777777, 7777777]) == \"7777777777777777777777777777\"\n assert candidate(nums = [830, 8308, 830830, 83083]) == \"830883083830830830\"\n assert candidate(nums = [1000, 100, 10, 1]) == \"1101001000\"\n assert candidate(nums = [1, 20, 23, 4, 2]) == \"4232201\"\n assert candidate(nums = [78, 787, 7878, 78787]) == \"78787878787787\"\n assert candidate(nums = [21, 212, 2121, 21212]) == \"21221212212121\"\n assert candidate(nums = [111311, 1113, 11, 11131111, 11111113, 11113111]) == \"111311131111131111111131111111111311\"\n assert candidate(nums = [5, 50, 500, 5000, 50000, 500000, 5000000, 50000000]) == \"550500500050000500000500000050000000\"\n assert candidate(nums = [123, 234, 345, 456, 567, 678, 789, 890]) == \"890789678567456345234123\"\n assert candidate(nums = [824, 82, 8]) == \"882824\"\n assert candidate(nums = [3, 30, 34, 5, 9, 300, 303, 33, 333]) == \"953433333330330300\"\n assert candidate(nums = [79, 798, 797, 7987]) == \"798798779797\"\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == \"908070605040302010100\"\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == \"1101001000100001000001000000100000001000000001000000000\"\n assert candidate(nums = [1, 10, 101, 1011, 10111]) == \"110111101110110\"\n assert candidate(nums = [88, 888, 8888, 88888, 888888, 8888888, 88888888]) == \"88888888888888888888888888888888888\"\n assert candidate(nums = [83, 838, 8383, 83838]) == \"83883838838383\"\n assert candidate(nums = [20, 200, 2000, 20000]) == \"20200200020000\"\n assert candidate(nums = [999999999, 99999999, 9999999, 999999, 99999, 9999, 999, 99, 9, 0]) == \"9999999999999999999999999999999999999999999990\"\n assert candidate(nums = [30, 303, 3003, 3]) == \"3303303003\"\n assert candidate(nums = [30033, 300, 3, 3003]) == \"3300333003300\"\n assert candidate(nums = [100, 1000, 10000, 100000, 1]) == \"1100100010000100000\"\n assert candidate(nums = [56, 565, 566]) == \"56656565\"\n assert candidate(nums = [111, 11, 1]) == \"111111\"\n assert candidate(nums = [123, 1231, 12312, 12, 121, 1212]) == \"123123121231121212121\"\n assert candidate(nums = [12, 121, 1211, 12111]) == \"12121121112111\"\n assert candidate(nums = [432, 4324, 43, 43243, 4]) == \"443432443243432\"\n assert candidate(nums = [111, 11, 1, 1111]) == \"1111111111\"\n assert candidate(nums = [33, 330, 3330, 333]) == \"333333330330\"\n assert candidate(nums = [824, 8247]) == \"8248247\"\n assert candidate(nums = [9, 99, 999, 9999]) == \"9999999999\"\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 0]) == \"1110000\"\n assert candidate(nums = [1, 20, 23, 4, 25]) == \"42523201\"\n assert candidate(nums = [0, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == \"8642018161412100\"\n assert candidate(nums = [21, 212, 2121, 21212]) == \"21221212212121\"\n assert candidate(nums = [4, 44, 444, 4444, 44444, 444444, 4444444, 44444444]) == \"444444444444444444444444444444444444\"\n assert candidate(nums = [111311, 1113, 11, 1111, 1]) == \"11131113111111111\"\n assert candidate(nums = [100, 10, 1, 101, 110, 111, 11, 1001]) == \"111111110101101001100\"\n assert candidate(nums = [1, 34, 3, 98, 9, 76, 45, 67]) == \"9987667453431\"\n assert candidate(nums = [54, 546, 548, 60]) == \"6054854654\"\n assert candidate(nums = [33, 333, 3333, 33333, 3]) == \"333333333333333\"\n assert candidate(nums = [1000000000, 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10, 1]) == \"1101001000100001000001000000100000001000000001000000000\"\n assert candidate(nums = [10, 100, 1000, 10000]) == \"10100100010000\"\n assert candidate(nums = [999999999, 99999999, 9999999, 999999, 99999, 9999, 999, 99, 9, 1]) == \"9999999999999999999999999999999999999999999991\"\n assert candidate(nums = [66, 666, 6666, 66666, 666666, 6666666, 66666666]) == \"66666666666666666666666666666666666\"\n assert candidate(nums = [1, 10, 100, 1000, 10000]) == \"110100100010000\"\n assert candidate(nums = [824, 938, 1399, 5607, 6973, 5703, 9609, 4398, 6828, 5662, 6699, 10, 7896, 8626, 3462, 2000, 7988, 626, 6670, 4224, 2996]) == \"9609938862682479887896697368286699667062657035662560743984224346229962000139910\"\n assert candidate(nums = [233, 322, 32]) == \"32322233\"\n assert candidate(nums = [32, 323, 3232, 32323]) == \"32332323323232\"\n assert candidate(nums = [647, 64, 646, 6476]) == \"647664764664\"\n assert candidate(nums = [111, 11, 1]) == \"111111\"\n assert candidate(nums = [1, 20, 200, 2000, 20000]) == \"202002000200001\"\n assert candidate(nums = [12, 121, 1211, 12111, 121111, 1]) == \"121211211121111211111\"\n assert candidate(nums = [333, 33, 3]) == \"333333\"\n assert candidate(nums = [824, 8247]) == \"8248247\"\n assert candidate(nums = [35, 353, 3535, 35353, 353535, 3535353, 35353535]) == \"35353535353535353535353535335353353\"\n", "comparison": "exact"}, "public_tests": ["[10,2]", "[3,30,34,5,9]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().largestNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:31+00:00", "tests_total": 150, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "string", "greedy", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def largest_number(nums)", "container": null, "callable": "largest_number", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 187, "task_id": "repeated-dna-sequences", "difficulty": "Medium", "problem_description": "The DNA sequence is composed of a series of nucleotides abbreviated as 'A', 'C', 'G', and 'T'.\n\n- For example, \"ACGAATTCCG\" is a DNA sequence.\n\nWhen studying DNA, it is useful to identify repeated sequences within the DNA.\n\nGiven a string s that represents a DNA sequence, return all the 10-letter-long sequences (substrings) that occur more than once in a DNA molecule. You may return the answer in any order.\n\nExample 1:\n\nInput: s = \"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"\nOutput: [\"AAAAACCCCC\",\"CCCCCAAAAA\"]\n\nExample 2:\n\nInput: s = \"AAAAAAAAAAAAA\"\nOutput: [\"AAAAAAAAAA\"]\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s[i] is either 'A', 'C', 'G', or 'T'.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(s='ACGACGACGACGACGACG'), ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG'])\n assert answers_match(candidate(s='AAAAAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT'), ['AAAAACCCCC', 'CCCCCAAAAA'])\n assert answers_match(candidate(s='CGTTGCGTTGCGTTGCGTTG'), ['CGTTGCGTTG', 'GTTGCGTTGC', 'TTGCGTTGCG', 'TGCGTTGCGT', 'GCGTTGCGTT'])\n assert answers_match(candidate(s='AAAAAAAAAATTTTTTTTTTAAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='CGCGCGCGCGCGCGCGCGCG'), ['CGCGCGCGCG', 'GCGCGCGCGC'])\n assert answers_match(candidate(s='ACGTTTACGTTTACGTTT'), ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT'])\n assert answers_match(candidate(s='ACGACGACGACGACGACGACGACGACG'), ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG'])\n assert answers_match(candidate(s='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT'), ['TTTTTTTTTT'])\n assert answers_match(candidate(s='ACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='ACGACGACGACGACGACGACGACGACGACG'), ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG'])\n assert answers_match(candidate(s='AAAAAAAAAAAACCCCCCCCCC'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='GGGGGGGGGGGGGGGGGGGG'), ['GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGTCGTCGTCGTCGT'), ['CGTCGTCGTC', 'GTCGTCGTCG', 'TCGTCGTCGT'])\n assert answers_match(candidate(s='AAAAAAAAAAACCCCCCCCCCAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='TTTTTTTTTTAAAAAAAAAA'), [])\n assert answers_match(candidate(s='TTAGGGTTAGGGTTAGGG'), ['TTAGGGTTAG', 'TAGGGTTAGG', 'AGGGTTAGGG'])\n assert answers_match(candidate(s='AAAAAAAAAAAGGGGGGGGGGG'), ['AAAAAAAAAA', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACG'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='ACGACGACGACGACGACGACGACGACGACGACGACGACGACG'), ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG'])\n assert answers_match(candidate(s='AAAAAAAAAAACCCCCCCAAAAAAAAAACCCCCCCCCCCC'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'CCCCCCCCCC'])\n assert answers_match(candidate(s='TTAGGGTACCTAGGGTACCTAGGGTACC'), ['TAGGGTACCT', 'AGGGTACCTA', 'GGGTACCTAG', 'GGTACCTAGG', 'GTACCTAGGG', 'TACCTAGGGT', 'ACCTAGGGTA', 'CCTAGGGTAC', 'CTAGGGTACC'])\n assert answers_match(candidate(s='ATATATATATATATATATATATATATATATATATATATATATATATATATATATATATATAT'), ['ATATATATAT', 'TATATATATA'])\n assert answers_match(candidate(s='CCAGTTACCGGGTAAAGGGCCCTAAAGGGCCCTAAAGGGCCCTAAAGGGCCC'), ['TAAAGGGCCC', 'AAAGGGCCCT', 'AAGGGCCCTA', 'AGGGCCCTAA', 'GGGCCCTAAA', 'GGCCCTAAAG', 'GCCCTAAAGG', 'CCCTAAAGGG', 'CCTAAAGGGC', 'CTAAAGGGCC'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTA'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA'), ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='TTACGTACGTACGTACGTACGTACGTACGTAC'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='GTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCAGTCA'), ['GTCAGTCAGT', 'TCAGTCAGTC', 'CAGTCAGTCA', 'AGTCAGTCAG'])\n assert answers_match(candidate(s='AAAAACCCCCAAAAAAAAAAAAACCCCCAAAA'), ['AAAAAAAAAA', 'AAAAACCCCC', 'AAAACCCCCA', 'AAACCCCCAA', 'AACCCCCAAA', 'ACCCCCAAAA'])\n assert answers_match(candidate(s='AAAAAAAAAAACCCCCCCCCCAAAAAAAAAAAACCCCCCCCCCAGGGGGGGGGG'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC', 'CCCCCCCCCA'])\n assert answers_match(candidate(s='AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT'), ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA'])\n assert answers_match(candidate(s='GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG'), ['GGGGGGGGGG'])\n assert answers_match(candidate(s='ACCTGACCTGACCTGACCTGACCTGACCTGACCTGACCTG'), ['ACCTGACCTG', 'CCTGACCTGA', 'CTGACCTGAC', 'TGACCTGACC', 'GACCTGACCT'])\n assert answers_match(candidate(s='GACGTGACGTGACGTGACGTGACGTGACGTGACGTGACG'), ['GACGTGACGT', 'ACGTGACGTG', 'CGTGACGTGA', 'GTGACGTGAC', 'TGACGTGACG'])\n assert answers_match(candidate(s='AACCGGTTAACCGGTTAACCGGTTAACCGGTTAACCGGTT'), ['AACCGGTTAA', 'ACCGGTTAAC', 'CCGGTTAACC', 'CGGTTAACCG', 'GGTTAACCGG', 'GTTAACCGGT', 'TTAACCGGTT', 'TAACCGGTTA'])\n assert answers_match(candidate(s='GAAAAAAAAATTTTTTTTTTAAAAAAAAAA'), [])\n assert answers_match(candidate(s='AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT'), ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA'])\n assert answers_match(candidate(s='AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA'), ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA'])\n assert answers_match(candidate(s='AAAAAGGGGGAAAAAGGGGGCCCCCATTTTTT'), ['AAAAAGGGGG'])\n assert answers_match(candidate(s='TTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT'), ['TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG', 'ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT'])\n assert answers_match(candidate(s='GGGGGGGGGGTTGGGGGGGGTTGGGGGGGGTTGGGGGG'), ['GGGGGGGGTT', 'GGGGGGGTTG', 'GGGGGGTTGG', 'GGGGGTTGGG', 'GGGGTTGGGG', 'GGGTTGGGGG', 'GGTTGGGGGG', 'GTTGGGGGGG', 'TTGGGGGGGG', 'TGGGGGGGGT'])\n assert answers_match(candidate(s='ACGACGACGACGACGACGACGACGACGACGACG'), ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG'])\n assert answers_match(candidate(s='AAAAAAAAAAGGGGGGGGGGAAAAAAAAAAGGGG'), ['AAAAAAAAAA', 'AAAAAAAAAG', 'AAAAAAAAGG', 'AAAAAAAGGG', 'AAAAAAGGGG'])\n assert answers_match(candidate(s='CCCCCCCCCCGGCCCCCCCCCCGGCCCCCCCCCCGG'), ['CCCCCCCCCC', 'CCCCCCCCCG', 'CCCCCCCCGG', 'CCCCCCCGGC', 'CCCCCCGGCC', 'CCCCCGGCCC', 'CCCCGGCCCC', 'CCCGGCCCCC', 'CCGGCCCCCC', 'CGGCCCCCCC', 'GGCCCCCCCC', 'GCCCCCCCCC'])\n assert answers_match(candidate(s='ATATATATATACGTACGTACGTACGTACGTACGT'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='GATACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTAC'), ['TACAGTACAG', 'ACAGTACAGT', 'CAGTACAGTA', 'AGTACAGTAC', 'GTACAGTACA'])\n assert answers_match(candidate(s='TCGATCGATCGATCGATCGATCGATCGATCGA'), ['TCGATCGATC', 'CGATCGATCG', 'GATCGATCGA', 'ATCGATCGAT'])\n assert answers_match(candidate(s='ACGTACGTTACGTACGTTACGTACGTTACGTACGTTACGTACGTT'), ['ACGTACGTTA', 'CGTACGTTAC', 'GTACGTTACG', 'TACGTTACGT', 'ACGTTACGTA', 'CGTTACGTAC', 'GTTACGTACG', 'TTACGTACGT', 'TACGTACGTT'])\n assert answers_match(candidate(s='ACCGGTTTAAACCGGTTTAAACCGGTTTAA'), ['ACCGGTTTAA', 'CCGGTTTAAA', 'CGGTTTAAAC', 'GGTTTAAACC', 'GTTTAAACCG', 'TTTAAACCGG', 'TTAAACCGGT', 'TAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA'])\n assert answers_match(candidate(s='TTTTAAAAATTTTTAAAAATTTTTAAAAATTTTTAAAAATTTTTAAAAATTTTTAAAAA'), ['TTTTAAAAAT', 'TTTAAAAATT', 'TTAAAAATTT', 'TAAAAATTTT', 'AAAAATTTTT', 'AAAATTTTTA', 'AAATTTTTAA', 'AATTTTTAAA', 'ATTTTTAAAA', 'TTTTTAAAAA'])\n assert answers_match(candidate(s='ACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTA'), ['ACCGGTTTAA', 'CCGGTTTAAA', 'CGGTTTAAAC', 'GGTTTAAACC', 'GTTTAAACCG', 'TTTAAACCGG', 'TTAAACCGGT', 'TAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA'])\n assert answers_match(candidate(s='ACGCGTACGCGTACGCGTACGCGTACGCGTACGCGT'), ['ACGCGTACGC', 'CGCGTACGCG', 'GCGTACGCGT', 'CGTACGCGTA', 'GTACGCGTAC', 'TACGCGTACG'])\n assert answers_match(candidate(s='GAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGA'), ['GAGAGAGAGA', 'AGAGAGAGAG'])\n assert answers_match(candidate(s='ACACACACACACACACACACACACACACACAC'), ['ACACACACAC', 'CACACACACA'])\n assert answers_match(candidate(s='CGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGAT'), ['CGATCGATCG', 'GATCGATCGA', 'ATCGATCGAT', 'TCGATCGATC'])\n assert answers_match(candidate(s='AAACCGGGTTAAACCGGGTTAAACCGGGTT'), ['AAACCGGGTT', 'AACCGGGTTA', 'ACCGGGTTAA', 'CCGGGTTAAA', 'CGGGTTAAAC', 'GGGTTAAACC', 'GGTTAAACCG', 'GTTAAACCGG', 'TTAAACCGGG', 'TAAACCGGGT'])\n assert answers_match(candidate(s='TTTTTTTTTTCCTTTTTTTTCCTTTTTTTTCCTTTTTT'), ['TTTTTTTTCC', 'TTTTTTTCCT', 'TTTTTTCCTT', 'TTTTTCCTTT', 'TTTTCCTTTT', 'TTTCCTTTTT', 'TTCCTTTTTT', 'TCCTTTTTTT', 'CCTTTTTTTT', 'CTTTTTTTTC'])\n assert answers_match(candidate(s='ACACACACACACACACACACACACACACACACACACACAC'), ['ACACACACAC', 'CACACACACA'])\n assert answers_match(candidate(s='ATATATATATATATATATATATATATATATATAT'), ['ATATATATAT', 'TATATATATA'])\n assert answers_match(candidate(s='TATATAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='TGCCTGCCTGCCTGCCTGCCTGCC'), ['TGCCTGCCTG', 'GCCTGCCTGC', 'CCTGCCTGCC', 'CTGCCTGCCT'])\n assert answers_match(candidate(s='CGTACGTAACGTACGTAACGTACGTAACGTAC'), ['CGTACGTAAC', 'GTACGTAACG', 'TACGTAACGT', 'ACGTAACGTA', 'CGTAACGTAC', 'GTAACGTACG', 'TAACGTACGT', 'AACGTACGTA', 'ACGTACGTAA'])\n assert answers_match(candidate(s='ACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTAAACCGGTTTAA'), ['ACCGGTTTAA', 'CCGGTTTAAA', 'CGGTTTAAAC', 'GGTTTAAACC', 'GTTTAAACCG', 'TTTAAACCGG', 'TTAAACCGGT', 'TAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTATATATATACGTACGTAC'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='AAAAAAAAAAACCCCCCCCCGGGGGGGGGGTTTTTTTTTTAAAAAAAAAAACCCCCCCCCGGGGGGGGGGTTTTTTTTTT'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCG', 'CCCCCCCCGG', 'CCCCCCCGGG', 'CCCCCCGGGG', 'CCCCCGGGGG', 'CCCCGGGGGG', 'CCCGGGGGGG', 'CCGGGGGGGG', 'CGGGGGGGGG', 'GGGGGGGGGG', 'GGGGGGGGGT', 'GGGGGGGGTT', 'GGGGGGGTTT', 'GGGGGGTTTT', 'GGGGGTTTTT', 'GGGGTTTTTT', 'GGGTTTTTTT', 'GGTTTTTTTT', 'GTTTTTTTTT', 'TTTTTTTTTT'])\n assert answers_match(candidate(s='ATATATATATATATATATATATATATATATAT'), ['ATATATATAT', 'TATATATATA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='ATCGATCGATCGATCGATCGATCGATCGATCGATCG'), ['ATCGATCGAT', 'TCGATCGATC', 'CGATCGATCG', 'GATCGATCGA'])\n assert answers_match(candidate(s='AAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGG'), ['AAAAAAAAAA', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='AAAAAAAAAACAAAAAAAAAACAAAAAAAAAACAAAAAAA'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACA', 'AAAAAAACAA', 'AAAAAACAAA', 'AAAAACAAAA', 'AAAACAAAAA', 'AAACAAAAAA', 'AACAAAAAAA', 'ACAAAAAAAA', 'CAAAAAAAAA'])\n assert answers_match(candidate(s='AAAAAAAAAAACAAAAAAAAAAACAAAAAAAAAAAC'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACA', 'AAAAAAACAA', 'AAAAAACAAA', 'AAAAACAAAA', 'AAAACAAAAA', 'AAACAAAAAA', 'AACAAAAAAA', 'ACAAAAAAAA', 'CAAAAAAAAA'])\n assert answers_match(candidate(s='AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT'), ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA'])\n assert answers_match(candidate(s='CCCGGGCCCGGGCCCGGGCCCGGGCCCGGGCCCGGGCCCGGG'), ['CCCGGGCCCG', 'CCGGGCCCGG', 'CGGGCCCGGG', 'GGGCCCGGGC', 'GGCCCGGGCC', 'GCCCGGGCCC'])\n assert answers_match(candidate(s='GCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTGCTG'), ['GCTGCTGCTG', 'CTGCTGCTGC', 'TGCTGCTGCT'])\n assert answers_match(candidate(s='ATATATATATATATATATATATATATAT'), ['ATATATATAT', 'TATATATATA'])\n assert answers_match(candidate(s='ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT'), ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG'])\n assert answers_match(candidate(s='GGGGGGGGGGAAAAAAAAAACCCCCCCCCCGGGGGGGGGGAAAAAAAAAACCCCCCCCCCGGGGGGGGGG'), ['GGGGGGGGGG', 'GGGGGGGGGA', 'GGGGGGGGAA', 'GGGGGGGAAA', 'GGGGGGAAAA', 'GGGGGAAAAA', 'GGGGAAAAAA', 'GGGAAAAAAA', 'GGAAAAAAAA', 'GAAAAAAAAA', 'AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC', 'CCCCCCCCCG', 'CCCCCCCCGG', 'CCCCCCCGGG', 'CCCCCCGGGG', 'CCCCCGGGGG', 'CCCCGGGGGG', 'CCCGGGGGGG', 'CCGGGGGGGG', 'CGGGGGGGGG'])\n assert answers_match(candidate(s='TTTTACCGGGAAAAACCGGGAAAAACCGGGAAAA'), ['ACCGGGAAAA', 'CCGGGAAAAA', 'CGGGAAAAAC', 'GGGAAAAACC', 'GGAAAAACCG', 'GAAAAACCGG', 'AAAAACCGGG', 'AAAACCGGGA', 'AAACCGGGAA', 'AACCGGGAAA'])\n assert answers_match(candidate(s='TACGTACGTACGTACGTACGTACGTACGTACG'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='AGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTACAGTAC'), ['AGTACAGTAC', 'GTACAGTACA', 'TACAGTACAG', 'ACAGTACAGT', 'CAGTACAGTA'])\n assert answers_match(candidate(s='GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA'), ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG'])\n assert answers_match(candidate(s='TTTTTTTTTTAAAAAAAAAAAATTTTTTTTTTAAAAAAAAAAAATTTTT'), ['AAAAAAAAAA', 'TTTTTTTTTT', 'TTTTTTTTTA', 'TTTTTTTTAA', 'TTTTTTTAAA', 'TTTTTTAAAA', 'TTTTTAAAAA', 'TTTTAAAAAA', 'TTTAAAAAAA', 'TTAAAAAAAA', 'TAAAAAAAAA', 'AAAAAAAAAT', 'AAAAAAAATT', 'AAAAAAATTT', 'AAAAAATTTT', 'AAAAATTTTT'])\n assert answers_match(candidate(s='CCCCGGGGAAGGGGCCCCGGGGAAGGGGCCCCGGGGAAGGGGCCCCGGGGAAGGGG'), ['CCCCGGGGAA', 'CCCGGGGAAG', 'CCGGGGAAGG', 'CGGGGAAGGG', 'GGGGAAGGGG', 'GGGAAGGGGC', 'GGAAGGGGCC', 'GAAGGGGCCC', 'AAGGGGCCCC', 'AGGGGCCCCG', 'GGGGCCCCGG', 'GGGCCCCGGG', 'GGCCCCGGGG', 'GCCCCGGGGA'])\n assert answers_match(candidate(s='AAAAAAAAAAAAAAACCCCCCCCCCCCCCCCCCCCCCC'), ['AAAAAAAAAA', 'CCCCCCCCCC'])\n assert answers_match(candidate(s='AAAAAAAAAAAACCCCCCCCCCAAAAAAAAAAAACCCCCCCCCC'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC'])\n assert answers_match(candidate(s='AAAAAAAAAAAACCCCCCCCCCGGGGGGGGGGTTTTTTTTTTAAAAAAAAAAAACCCCCCCCCCGGGGGGGGGGTTTTTTTTTT'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC', 'CCCCCCCCCG', 'CCCCCCCCGG', 'CCCCCCCGGG', 'CCCCCCGGGG', 'CCCCCGGGGG', 'CCCCGGGGGG', 'CCCGGGGGGG', 'CCGGGGGGGG', 'CGGGGGGGGG', 'GGGGGGGGGG', 'GGGGGGGGGT', 'GGGGGGGGTT', 'GGGGGGGTTT', 'GGGGGGTTTT', 'GGGGGTTTTT', 'GGGGTTTTTT', 'GGGTTTTTTT', 'GGTTTTTTTT', 'GTTTTTTTTT', 'TTTTTTTTTT'])\n assert answers_match(candidate(s='AGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCT'), ['AGCTAGCTAG', 'GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA'])\n assert answers_match(candidate(s='ACGTACGTTTTACGTTTTACGTTTTACGTTTT'), ['TACGTTTTAC', 'ACGTTTTACG', 'CGTTTTACGT', 'GTTTTACGTT', 'TTTTACGTTT', 'TTTACGTTTT', 'TTACGTTTTA'])\n assert answers_match(candidate(s='GAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAGA'), ['GAGAGAGAGA', 'AGAGAGAGAG'])\n assert answers_match(candidate(s='ACGTCGTTTTTACGTCGTTTTTACGTCGTTTTTACGTCGTTTTT'), ['ACGTCGTTTT', 'CGTCGTTTTT', 'GTCGTTTTTA', 'TCGTTTTTAC', 'CGTTTTTACG', 'GTTTTTACGT', 'TTTTTACGTC', 'TTTTACGTCG', 'TTTACGTCGT', 'TTACGTCGTT', 'TACGTCGTTT'])\n assert answers_match(candidate(s='ACGTACGTACGTATATATATACGTACGTACGTAT'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'ACGTACGTAT'])\n assert answers_match(candidate(s='TACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'), ['AAAAAAAAAA'])\n assert answers_match(candidate(s='TTTACCGGAAAACCGGAAAACCGGAAAACCGGAAAACCGG'), ['ACCGGAAAAC', 'CCGGAAAACC', 'CGGAAAACCG', 'GGAAAACCGG', 'GAAAACCGGA', 'AAAACCGGAA', 'AAACCGGAAA', 'AACCGGAAAA'])\n assert answers_match(candidate(s='AGAGAGAGAGAGAGAGAGAGAGAGAGAGAGAG'), ['AGAGAGAGAG', 'GAGAGAGAGA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='AAAAAAAAAAAACCCCCCCCCCAAAAAAAAAACCCCCCCCCC'), ['AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC'])\n assert answers_match(candidate(s='TACGTACGTACGTACGTACGTACGTACGTACGTACGTACG'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='AAAAACCCCCAAAAACCCCCAAAAACCCCCAAAAACCCCC'), ['AAAAACCCCC', 'AAAACCCCCA', 'AAACCCCCAA', 'AACCCCCAAA', 'ACCCCCAAAA', 'CCCCCAAAAA', 'CCCCAAAAAC', 'CCCAAAAACC', 'CCAAAAACCC', 'CAAAAACCCC'])\n assert answers_match(candidate(s='AAAAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG'), ['AAAAAAAAAA', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT'), ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT'), ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG'])\n assert answers_match(candidate(s='TTTTTTTTTTGGGGGGGGGGTTTTTTTTTTGGGGGGGGGG'), ['TTTTTTTTTT', 'TTTTTTTTTG', 'TTTTTTTTGG', 'TTTTTTTGGG', 'TTTTTTGGGG', 'TTTTTGGGGG', 'TTTTGGGGGG', 'TTTGGGGGGG', 'TTGGGGGGGG', 'TGGGGGGGGG', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA'), ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG'])\n assert answers_match(candidate(s='CGTACGTACGTACGTACGTACGTACGTACGTACGTAC'), ['CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA', 'ACGTACGTAC'])\n assert answers_match(candidate(s='TATATATATATATATATATATATATATATATATATATATATATA'), ['TATATATATA', 'ATATATATAT'])\n assert answers_match(candidate(s='GTACGTACGTACGTACGTACGTACGTACGTACGTACG'), ['GTACGTACGT', 'TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG'])\n assert answers_match(candidate(s='TGACGTGACGTGACGTGACGTGACGTGACGTGACGTGAC'), ['TGACGTGACG', 'GACGTGACGT', 'ACGTGACGTG', 'CGTGACGTGA', 'GTGACGTGAC'])\n assert answers_match(candidate(s='TACGTACGTACGTACGTACGTACGTACGTACGTAC'), ['TACGTACGTA', 'ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTAC'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n assert answers_match(candidate(s='TTTTTTTTTTGGGGGGGGGGAAAAAAAAAATTTTTTTTTTGGGGGGGGGG'), ['TTTTTTTTTT', 'TTTTTTTTTG', 'TTTTTTTTGG', 'TTTTTTTGGG', 'TTTTTTGGGG', 'TTTTTGGGGG', 'TTTTGGGGGG', 'TTTGGGGGGG', 'TTGGGGGGGG', 'TGGGGGGGGG', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='AAAAAAAAAAAAACCCCCCCCCCCCCCCGGGGGGGGGGGGGG'), ['AAAAAAAAAA', 'CCCCCCCCCC', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGGTACGGTACGGTACGGTACGGTACGGTACGGTACGGT'), ['ACGGTACGGT', 'CGGTACGGTA', 'GGTACGGTAC', 'GTACGGTACG', 'TACGGTACGG'])\n assert answers_match(candidate(s='GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG'), ['GGGGGGGGGG'])\n assert answers_match(candidate(s='AGACGTAGACGTAGACGTAGACGTAGACGTAGACGTAG'), ['AGACGTAGAC', 'GACGTAGACG', 'ACGTAGACGT', 'CGTAGACGTA', 'GTAGACGTAG', 'TAGACGTAGA'])\n assert answers_match(candidate(s='TTTTTTTTTTAAAAAAAAAACCCCCCCCCCGGGGGGGGGGTTTTTTTTTTAAAAAAAAAACCCCCCCCCCGGGGGGGGGG'), ['TTTTTTTTTT', 'TTTTTTTTTA', 'TTTTTTTTAA', 'TTTTTTTAAA', 'TTTTTTAAAA', 'TTTTTAAAAA', 'TTTTAAAAAA', 'TTTAAAAAAA', 'TTAAAAAAAA', 'TAAAAAAAAA', 'AAAAAAAAAA', 'AAAAAAAAAC', 'AAAAAAAACC', 'AAAAAAACCC', 'AAAAAACCCC', 'AAAAACCCCC', 'AAAACCCCCC', 'AAACCCCCCC', 'AACCCCCCCC', 'ACCCCCCCCC', 'CCCCCCCCCC', 'CCCCCCCCCG', 'CCCCCCCCGG', 'CCCCCCCGGG', 'CCCCCCGGGG', 'CCCCCGGGGG', 'CCCCGGGGGG', 'CCCGGGGGGG', 'CCGGGGGGGG', 'CGGGGGGGGG', 'GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGGTGACGGTGACGGTGACGGTGACGGTGACGGTG'), ['ACGGTGACGG', 'CGGTGACGGT', 'GGTGACGGTG', 'GTGACGGTGA', 'TGACGGTGAC', 'GACGGTGACG'])\n assert answers_match(candidate(s='AAAAAAAAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG'), ['GGGGGGGGGG'])\n assert answers_match(candidate(s='ACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACGACG'), ['ACGACGACGA', 'CGACGACGAC', 'GACGACGACG'])\n assert answers_match(candidate(s='GCGCGCGCGCGCGCGCGCGCGCGCGCGCGCGC'), ['GCGCGCGCGC', 'CGCGCGCGCG'])\n assert answers_match(candidate(s='ACGTTTACGTTTACGTTTACGTTTACGTTTACGTTTACGTTT'), ['ACGTTTACGT', 'CGTTTACGTT', 'GTTTACGTTT', 'TTTACGTTTA', 'TTACGTTTAC', 'TACGTTTACG'])\n assert answers_match(candidate(s='ACGAATTCCGACGAATTCCGACGAATTCCGACGAATTCCG'), ['ACGAATTCCG', 'CGAATTCCGA', 'GAATTCCGAC', 'AATTCCGACG', 'ATTCCGACGA', 'TTCCGACGAA', 'TCCGACGAAT', 'CCGACGAATT', 'CGACGAATTC', 'GACGAATTCC'])\n assert answers_match(candidate(s='GATTACAAGATTACAAGATTACAAGATTACAAGATTAC'), ['GATTACAAGA', 'ATTACAAGAT', 'TTACAAGATT', 'TACAAGATTA', 'ACAAGATTAC', 'CAAGATTACA', 'AAGATTACAA', 'AGATTACAAG'])\n assert answers_match(candidate(s='GCTAGCTAGCTAGCTAGCTAGCTAGCTAGCTA'), ['GCTAGCTAGC', 'CTAGCTAGCT', 'TAGCTAGCTA', 'AGCTAGCTAG'])\n assert answers_match(candidate(s='ACGACGTTTTACGACGTTTTACGACGTTTT'), ['ACGACGTTTT', 'CGACGTTTTA', 'GACGTTTTAC', 'ACGTTTTACG', 'CGTTTTACGA', 'GTTTTACGAC', 'TTTTACGACG', 'TTTACGACGT', 'TTACGACGTT', 'TACGACGTTT'])\n assert answers_match(candidate(s='CCGGTTTAAAACCGGTTTAAAACCGGTTTAAAACCGGTTTAAA'), ['CCGGTTTAAA', 'CGGTTTAAAA', 'GGTTTAAAAC', 'GTTTAAAACC', 'TTTAAAACCG', 'TTAAAACCGG', 'TAAAACCGGT', 'AAAACCGGTT', 'AAACCGGTTT', 'AACCGGTTTA', 'ACCGGTTTAA'])\n assert answers_match(candidate(s='AAGGTTCCGGTTCCTTAAAGGTTCCGGTTCCT'), ['AAGGTTCCGG', 'AGGTTCCGGT', 'GGTTCCGGTT', 'GTTCCGGTTC', 'TTCCGGTTCC', 'TCCGGTTCCT'])\n assert answers_match(candidate(s='ACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTACGTT'), ['ACGTACGTAC', 'CGTACGTACG', 'GTACGTACGT', 'TACGTACGTA'])\n", "comparison": "unordered"}, "public_tests": ["\"AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT\"", "\"AAAAAAAAAAAAA\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().findRepeatedDnaSequences", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:36+00:00", "tests_total": 137, "tests_dropped": 0, "flags": ["any_order"], "topic_tags": ["hash-table", "string", "bit-manipulation", "sliding-window", "rolling-hash", "hash-function", "z-algorithm", "boyer-moore-string-search-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def find_repeated_dna_sequences(s)", "container": null, "callable": "find_repeated_dna_sequences", "parameters": [{"name": "s", "type": "String"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 188, "task_id": "best-time-to-buy-and-sell-stock-iv", "difficulty": "Hard", "problem_description": "You are given an integer array prices where prices[i] is the price of a given stock on the i^th day, and an integer k.\n\nFind the maximum profit you can achieve. You may complete at most k transactions: i.e. you may buy at most k times and sell at most k times.\n\nNote: You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).\n\nExample 1:\n\nInput: k = 2, prices = [2,4,1]\nOutput: 2\nExplanation: Buy on day 1 (price = 2) and sell on day 2 (price = 4), profit = 4-2 = 2.\n\nExample 2:\n\nInput: k = 2, prices = [3,2,6,5,0,3]\nOutput: 7\nExplanation: Buy on day 2 (price = 2) and sell on day 3 (price = 6), profit = 6-2 = 4. Then buy on day 5 (price = 0) and sell on day 6 (price = 3), profit = 3-0 = 3.\n\nConstraints:\n\n- 1 <= k <= 100\n- 1 <= prices.length <= 1000\n- 0 <= prices[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(k = 2,prices = [10, 22, 5, 75, 65, 80]) == 87\n assert candidate(k = 5,prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(k = 2,prices = [2, 4, 1]) == 2\n assert candidate(k = 1,prices = [7, 1, 5, 3, 6, 4]) == 5\n assert candidate(k = 1,prices = [3, 3, 3, 3, 3]) == 0\n assert candidate(k = 1,prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(k = 100,prices = [10, 22, 5, 75, 65, 80]) == 97\n assert candidate(k = 5,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 15\n assert candidate(k = 1,prices = [1]) == 0\n assert candidate(k = 10,prices = [30, 80, 60, 90, 50, 120, 30, 10, 50, 60]) == 200\n assert candidate(k = 2,prices = [3, 2, 6, 5, 0, 3]) == 7\n assert candidate(k = 3,prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 8\n assert candidate(k = 2,prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 9\n assert candidate(k = 3,prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(k = 1,prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 4\n assert candidate(k = 4,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 15\n assert candidate(k = 3,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 15\n assert candidate(k = 10,prices = [8, 6, 4, 5, 3, 8, 9, 10, 11, 12, 13, 14, 15]) == 13\n assert candidate(k = 5,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9]) == 24\n assert candidate(k = 5,prices = [7, 6, 4, 3, 1, 2, 3, 5, 6, 8, 10, 1, 2, 2, 4, 5, 7, 8, 8, 9, 10]) == 18\n assert candidate(k = 1,prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(k = 5,prices = [12, 14, 17, 10, 14, 13, 12, 15]) == 12\n assert candidate(k = 4,prices = [30, 80, 50, 90, 100, 150]) == 150\n assert candidate(k = 5,prices = [10, 22, 5, 75, 65, 80, 120, 130, 70, 50, 60, 100, 180]) == 277\n assert candidate(k = 50,prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 27\n assert candidate(k = 2,prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(k = 3,prices = [12, 14, 17, 10, 14, 13, 12, 15]) == 12\n assert candidate(k = 10,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 32\n assert candidate(k = 6,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(k = 3,prices = [3, 3, 5, 0, 0, 3, 1, 4, 7, 8, 9, 10]) == 14\n assert candidate(k = 5,prices = [10, 22, 5, 75, 65, 80]) == 97\n assert candidate(k = 3,prices = [5, 2, 4, 0, 0, 3, 1, 4, 3, 6, 5, 0, 3, 8, 6, 8, 10, 1, 2, 3, 4, 5]) == 20\n assert candidate(k = 4,prices = [8, 5, 12, 19, 21, 10]) == 16\n assert candidate(k = 3,prices = [7, 6, 4, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(k = 3,prices = [1, 2, 2, 4, 5, 7, 8, 8, 9, 10]) == 9\n assert candidate(k = 5,prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(k = 3,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(k = 5,prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 14\n assert candidate(k = 3,prices = [1, 3, 2, 8, 4, 9, 10, 11, 10, 9, 10, 11, 10, 9, 10, 11, 10, 9]) == 16\n assert candidate(k = 2,prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(k = 10,prices = [2, 1, 2, 0, 1, 0, 1, 0, 1, 0, 1]) == 5\n assert candidate(k = 4,prices = [10, 22, 5, 75, 65, 80]) == 97\n assert candidate(k = 5,prices = [31, 31, 27, 39, 59, 91, 92, 58, 84, 100]) == 107\n assert candidate(k = 3,prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 0\n assert candidate(k = 1,prices = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 0\n assert candidate(k = 10,prices = [8, 9, 8, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9]) == 8\n assert candidate(k = 4,prices = [1, 2, 2, 4, 5, 7, 8, 8, 9, 10, 1, 2, 2, 4, 5, 7, 8, 8, 9, 10]) == 18\n assert candidate(k = 5,prices = [30, 10, 20, 40, 50, 15, 35, 60, 70, 25, 45, 80, 90]) == 160\n assert candidate(k = 5,prices = [10, 22, 5, 75, 65, 80, 90, 100, 110, 120, 130, 140, 150]) == 167\n assert candidate(k = 2,prices = [3, 3, 5, 0, 0, 3, 1, 4, 7, 11, 10, 13, 12, 9, 15, 18, 17, 20, 22, 21]) == 26\n assert candidate(k = 3,prices = [90, 80, 70, 60, 50, 40, 30, 20, 10, 0]) == 0\n assert candidate(k = 4,prices = [7, 6, 4, 3, 1, 2, 5, 6, 4, 3, 1, 2]) == 6\n assert candidate(k = 4,prices = [30, 25, 20, 15, 10, 5]) == 0\n assert candidate(k = 2,prices = [3, 2, 1, 4, 3, 5, 3, 6, 4, 7, 8, 10, 6, 12, 14, 8, 15, 16, 18, 20]) == 25\n assert candidate(k = 6,prices = [8, 1, 9, 5, 7, 4, 3, 6, 0, 9, 2, 6, 10, 14]) == 34\n assert candidate(k = 4,prices = [10, 1, 1, 10, 3, 5, 10, 9, 1, 3, 5, 6, 8, 9, 0, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 34\n assert candidate(k = 4,prices = [3, 5, 0, 0, 3, 1, 4, 7, 9, 8, 5, 3, 2, 10, 12, 14, 16, 18, 20, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 31\n assert candidate(k = 4,prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2]) == 16\n assert candidate(k = 5,prices = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(k = 4,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(k = 20,prices = [5, 2, 8, 3, 10, 4, 12, 5, 14, 6, 16, 7, 18, 8, 20, 9, 22, 10, 24, 11]) == 90\n assert candidate(k = 5,prices = [1, 3, 2, 8, 4, 9, 5, 11, 6, 10, 7, 12, 8, 13, 9, 14, 10, 15, 11, 16]) == 32\n assert candidate(k = 2,prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(k = 2,prices = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(k = 1,prices = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]) == 0\n assert candidate(k = 4,prices = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23]) == 22\n assert candidate(k = 1,prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(k = 3,prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(k = 10,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(k = 2,prices = [3, 2, 6, 5, 0, 3, 1, 4, 7, 8, 5]) == 12\n assert candidate(k = 2,prices = [1, 3, 2, 8, 4, 9]) == 12\n assert candidate(k = 1,prices = [100, 180, 260, 310, 40, 535, 695]) == 655\n assert candidate(k = 5,prices = [3, 3, 5, 0, 0, 3, 1, 4, 7, 9, 8, 5, 3, 2, 10]) == 21\n assert candidate(k = 2,prices = [1, 2, 3, 2, 4, 5, 6, 4, 7, 8, 9, 7, 10, 11, 12, 10, 13, 14, 15, 13, 16, 17, 18, 16, 19, 20, 21, 19]) == 22\n assert candidate(k = 10,prices = [100, 300, 200, 400, 500, 800, 300, 600, 500, 700]) == 1300\n assert candidate(k = 2,prices = [100, 180, 260, 310, 40, 535, 695]) == 865\n assert candidate(k = 3,prices = [3, 3, 5, 0, 0, 3, 1, 4, 7, 8, 2]) == 12\n assert candidate(k = 2,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9, 1, 2, 3, 5]) == 17\n assert candidate(k = 3,prices = [8, 3, 6, 2, 8, 8, 8, 4, 2, 0, 1, 2, 5, 1, 0, 3, 6, 1, 1, 9]) == 20\n assert candidate(k = 4,prices = [3, 3, 5, 0, 0, 3, 1, 4, 7, 8, 5]) == 12\n assert candidate(k = 3,prices = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 4\n assert candidate(k = 100,prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 52\n assert candidate(k = 2,prices = [5, 4, 3, 2, 1]) == 0\n assert candidate(k = 100,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(k = 3,prices = [5, 2, 3, 0, 3, 5, 6, 8, 1, 9]) == 17\n assert candidate(k = 3,prices = [1, 3, 2, 8, 4, 9, 5, 10, 11, 15, 13, 14, 16, 17]) == 24\n assert candidate(k = 5,prices = [50, 30, 20, 40, 90, 100, 40, 80, 60, 50, 70, 120, 150, 130, 170]) == 260\n assert candidate(k = 3,prices = [10, 22, 5, 75, 65, 80]) == 97\n assert candidate(k = 4,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0, 9]) == 24\n assert candidate(k = 3,prices = [3, 3, 5, 0, 0, 3, 1, 4, 7, 11, 10, 13, 12, 9]) == 17\n assert candidate(k = 1,prices = [1, 2, 4, 2, 5, 7, 2, 4, 9, 0]) == 8\n assert candidate(k = 100,prices = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3]) == 68\n assert candidate(k = 7,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(k = 10,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(k = 5,prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n", "comparison": "exact"}, "public_tests": ["2\n[2,4,1]", "2\n[3,2,6,5,0,3]"], "hints": [], "metadata": {"canonical_parameter_names": ["k", "prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:38+00:00", "tests_total": 97, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_profit(k, prices)", "container": null, "callable": "max_profit", "parameters": [{"name": "k", "type": "Integer"}, {"name": "prices", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 191, "task_id": "number-of-1-bits", "difficulty": "Easy", "problem_description": "Given a positive integer n, write a function that returns the number of set bits in its binary representation (also known as the Hamming weight).\n\nExample 1:\n\nInput: n = 11\nOutput: 3\nExplanation:\nThe input binary string 1011 has a total of three set bits.\n\nExample 2:\n\nInput: n = 128\nOutput: 1\nExplanation:\nThe input binary string 10000000 has a total of one set bit.\n\nExample 3:\n\nInput: n = 2147483645\nOutput: 30\nExplanation:\nThe input binary string 1111111111111111111111111111101 has a total of thirty set bits.\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n\nFollow up: If this function is called many times, how would you optimize it?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 4095) == 12\n assert candidate(n = 11) == 3\n assert candidate(n = 15) == 4\n assert candidate(n = 2147483647) == 31\n assert candidate(n = 32) == 1\n assert candidate(n = 1023) == 10\n assert candidate(n = 2147483645) == 30\n assert candidate(n = 1) == 1\n assert candidate(n = 65535) == 16\n assert candidate(n = 128) == 1\n assert candidate(n = 3) == 2\n assert candidate(n = 2147483646) == 30\n assert candidate(n = 239) == 7\n assert candidate(n = 53) == 4\n assert candidate(n = 262143) == 18\n assert candidate(n = 43) == 4\n assert candidate(n = 268435456) == 1\n assert candidate(n = 2047) == 11\n assert candidate(n = 5) == 2\n assert candidate(n = 103) == 5\n assert candidate(n = 37) == 3\n assert candidate(n = 223) == 7\n assert candidate(n = 211) == 5\n assert candidate(n = 73) == 3\n assert candidate(n = 1022) == 9\n assert candidate(n = 33554432) == 1\n assert candidate(n = 251) == 7\n assert candidate(n = 181) == 5\n assert candidate(n = 8) == 1\n assert candidate(n = 193) == 3\n assert candidate(n = 131) == 3\n assert candidate(n = 2048) == 1\n assert candidate(n = 241) == 5\n assert candidate(n = 263) == 4\n assert candidate(n = 8191) == 13\n assert candidate(n = 1000000000) == 13\n assert candidate(n = 32768) == 1\n assert candidate(n = 1048575) == 20\n assert candidate(n = 500000000) == 13\n assert candidate(n = 313) == 5\n assert candidate(n = 167) == 5\n assert candidate(n = 97) == 3\n assert candidate(n = 317) == 6\n assert candidate(n = 107374182) == 14\n assert candidate(n = 271) == 5\n assert candidate(n = 21) == 3\n assert candidate(n = 107) == 5\n assert candidate(n = 163) == 4\n assert candidate(n = 524288) == 1\n assert candidate(n = 524287) == 19\n assert candidate(n = 28) == 3\n assert candidate(n = 268435455) == 28\n assert candidate(n = 137) == 3\n assert candidate(n = 4) == 1\n assert candidate(n = 134217728) == 1\n assert candidate(n = 257) == 2\n assert candidate(n = 1073741823) == 30\n assert candidate(n = 1610612735) == 30\n assert candidate(n = 16777215) == 24\n assert candidate(n = 101) == 4\n assert candidate(n = 89) == 4\n assert candidate(n = 256) == 1\n assert candidate(n = 71) == 4\n assert candidate(n = 151) == 5\n assert candidate(n = 293) == 4\n assert candidate(n = 41) == 3\n assert candidate(n = 9) == 2\n assert candidate(n = 83) == 4\n assert candidate(n = 123456789) == 16\n assert candidate(n = 283) == 5\n assert candidate(n = 8388608) == 1\n assert candidate(n = 79) == 5\n assert candidate(n = 63) == 6\n assert candidate(n = 269) == 4\n assert candidate(n = 61) == 5\n assert candidate(n = 999999999) == 21\n assert candidate(n = 49) == 3\n assert candidate(n = 227) == 5\n assert candidate(n = 47) == 5\n assert candidate(n = 4096) == 1\n assert candidate(n = 113) == 4\n assert candidate(n = 233) == 5\n assert candidate(n = 32767) == 15\n assert candidate(n = 511) == 9\n assert candidate(n = 1879048192) == 3\n assert candidate(n = 4194303) == 22\n assert candidate(n = 191) == 7\n assert candidate(n = 16) == 1\n assert candidate(n = 311) == 6\n assert candidate(n = 179) == 5\n assert candidate(n = 2) == 1\n assert candidate(n = 2147483644) == 29\n assert candidate(n = 255) == 8\n assert candidate(n = 127) == 7\n assert candidate(n = 987654321) == 17\n assert candidate(n = 307) == 5\n assert candidate(n = 14) == 3\n assert candidate(n = 26) == 3\n assert candidate(n = 281) == 4\n assert candidate(n = 536870911) == 29\n assert candidate(n = 33554431) == 25\n assert candidate(n = 13) == 3\n assert candidate(n = 277) == 4\n assert candidate(n = 197) == 4\n assert candidate(n = 157) == 5\n assert candidate(n = 16383) == 14\n assert candidate(n = 59) == 5\n assert candidate(n = 173) == 5\n assert candidate(n = 67) == 3\n assert candidate(n = 134217727) == 27\n assert candidate(n = 64) == 1\n assert candidate(n = 8388607) == 23\n assert candidate(n = 254) == 7\n assert candidate(n = 4094) == 11\n assert candidate(n = 1024) == 1\n assert candidate(n = 1073741824) == 1\n assert candidate(n = 22) == 3\n assert candidate(n = 149) == 4\n assert candidate(n = 19) == 3\n assert candidate(n = 1599999999) == 23\n assert candidate(n = 139) == 4\n assert candidate(n = 109) == 5\n assert candidate(n = 31) == 5\n assert candidate(n = 229) == 5\n assert candidate(n = 199) == 5\n assert candidate(n = 7) == 3\n assert candidate(n = 25) == 3\n", "comparison": "exact"}, "public_tests": ["11", "128", "2147483645"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().hammingWeight", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:45+00:00", "tests_total": 139, "tests_dropped": 12, "flags": [], "topic_tags": ["divide-and-conquer", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def hamming_weight(n)", "container": null, "callable": "hamming_weight", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 198, "task_id": "house-robber", "difficulty": "Medium", "problem_description": "You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same night.\n\nGiven an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.\n\nExample 1:\n\nInput: nums = [1,2,3,1]\nOutput: 4\nExplanation: Rob house 1 (money = 1) and then rob house 3 (money = 3).\nTotal amount you can rob = 1 + 3 = 4.\n\nExample 2:\n\nInput: nums = [2,7,9,3,1]\nOutput: 12\nExplanation: Rob house 1 (money = 2), rob house 3 (money = 9) and rob house 5 (money = 1).\nTotal amount you can rob = 2 + 9 + 1 = 12.\n\nConstraints:\n\n- 1 <= nums.length <= 100\n- 0 <= nums[i] <= 400\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 2, 3, 1]) == 4\n assert candidate(nums = [2, 1, 1, 2]) == 4\n assert candidate(nums = [5, 2, 6, 3, 4, 1]) == 15\n assert candidate(nums = [5, 2, 6, 3, 1, 8, 9, 4, 7]) == 28\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [10, 2, 3, 8, 10, 1]) == 23\n assert candidate(nums = [0]) == 0\n assert candidate(nums = [3, 2, 5, 10, 7]) == 15\n assert candidate(nums = [5, 10, 5, 10]) == 20\n assert candidate(nums = [1, 3, 1, 3, 100]) == 103\n assert candidate(nums = [10, 20, 30, 40, 50]) == 90\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [50, 10, 100, 10, 5]) == 155\n assert candidate(nums = [3, 5, 100, 1, 1, 1, 1, 1, 100, 1, 1, 1, 1]) == 207\n assert candidate(nums = [2, 7, 9, 3, 1]) == 12\n assert candidate(nums = [3, 10, 3, 1, 2, 1]) == 12\n assert candidate(nums = [299, 399, 199, 299, 399, 199, 299, 399, 199, 299, 399, 199, 299, 399, 199, 299, 399, 199, 299, 399]) == 3090\n assert candidate(nums = [10, 5, 15, 20, 25, 30, 35, 40]) == 100\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 136\n assert candidate(nums = [400, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 400\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == 27\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 42\n assert candidate(nums = [399, 0, 399, 0, 399, 0, 399, 0, 399, 0, 399, 0, 399, 0, 399, 0, 399]) == 3591\n assert candidate(nums = [100, 0, 100, 0, 100, 0, 100, 0, 100]) == 500\n assert candidate(nums = [4, 1, 2, 7, 5, 3, 9, 2, 8, 6, 4, 10, 1, 2, 5, 3, 7, 8, 6, 9]) == 60\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [200, 100, 150, 50, 300, 100, 400, 200, 350, 150]) == 1400\n assert candidate(nums = [300, 200, 100, 50, 25, 10, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 458\n assert candidate(nums = [400, 399, 398, 397, 396, 395, 394, 393, 392, 391]) == 1980\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 240\n assert candidate(nums = [400, 0, 400, 0, 400, 0, 400, 0, 400, 0]) == 2000\n assert candidate(nums = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 100\n assert candidate(nums = [10, 1, 20, 3, 40, 5, 60, 7, 80]) == 210\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 64\n assert candidate(nums = [10, 5, 1, 2, 12, 4, 5, 6, 1, 2]) == 31\n assert candidate(nums = [100, 1, 1, 100, 1, 1, 100, 1, 1, 100]) == 400\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 420\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 400]) == 400\n assert candidate(nums = [1, 3, 1, 1, 3, 1, 1, 3, 1, 1]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 16\n assert candidate(nums = [400, 300, 200, 100, 0, 0, 0, 0, 0, 0]) == 600\n assert candidate(nums = [100, 0, 50, 0, 200, 0, 300, 0, 400, 0]) == 1050\n assert candidate(nums = [150, 100, 120, 200, 180, 170, 160, 250, 300, 290]) == 1060\n assert candidate(nums = [300, 0, 400, 0, 300, 0]) == 1000\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 400]) == 435\n assert candidate(nums = [400, 300, 200, 100, 50, 40]) == 650\n assert candidate(nums = [300, 0, 0, 300, 0, 0, 300, 0, 0, 300]) == 1200\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 55\n assert candidate(nums = [2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1]) == 14\n assert candidate(nums = [1, 3, 1, 5, 2, 2, 1, 3, 4]) == 14\n assert candidate(nums = [3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3]) == 21\n assert candidate(nums = [1, 3, 1, 3, 100, 1, 1, 1, 1, 1]) == 105\n assert candidate(nums = [400, 0, 400, 0, 400, 0, 400, 0, 400, 0, 400, 0, 400, 0, 400, 0, 400, 0, 400, 0]) == 4000\n assert candidate(nums = [5, 4, 3, 2, 1, 0, 9, 8, 7, 6]) == 25\n assert candidate(nums = [4, 2, 3, 6, 3, 8, 5, 10, 7]) == 28\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55]) == 175\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 110\n assert candidate(nums = [399, 1, 399, 1, 399, 1, 399, 1, 399, 1]) == 1995\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [3, 10, 3, 1, 2, 9, 5, 4, 6, 8, 1, 7]) == 39\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 30\n assert candidate(nums = [10, 5, 15, 20, 25, 30, 35, 40, 45, 50]) == 150\n assert candidate(nums = [100, 0, 100, 0, 100, 0, 100]) == 400\n assert candidate(nums = [3, 2, 5, 10, 7, 8, 5, 1, 100, 2, 5, 8, 5, 1, 100]) == 231\n assert candidate(nums = [1, 2, 3, 1, 1, 2, 3, 1, 1, 2]) == 10\n assert candidate(nums = [10, 5, 10, 5, 10, 5, 10, 5, 10, 5]) == 50\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 128\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 5\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 300\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3]) == 30\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 60\n assert candidate(nums = [200, 100, 200, 200, 100, 300, 150, 250, 200, 100]) == 1050\n assert candidate(nums = [300, 1, 1, 300, 1, 1, 300, 1, 1, 300, 1, 1, 300, 1, 1, 300, 1, 1, 300, 1]) == 2100\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(nums = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0]) == 7\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3]) == 18\n assert candidate(nums = [300, 100, 200, 150, 250, 125, 350]) == 1100\n assert candidate(nums = [100, 1, 200, 3, 400, 5]) == 700\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [150, 200, 50, 100, 100, 50, 200, 150, 100, 100, 50, 200, 150]) == 800\n assert candidate(nums = [100, 200, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 260\n assert candidate(nums = [300, 200, 100, 0, 50, 10, 20, 30, 40, 5]) == 510\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 70]) == 235\n assert candidate(nums = [50, 1, 50, 1, 50, 1, 50, 1, 50, 1]) == 250\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [300, 200, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 400\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [50, 100, 200, 50, 100, 200, 50, 100, 200, 50]) == 650\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 50\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1]) == 18\n assert candidate(nums = [50, 10, 40, 70, 30, 60, 20, 80, 100, 90]) == 350\n assert candidate(nums = [31, 41, 59, 26, 53, 58, 97, 93, 23, 84, 62, 64, 33, 83, 27, 95, 8, 41, 32, 9]) == 617\n assert candidate(nums = [400, 300, 200, 100, 0, 100, 200, 300, 400]) == 1200\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 90\n assert candidate(nums = [4, 1, 2, 7, 5, 3, 1, 1, 1, 2, 3, 4, 5]) == 23\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 20\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 66\n assert candidate(nums = [3, 7, 5, 1, 9, 2, 6, 4]) == 23\n assert candidate(nums = [400, 399, 398, 397, 396, 395, 394, 393, 392, 391]) == 1980\n assert candidate(nums = [4, 1, 2, 7, 5, 3, 1, 1, 1, 1]) == 16\n assert candidate(nums = [10, 15, 10, 5, 10, 15, 10, 5, 10, 15]) == 55\n assert candidate(nums = [10, 5, 10, 5, 15, 20]) == 40\n assert candidate(nums = [2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2]) == 10\n assert candidate(nums = [10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10]) == 30\n assert candidate(nums = [3, 5, 100, 1, 1, 1, 1, 1, 100, 1, 1, 5, 3]) == 210\n assert candidate(nums = [8, 2, 8, 10, 6, 5, 1, 9, 3, 7, 4, 2, 5]) == 44\n", "comparison": "exact"}, "public_tests": ["[1,2,3,1]", "[2,7,9,3,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().rob", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:47+00:00", "tests_total": 117, "tests_dropped": 7, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def rob(nums)", "container": null, "callable": "rob", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 200, "task_id": "number-of-islands", "difficulty": "Medium", "problem_description": "Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.\n\nAn island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.\n\nExample 1:\n\nInput: grid = [\n [\"1\",\"1\",\"1\",\"1\",\"0\"],\n [\"1\",\"1\",\"0\",\"1\",\"0\"],\n [\"1\",\"1\",\"0\",\"0\",\"0\"],\n [\"0\",\"0\",\"0\",\"0\",\"0\"]\n]\nOutput: 1\n\nExample 2:\n\nInput: grid = [\n [\"1\",\"1\",\"0\",\"0\",\"0\"],\n [\"1\",\"1\",\"0\",\"0\",\"0\"],\n [\"0\",\"0\",\"1\",\"0\",\"0\"],\n [\"0\",\"0\",\"0\",\"1\",\"1\"]\n]\nOutput: 3\n\nConstraints:\n\n- m == grid.length\n- n == grid[i].length\n- 1 <= m, n <= 300\n- grid[i][j] is '0' or '1'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(grid = [['1', '1', '1', '1', '0'], ['1', '1', '0', '1', '0'], ['1', '1', '0', '0', '0'], ['0', '0', '0', '0', '0']]) == 1\n assert candidate(grid = [['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0']]) == 0\n assert candidate(grid = [['1', '1', '0', '0', '0'], ['1', '1', '0', '0', '0'], ['0', '0', '1', '0', '0'], ['0', '0', '0', '1', '1']]) == 3\n assert candidate(grid = [['1', '1', '1'], ['0', '0', '0'], ['1', '1', '1']]) == 2\n assert candidate(grid = [['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0']]) == 10\n assert candidate(grid = [['1', '1', '1', '0', '0', '0'], ['0', '0', '0', '1', '1', '0'], ['1', '0', '1', '0', '0', '1'], ['0', '1', '0', '1', '0', '1'], ['0', '0', '1', '1', '1', '0']]) == 7\n assert candidate(grid = [['1', '0', '0', '0', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '1', '1', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '0'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '0'], ['0', '1', '1', '0', '0', '1', '1', '0', '0', '1']]) == 6\n assert candidate(grid = [['1', '0', '0', '1', '0', '0', '1', '0', '0', '1'], ['0', '1', '1', '0', '1', '1', '0', '1', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '1', '0', '1', '1', '0', '1', '1', '0'], ['1', '0', '0', '1', '0', '0', '1', '0', '0', '1']]) == 28\n assert candidate(grid = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '1', '1', '1', '0', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '0', '1']]) == 1\n assert candidate(grid = [['1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0']]) == 18\n assert candidate(grid = [['1', '1', '0', '0', '0', '0', '0'], ['0', '1', '0', '0', '1', '1', '0'], ['0', '0', '1', '1', '0', '0', '1'], ['0', '0', '0', '0', '1', '1', '0'], ['1', '0', '1', '0', '1', '0', '1'], ['1', '1', '0', '0', '1', '0', '1']]) == 8\n assert candidate(grid = [['1', '1', '0', '0', '0', '0', '1'], ['1', '1', '0', '0', '1', '0', '1'], ['0', '0', '0', '0', '1', '0', '1'], ['0', '0', '1', '1', '1', '0', '0'], ['0', '0', '0', '0', '0', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '1', '0', '0', '1'], ['1', '0', '0', '1', '0', '0', '1'], ['1', '1', '1', '1', '0', '0', '1'], ['0', '0', '0', '0', '1', '1', '1'], ['0', '0', '1', '0', '1', '1', '0'], ['0', '0', '0', '0', '1', '1', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '1', '0', '0', '0', '1', '1', '1'], ['1', '1', '0', '1', '0', '0', '0', '1', '0', '1'], ['1', '1', '0', '0', '0', '0', '0', '0', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1', '0', '0', '0', '0', '0'], ['1', '0', '0', '0', '1', '0', '0', '0', '1', '1'], ['1', '0', '0', '1', '0', '0', '0', '1', '0', '1']]) == 6\n assert candidate(grid = [['1', '1', '1', '0', '0', '1', '1'], ['1', '0', '1', '0', '0', '1', '0'], ['1', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '1', '1', '0', '0'], ['0', '0', '0', '1', '1', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '0', '0', '1'], ['1', '0', '0', '1', '1'], ['0', '0', '1', '0', '0'], ['1', '1', '0', '0', '1']]) == 5\n assert candidate(grid = [['1', '1', '1', '0', '0'], ['0', '0', '0', '0', '0'], ['1', '1', '1', '0', '0'], ['0', '0', '0', '1', '1']]) == 3\n assert candidate(grid = [['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1']]) == 10\n assert candidate(grid = [['1', '1', '1', '0', '0', '0', '1', '0', '0', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '1', '0'], ['0', '1', '1', '0', '1', '1', '0', '0', '0', '1', '1'], ['0', '0', '0', '1', '0', '1', '0', '1', '0', '1', '1'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '0', '1'], ['0', '1', '1', '0', '1', '0', '1', '1', '0', '1', '0'], ['1', '0', '1', '1', '1', '1', '1', '0', '1', '1', '0'], ['0', '1', '1', '1', '0', '0', '0', '1', '0', '0', '0'], ['1', '0', '1', '1', '0', '0', '0', '0', '1', '1', '0'], ['1', '1', '0', '0', '1', '1', '1', '0', '0', '1', '1']]) == 14\n assert candidate(grid = [['1', '0', '1', '1', '1', '0', '1', '1', '0', '0'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '1', '0', '1', '0', '1', '1', '1', '0'], ['0', '0', '0', '0', '0', '0', '1', '0', '1', '1'], ['1', '1', '1', '0', '1', '0', '0', '0', '0', '0'], ['1', '1', '1', '0', '0', '1', '0', '0', '1', '0']]) == 10\n assert candidate(grid = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '0', '1'], ['1', '0', '1', '0', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(grid = [['1', '1', '1', '1', '0', '0', '0'], ['0', '0', '0', '1', '0', '0', '0'], ['1', '1', '0', '1', '0', '1', '1'], ['1', '1', '0', '1', '0', '1', '1'], ['0', '0', '0', '0', '0', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 2\n assert candidate(grid = [['1', '1', '1', '1', '1', '0', '0', '0', '0'], ['1', '0', '0', '1', '1', '0', '0', '0', '0'], ['1', '0', '0', '0', '0', '0', '1', '1', '0'], ['0', '0', '0', '0', '0', '0', '1', '1', '0'], ['0', '1', '1', '0', '0', '0', '0', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '1', '1', '1', '1', '0', '0'], ['0', '0', '0', '0', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '1', '1', '0', '0', '0', '0']]) == 5\n assert candidate(grid = [['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '1', '1', '1', '1', '0', '1', '1', '1', '1', '0', '1', '1', '1', '0'], ['0', '1', '0', '0', '1', '0', '1', '0', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '0', '1', '0', '1', '0', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '1', '1', '1', '0', '1', '1', '1', '1', '0', '1', '1', '1', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '0', '0', '0', '1', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '0', '0'], ['1', '1', '1', '0', '0', '0', '1', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '0', '0'], ['1', '1', '1', '0', '0', '0', '1', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '0', '0'], ['0', '0', '0', '1', '1', '0', '0', '0', '0', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '1', '1', '0', '0', '0', '0', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 9\n assert candidate(grid = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 2\n assert candidate(grid = [['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1']]) == 42\n assert candidate(grid = [['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1']]) == 25\n assert candidate(grid = [['1', '1', '1', '0', '0'], ['0', '1', '0', '1', '1'], ['1', '0', '1', '1', '0'], ['0', '0', '0', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '0', '0', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '1', '1', '1', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '0', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '1', '1', '0', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 2\n assert candidate(grid = [['1', '1', '1', '0', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '1', '1', '0', '1', '1', '1', '0', '1'], ['0', '1', '0', '0', '1', '0', '0', '1', '0'], ['1', '0', '1', '1', '1', '1', '1', '0', '1']]) == 6\n assert candidate(grid = [['1', '1', '1', '0', '1', '1', '0', '0', '0', '0'], ['1', '0', '1', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '0', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '0', '1', '1', '0', '1', '1', '0'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '0']]) == 4\n assert candidate(grid = [['1', '0', '0', '0', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '1', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '1', '1', '1', '0', '0', '0', '0', '0'], ['0', '0', '1', '0', '1', '0', '0', '0', '0', '0'], ['0', '0', '1', '1', '1', '0', '0', '0', '0', '0']]) == 4\n assert candidate(grid = [['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '1', '1', '0', '1', '1', '0', '1', '1', '0'], ['0', '1', '1', '0', '1', '1', '0', '1', '1', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '1', '1', '0', '1', '1', '0', '1'], ['1', '1', '0', '1', '1', '0', '1', '1', '0', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 7\n assert candidate(grid = [['1', '1', '0', '0', '1', '0', '0', '1', '1'], ['0', '1', '0', '0', '0', '0', '0', '1', '1'], ['1', '1', '0', '0', '1', '1', '1', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1']]) == 9\n assert candidate(grid = [['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '1', '1', '1', '0', '1', '1', '1', '0', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '0'], ['0', '1', '1', '1', '0', '1', '1', '1', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '0', '0', '0', '0', '0', '1', '1'], ['1', '0', '1', '0', '0', '0', '0', '0', '1', '1'], ['1', '1', '1', '0', '0', '0', '0', '0', '1', '1']]) == 4\n assert candidate(grid = [['1', '1', '1', '1', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '1', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 1\n assert candidate(grid = [['1', '1', '1', '0', '1', '1', '1', '0', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '0', '1', '1', '1', '0', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '1', '0', '1', '1', '1', '0', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 9\n assert candidate(grid = [['1', '1', '1', '0', '0', '0', '1', '1', '1'], ['1', '0', '1', '0', '0', '0', '1', '0', '1'], ['1', '1', '1', '0', '0', '0', '1', '1', '1'], ['0', '0', '0', '1', '1', '1', '0', '0', '0'], ['1', '1', '1', '1', '0', '1', '1', '1', '1']]) == 3\n assert candidate(grid = [['1', '1', '1', '0', '0', '0', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '1', '0'], ['0', '1', '1', '0', '1', '1', '0', '0', '0', '1', '1'], ['0', '0', '0', '1', '0', '1', '0', '1', '0', '1', '1'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '0', '1'], ['0', '1', '1', '0', '1', '0', '1', '1', '0', '1', '0']]) == 10\n assert candidate(grid = [['1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0'], ['1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0', '1', '1', '0', '0']]) == 15\n assert candidate(grid = [['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '1', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1']]) == 2\n assert candidate(grid = [['1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0'], ['1', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '1', '0', '0', '0'], ['0', '0', '0', '1', '0', '0', '0', '1', '0', '0', '0', '0', '0', '1', '0'], ['0', '0', '0', '1', '0', '0', '0', '1', '0', '0', '0', '0', '0', '1', '0'], ['0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '0', '1', '1', '1', '0', '1', '1', '1', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1']]) == 9\n assert candidate(grid = [['1', '0', '0', '1', '1'], ['1', '0', '0', '1', '0'], ['0', '0', '0', '0', '0'], ['1', '1', '0', '0', '1']]) == 4\n assert candidate(grid = [['1', '1', '0', '0', '0'], ['1', '1', '0', '0', '0'], ['0', '0', '1', '1', '1'], ['1', '1', '1', '0', '0'], ['0', '0', '0', '1', '1']]) == 3\n assert candidate(grid = [['1', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 54\n assert candidate(grid = [['1', '0', '0', '0', '1', '1', '1', '1'], ['1', '1', '0', '0', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0', '0', '0'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1']]) == 18\n assert candidate(grid = [['1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '1', '1', '1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '1', '0'], ['1', '0', '0', '1', '0'], ['1', '0', '0', '0', '0'], ['0', '1', '1', '1', '0']]) == 2\n assert candidate(grid = [['0', '1', '0', '0', '0', '0', '0', '0', '0', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0']]) == 26\n assert candidate(grid = [['1', '1', '1', '0', '1', '1'], ['1', '0', '0', '0', '1', '0'], ['1', '0', '1', '0', '0', '1'], ['0', '0', '0', '0', '0', '0'], ['1', '1', '0', '1', '1', '1']]) == 6\n assert candidate(grid = [['1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 2\n assert candidate(grid = [['1', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '1', '0', '0', '0', '1', '1'], ['0', '0', '0', '0', '1', '1', '1', '1', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0']]) == 2\n assert candidate(grid = [['0', '0', '1', '0', '0', '1', '0', '0', '1', '0'], ['0', '0', '1', '0', '0', '1', '0', '0', '1', '0'], ['0', '0', '1', '0', '0', '1', '0', '0', '1', '0'], ['0', '0', '1', '0', '0', '1', '0', '0', '1', '0'], ['0', '0', '1', '0', '0', '1', '0', '0', '1', '0']]) == 3\n assert candidate(grid = [['1', '1', '1', '1', '1', '0', '0', '0', '0', '0'], ['1', '0', '0', '0', '1', '0', '0', '0', '0', '0'], ['1', '0', '0', '0', '1', '0', '0', '0', '0', '0'], ['1', '0', '0', '0', '1', '0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1', '0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '1', '0', '0', '1', '1'], ['0', '0', '0', '0', '0', '1', '1', '1', '1', '1']]) == 2\n assert candidate(grid = [['1', '1', '1', '0', '0'], ['1', '0', '0', '1', '0'], ['1', '0', '0', '1', '0'], ['0', '1', '1', '0', '0'], ['0', '0', '0', '0', '1']]) == 4\n assert candidate(grid = [['1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1', '0', '1']]) == 32\n", "comparison": "exact"}, "public_tests": ["[[\"1\",\"1\",\"1\",\"1\",\"0\"],[\"1\",\"1\",\"0\",\"1\",\"0\"],[\"1\",\"1\",\"0\",\"0\",\"0\"],[\"0\",\"0\",\"0\",\"0\",\"0\"]]", "[[\"1\",\"1\",\"0\",\"0\",\"0\"],[\"1\",\"1\",\"0\",\"0\",\"0\"],[\"0\",\"0\",\"1\",\"0\",\"0\"],[\"0\",\"0\",\"0\",\"1\",\"1\"]]"], "hints": [], "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().numIslands", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:51+00:00", "tests_total": 59, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "union-find", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def num_islands(grid)", "container": null, "callable": "num_islands", "parameters": [{"name": "grid", "type": "Character[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 201, "task_id": "bitwise-and-of-numbers-range", "difficulty": "Medium", "problem_description": "Given two integers left and right that represent the range [left, right], return the bitwise AND of all numbers in this range, inclusive.\n\nExample 1:\n\nInput: left = 5, right = 7\nOutput: 4\n\nExample 2:\n\nInput: left = 0, right = 0\nOutput: 0\n\nExample 3:\n\nInput: left = 1, right = 2147483647\nOutput: 0\n\nConstraints:\n\n- 0 <= left <= right <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(left = 5,right = 7) == 4\n assert candidate(left = 100,right = 105) == 96\n assert candidate(left = 16,right = 31) == 16\n assert candidate(left = 123456,right = 654321) == 0\n assert candidate(left = 8,right = 12) == 8\n assert candidate(left = 0,right = 0) == 0\n assert candidate(left = 33,right = 35) == 32\n assert candidate(left = 1,right = 1) == 1\n assert candidate(left = 1,right = 2147483647) == 0\n assert candidate(left = 8,right = 8) == 8\n assert candidate(left = 10,right = 15) == 8\n assert candidate(left = 100,right = 200) == 0\n assert candidate(left = 4194304,right = 4194305) == 4194304\n assert candidate(left = 1000000,right = 1000010) == 1000000\n assert candidate(left = 4095,right = 8191) == 0\n assert candidate(left = 8388608,right = 8388608) == 8388608\n assert candidate(left = 134217728,right = 134217729) == 134217728\n assert candidate(left = 536870912,right = 536870913) == 536870912\n assert candidate(left = 32768,right = 32769) == 32768\n assert candidate(left = 32,right = 33) == 32\n assert candidate(left = 1024,right = 2047) == 1024\n assert candidate(left = 1,right = 1073741824) == 0\n assert candidate(left = 16777215,right = 16777216) == 0\n assert candidate(left = 1000000000,right = 1000000100) == 1000000000\n assert candidate(left = 512,right = 1023) == 512\n assert candidate(left = 100000000,right = 200000000) == 0\n assert candidate(left = 65536,right = 131071) == 65536\n assert candidate(left = 123456,right = 123458) == 123456\n assert candidate(left = 1,right = 3) == 0\n assert candidate(left = 1024,right = 1025) == 1024\n assert candidate(left = 131072,right = 131073) == 131072\n assert candidate(left = 1073741824,right = 1073741825) == 1073741824\n assert candidate(left = 536870912,right = 1073741823) == 536870912\n assert candidate(left = 1,right = 10) == 0\n assert candidate(left = 16384,right = 32767) == 16384\n assert candidate(left = 512,right = 513) == 512\n assert candidate(left = 32768,right = 65535) == 32768\n assert candidate(left = 16384,right = 16385) == 16384\n assert candidate(left = 67108864,right = 67108865) == 67108864\n assert candidate(left = 256,right = 257) == 256\n assert candidate(left = 64,right = 65) == 64\n assert candidate(left = 262144,right = 262145) == 262144\n assert candidate(left = 2097152,right = 2097153) == 2097152\n assert candidate(left = 16,right = 17) == 16\n assert candidate(left = 536870912,right = 536870919) == 536870912\n assert candidate(left = 16777216,right = 33554431) == 16777216\n assert candidate(left = 2048,right = 2049) == 2048\n assert candidate(left = 512,right = 768) == 512\n assert candidate(left = 2147483644,right = 2147483647) == 2147483644\n assert candidate(left = 1000000,right = 1000100) == 999936\n assert candidate(left = 500000000,right = 500000100) == 500000000\n assert candidate(left = 4096,right = 4096) == 4096\n assert candidate(left = 1048576,right = 1048577) == 1048576\n assert candidate(left = 33554432,right = 33554433) == 33554432\n assert candidate(left = 1073741824,right = 2147483647) == 1073741824\n assert candidate(left = 4,right = 7) == 4\n assert candidate(left = 2147483646,right = 2147483647) == 2147483646\n assert candidate(left = 1,right = 1000) == 0\n assert candidate(left = 16777216,right = 16777217) == 16777216\n assert candidate(left = 268435456,right = 268435457) == 268435456\n assert candidate(left = 32,right = 63) == 32\n assert candidate(left = 524288,right = 524289) == 524288\n assert candidate(left = 256,right = 511) == 256\n assert candidate(left = 1023,right = 1024) == 0\n assert candidate(left = 8192,right = 8193) == 8192\n assert candidate(left = 2147483645,right = 2147483647) == 2147483644\n assert candidate(left = 512,right = 1024) == 0\n assert candidate(left = 268435456,right = 268435460) == 268435456\n assert candidate(left = 1073741824,right = 1073741827) == 1073741824\n assert candidate(left = 130,right = 135) == 128\n assert candidate(left = 8388608,right = 8388609) == 8388608\n assert candidate(left = 134217728,right = 268435455) == 134217728\n assert candidate(left = 1024,right = 2048) == 0\n assert candidate(left = 50,right = 100) == 0\n assert candidate(left = 33554432,right = 67108863) == 33554432\n assert candidate(left = 100000,right = 100099) == 99840\n assert candidate(left = 1048576,right = 2097151) == 1048576\n assert candidate(left = 268435456,right = 536870911) == 268435456\n assert candidate(left = 4096,right = 4097) == 4096\n assert candidate(left = 16777215,right = 16777219) == 0\n assert candidate(left = 16777215,right = 16777215) == 16777215\n assert candidate(left = 123456,right = 123479) == 123456\n assert candidate(left = 33554431,right = 33554432) == 0\n assert candidate(left = 65536,right = 65537) == 65536\n assert candidate(left = 8,right = 15) == 8\n assert candidate(left = 8191,right = 8192) == 0\n assert candidate(left = 1048576,right = 1049087) == 1048576\n assert candidate(left = 1048576,right = 1048580) == 1048576\n assert candidate(left = 500000000,right = 1000000000) == 0\n assert candidate(left = 2,right = 3) == 2\n assert candidate(left = 1023,right = 2047) == 0\n assert candidate(left = 128,right = 128) == 128\n assert candidate(left = 123456,right = 123500) == 123456\n assert candidate(left = 128,right = 255) == 128\n assert candidate(left = 1,right = 1000000000) == 0\n assert candidate(left = 128,right = 129) == 128\n assert candidate(left = 16777216,right = 16777232) == 16777216\n", "comparison": "exact"}, "public_tests": ["5\n7", "0\n0", "1\n2147483647"], "hints": [], "metadata": {"canonical_parameter_names": ["left", "right"], "leetcode_dataset_entry_point": "Solution().rangeBitwiseAnd", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:53+00:00", "tests_total": 97, "tests_dropped": 0, "flags": [], "topic_tags": ["bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def range_bitwise_and(left, right)", "container": null, "callable": "range_bitwise_and", "parameters": [{"name": "left", "type": "Integer"}, {"name": "right", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 202, "task_id": "happy-number", "difficulty": "Easy", "problem_description": "Write an algorithm to determine if a number n is happy.\n\nA happy number is a number defined by the following process:\n\n- Starting with any positive integer, replace the number by the sum of the squares of its digits.\n- Repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1.\n- Those numbers for which this process ends in 1 are happy.\n\nReturn true if n is a happy number, and false if not.\n\nExample 1:\n\nInput: n = 19\nOutput: true\nExplanation:\n1^2 + 9^2 = 82\n8^2 + 2^2 = 68\n6^2 + 8^2 = 100\n1^2 + 0^2 + 0^2 = 1\n\nExample 2:\n\nInput: n = 2\nOutput: false\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 100) == True\n assert candidate(n = 4) == False\n assert candidate(n = 20) == False\n assert candidate(n = 2) == False\n assert candidate(n = 1111111) == True\n assert candidate(n = 19) == True\n assert candidate(n = 1) == True\n assert candidate(n = 1000000000) == True\n assert candidate(n = 7) == True\n assert candidate(n = 489) == False\n assert candidate(n = 789789789) == False\n assert candidate(n = 130) == True\n assert candidate(n = 49) == True\n assert candidate(n = 2147483647) == False\n assert candidate(n = 32442) == True\n assert candidate(n = 324) == False\n assert candidate(n = 203) == True\n assert candidate(n = 82) == True\n assert candidate(n = 70) == True\n assert candidate(n = 2736895) == False\n assert candidate(n = 1000) == True\n assert candidate(n = 44) == True\n assert candidate(n = 190) == True\n assert candidate(n = 58) == False\n assert candidate(n = 28) == True\n assert candidate(n = 289) == False\n assert candidate(n = 444444444) == False\n assert candidate(n = 14659) == False\n assert candidate(n = 6892) == False\n assert candidate(n = 145) == False\n assert candidate(n = 14657) == False\n assert candidate(n = 10000) == True\n assert candidate(n = 23) == True\n assert candidate(n = 784) == True\n assert candidate(n = 133) == True\n assert candidate(n = 999) == False\n assert candidate(n = 89) == False\n assert candidate(n = 9474) == False\n assert candidate(n = 111111111) == False\n assert candidate(n = 404) == True\n assert candidate(n = 442) == False\n assert candidate(n = 987654321) == False\n assert candidate(n = 1234567890) == False\n assert candidate(n = 139) == True\n assert candidate(n = 1000000007) == False\n assert candidate(n = 13441) == False\n assert candidate(n = 200) == False\n assert candidate(n = 3249) == False\n assert candidate(n = 123456789) == False\n assert candidate(n = 370) == False\n assert candidate(n = 789999) == False\n assert candidate(n = 1111111111) == True\n assert candidate(n = 100000000) == True\n", "comparison": "exact"}, "public_tests": ["19", "2"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isHappy", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:41:56+00:00", "tests_total": 55, "tests_dropped": 2, "flags": [], "topic_tags": ["hash-table", "math", "two-pointers", "floyds-cycle-finding-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def is_happy(n)", "container": null, "callable": "is_happy", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 204, "task_id": "count-primes", "difficulty": "Medium", "problem_description": "Given an integer n, return the number of prime numbers that are strictly less than n.\n\nExample 1:\n\nInput: n = 10\nOutput: 4\nExplanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.\n\nExample 2:\n\nInput: n = 0\nOutput: 0\n\nExample 3:\n\nInput: n = 1\nOutput: 0\n\nConstraints:\n\n- 0 <= n <= 5 * 10^6\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 0\n assert candidate(n = 5000000) == 348513\n assert candidate(n = 1000) == 168\n assert candidate(n = 100) == 25\n assert candidate(n = 30) == 10\n assert candidate(n = 1500000) == 114155\n assert candidate(n = 1000000) == 78498\n assert candidate(n = 20) == 8\n assert candidate(n = 2) == 0\n assert candidate(n = 1) == 0\n assert candidate(n = 50) == 15\n assert candidate(n = 10) == 4\n assert candidate(n = 5) == 2\n assert candidate(n = 3) == 1\n assert candidate(n = 4999999) == 348512\n assert candidate(n = 10000) == 1229\n assert candidate(n = 17) == 6\n assert candidate(n = 2000000) == 148933\n assert candidate(n = 4000000) == 283146\n assert candidate(n = 3141592) == 226277\n assert candidate(n = 499979) == 41537\n assert candidate(n = 18) == 7\n assert candidate(n = 5000) == 669\n assert candidate(n = 999983) == 78497\n assert candidate(n = 3000000) == 216816\n assert candidate(n = 789654) == 63183\n assert candidate(n = 31337) == 3378\n assert candidate(n = 104729) == 9999\n assert candidate(n = 500000) == 41538\n assert candidate(n = 1234567) == 95360\n", "comparison": "exact"}, "public_tests": ["10", "0", "1"], "hints": ["Checking all the integers in the range [1, n - 1] is not efficient. Think about a better approach.", "Since most of the numbers are not primes, we need a fast approach to exclude the non-prime integers.", "Use Sieve of Eratosthenes."], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countPrimes", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:00+00:00", "tests_total": 33, "tests_dropped": 3, "flags": [], "topic_tags": ["array", "math", "enumeration", "number-theory", "primality-test", "sieve-theory", "prime-number-sieve"]}, "language": "ruby", "interface": {"raw_signature": "def count_primes(n)", "container": null, "callable": "count_primes", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 205, "task_id": "isomorphic-strings", "difficulty": "Easy", "problem_description": "Given two strings s and t, determine if they are isomorphic.\n\nTwo strings s and t are isomorphic if the characters in s can be replaced to get t.\n\nAll occurrences of a character must be replaced with another character while preserving the order of characters. No two characters may map to the same character, but a character may map to itself.\n\nExample 1:\n\nInput: s = \"egg\", t = \"add\"\nOutput: true\nExplanation:\nThe strings s and t can be made identical by:\n- Mapping 'e' to 'a'.\n- Mapping 'g' to 'd'.\n\nExample 2:\n\nInput: s = \"f11\", t = \"b23\"\nOutput: false\nExplanation:\nThe strings s and t can not be made identical as '1' needs to be mapped to both '2' and '3'.\n\nExample 3:\n\nInput: s = \"paper\", t = \"title\"\nOutput: true\n\nConstraints:\n\n- 1 <= s.length <= 5 * 10^4\n- t.length == s.length\n- s and t consist of any valid ascii character.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"hello\",t = \"world\") == False\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"zyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s = \"paper\",t = \"title\") == True\n assert candidate(s = \"#a@C\",t = \"%b$D\") == True\n assert candidate(s = \"1234567890\",t = \"0987654321\") == True\n assert candidate(s = \"aaaa\",t = \"bbbb\") == True\n assert candidate(s = \"123\",t = \"456\") == True\n assert candidate(s = \"13\",t = \"42\") == True\n assert candidate(s = \"egg\",t = \"add\") == True\n assert candidate(s = \"test\",t = \"tets\") == False\n assert candidate(s = \"foo\",t = \"bar\") == False\n assert candidate(s = \"badc\",t = \"baba\") == False\n assert candidate(s = \"abba\",t = \"abba\") == True\n assert candidate(s = \"a\",t = \"a\") == True\n assert candidate(s = \"abcd\",t = \"dcba\") == True\n assert candidate(s = \"ab\",t = \"aa\") == False\n assert candidate(s = \"abcdefghijabcdefghij\",t = \"zyxwvutsrqzyxwvutsrq\") == True\n assert candidate(s = \"testcase\",t = \"tattldce\") == False\n assert candidate(s = \"thisisatest\",t = \"qdpdqpdafqd\") == False\n assert candidate(s = \"123456\",t = \"654321\") == True\n assert candidate(s = \"hello world\",t = \"uifsf ftuqi\") == False\n assert candidate(s = \"aba\",t = \"cdc\") == True\n assert candidate(s = \"xyzzzzzzzzzyxzzzzzzzxy\",t = \"yxqqqqqqqqqyxqqqqqqqyx\") == False\n assert candidate(s = \"aabb\",t = \"cccc\") == False\n assert candidate(s = \"abracadabra\",t = \"xyxzyzyxzyx\") == False\n assert candidate(s = \"aaaaa\",t = \"bbbbb\") == True\n assert candidate(s = \"abcdeabcde\",t = \"fghijfghij\") == True\n assert candidate(s = \"abcdefg\",t = \"gfedcba\") == True\n assert candidate(s = \"a\",t = \"z\") == True\n assert candidate(s = \"abacaba\",t = \"xyzxzyx\") == False\n assert candidate(s = \"abcdabcdabcd\",t = \"wxyzwxyzwxyz\") == True\n assert candidate(s = \"mississippi\",t = \"bbccddeffgg\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhggeeffddeebbaa\") == False\n assert candidate(s = \"abcde\",t = \"edcba\") == True\n assert candidate(s = \"ababab\",t = \"xyzxyz\") == False\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == False\n assert candidate(s = \"ababababab\",t = \"cdcdcdcdcd\") == True\n assert candidate(s = \"randomstring\",t = \"stringrandom\") == False\n assert candidate(s = \"mississippi\",t = \"hhlllppppss\") == False\n assert candidate(s = \"aabbccddeeffgg\",t = \"zzxxccvvnngghh\") == True\n assert candidate(s = \"repeatedcharacters\",t = \"substitutedletters\") == False\n assert candidate(s = \"aabbcc\",t = \"ddeeff\") == True\n assert candidate(s = \"abcdefghijkabcdefghijkabcdefghijkabcdefghijk\",t = \"abcdefghijkabcdefghijkabcdefghijkabcdefghijk\") == True\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"bcdefghijklmnopqrstuvwxyza\") == True\n assert candidate(s = \"sos\",t = \"non\") == True\n assert candidate(s = \"rat\",t = \"car\") == True\n assert candidate(s = \"abc\",t = \"zyx\") == True\n assert candidate(s = \"isomorphic\",t = \"esomoprphc\") == False\n assert candidate(s = \"aaabbbccc\",t = \"xxxyyyzzz\") == True\n assert candidate(s = \"abcdefghij\",t = \"jihgfedcba\") == True\n assert candidate(s = \"aaaaaa\",t = \"bbbbbb\") == True\n assert candidate(s = \"xyxxyxyxyx\",t = \"xyxyyxyxyx\") == False\n assert candidate(s = \"aaaabbbbccccdddd\",t = \"ddddccccbbbbaaaa\") == True\n assert candidate(s = \"abcabcabc\",t = \"xyzxyzxyz\") == True\n assert candidate(s = \"hellohello\",t = \"worldworld\") == False\n assert candidate(s = \"12345\",t = \"54321\") == True\n assert candidate(s = \"123123123\",t = \"abcabcabc\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhggeeffdccbbbaa\") == False\n assert candidate(s = \"1234567890\",t = \"!@#$%^&*()\") == True\n assert candidate(s = \"xyzzxyzz\",t = \"abccabcc\") == True\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyz\") == True\n assert candidate(s = \"thisisatest\",t = \"abccbaabcab\") == False\n assert candidate(s = \"abcdabcdabcdabcd\",t = \"dcbaabcdabcdabcd\") == False\n assert candidate(s = \"anagram\",t = \"nagaram\") == False\n assert candidate(s = \"aaaaabbbbbccccc\",t = \"bbbbbcccccaaaaa\") == True\n assert candidate(s = \"abcdabcd\",t = \"wxyzwxyz\") == True\n assert candidate(s = \"twowords\",t = \"twooorld\") == False\n assert candidate(s = \"abab\",t = \"baba\") == True\n assert candidate(s = \"thisisatest\",t = \"thisisatest\") == True\n assert candidate(s = \"unique\",t = \"unique\") == True\n assert candidate(s = \"isomorphic\",t = \"homomorphi\") == False\n assert candidate(s = \"xxxxx\",t = \"yyyyy\") == True\n assert candidate(s = \"abcabcabcabc\",t = \"xyzxyzxyzxyz\") == True\n assert candidate(s = \"sabcsabc\",t = \"tabctabc\") == True\n assert candidate(s = \"!@#$%^&*()\",t = \"()&*^%$#@!\") == True\n assert candidate(s = \"!@#$%^&*()\",t = \")(*&^%$#@!\") == True\n assert candidate(s = \"1122334455\",t = \"1122334455\") == True\n assert candidate(s = \"ab\",t = \"zy\") == True\n assert candidate(s = \"aaaaaa\",t = \"zzzzzz\") == True\n assert candidate(s = \"noon\",t = \"moon\") == False\n assert candidate(s = \"abcabcabcabc\",t = \"defdefdefdef\") == True\n assert candidate(s = \"teest\",t = \"beest\") == False\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",t = \"zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s = \"!@#$%^\",t = \"^%$#@!\") == True\n assert candidate(s = \"unique\",t = \"mapped\") == False\n assert candidate(s = \"xyxxyxyxyx\",t = \"zvzvzvzvzv\") == False\n assert candidate(s = \"abacabadabacaba\",t = \"xyxzyxzyzxzyxzy\") == False\n assert candidate(s = \"abababab\",t = \"cdcdcdcd\") == True\n assert candidate(s = \"xyxzyzyx\",t = \"qpqpqpqp\") == False\n assert candidate(s = \"abcdefghijabcdefghij\",t = \"klmnopqrstklmnopqrst\") == True\n assert candidate(s = \"elephant\",t = \"zuluqaak\") == False\n assert candidate(s = \"mississippi\",t = \"lllssssiiip\") == False\n assert candidate(s = \"abcdefghij\",t = \"abcdefghij\") == True\n", "comparison": "exact"}, "public_tests": ["\"egg\"\n\"add\"", "\"foo\"\n\"bar\"", "\"paper\"\n\"title\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().isIsomorphic", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:02+00:00", "tests_total": 131, "tests_dropped": 37, "flags": [], "topic_tags": ["hash-table", "string"]}, "language": "ruby", "interface": {"raw_signature": "def is_isomorphic(s, t)", "container": null, "callable": "is_isomorphic", "parameters": [{"name": "s", "type": "String"}, {"name": "t", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 207, "task_id": "course-schedule", "difficulty": "Medium", "problem_description": "There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [a_i, b_i] indicates that you must take course b_i first if you want to take course a_i.\n\n- For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1.\n\nReturn true if you can finish all courses. Otherwise, return false.\n\nExample 1:\n\nInput: numCourses = 2, prerequisites = [[1,0]]\nOutput: true\nExplanation: There are a total of 2 courses to take.\nTo take course 1 you should have finished course 0. So it is possible.\n\nExample 2:\n\nInput: numCourses = 2, prerequisites = [[1,0],[0,1]]\nOutput: false\nExplanation: There are a total of 2 courses to take.\nTo take course 1 you should have finished course 0, and to take course 0 you should also have finished course 1. So it is impossible.\n\nConstraints:\n\n- 1 <= numCourses <= 2000\n- 0 <= prerequisites.length <= 5000\n- prerequisites[i].length == 2\n- 0 <= a_i, b_i < numCourses\n- All the pairs prerequisites[i] are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(numCourses = 2,prerequisites = [[1, 0], [0, 1]]) == False\n assert candidate(numCourses = 5,prerequisites = [[1, 4], [2, 4], [3, 1], [3, 2]]) == True\n assert candidate(numCourses = 4,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2]]) == True\n assert candidate(numCourses = 3,prerequisites = [[1, 0], [2, 1]]) == True\n assert candidate(numCourses = 1,prerequisites = []) == True\n assert candidate(numCourses = 2,prerequisites = [[1, 0]]) == True\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [7, 4], [8, 5], [8, 6], [9, 7], [10, 7], [11, 8], [12, 8], [13, 9], [14, 10], [14, 11], [14, 12], [15, 13], [16, 13], [17, 14], [18, 15], [18, 16], [19, 17], [19, 18]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 4], [6, 4], [7, 5], [8, 5], [9, 6], [9, 7]]) == True\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 3], [5, 4], [6, 5], [7, 6], [8, 7], [8, 5]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 1], [5, 2], [6, 3]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 3], [5, 3], [6, 4], [6, 5]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [5, 2], [6, 3], [7, 3], [8, 4], [8, 5], [9, 6], [9, 7]]) == True\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [4, 8]]) == False\n assert candidate(numCourses = 6,prerequisites = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 0]]) == False\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [7, 4], [8, 5]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 2], [5, 4], [6, 4], [7, 5], [7, 6]]) == True\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [11, 5], [7, 9], [8, 10]]) == True\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [0, 19]]) == False\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [5, 4], [6, 5]]) == True\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [0, 8]]) == False\n assert candidate(numCourses = 13,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 1], [7, 1], [8, 2], [9, 2], [10, 3], [11, 3], [12, 4], [12, 5], [12, 6], [12, 7]]) == True\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 3], [6, 4], [7, 4], [8, 5], [9, 5], [10, 6], [11, 6], [12, 7], [12, 8], [13, 9], [13, 10], [14, 11], [14, 12]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [4, 6], [5, 7]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [0, 9]]) == False\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [5, 3]]) == True\n assert candidate(numCourses = 10,prerequisites = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 7], [5, 8], [6, 8], [7, 9], [8, 9]]) == True\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13]]) == True\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 4]]) == True\n assert candidate(numCourses = 10,prerequisites = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 0]]) == False\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4]]) == True\n assert candidate(numCourses = 11,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [7, 4], [8, 5], [9, 6], [10, 7], [10, 8]]) == True\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [5, 4]]) == True\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [0, 5]]) == False\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [5, 6]]) == True\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [7, 4], [8, 5], [8, 6], [9, 7], [10, 7], [11, 8], [12, 8], [13, 9], [14, 10], [14, 11], [14, 12]]) == True\n assert candidate(numCourses = 5,prerequisites = [[1, 0], [2, 1], [3, 4], [4, 3]]) == False\n assert candidate(numCourses = 20,prerequisites = [[0, 1], [0, 2], [0, 3], [0, 4], [1, 5], [1, 6], [2, 7], [2, 8], [3, 9], [3, 10], [4, 11], [4, 12], [5, 13], [5, 14], [6, 15], [6, 16], [7, 17], [8, 18], [9, 19], [10, 19], [11, 19], [12, 19], [13, 19], [14, 19], [15, 19], [16, 19], [17, 19], [18, 19]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [5, 0]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [6, 5]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [4, 3], [5, 2], [5, 3], [6, 4], [6, 5], [7, 6]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [4, 6], [5, 6]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [7, 5], [8, 6], [9, 7], [8, 9]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [0, 6]]) == False\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [11, 4], [12, 5], [13, 6], [13, 7], [14, 8], [14, 9]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [5, 6]]) == True\n assert candidate(numCourses = 7,prerequisites = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 4], [3, 5], [4, 5], [5, 6]]) == True\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [7, 4], [8, 5], [8, 6]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 0], [4, 1], [5, 2], [6, 3], [7, 3]]) == True\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [5, 2], [6, 3], [7, 3], [8, 4], [8, 5], [9, 6], [9, 7], [10, 8], [11, 8]]) == True\n assert candidate(numCourses = 10,prerequisites = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 0], [0, 3], [1, 4], [2, 5], [3, 6], [4, 7], [5, 8], [6, 9]]) == False\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [0, 7]]) == False\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [6, 7]]) == False\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [7, 4], [8, 5], [9, 6], [9, 7]]) == True\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 1], [3, 0], [4, 3], [5, 3]]) == True\n assert candidate(numCourses = 10,prerequisites = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [0, 9], [9, 1]]) == False\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [1, 9]]) == False\n assert candidate(numCourses = 15,prerequisites = [[0, 1], [0, 2], [1, 3], [1, 4], [2, 4], [3, 5], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [9, 5]]) == True\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [7, 5], [7, 6]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 3], [5, 4], [6, 5]]) == True\n assert candidate(numCourses = 10,prerequisites = [[0, 1], [1, 2], [2, 0], [3, 4], [4, 5], [5, 3], [6, 7], [7, 8], [8, 9], [9, 6]]) == False\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 6], [1, 7], [6, 4], [7, 0], [0, 5]]) == True\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [11, 5], [12, 5], [13, 6], [14, 7], [14, 8], [14, 9]]) == True\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 1], [5, 2], [6, 3], [7, 3], [8, 4], [9, 5]]) == True\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 2], [5, 4], [5, 3]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 3], [5, 4], [6, 5]]) == True\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [6, 3]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 0], [7, 6]]) == True\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 3], [6, 4], [7, 4], [8, 5], [9, 5], [10, 6], [11, 6], [12, 7], [12, 8], [13, 9], [13, 10], [14, 11], [14, 12], [15, 13], [16, 13], [17, 14], [18, 14], [19, 15], [19, 16]]) == True\n assert candidate(numCourses = 11,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [7, 4], [8, 5], [8, 6], [9, 7], [10, 7]]) == True\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [10, 5], [11, 6], [11, 7]]) == True\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [0, 8], [8, 0]]) == False\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [7, 5], [8, 6], [9, 7], [0, 8]]) == False\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [11, 5], [12, 5], [13, 6], [14, 7], [15, 7], [16, 8], [17, 8], [18, 9], [19, 9], [15, 12], [16, 13], [17, 14], [18, 15], [19, 16]]) == True\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [7, 4], [7, 5]]) == True\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 1], [3, 0], [4, 1], [5, 2], [6, 3], [7, 4], [8, 5], [9, 6], [10, 7], [11, 8], [12, 9], [13, 10], [14, 11], [14, 12]]) == True\n assert candidate(numCourses = 7,prerequisites = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 0]]) == False\n", "comparison": "exact"}, "public_tests": ["2\n[[1,0]]", "2\n[[1,0],[0,1]]"], "hints": ["This problem is equivalent to finding if a cycle exists in a directed graph. If a cycle exists, no topological ordering exists and therefore it will be impossible to take all courses.", "Topological Sort via DFS - A great tutorial explaining the basic concepts of Topological Sort.", "Topological sort could also be done via BFS."], "metadata": {"canonical_parameter_names": ["numCourses", "prerequisites"], "leetcode_dataset_entry_point": "Solution().canFinish", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:07+00:00", "tests_total": 79, "tests_dropped": 0, "flags": [], "topic_tags": ["depth-first-search", "breadth-first-search", "graph", "topological-sort", "directed-acyclic-graph"]}, "language": "ruby", "interface": {"raw_signature": "def can_finish(num_courses, prerequisites)", "container": null, "callable": "can_finish", "parameters": [{"name": "num_courses", "type": "Integer"}, {"name": "prerequisites", "type": "Integer[][]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 209, "task_id": "minimum-size-subarray-sum", "difficulty": "Medium", "problem_description": "Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no such subarray, return 0 instead.\n\nExample 1:\n\nInput: target = 7, nums = [2,3,1,2,4,3]\nOutput: 2\nExplanation: The subarray [4,3] has the minimal length under the problem constraint.\n\nExample 2:\n\nInput: target = 4, nums = [1,4,4]\nOutput: 1\n\nExample 3:\n\nInput: target = 11, nums = [1,1,1,1,1,1,1,1]\nOutput: 0\n\nConstraints:\n\n- 1 <= target <= 10^9\n- 1 <= nums.length <= 10^5\n- 1 <= nums[i] <= 10^4\n\nFollow up: If you have figured out the O(n) solution, try coding another solution of which the time complexity is O(n log(n)).\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(target = 8,nums = [1, 2, 3, 4, 5]) == 2\n assert candidate(target = 9,nums = [4, 3, 3, 2, 1]) == 3\n assert candidate(target = 11,nums = [1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(target = 100,nums = [10, 20, 30, 40, 50]) == 3\n assert candidate(target = 8,nums = [2, 2, 2, 2, 2, 2, 2, 2]) == 4\n assert candidate(target = 8,nums = [3, 4, 3, 1, 1, 1, 1, 1]) == 3\n assert candidate(target = 7,nums = [2, 3, 1, 2, 4, 3]) == 2\n assert candidate(target = 4,nums = [1, 4, 4]) == 1\n assert candidate(target = 3,nums = [1, 1, 1]) == 3\n assert candidate(target = 15,nums = [5, 5, 5, 5, 5]) == 3\n assert candidate(target = 5,nums = [2, 3, 1, 1, 1, 1, 1]) == 2\n assert candidate(target = 15,nums = [5, 1, 3, 5, 10, 7, 4, 9, 2, 8]) == 2\n assert candidate(target = 10,nums = [5, 1, 3, 5, 10, 7, 4, 9, 2, 8]) == 1\n assert candidate(target = 8,nums = [2, 3, 4, 2, 3, 4, 2, 3, 4]) == 3\n assert candidate(target = 3,nums = [1, 1, 1, 1, 1, 1, 1, 1]) == 3\n assert candidate(target = 3,nums = [1, 1, 1, 1, 1]) == 3\n assert candidate(target = 15,nums = [1, 2, 3, 4, 5]) == 5\n assert candidate(target = 6,nums = [1, 2, 3, 4, 5]) == 2\n assert candidate(target = 50,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 50\n assert candidate(target = 1,nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991]) == 1\n assert candidate(target = 15,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 1\n assert candidate(target = 3,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 3\n assert candidate(target = 100,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 6\n assert candidate(target = 1000,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 0\n assert candidate(target = 20,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(target = 5,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 5\n assert candidate(target = 55,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 3\n assert candidate(target = 250,nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 50\n assert candidate(target = 20,nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 10\n assert candidate(target = 100,nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(target = 25,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 25\n assert candidate(target = 50,nums = [10, 2, 3, 8, 5, 10, 2, 1, 3, 5, 7, 8]) == 10\n assert candidate(target = 500,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 0\n assert candidate(target = 25,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 2\n assert candidate(target = 18,nums = [1, 2, 3, 4, 5, 6, 7]) == 3\n assert candidate(target = 99,nums = [50, 25, 20, 5, 10, 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 4\n assert candidate(target = 25,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5]) == 5\n assert candidate(target = 150,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 4\n assert candidate(target = 1000,nums = [100, 200, 300, 400, 50, 60, 70, 80, 90, 10, 20, 30, 40, 50, 100, 200, 300, 400, 50, 60, 70, 80, 90, 10, 20, 30, 40, 50]) == 4\n assert candidate(target = 15,nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 5\n assert candidate(target = 200,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 8\n assert candidate(target = 100,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 4\n assert candidate(target = 25,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 4\n assert candidate(target = 30,nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 10\n assert candidate(target = 5,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(target = 10,nums = [100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(target = 120,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51]) == 3\n assert candidate(target = 42,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42]) == 1\n assert candidate(target = 23,nums = [2, 3, 1, 2, 4, 3, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(target = 100,nums = [10, 20, 30, 40, 50, 60, 70, 80, 90]) == 2\n assert candidate(target = 100,nums = [50, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]) == 4\n assert candidate(target = 12,nums = [2, 3, 1, 2, 4, 3, 5]) == 3\n assert candidate(target = 200,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(target = 5,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(target = 100,nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(target = 7,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 7\n assert candidate(target = 50,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 4\n assert candidate(target = 120,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 5\n assert candidate(target = 25,nums = [25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25]) == 1\n assert candidate(target = 500,nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(target = 5,nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 3\n assert candidate(target = 50,nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 50\n assert candidate(target = 7,nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 5\n assert candidate(target = 500,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 12\n assert candidate(target = 100,nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 1\n assert candidate(target = 45,nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 6\n assert candidate(target = 20,nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 4\n assert candidate(target = 20,nums = [5, 1, 3, 5, 2, 1, 4]) == 7\n assert candidate(target = 1000,nums = [250, 250, 250, 250]) == 4\n assert candidate(target = 40,nums = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 3\n assert candidate(target = 30,nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 6\n assert candidate(target = 120,nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50]) == 3\n", "comparison": "exact"}, "public_tests": ["7\n[2,3,1,2,4,3]", "4\n[1,4,4]", "11\n[1,1,1,1,1,1,1,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["target", "nums"], "leetcode_dataset_entry_point": "Solution().minSubArrayLen", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:09+00:00", "tests_total": 73, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-search", "sliding-window", "prefix-sum"]}, "language": "ruby", "interface": {"raw_signature": "def min_sub_array_len(target, nums)", "container": null, "callable": "min_sub_array_len", "parameters": [{"name": "target", "type": "Integer"}, {"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 210, "task_id": "course-schedule-ii", "difficulty": "Medium", "problem_description": "There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i] = [a_i, b_i] indicates that you must take course b_i first if you want to take course a_i.\n\n- For example, the pair [0, 1], indicates that to take course 0 you have to first take course 1.\n\nReturn the ordering of courses you should take to finish all courses. If there are many valid answers, return any of them. If it is impossible to finish all courses, return an empty array.\n\nExample 1:\n\nInput: numCourses = 2, prerequisites = [[1,0]]\nOutput: [0,1]\nExplanation: There are a total of 2 courses to take. To take course 1 you should have finished course 0. So the correct course order is [0,1].\n\nExample 2:\n\nInput: numCourses = 4, prerequisites = [[1,0],[2,0],[3,1],[3,2]]\nOutput: [0,2,1,3]\nExplanation: There are a total of 4 courses to take. To take course 3 you should have finished both courses 1 and 2. Both courses 1 and 2 should be taken after you finished course 0.\nSo one correct course order is [0,1,2,3]. Another correct ordering is [0,2,1,3].\n\nExample 3:\n\nInput: numCourses = 1, prerequisites = []\nOutput: [0]\n\nConstraints:\n\n- 1 <= numCourses <= 2000\n- 0 <= prerequisites.length <= numCourses * (numCourses - 1)\n- prerequisites[i].length == 2\n- 0 <= a_i, b_i < numCourses\n- a_i != b_i\n- All the pairs [a_i, b_i] are distinct.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(numCourses = 4,prerequisites = [[1, 0], [2, 0], [3, 1]]) == [0, 1, 2, 3]\n assert candidate(numCourses = 7,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2]]) == [0, 1, 2, 3, 4, 5, 6]\n assert candidate(numCourses = 5,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 3]]) == [0, 1, 2, 3, 4]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [2, 1]]) == [0, 4, 5, 1, 2, 3]\n assert candidate(numCourses = 3,prerequisites = [[0, 1], [1, 2], [2, 0]]) == []\n assert candidate(numCourses = 3,prerequisites = [[1, 0], [1, 2], [0, 1]]) == []\n assert candidate(numCourses = 3,prerequisites = [[0, 1], [0, 2], [1, 2]]) == [2, 1, 0]\n assert candidate(numCourses = 3,prerequisites = [[1, 0], [0, 1]]) == []\n assert candidate(numCourses = 5,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2]]) == [0, 4, 1, 2, 3]\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 2], [5, 3], [6, 3], [7, 4], [7, 5]]) == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(numCourses = 5,prerequisites = [[1, 4], [2, 4], [3, 1], [3, 2]]) == [0, 4, 1, 2, 3]\n assert candidate(numCourses = 4,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2]]) == [0, 1, 2, 3]\n assert candidate(numCourses = 3,prerequisites = [[1, 0], [2, 1]]) == [0, 1, 2]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 3], [5, 4]]) == [0, 1, 2, 3, 4, 5]\n assert candidate(numCourses = 1,prerequisites = []) == [0]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [5, 4]]) == [0, 1, 2, 3, 4, 5]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [5, 3]]) == [0, 1, 2, 3, 4, 5]\n assert candidate(numCourses = 2,prerequisites = [[1, 0]]) == [0, 1]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [2, 0], [3, 2], [4, 2], [5, 3], [5, 4], [6, 5], [7, 6], [8, 6]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [10, 5], [11, 6], [11, 7], [11, 8], [11, 9]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 11,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 1], [6, 1], [7, 2], [8, 2], [9, 3], [10, 3]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(numCourses = 11,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [9, 5], [10, 9]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [7, 4], [7, 5], [8, 6], [8, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [11, 4], [12, 5], [13, 5], [14, 6], [15, 6], [16, 7], [17, 7], [18, 8], [19, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [10, 5], [11, 6], [11, 7], [12, 8], [12, 9], [13, 10], [13, 11], [14, 12], [14, 13], [15, 14], [16, 14], [17, 15], [17, 16], [18, 17], [19, 18]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [5, 2], [6, 3], [7, 3], [8, 4], [8, 5], [9, 6], [9, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [7, 5], [8, 6], [9, 7], [10, 8], [11, 9], [12, 10], [13, 11], [14, 12], [15, 13], [16, 14], [17, 15], [18, 16], [19, 17], [18, 19]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18]\n assert candidate(numCourses = 11,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [8, 4], [9, 5], [9, 6], [10, 7], [10, 8], [10, 9]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 1], [5, 2], [5, 3], [6, 1], [6, 2], [6, 3], [7, 4], [7, 5], [7, 6], [8, 4], [8, 5], [8, 6]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [4, 3], [5, 4], [6, 4], [7, 5], [8, 6], [9, 7], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [0, 8]]) == []\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [11, 5], [12, 5], [13, 6], [13, 7], [14, 8], [14, 9], [14, 10], [14, 11]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 14,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 1], [6, 2], [7, 3], [8, 4], [9, 5], [10, 6], [11, 7], [12, 8], [13, 9], [13, 10], [13, 11], [13, 12]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 1], [4, 3], [5, 2], [5, 3], [6, 3], [6, 4], [7, 3], [7, 4], [7, 5], [8, 4], [8, 5], [8, 6], [9, 4], [9, 5], [9, 6], [9, 7], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [11, 4], [11, 5], [11, 6], [11, 7], [11, 8], [11, 9], [12, 5], [12, 6], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [13, 6], [13, 7], [13, 8], [13, 9], [13, 10], [13, 11], [13, 12], [14, 7], [14, 8], [14, 9], [14, 10], [14, 11], [14, 12], [14, 13], [15, 8], [15, 9], [15, 10], [15, 11], [15, 12], [15, 13], [15, 14], [16, 9], [16, 10], [16, 11], [16, 12], [16, 13], [16, 14], [16, 15], [17, 10], [17, 11], [17, 12], [17, 13], [17, 14], [17, 15], [17, 16], [18, 11], [18, 12], [18, 13], [18, 14], [18, 15], [18, 16], [18, 17], [19, 12], [19, 13], [19, 14], [19, 15], [19, 16], [19, 17], [19, 18]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [0, 9]]) == []\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 5], [8, 5], [9, 7], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [11, 4], [12, 5], [13, 6], [13, 7], [14, 8], [14, 9], [14, 10], [14, 11], [14, 12], [14, 13]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 4]]) == [0, 1, 2, 3, 4, 5]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 5], [11, 6], [10, 11]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10]\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [11, 5], [12, 5], [13, 6], [14, 6], [15, 7], [16, 7], [17, 8], [18, 8], [19, 9], [19, 10], [19, 11], [19, 12], [19, 13], [19, 14], [19, 15], [19, 16], [19, 17], [19, 18]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [4, 3], [5, 4], [6, 4], [7, 5], [7, 6], [8, 5], [8, 6], [8, 7], [9, 7], [10, 7], [10, 8], [11, 7], [11, 8], [11, 9], [11, 10], [12, 7], [12, 8], [12, 9], [12, 10], [12, 11], [13, 9], [13, 10], [13, 11], [13, 12], [14, 11], [14, 12], [14, 13]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4]]) == [0, 1, 2, 3, 4, 5]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 1], [6, 2], [7, 3], [7, 4], [8, 5], [8, 6], [9, 7], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [0, 11]]) == []\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [11, 4], [12, 5], [13, 5], [14, 6], [15, 6], [16, 7], [17, 7], [18, 8], [19, 8], [19, 16]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [11, 10]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 1], [5, 2], [5, 3], [6, 4], [6, 5], [7, 6]]) == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [1, 2], [2, 0], [3, 1], [3, 2], [4, 3], [5, 3], [6, 4], [6, 5], [7, 6], [8, 7], [9, 7], [9, 8]]) == [0, 2, 1, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 18,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 1], [5, 3], [6, 2], [6, 4], [7, 3], [7, 4], [8, 5], [8, 6], [9, 5], [9, 6], [10, 7], [10, 8], [11, 7], [11, 8], [12, 9], [12, 10], [13, 10], [13, 11], [14, 12], [14, 13], [15, 13], [16, 14], [16, 15], [17, 15], [17, 16]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]\n assert candidate(numCourses = 5,prerequisites = [[1, 0], [2, 1], [3, 1], [3, 2], [4, 2], [4, 3]]) == [0, 1, 2, 3, 4]\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [7, 4], [7, 5], [7, 6]]) == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 4], [9, 5], [9, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 3], [6, 3], [7, 4], [8, 4], [9, 7], [10, 7], [11, 8], [11, 9]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 4], [9, 6], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [5, 2], [6, 3], [7, 3], [8, 4], [9, 4], [10, 5], [11, 5], [12, 6], [13, 7], [14, 7], [13, 14]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 13]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [10, 5], [11, 6], [11, 7], [11, 8], [11, 9], [11, 10]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [9, 4], [9, 5], [9, 6], [9, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 3], [6, 3], [7, 4], [8, 5], [9, 5], [10, 6], [11, 6], [12, 7], [13, 8], [14, 9], [14, 10], [14, 11], [14, 12], [14, 13]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [10, 5], [11, 6], [11, 7], [10, 8], [10, 9], [10, 11]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [9, 5], [10, 6], [10, 7], [11, 8], [11, 9], [11, 10]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [7, 4], [8, 5], [9, 6], [7, 8]]) == [0, 1, 2, 3, 4, 5, 6, 8, 9, 7]\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 1], [5, 2], [5, 3], [6, 4], [7, 5], [7, 6]]) == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [5, 9]]) == []\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [9, 5], [10, 6], [10, 7], [11, 8], [11, 9], [12, 10], [13, 10], [14, 11], [14, 12], [14, 13]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [5, 6], [7, 8], [9, 7]]) == [0, 1, 2, 3, 4, 6, 8, 5, 7, 9]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [10, 4], [11, 4], [12, 5], [13, 5], [14, 6], [14, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [2, 1], [3, 0], [3, 1], [3, 2], [4, 0], [4, 1], [4, 2], [4, 3], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [6, 0], [6, 1], [6, 2], [6, 3], [6, 4], [6, 5], [7, 0], [7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [7, 6], [8, 0], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [9, 0], [9, 1], [9, 2], [9, 3], [9, 4], [9, 5], [9, 6], [9, 7], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 8,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [7, 5]]) == [0, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(numCourses = 13,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 2], [5, 3], [6, 4], [7, 5], [8, 6], [9, 7], [10, 8], [11, 9], [12, 10], [12, 11]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [2, 0], [3, 2], [3, 1], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 12,prerequisites = [[1, 0], [2, 1], [3, 1], [4, 2], [5, 2], [6, 3], [7, 3], [8, 6], [9, 7], [10, 8], [10, 9], [11, 10]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]\n assert candidate(numCourses = 6,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 1], [5, 2], [5, 3], [5, 4]]) == [0, 1, 2, 3, 4, 5]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 3], [5, 1], [5, 2], [5, 3], [6, 4], [7, 4], [8, 5], [9, 5], [10, 5], [11, 6], [12, 7], [13, 8], [14, 9], [14, 10], [14, 11], [14, 12], [14, 13]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [8, 3]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 20,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 1], [6, 1], [7, 1], [8, 2], [9, 2], [10, 2], [11, 3], [12, 3], [13, 4], [14, 4], [15, 5], [16, 5], [17, 6], [18, 6], [19, 7], [19, 8], [19, 9], [19, 10], [19, 11], [19, 12], [19, 13], [19, 14], [19, 15], [19, 16], [19, 17], [19, 18]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 2], [6, 3], [7, 3], [8, 4], [8, 5], [8, 6], [8, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 13,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [9, 5], [10, 6], [10, 7], [11, 8], [11, 9], [12, 10], [12, 11]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]\n assert candidate(numCourses = 15,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 3], [9, 4], [10, 4], [11, 5], [12, 5], [13, 6], [14, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [5, 2], [6, 3], [7, 3], [8, 4], [8, 5], [9, 6], [9, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 1], [5, 2], [6, 3], [6, 4], [7, 5], [8, 6], [9, 7], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 2], [5, 3], [6, 3], [7, 4], [7, 5], [8, 6], [9, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 11,prerequisites = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(numCourses = 16,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 1], [5, 2], [6, 1], [6, 3], [7, 1], [7, 4], [8, 2], [8, 3], [8, 4], [9, 2], [9, 3], [9, 4], [10, 3], [10, 4], [11, 4], [12, 5], [12, 6], [12, 7], [12, 8], [13, 5], [13, 6], [13, 7], [13, 8], [13, 9], [14, 6], [14, 7], [14, 8], [14, 9], [14, 10], [14, 11], [15, 7], [15, 8], [15, 9], [15, 10], [15, 11], [15, 12], [15, 13], [15, 14]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [3, 2], [4, 3], [5, 3], [6, 4], [6, 5], [7, 6], [8, 6], [9, 7], [9, 8]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(numCourses = 9,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 3], [8, 4], [8, 5], [8, 6], [8, 7]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 0], [4, 1], [5, 1], [6, 2], [7, 2], [8, 3], [9, 3], [4, 6], [5, 7], [8, 4], [8, 5], [9, 8]]) == [0, 1, 2, 3, 6, 7, 4, 5, 8, 9]\n assert candidate(numCourses = 10,prerequisites = [[1, 0], [2, 0], [3, 1], [4, 1], [5, 2], [6, 2], [7, 3], [8, 4], [9, 5], [9, 6]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n", "comparison": "exact"}, "public_tests": ["2\n[[1,0]]", "4\n[[1,0],[2,0],[3,1],[3,2]]", "1\n[]"], "hints": ["This problem is equivalent to finding the topological order in a directed graph. If a cycle exists, no topological ordering exists and therefore it will be impossible to take all courses.", "Topological Sort via DFS - A great video tutorial (21 minutes) on Coursera explaining the basic concepts of Topological Sort.", "Topological sort could also be done via BFS."], "metadata": {"canonical_parameter_names": ["numCourses", "prerequisites"], "leetcode_dataset_entry_point": "Solution().findOrder", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:11+00:00", "tests_total": 91, "tests_dropped": 2, "flags": ["multiple_answers"], "topic_tags": ["depth-first-search", "breadth-first-search", "graph", "topological-sort"]}, "language": "ruby", "interface": {"raw_signature": "def find_order(num_courses, prerequisites)", "container": null, "callable": "find_order", "parameters": [{"name": "num_courses", "type": "Integer"}, {"name": "prerequisites", "type": "Integer[][]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 212, "task_id": "word-search-ii", "difficulty": "Hard", "problem_description": "Given an m x n board of characters and a list of strings words, return all words on the board.\n\nEach word must be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once in a word.\n\nExample 1:\n\nInput: board = [[\"o\",\"a\",\"a\",\"n\"],[\"e\",\"t\",\"a\",\"e\"],[\"i\",\"h\",\"k\",\"r\"],[\"i\",\"f\",\"l\",\"v\"]], words = [\"oath\",\"pea\",\"eat\",\"rain\"]\nOutput: [\"eat\",\"oath\"]\n\nExample 2:\n\nInput: board = [[\"a\",\"b\"],[\"c\",\"d\"]], words = [\"abcb\"]\nOutput: []\n\nConstraints:\n\n- m == board.length\n- n == board[i].length\n- 1 <= m, n <= 12\n- board[i][j] is a lowercase English letter.\n- 1 <= words.length <= 3 * 10^4\n- 1 <= words[i].length <= 10\n- words[i] consists of lowercase English letters.\n- All the strings of words are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [['o', 'a', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain']) == ['oath', 'eat']\n assert candidate(board = [['a', 'a']],words = ['a']) == ['a']\n assert candidate(board = [['o', 'a', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain']) == ['oath', 'eat']\n assert candidate(board = [['a'], ['a']],words = ['a']) == ['a']\n assert candidate(board = [['a', 'b'], ['c', 'd']],words = ['abcb']) == []\n assert candidate(board = [['a', 'a']],words = ['aaa']) == []\n assert candidate(board = [['a']],words = ['a']) == ['a']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']],words = ['abc', 'cfi', 'beh', 'defi', 'ghi']) == ['abc', 'beh', 'cfi', 'defi', 'ghi']\n assert candidate(board = [['a', 'b'], ['c', 'd']],words = ['abcb']) == []\n assert candidate(board = [['a', 'b'], ['c', 'f']],words = ['ab', 'cf', 'bf', 'ca']) == ['ab', 'bf', 'ca', 'cf']\n assert candidate(board = [['a', 'b', 'c'], ['a', 'e', 'd'], ['a', 'f', 'g']],words = ['abcdefg', 'gfedcba', 'abcd', 'dcba']) == ['abcd', 'abcdefg', 'dcba', 'gfedcba']\n assert candidate(board = [['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a']],words = ['aaaaa', 'aaaab', 'aaaba']) == ['aaaaa']\n assert candidate(board = [['a', 'b', 'c', 'd', 'e'], ['f', 'g', 'h', 'i', 'j'], ['k', 'l', 'm', 'n', 'o'], ['p', 'q', 'r', 's', 't'], ['u', 'v', 'w', 'x', 'y']],words = ['abcdefg', 'hijklmn', 'opqrstu', 'vwxyz', 'abgmvxz', 'abcdefghi', 'pqrstuvwy']) == []\n assert candidate(board = [['a', 'b', 'c'], ['a', 'b', 'c'], ['a', 'b', 'c']],words = ['abc', 'bca', 'cab', 'cba', 'bac', 'acb', 'aabc', 'abca', 'bcab', 'cbac']) == ['abc', 'aabc', 'cba']\n assert candidate(board = [['o', 'a', 'b', 'n'], ['o', 't', 'a', 'e'], ['a', 'h', 'k', 'r'], ['a', 'f', 'l', 'v']],words = ['oath', 'path', 'parent', 'enact']) == ['oath']\n assert candidate(board = [['p', 'e', 'a', 'f'], ['t', 'h', 'o', 'w'], ['o', 'r', 'a', 'g'], ['n', 'l', 'e', 'd']],words = ['pear', 'flow', 'tow', 'orange', 'lead']) == []\n assert candidate(board = [['z', 'a', 'b', 'c'], ['z', 'e', 'f', 'g'], ['z', 'h', 'i', 'j'], ['z', 'k', 'l', 'm']],words = ['zafe', 'zjih', 'zmkl', 'zabc', 'zefg', 'zihj', 'zkjg', 'zlif', 'zzzz']) == ['zabc', 'zzzz', 'zefg']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']],words = ['abc', 'def', 'ghi', 'bfg', 'hce', 'dih']) == ['abc', 'def', 'ghi']\n assert candidate(board = [['a', 'b', 'c', 'd', 'e'], ['f', 'g', 'h', 'i', 'j'], ['k', 'l', 'm', 'n', 'o'], ['p', 'q', 'r', 's', 't'], ['u', 'v', 'w', 'x', 'y']],words = ['abcde', 'fghij', 'klmno', 'pqrst', 'uvwxy', 'ajgtw', 'bsmr']) == ['abcde', 'fghij', 'klmno', 'pqrst', 'uvwxy']\n assert candidate(board = [['c', 'c', 'c', 'c'], ['c', 'c', 'c', 'c'], ['c', 'c', 'c', 'c'], ['c', 'c', 'c', 'c']],words = ['cccc', 'cccccc', 'cccccccc']) == ['cccc', 'cccccc', 'cccccccc']\n assert candidate(board = [['p', 'z', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain', 'zeta', 'pani']) == ['eat']\n assert candidate(board = [['x', 'y', 'x'], ['y', 'x', 'y'], ['x', 'y', 'x']],words = ['xyx', 'yxy', 'xyy', 'yxx']) == ['xyx', 'yxy']\n assert candidate(board = [['o', 'a', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain', 'oathk', 'vli', 'hek', 'tae', 'rat', 'iate', 'tier', 'neif', 'heat']) == ['oath', 'oathk', 'tae', 'eat']\n assert candidate(board = [['s', 'e', 'e', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['seen', 'seat', 'heat', 'pear', 'rate', 'feat']) == ['seen']\n assert candidate(board = [['a', 'b', 'c', 'd', 'e'], ['f', 'g', 'h', 'i', 'j'], ['k', 'l', 'm', 'n', 'o'], ['p', 'q', 'r', 's', 't'], ['u', 'v', 'w', 'x', 'y']],words = ['cat', 'dog', 'bat', 'rat', 'mat']) == []\n assert candidate(board = [['o', 'a', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain', 'oate', 'hoaf']) == ['oath', 'oate', 'eat']\n assert candidate(board = [['p', 'e', 'r', 'f'], ['e', 't', 'e', 'r'], ['r', 'e', 'd', 'o'], ['f', 'o', 'x', 'o']],words = ['perfect', 'robot', 'redo', 'fire', 'fore']) == ['redo']\n assert candidate(board = [['s', 'e', 'e', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['seen', 'tear', 'heap', 'inter', 'neat', 'kite']) == ['seen', 'neat']\n assert candidate(board = [['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['m', 'n', 'o', 'p']],words = ['abcf', 'bceg', 'cfil', 'ghjo', 'klon', 'mnop']) == ['mnop']\n assert candidate(board = [['s', 'e', 'e', 'n'], ['e', 't', 'e', 'e'], ['e', 'e', 's', 'n'], ['n', 's', 't', 'e']],words = ['seen', 'nees', 'tees', 'test', 'east']) == ['seen', 'nees', 'test']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']],words = ['abc', 'bfg', 'chi', 'def', 'geh']) == ['abc', 'def']\n assert candidate(board = [['a']],words = ['a']) == ['a']\n assert candidate(board = [['x', 'y', 'x', 'y'], ['y', 'x', 'y', 'x'], ['x', 'y', 'x', 'y'], ['y', 'x', 'y', 'x']],words = ['xyxy', 'yxyx', 'xyyx', 'yxyy', 'xxyx', 'yxx', 'xyx']) == ['xyx', 'xyxy', 'yxyx']\n assert candidate(board = [['a', 'b', 'c', 'e'], ['z', 'f', 'c', 's'], ['a', 'd', 'e', 'e']],words = ['abcced', 'see', 'abce']) == ['abce', 'abcced', 'see']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i'], ['j', 'k', 'l'], ['m', 'n', 'o']],words = ['abc', 'def', 'ghi', 'jkl', 'mno', 'adg', 'beh', 'cfi', 'amk', 'bnl', 'co']) == ['abc', 'adg', 'beh', 'cfi', 'def', 'ghi', 'jkl', 'mno']\n assert candidate(board = [['o', 'a', 'b', 'n'], ['o', 't', 'a', 'e'], ['a', 'h', 'k', 'r'], ['a', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain', 'oathf', 'oat', 'ate']) == ['oat', 'oath', 'oathf', 'eat']\n assert candidate(board = [['x', 'x', 'x', 'x'], ['x', 'x', 'x', 'x'], ['x', 'x', 'x', 'x'], ['x', 'x', 'x', 'x']],words = ['xxxx', 'xxxy', 'xyxx', 'xxyx']) == ['xxxx']\n assert candidate(board = [['a', 'b', 'c'], ['a', 'e', 'd'], ['a', 'f', 'g']],words = ['abcdefg', 'bed', 'fad', 'gfedcba']) == ['abcdefg', 'bed', 'gfedcba']\n assert candidate(board = [['a', 'z', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['zath', 'zeat', 'kait', 'lain']) == []\n assert candidate(board = [['z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z']],words = ['zzz', 'zzzz', 'zzzzz']) == ['zzz', 'zzzz', 'zzzzz']\n assert candidate(board = [['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a']],words = ['aaaaa', 'aaaaaa', 'aaaaaaaa']) == ['aaaaa', 'aaaaaa', 'aaaaaaaa']\n assert candidate(board = [['o', 'a', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['oath', 'pea', 'eat', 'rain', 'kite', 'pear', 'lane']) == ['oath', 'eat']\n assert candidate(board = [['a', 'b', 'c'], ['a', 'e', 'd'], ['a', 'f', 'g']],words = ['abcdefg', 'gfedcba', 'abcd', 'efg']) == ['abcd', 'abcdefg', 'efg', 'gfedcba']\n assert candidate(board = [['a', 'b', 'c', 'e'], ['s', 'f', 'c', 's'], ['a', 'd', 'e', 'e']],words = ['abcced', 'see', 'abcb']) == ['abcced', 'see']\n assert candidate(board = [['x', 'y', 'z'], ['x', 'y', 'z'], ['x', 'y', 'z']],words = ['xyz', 'zyx', 'yy', 'zzz', 'xzy']) == ['xyz', 'yy', 'zzz', 'zyx']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']],words = ['abc', 'bcd', 'cde', 'efg', 'fgh', 'ghi', 'adg', 'beh', 'cfi']) == ['abc', 'adg', 'beh', 'cfi', 'ghi']\n assert candidate(board = [['a', 'b', 'c', 'd', 'e', 'f'], ['g', 'h', 'i', 'j', 'k', 'l'], ['m', 'n', 'o', 'p', 'q', 'r'], ['s', 't', 'u', 'v', 'w', 'x'], ['y', 'z', 'a', 'b', 'c', 'd']],words = ['abcdefghij', 'mnopqrstuv', 'wxyzabcd']) == []\n assert candidate(board = [['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a', 'a']],words = ['aaaaa', 'aaaaaa', 'aaaaaaaa', 'aaaaaaa']) == ['aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa']\n assert candidate(board = [['z', 'z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z', 'z'], ['z', 'z', 'z', 'z', 'z']],words = ['zzzzz', 'zzzzzz', 'zzzzzzz']) == ['zzzzz', 'zzzzzz', 'zzzzzzz']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']],words = ['abc', 'def', 'ghi', 'bce', 'dfi', 'hcg', 'bdf', 'cei', 'adg']) == ['abc', 'adg', 'def', 'ghi']\n assert candidate(board = [['x', 'y', 'z'], ['w', 'v', 'u'], ['t', 's', 'r'], ['q', 'p', 'o']],words = ['xyz', 'uvw', 'rst', 'qpo', 'xuw', 'ytv', 'zsr', 'wpo']) == ['xyz', 'uvw', 'rst', 'qpo']\n assert candidate(board = [['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a']],words = ['aaaaa', 'aaa', 'aa', 'a']) == ['a', 'aa', 'aaa', 'aaaaa']\n assert candidate(board = [['w', 'o', 'r', 'l'], ['o', 'n', 'k', 'n'], ['r', 'l', 'd', 't'], ['d', 't', 'a', 'e']],words = ['world', 'note', 'rate', 'tare']) == ['world']\n assert candidate(board = [['x', 'y', 'x', 'y', 'x'], ['y', 'x', 'y', 'x', 'y'], ['x', 'y', 'x', 'y', 'x'], ['y', 'x', 'y', 'x', 'y'], ['x', 'y', 'x', 'y', 'x']],words = ['xyxyx', 'yxyxy', 'xyyxy']) == ['xyxyx', 'yxyxy']\n assert candidate(board = [['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a']],words = ['aaaaaaaaaa', 'aaaaaaaab', 'aaaaaaaac']) == ['aaaaaaaaaa']\n assert candidate(board = [['s', 'e', 'e', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v']],words = ['seen', 'seat', 'near', 'tree']) == ['seen']\n assert candidate(board = [['a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a'], ['a', 'a', 'a', 'a', 'a']],words = ['aaaaa', 'aaaaab', 'aaaaac', 'aaaaad']) == ['aaaaa']\n assert candidate(board = [['p', 'e', 'a'], ['a', 'o', 't'], ['t', 'h', 't'], ['a', 'i', 'p']],words = ['peacht', 'poth', 'tophat', 'peat']) == ['peat']\n assert candidate(board = [['a', 'b', 'c'], ['a', 'e', 'd'], ['a', 'f', 'g']],words = ['abc', 'bce', 'cda', 'gfa']) == ['abc', 'gfa']\n assert candidate(board = [['m', 'y', 'b', 'a', 'b', 'y'], ['x', 'x', 'x', 'x', 'x', 'x'], ['x', 'o', 'a', 'a', 'a', 'x'], ['x', 'x', 'x', 'x', 'x', 'x'], ['m', 'y', 'b', 'a', 'b', 'y']],words = ['baby', 'my', 'by', 'ma']) == ['my', 'baby', 'by']\n assert candidate(board = [['a', 'b', 'c'], ['b', 'c', 'd'], ['c', 'd', 'e']],words = ['abc', 'bcd', 'cde', 'abcd', 'bcde', 'ab', 'cd', 'de']) == ['ab', 'abc', 'abcd', 'bcd', 'bcde', 'cd', 'cde', 'de']\n assert candidate(board = [['x', 'y', 'z', 'w'], ['x', 'y', 'z', 'w'], ['x', 'y', 'z', 'w'], ['x', 'y', 'z', 'w']],words = ['xyzz', 'xwyz', 'wxzy', 'zywx', 'zwxy', 'zyxw', 'yxwz', 'wyxz']) == ['xyzz']\n assert candidate(board = [['d', 'o', 'g'], ['d', 'o', 'g'], ['d', 'o', 'g']],words = ['dog', 'god', 'dogo', 'dogod', 'dogodu']) == ['dog', 'god']\n assert candidate(board = [['p', 'q', 'r', 's'], ['t', 'u', 'v', 'w'], ['x', 'y', 'z', 'a'], ['b', 'c', 'd', 'e']],words = ['pqrs', 'tuvw', 'xyzab', 'pqru', 'rtxy', 'styz', 'uvwz']) == ['pqrs', 'tuvw']\n assert candidate(board = [['h', 'o', 'l', 'a'], ['o', 'n', 'k', 'n'], ['r', 'l', 'd', 't'], ['d', 't', 'a', 'e']],words = ['hola', 'note', 'rode', 'taen']) == ['hola']\n assert candidate(board = [['x', 'y', 'z'], ['u', 'v', 'w'], ['p', 'q', 'r']],words = ['xyz', 'uvw', 'pqr', 'yzw', 'zwp', 'vyu']) == ['xyz', 'yzw', 'uvw', 'pqr']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i'], ['j', 'k', 'l'], ['m', 'n', 'o']],words = ['abc', 'def', 'ghi', 'jkl', 'mno', 'adgjm', 'behkn', 'cfilor', 'aeim', 'bfjn', 'cgko', 'ahko', 'bdil', 'cehn', 'aflo', 'bgkn', 'chim']) == ['abc', 'adgjm', 'behkn', 'def', 'ghi', 'jkl', 'mno']\n assert candidate(board = [['m', 'a', 'r', 't'], ['a', 't', 'e', 'n'], ['r', 'e', 't', 'a'], ['t', 'a', 'n', 'e']],words = ['mart', 'rate', 'tane', 'tart', 'ten', 'mate', 'ment', 'taen', 'meta', 'atma']) == ['mart', 'mate', 'rate', 'tart', 'ten', 'tane', 'taen']\n assert candidate(board = [['a', 'b', 'c'], ['a', 'e', 'd'], ['e', 'f', 'g']],words = ['abc', 'bce', 'fed', 'def']) == ['abc', 'def', 'fed']\n assert candidate(board = [['o', 'a', 'a', 'n'], ['e', 't', 'a', 'e'], ['i', 'h', 'k', 'r'], ['i', 'f', 'l', 'v'], ['g', 'h', 'i', 'j']],words = ['oath', 'pea', 'eat', 'rain', 'ghij', 'gfedcba', 'nihao']) == ['oath', 'eat', 'ghij']\n assert candidate(board = [['a', 'b', 'c'], ['d', 'e', 'f'], ['g', 'h', 'i']],words = ['abc', 'bfg', 'cfi', 'adh', 'beh', 'cei', 'aeg']) == ['abc', 'beh', 'cfi']\n assert candidate(board = [['p', 'e', 'a'], ['e', 'r', 'a'], ['a', 'n', 'a'], ['n', 'l', 'a']],words = ['pear', 'peal', 'pale', 'pan', 'lane', 'paler', 'panel', 'paren', 'pare', 'parel', 'parer']) == []\n", "comparison": "exact"}, "public_tests": ["[[\"o\",\"a\",\"a\",\"n\"],[\"e\",\"t\",\"a\",\"e\"],[\"i\",\"h\",\"k\",\"r\"],[\"i\",\"f\",\"l\",\"v\"]]\n[\"oath\",\"pea\",\"eat\",\"rain\"]", "[[\"a\",\"b\"],[\"c\",\"d\"]]\n[\"abcb\"]"], "hints": ["You would need to optimize your backtracking to pass the larger test. Could you stop backtracking earlier?", "If the current candidate does not exist in all words' prefix, you could stop backtracking immediately. What kind of data structure could answer such query efficiently? Does a hash table work? Why or why not? How about a Trie? If you would like to learn how to implement a basic trie, please work on this problem: Implement Trie (Prefix Tree) first."], "metadata": {"canonical_parameter_names": ["board", "words"], "leetcode_dataset_entry_point": "Solution().findWords", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:13+00:00", "tests_total": 83, "tests_dropped": 11, "flags": ["has_images"], "topic_tags": ["array", "string", "backtracking", "trie", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def find_words(board, words)", "container": null, "callable": "find_words", "parameters": [{"name": "board", "type": "Character[][]"}, {"name": "words", "type": "String[]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 213, "task_id": "house-robber-ii", "difficulty": "Medium", "problem_description": "You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have a security system connected, and it will automatically contact the police if two adjacent houses were broken into on the same night.\n\nGiven an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.\n\nExample 1:\n\nInput: nums = [2,3,2]\nOutput: 3\nExplanation: You cannot rob house 1 (money = 2) and then rob house 3 (money = 2), because they are adjacent houses.\n\nExample 2:\n\nInput: nums = [1,2,3,1]\nOutput: 4\nExplanation: Rob house 1 (money = 1) and then rob house 3 (money = 3).\nTotal amount you can rob = 1 + 3 = 4.\n\nExample 3:\n\nInput: nums = [1,2,3]\nOutput: 3\n\nConstraints:\n\n- 1 <= nums.length <= 100\n- 0 <= nums[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 1]) == 4\n assert candidate(nums = [1, 0, 1, 0, 1]) == 2\n assert candidate(nums = [5, 1, 2, 4, 7, 8]) == 14\n assert candidate(nums = [5, 3, 1, 1, 1]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 30\n assert candidate(nums = [10, 20, 30, 40, 50]) == 80\n assert candidate(nums = [300, 3, 140, 20, 10, 5, 5, 200]) == 455\n assert candidate(nums = [5, 5, 5, 5, 5]) == 10\n assert candidate(nums = [4, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 25\n assert candidate(nums = [1, 2, 3, 4, 5]) == 8\n assert candidate(nums = [2, 7, 9, 3, 1]) == 11\n assert candidate(nums = [1000]) == 1000\n assert candidate(nums = [2, 3, 2]) == 3\n assert candidate(nums = [2, 1, 1, 2]) == 3\n assert candidate(nums = [3, 6, 4, 2, 5, 7, 8]) == 19\n assert candidate(nums = [1, 1, 1, 1, 1]) == 2\n assert candidate(nums = [0]) == 0\n assert candidate(nums = [200, 3, 140, 20, 10]) == 340\n assert candidate(nums = [5, 5, 10, 100, 10, 5, 5]) == 110\n assert candidate(nums = [300, 3, 100, 4]) == 400\n assert candidate(nums = [5, 1, 1, 5]) == 6\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [1, 2, 3]) == 3\n assert candidate(nums = [10, 2, 3, 4, 5, 6]) == 18\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000]) == 7000\n assert candidate(nums = [200, 300, 150, 100, 250, 300, 200, 100, 50, 400, 350, 250]) == 1450\n assert candidate(nums = [100, 0, 100, 0, 100, 0, 100, 0, 100, 0]) == 500\n assert candidate(nums = [50, 100, 150, 200, 250, 300]) == 600\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 110\n assert candidate(nums = [500, 400, 300, 200, 100, 0, 100, 200, 300, 400, 500, 0, 500, 400, 300, 200, 100, 0, 100, 200, 300, 400, 500]) == 3300\n assert candidate(nums = [200, 100, 50, 150, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 50, 150, 200, 300, 400, 500]) == 4050\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 2550\n assert candidate(nums = [10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1, 1, 10, 1]) == 70\n assert candidate(nums = [1, 10, 100, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 10, 1]) == 3020\n assert candidate(nums = [90, 200, 200, 100, 400, 90, 200, 200, 100, 400, 90, 200, 200, 100, 400]) == 1800\n assert candidate(nums = [2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3]) == 24\n assert candidate(nums = [1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1]) == 5000\n assert candidate(nums = [5, 10, 3, 12, 8, 6, 11, 7, 14, 9]) == 47\n assert candidate(nums = [5, 2, 6, 2, 5, 2, 6, 2, 5, 2, 6, 2, 5, 2, 6]) == 39\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 63\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == 12\n assert candidate(nums = [100, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100, 100]) == 208\n assert candidate(nums = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]) == 3000\n assert candidate(nums = [25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 168\n assert candidate(nums = [100, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100]) == 109\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 240\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 35\n assert candidate(nums = [2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3]) == 84\n assert candidate(nums = [100, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 0, 0, 0, 0, 0, 0, 0, 0, 100]) == 200\n assert candidate(nums = [500, 100, 500, 100, 500, 100, 500, 100, 500, 100, 500, 100, 500]) == 3000\n assert candidate(nums = [123, 456, 789, 101, 202, 303, 404, 505, 606, 707, 808, 909]) == 3213\n assert candidate(nums = [200, 1, 100, 1, 100, 1, 200, 1, 100, 1, 100, 1]) == 800\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 500\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 63\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1000, 0, 0, 0, 0, 0, 0, 0, 0, 1000]) == 1000\n assert candidate(nums = [10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == 19\n assert candidate(nums = [800, 200, 100, 300, 600, 400, 500, 700, 50, 90]) == 2200\n assert candidate(nums = [999, 0, 999, 0, 999, 0, 999, 0, 999, 0]) == 4995\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 50\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 200\n assert candidate(nums = [50, 1, 1, 50, 1, 1, 50, 1, 1, 50, 1, 1]) == 200\n assert candidate(nums = [5, 100, 5, 100, 5, 100, 5, 100, 5, 100, 5, 100, 5, 100, 5, 100]) == 800\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 100]) == 2500\n assert candidate(nums = [200, 3, 140, 20, 10, 5, 5, 200, 150, 250, 350, 450]) == 1050\n assert candidate(nums = [1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0]) == 10000\n assert candidate(nums = [5, 10, 5, 10, 5, 10, 5]) == 30\n assert candidate(nums = [5, 1, 2, 9, 1, 5, 1, 2, 9, 1, 5, 1, 2, 9, 1, 5, 1, 2, 9, 1]) == 56\n assert candidate(nums = [10, 2, 3, 4, 1, 5, 6, 7, 8, 9, 10]) == 35\n assert candidate(nums = [9, 4, 1, 7, 3, 2, 5, 6, 8, 0, 12, 15]) == 41\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 110\n assert candidate(nums = [2, 3, 5, 6, 7, 8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 44\n assert candidate(nums = [1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100]) == 1000\n assert candidate(nums = [10, 1, 1, 1, 10, 1, 1, 1, 10, 1, 1, 1, 10, 1, 1, 1]) == 44\n assert candidate(nums = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985]) == 6951\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50]) == 140\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 50\n assert candidate(nums = [100, 0, 100, 0, 100, 0, 100]) == 300\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 190\n assert candidate(nums = [50, 1, 1, 50, 1, 1, 50, 1, 1, 50]) == 151\n assert candidate(nums = [50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1]) == 500\n assert candidate(nums = [50, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 640\n assert candidate(nums = [1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 1000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 168\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 300\n assert candidate(nums = [1, 3, 1, 3, 100, 1, 3, 1, 3, 1, 3, 100]) == 209\n assert candidate(nums = [10, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 24\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3]) == 30\n assert candidate(nums = [10, 2, 5, 3, 7, 9, 8, 10, 2, 5]) == 34\n assert candidate(nums = [200, 300, 200, 300, 200, 300, 200, 300, 200, 300, 200, 300, 200, 300, 200, 300, 200, 300, 200, 300]) == 3000\n assert candidate(nums = [50, 100, 50, 100, 50, 100, 50]) == 300\n assert candidate(nums = [100, 100, 0, 100, 0, 100, 0, 100, 0, 100]) == 500\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 50]) == 5050\n assert candidate(nums = [250, 200, 150, 100, 50, 0, 50, 100, 150, 200, 250, 0, 250, 200, 150, 100, 50, 0, 50, 100, 150, 200, 250]) == 1650\n assert candidate(nums = [1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0]) == 8000\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 110\n assert candidate(nums = [20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20]) == 200\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 630\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 500\n assert candidate(nums = [50, 1, 50, 1, 50, 1, 50, 1, 50, 1]) == 250\n assert candidate(nums = [1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000]) == 10000\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 300\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0]) == 800\n assert candidate(nums = [9, 3, 5, 7, 1, 3, 5, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 47\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 60\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 650\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [50, 100, 200, 300, 100, 50]) == 450\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250]) == 1680\n assert candidate(nums = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980, 979, 978, 977, 976, 975]) == 11856\n assert candidate(nums = [100, 0, 0, 100, 0, 0, 100, 0, 0, 100]) == 300\n assert candidate(nums = [2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3]) == 30\n assert candidate(nums = [5, 2, 3, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 52\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 300\n assert candidate(nums = [999, 1, 999, 1, 999, 1, 999, 1]) == 3996\n assert candidate(nums = [200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1, 200, 1]) == 2000\n assert candidate(nums = [999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1, 999, 1]) == 9990\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 90\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 85\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 3000\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 100\n", "comparison": "exact"}, "public_tests": ["[2,3,2]", "[1,2,3,1]", "[1,2,3]"], "hints": ["Since House[1] and House[n] are adjacent, they cannot be robbed together. Therefore, the problem becomes to rob either House[1]-House[n-1] or House[2]-House[n], depending on which choice offers more money. Now the problem has degenerated to the House Robber, which is already been solved."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().rob", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:15+00:00", "tests_total": 122, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def rob(nums)", "container": null, "callable": "rob", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 214, "task_id": "shortest-palindrome", "difficulty": "Hard", "problem_description": "You are given a string s. You can convert s to a palindrome by adding characters in front of it.\n\nReturn the shortest palindrome you can find by performing this transformation.\n\nExample 1:\n\nInput: s = \"aacecaaa\"\nOutput: \"aaacecaaa\"\n\nExample 2:\n\nInput: s = \"abcd\"\nOutput: \"dcbabcd\"\n\nConstraints:\n\n- 0 <= s.length <= 5 * 10^4\n- s consists of lowercase English letters only.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcba\") == \"abcba\"\n assert candidate(s = \"madam\") == \"madam\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == \"zyxwvutsrqponmlkjihgfedcbabcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"abac\") == \"cabac\"\n assert candidate(s = \"zxcvbnm\") == \"mnbvcxzxcvbnm\"\n assert candidate(s = \"aabbaa\") == \"aabbaa\"\n assert candidate(s = \"abcdcba\") == \"abcdcba\"\n assert candidate(s = \"aaaaa\") == \"aaaaa\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"abcabcabc\") == \"cbacbacbabcabcabc\"\n assert candidate(s = \"step\") == \"petstep\"\n assert candidate(s = \"abacdfgdcaba\") == \"abacdgfdcabacdfgdcaba\"\n assert candidate(s = \"ab\") == \"bab\"\n assert candidate(s = \"\") == \"\"\n assert candidate(s = \"abcde\") == \"edcbabcde\"\n assert candidate(s = \"abcabc\") == \"cbacbabcabc\"\n assert candidate(s = \"rotor\") == \"rotor\"\n assert candidate(s = \"aabb\") == \"bbaabb\"\n assert candidate(s = \"racecar\") == \"racecar\"\n assert candidate(s = \"aacecaaa\") == \"aaacecaaa\"\n assert candidate(s = \"aabba\") == \"abbaabba\"\n assert candidate(s = \"abba\") == \"abba\"\n assert candidate(s = \"race\") == \"ecarace\"\n assert candidate(s = \"noon\") == \"noon\"\n assert candidate(s = \"banana\") == \"ananabanana\"\n assert candidate(s = \"deeee\") == \"eeeedeeee\"\n assert candidate(s = \"zzazzacca\") == \"accazzazzacca\"\n assert candidate(s = \"abcd\") == \"dcbabcd\"\n assert candidate(s = \"aba\") == \"aba\"\n assert candidate(s = \"abbacd\") == \"dcabbacd\"\n assert candidate(s = \"level\") == \"level\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == \"abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba\"\n assert candidate(s = \"aabbaab\") == \"baabbaab\"\n assert candidate(s = \"aabbaca\") == \"acabbaabbaca\"\n assert candidate(s = \"aabbccddeeeffgg\") == \"ggffeeeddccbbaabbccddeeeffgg\"\n assert candidate(s = \"noonappo\") == \"oppanoonappo\"\n assert candidate(s = \"abacabadabacabadabacaba\") == \"abacabadabacabadabacaba\"\n assert candidate(s = \"repaperrepaper\") == \"repaperrepaper\"\n assert candidate(s = \"xyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzyx\") == \"xyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzyx\"\n assert candidate(s = \"abracadabra\") == \"arbadacarbabracadabra\"\n assert candidate(s = \"rotorrotor\") == \"rotorrotor\"\n assert candidate(s = \"zzzz\") == \"zzzz\"\n assert candidate(s = \"abbaa\") == \"aabbaa\"\n assert candidate(s = \"zazazz\") == \"zzazazz\"\n assert candidate(s = \"aaaabaaaa\") == \"aaaabaaaa\"\n assert candidate(s = \"noonnoon\") == \"noonnoon\"\n assert candidate(s = \"aabbccddeeefffgg\") == \"ggfffeeeddccbbaabbccddeeefffgg\"\n assert candidate(s = \"repaid\") == \"diaperepaid\"\n assert candidate(s = \"algorithm\") == \"mhtiroglalgorithm\"\n assert candidate(s = \"ananabanana\") == \"ananabanana\"\n assert candidate(s = \"hello\") == \"ollehello\"\n assert candidate(s = \"abcdecba\") == \"abcedcbabcdecba\"\n assert candidate(s = \"redder\") == \"redder\"\n assert candidate(s = \"qwertyuiop\") == \"poiuytrewqwertyuiop\"\n assert candidate(s = \"noonnoonnoonnoon\") == \"noonnoonnoonnoon\"\n assert candidate(s = \"deeeeffffgggggggggggggggggggggggggggggggg\") == \"ggggggggggggggggggggggggggggggggffffeeeedeeeeffffgggggggggggggggggggggggggggggggg\"\n assert candidate(s = \"abcdabc\") == \"cbadcbabcdabc\"\n assert candidate(s = \"mississippimississippi\") == \"ippississimippississimississippimississippi\"\n assert candidate(s = \"aabbccddeee\") == \"eeeddccbbaabbccddeee\"\n assert candidate(s = \"xyzzyx\") == \"xyzzyx\"\n assert candidate(s = \"abcdefghihgfedcbabc\") == \"cbabcdefghihgfedcbabc\"\n assert candidate(s = \"abca\") == \"acbabca\"\n assert candidate(s = \"bba\") == \"abba\"\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"abbae\") == \"eabbae\"\n assert candidate(s = \"repaperandmorepaperrepaperandmorepaper\") == \"repaperomdnarepaperrepaperomdnarepaperandmorepaperrepaperandmorepaper\"\n assert candidate(s = \"algorhythmhmorthygrola\") == \"alorgyhtromhmhtyhroglalgorhythmhmorthygrola\"\n assert candidate(s = \"palindrome\") == \"emordnilapalindrome\"\n assert candidate(s = \"abacaxi\") == \"ixacabacaxi\"\n assert candidate(s = \"kayak\") == \"kayak\"\n assert candidate(s = \"abab\") == \"babab\"\n assert candidate(s = \"aabbccddeeefffhhh\") == \"hhhfffeeeddccbbaabbccddeeefffhhh\"\n assert candidate(s = \"aabbbaaa\") == \"aaabbbaaa\"\n assert candidate(s = \"xyxz\") == \"zxyxz\"\n assert candidate(s = \"abcdefghihgfedcbabcd\") == \"dcbabcdefghihgfedcbabcd\"\n assert candidate(s = \"aabbccddeeefffggghhh\") == \"hhhgggfffeeeddccbbaabbccddeeefffggghhh\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\") == \"mnbvcxzlkjhgfdsapoiuytrewqwertyuiopasdfghjklzxcvbnm\"\n assert candidate(s = \"levelup\") == \"pulevelup\"\n assert candidate(s = \"raceacar\") == \"racaecaraceacar\"\n assert candidate(s = \"levelupandnevergiveup\") == \"puevigrevendnapulevelupandnevergiveup\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzz\") == \"zzzzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzz\"\n assert candidate(s = \"abcdeedcba\") == \"abcdeedcba\"\n assert candidate(s = \"leveler\") == \"releveler\"\n assert candidate(s = \"xyzzyxw\") == \"wxyzzyxw\"\n assert candidate(s = \"abcbae\") == \"eabcbae\"\n assert candidate(s = \"aabbccddeeeff\") == \"ffeeeddccbbaabbccddeeeff\"\n assert candidate(s = \"abcdeffedcba\") == \"abcdeffedcba\"\n assert candidate(s = \"deeeeffffgggg\") == \"ggggffffeeeedeeeeffffgggg\"\n assert candidate(s = \"levellevel\") == \"levellevel\"\n assert candidate(s = \"aabbccddeeefffhhhiiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiiihhhfffeeeddccbbaabbccddeeefffhhhiiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == \"zyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"aabcd\") == \"dcbaabcd\"\n assert candidate(s = \"abcdefedcba\") == \"abcdefedcba\"\n assert candidate(s = \"thisisnotapalindrome\") == \"emordnilapatonsisihthisisnotapalindrome\"\n assert candidate(s = \"amanaplanacanalsofpnmala\") == \"alamnpfoslanacanalpanamanaplanacanalsofpnmala\"\n assert candidate(s = \"xyzzzzzzzzzzzzzzzzzyx\") == \"xyzzzzzzzzzzzzzzzzzyx\"\n assert candidate(s = \"aeroplaneeplanar\") == \"ranalpeenalporeaeroplaneeplanar\"\n assert candidate(s = \"aaaaabbaaaaa\") == \"aaaaabbaaaaa\"\n assert candidate(s = \"abcdefghijk\") == \"kjihgfedcbabcdefghijk\"\n assert candidate(s = \"abababab\") == \"babababab\"\n assert candidate(s = \"abcdefghihgfedcbaa\") == \"aabcdefghihgfedcbaa\"\n assert candidate(s = \"abacabadabacaba\") == \"abacabadabacaba\"\n assert candidate(s = \"abababa\") == \"abababa\"\n assert candidate(s = \"bananaananab\") == \"bananaananab\"\n assert candidate(s = \"ananabananabana\") == \"anabananabananabana\"\n assert candidate(s = \"rotator\") == \"rotator\"\n assert candidate(s = \"redderredder\") == \"redderredder\"\n assert candidate(s = \"aabbccddeeefffgghhiiijjjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjjiiihhggfffeeeddccbbaabbccddeeefffgghhiiijjjkkllmmnnooppqqrrssttuuvvwwxxyyzz\"\n assert candidate(s = \"xyzabcxyzabc\") == \"cbazyxcbazyxyzabcxyzabc\"\n assert candidate(s = \"world\") == \"dlroworld\"\n assert candidate(s = \"abcbabcba\") == \"abcbabcba\"\n assert candidate(s = \"abcbad\") == \"dabcbad\"\n assert candidate(s = \"aabbccddeeefffhhhiijj\") == \"jjiihhhfffeeeddccbbaabbccddeeefffhhhiijj\"\n assert candidate(s = \"abcdefgh\") == \"hgfedcbabcdefgh\"\n assert candidate(s = \"civiccivic\") == \"civiccivic\"\n assert candidate(s = \"detartrated\") == \"detartrated\"\n assert candidate(s = \"racecarcar\") == \"racracecarcar\"\n assert candidate(s = \"aaabaaa\") == \"aaabaaa\"\n assert candidate(s = \"aabbccddeeff\") == \"ffeeddccbbaabbccddeeff\"\n assert candidate(s = \"reviver\") == \"reviver\"\n assert candidate(s = \"madamimadam\") == \"madamimadam\"\n assert candidate(s = \"aabbccddeeefffhhhiiijjkkll\") == \"llkkjjiiihhhfffeeeddccbbaabbccddeeefffhhhiiijjkkll\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\"\n assert candidate(s = \"amanaplanacanalpanama\") == \"amanaplanacanalpanama\"\n assert candidate(s = \"abcdabcba\") == \"abcbadcbabcdabcba\"\n assert candidate(s = \"abcdefg\") == \"gfedcbabcdefg\"\n assert candidate(s = \"aaaabbbbccccdddd\") == \"ddddccccbbbbaaaabbbbccccdddd\"\n assert candidate(s = \"racecarracecar\") == \"racecarracecar\"\n assert candidate(s = \"abbaab\") == \"baabbaab\"\n assert candidate(s = \"deified\") == \"deified\"\n assert candidate(s = \"repaper\") == \"repaper\"\n assert candidate(s = \"abbaabbaabba\") == \"abbaabbaabba\"\n assert candidate(s = \"abcdef\") == \"fedcbabcdef\"\n assert candidate(s = \"zzzzy\") == \"yzzzzy\"\n assert candidate(s = \"abcdedcba\") == \"abcdedcba\"\n assert candidate(s = \"xyzzzzzzzyx\") == \"xyzzzzzzzyx\"\n assert candidate(s = \"bbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm\") == \"mnbvcxzlkjhgfdsapoiuytrewqmnbvcxzlkjhgfdsapoiuytrewqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm\"\n assert candidate(s = \"repaperandmorepaper\") == \"repaperomdnarepaperandmorepaper\"\n assert candidate(s = \"deifieddeified\") == \"deifieddeified\"\n assert candidate(s = \"abcddcba\") == \"abcddcba\"\n assert candidate(s = \"civic\") == \"civic\"\n assert candidate(s = \"aaaaabaaa\") == \"aaabaaaaabaaa\"\n assert candidate(s = \"abcdefghihgfedcba\") == \"abcdefghihgfedcba\"\n assert candidate(s = \"amanaplanacanalsofpnmalamalamalamalamal\") == \"lamalamalamalamalamnpfoslanacanalpanamanaplanacanalsofpnmalamalamalamalamal\"\n assert candidate(s = \"ababababa\") == \"ababababa\"\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\") == \"godyzalehtrevospmujxofnworbkciuqaquickbrownfoxjumpsoverthelazydog\"\n assert candidate(s = \"reviled\") == \"delivereviled\"\n assert candidate(s = \"levelupandnevergiveuplevelupandnevergiveup\") == \"puevigrevendnapulevelpuevigrevendnapulevelupandnevergiveuplevelupandnevergiveup\"\n assert candidate(s = \"amandaplanacanalpanama\") == \"amanaplanacanalpadnamandaplanacanalpanama\"\n assert candidate(s = \"aabbcc\") == \"ccbbaabbcc\"\n assert candidate(s = \"mississippi\") == \"ippississimississippi\"\n assert candidate(s = \"aeroplane\") == \"enalporeaeroplane\"\n assert candidate(s = \"deed\") == \"deed\"\n assert candidate(s = \"xyxzyzyx\") == \"xyzyzxyxzyzyx\"\n assert candidate(s = \"xyzabc\") == \"cbazyxyzabc\"\n assert candidate(s = \"refer\") == \"refer\"\n", "comparison": "exact"}, "public_tests": ["\"aacecaaa\"", "\"abcd\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().shortestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:18+00:00", "tests_total": 157, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "rolling-hash", "string-matching", "hash-function", "manacher", "z-algorithm", "knuth-morris-pratt-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def shortest_palindrome(s)", "container": null, "callable": "shortest_palindrome", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 215, "task_id": "kth-largest-element-in-an-array", "difficulty": "Medium", "problem_description": "Given an integer array nums and an integer k, return the k^th largest element in the array.\n\nNote that it is the k^th largest element in the sorted order, not the k^th distinct element.\n\nCan you solve it without sorting?\n\nExample 1:\n\nInput: nums = [3,2,1,5,6,4], k = 2\nOutput: 5\n\nExample 2:\n\nInput: nums = [3,2,3,1,2,4,5,5,6], k = 4\nOutput: 4\n\nConstraints:\n\n- 1 <= k <= nums.length <= 10^5\n- -10^4 <= nums[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1],k = 5) == 3\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1],k = 3) == 5\n assert candidate(nums = [10000, -10000, 0],k = 2) == 0\n assert candidate(nums = [3, 2, 1, 5, 6, 4],k = 2) == 5\n assert candidate(nums = [-1, -2, -3, -4, -5],k = 2) == -2\n assert candidate(nums = [1],k = 1) == 1\n assert candidate(nums = [3, 2, 3, 1, 2, 4, 5, 5, 6],k = 4) == 4\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981],k = 10) == 9991\n assert candidate(nums = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981],k = 15) == 986\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 20) == 1\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 20) == 1\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991],k = 3) == -9993\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 10) == 600\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 20) == 6\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 1) == 100\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10],k = 25) == 4\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],k = 15) == 60\n assert candidate(nums = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 18) == 3\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],k = 10) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 15) == 6\n assert candidate(nums = [9, 1, 8, 2, 7, 3, 6, 4, 5],k = 3) == 7\n assert candidate(nums = [-10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000, -10000],k = 10) == -10000\n assert candidate(nums = [-10000, 10000, -9999, 9999, -9998, 9998, -9997, 9997, -9996, 9996],k = 5) == 9996\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15],k = 7) == -7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 20) == 11\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50],k = 25) == 26\n assert candidate(nums = [9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990],k = 5) == 9995\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 1) == 20\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 5) == 60\n assert candidate(nums = [2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1],k = 5) == 7\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6],k = 10) == 5\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == 0\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981],k = 15) == 9986\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],k = 10) == -10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 19) == 2\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 15) == 5\n assert candidate(nums = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000],k = 1) == 10000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10) == 11\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 5) == -5\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 7) == 27\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990, -9989, -9988, -9987, -9986, -9985, -9984, -9983, -9982, -9981],k = 15) == -9995\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 7) == -7\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],k = 10) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 17) == 14\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 1) == 5\n assert candidate(nums = [1, 10000, 2, 9999, 3, 9998, 4, 9997, 5, 9996, 6, 9995, 7, 9994, 8, 9993, 9, 9992, 10, 9991],k = 7) == 9994\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 10) == 60\n assert candidate(nums = [25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 18) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 20) == 1\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100],k = 12) == -10\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990],k = 10) == 9991\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 14) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 25) == 6\n assert candidate(nums = [10000, 5000, 0, -5000, -10000, 10000, 5000, 0, -5000, -10000, 10000, 5000, 0, -5000, -10000],k = 8) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 15) == 11\n assert candidate(nums = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000],k = 15) == 10000\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990],k = 8) == -9997\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],k = 10) == -9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == 1\n assert candidate(nums = [20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11],k = 18) == 12\n assert candidate(nums = [104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85],k = 15) == 90\n assert candidate(nums = [9, 3, 7, 6, 2, 5, 8, 4, 1, 10],k = 3) == 8\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5],k = 10) == 0\n assert candidate(nums = [1, 3, 2, 6, 4, 5, 8, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],k = 12) == 14\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6],k = 7) == 5\n assert candidate(nums = [50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 30) == 21\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 5) == 5\n assert candidate(nums = [100, 90, 90, 80, 80, 70, 70, 60, 60, 50, 50, 40, 40, 30, 30, 20, 20, 10, 10, 0, 0, -10, -10, -20, -20, -30, -30, -40, -40],k = 18) == 10\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 3) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 8) == 8\n assert candidate(nums = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000],k = 5) == 10000\n assert candidate(nums = [5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 19) == 1\n assert candidate(nums = [9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981, 9980],k = 10) == 9990\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],k = 20) == 0\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991, -9990, -9989, -9988, -9987, -9986, -9985, -9984, -9983, -9982, -9981],k = 10) == -9990\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 3) == 5\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 25) == 5\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 10) == 5\n", "comparison": "exact"}, "public_tests": ["[3,2,1,5,6,4]\n2", "[3,2,3,1,2,4,5,5,6]\n4"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().findKthLargest", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:20+00:00", "tests_total": 78, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "divide-and-conquer", "sorting", "heap-priority-queue", "quickselect"]}, "language": "ruby", "interface": {"raw_signature": "def find_kth_largest(nums, k)", "container": null, "callable": "find_kth_largest", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 216, "task_id": "combination-sum-iii", "difficulty": "Medium", "problem_description": "Find all valid combinations of k numbers that sum up to n such that the following conditions are true:\n\n- Only numbers 1 through 9 are used.\n- Each number is used at most once.\n\nReturn a list of all possible valid combinations. The list must not contain the same combination twice, and the combinations may be returned in any order.\n\nExample 1:\n\nInput: k = 3, n = 7\nOutput: [[1,2,4]]\nExplanation:\n1 + 2 + 4 = 7\nThere are no other valid combinations.\n\nExample 2:\n\nInput: k = 3, n = 9\nOutput: [[1,2,6],[1,3,5],[2,3,4]]\nExplanation:\n1 + 2 + 6 = 9\n1 + 3 + 5 = 9\n2 + 3 + 4 = 9\nThere are no other valid combinations.\n\nExample 3:\n\nInput: k = 4, n = 1\nOutput: []\nExplanation: There are no valid combinations.\nUsing 4 different numbers in the range [1,9], the smallest sum we can get is 1+2+3+4 = 10 and since 10 > 1, there are no valid combination.\n\nConstraints:\n\n- 2 <= k <= 9\n- 1 <= n <= 60\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(k=7, n=28), [[1, 2, 3, 4, 5, 6, 7]])\n assert answers_match(candidate(k=5, n=25), [[1, 2, 5, 8, 9], [1, 2, 6, 7, 9], [1, 3, 4, 8, 9], [1, 3, 5, 7, 9], [1, 3, 6, 7, 8], [1, 4, 5, 6, 9], [1, 4, 5, 7, 8], [2, 3, 4, 7, 9], [2, 3, 5, 6, 9], [2, 3, 5, 7, 8], [2, 4, 5, 6, 8], [3, 4, 5, 6, 7]])\n assert answers_match(candidate(k=5, n=20), [[1, 2, 3, 5, 9], [1, 2, 3, 6, 8], [1, 2, 4, 5, 8], [1, 2, 4, 6, 7], [1, 3, 4, 5, 7], [2, 3, 4, 5, 6]])\n assert answers_match(candidate(k=7, n=56), [])\n assert answers_match(candidate(k=4, n=1), [])\n assert answers_match(candidate(k=2, n=15), [[6, 9], [7, 8]])\n assert answers_match(candidate(k=9, n=45), [[1, 2, 3, 4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(k=3, n=18), [[1, 8, 9], [2, 7, 9], [3, 6, 9], [3, 7, 8], [4, 5, 9], [4, 6, 8], [5, 6, 7]])\n assert answers_match(candidate(k=3, n=9), [[1, 2, 6], [1, 3, 5], [2, 3, 4]])\n assert answers_match(candidate(k=4, n=28), [[4, 7, 8, 9], [5, 6, 8, 9]])\n assert answers_match(candidate(k=3, n=7), [[1, 2, 4]])\n assert answers_match(candidate(k=3, n=23), [[6, 8, 9]])\n assert answers_match(candidate(k=8, n=36), [[1, 2, 3, 4, 5, 6, 7, 8]])\n assert answers_match(candidate(k=6, n=45), [])\n assert answers_match(candidate(k=2, n=18), [])\n assert answers_match(candidate(k=5, n=15), [[1, 2, 3, 4, 5]])\n assert answers_match(candidate(k=8, n=60), [])\n assert answers_match(candidate(k=2, n=5), [[1, 4], [2, 3]])\n assert answers_match(candidate(k=4, n=17), [[1, 2, 5, 9], [1, 2, 6, 8], [1, 3, 4, 9], [1, 3, 5, 8], [1, 3, 6, 7], [1, 4, 5, 7], [2, 3, 4, 8], [2, 3, 5, 7], [2, 4, 5, 6]])\n assert answers_match(candidate(k=3, n=20), [[3, 8, 9], [4, 7, 9], [5, 6, 9], [5, 7, 8]])\n assert answers_match(candidate(k=7, n=35), [[1, 2, 3, 5, 7, 8, 9], [1, 2, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 8]])\n assert answers_match(candidate(k=5, n=23), [[1, 2, 3, 8, 9], [1, 2, 4, 7, 9], [1, 2, 5, 6, 9], [1, 2, 5, 7, 8], [1, 3, 4, 6, 9], [1, 3, 4, 7, 8], [1, 3, 5, 6, 8], [1, 4, 5, 6, 7], [2, 3, 4, 5, 9], [2, 3, 4, 6, 8], [2, 3, 5, 6, 7]])\n assert answers_match(candidate(k=6, n=25), [[1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 5, 6, 8], [1, 2, 4, 5, 6, 7]])\n assert answers_match(candidate(k=7, n=21), [])\n assert answers_match(candidate(k=7, n=40), [[1, 4, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(k=6, n=30), [[1, 2, 3, 7, 8, 9], [1, 2, 4, 6, 8, 9], [1, 2, 5, 6, 7, 9], [1, 3, 4, 5, 8, 9], [1, 3, 4, 6, 7, 9], [1, 3, 5, 6, 7, 8], [2, 3, 4, 5, 7, 9], [2, 3, 4, 6, 7, 8]])\n assert answers_match(candidate(k=6, n=35), [[1, 4, 6, 7, 8, 9], [2, 3, 6, 7, 8, 9], [2, 4, 5, 7, 8, 9], [3, 4, 5, 6, 8, 9]])\n assert answers_match(candidate(k=5, n=33), [[3, 6, 7, 8, 9], [4, 5, 7, 8, 9]])\n assert answers_match(candidate(k=4, n=14), [[1, 2, 3, 8], [1, 2, 4, 7], [1, 2, 5, 6], [1, 3, 4, 6], [2, 3, 4, 5]])\n assert answers_match(candidate(k=7, n=29), [[1, 2, 3, 4, 5, 6, 8]])\n assert answers_match(candidate(k=6, n=42), [])\n assert answers_match(candidate(k=5, n=18), [[1, 2, 3, 4, 8], [1, 2, 3, 5, 7], [1, 2, 4, 5, 6]])\n assert answers_match(candidate(k=4, n=22), [[1, 4, 8, 9], [1, 5, 7, 9], [1, 6, 7, 8], [2, 3, 8, 9], [2, 4, 7, 9], [2, 5, 6, 9], [2, 5, 7, 8], [3, 4, 6, 9], [3, 4, 7, 8], [3, 5, 6, 8], [4, 5, 6, 7]])\n assert answers_match(candidate(k=6, n=24), [[1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 6, 8], [1, 2, 3, 5, 6, 7]])\n assert answers_match(candidate(k=7, n=42), [[3, 4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(k=4, n=10), [[1, 2, 3, 4]])\n assert answers_match(candidate(k=5, n=17), [[1, 2, 3, 4, 7], [1, 2, 3, 5, 6]])\n assert answers_match(candidate(k=3, n=10), [[1, 2, 7], [1, 3, 6], [1, 4, 5], [2, 3, 5]])\n assert answers_match(candidate(k=3, n=17), [[1, 7, 9], [2, 6, 9], [2, 7, 8], [3, 5, 9], [3, 6, 8], [4, 5, 8], [4, 6, 7]])\n assert answers_match(candidate(k=4, n=20), [[1, 2, 8, 9], [1, 3, 7, 9], [1, 4, 6, 9], [1, 4, 7, 8], [1, 5, 6, 8], [2, 3, 6, 9], [2, 3, 7, 8], [2, 4, 5, 9], [2, 4, 6, 8], [2, 5, 6, 7], [3, 4, 5, 8], [3, 4, 6, 7]])\n assert answers_match(candidate(k=5, n=30), [[1, 5, 7, 8, 9], [2, 4, 7, 8, 9], [2, 5, 6, 8, 9], [3, 4, 6, 8, 9], [3, 5, 6, 7, 9], [4, 5, 6, 7, 8]])\n assert answers_match(candidate(k=5, n=10), [])\n assert answers_match(candidate(k=6, n=39), [[4, 5, 6, 7, 8, 9]])\n assert answers_match(candidate(k=4, n=30), [[6, 7, 8, 9]])\n assert answers_match(candidate(k=4, n=15), [[1, 2, 3, 9], [1, 2, 4, 8], [1, 2, 5, 7], [1, 3, 4, 7], [1, 3, 5, 6], [2, 3, 4, 6]])\n assert answers_match(candidate(k=6, n=40), [])\n assert answers_match(candidate(k=4, n=23), [[1, 5, 8, 9], [1, 6, 7, 9], [2, 4, 8, 9], [2, 5, 7, 9], [2, 6, 7, 8], [3, 4, 7, 9], [3, 5, 6, 9], [3, 5, 7, 8], [4, 5, 6, 8]])\n assert answers_match(candidate(k=4, n=25), [[1, 7, 8, 9], [2, 6, 8, 9], [3, 5, 8, 9], [3, 6, 7, 9], [4, 5, 7, 9], [4, 6, 7, 8]])\n assert answers_match(candidate(k=5, n=35), [[5, 6, 7, 8, 9]])\n assert answers_match(candidate(k=2, n=16), [[7, 9]])\n assert answers_match(candidate(k=6, n=55), [])\n assert answers_match(candidate(k=8, n=30), [])\n assert answers_match(candidate(k=6, n=18), [])\n assert answers_match(candidate(k=3, n=15), [[1, 5, 9], [1, 6, 8], [2, 4, 9], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6]])\n assert answers_match(candidate(k=4, n=12), [[1, 2, 3, 6], [1, 2, 4, 5]])\n assert answers_match(candidate(k=7, n=49), [])\n assert answers_match(candidate(k=7, n=30), [[1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 7, 8]])\n", "comparison": "unordered"}, "public_tests": ["3\n7", "3\n9", "4\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["k", "n"], "leetcode_dataset_entry_point": "Solution().combinationSum3", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:22+00:00", "tests_total": 62, "tests_dropped": 5, "flags": ["any_order"], "topic_tags": ["array", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def combination_sum3(k, n)", "container": null, "callable": "combination_sum3", "parameters": [{"name": "k", "type": "Integer"}, {"name": "n", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 217, "task_id": "contains-duplicate", "difficulty": "Easy", "problem_description": "Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.\n\nExample 1:\n\nInput: nums = [1,2,3,1]\nOutput: true\nExplanation:\nThe element 1 occurs at the indices 0 and 3.\n\nExample 2:\n\nInput: nums = [1,2,3,4]\nOutput: false\nExplanation:\nAll elements are distinct.\n\nExample 3:\n\nInput: nums = [1,1,1,3,3,4,3,2,4,2]\nOutput: true\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1]) == False\n assert candidate(nums = [1, 2, 3, 1]) == True\n assert candidate(nums = [1, 1, 1, 3, 3, 4, 3, 2, 4, 2]) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(nums = [1, 2, 3, 4]) == False\n assert candidate(nums = [1, 2]) == False\n assert candidate(nums = [5, 7, 8, 9, 5]) == True\n assert candidate(nums = [0]) == False\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000]) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == True\n assert candidate(nums = [-1, 0, 1, 2]) == False\n assert candidate(nums = [-1, 0, 1, 2, 3, -1]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == True\n assert candidate(nums = [5, 7, 8, 9, 10, 1]) == False\n assert candidate(nums = [1000000000, -1000000000, 1000000000]) == True\n assert candidate(nums = [-1, 0, 1, 2, -1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == True\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000, 600000000, 700000000, 800000000, 900000000, 100000000]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20]) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 1000000000]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == False\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1]) == True\n assert candidate(nums = [987654321, 987654322, 987654323, 987654321]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50]) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100]) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30]) == True\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 0]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -1]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 100]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 1]) == True\n assert candidate(nums = [0, 1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [999999999, -999999999, 999999998, -999999998, 999999997, -999999997, 999999996, -999999996, 999999995, -999999995, 999999999]) == True\n assert candidate(nums = [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0]) == True\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 1]) == True\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 5]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20]) == True\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 0]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 0]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 0]) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1]) == True\n assert candidate(nums = [1000000000, -1000000000, 500000000, 500000000]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 1]) == True\n assert candidate(nums = [999999999, -999999999, 999999999, -999999999, 999999999, -999999999, 999999999, -999999999, 999999999, -999999999]) == True\n assert candidate(nums = [987654321, 987654322, 987654323, 987654324, 987654325, 987654321]) == True\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990, 999999990]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1]) == True\n assert candidate(nums = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0]) == True\n assert candidate(nums = [-999999999, -999999998, -999999997, -999999996, -999999995, -999999994, -999999993, -999999992, -999999991, -999999990, -999999999]) == True\n assert candidate(nums = [-1000000000, -999999999, -999999998, -999999997, -999999996, -999999995, -999999994, -999999993, -999999992, -999999991, -999999990, -999999989, -999999988, -999999987, -999999986, -999999985, -999999984, -999999983, -999999982, -999999981, -999999980, -999999979, -999999978, -999999977, -999999976, -999999975, -999999974, -999999973, -999999972, -999999971, -999999970, -999999969, -999999968, -999999967, -999999966, -999999965, -999999964, -999999963, -999999962, -999999961, -999999960, -999999959, -999999958, -999999957, -999999956, -999999955, -999999954, -999999953, -999999952, -999999951, -999999950, -999999949, -999999948, -999999947, -999999946, -999999945, -999999944, -999999943, -999999942, -999999941, -999999940, -999999939, -999999938, -999999937, -999999936, -999999935, -999999934, -999999933, -999999932, -999999931, -999999930, -999999929, -999999928, -999999927, -999999926, -999999925, -999999924, -999999923, -999999922, -999999921, -999999920, -999999919, -999999918, -999999917, -999999916, -999999915, -999999914, -999999913, -999999912, -999999911, -999999910, -999999909, -999999908, -999999907, -999999906, -999999905, -999999904, -999999903, -999999902, -999999901, -999999900, -1000000000]) == True\n assert candidate(nums = [987654321, 876543210, 765432109, 654321098, 543210987, 432109876, 321098765, 210987654, 109876543, 987654321]) == True\n assert candidate(nums = [-1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, 9]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9]) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 1]) == True\n assert candidate(nums = [5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 11, 11]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == False\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990, 999999999]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == True\n assert candidate(nums = [1000000000, -1000000000, 1000000000, 500000000, -500000000, 500000000]) == True\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000, 600000000, 700000000, 800000000, 900000000, 100000000]) == True\n", "comparison": "exact"}, "public_tests": ["[1,2,3,1]", "[1,2,3,4]", "[1,1,1,3,3,4,3,2,4,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().containsDuplicate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:24+00:00", "tests_total": 94, "tests_dropped": 3, "flags": [], "topic_tags": ["array", "hash-table", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def contains_duplicate(nums)", "container": null, "callable": "contains_duplicate", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 218, "task_id": "the-skyline-problem", "difficulty": "Hard", "problem_description": "A city's skyline is the outer contour of the silhouette formed by all the buildings in that city when viewed from a distance. Given the locations and heights of all the buildings, return the skyline formed by these buildings collectively.\n\nThe geometric information of each building is given in the array buildings where buildings[i] = [left_i, right_i, height_i]:\n\n- left_i is the x coordinate of the left edge of the i^th building.\n- right_i is the x coordinate of the right edge of the i^th building.\n- height_i is the height of the i^th building.\n\nYou may assume all buildings are perfect rectangles grounded on an absolutely flat surface at height 0.\n\nThe skyline should be represented as a list of \"key points\" sorted by their x-coordinate in the form [[x_1,y_1],[x_2,y_2],...]. Each key point is the left endpoint of some horizontal segment in the skyline except the last point in the list, which always has a y-coordinate 0 and is used to mark the skyline's termination where the rightmost building ends. Any ground between the leftmost and rightmost buildings should be part of the skyline's contour.\n\nNote: There must be no consecutive horizontal lines of equal height in the output skyline. For instance, [...,[2 3],[4 5],[7 5],[11 5],[12 7],...] is not acceptable; the three lines of height 5 should be merged into one in the final output as such: [...,[2 3],[4 5],[12 7],...]\n\nExample 1:\n\nInput: buildings = [[2,9,10],[3,7,15],[5,12,12],[15,20,10],[19,24,8]]\nOutput: [[2,10],[3,15],[7,12],[12,0],[15,10],[20,8],[24,0]]\nExplanation:\nFigure A shows the buildings of the input.\nFigure B shows the skyline formed by those buildings. The red points in figure B represent the key points in the output list.\n\nExample 2:\n\nInput: buildings = [[0,2,3],[2,5,3]]\nOutput: [[0,3],[5,0]]\n\nConstraints:\n\n- 1 <= buildings.length <= 10^4\n- 0 <= left_i < right_i <= 2^31 - 1\n- 1 <= height_i <= 2^31 - 1\n- buildings is sorted by left_i in non-decreasing order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(buildings = [[0, 5, 7], [5, 10, 3], [5, 10, 12], [10, 15, 15], [15, 20, 10], [15, 20, 10], [20, 25, 10]]) == [[0, 7], [5, 12], [10, 15], [15, 10], [25, 0]]\n assert candidate(buildings = [[1, 2, 1], [1, 2, 2], [1, 2, 3]]) == [[1, 3], [2, 0]]\n assert candidate(buildings = [[0, 3, 3], [1, 5, 3], [2, 4, 3]]) == [[0, 3], [5, 0]]\n assert candidate(buildings = [[1, 1000000000, 1]]) == [[1, 1], [1000000000, 0]]\n assert candidate(buildings = [[0, 5, 7], [5, 10, 3], [5, 8, 12], [10, 15, 5]]) == [[0, 7], [5, 12], [8, 3], [10, 5], [15, 0]]\n assert candidate(buildings = [[0, 1, 3], [1, 2, 3], [2, 3, 3]]) == [[0, 3], [3, 0]]\n assert candidate(buildings = [[1, 5, 3], [1, 5, 3], [1, 5, 3]]) == [[1, 3], [5, 0]]\n assert candidate(buildings = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 0]]\n assert candidate(buildings = [[1, 4, 10], [2, 3, 15]]) == [[1, 10], [2, 15], [3, 10], [4, 0]]\n assert candidate(buildings = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 0]]\n assert candidate(buildings = [[2, 9, 10], [3, 7, 15], [5, 12, 12], [15, 20, 10], [19, 24, 8]]) == [[2, 10], [3, 15], [7, 12], [12, 0], [15, 10], [20, 8], [24, 0]]\n assert candidate(buildings = [[0, 2, 3], [2, 5, 3]]) == [[0, 3], [5, 0]]\n assert candidate(buildings = [[1, 5, 20], [2, 6, 30], [3, 7, 20], [4, 8, 10], [5, 9, 5]]) == [[1, 20], [2, 30], [6, 20], [7, 10], [8, 5], [9, 0]]\n assert candidate(buildings = [[10, 20, 50], [15, 30, 40], [25, 40, 60], [35, 50, 55], [45, 60, 45], [55, 70, 65], [65, 80, 50]]) == [[10, 50], [20, 40], [25, 60], [40, 55], [50, 45], [55, 65], [70, 50], [80, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 10, 20], [3, 10, 30], [4, 10, 40], [5, 10, 50], [6, 10, 60], [7, 10, 70], [8, 10, 80], [9, 10, 90]]) == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60], [7, 70], [8, 80], [9, 90], [10, 0]]\n assert candidate(buildings = [[1, 2, 10], [2, 3, 10], [3, 4, 10], [4, 5, 10], [5, 6, 10], [6, 7, 10], [7, 8, 10]]) == [[1, 10], [8, 0]]\n assert candidate(buildings = [[1, 10, 100], [5, 15, 200], [10, 20, 150], [15, 25, 100], [20, 30, 50]]) == [[1, 100], [5, 200], [15, 150], [20, 100], [25, 50], [30, 0]]\n assert candidate(buildings = [[1, 100, 1], [2, 99, 2], [3, 98, 3], [4, 97, 4], [5, 96, 5], [6, 95, 6], [7, 94, 7], [8, 93, 8], [9, 92, 9], [10, 91, 10]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [91, 9], [92, 8], [93, 7], [94, 6], [95, 5], [96, 4], [97, 3], [98, 2], [99, 1], [100, 0]]\n assert candidate(buildings = [[1, 10, 100], [5, 15, 50], [10, 20, 20], [15, 25, 10], [20, 30, 5]]) == [[1, 100], [10, 50], [15, 20], [20, 10], [25, 5], [30, 0]]\n assert candidate(buildings = [[1, 15, 10], [3, 7, 15], [5, 10, 12], [8, 20, 8], [12, 25, 10]]) == [[1, 10], [3, 15], [7, 12], [10, 10], [25, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 5, 15], [3, 7, 12], [4, 9, 14], [5, 11, 10], [6, 12, 15], [7, 13, 10]]) == [[1, 10], [2, 15], [5, 14], [6, 15], [12, 10], [13, 0]]\n assert candidate(buildings = [[1, 1000000000, 10], [200000000, 800000000, 15], [300000000, 700000000, 12], [400000000, 600000000, 8], [500000000, 550000000, 9], [600000000, 650000000, 10]]) == [[1, 10], [200000000, 15], [800000000, 10], [1000000000, 0]]\n assert candidate(buildings = [[1, 5, 1], [5, 10, 2], [10, 15, 3], [15, 20, 4], [20, 25, 5], [25, 30, 6]]) == [[1, 1], [5, 2], [10, 3], [15, 4], [20, 5], [25, 6], [30, 0]]\n assert candidate(buildings = [[1, 2, 10], [2, 3, 15], [3, 4, 12], [4, 5, 8], [5, 6, 9], [6, 7, 10], [7, 8, 8], [8, 9, 9], [9, 10, 10]]) == [[1, 10], [2, 15], [3, 12], [4, 8], [5, 9], [6, 10], [7, 8], [8, 9], [9, 10], [10, 0]]\n assert candidate(buildings = [[1, 3, 50], [3, 6, 20], [6, 9, 70], [9, 12, 30], [12, 15, 60]]) == [[1, 50], [3, 20], [6, 70], [9, 30], [12, 60], [15, 0]]\n assert candidate(buildings = [[1, 3, 10], [2, 6, 15], [3, 5, 20], [4, 7, 15], [5, 8, 10], [6, 9, 5]]) == [[1, 10], [2, 15], [3, 20], [5, 15], [7, 10], [8, 5], [9, 0]]\n assert candidate(buildings = [[1, 2, 1], [1, 3, 2], [1, 4, 3], [1, 5, 4], [1, 6, 5], [1, 7, 6], [1, 8, 7], [1, 9, 8], [1, 10, 9]]) == [[1, 9], [10, 0]]\n assert candidate(buildings = [[1, 2, 1], [3, 4, 2], [5, 6, 3], [7, 8, 4], [9, 10, 5], [11, 12, 6], [13, 14, 7], [15, 16, 8], [17, 18, 9], [19, 20, 10], [21, 22, 11]]) == [[1, 1], [2, 0], [3, 2], [4, 0], [5, 3], [6, 0], [7, 4], [8, 0], [9, 5], [10, 0], [11, 6], [12, 0], [13, 7], [14, 0], [15, 8], [16, 0], [17, 9], [18, 0], [19, 10], [20, 0], [21, 11], [22, 0]]\n assert candidate(buildings = [[1, 5, 10], [2, 3, 15], [3, 4, 10], [4, 6, 15], [5, 7, 10], [6, 8, 15], [7, 9, 10]]) == [[1, 10], [2, 15], [3, 10], [4, 15], [8, 10], [9, 0]]\n assert candidate(buildings = [[1, 100, 10], [20, 80, 15], [30, 70, 12], [40, 60, 8], [50, 55, 9], [60, 65, 10]]) == [[1, 10], [20, 15], [80, 10], [100, 0]]\n assert candidate(buildings = [[1, 10, 100], [10, 20, 90], [20, 30, 80], [30, 40, 70], [40, 50, 60], [50, 60, 50], [60, 70, 40], [70, 80, 30], [80, 90, 20], [90, 100, 10]]) == [[1, 100], [10, 90], [20, 80], [30, 70], [40, 60], [50, 50], [60, 40], [70, 30], [80, 20], [90, 10], [100, 0]]\n assert candidate(buildings = [[0, 2, 3], [2, 4, 3], [4, 6, 3], [6, 8, 3], [8, 10, 3]]) == [[0, 3], [10, 0]]\n assert candidate(buildings = [[1, 10, 10], [10, 20, 20], [20, 30, 30], [30, 40, 40], [40, 50, 50], [50, 60, 60], [60, 70, 70], [70, 80, 80], [80, 90, 90], [90, 100, 100]]) == [[1, 10], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 0]]\n assert candidate(buildings = [[0, 10, 10], [1, 3, 20], [5, 7, 15], [6, 9, 25], [8, 12, 5]]) == [[0, 10], [1, 20], [3, 10], [5, 15], [6, 25], [9, 10], [10, 5], [12, 0]]\n assert candidate(buildings = [[1, 10, 5], [2, 9, 8], [3, 8, 7], [4, 7, 6], [5, 6, 10]]) == [[1, 5], [2, 8], [5, 10], [6, 8], [9, 5], [10, 0]]\n assert candidate(buildings = [[0, 10, 10], [5, 15, 15], [10, 20, 12], [15, 25, 8], [20, 30, 9]]) == [[0, 10], [5, 15], [15, 12], [20, 9], [30, 0]]\n assert candidate(buildings = [[1, 3, 10], [2, 5, 15], [3, 7, 12], [4, 8, 8], [5, 9, 9], [6, 10, 10]]) == [[1, 10], [2, 15], [5, 12], [7, 10], [10, 0]]\n assert candidate(buildings = [[1, 3, 10], [1, 3, 15], [1, 3, 12], [1, 3, 8], [1, 3, 9], [1, 3, 10]]) == [[1, 15], [3, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 9, 15], [3, 8, 20], [4, 7, 25], [5, 6, 30]]) == [[1, 10], [2, 15], [3, 20], [4, 25], [5, 30], [6, 25], [7, 20], [8, 15], [9, 10], [10, 0]]\n assert candidate(buildings = [[0, 5, 10], [5, 15, 15], [10, 20, 10], [15, 25, 8], [20, 25, 12]]) == [[0, 10], [5, 15], [15, 10], [20, 12], [25, 0]]\n assert candidate(buildings = [[10, 15, 100], [15, 20, 200], [20, 25, 300], [25, 30, 400], [30, 35, 500], [35, 40, 600], [40, 45, 700], [45, 50, 800], [50, 55, 900]]) == [[10, 100], [15, 200], [20, 300], [25, 400], [30, 500], [35, 600], [40, 700], [45, 800], [50, 900], [55, 0]]\n assert candidate(buildings = [[1, 100, 10], [2, 99, 20], [3, 98, 30], [4, 97, 40], [5, 96, 50]]) == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [96, 40], [97, 30], [98, 20], [99, 10], [100, 0]]\n assert candidate(buildings = [[1, 3, 10], [2, 5, 20], [3, 6, 15], [4, 7, 30], [5, 8, 25]]) == [[1, 10], [2, 20], [4, 30], [7, 25], [8, 0]]\n assert candidate(buildings = [[1, 10, 10], [5, 15, 15], [10, 20, 20], [15, 25, 10], [20, 30, 5], [25, 35, 3]]) == [[1, 10], [5, 15], [10, 20], [20, 10], [25, 5], [30, 3], [35, 0]]\n assert candidate(buildings = [[1, 3, 300], [2, 4, 200], [3, 5, 100], [4, 6, 50], [5, 7, 25], [6, 8, 12], [7, 9, 5]]) == [[1, 300], [3, 200], [4, 100], [5, 50], [6, 25], [7, 12], [8, 5], [9, 0]]\n assert candidate(buildings = [[1, 100, 50], [25, 75, 75], [50, 100, 100], [75, 125, 25], [100, 150, 50]]) == [[1, 50], [25, 75], [50, 100], [100, 50], [150, 0]]\n assert candidate(buildings = [[1, 4, 10], [2, 3, 15], [3, 6, 12], [4, 7, 14], [5, 8, 10], [6, 9, 15], [7, 10, 10]]) == [[1, 10], [2, 15], [3, 12], [4, 14], [6, 15], [9, 10], [10, 0]]\n assert candidate(buildings = [[1, 4, 10], [2, 6, 15], [3, 5, 9], [4, 7, 12], [5, 8, 8], [6, 9, 10]]) == [[1, 10], [2, 15], [6, 12], [7, 10], [9, 0]]\n assert candidate(buildings = [[1, 5, 3], [1, 5, 4], [1, 5, 5], [1, 5, 6], [1, 5, 7]]) == [[1, 7], [5, 0]]\n assert candidate(buildings = [[1, 2, 3], [2, 3, 4], [3, 4, 5], [4, 5, 6], [5, 6, 7], [6, 7, 8], [7, 8, 9], [8, 9, 10]]) == [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 0]]\n assert candidate(buildings = [[0, 2, 3], [1, 3, 5], [2, 5, 2], [3, 7, 4], [4, 6, 6], [5, 8, 1], [6, 9, 3], [7, 10, 5]]) == [[0, 3], [1, 5], [3, 4], [4, 6], [6, 4], [7, 5], [10, 0]]\n assert candidate(buildings = [[1, 5, 10], [2, 4, 15], [3, 8, 12], [4, 7, 8], [5, 6, 9]]) == [[1, 10], [2, 15], [4, 12], [8, 0]]\n assert candidate(buildings = [[1, 10, 100], [1, 5, 50], [1, 3, 30], [3, 7, 70], [5, 9, 90], [7, 11, 50]]) == [[1, 100], [10, 50], [11, 0]]\n assert candidate(buildings = [[1, 20, 10], [3, 10, 15], [5, 8, 12], [6, 12, 14], [15, 20, 10], [19, 24, 8]]) == [[1, 10], [3, 15], [10, 14], [12, 10], [20, 8], [24, 0]]\n assert candidate(buildings = [[1, 20, 10], [5, 15, 20], [10, 25, 30], [15, 35, 40], [20, 45, 50], [25, 55, 60], [30, 65, 70], [35, 75, 80]]) == [[1, 10], [5, 20], [10, 30], [15, 40], [20, 50], [25, 60], [30, 70], [35, 80], [75, 0]]\n assert candidate(buildings = [[1, 10, 5], [2, 8, 7], [3, 6, 9], [4, 5, 12], [5, 7, 10]]) == [[1, 5], [2, 7], [3, 9], [4, 12], [5, 10], [7, 7], [8, 5], [10, 0]]\n assert candidate(buildings = [[1, 3, 30], [3, 5, 20], [5, 7, 30], [7, 9, 20], [9, 11, 30]]) == [[1, 30], [3, 20], [5, 30], [7, 20], [9, 30], [11, 0]]\n assert candidate(buildings = [[1, 2, 1000000000], [2, 3, 999999999], [3, 4, 999999998], [4, 5, 999999997]]) == [[1, 1000000000], [2, 999999999], [3, 999999998], [4, 999999997], [5, 0]]\n assert candidate(buildings = [[1, 1000000000, 100], [500000000, 1500000000, 200], [1000000000, 2000000000, 300]]) == [[1, 100], [500000000, 200], [1000000000, 300], [2000000000, 0]]\n assert candidate(buildings = [[1, 5, 10], [3, 8, 15], [7, 12, 20], [10, 15, 10], [13, 18, 15]]) == [[1, 10], [3, 15], [7, 20], [12, 10], [13, 15], [18, 0]]\n assert candidate(buildings = [[1, 2, 3], [2, 3, 6], [3, 4, 9], [4, 5, 12], [5, 6, 15], [6, 7, 18], [7, 8, 21], [8, 9, 24], [9, 10, 27]]) == [[1, 3], [2, 6], [3, 9], [4, 12], [5, 15], [6, 18], [7, 21], [8, 24], [9, 27], [10, 0]]\n assert candidate(buildings = [[1, 2, 1], [2, 3, 2], [3, 4, 3], [4, 5, 4], [5, 6, 5], [6, 7, 6], [7, 8, 7], [8, 9, 8]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 0]]\n assert candidate(buildings = [[1, 4, 10], [1, 4, 20], [2, 3, 30], [2, 3, 40], [3, 4, 50]]) == [[1, 20], [2, 40], [3, 50], [4, 0]]\n assert candidate(buildings = [[1, 10, 5], [2, 6, 7], [3, 15, 8], [4, 12, 12], [5, 9, 10], [6, 14, 9], [7, 13, 11], [8, 11, 13]]) == [[1, 5], [2, 7], [3, 8], [4, 12], [8, 13], [11, 12], [12, 11], [13, 9], [14, 8], [15, 0]]\n assert candidate(buildings = [[1, 5, 1], [2, 4, 2], [3, 6, 3], [4, 7, 4], [5, 8, 5], [6, 9, 6], [7, 10, 7], [8, 11, 8], [9, 12, 9], [10, 13, 10]]) == [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [13, 0]]\n assert candidate(buildings = [[10, 20, 10], [15, 25, 20], [20, 30, 15], [25, 35, 25], [30, 40, 10], [35, 45, 5]]) == [[10, 10], [15, 20], [25, 25], [35, 10], [40, 5], [45, 0]]\n assert candidate(buildings = [[1, 20, 10], [5, 15, 20], [10, 25, 30], [15, 30, 40], [20, 35, 50], [25, 40, 60], [30, 45, 70], [35, 50, 80], [40, 55, 90]]) == [[1, 10], [5, 20], [10, 30], [15, 40], [20, 50], [25, 60], [30, 70], [35, 80], [40, 90], [55, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 5, 15], [3, 7, 20], [5, 15, 10], [10, 20, 8]]) == [[1, 10], [2, 15], [3, 20], [7, 10], [15, 8], [20, 0]]\n assert candidate(buildings = [[1, 2, 100], [2, 3, 90], [3, 4, 80], [4, 5, 70], [5, 6, 60], [6, 7, 50], [7, 8, 40], [8, 9, 30], [9, 10, 20], [10, 11, 10]]) == [[1, 100], [2, 90], [3, 80], [4, 70], [5, 60], [6, 50], [7, 40], [8, 30], [9, 20], [10, 10], [11, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 8, 15], [3, 7, 12], [4, 9, 20], [5, 6, 25], [7, 11, 30], [9, 12, 20]]) == [[1, 10], [2, 15], [4, 20], [5, 25], [6, 20], [7, 30], [11, 20], [12, 0]]\n assert candidate(buildings = [[1, 2, 10], [2, 3, 10], [3, 4, 10], [4, 5, 10], [5, 6, 10], [6, 7, 10], [7, 8, 10], [8, 9, 10]]) == [[1, 10], [9, 0]]\n assert candidate(buildings = [[1, 10, 100], [5, 15, 150], [10, 20, 100], [15, 25, 200], [20, 30, 150]]) == [[1, 100], [5, 150], [15, 200], [25, 150], [30, 0]]\n assert candidate(buildings = [[1, 3, 5], [2, 4, 10], [3, 5, 15], [4, 6, 20], [5, 7, 25], [6, 8, 30]]) == [[1, 5], [2, 10], [3, 15], [4, 20], [5, 25], [6, 30], [8, 0]]\n assert candidate(buildings = [[1, 10, 10], [2, 3, 15], [3, 7, 12], [8, 15, 8], [12, 20, 10]]) == [[1, 10], [2, 15], [3, 12], [7, 10], [10, 8], [12, 10], [20, 0]]\n assert candidate(buildings = [[1, 3, 10], [4, 7, 20], [8, 10, 15], [12, 14, 30], [16, 19, 25]]) == [[1, 10], [3, 0], [4, 20], [7, 0], [8, 15], [10, 0], [12, 30], [14, 0], [16, 25], [19, 0]]\n assert candidate(buildings = [[1, 2, 10], [2, 3, 20], [3, 4, 30], [4, 5, 40], [5, 6, 50], [6, 7, 60], [7, 8, 70], [8, 9, 80], [9, 10, 90], [10, 11, 100], [11, 12, 110], [12, 13, 120]]) == [[1, 10], [2, 20], [3, 30], [4, 40], [5, 50], [6, 60], [7, 70], [8, 80], [9, 90], [10, 100], [11, 110], [12, 120], [13, 0]]\n assert candidate(buildings = [[10, 20, 5], [15, 30, 10], [25, 40, 20], [35, 50, 25], [45, 60, 15], [55, 70, 10]]) == [[10, 5], [15, 10], [25, 20], [35, 25], [50, 15], [60, 10], [70, 0]]\n assert candidate(buildings = [[1, 3, 10], [2, 5, 15], [3, 6, 20], [4, 7, 25], [5, 8, 30], [6, 9, 35], [7, 10, 40]]) == [[1, 10], [2, 15], [3, 20], [4, 25], [5, 30], [6, 35], [7, 40], [10, 0]]\n assert candidate(buildings = [[10, 20, 100], [15, 30, 80], [20, 40, 60], [25, 50, 40], [30, 60, 20]]) == [[10, 100], [20, 80], [30, 60], [40, 40], [50, 20], [60, 0]]\n assert candidate(buildings = [[1, 2, 10], [2, 3, 15], [3, 4, 10], [4, 5, 20], [5, 6, 25], [6, 7, 20], [7, 8, 15], [8, 9, 10]]) == [[1, 10], [2, 15], [3, 10], [4, 20], [5, 25], [6, 20], [7, 15], [8, 10], [9, 0]]\n assert candidate(buildings = [[1, 10, 5], [2, 5, 7], [3, 8, 4], [6, 12, 8], [9, 15, 10], [13, 20, 6]]) == [[1, 5], [2, 7], [5, 5], [6, 8], [9, 10], [15, 6], [20, 0]]\n assert candidate(buildings = [[1, 3, 10], [2, 4, 15], [3, 5, 20], [4, 6, 25], [5, 7, 30], [6, 8, 35], [7, 9, 40], [8, 10, 45], [9, 11, 50]]) == [[1, 10], [2, 15], [3, 20], [4, 25], [5, 30], [6, 35], [7, 40], [8, 45], [9, 50], [11, 0]]\n", "comparison": "exact"}, "public_tests": ["[[2,9,10],[3,7,15],[5,12,12],[15,20,10],[19,24,8]]", "[[0,2,3],[2,5,3]]"], "hints": [], "metadata": {"canonical_parameter_names": ["buildings"], "leetcode_dataset_entry_point": "Solution().getSkyline", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:27+00:00", "tests_total": 101, "tests_dropped": 19, "flags": ["has_images"], "topic_tags": ["array", "divide-and-conquer", "binary-indexed-tree", "segment-tree", "sweep-line", "sorting", "heap-priority-queue", "ordered-set"]}, "language": "ruby", "interface": {"raw_signature": "def get_skyline(buildings)", "container": null, "callable": "get_skyline", "parameters": [{"name": "buildings", "type": "Integer[][]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 219, "task_id": "contains-duplicate-ii", "difficulty": "Easy", "problem_description": "Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.\n\nExample 1:\n\nInput: nums = [1,2,3,1], k = 3\nOutput: true\n\nExample 2:\n\nInput: nums = [1,0,1,1], k = 1\nOutput: true\n\nExample 3:\n\nInput: nums = [1,2,3,1,2,3], k = 2\nOutput: false\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n- 0 <= k <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 8) == False\n assert candidate(nums = [1, 0, 1, 1],k = 1) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 9],k = 1) == True\n assert candidate(nums = [1, 2, 2, 1],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5],k = 4) == False\n assert candidate(nums = [1, 2, 3, 4, 5],k = 5) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 9) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 18) == True\n assert candidate(nums = [9, 9],k = 1) == True\n assert candidate(nums = [9, 1, 2, 3, 9],k = 4) == True\n assert candidate(nums = [1],k = 0) == False\n assert candidate(nums = [1, 2, 3, 1],k = 3) == True\n assert candidate(nums = [999999999, 999999999, 1, 1],k = 2) == True\n assert candidate(nums = [999999999, -999999999, 999999999],k = 2) == True\n assert candidate(nums = [1, 2, 2],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 8) == False\n assert candidate(nums = [1, 1],k = 0) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 20) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3],k = 2) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 0) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 3) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2],k = 1) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 7) == False\n assert candidate(nums = [1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0],k = 1) == False\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999999],k = 9) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 1) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50],k = 49) == True\n assert candidate(nums = [5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 1],k = 20) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5],k = 49) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 20) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 10) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 9) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 20) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 1) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1],k = 10) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 1],k = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30],k = 29) == True\n assert candidate(nums = [1000000000, 1000000000, 1, 2, 3],k = 1) == True\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 20) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1],k = 14) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 9) == True\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4],k = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 8) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 17) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 0) == False\n assert candidate(nums = [1000000000, 999999999, 1000000000, 999999999, 1000000000, 999999999],k = 2) == True\n assert candidate(nums = [1000000000, 1000000000],k = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5],k = 4) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1],k = 29) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 20) == False\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 10],k = 9) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 9) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1],k = 49) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 100000) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 18) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 8) == False\n assert candidate(nums = [10, 1, 2, 10, 3, 4, 5, 10, 6, 7, 8, 9, 10],k = 8) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1],k = 24) == False\n assert candidate(nums = [1, 0, 1, 1, 0, 1, 0, 1],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 19) == False\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20],k = 20) == True\n assert candidate(nums = [1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1],k = 1) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1],k = 5) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1],k = 20) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1],k = 10) == True\n assert candidate(nums = [1, 0, 1, 1, 0, 1, 0, 1, 0, 1],k = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 19) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 10) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1],k = 30) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == False\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5],k = 10) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1],k = 39) == False\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1],k = 2) == True\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000],k = 2) == True\n assert candidate(nums = [1, 0, 1, 1, 0, 1],k = 2) == True\n assert candidate(nums = [5, 4, 3, 2, 1, 0, 5, 4, 3, 2, 1, 0],k = 5) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],k = 1) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50],k = 4) == False\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 1],k = 20) == True\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990, 999999999],k = 9) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5],k = 10) == True\n", "comparison": "exact"}, "public_tests": ["[1,2,3,1]\n3", "[1,0,1,1]\n1", "[1,2,3,1,2,3]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().containsNearbyDuplicate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:29+00:00", "tests_total": 106, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "hash-table", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def contains_nearby_duplicate(nums, k)", "container": null, "callable": "contains_nearby_duplicate", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 220, "task_id": "contains-duplicate-iii", "difficulty": "Hard", "problem_description": "You are given an integer array nums and two integers indexDiff and valueDiff.\n\nFind a pair of indices (i, j) such that:\n\n- i != j,\n- abs(i - j) <= indexDiff.\n- abs(nums[i] - nums[j]) <= valueDiff, and\n\nReturn true if such pair exists or false otherwise.\n\nExample 1:\n\nInput: nums = [1,2,3,1], indexDiff = 3, valueDiff = 0\nOutput: true\nExplanation: We can choose (i, j) = (0, 3).\nWe satisfy the three conditions:\ni != j --> 0 != 3\nabs(i - j) <= indexDiff --> abs(0 - 3) <= 3\nabs(nums[i] - nums[j]) <= valueDiff --> abs(1 - 1) <= 0\n\nExample 2:\n\nInput: nums = [1,5,9,1,5,9], indexDiff = 2, valueDiff = 3\nOutput: false\nExplanation: After trying all the possible pairs (i, j), we cannot satisfy the three conditions, so we return false.\n\nConstraints:\n\n- 2 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n- 1 <= indexDiff <= nums.length\n- 0 <= valueDiff <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, 1, 3, 1, 3],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 1, 4, 1, 3],indexDiff = 5,valueDiff = 2) == True\n assert candidate(nums = [10, 10, 10, 10, 10, 10],indexDiff = 3,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [8, 7, 15, 1, 6, 1, 9, 15],indexDiff = 1,valueDiff = 3) == True\n assert candidate(nums = [2, 1, 2, 3, 1, 5],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 1],indexDiff = 3,valueDiff = 0) == True\n assert candidate(nums = [1, 5, 9, 1, 5, 9],indexDiff = 2,valueDiff = 3) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 5,valueDiff = 5) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 1, 0, 1],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 4,valueDiff = 2) == True\n assert candidate(nums = [10, 10, 10, 10],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [4, 1, 2],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90],indexDiff = 2,valueDiff = 20) == True\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],indexDiff = 5,valueDiff = 5) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000],indexDiff = 3,valueDiff = 0) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000],indexDiff = 4,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 8,valueDiff = 4) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 1,valueDiff = 0) == False\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],indexDiff = 10,valueDiff = 10) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],indexDiff = 5,valueDiff = 10) == True\n assert candidate(nums = [1000000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000],indexDiff = 9,valueDiff = 3000000) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 3,valueDiff = 0) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 8,valueDiff = 1) == True\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5],indexDiff = 5,valueDiff = 4) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],indexDiff = 1,valueDiff = 19) == True\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],indexDiff = 5,valueDiff = 10) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],indexDiff = 10,valueDiff = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],indexDiff = 10,valueDiff = 0) == False\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119],indexDiff = 10,valueDiff = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 1) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],indexDiff = 4,valueDiff = 25) == True\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],indexDiff = 10,valueDiff = 5) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],indexDiff = 7,valueDiff = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 2,valueDiff = 5) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],indexDiff = 19,valueDiff = 10) == True\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10],indexDiff = 2,valueDiff = 9) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 10,valueDiff = 9) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],indexDiff = 20,valueDiff = 0) == False\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 4,valueDiff = 1) == True\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 7,valueDiff = 3) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],indexDiff = 5,valueDiff = 50) == False\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10],indexDiff = 2,valueDiff = 8) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],indexDiff = 5,valueDiff = 0) == True\n assert candidate(nums = [1, 5, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69],indexDiff = 6,valueDiff = 5) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],indexDiff = 5,valueDiff = 150) == True\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 7,valueDiff = 4) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],indexDiff = 15,valueDiff = 5) == True\n assert candidate(nums = [0, 1000000000, -1000000000, 1000000000, 0, -1000000000, 1000000000, 0, -1000000000, 1000000000],indexDiff = 4,valueDiff = 500000000) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 20,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 5,valueDiff = 5) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 25,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 5,valueDiff = 4) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 4,valueDiff = 2) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 10,valueDiff = 0) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95],indexDiff = 10,valueDiff = 5) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 1, 5, 9, 10, 7, 6, 4, 2],indexDiff = 5,valueDiff = 3) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],indexDiff = 5,valueDiff = 100) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 10,valueDiff = 0) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],indexDiff = 12,valueDiff = 5) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 5, 6, 7, 8, 9],indexDiff = 4,valueDiff = 3) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],indexDiff = 15,valueDiff = 10) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],indexDiff = 10,valueDiff = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 5,valueDiff = 4) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],indexDiff = 10,valueDiff = 15) == True\n assert candidate(nums = [10, 1, 9, 2, 8, 3, 7, 4, 6, 5],indexDiff = 3,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],indexDiff = 19,valueDiff = 1) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 0) == False\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 5,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 20,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 1) == True\n assert candidate(nums = [0, 1000000000, 0, 1000000000, 0],indexDiff = 2,valueDiff = 1000000000) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [1, 1000000000, 1, 1000000000, 1, 1000000000, 1, 1000000000],indexDiff = 6,valueDiff = 999999999) == True\n assert candidate(nums = [1000, 100, 10, 1, 0, 1, 10, 100, 1000, 10000],indexDiff = 9,valueDiff = 9900) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 2) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 5,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [1, 3, 6, 8, 12, 15, 20, 22, 25, 28, 30],indexDiff = 4,valueDiff = 3) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 5,valueDiff = 4) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],indexDiff = 10,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000],indexDiff = 10,valueDiff = 999999999) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 0) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 4,valueDiff = 4) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 6,valueDiff = 4) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 10,valueDiff = 9) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],indexDiff = 5,valueDiff = 0) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],indexDiff = 10,valueDiff = 15) == True\n assert candidate(nums = [-1000000000, -999999999, -999999998, -999999997, -999999996, -999999995, -999999994, -999999993, -999999992, -999999991],indexDiff = 10,valueDiff = 0) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],indexDiff = 5,valueDiff = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 0) == True\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10],indexDiff = 3,valueDiff = 9) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 3,valueDiff = 1) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 4,valueDiff = 3) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 10,valueDiff = 0) == True\n assert candidate(nums = [8, 7, 15, 1, 6, 1, 9, 15],indexDiff = 2,valueDiff = 3) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 4,valueDiff = 1) == True\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [2, 1, 2, 1],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [10, 100, 1000, 10, 100, 1000],indexDiff = 2,valueDiff = 899) == True\n assert candidate(nums = [1, 0, 1, 1],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 5,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 5,valueDiff = 10) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],indexDiff = 1,valueDiff = 0) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 5,valueDiff = 0) == False\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],indexDiff = 10,valueDiff = 0) == True\n assert candidate(nums = [-1, -1, -1, -3, -2, 0, -4, -2, -2, -2, -2, -2, -2, -2, -2],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 8,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 1, 2],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14],indexDiff = 1,valueDiff = 1) == False\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 5,valueDiff = 4) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000],indexDiff = 2,valueDiff = 1000000000) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1, 1, 10, 9, 8, 7, 9, 3, 1],indexDiff = 2,valueDiff = 3) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1, 1, 10, 23],indexDiff = 4,valueDiff = 1) == True\n assert candidate(nums = [8, 2, 23, 4, 25, 36, 7, 45, 8, 9, 45],indexDiff = 2,valueDiff = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 1,valueDiff = 0) == False\n assert candidate(nums = [8, 2, 4, 2, 0, 2, 0, 4, 2, 2],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [5, 4, 3, 2, 1],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],indexDiff = 3,valueDiff = 15) == True\n assert candidate(nums = [0, 1, 1, 1],indexDiff = 1,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],indexDiff = 8,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1, 1, 10, 9],indexDiff = 1,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],indexDiff = 7,valueDiff = 2) == True\n assert candidate(nums = [10, 10, 10, 10, 10],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 1, 2, 5, 5, 1, 2, 5],indexDiff = 2,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 4,valueDiff = 4) == True\n assert candidate(nums = [1, 5, 9, 1, 5, 9],indexDiff = 2,valueDiff = 3) == False\n assert candidate(nums = [10, 100, 1000, 10000],indexDiff = 3,valueDiff = 5000) == True\n assert candidate(nums = [8, 2, 2, 2, 5, 3, 9, 8, 2, 8],indexDiff = 4,valueDiff = 2) == True\n assert candidate(nums = [1, 0, 1, 1],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 1,valueDiff = 0) == False\n assert candidate(nums = [0, 10, 20, 30, 40, 50],indexDiff = 3,valueDiff = 10) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],indexDiff = 4,valueDiff = 2) == True\n assert candidate(nums = [0, 0, 0, 0, 0],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 9,valueDiff = 9) == True\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [1, 2, 3, 1],indexDiff = 3,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 4,valueDiff = 2) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [7, 1, 3, 6, 5, 10, 12, 8],indexDiff = 5,valueDiff = 8) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1],indexDiff = 1,valueDiff = 2) == True\n assert candidate(nums = [7, 1, 3, 6, 5, 10, 12, 8],indexDiff = 5,valueDiff = 2) == True\n assert candidate(nums = [999999999, 999999999, 999999999, 999999999],indexDiff = 3,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [8, 2, 4, 5, 0, 1, 7, 9],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 3, 1, 3, 1, 3],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [1, 0, 1, 1],indexDiff = 1,valueDiff = 2) == True\n assert candidate(nums = [10, 100, 10, 1000, 100, 10],indexDiff = 1,valueDiff = 90) == True\n assert candidate(nums = [10, 100, 1000, 10000, 100000],indexDiff = 4,valueDiff = 90000) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1, 1, 10, 6, 11, 7, 10, 3, 4, 7, 13, 1, 3, 15, 5],indexDiff = 2,valueDiff = 3) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 1,valueDiff = 0) == False\n assert candidate(nums = [2, 0, -2, 2],indexDiff = 2,valueDiff = 1) == False\n assert candidate(nums = [2, 1, 2, 1],indexDiff = 1,valueDiff = 0) == False\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1],indexDiff = 1,valueDiff = 1) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 11,valueDiff = 0) == True\n assert candidate(nums = [1, 3, 1, 2],indexDiff = 3,valueDiff = 1) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 4,valueDiff = 3) == True\n assert candidate(nums = [1, 2, 3, 4, 5],indexDiff = 4,valueDiff = 3) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],indexDiff = 10,valueDiff = 9) == True\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 21],indexDiff = 2,valueDiff = 1) == True\n assert candidate(nums = [8, 7, 15, 1, 6, 1, 9, 15],indexDiff = 1,valueDiff = 3) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],indexDiff = 5,valueDiff = 4) == True\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000],indexDiff = 7,valueDiff = 9999999) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],indexDiff = 3,valueDiff = 0) == True\n assert candidate(nums = [8, 2, 4, 5, 0, 1, 9, 3],indexDiff = 3,valueDiff = 2) == True\n assert candidate(nums = [1, 5, 9, 1, 5, 9],indexDiff = 2,valueDiff = 2) == False\n assert candidate(nums = [8, 2, 4, 2, 0, 14, 1, 13],indexDiff = 5,valueDiff = 3) == True\n assert candidate(nums = [10, 10, 10, 10, 10, 10],indexDiff = 1,valueDiff = 0) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2],indexDiff = 1,valueDiff = 1) == True\n assert candidate(nums = [0, 21233, 15334453, 123345],indexDiff = 3,valueDiff = 3) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 5,valueDiff = 3) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],indexDiff = 2,valueDiff = 0) == True\n assert candidate(nums = [10, 100, 1000, 10000, 100000],indexDiff = 5,valueDiff = 90000) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 5,valueDiff = 1) == True\n assert candidate(nums = [8, 2, 4, 5, 0, 7, 9],indexDiff = 1,valueDiff = 2) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],indexDiff = 5,valueDiff = 2) == True\n assert candidate(nums = [8, 2, 4, 5, 0, 1, 9, 3],indexDiff = 2,valueDiff = 3) == True\n assert candidate(nums = [1, 2],indexDiff = 1,valueDiff = 0) == False\n", "comparison": "exact"}, "public_tests": ["[1,2,3,1]\n3\n0", "[1,5,9,1,5,9]\n2\n3"], "hints": ["Time complexity O(n logk) - This will give an indication that sorting is involved for k elements.", "Use already existing state to evaluate next state - Like, a set of k sorted numbers are only needed to be tracked. When we are processing the next number in array, then we can utilize the existing sorted state and it is not necessary to sort next overlapping set of k numbers again."], "metadata": {"canonical_parameter_names": ["nums", "indexDiff", "valueDiff"], "leetcode_dataset_entry_point": "Solution().containsNearbyAlmostDuplicate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:32+00:00", "tests_total": 238, "tests_dropped": 28, "flags": [], "topic_tags": ["array", "sliding-window", "sorting", "bucket-sort", "ordered-set"]}, "language": "ruby", "interface": {"raw_signature": "def contains_nearby_almost_duplicate(nums, index_diff, value_diff)", "container": null, "callable": "contains_nearby_almost_duplicate", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "index_diff", "type": "Integer"}, {"name": "value_diff", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 221, "task_id": "maximal-square", "difficulty": "Medium", "problem_description": "Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area.\n\nExample 1:\n\nInput: matrix = [[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]\nOutput: 4\n\nExample 2:\n\nInput: matrix = [[\"0\",\"1\"],[\"1\",\"0\"]]\nOutput: 1\n\nExample 3:\n\nInput: matrix = [[\"0\"]]\nOutput: 0\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= m, n <= 300\n- matrix[i][j] is '0' or '1'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [['0', '1'], ['1', '0']]) == 1\n assert candidate(matrix = [['1', '0', '1'], ['1', '1', '0'], ['1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1'], ['1', '1']]) == 4\n assert candidate(matrix = [['0']]) == 0\n assert candidate(matrix = [['1', '1', '0', '0', '0'], ['1', '1', '0', '0', '0'], ['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0']]) == 4\n assert candidate(matrix = [['1', '0', '1', '0', '0'], ['1', '0', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '1', '0']]) == 4\n assert candidate(matrix = [['1', '0', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '0', '1', '1', '0'], ['1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1'], ['1', '1', '1', '1', '0']]) == 9\n assert candidate(matrix = [['1', '0', '1', '1', '1'], ['1', '0', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '0', '1', '0']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '0', '0', '1'], ['1', '1', '0', '1', '1'], ['0', '1', '1', '1', '1'], ['0', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 25\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '0', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 16\n assert candidate(matrix = [['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '1', '1', '0', '0'], ['1', '1', '1', '0', '0'], ['1', '1', '1', '0', '0'], ['0', '0', '0', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1', '0', '0', '0'], ['1', '1', '1', '1', '1', '0', '0', '1'], ['0', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1', '1', '1']]) == 25\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1']]) == 25\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '0', '1', '1', '1', '0', '1'], ['1', '0', '0', '1', '0', '1', '0', '1'], ['1', '0', '0', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '0']]) == 16\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '1', '0', '1'], ['1', '0', '1', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['0', '0', '0', '0', '0'], ['0', '1', '1', '1', '0'], ['0', '1', '1', '1', '0'], ['0', '1', '1', '1', '0'], ['0', '0', '0', '0', '0']]) == 9\n assert candidate(matrix = [['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1'], ['1', '0', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '0', '1', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1'], ['1', '0', '1'], ['1', '1', '1'], ['1', '1', '1'], ['1', '0', '1'], ['1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '0', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['0', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '0', '0', '0', '1'], ['1', '0', '1', '0', '1'], ['1', '0', '0', '0', '1'], ['1', '1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '0', '0'], ['1', '1', '0', '0', '0', '0'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1']]) == 16\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1']]) == 64\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0'], ['0', '0', '0', '0', '0']]) == 0\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '0'], ['0', '1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '0'], ['0', '0', '0', '0', '0'], ['1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '0'], ['1', '1', '1', '0', '0'], ['1', '1', '0', '0', '0'], ['1', '0', '0', '0', '0'], ['0', '0', '0', '0', '0']]) == 4\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '0', '0', '0'], ['1', '1', '1', '0', '1', '1'], ['1', '1', '1', '0', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '0', '0', '0', '1', '0', '1'], ['1', '0', '1', '0', '1', '1', '1', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '1', '0', '1'], ['1', '0', '1', '0', '1', '0', '1', '1', '0', '1'], ['1', '0', '1', '1', '1', '1', '1', '1', '0', '1'], ['1', '0', '0', '0', '0', '0', '0', '0', '0', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '0', '0', '0'], ['1', '1', '0', '0', '0'], ['0', '0', '1', '1', '1'], ['0', '0', '1', '1', '1'], ['0', '0', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '0', '0', '0', '0', '0'], ['0', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '0', '0']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '0', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '0', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '0', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '0', '0']]) == 16\n assert candidate(matrix = [['1', '1', '0', '0', '1'], ['1', '1', '0', '0', '1'], ['0', '0', '1', '1', '0'], ['0', '0', '1', '1', '0'], ['1', '0', '0', '1', '0']]) == 4\n assert candidate(matrix = [['1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1'], ['1', '1', '1', '1', '1'], ['1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 36\n assert candidate(matrix = [['1', '1', '1', '0', '1', '1'], ['1', '1', '1', '0', '1', '1'], ['1', '1', '1', '0', '1', '1'], ['0', '0', '0', '0', '0', '0'], ['1', '1', '1', '0', '1', '1'], ['1', '1', '1', '0', '1', '1']]) == 9\n assert candidate(matrix = [['0', '0', '0', '0', '0'], ['0', '1', '1', '1', '0'], ['0', '1', '0', '1', '0'], ['0', '1', '1', '1', '0'], ['0', '0', '0', '0', '0']]) == 1\n assert candidate(matrix = [['1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0', '1', '0']]) == 1\n assert candidate(matrix = [['1', '0', '0', '1', '0'], ['0', '1', '1', '0', '1'], ['0', '1', '1', '0', '1'], ['1', '0', '0', '1', '0'], ['0', '1', '1', '0', '1']]) == 4\n assert candidate(matrix = [['1', '1', '1'], ['1', '0', '1'], ['1', '1', '1'], ['1', '0', '1'], ['1', '1', '1']]) == 1\n assert candidate(matrix = [['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1'], ['0', '1', '0', '1', '0'], ['1', '0', '1', '0', '1']]) == 1\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '0', '0', '1', '1'], ['1', '1', '0', '0', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '0', '1', '1', '1', '1', '0', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 81\n assert candidate(matrix = [['1', '1', '1', '1', '0'], ['1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1'], ['0', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '0', '1', '1'], ['1', '1', '0', '1', '0', '1', '1'], ['1', '1', '0', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1']]) == 100\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['0', '0', '0', '0', '1', '1'], ['0', '0', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 9\n assert candidate(matrix = [['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '0', '0', '1', '1'], ['1', '1', '1', '1', '1', '1'], ['1', '1', '1', '1', '1', '1']]) == 4\n assert candidate(matrix = [['1', '1', '0', '0', '0'], ['1', '1', '0', '0', '0'], ['0', '0', '1', '1', '1'], ['0', '0', '1', '1', '1'], ['0', '0', '1', '1', '1']]) == 9\n assert candidate(matrix = [['0', '0', '0', '0', '0', '0'], ['0', '1', '1', '1', '1', '0'], ['0', '1', '0', '0', '1', '0'], ['0', '1', '0', '1', '1', '0'], ['0', '1', '1', '1', '1', '0'], ['0', '0', '0', '0', '0', '0']]) == 4\n assert candidate(matrix = [['1', '1', '1', '1'], ['1', '0', '0', '1'], ['1', '0', '0', '1'], ['1', '1', '1', '1']]) == 1\n assert candidate(matrix = [['1', '1', '0', '1'], ['1', '1', '0', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['1', '1', '1', '1'], ['0', '0', '0', '0']]) == 9\n assert candidate(matrix = [['1', '1', '1', '0', '0'], ['1', '1', '1', '0', '0'], ['1', '1', '1', '0', '0'], ['0', '0', '0', '1', '1'], ['0', '0', '0', '1', '1']]) == 9\n assert candidate(matrix = [['0', '0', '0', '0'], ['0', '1', '1', '0'], ['0', '1', '1', '0'], ['0', '0', '0', '0']]) == 4\n", "comparison": "exact"}, "public_tests": ["[[\"1\",\"0\",\"1\",\"0\",\"0\"],[\"1\",\"0\",\"1\",\"1\",\"1\"],[\"1\",\"1\",\"1\",\"1\",\"1\"],[\"1\",\"0\",\"0\",\"1\",\"0\"]]", "[[\"0\",\"1\"],[\"1\",\"0\"]]", "[[\"0\"]]"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().maximalSquare", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:34+00:00", "tests_total": 68, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def maximal_square(matrix)", "container": null, "callable": "maximal_square", "parameters": [{"name": "matrix", "type": "Character[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 223, "task_id": "rectangle-area", "difficulty": "Medium", "problem_description": "Given the coordinates of two rectilinear rectangles in a 2D plane, return the total area covered by the two rectangles.\n\nThe first rectangle is defined by its bottom-left corner (ax1, ay1) and its top-right corner (ax2, ay2).\n\nThe second rectangle is defined by its bottom-left corner (bx1, by1) and its top-right corner (bx2, by2).\n\nExample 1:\n\nInput: ax1 = -3, ay1 = 0, ax2 = 3, ay2 = 4, bx1 = 0, by1 = -1, bx2 = 9, by2 = 2\nOutput: 45\n\nExample 2:\n\nInput: ax1 = -2, ay1 = -2, ax2 = 2, ay2 = 2, bx1 = -2, by1 = -2, bx2 = 2, by2 = 2\nOutput: 16\n\nConstraints:\n\n- -10^4 <= ax1 <= ax2 <= 10^4\n- -10^4 <= ay1 <= ay2 <= 10^4\n- -10^4 <= bx1 <= bx2 <= 10^4\n- -10^4 <= by1 <= by2 <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(ax1 = -2,ay1 = -2,ax2 = 2,ay2 = 2,bx1 = -2,by1 = -2,bx2 = 2,by2 = 2) == 16\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 3,ay2 = 3,bx1 = 2,by1 = 2,bx2 = 4,by2 = 4) == 7\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 5,ay2 = 5,bx1 = 5,by1 = 5,bx2 = 10,by2 = 10) == 50\n assert candidate(ax1 = -3,ay1 = 0,ax2 = 3,ay2 = 4,bx1 = 0,by1 = -1,bx2 = 9,by2 = 2) == 45\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 0,ay2 = 0,bx1 = -3,by1 = -3,bx2 = 3,by2 = 3) == 52\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 0,ay2 = 0,bx1 = -3,by1 = -3,bx2 = -1,by2 = -1) == 25\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 4,ay2 = 5,bx1 = 2,by1 = 2,bx2 = 5,by2 = 6) == 18\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 1,ay2 = 1,bx1 = 2,by1 = 2,bx2 = 3,by2 = 3) == 2\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 5,ay2 = 5,bx1 = 3,by1 = 3,bx2 = 7,by2 = 7) == 28\n assert candidate(ax1 = -1,ay1 = -1,ax2 = 1,ay2 = 1,bx1 = 0,by1 = 0,bx2 = 2,by2 = 2) == 7\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 3,ay2 = 3,bx1 = 4,by1 = 4,bx2 = 6,by2 = 6) == 8\n assert candidate(ax1 = -20,ay1 = -20,ax2 = 20,ay2 = 20,bx1 = 15,by1 = 15,bx2 = 25,by2 = 25) == 1675\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 5,ay2 = 5,bx1 = -5,by1 = -5,bx2 = -4,by2 = -4) == 100\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 4,ay2 = 4,bx1 = 2,by1 = 2,bx2 = 5,by2 = 5) == 14\n assert candidate(ax1 = -1,ay1 = -1,ax2 = 1,ay2 = 1,bx1 = 1,by1 = 1,bx2 = 3,by2 = 3) == 8\n assert candidate(ax1 = 5,ay1 = 5,ax2 = 15,ay2 = 15,bx1 = 10,by1 = 10,bx2 = 20,by2 = 20) == 175\n assert candidate(ax1 = -100,ay1 = 100,ax2 = 0,ay2 = 200,bx1 = -50,by1 = 150,bx2 = 50,by2 = 250) == 17500\n assert candidate(ax1 = -100,ay1 = -100,ax2 = -50,ay2 = -50,bx1 = 50,by1 = 50,bx2 = 100,by2 = 100) == 5000\n assert candidate(ax1 = -20,ay1 = -20,ax2 = 0,ay2 = 0,bx1 = -5,by1 = -5,bx2 = 5,by2 = 5) == 475\n assert candidate(ax1 = 500,ay1 = 500,ax2 = 600,ay2 = 600,bx1 = 550,by1 = 550,bx2 = 700,by2 = 700) == 30000\n assert candidate(ax1 = -5000,ay1 = -5000,ax2 = 5000,ay2 = 5000,bx1 = 0,by1 = 0,bx2 = 1,by2 = 1) == 100000000\n assert candidate(ax1 = -3,ay1 = -3,ax2 = 3,ay2 = 3,bx1 = -1,by1 = -1,bx2 = 1,by2 = 1) == 36\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 10,ay2 = 10,bx1 = 5,by1 = 5,bx2 = 15,by2 = 15) == 156\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = -20,by1 = -20,bx2 = -15,by2 = -15) == 425\n assert candidate(ax1 = 20,ay1 = 20,ax2 = 40,ay2 = 60,bx1 = 30,by1 = 40,bx2 = 50,by2 = 80) == 1400\n assert candidate(ax1 = -2,ay1 = 2,ax2 = 2,ay2 = 6,bx1 = 1,by1 = 4,bx2 = 3,by2 = 8) == 22\n assert candidate(ax1 = -800,ay1 = -800,ax2 = -700,ay2 = -700,bx1 = -750,by1 = -750,bx2 = -650,by2 = -650) == 17500\n assert candidate(ax1 = -1,ay1 = -1,ax2 = 1,ay2 = 1,bx1 = 1,by1 = 1,bx2 = 2,by2 = 2) == 5\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 1,ay2 = 1,bx1 = -5000,by1 = -5000,bx2 = 5000,by2 = 5000) == 100000000\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = 11,by1 = 11,bx2 = 20,by2 = 20) == 481\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = -5,by1 = -5,bx2 = 5,by2 = 5) == 400\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 5,ay2 = 5,bx1 = 5,by1 = 0,bx2 = 10,by2 = 5) == 50\n assert candidate(ax1 = -10000,ay1 = -10000,ax2 = 10000,ay2 = 10000,bx1 = -5000,by1 = -5000,bx2 = 5000,by2 = 5000) == 400000000\n assert candidate(ax1 = -200,ay1 = -200,ax2 = -100,ay2 = -100,bx1 = -150,by1 = -150,bx2 = -50,by2 = -50) == 17500\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 10,ay2 = 10,bx1 = 1,by1 = 1,bx2 = 9,by2 = 9) == 100\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 10000,ay2 = 10000,bx1 = 1,by1 = 1,bx2 = 9999,by2 = 9999) == 100000000\n assert candidate(ax1 = -100,ay1 = -100,ax2 = 100,ay2 = 100,bx1 = 0,by1 = 0,bx2 = 50,by2 = 50) == 40000\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = 5,by1 = 5,bx2 = 15,by2 = 15) == 475\n assert candidate(ax1 = -20,ay1 = -20,ax2 = 5,ay2 = 5,bx1 = -15,by1 = -15,bx2 = 0,by2 = 0) == 625\n assert candidate(ax1 = -1000,ay1 = -1000,ax2 = 1000,ay2 = 1000,bx1 = -500,by1 = -500,bx2 = 500,by2 = 500) == 4000000\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 5,ay2 = 5,bx1 = -5,by1 = -5,bx2 = 15,by2 = 15) == 525\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = 10,by1 = 10,bx2 = 20,by2 = 20) == 500\n assert candidate(ax1 = 10,ay1 = 20,ax2 = 30,ay2 = 40,bx1 = 25,by1 = 30,bx2 = 45,by2 = 50) == 750\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 1,ay2 = 1,bx1 = 1,by1 = 1,bx2 = 2,by2 = 2) == 2\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 1,ay2 = 1,bx1 = -1,by1 = -1,bx2 = 0,by2 = 0) == 2\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 5,ay2 = 5,bx1 = -5,by1 = -5,bx2 = 5,by2 = 5) == 100\n assert candidate(ax1 = -80,ay1 = -80,ax2 = -60,ay2 = -40,bx1 = -70,by1 = -70,bx2 = -50,by2 = -50) == 1000\n assert candidate(ax1 = -2,ay1 = -2,ax2 = 2,ay2 = 2,bx1 = -1,by1 = -1,bx2 = 1,by2 = 1) == 16\n assert candidate(ax1 = -50,ay1 = -50,ax2 = 50,ay2 = 50,bx1 = -30,by1 = -30,bx2 = 30,by2 = 30) == 10000\n assert candidate(ax1 = -500,ay1 = -500,ax2 = 500,ay2 = 500,bx1 = -300,by1 = -300,bx2 = 300,by2 = 300) == 1000000\n assert candidate(ax1 = 1,ay1 = 1,ax2 = 5,ay2 = 5,bx1 = 2,by1 = 2,bx2 = 6,by2 = 6) == 23\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 5,ay2 = 5,bx1 = 5,by1 = -5,bx2 = 15,by2 = 5) == 200\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = 0,by1 = -5,bx2 = 5,by2 = 5) == 400\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 10,ay2 = 10,bx1 = 5,by1 = 5,bx2 = 15,by2 = 15) == 175\n assert candidate(ax1 = -100,ay1 = -100,ax2 = 100,ay2 = 100,bx1 = -50,by1 = -50,bx2 = 50,by2 = 50) == 40000\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 0,ay2 = 0,bx1 = -5,by1 = -5,bx2 = 5,by2 = 5) == 175\n assert candidate(ax1 = -20,ay1 = -20,ax2 = -10,ay2 = -10,bx1 = -15,by1 = -15,bx2 = -5,by2 = -5) == 175\n assert candidate(ax1 = -50,ay1 = -50,ax2 = 50,ay2 = 50,bx1 = -60,by1 = -60,bx2 = 60,by2 = 60) == 14400\n assert candidate(ax1 = -1000,ay1 = -1000,ax2 = -500,ay2 = -500,bx1 = -750,by1 = -750,bx2 = -250,by2 = -250) == 437500\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 0,ay2 = 0,bx1 = 0,by1 = 0,bx2 = 10,by2 = 10) == 200\n assert candidate(ax1 = -500,ay1 = -500,ax2 = -200,ay2 = -200,bx1 = -400,by1 = -400,bx2 = -100,by2 = -100) == 140000\n assert candidate(ax1 = -100,ay1 = -100,ax2 = -50,ay2 = -50,bx1 = -75,by1 = -75,bx2 = -25,by2 = -25) == 4375\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = 5,by1 = -5,bx2 = 15,by2 = 5) == 450\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 10,ay2 = 20,bx1 = 5,by1 = 5,bx2 = 15,by2 = 15) == 250\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 0,ay2 = 0,bx1 = 0,by1 = 0,bx2 = 0,by2 = 0) == 0\n assert candidate(ax1 = -10,ay1 = -10,ax2 = 10,ay2 = 10,bx1 = 10,by1 = -10,bx2 = 20,by2 = 10) == 600\n assert candidate(ax1 = 10,ay1 = 10,ax2 = 20,ay2 = 20,bx1 = 15,by1 = 15,bx2 = 25,by2 = 25) == 175\n assert candidate(ax1 = -50,ay1 = -50,ax2 = 50,ay2 = 50,bx1 = -25,by1 = -25,bx2 = 25,by2 = 25) == 10000\n assert candidate(ax1 = 200,ay1 = 200,ax2 = 300,ay2 = 300,bx1 = 100,by1 = 100,bx2 = 250,by2 = 250) == 30000\n assert candidate(ax1 = 0,ay1 = 0,ax2 = 100,ay2 = 100,bx1 = 90,by1 = 90,bx2 = 200,by2 = 200) == 22000\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 5,ay2 = 5,bx1 = 6,by1 = 6,bx2 = 10,by2 = 10) == 116\n assert candidate(ax1 = 100,ay1 = 100,ax2 = 200,ay2 = 200,bx1 = 150,by1 = 150,bx2 = 250,by2 = 250) == 17500\n assert candidate(ax1 = -5,ay1 = -5,ax2 = 5,ay2 = 5,bx1 = 6,by1 = 6,bx2 = 11,by2 = 11) == 125\n assert candidate(ax1 = -1000,ay1 = -1000,ax2 = -900,ay2 = -900,bx1 = -950,by1 = -950,bx2 = -850,by2 = -850) == 17500\n", "comparison": "exact"}, "public_tests": ["-3\n0\n3\n4\n0\n-1\n9\n2", "-2\n-2\n2\n2\n-2\n-2\n2\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["ax1", "ay1", "ax2", "ay2", "bx1", "by1", "bx2", "by2"], "leetcode_dataset_entry_point": "Solution().computeArea", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:38+00:00", "tests_total": 76, "tests_dropped": 2, "flags": ["has_images"], "topic_tags": ["math", "geometry"]}, "language": "ruby", "interface": {"raw_signature": "def compute_area(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2)", "container": null, "callable": "compute_area", "parameters": [{"name": "ax1", "type": "Integer"}, {"name": "ay1", "type": "Integer"}, {"name": "ax2", "type": "Integer"}, {"name": "ay2", "type": "Integer"}, {"name": "bx1", "type": "Integer"}, {"name": "by1", "type": "Integer"}, {"name": "bx2", "type": "Integer"}, {"name": "by2", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 224, "task_id": "basic-calculator", "difficulty": "Hard", "problem_description": "Given a string s representing a valid expression, implement a basic calculator to evaluate it, and return the result of the evaluation.\n\nNote: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval().\n\nExample 1:\n\nInput: s = \"1 + 1\"\nOutput: 2\n\nExample 2:\n\nInput: s = \" 2-1 + 2 \"\nOutput: 3\n\nExample 3:\n\nInput: s = \"(1+(4+5+2)-3)+(6+8)\"\nOutput: 23\n\nConstraints:\n\n- 1 <= s.length <= 3 * 10^5\n- s consists of digits, '+', '-', '(', ')', and ' '.\n- s represents a valid expression.\n- '+' is not used as a unary operation (i.e., \"+1\" and \"+(2 + 3)\" is invalid).\n- '-' could be used as a unary operation (i.e., \"-1\" and \"-(2 + 3)\" is valid).\n- There will be no two consecutive operators in the input.\n- Every number and running calculation will fit in a signed 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"30 - (5 + (10 - 15) + 20)\") == 10\n assert candidate(s = \"2147483647\") == 2147483647\n assert candidate(s = \"-2147483647\") == -2147483647\n assert candidate(s = \"- (3 + (2 - 1))\") == -4\n assert candidate(s = \"1 + (2 + 3) + (4 + (5 + 6))\") == 21\n assert candidate(s = \"5 - (3 - (1 + 2))\") == 5\n assert candidate(s = \"(1-2+(3-(4-5)))\") == 3\n assert candidate(s = \" 2-1 + 2 \") == 3\n assert candidate(s = \"(1+(4+5+2)-3)+(6+8)\") == 23\n assert candidate(s = \"- (3 + (2 - 1) )\") == -4\n assert candidate(s = \"(1+(2+(3+(4+(5+(6+(7+(8+(9+(10)))))))))\") == 55\n assert candidate(s = \"((100 - 50) + (25 - 10))\") == 65\n assert candidate(s = \"10 + 20 - 5\") == 25\n assert candidate(s = \"- (5 - (- (1 + 1)))\") == -7\n assert candidate(s = \"-1 + (2 - (-3 + 4))\") == 0\n assert candidate(s = \"10 + (2 - 6)\") == 6\n assert candidate(s = \"-1 + (3-5)\") == -3\n assert candidate(s = \"10 - (-5 + 3)\") == 12\n assert candidate(s = \"(123 + (456 - 789))\") == -210\n assert candidate(s = \"(10 - (5 + 3))\") == 2\n assert candidate(s = \"(1 + (2 + (3 + (4 + 5))))\") == 15\n assert candidate(s = \"10 - (2 - (3 - 4))\") == 7\n assert candidate(s = \"10 + (2 - 3)\") == 9\n assert candidate(s = \"(5 + 15) - (10 + 20)\") == -10\n assert candidate(s = \"(123 + 456) - 789\") == -210\n assert candidate(s = \"1 - (2 - (3 - (4 - (5 - (6 - (7 - (8 - 9)))))))\") == 5\n assert candidate(s = \"- (5 + 10 + (15 - 20))\") == -10\n assert candidate(s = \"1 - (-1)\") == 2\n assert candidate(s = \"((1 + 3) + (5 + 7))\") == 16\n assert candidate(s = \"1 + 1\") == 2\n assert candidate(s = \"(100 - (50 + (25 - (12 + (6 - (3 + (1 - 1)))))))\") == 40\n assert candidate(s = \"10 - (5 - (3 - (2 - (1 - 0))))\") == 7\n assert candidate(s = \"-1 + (2 - (3 + (4 - (5 + (6 - (7 + (8 - 9)))))))\") == -1\n assert candidate(s = \"1 + (2 + (3 + (4 + (5 + (6 + (7 + (8 + (9 + 10))))))))\") == 55\n assert candidate(s = \"(1 - (2 - (3 - (4 - (5 - (6 - (7 - 8)))))))\") == -4\n assert candidate(s = \"(1 + (2 - (3 + (4 - (5 + 6)))))\") == 7\n assert candidate(s = \"(((((1 + 2) + 3) + 4) + 5) + 6)\") == 21\n assert candidate(s = \"( 10 - ( 20 - ( 30 - ( 40 - ( 50 - 60 ) ) ) ) )\") == -30\n assert candidate(s = \"(1 + (2 + (3 + (4 + (5 + 6)))))\") == 21\n assert candidate(s = \"(9 + (8 + (7 + (6 + (5 + (4 + (3 + (2 + 1))))))))\") == 45\n assert candidate(s = \"10 - (20 + (30 - (40 + (50 - 60))))\") == -10\n assert candidate(s = \"100 - (50 + (25 - (10 + (5 - (2 + (1 - (0 + 1)))))))\") == 38\n assert candidate(s = \"(1 + (2 + (3 + (4 + (5 + (6 + (7 + (8 + 9))))))))\") == 45\n assert candidate(s = \"100 + ((-200 + (300 - (400 + (500 - (600 + (700 - (800 + (900 - 1000))))))))\") == -200\n assert candidate(s = \"(100 - (50 - (25 - (10 - (5 - 1)))))\") == 69\n assert candidate(s = \"(9 + (8 - (7 + (6 - (5 + (4 - (3 + (2 - 1))))))))\") == 9\n assert candidate(s = \"10 - (20 - (30 - (40 - 50)))\") == 30\n assert candidate(s = \"((1 + (2 + (3 + (4 + (5 + (6 + (7 + (8 + (9 + 0)))))))))\") == 45\n assert candidate(s = \"(1 - (2 + (3 - (4 + (5 - (6 + (7 - (8 + 9))))))))\") == 9\n assert candidate(s = \"((10 + 20) - (30 + 40)) + (50 + (60 - (70 + (80 - (90 + (100 - (110 + (120 - 130))))))))\") == 10\n assert candidate(s = \"(1 + (4 + (5 + (2 - 3)) - 3)) + (6 + 8)\") == 20\n assert candidate(s = \"(1 + (2 - (3 + (4 - (5 + (6 - (7 + (8 - 9))))))))\") == 1\n assert candidate(s = \"1 - (2 + (3 - (4 - (5 - 6))))\") == 1\n assert candidate(s = \"(1 + (2 + (3 + (4 + (5 + (6 + (7 + 8)))))))\") == 36\n assert candidate(s = \"(1 + 2) + (3 + 4) + (5 + 6) + (7 + 8) + (9 + 10)\") == 55\n assert candidate(s = \"(123 - (45 + (67 - (89 + 10))) + 21)\") == 131\n assert candidate(s = \"- ( - ( - ( - ( - 1 ) ) ) )\") == -1\n assert candidate(s = \"- (3 + (4 - 5))\") == -2\n assert candidate(s = \"((((-1 + 2) - 3) + 4) - 5)\") == -3\n assert candidate(s = \"( 123 + ( 456 - ( 789 + ( 12 - 34 ) ) ) )\") == -188\n assert candidate(s = \"(10 + 20) - (30 + 40) + (50 - 60)\") == -50\n assert candidate(s = \"(5 + (10 + (15 + (20 + (25 + (30 + (35 + (40 + (45 + 50)))))))))\") == 275\n assert candidate(s = \"100 - ((99 - (98 - (97 - (96 - (95 - (94 - (93 - (92 - (91 - 90)))))))))\") == 5\n assert candidate(s = \"(123 - (456 + 789) + (101 - 202))\") == -1223\n assert candidate(s = \"- ( 2 + 3 ) + ( 4 - 5 )\") == -6\n assert candidate(s = \"(100 - (50 + (25 - (10 + (5 - 2)))))\") == 38\n assert candidate(s = \"1 + (2 + (3 + (4 + (5 + 6))))\") == 21\n assert candidate(s = \"(10 + 20) - ((30 + 40) - (50 + (60 - (70 + (80 - (90 + (100 - 110)))))))\") == 0\n assert candidate(s = \"(8 - (4 + (1 - 3) + (2 - (5 + 7))))\") == 16\n assert candidate(s = \"-((1 + 2) + (3 + 4)) + ((5 + 6) + (7 + 8))\") == 16\n assert candidate(s = \"(100 + 200 + (300 + (400 + (500 + (600 + (700 + (800 + 900)))))))\") == 4500\n assert candidate(s = \"10 - (9 - (8 - (7 - (6 - (5 - (4 - (3 - (2 - 1))))))))\") == 5\n assert candidate(s = \"1 - (-2 - (-3 - (-4)))\") == 4\n assert candidate(s = \"10 + 20 - 30 + (40 - 50)\") == -10\n assert candidate(s = \"123 + (456 - (789 + (101 - 202) ) )\") == -109\n assert candidate(s = \"-1 + (-2 + (-3 + (-4 + (-5))))\") == -15\n assert candidate(s = \"((100 - (50 + (25 - (10 + (5 - (2 + (1 - 0))))))) + (10 - 5))\") == 42\n assert candidate(s = \"(1 - (2 + (3 - (4 + (5 - 6)))))\") == -1\n assert candidate(s = \"(1 - (2 - (3 - (4 - (5 - (6 - (7 - (8 - 9)))))))\") == 5\n assert candidate(s = \"(10 + ((20 + 30) - (40 + (50 - (60 + (70 - 80))))))\") == 20\n assert candidate(s = \"1 + (2 - (3 + (4 - (5 + (6 - (7 + (8 - 9)))))))\") == 1\n assert candidate(s = \"1000 + (2000 - (3000 - (4000 - (5000 - (6000 - (7000 - 8000))))))\") == 6000\n assert candidate(s = \"(3 - (5 - (7 - (9 - (11 - (13 - (15 - 17))))))\") == -8\n", "comparison": "exact"}, "public_tests": ["\"1 + 1\"", "\" 2-1 + 2 \"", "\"(1+(4+5+2)-3)+(6+8)\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().calculate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:40+00:00", "tests_total": 174, "tests_dropped": 91, "flags": [], "topic_tags": ["math", "string", "stack", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def calculate(s)", "container": null, "callable": "calculate", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 227, "task_id": "basic-calculator-ii", "difficulty": "Medium", "problem_description": "Given a string s which represents an expression, evaluate this expression and return its value.\n\nThe integer division should truncate toward zero.\n\nYou may assume that the given expression is always valid. All intermediate results will be in the range of [-2^31, 2^31 - 1].\n\nNote: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval().\n\nExample 1:\n\nInput: s = \"3+2*2\"\nOutput: 7\n\nExample 2:\n\nInput: s = \" 3/2 \"\nOutput: 1\n\nExample 3:\n\nInput: s = \" 3+5 / 2 \"\nOutput: 5\n\nConstraints:\n\n- 1 <= s.length <= 3 * 10^5\n- s consists of integers and operators ('+', '-', '*', '/') separated by some number of spaces.\n- s represents a valid expression.\n- All the integers in the expression are non-negative integers in the range [0, 2^31 - 1].\n- The answer is guaranteed to fit in a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"2 - 3 + 4\") == 3\n assert candidate(s = \" 1000000000 - 500000000 + 250000000\") == 750000000\n assert candidate(s = \"1 + 1 * 1 + 1\") == 3\n assert candidate(s = \"2*3+4/5\") == 6\n assert candidate(s = \"0 + 0\") == 0\n assert candidate(s = \"100*2+12\") == 212\n assert candidate(s = \"2147483647 + 1 - 1\") == 2147483647\n assert candidate(s = \"100000 + 100000 - 50000 * 2 + 25000 * 4 / 5\") == 120000\n assert candidate(s = \"100 * 2 + 12\") == 212\n assert candidate(s = \" 200 - 3 * 50 + 25\") == 75\n assert candidate(s = \"10 + 2 * 6\") == 22\n assert candidate(s = \"3+2*2\") == 7\n assert candidate(s = \" 30 + 2 * 6 - 12 / 3 \") == 38\n assert candidate(s = \" 3+5 / 2 \") == 5\n assert candidate(s = \"1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10\") == 3628800\n assert candidate(s = \"100 * 2 / 25\") == 8\n assert candidate(s = \" 0 + 0 * 1 / 1\") == 0\n assert candidate(s = \" 3/2 \") == 1\n assert candidate(s = \"2147483647 - 2147483646\") == 1\n assert candidate(s = \"3+5 / 2 * 3\") == 9\n assert candidate(s = \"3 + 2 * 2 + 1 - 5 / 2\") == 6\n assert candidate(s = \"10 * 5 + 3\") == 53\n assert candidate(s = \"3+5-2*3/4\") == 7\n assert candidate(s = \"3 + 5 / 2 + 3\") == 8\n assert candidate(s = \"1000 / 10 / 10\") == 10\n assert candidate(s = \"3 + 5 / 2 - 8 * 3 + 4 / 2\") == -17\n assert candidate(s = \"1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1\") == 10\n assert candidate(s = \" 30 / 3 + 10 * 2 - 5\") == 25\n assert candidate(s = \" 1 + 2 * 3 / 4 + 5 * 6 - 7\") == 25\n assert candidate(s = \"2147483647 / 1\") == 2147483647\n assert candidate(s = \"1 - 1 + 1\") == 1\n assert candidate(s = \"2*3+4/5*6-7+8\") == 7\n assert candidate(s = \"10 + 2 - 5\") == 7\n assert candidate(s = \" 30 /3 + 10 * 2 \") == 30\n assert candidate(s = \"2 * 3 + 4 / 5\") == 6\n assert candidate(s = \"3 + 2 * 2 + 1\") == 8\n assert candidate(s = \"10+2*6\") == 22\n assert candidate(s = \"123 + 456 * 789 / 100 - 987\") == 2733\n assert candidate(s = \"1000 - 500 * 2 + 250 / 5\") == 50\n assert candidate(s = \" 100000 - 50000 * 2 + 25000 / 5000 * 20000\") == 100000\n assert candidate(s = \"987654 * 321 / 123 - 456789 + 987654\") == 3108401\n assert candidate(s = \" 8 * 5 / 4 + 3 - 1\") == 12\n assert candidate(s = \" 2000 / 10 + 50 * 2 - 300 \") == 0\n assert candidate(s = \" 1234 + 567 * 89 - 101112 / 1314\") == 51621\n assert candidate(s = \"1 * 2 + 3 * 4 + 5 * 6 + 7 * 8 + 9 * 10\") == 190\n assert candidate(s = \"100 / 10 - 90 * 0 + 80 / 8\") == 20\n assert candidate(s = \" 1000000 - 500000 + 250000 * 2 - 125000 \") == 875000\n assert candidate(s = \"1000 - 500 * 2 / 5 + 300 / 3\") == 900\n assert candidate(s = \" 200 * 5 + 300 / 100 - 10 \") == 993\n assert candidate(s = \"123 + 456 * 789 - 101112 / 1314\") == 359831\n assert candidate(s = \" 5 + 4 - 3 * 2 + 1 / 1\") == 4\n assert candidate(s = \"7 * 8 * 9 / 6 + 5 - 3 * 2\") == 83\n assert candidate(s = \"300 + 200 * 5 / 10 - 25\") == 375\n assert candidate(s = \"100 * 200 / 500 + 200 - 100\") == 140\n assert candidate(s = \"100000 / 100 - 99999 * 0 + 1\") == 1001\n assert candidate(s = \" 23 + 56 * 99 / 77 - 44 \") == 51\n assert candidate(s = \"100 * 2 + 12 / 3 - 5\") == 199\n assert candidate(s = \" 123 + 456 - 789 * 0 / 1 + 1000 \") == 1579\n assert candidate(s = \"33 + 22 * 11 - 44 / 11 + 55\") == 326\n assert candidate(s = \"3 * 3 * 3 * 3 * 3 - 3 * 3 * 3 + 3\") == 219\n assert candidate(s = \"2147483647 - 2147483646 + 1\") == 2\n assert candidate(s = \"999999 + 1 - 999999 * 0 + 999999 / 1\") == 1999999\n assert candidate(s = \"12 + 34 * 56 / 78 - 90 + 12\") == -42\n assert candidate(s = \"2 + 3 * 5 / 2 - 8 / 4 + 6\") == 13\n assert candidate(s = \"5 * 5 * 5 * 5 * 5 / 5 + 5 - 5\") == 625\n assert candidate(s = \"3 * 3 + 3 / 3 * 3 - 3\") == 9\n assert candidate(s = \" 100 - 25 * 2 + 50 / 5 - 10\") == 50\n assert candidate(s = \"333333 + 222222 * 1 - 111111 / 1\") == 444444\n assert candidate(s = \"2222 + 1111 * 2 - 3333 / 11 + 4444\") == 8585\n assert candidate(s = \" 1000 - 500 * 2 + 250 / 50 * 20\") == 100\n assert candidate(s = \" 99 * 100 - 99 * 99 + 99 * 98\") == 9801\n assert candidate(s = \"10000 / 1000 + 200 * 2 - 500\") == -90\n assert candidate(s = \" 33333 + 22222 - 11111 + 44444 * 55555 / 66666\") == 81480\n assert candidate(s = \"1000 * 2 / 25 + 100 - 50\") == 130\n assert candidate(s = \"123456789 + 987654321 * 1 - 123456789 / 1\") == 987654321\n assert candidate(s = \"100 * 2 + 3 * 5 / 15 - 10\") == 191\n assert candidate(s = \"1000 * 5 / 25 + 20 - 40\") == 180\n assert candidate(s = \" 200 + 50 / 5 - 30 * 2 + 10\") == 160\n assert candidate(s = \"32 / 2 * 2 + 1 - 1\") == 32\n assert candidate(s = \" 987654321 - 123456789 + 98765 * 43210 / 54321\") == 864276095\n assert candidate(s = \" 1234 + 5678 * 90 / 100 - 12345 / 5 \") == 3875\n assert candidate(s = \" 3 + 8 * 10 / 5 - 2 \") == 17\n assert candidate(s = \" 10 * 20 - 5 * 4 + 3 * 2 - 1 / 1 + 8 * 2\") == 201\n assert candidate(s = \" 99 + 99 * 99 / 99 - 99 \") == 99\n assert candidate(s = \"100 - 50 + 25 - 12 + 6 - 3 + 1\") == 67\n assert candidate(s = \"1000 * 2 + 300 - 50 / 2\") == 2275\n assert candidate(s = \"333 * 111 + 222 * 444 / 666 - 777 + 888\") == 37222\n assert candidate(s = \"2 * 3 + 4 * 5 - 6 / 2 + 7\") == 30\n assert candidate(s = \" 123 + 456 * 789 / 321 \") == 1243\n assert candidate(s = \"3 + 5 * 2 / 2 - 1\") == 7\n assert candidate(s = \" 1000 + 2000 * 3000 - 4000 / 5000 + 6000 - 7000 * 8000 / 9000 \") == 6000778\n assert candidate(s = \"10 * 10 - 9 * 9 + 8 * 8 - 7 * 7 + 6 * 6\") == 70\n assert candidate(s = \" 1000 * 2000 - 3000 + 4000 / 5000 * 6000\") == 1997000\n assert candidate(s = \" 100 + 200 - 300 * 400 / 500 + 600 * 700 / 800\") == 585\n assert candidate(s = \" 4 + 5 * 6 / 3 - 7 + 8 * 2\") == 23\n assert candidate(s = \" 1234 + 5678 - 91011 * 121314 / 151617\") == -65909\n assert candidate(s = \" 999 + 1 * 1000 - 500 / 2 \") == 1749\n assert candidate(s = \" 100 * 2 + 3 - 4 / 2 \") == 201\n assert candidate(s = \" 0 + 0 * 0 - 0 / 1\") == 0\n assert candidate(s = \" 7 + 14 / 7 - 3 + 6 * 2\") == 18\n assert candidate(s = \"0 * 1 + 2 - 3 / 4 * 5\") == 2\n assert candidate(s = \" 123 + 456 * 789 / 101 - 234\") == 3451\n assert candidate(s = \" 12345 + 67890 - 54321 / 1234 * 5678 \") == -169597\n assert candidate(s = \" 123 + 456 - 789 * 1011 / 1213\") == -78\n assert candidate(s = \" 3 * 5 / 15 + 10 - 7 \") == 4\n assert candidate(s = \" 100 - 50 + 25 * 4 / 2 \") == 100\n assert candidate(s = \" 99999 + 88888 - 77777 * 66666 / 55555\") == 95555\n assert candidate(s = \"999999 / 3 + 999999 / 3 - 999999 / 3\") == 333333\n assert candidate(s = \" 2 * 3 + 4 * 5 - 6 / 3 + 8\") == 32\n assert candidate(s = \"987654 * 321 / 1000 + 123456 - 789012 / 3\") == 177488\n assert candidate(s = \" 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 \") == 3628800\n assert candidate(s = \" 42 * 2 - 5 / 1 + 3 \") == 82\n assert candidate(s = \"30 / 5 * 2 - 1 + 4 * 8 - 3\") == 40\n assert candidate(s = \" 123456789 + 987654321 - 111111111 * 222222222 / 333333333\") == 1037037036\n assert candidate(s = \"123 + 456 * 789 / 101 - 234\") == 3451\n assert candidate(s = \"1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10\") == 55\n assert candidate(s = \"987654321 - 123456789 + 111111111 * 222222222 / 333333333 \") == 938271606\n assert candidate(s = \" 5 * 6 + 20 / 4 - 8\") == 27\n assert candidate(s = \"1000000 + 500000 * 2 - 250000 / 5 + 125000\") == 2075000\n assert candidate(s = \"2 + 3 * 4 - 5 / 2 + 6 * 7 - 8 / 4\") == 52\n assert candidate(s = \" 1000 - 500 + 250 * 2 - 125 \") == 875\n assert candidate(s = \"0 * 0 + 0 / 1 + 100 - 50\") == 50\n assert candidate(s = \" 7 * 8 - 3 + 2 * 4 \") == 61\n assert candidate(s = \"9 * 3 + 2 - 1 / 1 + 8 * 2\") == 44\n assert candidate(s = \"50 * 50 - 50 / 50 + 50 * 50 - 50 / 50\") == 4998\n assert candidate(s = \"100 * 2 + 12 / 3 - 50\") == 154\n assert candidate(s = \"3 + 33 + 333 + 3333 + 33333 + 333333 + 3333333 + 33333333 + 333333333\") == 370370367\n assert candidate(s = \"1 + 2 * 3 + 4 / 2 - 5\") == 4\n", "comparison": "exact"}, "public_tests": ["\"3+2*2\"", "\" 3/2 \"", "\" 3+5 / 2 \""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().calculate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:45+00:00", "tests_total": 171, "tests_dropped": 43, "flags": [], "topic_tags": ["math", "string", "stack"]}, "language": "ruby", "interface": {"raw_signature": "def calculate(s)", "container": null, "callable": "calculate", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 228, "task_id": "summary-ranges", "difficulty": "Easy", "problem_description": "You are given a sorted unique integer array nums.\n\nA range [a,b] is the set of all integers from a to b (inclusive).\n\nReturn the smallest sorted list of ranges that cover all the numbers in the array exactly. That is, each element of nums is covered by exactly one of the ranges, and there is no integer x such that x is in one of the ranges but not in nums.\n\nEach range [a,b] in the list should be output as:\n\n- \"a->b\" if a != b\n- \"a\" if a == b\n\nExample 1:\n\nInput: nums = [0,1,2,4,5,7]\nOutput: [\"0->2\",\"4->5\",\"7\"]\nExplanation: The ranges are:\n[0,2] --> \"0->2\"\n[4,5] --> \"4->5\"\n[7,7] --> \"7\"\n\nExample 2:\n\nInput: nums = [0,2,3,4,6,8,9]\nOutput: [\"0\",\"2->4\",\"6\",\"8->9\"]\nExplanation: The ranges are:\n[0,0] --> \"0\"\n[2,4] --> \"2->4\"\n[6,6] --> \"6\"\n[8,9] --> \"8->9\"\n\nConstraints:\n\n- 0 <= nums.length <= 20\n- -2^31 <= nums[i] <= 2^31 - 1\n- All the values of nums are unique.\n- nums is sorted in ascending order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 1, 2, 3, 4, 5]) == ['0->5']\n assert candidate(nums = [-1, 0, 1, 2, 3, 5, 6, 7, 8, 10]) == ['-1->3', '5->8', '10']\n assert candidate(nums = [-2147483648, -2147483647, -2147483646]) == ['-2147483648->-2147483646']\n assert candidate(nums = [1, 3, 5, 7, 9]) == ['1', '3', '5', '7', '9']\n assert candidate(nums = [5, 6, 7, 9, 10, 11, 13, 14, 15, 16]) == ['5->7', '9->11', '13->16']\n assert candidate(nums = [1]) == ['1']\n assert candidate(nums = [-2, -1, 0, 1, 3, 4, 6, 8]) == ['-2->1', '3->4', '6', '8']\n assert candidate(nums = [-2147483648, -2147483647, 0, 2147483646, 2147483647]) == ['-2147483648->-2147483647', '0', '2147483646->2147483647']\n assert candidate(nums = [1, 2, 3, 6, 8, 9, 10, 12, 13, 14]) == ['1->3', '6', '8->10', '12->14']\n assert candidate(nums = [0, 1, 2, 4, 5, 7]) == ['0->2', '4->5', '7']\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == ['0', '2', '4', '6', '8', '10', '12', '14', '16', '18', '20']\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19']\n assert candidate(nums = [-1, 0, 1, 2, 3]) == ['-1->3']\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 9, 10, 11, 13]) == ['1->3', '5->7', '9->11', '13']\n assert candidate(nums = [5, 6, 7, 20, 21, 22, 23]) == ['5->7', '20->23']\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == ['-10->-1']\n assert candidate(nums = []) == []\n assert candidate(nums = [2147483646, 2147483647]) == ['2147483646->2147483647']\n assert candidate(nums = [0]) == ['0']\n assert candidate(nums = [0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == ['0->1', '3', '5', '7', '9', '11', '13', '15', '17', '19']\n assert candidate(nums = [-2147483648, -2147483647, 2147483647]) == ['-2147483648->-2147483647', '2147483647']\n assert candidate(nums = [1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17]) == ['1->5', '7->11', '13->17']\n assert candidate(nums = [0, 2, 3, 4, 6, 8, 9]) == ['0', '2->4', '6', '8->9']\n assert candidate(nums = [10, 11, 12, 15, 20, 21, 22, 23, 24, 30]) == ['10->12', '15', '20->24', '30']\n assert candidate(nums = [10, 11, 12, 15, 16, 17, 20, 21, 22, 23]) == ['10->12', '15->17', '20->23']\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31]) == ['1', '4', '7', '10', '13', '16', '19', '22', '25', '28', '31']\n assert candidate(nums = [-2147483648, -2147483647, -2147483646, 0, 2147483646, 2147483647]) == ['-2147483648->-2147483646', '0', '2147483646->2147483647']\n assert candidate(nums = [1, 2, 3]) == ['1->3']\n assert candidate(nums = [-1, 0, 1, 2, 4, 5, 7]) == ['-1->2', '4->5', '7']\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109]) == ['100->109']\n assert candidate(nums = [0, 2, 4, 6, 8]) == ['0', '2', '4', '6', '8']\n assert candidate(nums = [5]) == ['5']\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == ['1->15']\n assert candidate(nums = [10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 27, 28, 30, 31, 32, 34, 35]) == ['10->12', '14->16', '18->20', '22->24', '26->28', '30->32', '34->35']\n assert candidate(nums = [1, 4, 5, 6, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28]) == ['1', '4->6', '8->9', '11->13', '15->17', '19->21', '23->25', '27->28']\n assert candidate(nums = [50, 51, 52, 54, 55, 57, 58, 59, 61, 63, 64, 65, 67, 68, 70, 71, 72, 74, 75, 76]) == ['50->52', '54->55', '57->59', '61', '63->65', '67->68', '70->72', '74->76']\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', '31']\n assert candidate(nums = [-10, -9, -8, -5, -4, -3, -1, 0, 1, 2, 4, 5, 6, 8, 9, 10]) == ['-10->-8', '-5->-3', '-1->2', '4->6', '8->10']\n assert candidate(nums = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29]) == ['1->2', '4->5', '7->8', '10->11', '13->14', '16->17', '19->20', '22->23', '25->26', '28->29']\n assert candidate(nums = [0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 18, 20, 21, 22, 24, 25]) == ['0->3', '5->7', '9->11', '13->15', '17->18', '20->22', '24->25']\n assert candidate(nums = [100, 101, 102, 104, 105, 107, 108, 109, 111, 112, 113, 114, 116, 117, 118, 119, 120]) == ['100->102', '104->105', '107->109', '111->114', '116->120']\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', '31', '33', '35', '37', '39']\n assert candidate(nums = [100, 101, 102, 104, 105, 106, 108, 109, 110, 112, 113, 114, 115, 116]) == ['100->102', '104->106', '108->110', '112->116']\n assert candidate(nums = [-5, -3, -1, 2, 5, 7, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48]) == ['-5', '-3', '-1', '2', '5', '7', '9', '12', '15', '18', '21', '24', '27', '30', '33', '36', '39', '42', '45', '48']\n assert candidate(nums = [1, 4, 5, 6, 10, 11, 12, 15, 16, 17, 20, 21, 22, 23, 25, 26, 27, 28]) == ['1', '4->6', '10->12', '15->17', '20->23', '25->28']\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22]) == ['1->3', '5->7', '9->12', '14->16', '18->20', '22']\n assert candidate(nums = [-1000, -999, -998, -996, -995, -993, -992, -991, -989, -988, -987, -985, -984, -983, -981, -980, -979, -977, -976, -975]) == ['-1000->-998', '-996->-995', '-993->-991', '-989->-987', '-985->-983', '-981->-979', '-977->-975']\n assert candidate(nums = [-2, -1, 1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26]) == ['-2->-1', '1->2', '4->5', '7->8', '10->11', '13->14', '16->17', '19->20', '22->23', '25->26']\n assert candidate(nums = [1000, 1001, 1002, 1004, 1005, 1007, 1008, 1009, 1011, 1012, 1013, 1015, 1016, 1017, 1019, 1020, 1021]) == ['1000->1002', '1004->1005', '1007->1009', '1011->1013', '1015->1017', '1019->1021']\n assert candidate(nums = [1, 2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 17, 18, 20]) == ['1->3', '5->6', '8->9', '11->13', '15->18', '20']\n assert candidate(nums = [-10, -9, -8, -6, -5, -3, -2, -1, 0, 1, 3, 4, 5, 7, 8, 10, 11, 12]) == ['-10->-8', '-6->-5', '-3->1', '3->5', '7->8', '10->12']\n assert candidate(nums = [100, 101, 102, 104, 105, 106, 108, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119]) == ['100->102', '104->106', '108->111', '113->119']\n assert candidate(nums = [-2147483648, -2147483647, -2147483646, -2147483645, -2147483644]) == ['-2147483648->-2147483644']\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 10, 11, 12, 15, 16, 17, 18, 20]) == ['1->3', '5->7', '10->12', '15->18', '20']\n assert candidate(nums = [-10, -9, -8, -6, -5, -4, -2, -1, 0, 1, 2, 4, 5, 6, 8, 9, 10]) == ['-10->-8', '-6->-4', '-2->2', '4->6', '8->10']\n assert candidate(nums = [42]) == ['42']\n assert candidate(nums = [-10, -9, -8, -6, -5, -4, -2, -1, 0, 1, 2, 3, 5, 6, 7, 8, 10]) == ['-10->-8', '-6->-4', '-2->3', '5->8', '10']\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29']\n assert candidate(nums = [10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38]) == ['10->11', '13->14', '16->17', '19->20', '22->23', '25->26', '28->29', '31->32', '34->35', '37->38']\n assert candidate(nums = [0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28]) == ['0->1', '3->4', '6->7', '9->10', '12->13', '15->16', '18->19', '21->22', '24->25', '27->28']\n assert candidate(nums = [1000, 1001, 1002, 1004, 1005, 1006, 1008, 1009, 1010, 1011, 1013, 1014, 1015, 1016, 1017, 1018, 1019]) == ['1000->1002', '1004->1006', '1008->1011', '1013->1019']\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 8, 10, 11, 12, 15, 16, 18, 19, 20, 21, 23]) == ['1->3', '5->8', '10->12', '15->16', '18->21', '23']\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 200, 201, 202, 300]) == ['100->105', '200->202', '300']\n assert candidate(nums = [100, 101, 104, 105, 106, 110, 111, 112, 113, 114, 115]) == ['100->101', '104->106', '110->115']\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58]) == ['1', '4', '7', '10', '13', '16', '19', '22', '25', '28', '31', '34', '37', '40', '43', '46', '49', '52', '55', '58']\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 15, 16, 17, 19, 21, 22, 23, 25, 27, 28]) == ['1->3', '5->7', '9->11', '13', '15->17', '19', '21->23', '25', '27->28']\n assert candidate(nums = [-10, -9, -8, -6, -5, -3, -2, -1, 0, 1, 2, 3, 5, 6, 7, 9, 10, 11]) == ['-10->-8', '-6->-5', '-3->3', '5->7', '9->11']\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == ['0->19']\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == ['1->20']\n assert candidate(nums = [3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 17, 18, 19, 21, 22, 23, 25, 27, 28, 29]) == ['3->5', '7->9', '11->13', '15', '17->19', '21->23', '25', '27->29']\n assert candidate(nums = [1, 2, 3, 8, 9, 10, 12, 13, 14, 15, 20, 21, 22, 23, 24, 25]) == ['1->3', '8->10', '12->15', '20->25']\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946]) == ['1->3', '5', '8', '13', '21', '34', '55', '89', '144', '233', '377', '610', '987', '1597', '2584', '4181', '6765', '10946']\n assert candidate(nums = [1, 2, 3, 5, 6, 8, 9, 11, 12, 13, 15, 16, 17, 18, 20, 21, 22, 23, 25]) == ['1->3', '5->6', '8->9', '11->13', '15->18', '20->23', '25']\n assert candidate(nums = [1, 2, 3, 5, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 20]) == ['1->3', '5', '7->8', '10->13', '15->18', '20']\n assert candidate(nums = [-5, -3, -2, -1, 1, 2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 14, 15]) == ['-5', '-3->-1', '1->4', '6->8', '10->15']\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19]) == ['-5->0', '2->4', '6->8', '10->12', '14->16', '18->19']\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000004, 1000000005, 1000000006, 1000000008]) == ['1000000000->1000000002', '1000000004->1000000006', '1000000008']\n assert candidate(nums = [1000, 1001, 1003, 1004, 1006, 1007, 1008, 1010, 1012, 1013, 1014, 1016, 1017, 1019, 1020, 1021, 1023, 1025, 1026, 1027]) == ['1000->1001', '1003->1004', '1006->1008', '1010', '1012->1014', '1016->1017', '1019->1021', '1023', '1025->1027']\n assert candidate(nums = [-10, -8, -7, -5, -4, -3, 0, 1, 2, 3, 8, 9, 10, 12, 14, 15, 16, 17, 20, 21]) == ['-10', '-8->-7', '-5->-3', '0->3', '8->10', '12', '14->17', '20->21']\n assert candidate(nums = [1, 2, 3, 10, 11, 12, 20, 21, 22, 30, 31, 32, 40, 41, 42, 50, 51, 52, 60, 61]) == ['1->3', '10->12', '20->22', '30->32', '40->42', '50->52', '60->61']\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]) == ['1->2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', '16384', '32768']\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43]) == ['5', '7', '9', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', '31', '33', '35', '37', '39', '41', '43']\n assert candidate(nums = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29]) == ['1->2', '4->5', '7->8', '10->11', '13->14', '16->17', '19->20', '22->23', '25->26', '28->29']\n assert candidate(nums = [-1, 0, 1, 3, 4, 5, 7, 8, 9, 11, 13, 14, 15, 17, 18, 19, 21, 22, 24, 25]) == ['-1->1', '3->5', '7->9', '11', '13->15', '17->19', '21->22', '24->25']\n assert candidate(nums = [100, 101, 102, 105, 106, 107, 108, 110, 111, 112, 113, 114, 116, 117, 118, 119]) == ['100->102', '105->108', '110->114', '116->119']\n assert candidate(nums = [100, 101, 102, 104, 105, 106, 108, 110, 111, 112, 114, 116, 117, 118, 120, 121, 122, 124, 126, 127]) == ['100->102', '104->106', '108', '110->112', '114', '116->118', '120->122', '124', '126->127']\n assert candidate(nums = [-10, -9, -8, -6, -5, -3, -2, -1, 0, 1, 2, 3, 5, 6, 7, 8]) == ['-10->-8', '-6->-5', '-3->3', '5->8']\n assert candidate(nums = [100, 101, 102, 103, 105, 106, 107, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119]) == ['100->103', '105->107', '109->113', '115->119']\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33]) == ['1', '3', '5', '7', '9', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', '31', '33']\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41]) == ['5', '7', '9', '11', '13', '15', '17', '19', '21', '23', '25', '27', '29', '31', '33', '35', '37', '39', '41']\n assert candidate(nums = [100, 101, 102, 104, 105, 107, 108, 109, 110, 111, 112, 113]) == ['100->102', '104->105', '107->113']\n assert candidate(nums = [1000, 1001, 1002, 1004, 1005, 1006, 1008, 1009, 1010, 1011, 1012]) == ['1000->1002', '1004->1006', '1008->1012']\n assert candidate(nums = [1, 2, 3, 5, 7, 8, 9, 11, 12, 13, 15, 17, 18, 19, 20]) == ['1->3', '5', '7->9', '11->13', '15', '17->20']\n assert candidate(nums = [0, 1, 3, 4, 5, 7, 8, 9, 10, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24]) == ['0->1', '3->5', '7->10', '12->15', '17->21', '23->24']\n", "comparison": "exact"}, "public_tests": ["[0,1,2,4,5,7]", "[0,2,3,4,6,8,9]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().summaryRanges", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:48+00:00", "tests_total": 120, "tests_dropped": 26, "flags": [], "topic_tags": ["array"]}, "language": "ruby", "interface": {"raw_signature": "def summary_ranges(nums)", "container": null, "callable": "summary_ranges", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 229, "task_id": "majority-element-ii", "difficulty": "Medium", "problem_description": "Given an integer array of size n, find all elements that appear more than ⌊n / 3⌋ times.\n\nExample 1:\n\nInput: nums = [3,2,3]\nOutput: [3]\n\nExample 2:\n\nInput: nums = [1]\nOutput: [1]\n\nExample 3:\n\nInput: nums = [1,2]\nOutput: [1,2]\n\nConstraints:\n\n- 1 <= nums.length <= 5 * 10^4\n- -10^9 <= nums[i] <= 10^9\n\nFollow up: Could you solve the problem in linear time and in O(1) space?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [3, 2, 3]) == [3]\n assert candidate(nums = [1]) == [1]\n assert candidate(nums = [1, 2]) == [2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1]) == []\n assert candidate(nums = [3, 3, 4, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [3]\n assert candidate(nums = [1, 1, 1, 3, 3, 2, 2, 2]) == [2, 1]\n assert candidate(nums = [2, 2, 1, 1, 1, 2, 2]) == [2, 1]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == []\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 2, 3, 4, 5, 6, 7, 8, 9]) == [10]\n assert candidate(nums = [2, 2, 1, 3]) == [2]\n assert candidate(nums = [4, 1, 2, 3, 4, 2, 3, 4, 5, 6, 7, 8, 9, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) == [4]\n assert candidate(nums = [-1, -2, -3, -1, -1, -1, 0]) == [-1]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1]) == [1]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [5, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == []\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == [2, 1]\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0]\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7]\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == [1000000000]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4]) == []\n assert candidate(nums = [10, 20, 10, 10, 30, 20, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]) == [20]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == []\n assert candidate(nums = [10, 20, 10, 10, 30, 10, 40, 10, 50, 10, 60, 10, 70, 10, 80, 10, 90, 10, 10, 10, 10, 10]) == [10]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == []\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000]) == [1000000000, -1000000000]\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1]\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == []\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == [6]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5]) == []\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == []\n assert candidate(nums = [10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30, 10, 20, 30]) == []\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90, 90, 10, 20, 30, 40, 50, 60, 70, 80, 90, 10, 20, 30, 40, 50, 60, 70, 80, 90, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == []\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == [9]\n assert candidate(nums = [-1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3, -1, -2, -3]) == []\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == []\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == []\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert candidate(nums = [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42]) == [42]\n assert candidate(nums = [100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200]) == [100, 200]\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7]\n assert candidate(nums = [10, 20, 10, 10, 30, 10, 40, 10, 10, 50, 60, 10, 10, 70, 10, 10, 80, 10, 10, 90, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == [10]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [5]\n assert candidate(nums = [100, 200, 300, 100, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200]) == [100, 200]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == []\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, -1000000000, -1000000000, -1000000000, -1000000000]) == [1000000000, -1000000000]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0]\n assert candidate(nums = [9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3]) == [9, 3]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == []\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == []\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7]\n assert candidate(nums = [-1, -2, -3, -4, -1, -2, -3, -4, -1, -2, -3, -4, -1, -2, -3, -4, -1, -2, -3, -4, -1, -2, -3, -4, -1, -2, -3, -4, -1, -1, -1, -1]) == [-1]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2]) == [2, 1]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == []\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 10, 10, 20, 20, 30, 30, 10, 10, 20, 20, 30, 30, 10, 10, 20, 20, 30, 30, 10, 10, 20, 20, 30]) == [10, 20]\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9]) == []\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == []\n assert candidate(nums = [5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [5]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == []\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == [7]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30]) == []\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == []\n assert candidate(nums = [999999999, -999999999, 0, 999999999, -999999999, 0, 999999999, -999999999, 0, 999999999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0]\n assert candidate(nums = [-1, -1, -1, -1, -1, -2, -2, -3, -3, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4]) == [-4]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [5]\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == []\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == []\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == []\n", "comparison": "exact"}, "public_tests": ["[3,2,3]", "[1]", "[1,2]"], "hints": ["Think about the possible number of elements that can appear more than ⌊ n/3 ⌋ times in the array.", "It can be at most two. Why?", "Consider using Boyer-Moore Voting Algorithm, which is efficient for finding elements that appear more than a certain threshold."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().majorityElement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:50+00:00", "tests_total": 77, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "sorting", "counting", "boyer-moore-majority-vote-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def majority_element(nums)", "container": null, "callable": "majority_element", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 231, "task_id": "power-of-two", "difficulty": "Easy", "problem_description": "Given an integer n, return true if it is a power of two. Otherwise, return false.\n\nAn integer n is a power of two, if there exists an integer x such that n == 2^x.\n\nExample 1:\n\nInput: n = 1\nOutput: true\nExplanation: 2^0 = 1\n\nExample 2:\n\nInput: n = 16\nOutput: true\nExplanation: 2^4 = 16\n\nExample 3:\n\nInput: n = 3\nOutput: false\n\nConstraints:\n\n- -2^31 <= n <= 2^31 - 1\n\nFollow up: Could you solve it without loops/recursion?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == False\n assert candidate(n = 2097152) == True\n assert candidate(n = -16) == False\n assert candidate(n = 67108864) == True\n assert candidate(n = 4096) == True\n assert candidate(n = 2147483647) == False\n assert candidate(n = 536870912) == True\n assert candidate(n = 524288) == True\n assert candidate(n = 268435456) == True\n assert candidate(n = 16384) == True\n assert candidate(n = 16777216) == True\n assert candidate(n = -1) == False\n assert candidate(n = 4) == True\n assert candidate(n = 64) == True\n assert candidate(n = 16) == True\n assert candidate(n = 134217728) == True\n assert candidate(n = 4194304) == True\n assert candidate(n = 2) == True\n assert candidate(n = 33554432) == True\n assert candidate(n = 1024) == True\n assert candidate(n = 128) == True\n assert candidate(n = 0) == False\n assert candidate(n = 1073741824) == True\n assert candidate(n = 8) == True\n assert candidate(n = 1048576) == True\n assert candidate(n = 8192) == True\n assert candidate(n = 2048) == True\n assert candidate(n = 65536) == True\n assert candidate(n = 256) == True\n assert candidate(n = 32) == True\n assert candidate(n = 262144) == True\n assert candidate(n = 131072) == True\n assert candidate(n = 32768) == True\n assert candidate(n = 512) == True\n assert candidate(n = 1) == True\n assert candidate(n = 8388608) == True\n assert candidate(n = 262143) == False\n assert candidate(n = 2047) == False\n assert candidate(n = 5) == False\n assert candidate(n = 23) == False\n assert candidate(n = -2147483648) == False\n assert candidate(n = 8191) == False\n assert candidate(n = 27) == False\n assert candidate(n = 1000000000) == False\n assert candidate(n = 24) == False\n assert candidate(n = -4) == False\n assert candidate(n = 11) == False\n assert candidate(n = 1048575) == False\n assert candidate(n = 29) == False\n assert candidate(n = 131071) == False\n assert candidate(n = -128) == False\n assert candidate(n = 21) == False\n assert candidate(n = -2) == False\n assert candidate(n = 524287) == False\n assert candidate(n = 268435455) == False\n assert candidate(n = 28) == False\n assert candidate(n = 17) == False\n assert candidate(n = 1073741823) == False\n assert candidate(n = 16777215) == False\n assert candidate(n = 9) == False\n assert candidate(n = -8) == False\n assert candidate(n = 6) == False\n assert candidate(n = 10) == False\n assert candidate(n = 63) == False\n assert candidate(n = 67108863) == False\n assert candidate(n = 32767) == False\n assert candidate(n = 511) == False\n assert candidate(n = 4194303) == False\n assert candidate(n = 30) == False\n assert candidate(n = 255) == False\n assert candidate(n = 18) == False\n assert candidate(n = 1023) == False\n assert candidate(n = 127) == False\n assert candidate(n = 15) == False\n assert candidate(n = 14) == False\n assert candidate(n = 26) == False\n assert candidate(n = 536870911) == False\n assert candidate(n = 1000000) == False\n assert candidate(n = 33554431) == False\n assert candidate(n = 12) == False\n assert candidate(n = 16383) == False\n assert candidate(n = 134217727) == False\n assert candidate(n = 8388607) == False\n assert candidate(n = 2097151) == False\n assert candidate(n = 4095) == False\n assert candidate(n = 22) == False\n assert candidate(n = -32) == False\n assert candidate(n = -64) == False\n assert candidate(n = 19) == False\n assert candidate(n = 65535) == False\n assert candidate(n = 31) == False\n assert candidate(n = 7) == False\n assert candidate(n = 25) == False\n", "comparison": "exact"}, "public_tests": ["1", "16", "3"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isPowerOfTwo", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:55+00:00", "tests_total": 103, "tests_dropped": 10, "flags": [], "topic_tags": ["math", "bit-manipulation", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def is_power_of_two(n)", "container": null, "callable": "is_power_of_two", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 233, "task_id": "number-of-digit-one", "difficulty": "Hard", "problem_description": "Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.\n\nExample 1:\n\nInput: n = 13\nOutput: 6\n\nExample 2:\n\nInput: n = 0\nOutput: 0\n\nConstraints:\n\n- 0 <= n <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 0\n assert candidate(n = 987654321) == 891632373\n assert candidate(n = 100000) == 50001\n assert candidate(n = 999999999) == 900000000\n assert candidate(n = 999) == 300\n assert candidate(n = 1000000) == 600001\n assert candidate(n = 501) == 201\n assert candidate(n = 9999) == 4000\n assert candidate(n = 100) == 21\n assert candidate(n = 1000000000) == 900000001\n assert candidate(n = 1000) == 301\n assert candidate(n = 55) == 16\n assert candidate(n = 50000000) == 45000000\n assert candidate(n = 13) == 6\n assert candidate(n = 99999) == 50000\n assert candidate(n = 210) == 142\n assert candidate(n = 1010) == 313\n assert candidate(n = 500000005) == 500000001\n assert candidate(n = 12345) == 8121\n assert candidate(n = 50123) == 30057\n assert candidate(n = 909090909) == 826446281\n assert candidate(n = 202020202) == 262218141\n assert candidate(n = 111) == 36\n assert candidate(n = 213456789) == 273589849\n assert candidate(n = 111000111) == 99600372\n assert candidate(n = 123000000) == 129800001\n assert candidate(n = 56789) == 33059\n assert candidate(n = 110) == 33\n assert candidate(n = 807060504) == 745234201\n assert candidate(n = 300) == 160\n assert candidate(n = 10001) == 4003\n assert candidate(n = 100100100) == 80150223\n assert candidate(n = 10999) == 5300\n assert candidate(n = 99) == 20\n assert candidate(n = 876543210) == 803978042\n assert candidate(n = 1001) == 303\n assert candidate(n = 808080808) == 745842261\n assert candidate(n = 5001) == 2501\n assert candidate(n = 101010101) == 81624329\n assert candidate(n = 200000000) == 260000000\n assert candidate(n = 303030303) == 342822161\n assert candidate(n = 800000000) == 740000000\n assert candidate(n = 101) == 23\n assert candidate(n = 10000000) == 7000001\n assert candidate(n = 432109876) == 453263855\n assert candidate(n = 2020) == 1612\n assert candidate(n = 10101) == 4125\n assert candidate(n = 600000000) == 580000000\n assert candidate(n = 1023) == 337\n assert candidate(n = 555555555) == 549382716\n assert candidate(n = 50001) == 30001\n assert candidate(n = 111111111) == 100000008\n assert candidate(n = 888888888) == 812345679\n assert candidate(n = 50005) == 30001\n assert candidate(n = 654321098) == 628668419\n assert candidate(n = 700000000) == 660000000\n assert candidate(n = 200) == 140\n assert candidate(n = 98765) == 49657\n assert candidate(n = 500000000) == 500000000\n assert candidate(n = 400000000) == 420000000\n assert candidate(n = 100100) == 50122\n assert candidate(n = 123456789) == 130589849\n assert candidate(n = 100001) == 50003\n assert candidate(n = 199) == 140\n assert candidate(n = 800000008) == 740000001\n assert candidate(n = 100010001) == 80014005\n assert candidate(n = 100000000) == 80000001\n", "comparison": "exact"}, "public_tests": ["13", "0"], "hints": ["Beware of overflow."], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countDigitOne", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:42:57+00:00", "tests_total": 76, "tests_dropped": 9, "flags": [], "topic_tags": ["math", "dynamic-programming", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def count_digit_one(n)", "container": null, "callable": "count_digit_one", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 238, "task_id": "product-of-array-except-self", "difficulty": "Medium", "problem_description": "Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i].\n\nThe product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer.\n\nYou must write an algorithm that runs in O(n) time and without using the division operation.\n\nExample 1:\n\nInput: nums = [1,2,3,4]\nOutput: [24,12,8,6]\n\nExample 2:\n\nInput: nums = [-1,1,0,-3,3]\nOutput: [0,0,9,0,0]\n\nConstraints:\n\n- 2 <= nums.length <= 10^5\n- -30 <= nums[i] <= 30\n- The input is generated such that answer[i] is guaranteed to fit in a 32-bit integer.\n\nFollow up: Can you solve the problem in O(1) extra space complexity? (The output array does not count as extra space for space complexity analysis.)\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 3, 0, 2, 1]) == [0, 0, 30, 0, 0]\n assert candidate(nums = [1, 0, -1, 2, -2]) == [0, 4, 0, 0, 0]\n assert candidate(nums = [1, -1, 2, -2, 3, -3]) == [-36, 36, -18, 18, -12, 12]\n assert candidate(nums = [5, 3, 2, 4, 1]) == [24, 40, 60, 30, 120]\n assert candidate(nums = [1, 2, 3, 4]) == [24, 12, 8, 6]\n assert candidate(nums = [-1, 1, 0, -3, 3]) == [0, 0, 9, 0, 0]\n assert candidate(nums = [2, -3, 4, -5]) == [60, -40, 30, -24]\n assert candidate(nums = [0, 0, 0, 0]) == [0, 0, 0, 0]\n assert candidate(nums = [5, 5, 5, 5]) == [125, 125, 125, 125]\n assert candidate(nums = [1, 0, 2, 3]) == [0, 6, 0, 0]\n assert candidate(nums = [1, 0, 3, 4]) == [0, 12, 0, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [19683, 19683, 19683, 19683, 19683, 19683, 19683, 19683, 19683, 19683]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [3628800, 1814400, 1209600, 907200, 725760, 604800, 518400, 453600, 403200, 362880]\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17]) == [255255, 170170, 102102, 72930, 46410, 39270, 30030]\n assert candidate(nums = [29, -29, 14, -14, 7, -7, 3.5, -3.5, 1.75, -1.75]) == [-10448701.8125, 10448701.8125, -21643739.46875, 21643739.46875, -43287478.9375, 43287478.9375, -86574957.875, 86574957.875, -173149915.75, 173149915.75]\n assert candidate(nums = [30, -20, 10, -5, 4, -2, 1]) == [-8000, 12000, -24000, 48000, -60000, 120000, -240000]\n assert candidate(nums = [2, -3, 5, 7, 0, -1, 4]) == [0, 0, 0, 0, 840, 0, 0]\n assert candidate(nums = [29, -29, 14, -14, 7, -7, 3, -3, 1, -1]) == [-2506644, 2506644, -5192334, 5192334, -10384668, 10384668, -24230892, 24230892, -72692676, 72692676]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [0, 0, 0, 1]) == [0, 0, 0, 0]\n assert candidate(nums = [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1]) == [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1]\n assert candidate(nums = [2, 5, 1, 9, 3, 6, 8, 7]) == [45360, 18144, 90720, 10080, 30240, 15120, 11340, 12960]\n assert candidate(nums = [0, 0, 0, 0, 1]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1]) == [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]\n assert candidate(nums = [2, 3, 0, 5, 6, 0, 7]) == [0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == [536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 536870912, 1073741824]\n assert candidate(nums = [-10, 9, 0, 5, -2, 3, -1, 8]) == [0, 0, -21600, 0, 0, 0, 0, 0]\n assert candidate(nums = [15, 10, 20, 5, 3, 8, 6, 12, 4, 7]) == [48384000, 72576000, 36288000, 145152000, 241920000, 90720000, 120960000, 60480000, 181440000, 103680000]\n assert candidate(nums = [-10, 10, -10, 10, -10]) == [10000, -10000, 10000, -10000, 10000]\n assert candidate(nums = [-1, -2, -3, -4, -5]) == [120, 60, 40, 30, 24]\n assert candidate(nums = [1, 2, 3, 4, 5, 0, 7, 8, 9, 10]) == [0, 0, 0, 0, 0, 604800, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 0, 0, 0, 3, 4, 5]) == [0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [2, 3, -5, 7, 11, -13, 17]) == [255255, 170170, -102102, 72930, 46410, -39270, 30030]\n assert candidate(nums = [2, -3, 4, -5, 6, -7]) == [-2520, 1680, -1260, 1008, -840, 720]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [3628800, 1814400, 1209600, 907200, 725760, 604800, 518400, 453600, 403200, 362880]\n assert candidate(nums = [-2, -4, -6, -8, -10, -12, -14, -16, -18, -20]) == [-1857945600, -928972800, -619315200, -464486400, -371589120, -309657600, -265420800, -232243200, -206438400, -185794560]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6]) == [-720, -360, -240, -180, -144, -120]\n assert candidate(nums = [0, 0, 0, 1, 2, 3]) == [0, 0, 0, 0, 0, 0]\n assert candidate(nums = [-2, -3, -4, -5, -6]) == [360, 240, 180, 144, 120]\n assert candidate(nums = [1, -1, 1, -1, 1, -1]) == [-1, 1, -1, 1, -1, 1]\n assert candidate(nums = [0, 0, 0, 0, 0, 1]) == [0, 0, 0, 0, 0, 0]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [19683, 19683, 19683, 19683, 19683, 19683, 19683, 19683, 19683, 19683]\n assert candidate(nums = [1, 2, 0, 4, 5, 0, 7, 8, 9, 10]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [7, -2, 5, 0, -3, 1]) == [0, 0, 0, 210, 0, 0]\n assert candidate(nums = [1, 2, 0, 4, 5, 0, 7, 8, 9]) == [0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == [-3628800, -1814400, -1209600, -907200, -725760, -604800, -518400, -453600, -403200, -362880]\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1]\n assert candidate(nums = [2, 3, -1, 0, 5, 6, -7, 8, -9, 10]) == [0, 0, 0, -907200, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == [-14400, 14400, -7200, 7200, -4800, 4800, -3600, 3600, -2880, 2880]\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == [1857945600, 928972800, 619315200, 464486400, 371589120, 309657600, 265420800, 232243200, 206438400, 185794560]\n assert candidate(nums = [7, 1, 2, 3, 4, 5]) == [120, 840, 420, 280, 210, 168]\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [1, 2, 0, 3, 4, 0, 5]) == [0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == [-3628800, -1814400, -1209600, -907200, -725760, -604800, -518400, -453600, -403200, -362880]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n", "comparison": "exact"}, "public_tests": ["[1,2,3,4]", "[-1,1,0,-3,3]"], "hints": ["Think how you can efficiently utilize prefix and suffix products to calculate the product of all elements except self for each index. Can you pre-compute the prefix and suffix products in linear time to avoid redundant calculations?", "Can you minimize additional space usage by reusing memory or modifying the input array to store intermediate results?"], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().productExceptSelf", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:04+00:00", "tests_total": 100, "tests_dropped": 38, "flags": [], "topic_tags": ["array", "prefix-sum"]}, "language": "ruby", "interface": {"raw_signature": "def product_except_self(nums)", "container": null, "callable": "product_except_self", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 239, "task_id": "sliding-window-maximum", "difficulty": "Hard", "problem_description": "You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.\n\nReturn the max sliding window.\n\nExample 1:\n\nInput: nums = [1,3,-1,-3,5,3,6,7], k = 3\nOutput: [3,3,5,5,6,7]\nExplanation:\nWindow position Max\n--------------- -----\n[1 3 -1] -3 5 3 6 7 3\n 1 [3 -1 -3] 5 3 6 7 3\n 1 3 [-1 -3 5] 3 6 7 5\n 1 3 -1 [-3 5 3] 6 7 5\n 1 3 -1 -3 [5 3 6] 7 6\n 1 3 -1 -3 5 [3 6 7] 7\n\nExample 2:\n\nInput: nums = [1], k = 1\nOutput: [1]\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -10^4 <= nums[i] <= 10^4\n- 1 <= k <= nums.length\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, -1, -3, 5, 3, 6, 7],k = 3) == [3, 3, 5, 5, 6, 7]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5],k = 5) == [5, 5, 5, 5, 5]\n assert candidate(nums = [4, -2],k = 2) == [4]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 4) == [9, 8, 7, 6, 5, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 2) == [2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums = [1],k = 1) == [1]\n assert candidate(nums = [1, 3, 1, 2, 0, 5],k = 3) == [3, 3, 2, 5]\n assert candidate(nums = [7, 2, 4],k = 2) == [7, 4]\n assert candidate(nums = [9, 11],k = 2) == [11]\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 4, 2, 3, 1, 5, 6, 7, 8, 9, 10],k = 4) == [4, 5, 6, 6, 6, 6, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 3) == [100, 90, 80, 70, 60, 50, 40, 30]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == [3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 5) == [100, 90, 80, 70, 60, 50]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 4) == [-1, -2, -3, -4, -5, -6, -7]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 15) == [1, 1, 1, 1, 1, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == [5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 25) == [1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 2) == [10, 10, 10, 10, 10, 10, 10, 10, 10]\n assert candidate(nums = [1, 3, -1, -3, 5, 3, 6, 7, 1, 2, 4, 5, 6],k = 4) == [3, 5, 5, 6, 7, 7, 7, 7, 5, 6]\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11],k = 6) == [5, 6, 6, 7, 8, 8, 9, 10, 10, 11]\n assert candidate(nums = [5, 3, 5, 2, 8, 1, 9, 6, 4, 7],k = 5) == [8, 8, 9, 9, 9, 9]\n assert candidate(nums = [5, 3, 4, 4, 1, 5, 3, 6, 9, 5, 12, 2, 8, 7],k = 5) == [5, 5, 5, 6, 9, 9, 12, 12, 12, 12]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 10) == [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 3) == [3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 7) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [5, 3, 4, 2, 1, 8, 7, 6, 9, 10, 11],k = 5) == [5, 8, 8, 8, 9, 10, 11]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 6) == [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 2) == [10, 9, 8, 7, 6, 5, 4, 3, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1],k = 2) == [2, 3, 4, 5, 5, 4, 3, 2]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 3) == [0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 5) == [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5]\n assert candidate(nums = [2, 1, 3, 5, 4, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5],k = 5) == [5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 5]\n assert candidate(nums = [1, -1, 3, -3, 5, -5, 6, -6, 7, -7],k = 5) == [5, 5, 6, 6, 7, 7]\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],k = 5) == [-6, -5, -4, -3, -2, -1]\n assert candidate(nums = [5, 3, 8, 1, 9, 2, 7, 4, 6, 0],k = 3) == [8, 8, 9, 9, 9, 7, 7, 6]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5],k = 10) == [10, 9, 8, 7, 6, 5]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],k = 4) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [10, -5, 3, 8, 2, -9, 15, 11, 1],k = 4) == [10, 8, 8, 15, 15, 15]\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4],k = 4) == [4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 3, 3, 4]\n assert candidate(nums = [9, 11, 8, 9, 10, 7, 12],k = 4) == [11, 11, 10, 12]\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],k = 5) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [9, 11, 8, 9, 10, 7, 9, 6, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 5) == [11, 11, 10, 10, 12, 12, 12, 12, 12, 11, 10, 9, 8, 7, 6, 5]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 3) == [5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 4) == [10, 9, 8, 7, 6, 5, 4]\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90],k = 2) == [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 5) == [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(nums = [9, 11, 8, 5, 7, 10, 6],k = 4) == [11, 11, 10, 10]\n assert candidate(nums = [10, 14, 13, 7, 10, 6, 5, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1],k = 4) == [14, 14, 13, 10, 10, 9, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 20) == [20]\n assert candidate(nums = [1, 3, 2, 1, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 5) == [5, 5, 5, 5, 5, 9, 9, 9, 9, 9, 8, 7, 6, 5]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 2) == [3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [-7, -8, 7, 5, 7, 1, 6, 0, 1, 2, -7, -8, -2, -2, 0, 5, 0, 1, 2, -1, -4, -2, -1, -2, 4, 1, -5, 0, -7, -1, 10, 1, -6, 5, -8, 9, 10, 3, -4, -5, -9, -9, -3, -9, -8, -7, 7, -1, -7, -6, -6, 7, 0, 1, 4, 5, -5, -5, 2, -7, 9, 7, 9, 8, -9, -2, -5, -8, 2, -8, -6, -6, -6, 0, 1, 4, -8, -5, -6, -6, 6, -8, -8, -5, -6, -6, -7, -7, 7, -8, -6, -4, -6, -5, -8, -9, -6, -9, -7, -7, -8, -6, -7, -7, 7, -8, -5, -5, -5, 7, -7, 7, -7, -8, -6, -4, -6, -5, -8, -9, -6, -9, -7, -7, -8, -6, -7, -7, 7, -8, -5, -5, -5, 7, -7, 7, -7, -8, -6, -4, -6, -5],k = 25) == [7, 7, 7, 7, 7, 6, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 6) == [3, 3, 3, 3, 3]\n assert candidate(nums = [8, 5, 10, 7, 9, 4, 15, 12, 90, 13],k = 3) == [10, 10, 10, 9, 15, 15, 90, 90]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 6) == [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1],k = 8) == [25, 23, 21, 19, 17, 15]\n assert candidate(nums = [10000, -10000, 5000, -5000, 2500, -2500, 1250, -1250, 625, -625, 312, -312, 156, -156, 78, -78, 39, -39, 19, -19, 9, -9, 4, -4, 2, -2, 1, -1],k = 5) == [10000, 5000, 5000, 2500, 2500, 1250, 1250, 625, 625, 312, 312, 156, 156, 78, 78, 39, 39, 19, 19, 9, 9, 4, 4, 2]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 3) == [1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],k = 4) == [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 7) == [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],k = 3) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [5, 3, 8, 7, 6, 5, 4, 3, 2, 1],k = 3) == [8, 8, 8, 7, 6, 5, 4, 3]\n assert candidate(nums = [1, 3, -1, -3, 5, 3, 6, 7, 8, 1, 2, 3, 4, 5],k = 4) == [3, 5, 5, 6, 7, 8, 8, 8, 8, 4, 5]\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5],k = 3) == [3, 4, 5, 5, 5, 4, 3, 2, 3, 4, 5, 5, 5, 4, 3, 2, 2, 3, 4, 5]\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3],k = 5) == [4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 3]\n assert candidate(nums = [3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],k = 4) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25],k = 7) == [13, 15, 17, 19, 21, 23, 25]\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],k = 3) == [-10, -20, -30, -40, -50, -60, -70, -80]\n assert candidate(nums = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3],k = 2) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [3, 2, 2, 3, 5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19],k = 6) == [5, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(nums = [5, 3, 8, 2, 1, 4, 7, 6, 9],k = 4) == [8, 8, 8, 7, 7, 9]\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 4) == [40, 50, 60, 70, 80, 90, 100]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 5) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [1, 3, 2, 1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1],k = 4) == [3, 3, 3, 3, 3, 3, 3, 4, 5, 6, 6, 6, 6, 5, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 7) == [7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(nums = [5, 3, 4, 2, 1, 6, 7, 8, 9, 10],k = 4) == [5, 4, 6, 7, 8, 9, 10]\n assert candidate(nums = [10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000],k = 3) == [10000, 10000, 10000, 10000, 10000, 10000, 10000]\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5],k = 2) == [1, 2, 2, 3, 3, 4, 4, 5, 5]\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 3) == [-1, -2, -3, -4, -5, -6, -7, -8]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5) == [0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5],k = 3) == [5, 4, 3, 2, 3, 4, 5]\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18],k = 3) == [10, 9, 5, 7, 101, 101]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 7) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 12) == [20, 19, 18, 17, 16, 15, 14, 13, 12]\n assert candidate(nums = [5, 3, 4, 2, 6, 1, 8, 9, 7],k = 4) == [5, 6, 6, 8, 9, 9]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5) == [0, 0, 0, 0, 0, 0]\n assert candidate(nums = [9, 11, 8, 9, 10, 1, 7, 3, 8, 9],k = 4) == [11, 11, 10, 10, 10, 8, 9]\n assert candidate(nums = [9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 5) == [14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10) == [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == [1]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 5) == [10, 9, 8, 7, 6, 5]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 7) == [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7]\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1],k = 5) == [5, 5, 5, 5, 5, 4, 3, 4, 5, 5, 5, 5, 5]\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1],k = 3) == [5, 4, 3, 2, 3, 4, 5, 5, 5, 4, 3]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 3) == [9, 8, 7, 6, 5, 4, 3]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 2) == [2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [9, 11, 8, 9, 10, 7, 10, 5, 6],k = 4) == [11, 11, 10, 10, 10, 10]\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 5) == [100, 90, 80, 70, 60, 50]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 6) == [6, 7, 8, 9, 10]\n assert candidate(nums = [5, 2, 2, 4, 1, 6, 1, 3, 2, 5, 2, 2, 4, 6, 1, 6, 3, 3, 5, 2, 1, 1, 4, 6, 3, 2, 1, 1, 5, 6, 1, 3, 5, 6, 3, 5, 6, 3, 6, 5, 4, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10) == [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10]\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 8) == [15, 14, 13, 12, 11, 10, 9, 8]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 10) == [0]\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == [5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1]\n", "comparison": "exact"}, "public_tests": ["[1,3,-1,-3,5,3,6,7]\n3", "[1]\n1"], "hints": ["How about using a data structure such as deque (double-ended queue)?", "The queue size need not be the same as the window’s size.", "Remove redundant elements and the queue should store only elements that need to be considered."], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().maxSlidingWindow", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:06+00:00", "tests_total": 104, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "queue", "sliding-window", "heap-priority-queue", "monotonic-queue", "range-minimum-maximum-query"]}, "language": "ruby", "interface": {"raw_signature": "def max_sliding_window(nums, k)", "container": null, "callable": "max_sliding_window", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 240, "task_id": "search-a-2d-matrix-ii", "difficulty": "Medium", "problem_description": "Write an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties:\n\n- Integers in each row are sorted in ascending from left to right.\n- Integers in each column are sorted in ascending from top to bottom.\n\nExample 1:\n\nInput: matrix = [[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]], target = 5\nOutput: true\n\nExample 2:\n\nInput: matrix = [[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]], target = 20\nOutput: false\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= n, m <= 300\n- -10^9 <= matrix[i][j] <= 10^9\n- All the integers in each row are sorted in ascending order.\n- All the integers in each column are sorted in ascending order.\n- -10^9 <= target <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [5, 6, 7, 8, 9], [15, 16, 17, 18, 19], [25, 26, 27, 28, 29], [35, 36, 37, 38, 39]],target = 0) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 20) == False\n assert candidate(matrix = [[-10, -5, -3, -1, -1], [0, 1, 1, 2, 2], [3, 3, 4, 4, 5], [6, 7, 8, 8, 9], [10, 10, 12, 13, 15]],target = 8) == True\n assert candidate(matrix = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]],target = 3) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 5) == True\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]],target = 0) == False\n assert candidate(matrix = [[-10, -8, -6, -4, -3], [-9, -7, -5, -3, -1], [-4, -2, 0, 2, 4], [-3, 1, 3, 5, 7], [2, 4, 6, 8, 10]],target = 0) == True\n assert candidate(matrix = [[1, 3, 5, 7], [2, 4, 6, 8], [0, 11, 16, 20], [13, 14, 17, 18]],target = 14) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 15) == True\n assert candidate(matrix = [[-10, -8, -6, -4, -2], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],target = -5) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 13) == True\n assert candidate(matrix = [[-10, -8, -5, -3, -1], [0, 2, 3, 5, 7], [8, 9, 10, 12, 13], [15, 17, 18, 20, 21], [23, 25, 26, 27, 29]],target = 14) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [3, 5, 7, 9, 11, 13, 15, 17, 19, 21], [4, 6, 8, 10, 12, 14, 16, 18, 20, 22]],target = 100) == False\n assert candidate(matrix = [[1, 3, 5], [2, 6, 9], [4, 11, 16], [7, 12, 18], [8, 13, 19], [10, 14, 20], [15, 17, 21]],target = 17) == True\n assert candidate(matrix = [[1, 10, 20, 30, 40, 50, 60, 70, 80, 90], [11, 21, 31, 41, 51, 61, 71, 81, 91, 100], [22, 32, 42, 52, 62, 72, 82, 92, 102, 110], [33, 43, 53, 63, 73, 83, 93, 103, 113, 120], [44, 54, 64, 74, 84, 94, 104, 114, 124, 130]],target = 2) == False\n assert candidate(matrix = [[-100, -90, -80, -70, -60, -50, -40, -30, -20, -10], [10, 20, 30, 40, 50, 60, 70, 80, 90, 100], [20, 30, 40, 50, 60, 70, 80, 90, 100, 110], [30, 40, 50, 60, 70, 80, 90, 100, 110, 120], [40, 50, 60, 70, 80, 90, 100, 110, 120, 130], [50, 60, 70, 80, 90, 100, 110, 120, 130, 140], [60, 70, 80, 90, 100, 110, 120, 130, 140, 150], [70, 80, 90, 100, 110, 120, 130, 140, 150, 160], [80, 90, 100, 110, 120, 130, 140, 150, 160, 170], [90, 100, 110, 120, 130, 140, 150, 160, 170, 180]],target = 125) == False\n assert candidate(matrix = [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39], [40, 41, 42, 43, 44, 45, 46, 47, 48, 49], [50, 51, 52, 53, 54, 55, 56, 57, 58, 59], [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], [70, 71, 72, 73, 74, 75, 76, 77, 78, 79]],target = 37) == True\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-6, -7, -8, -9, -10], [-11, -12, -13, -14, -15], [-16, -17, -18, -19, -20], [-21, -22, -23, -24, -25]],target = -15) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [3, 5, 7, 9, 11, 13, 15, 17, 19, 21], [4, 6, 8, 10, 12, 14, 16, 18, 20, 22], [5, 7, 9, 11, 13, 15, 17, 19, 21, 23], [6, 8, 10, 12, 14, 16, 18, 20, 22, 24], [7, 9, 11, 13, 15, 17, 19, 21, 23, 25], [8, 10, 12, 14, 16, 18, 20, 22, 24, 26], [9, 11, 13, 15, 17, 19, 21, 23, 25, 27], [10, 12, 14, 16, 18, 20, 22, 24, 26, 28]],target = 16) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]],target = 55) == True\n assert candidate(matrix = [[-100, -90, -80, -70, -60, -50], [-90, -80, -70, -60, -50, -40], [-80, -70, -60, -50, -40, -30], [-70, -60, -50, -40, -30, -20], [-60, -50, -40, -30, -20, -10], [-50, -40, -30, -20, -10, 0]],target = -65) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15, 18], [2, 5, 8, 12, 19, 22], [3, 6, 9, 16, 22, 24], [10, 13, 14, 17, 24, 26], [18, 21, 23, 26, 30, 35], [20, 24, 27, 29, 33, 40]],target = 27) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]],target = 50) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]],target = 25) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20], [21, 23, 25, 27, 29]],target = 25) == True\n assert candidate(matrix = [[-1000000000, -999999999, -999999998], [-999999997, -999999996, -999999995], [-999999994, -999999993, -999999992]],target = -999999995) == True\n assert candidate(matrix = [[-1000000000, -999999999, -999999998, -999999997], [-999999996, -999999995, -999999994, -999999993], [-999999992, -999999991, -999999990, -999999989], [-999999988, -999999987, -999999986, -999999985]],target = -999999993) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20], [21, 23, 25, 27, 29]],target = 15) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15, 19], [2, 5, 8, 12, 19, 23], [3, 6, 9, 16, 22, 26], [10, 13, 14, 17, 24, 28], [18, 21, 23, 26, 30, 34], [29, 33, 35, 39, 43, 47]],target = 34) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60]],target = 33) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15, 20], [2, 5, 8, 12, 19, 25], [3, 6, 9, 16, 22, 30], [10, 13, 14, 17, 24, 35], [18, 21, 23, 26, 30, 40], [22, 27, 31, 37, 41, 45]],target = 37) == True\n assert candidate(matrix = [[-100, -99, -98, -97, -96], [-95, -94, -93, -92, -91], [-90, -89, -88, -87, -86], [-85, -84, -83, -82, -81], [-80, -79, -78, -77, -76]],target = -89) == True\n assert candidate(matrix = [[-10, -9, -8, -7, -6, -5], [-4, -3, -2, -1, 0, 1], [2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13], [14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25]],target = -5) == True\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-9, -4, -1, 4, 9], [-8, -3, 1, 6, 11], [-7, -2, 2, 7, 12], [-6, -1, 3, 8, 13]],target = 13) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15, 19], [2, 5, 8, 12, 16, 20], [3, 6, 9, 13, 17, 21], [10, 14, 18, 22, 26, 24], [18, 22, 26, 30, 34, 32], [27, 31, 35, 39, 43, 41]],target = 35) == True\n assert candidate(matrix = [[-100, -99, -98, -97, -96], [-95, -94, -93, -92, -91], [-90, -89, -88, -87, -86], [-85, -84, -83, -82, -81], [-80, -79, -78, -77, -76]],target = -93) == True\n assert candidate(matrix = [[5]],target = 5) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [10, 11, 13, 15, 17], [18, 19, 20, 21, 22], [25, 26, 27, 28, 29], [30, 31, 32, 33, 34]],target = 25) == True\n assert candidate(matrix = [[1000000000]],target = 1000000000) == True\n assert candidate(matrix = [[1, 10, 20, 30, 40, 50, 60, 70, 80, 90], [11, 21, 31, 41, 51, 61, 71, 81, 91, 100], [22, 32, 42, 52, 62, 72, 82, 92, 102, 110], [33, 43, 53, 63, 73, 83, 93, 103, 113, 120], [44, 54, 64, 74, 84, 94, 104, 114, 124, 130]],target = 114) == True\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-6, -7, -8, -9, -10], [-11, -12, -13, -14, -15], [-16, -17, -18, -19, -20], [-21, -22, -23, -24, -25]],target = -13) == False\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],target = 10) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11], [2, 4, 6, 8, 10, 12], [13, 15, 17, 19, 21, 23], [24, 26, 28, 30, 32, 34], [35, 37, 39, 41, 43, 45], [46, 48, 50, 52, 54, 56]],target = 29) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20], [21, 22, 23, 24, 25]],target = 0) == False\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-9, -4, -1, 4, 9], [-8, -3, 1, 6, 11], [-7, -2, 2, 7, 12], [-6, -1, 3, 8, 13]],target = 14) == False\n assert candidate(matrix = [[-10, -8, -6, -4, -2, 0], [1, 3, 5, 7, 9, 11], [2, 4, 6, 8, 10, 12], [3, 5, 7, 9, 11, 13], [4, 6, 8, 10, 12, 14], [5, 7, 9, 11, 13, 15]],target = 7) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13], [2, 4, 6, 8, 10, 12, 14], [3, 5, 7, 9, 11, 13, 15], [4, 6, 8, 10, 12, 14, 16], [5, 7, 9, 11, 13, 15, 17], [6, 8, 10, 12, 14, 16, 18]],target = 17) == True\n assert candidate(matrix = [[5, 10, 15, 20, 25, 30, 35, 40, 45, 50], [6, 11, 16, 21, 26, 31, 36, 41, 46, 51], [7, 12, 17, 22, 27, 32, 37, 42, 47, 52], [8, 13, 18, 23, 28, 33, 38, 43, 48, 53], [9, 14, 19, 24, 29, 34, 39, 44, 49, 54]],target = 38) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]],target = 37) == True\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-9, -4, -1, 4, 9], [-8, -3, 1, 6, 11], [-7, -2, 2, 7, 12], [-6, -1, 3, 8, 13]],target = -10) == True\n assert candidate(matrix = [[-9, -7, -5, -3, -1, 1, 3, 5, 7, 9], [-8, -6, -4, -2, 0, 2, 4, 6, 8, 10], [-7, -5, -3, -1, 1, 3, 5, 7, 9, 11], [-6, -4, -2, 0, 2, 4, 6, 8, 10, 12], [-5, -3, -1, 1, 3, 5, 7, 9, 11, 13], [-4, -2, 0, 2, 4, 6, 8, 10, 12, 14], [-3, -1, 1, 3, 5, 7, 9, 11, 13, 15], [-2, 0, 2, 4, 6, 8, 10, 12, 14, 16], [-1, 1, 3, 5, 7, 9, 11, 13, 15, 17], [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]],target = 15) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15, 20], [2, 5, 8, 12, 19, 25], [3, 6, 9, 16, 22, 30], [10, 13, 14, 17, 24, 35], [18, 21, 23, 26, 30, 40], [27, 32, 33, 36, 39, 45]],target = 23) == True\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]],target = 1) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [3, 5, 7, 9, 11], [4, 6, 8, 10, 12], [5, 7, 9, 11, 13]],target = 7) == True\n assert candidate(matrix = [[-10, -9, -8, -7, -6], [-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]],target = -3) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20], [21, 22, 23, 24, 25]],target = 13) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],target = 26) == False\n assert candidate(matrix = [[3, 6, 9, 12, 15], [6, 9, 12, 15, 18], [9, 12, 15, 18, 21], [12, 15, 18, 21, 24], [15, 18, 21, 24, 27]],target = 13) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [21, 23, 25, 27, 29, 31, 33, 35, 37, 39], [22, 24, 26, 28, 30, 32, 34, 36, 38, 40], [41, 43, 45, 47, 49, 51, 53, 55, 57, 59], [42, 44, 46, 48, 50, 52, 54, 56, 58, 60], [61, 63, 65, 67, 69, 71, 73, 75, 77, 79], [62, 64, 66, 68, 70, 72, 74, 76, 78, 80], [81, 83, 85, 87, 89, 91, 93, 95, 97, 99], [82, 84, 86, 88, 90, 92, 94, 96, 98, 100]],target = 64) == True\n assert candidate(matrix = [[-10, -9, -8, -7, -6], [-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]],target = -5) == True\n assert candidate(matrix = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]],target = 5) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],target = 5) == True\n assert candidate(matrix = [[-10, -9, -8, -7, -6], [-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]],target = 7) == True\n assert candidate(matrix = [[-10, -5, -1, 3, 7, 9], [0, 0, 1, 4, 6, 8], [1, 2, 2, 5, 8, 9], [2, 3, 4, 6, 9, 10], [5, 6, 7, 8, 10, 11], [6, 7, 8, 10, 11, 12]],target = 13) == False\n assert candidate(matrix = [[-10, -9, -8, -7, -6, -5, -4], [-3, -2, -1, 0, 1, 2, 3], [4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17], [18, 19, 20, 21, 22, 23, 24]],target = -5) == True\n assert candidate(matrix = [[-1, 3, 5, 7, 9, 11, 13, 15], [2, 4, 6, 8, 10, 12, 14, 16], [17, 19, 21, 23, 25, 27, 29, 31], [33, 35, 37, 39, 41, 43, 45, 47], [49, 51, 53, 55, 57, 59, 61, 63]],target = 30) == False\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13], [2, 4, 6, 8, 10, 12, 14], [15, 17, 19, 21, 23, 25, 27], [29, 31, 33, 35, 37, 39, 41], [43, 45, 47, 49, 51, 53, 55]],target = 30) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15, 19], [2, 5, 8, 12, 19, 23], [3, 6, 9, 16, 22, 25], [10, 13, 14, 17, 24, 26], [18, 21, 23, 26, 30, 35], [27, 32, 33, 34, 36, 37]],target = 14) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30], [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31], [4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32]],target = 17) == True\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40]],target = 25) == True\n assert candidate(matrix = [[-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1]],target = -1) == True\n assert candidate(matrix = [[5]],target = 10) == False\n assert candidate(matrix = [[-1000000000, -900000000, -800000000], [-700000000, -600000000, -500000000], [-400000000, -300000000, -200000000], [-100000000, 0, 100000000], [200000000, 300000000, 400000000], [500000000, 600000000, 700000000], [800000000, 900000000, 1000000000]],target = -500000000) == True\n assert candidate(matrix = [[-10, -5, 0, 5, 10, 15], [1, 6, 11, 16, 21, 26], [2, 7, 12, 17, 22, 27], [3, 8, 13, 18, 23, 28], [4, 9, 14, 19, 24, 29], [5, 10, 15, 20, 25, 30]],target = 3) == True\n assert candidate(matrix = [[1]],target = 1) == True\n assert candidate(matrix = [[-100, -99, -98, -97, -96], [-95, -94, -93, -92, -91], [-90, -89, -88, -87, -86], [-85, -84, -83, -82, -81], [-80, -79, -78, -77, -76]],target = -90) == True\n assert candidate(matrix = [[-1000000000, -500000000, -100000000, -50000000, -10000000], [-5000000, -2500000, -1000000, -500000, -100000], [-50000, -25000, -10000, -5000, -1000], [-500, -250, -100, -50, -10], [-5, -2, -1, -1, 0]],target = -2500) == False\n assert candidate(matrix = [[1, 10, 19, 28, 37, 46], [2, 11, 20, 29, 38, 47], [3, 12, 21, 30, 39, 48], [4, 13, 22, 31, 40, 49], [5, 14, 23, 32, 41, 50], [6, 15, 24, 33, 42, 51]],target = 100) == False\n assert candidate(matrix = [[-9, -8, -7, -6, -5, -4, -3, -2, -1, 0], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [3, 4, 5, 6, 7, 8, 9, 10, 11, 12], [4, 5, 6, 7, 8, 9, 10, 11, 12, 13], [5, 6, 7, 8, 9, 10, 11, 12, 13, 14], [6, 7, 8, 9, 10, 11, 12, 13, 14, 15], [7, 8, 9, 10, 11, 12, 13, 14, 15, 16], [8, 9, 10, 11, 12, 13, 14, 15, 16, 17]],target = 7) == True\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20], [21, 22, 23, 24, 25]],target = 25) == True\n assert candidate(matrix = [[1, 10, 20, 30], [2, 11, 21, 31], [3, 12, 22, 32], [4, 13, 23, 33], [5, 14, 24, 34]],target = 15) == False\n assert candidate(matrix = [[1, 5, 9, 13, 17, 21, 25, 29, 33, 37], [2, 6, 10, 14, 18, 22, 26, 30, 34, 38], [3, 7, 11, 15, 19, 23, 27, 31, 35, 39], [4, 8, 12, 16, 20, 24, 28, 32, 36, 40]],target = 38) == True\n assert candidate(matrix = [[1]],target = 0) == False\n assert candidate(matrix = [[1, 10, 20, 30, 40], [2, 12, 22, 32, 42], [3, 13, 23, 33, 43], [4, 14, 24, 34, 44], [5, 15, 25, 35, 45]],target = 28) == False\n assert candidate(matrix = [[-1, 0, 1], [0, 1, 2], [1, 2, 3]],target = 0) == True\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]],target = 2) == False\n assert candidate(matrix = [[10, 20, 30, 40, 50], [60, 70, 80, 90, 100], [110, 120, 130, 140, 150], [160, 170, 180, 190, 200], [210, 220, 230, 240, 250]],target = 155) == False\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 31) == False\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]],target = 55) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 1) == True\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],target = 30) == True\n assert candidate(matrix = [[100, 101, 102, 103, 104, 105], [106, 107, 108, 109, 110, 111], [112, 113, 114, 115, 116, 117], [118, 119, 120, 121, 122, 123], [124, 125, 126, 127, 128, 129], [130, 131, 132, 133, 134, 135]],target = 122) == True\n", "comparison": "exact"}, "public_tests": ["[[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]]\n5", "[[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16,22],[10,13,14,17,24],[18,21,23,26,30]]\n20"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix", "target"], "leetcode_dataset_entry_point": "Solution().searchMatrix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:08+00:00", "tests_total": 95, "tests_dropped": 3, "flags": ["has_images"], "topic_tags": ["array", "binary-search", "divide-and-conquer", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def search_matrix(matrix, target)", "container": null, "callable": "search_matrix", "parameters": [{"name": "matrix", "type": "Integer[][]"}, {"name": "target", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 241, "task_id": "different-ways-to-add-parentheses", "difficulty": "Medium", "problem_description": "Given a string expression of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. You may return the answer in any order.\n\nThe test cases are generated such that the output values fit in a 32-bit integer and the number of different results does not exceed 10^4.\n\nExample 1:\n\nInput: expression = \"2-1-1\"\nOutput: [0,2]\nExplanation:\n((2-1)-1) = 0\n(2-(1-1)) = 2\n\nExample 2:\n\nInput: expression = \"2*3-4*5\"\nOutput: [-34,-14,-10,-10,10]\nExplanation:\n(2*(3-(4*5))) = -34\n((2*3)-(4*5)) = -14\n((2*(3-4))*5) = -10\n(2*((3-4)*5)) = -10\n(((2*3)-4)*5) = 10\n\nConstraints:\n\n- 1 <= expression.length <= 20\n- expression consists of digits and the operator '+', '-', and '*'.\n- All the integer values in the input expression are in the range [0, 99].\n- The integer values in the input expression do not have a leading '-' or '+' denoting the sign.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(expression='4*5-2*3'), [-4, 36, 14, 36, 54])\n assert answers_match(candidate(expression='9-3*2+1'), [0, 2, 18, 4, 13])\n assert answers_match(candidate(expression='1+1+1+1'), [4, 4, 4, 4, 4])\n assert answers_match(candidate(expression='9*8+7*6-5*4+3*2-1'), [-1755, -2385, -1755, -2385, -3645, -999, -1125, -1755, -999, -2637, -3897, -1125, -3897, -2385, 513, 639, 513, 639, 891, -621, -495, 513, 639, -1755, -999, 513, -621, 513, -2763, -4023, -1251, -4023, -2511, 639, 891, -495, 639, -3645, -2133, 891, -1377, 891, 135, 45, 135, 45, -135, 243, 225, 135, 243, 9, -171, 225, -171, 45, 513, 639, 513, 639, 891, 2403, 3069, 2403, 3069, 4401, -783, -765, 351, 369, 297, 315, 351, 369, 1431, 1449, -1755, -999, 513, -621, 513, 135, 243, 513, 2403, -783, 351, 297, 351, 1431, -2709, -3969, -1197, -3969, -2457, 693, 945, -441, 693, -3591, -2079, 945, -1323, 945, -9, -189, 207, -189, 27, 693, 945, 3393, 4725, -765, 369, 315, 369, 1449, -3591, -2079, 945, -1323, 945, 189, 405, 945, 4725, -1647, 621, 513, 621, 2781, -3915, -5265, -3915, -5265, -7965, -2295, -2565, -3915, -2295, -5805, -8505, -2565, -8505, -5265, 945, 1215, 945, 1215, 1755, -1485, -1215, 945, 1215, -3915, -2295, 945, -1485, 945, -6075, -8775, -2835, -8775, -5535, 1215, 1755, -1215, 1215, -7965, -4725, 1755, -3105, 1755, 135, 45, 135, 45, -135, 243, 225, 135, 243, 9, -171, 225, -171, 45, 495, 405, 495, 405, 225, 603, 585, 495, 603, 369, 189, 585, 189, 405, 945, 1215, 945, 1215, 1755, 2835, 3645, 2835, 3645, 5265, 945, 1215, 945, 1215, 1755, 2835, 3645, 2835, 3645, 5265, 5355, 6885, 5355, 6885, 9945, -783, -765, 351, 369, 297, 315, 351, 369, 1431, 1449, -1863, -1845, 567, 585, 297, 315, 657, 675, 567, 585, 1647, 1665, 567, 585, 1647, 1665, 3087, 3105, -1755, -999, 513, -621, 513, 135, 243, 513, 2403, -783, 351, 297, 351, 1431, -3915, -2295, 945, -1485, 945, 135, 243, 495, 603, 945, 2835, 945, 2835, 5355, -783, 351, 297, 351, 1431, -1863, 567, 297, 657, 567, 1647, 567, 1647, 3087, -2709, -3969, -1197, -3969, -2457, 693, 945, -441, 693, -3591, -2079, 945, -1323, 945, -9, -189, 207, -189, 27, 693, 945, 3393, 4725, -765, 369, 315, 369, 1449, -3591, -2079, 945, -1323, 945, 189, 405, 945, 4725, -1647, 621, 513, 621, 2781, -5949, -8649, -2709, -8649, -5409, 1341, 1881, -1089, 1341, -7839, -4599, 1881, -2979, 1881, -9, -189, 207, -189, 27, 351, 171, 567, 171, 387, 1341, 1881, 4041, 5661, 1341, 1881, 4041, 5661, 7641, 10701, -765, 369, 315, 369, 1449, -1845, 585, 315, 675, 585, 1665, 585, 1665, 3105, -3519, -2007, 1017, -1251, 1017, 261, 477, 1017, 4797, -1575, 693, 585, 693, 2853, -7839, -4599, 1881, -2979, 1881, 261, 477, 981, 1197, 1881, 5661, 1881, 5661, 10701, -1575, 693, 585, 693, 2853, -3735, 1125, 585, 1305, 1125, 3285, 1125, 3285, 6165, -131, -201, -131, -201, -341, -47, -61, -131, -47, -229, -369, -61, -369, -201, 121, 135, 121, 135, 163, -5, 9, 121, 135, -131, -47, 121, -5, 121, -243, -383, -75, -383, -215, 135, 163, 9, 135, -341, -173, 163, -89, 163, 79, 69, 79, 69, 49, 91, 89, 79, 91, 65, 45, 89, 45, 69, 121, 135, 121, 135, 163, 331, 405, 331, 405, 553, -23, -21, 103, 105, 97, 99, 103, 105, 223, 225, -131, -47, 121, -5, 121, 79, 91, 121, 331, -23, 103, 97, 103, 223, -237, -377, -69, -377, -209, 141, 169, 15, 141, -335, -167, 169, -83, 169, 63, 43, 87, 43, 67, 141, 169, 441, 589, -21, 105, 99, 105, 225, -335, -167, 169, -83, 169, 85, 109, 169, 589, -119, 133, 121, 133, 373, -3915, -5265, -3915, -5265, -7965, -2295, -2565, -3915, -2295, -5805, -8505, -2565, -8505, -5265, 945, 1215, 945, 1215, 1755, -1485, -1215, 945, 1215, -3915, -2295, 945, -1485, 945, -6075, -8775, -2835, -8775, -5535, 1215, 1755, -1215, 1215, -7965, -4725, 1755, -3105, 1755, -2291, -3081, -2291, -3081, -4661, -1343, -1501, -2291, -1343, -3397, -4977, -1501, -4977, -3081, 553, 711, 553, 711, 1027, -869, -711, 553, 711, -2291, -1343, 553, -869, 553, -3555, -5135, -1659, -5135, -3239, 711, 1027, -711, 711, -4661, -2765, 1027, -1817, 1027, 415, 405, 415, 405, 385, 427, 425, 415, 427, 401, 381, 425, 381, 405, 775, 765, 775, 765, 745, 787, 785, 775, 787, 761, 741, 785, 741, 765, 79, 69, 79, 69, 49, 91, 89, 79, 91, 65, 45, 89, 45, 69, 775, 765, 775, 765, 745, 787, 785, 775, 787, 761, 741, 785, 741, 765, 439, 429, 439, 429, 409, 451, 449, 439, 451, 425, 405, 449, 405, 429, 945, 1215, 945, 1215, 1755, 2835, 3645, 2835, 3645, 5265, 945, 1215, 945, 1215, 1755, 2835, 3645, 2835, 3645, 5265, 5355, 6885, 5355, 6885, 9945, 553, 711, 553, 711, 1027, 763, 981, 763, 981, 1417, 945, 1215, 945, 1215, 1755, 553, 711, 553, 711, 1027, 3115, 4005, 3115, 4005, 5785, 5635, 7245, 5635, 7245, 10465, 763, 981, 763, 981, 1417, 5635, 7245, 5635, 7245, 10465, 3283, 4221, 3283, 4221, 6097, -807, -805, 327, 329, 273, 275, 327, 329, 1407, 1409, -1887, -1885, 543, 545, 273, 275, 633, 635, 543, 545, 1623, 1625, 543, 545, 1623, 1625, 3063, 3065, -23, -21, 103, 105, 97, 99, 103, 105, 223, 225, -1887, -1885, 543, 545, -1103, -1101, 319, 321, 433, 435, 793, 795, 97, 99, 793, 795, 457, 459, 543, 545, 1623, 1625, 543, 545, 1623, 1625, 3063, 3065, 319, 321, 439, 441, 543, 545, 319, 321, 1783, 1785, 3223, 3225, 439, 441, 3223, 3225, 1879, 1881, -1755, -999, 513, -621, 513, 135, 243, 513, 2403, -783, 351, 297, 351, 1431, -3915, -2295, 945, -1485, 945, 135, 243, 495, 603, 945, 2835, 945, 2835, 5355, -783, 351, 297, 351, 1431, -1863, 567, 297, 657, 567, 1647, 567, 1647, 3087, -131, -47, 121, -5, 121, 79, 91, 121, 331, -23, 103, 97, 103, 223, -3915, -2295, 945, -1485, 945, -2291, -1343, 553, -869, 553, 415, 427, 775, 787, 79, 91, 775, 787, 439, 451, 945, 2835, 945, 2835, 5355, 553, 763, 945, 553, 3115, 5635, 763, 5635, 3283, -807, 327, 273, 327, 1407, -1887, 543, 273, 633, 543, 1623, 543, 1623, 3063, -23, 103, 97, 103, 223, -1887, 543, -1103, 319, 433, 793, 97, 793, 457, 543, 1623, 543, 1623, 3063, 319, 439, 543, 319, 1783, 3223, 439, 3223, 1879, -2701, -3961, -1189, -3961, -2449, 701, 953, -433, 701, -3583, -2071, 953, -1315, 953, -1, -181, 215, -181, 35, 701, 953, 3401, 4733, -757, 377, 323, 377, 1457, -3583, -2071, 953, -1315, 953, 197, 413, 953, 4733, -1639, 629, 521, 629, 2789, -5941, -8641, -2701, -8641, -5401, 1349, 1889, -1081, 1349, -7831, -4591, 1889, -2971, 1889, -1, -181, 215, -181, 35, 359, 179, 575, 179, 395, 1349, 1889, 4049, 5669, 1349, 1889, 4049, 5669, 7649, 10709, -757, 377, 323, 377, 1457, -1837, 593, 323, 683, 593, 1673, 593, 1673, 3113, -3511, -1999, 1025, -1243, 1025, 269, 485, 1025, 4805, -1567, 701, 593, 701, 2861, -7831, -4591, 1889, -2971, 1889, 269, 485, 989, 1205, 1889, 5669, 1889, 5669, 10709, -1567, 701, 593, 701, 2861, -3727, 1133, 593, 1313, 1133, 3293, 1133, 3293, 6173, -237, -377, -69, -377, -209, 141, 169, 15, 141, -335, -167, 169, -83, 169, 63, 43, 87, 43, 67, 141, 169, 441, 589, -21, 105, 99, 105, 225, -335, -167, 169, -83, 169, 85, 109, 169, 589, -119, 133, 121, 133, 373, -5941, -8641, -2701, -8641, -5401, 1349, 1889, -1081, 1349, -7831, -4591, 1889, -2971, 1889, -3477, -5057, -1581, -5057, -3161, 789, 1105, -633, 789, -4583, -2687, 1105, -1739, 1105, 399, 379, 423, 379, 403, 759, 739, 783, 739, 763, 63, 43, 87, 43, 67, 759, 739, 783, 739, 763, 423, 403, 447, 403, 427, 1349, 1889, 4049, 5669, 1349, 1889, 4049, 5669, 7649, 10709, 789, 1105, 1089, 1525, 1349, 1889, 789, 1105, 4449, 6229, 8049, 11269, 1089, 1525, 8049, 11269, 4689, 6565, -805, 329, 275, 329, 1409, -1885, 545, 275, 635, 545, 1625, 545, 1625, 3065, -21, 105, 99, 105, 225, -1885, 545, -1101, 321, 435, 795, 99, 795, 459, 545, 1625, 545, 1625, 3065, 321, 441, 545, 321, 1785, 3225, 441, 3225, 1881, -3511, -1999, 1025, -1243, 1025, 269, 485, 1025, 4805, -1567, 701, 593, 701, 2861, -7831, -4591, 1889, -2971, 1889, 269, 485, 989, 1205, 1889, 5669, 1889, 5669, 10709, -1567, 701, 593, 701, 2861, -3727, 1133, 593, 1313, 1133, 3293, 1133, 3293, 6173, -263, -95, 241, -11, 241, 157, 181, 241, 661, -47, 205, 193, 205, 445, -7831, -4591, 1889, -2971, 1889, -4583, -2687, 1105, -1739, 1105, 829, 853, 1549, 1573, 157, 181, 1549, 1573, 877, 901, 1889, 5669, 1889, 5669, 10709, 1105, 1525, 1889, 1105, 6229, 11269, 1525, 11269, 6565, -1615, 653, 545, 653, 2813, -3775, 1085, 545, 1265, 1085, 3245, 1085, 3245, 6125, -47, 205, 193, 205, 445, -3775, 1085, -2207, 637, 865, 1585, 193, 1585, 913, 1085, 3245, 1085, 3245, 6125, 637, 877, 1085, 637, 3565, 6445, 877, 6445, 3757])\n assert answers_match(candidate(expression='10+5-3*2'), [9, 14, 9, 24, 24])\n assert answers_match(candidate(expression='3+5*2'), [13, 16])\n assert answers_match(candidate(expression='2*3-4*5'), [-34, -10, -14, -10, 10])\n assert answers_match(candidate(expression='2*3+4*5'), [46, 70, 26, 70, 50])\n assert answers_match(candidate(expression='10+5-2*3'), [9, 19, 9, 39, 39])\n assert answers_match(candidate(expression='1+2*3'), [7, 9])\n assert answers_match(candidate(expression='4+2*3-5'), [0, 5, -12, 5, 13])\n assert answers_match(candidate(expression='1+2'), [3])\n assert answers_match(candidate(expression='2-1-1'), [2, 0])\n assert answers_match(candidate(expression='3-2*2+1'), [-3, -2, 3, 0, 3])\n assert answers_match(candidate(expression='1*2-3*4+5'), [-25, -15, -9, -5, 1, -25, -15, -9, -9, -5, 1, -5, 1, 1])\n assert answers_match(candidate(expression='8+2-1*3'), [7, 11, 7, 27, 27])\n assert answers_match(candidate(expression='100+200-50*2'), [200, 400, 200, 500, 500])\n assert answers_match(candidate(expression='3*4+2*5'), [42, 90, 22, 90, 70])\n assert answers_match(candidate(expression='1+2-3'), [0, 0])\n assert answers_match(candidate(expression='1+2*3-4'), [-1, 3, -3, 3, 5])\n assert answers_match(candidate(expression='3+2*2'), [7, 10])\n assert answers_match(candidate(expression='10+5-3*2+4'), [-3, 5, 22, 13, 18, -3, 5, 72, 72, 13, 18, 13, 28, 28])\n assert answers_match(candidate(expression='1*1*1*1'), [1, 1, 1, 1, 1])\n assert answers_match(candidate(expression='1*2-3+4*5'), [-21, -33, 19, -25, 15, -21, -33, 19, 19, -25, 15, -25, 15, 15])\n assert answers_match(candidate(expression='9*8-7+6-5*4'), [135, -27, 135, -216, -216, -117, 45, -225, -117, 0, 0, 72, -360, 72, 79, 61, 79, 40, 40, -5, 13, 51, 69, -65, 43, 39, -5, 51, 0, 0, 72, -360, 72, 256, 256, 40, 264, -200, 232, 216, 40, 264])\n assert answers_match(candidate(expression='1*2+3*4+5'), [29, 19, 45, 19, 25, 29, 19, 45, 45, 19, 25, 19, 25, 25])\n assert answers_match(candidate(expression='3+5*2-8'), [-27, 5, -48, 5, 8])\n assert answers_match(candidate(expression='1+2+3'), [6, 6])\n assert answers_match(candidate(expression='7*8-2+3'), [21, 63, 51, 45, 57])\n assert answers_match(candidate(expression='2+3*4-5+6'), [-19, 17, 3, 5, 15, -35, 25, 3, 9, 5, 15, 1, 15, 21])\n assert answers_match(candidate(expression='9+8-7*6+5-4*3+2-1'), [52, 52, 31, 73, 31, -53, -53, 17, -53, 87, 45, -53, 17, -53, 52, 52, 31, 73, 31, -179, -179, -179, -179, 17, -53, 17, -137, -137, 87, 45, -53, 17, -53, 87, 45, -221, -221, 17, -53, 17, -137, -137, -14, -14, -17, -11, -17, -29, -29, -19, -29, -9, -15, -29, -19, -29, -44, -44, -47, -41, -47, -14, -14, -17, -11, -17, -179, -179, -179, -179, -155, -155, -275, -275, -155, -155, 23, -47, 23, -131, -131, -19, -29, -49, -19, -131, -131, -113, -203, -113, 81, 39, -59, 11, -59, 81, 39, -227, -227, 11, -59, 11, -143, -143, -9, -15, -29, -19, -29, -39, -45, -9, -15, -227, -227, -197, -347, -197, 23, -47, 23, -131, -131, -19, -29, -49, -19, -131, -131, -113, -203, -113, 4, 4, 7, 1, 7, 19, 19, 9, 19, -1, 5, 19, 9, 19, 4, 4, 7, 1, 7, 37, 37, 37, 37, 9, 19, 9, 31, 31, -1, 5, 19, 9, 19, -1, 5, 43, 43, 9, 19, 9, 31, 31, -36, -36, -33, -39, -33, -21, -21, -31, -21, -41, -35, -21, -31, -21, 4, 4, 7, 1, 7, 19, 19, 9, 19, -1, 5, 19, 9, 19, -76, -76, -73, -79, -73, -46, -46, -43, -49, -43, 4, 4, 7, 1, 7, -36, -36, -33, -39, -33, 4, 4, 7, 1, 7, -155, -155, -155, -155, -131, -131, -251, -251, -131, -131, 37, 37, 37, 37, -123, -123, 37, 37, -283, -283, -163, -163, 37, 37, -123, -123, 37, 37, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, 9, 19, 9, 31, 31, -31, -21, 9, 19, -71, -41, 9, -31, 9, -113, -113, -95, -185, -95, 31, 31, -89, 31, -209, -119, 31, -89, 31, 79, 37, -61, 9, -61, 79, 37, -229, -229, 9, -61, 9, -145, -145, -11, -17, -31, -21, -31, -41, -47, -11, -17, -229, -229, -199, -349, -199, 21, -49, 21, -133, -133, -21, -31, -51, -21, -133, -133, -115, -205, -115, -1, 5, 19, 9, 19, -1, 5, 43, 43, 9, 19, 9, 31, 31, -41, -35, -21, -31, -21, -1, 5, 19, 9, 19, -81, -75, -51, -45, -1, 5, -41, -35, -1, 5, -197, -197, -167, -317, -167, 43, 43, -157, 43, -357, -207, 43, -157, 43, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, 9, 19, 9, 31, 31, -31, -21, 9, 19, -71, -41, 9, -31, 9, -113, -113, -95, -185, -95, 31, 31, -89, 31, -209, -119, 31, -89, 31, 52, 52, 31, 73, 31, -53, -53, 17, -53, 87, 45, -53, 17, -53, 52, 52, 31, 73, 31, -179, -179, -179, -179, 17, -53, 17, -137, -137, 87, 45, -53, 17, -53, 87, 45, -221, -221, 17, -53, 17, -137, -137, -14, -14, -17, -11, -17, -29, -29, -19, -29, -9, -15, -29, -19, -29, -44, -44, -47, -41, -47, -14, -14, -17, -11, -17, -179, -179, -179, -179, -155, -155, -275, -275, -155, -155, 23, -47, 23, -131, -131, -19, -29, -49, -19, -131, -131, -113, -203, -113, 81, 39, -59, 11, -59, 81, 39, -227, -227, 11, -59, 11, -143, -143, -9, -15, -29, -19, -29, -39, -45, -9, -15, -227, -227, -197, -347, -197, 23, -47, 23, -131, -131, -19, -29, -49, -19, -131, -131, -113, -203, -113, -50, -50, -20, -80, -20, 100, 100, 0, 100, -100, -40, 100, 0, 100, -50, -50, -20, -80, -20, 280, 280, 280, 280, 0, 100, 0, 220, 220, -100, -40, 100, 0, 100, -100, -40, 340, 340, 0, 100, 0, 220, 220, -50, -50, -20, -80, -20, 100, 100, 0, 100, -100, -40, 100, 0, 100, -50, -50, -20, -80, -20, 280, 280, 280, 280, 0, 100, 0, 220, 220, -100, -40, 100, 0, 100, -100, -40, 340, 340, 0, 100, 0, 220, 220, -36, -36, -33, -39, -33, -21, -21, -31, -21, -41, -35, -21, -31, -21, 4, 4, 7, 1, 7, 19, 19, 9, 19, -1, 5, 19, 9, 19, -36, -36, -33, -39, -33, -21, -21, -31, -21, -41, -35, -21, -31, -21, 49, 49, 52, 46, 52, 64, 64, 54, 64, 44, 50, 64, 54, 64, 49, 49, 52, 46, 52, 64, 64, 54, 64, 44, 50, 64, 54, 64, -76, -76, -73, -79, -73, -46, -46, -43, -49, -43, 4, 4, 7, 1, 7, -36, -36, -33, -39, -33, 4, 4, 7, 1, 7, -76, -76, -73, -79, -73, -46, -46, -43, -49, -43, 94, 94, 97, 91, 97, 94, 94, 97, 91, 97, -36, -36, -33, -39, -33, 4, 4, 7, 1, 7, -36, -36, -33, -39, -33, 49, 49, 52, 46, 52, 49, 49, 52, 46, 52, -128, -128, -128, -128, -104, -104, -224, -224, -104, -104, 64, 64, 64, 64, -96, -96, 64, 64, -256, -256, -136, -136, 64, 64, -96, -96, 64, 64, -128, -128, -128, -128, -104, -104, -224, -224, -104, -104, 280, 280, 280, 280, 280, 280, 280, 280, -96, -96, 64, 64, -96, -96, 244, 244, 244, 244, -256, -256, -136, -136, 64, 64, -96, -96, 64, 64, -256, -256, -136, -136, 424, 424, 424, 424, -96, -96, 64, 64, -96, -96, 244, 244, 244, 244, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, 9, 19, 9, 31, 31, -31, -21, 9, 19, -71, -41, 9, -31, 9, -113, -113, -95, -185, -95, 31, 31, -89, 31, -209, -119, 31, -89, 31, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, -9, 91, -9, 211, 211, -9, 91, -9, 211, 211, -31, -21, 9, 19, -31, -21, 54, 64, 54, 64, -71, -41, 9, -31, 9, -71, -41, 99, 99, -31, 9, -31, 54, 54, -95, -95, -77, -167, -77, 49, 49, -71, 49, -191, -101, 49, -71, 49, -95, -95, -77, -167, -77, 211, 211, 211, 211, -71, 49, -71, 184, 184, -191, -101, 49, -71, 49, -191, -101, 319, 319, -71, 49, -71, 184, 184, 79, 37, -61, 9, -61, 79, 37, -229, -229, 9, -61, 9, -145, -145, -11, -17, -31, -21, -31, -41, -47, -11, -17, -229, -229, -199, -349, -199, 21, -49, 21, -133, -133, -21, -31, -51, -21, -133, -133, -115, -205, -115, -1, 5, 19, 9, 19, -1, 5, 43, 43, 9, 19, 9, 31, 31, -41, -35, -21, -31, -21, -1, 5, 19, 9, 19, -81, -75, -51, -45, -1, 5, -41, -35, -1, 5, -197, -197, -167, -317, -167, 43, 43, -157, 43, -357, -207, 43, -157, 43, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, 9, 19, 9, 31, 31, -31, -21, 9, 19, -71, -41, 9, -31, 9, -113, -113, -95, -185, -95, 31, 31, -89, 31, -209, -119, 31, -89, 31, 79, 37, -61, 9, -61, 79, 37, -229, -229, 9, -61, 9, -145, -145, -11, -17, -31, -21, -31, -41, -47, -11, -17, -229, -229, -199, -349, -199, 21, -49, 21, -133, -133, -21, -31, -51, -21, -133, -133, -115, -205, -115, -91, -31, 109, 9, 109, -91, -31, 349, 349, 9, 109, 9, 229, 229, -91, -31, 109, 9, 109, -91, -31, 349, 349, 9, 109, 9, 229, 229, -41, -35, -21, -31, -21, -1, 5, 19, 9, 19, -41, -35, -21, -31, -21, 44, 50, 64, 54, 64, 44, 50, 64, 54, 64, -81, -75, -51, -45, -1, 5, -41, -35, -1, 5, -81, -75, -51, -45, 89, 95, 89, 95, -41, -35, -1, 5, -41, -35, 44, 50, 44, 50, -161, -161, -131, -281, -131, 79, 79, -121, 79, -321, -171, 79, -121, 79, -161, -161, -131, -281, -131, 349, 349, 349, 349, -121, 79, -121, 304, 304, -321, -171, 79, -121, 79, -321, -171, 529, 529, -121, 79, -121, 304, 304, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, 9, 19, 9, 31, 31, -31, -21, 9, 19, -71, -41, 9, -31, 9, -113, -113, -95, -185, -95, 31, 31, -89, 31, -209, -119, 31, -89, 31, 25, -45, 25, -129, -129, -17, -27, -47, -17, -129, -129, -111, -201, -111, -9, 91, -9, 211, 211, -9, 91, -9, 211, 211, -31, -21, 9, 19, -31, -21, 54, 64, 54, 64, -71, -41, 9, -31, 9, -71, -41, 99, 99, -31, 9, -31, 54, 54, -95, -95, -77, -167, -77, 49, 49, -71, 49, -191, -101, 49, -71, 49, -95, -95, -77, -167, -77, 211, 211, 211, 211, -71, 49, -71, 184, 184, -191, -101, 49, -71, 49, -191, -101, 319, 319, -71, 49, -71, 184, 184])\n assert answers_match(candidate(expression='5*3+8-2*4+9*2'), [-165, -205, -75, -205, -115, 675, 795, 105, 225, -165, -75, 795, 105, 345, -165, -205, -75, -205, -115, 990, 1170, 990, 1170, 105, 225, 105, 270, 270, -150, -60, 810, 120, 360, -150, -60, 1170, 1170, 120, 360, 120, 450, 450, -21, -29, -3, -29, -11, 147, 171, 33, 57, -21, -3, 171, 33, 81, 11, 3, 29, 3, 21, -21, -29, -3, -29, -11, 990, 1170, 990, 1170, 462, 546, 1166, 1378, 462, 546, 33, 153, 33, 198, 198, 33, 57, 65, 33, 198, 198, 102, 230, 102, -150, -60, 810, 120, 360, -150, -60, 1170, 1170, 120, 360, 120, 450, 450, -6, 12, 186, 48, 96, 58, 76, -6, 12, 1170, 1170, 546, 1378, 546, 48, 288, 48, 378, 378, 48, 96, 112, 48, 378, 378, 186, 442, 186])\n assert answers_match(candidate(expression='9-8+7-6+5-4'), [1, 1, -1, 9, -1, 1, 1, -1, -1, 9, -1, 9, -1, -1, 1, 1, 3, -7, 3, -13, -13, 1, 1, 1, 1, 3, -11, 3, 1, -9, 1, -9, -9, -7, 3, -21, -7, 1, 1, 3, -11, 3])\n assert answers_match(candidate(expression='5+4+3+2+1+0'), [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15])\n assert answers_match(candidate(expression='5*6-7*8+9*10-11*12'), [38180, 3530, 1220, 3530, -33430, 72620, 7170, 1220, -1300, 450, -36510, 7170, -36510, -66750, 5240, 290, -40, 290, -4990, 72620, 7170, 39680, 3930, -2740, -5260, -40, -5260, -2560, 450, -36510, 7170, -36510, -66750, -2790, -8070, 7170, 3930, -40470, -70710, -8070, -70710, -38310, 5450, 500, 170, 500, -4780, 10370, 1020, 170, -190, 60, -5220, 1020, -5220, -9540, -5740, -790, -460, -790, 4490, -5530, -580, -250, -580, 4700, 68930, 6780, 35990, 3540, 10370, 1020, 25010, 2460, -610, -60, -4060, -6580, -1360, -6580, -3880, -1150, -1510, -460, -250, -6310, -3610, -1510, -2710, -610, 780, -36180, 7500, -36180, -66420, -2460, -7740, 7500, 4260, -40140, -70380, -7740, -70380, -37980, 60, -5220, 1020, -5220, -9540, -3540, 1740, -1020, 4260, 6780, 3540, 1020, 2460, -60, -41460, -71700, -9060, -71700, -39300, -6540, -10860, 1740, 4260, -68460, -36060, -10860, -25260, -60, 7660, 730, 268, 730, -6662, 14548, 1458, 268, -236, 114, -7278, 1458, -7278, -13326, 1072, 82, 16, 82, -974, 14548, 1458, 7960, 810, -524, -1028, 16, -1028, -488, 114, -7278, 1458, -7278, -13326, -534, -1590, 1458, 810, -8070, -14118, -1590, -14118, -7638, 5450, 500, 170, 500, -4780, 10370, 1020, 170, -190, 60, -5220, 1020, -5220, -9540, -25070, -2300, -782, -2300, 21988, -47702, -4692, -782, 874, -276, 24012, -4692, 24012, 43884, -1348, -358, -292, -358, 698, -1138, -148, -82, -148, 908, -1124, -134, -68, -134, 922, -1138, -148, -82, -148, 908, -914, 76, 142, 76, 1132, 68930, 6780, 35990, 3540, 10370, 1020, 25010, 2460, -610, -60, 10858, 1068, 4270, 420, 10370, 1020, -47702, -4692, 29402, 2892, 3782, 372, 2074, 204, 3782, 372, -23546, -2316, -3532, -6052, -832, -6052, -3352, -622, -982, 68, 278, -5782, -3082, -982, -2182, -82, -788, -1292, -248, -1292, -752, -622, -982, 2122, 3778, -292, -82, -68, -82, 142, -5782, -3082, -982, -2182, -82, -1022, -482, -982, 3778, -2542, -442, -302, -442, 1798, 780, -36180, 7500, -36180, -66420, -2460, -7740, 7500, 4260, -40140, -70380, -7740, -70380, -37980, 60, -5220, 1020, -5220, -9540, -3540, 1740, -1020, 4260, 6780, 3540, 1020, 2460, -60, -41460, -71700, -9060, -71700, -39300, -6540, -10860, 1740, 4260, -68460, -36060, -10860, -25260, -60, 444, -6948, 1788, -6948, -12996, -204, -1260, 1788, 1140, -7740, -13788, -1260, -13788, -7308, 60, -5220, 1020, -5220, -9540, -276, 24012, -4692, 24012, 43884, -3108, -2052, -588, 468, -420, 636, -588, 468, 2100, 3156, 6780, 3540, 1020, 2460, -60, 1068, 420, 1020, -4692, 2892, 372, 204, 372, -2316, -40932, -71172, -8532, -71172, -38772, -6012, -10332, 2268, 4788, -67932, -35532, -10332, -24732, 468, -8004, -14052, -1524, -14052, -7572, -6012, -10332, 26916, 46788, -2052, 468, 636, 468, 3156, -67932, -35532, -10332, -24732, 468, -10812, -4332, -10332, 46788, -29052, -3852, -2172, -3852, 23028])\n assert answers_match(candidate(expression='10+5*2-3*2+1'), [-25, -15, -5, -5, 5, 11, 13, -5, 31, -9, 1, 15, 1, 25, -105, -75, -45, -45, -15, 11, 13, 21, 23, 15, 51, -45, 51, 81, -9, 1, 15, 1, 25, -59, -29, 15, 25, 11, 35, -29, 35, 55])\n assert answers_match(candidate(expression='99-9*9+8*8-7*7+6*6'), [21114, 38754, 5562, 38754, 23202, -3078, -5598, 378, -3078, 35874, 20322, -5598, 15138, -5598, 2151, 4356, 207, 4356, 2412, -3078, -5598, -22041, -39996, 2646, -810, -441, -810, -3897, 35874, 20322, -5598, 15138, -5598, 1476, -468, -5598, -39996, 17406, -3330, -1116, -3330, -21852, 44928, 82413, 11880, 82413, 49365, -6480, -11835, 864, -6480, 76293, 43245, -11835, 32229, -11835, 2151, 4356, 207, 4356, 2412, 1584, 3789, -360, 3789, 1845, -6480, -11835, -25443, -46233, -6480, -11835, -25443, -46233, -49824, -90459, 2646, -810, -441, -810, -3897, 6048, -1296, -441, -1008, -1296, -4383, -1296, -4383, -8352, 35469, 19917, -6003, 14733, -6003, 1071, -873, -6003, -40401, 17001, -3735, -1521, -3735, -22257, 76293, 43245, -11835, 32229, -11835, 1071, -873, -2331, -4275, -11835, -46233, -11835, -46233, -90459, 17001, -3735, -1521, -3735, -22257, 37413, -6651, -1521, -4923, -6651, -25173, -6651, -25173, -48987, 2362, 4322, 634, 4322, 2594, -326, -606, 58, -326, 4002, 2274, -606, 1698, -606, 255, 500, 39, 500, 284, -326, -606, -2433, -4428, 310, -74, -33, -74, -417, 4002, 2274, -606, 1698, -606, 180, -36, -606, -4428, 1950, -354, -108, -354, -2412, 44928, 82413, 11880, 82413, 49365, -6480, -11835, 864, -6480, 76293, 43245, -11835, 32229, -11835, 26176, 47981, 6952, 47981, 28757, -3728, -6843, 544, -3728, 44421, 25197, -6843, 18789, -6843, -257, -12, -473, -12, -228, -824, -579, -1040, -579, -795, 255, 500, 39, 500, 284, -824, -579, -1040, -579, -795, -312, -67, -528, -67, -283, -6480, -11835, -25443, -46233, -6480, -11835, -25443, -46233, -49824, -90459, -3728, -6843, -5835, -10665, -6480, -11835, -3728, -6843, -27851, -50601, -52232, -94827, -5835, -10665, -52232, -94827, -30216, -54891, 2934, -522, -153, -522, -3609, 6336, -1008, -153, -720, -1008, -4095, -1008, -4095, -8064, 310, -74, -33, -74, -417, 6336, -1008, 3712, -560, -545, -1112, -33, -1112, -600, -1008, -4095, -1008, -4095, -8064, -560, -903, -1008, -560, -4487, -8456, -903, -8456, -4872, 35469, 19917, -6003, 14733, -6003, 1071, -873, -6003, -40401, 17001, -3735, -1521, -3735, -22257, 76293, 43245, -11835, 32229, -11835, 1071, -873, -2331, -4275, -11835, -46233, -11835, -46233, -90459, 17001, -3735, -1521, -3735, -22257, 37413, -6651, -1521, -4923, -6651, -25173, -6651, -25173, -48987, 3597, 1869, -1011, 1293, -1011, -225, -441, -1011, -4833, 1545, -759, -513, -759, -2817, 76293, 43245, -11835, 32229, -11835, 44421, 25197, -6843, 18789, -6843, -3297, -3513, -6699, -6915, -225, -441, -6699, -6915, -3627, -3843, -11835, -46233, -11835, -46233, -90459, -6843, -10665, -11835, -6843, -50601, -94827, -10665, -94827, -54891, 17289, -3447, -1233, -3447, -21969, 37701, -6363, -1233, -4635, -6363, -24885, -6363, -24885, -48699, 1545, -759, -513, -759, -2817, 37701, -6363, 21957, -3675, -3585, -6987, -513, -6987, -3915, -6363, -24885, -6363, -24885, -48699, -3675, -5733, -6363, -3675, -27237, -51051, -5733, -51051, -29547, -210150, -386550, -54630, -386550, -231030, 31770, 56970, -2790, 31770, -357750, -202230, 56970, -150390, 56970, -20520, -42570, -1080, -42570, -23130, 31770, 56970, 221400, 400950, -25470, 9090, 5400, 9090, 39960, -357750, -202230, 56970, -150390, 56970, -13770, 5670, 56970, 400950, -173070, 34290, 12150, 34290, 219510, -448290, -823140, -117810, -823140, -492660, 65790, 119340, -7650, 65790, -761940, -431460, 119340, -321300, 119340, -20520, -42570, -1080, -42570, -23130, -14850, -36900, 4590, -36900, -17460, 65790, 119340, 255420, 463320, 65790, 119340, 255420, 463320, 499230, 905580, -25470, 9090, 5400, 9090, 39960, -59490, 13950, 5400, 11070, 13950, 44820, 13950, 44820, 84510, -353700, -198180, 61020, -146340, 61020, -9720, 9720, 61020, 405000, -169020, 38340, 16200, 38340, 223560, -761940, -431460, 119340, -321300, 119340, -9720, 9720, 24300, 43740, 119340, 463320, 119340, 463320, 905580, -169020, 38340, 16200, 38340, 223560, -373140, 67500, 16200, 50220, 67500, 252720, 67500, 252720, 490860, -2326, -4286, -598, -4286, -2558, 362, 642, -22, 362, -3966, -2238, 642, -1662, 642, -219, -464, -3, -464, -248, 362, 642, 2469, 4464, -274, 110, 69, 110, 453, -3966, -2238, 642, -1662, 642, -144, 72, 642, 4464, -1914, 390, 144, 390, 2448, -1534, -3494, 194, -3494, -1766, 1154, 1434, 770, 1154, -3174, -1446, 1434, -870, 1434, 573, 328, 789, 328, 544, 1154, 1434, 3261, 5256, 518, 902, 861, 902, 1245, -3174, -1446, 1434, -870, 1434, 648, 864, 1434, 5256, -1122, 1182, 936, 1182, 3240, 15822, 29052, 4158, 29052, 17388, -2322, -4212, 270, -2322, 26892, 15228, -4212, 11340, -4212, -2930, -5380, -770, -5380, -3220, 430, 780, -50, 430, -4980, -2820, 780, -2100, 780, -448290, -823140, -117810, -823140, -492660, 65790, 119340, -7650, 65790, -761940, -431460, 119340, -321300, 119340, -7618, -13988, -2002, -13988, -8372, 1118, 2028, -130, 1118, -12948, -7332, 2028, -5460, 2028, -239674, -440084, -62986, -440084, -263396, 35174, 63804, -4090, 35174, -407364, -230676, 63804, -171780, 63804, -859, -1104, -643, -1104, -888, -1426, -1671, -1210, -1671, -1455, -347, -592, -131, -592, -376, -1426, -1671, -1210, -1671, -1455, -914, -1159, -698, -1159, -943, 6269, 6024, 6485, 6024, 6240, 11939, 11694, 12155, 11694, 11910, -219, -464, -3, -464, -248, 573, 328, 789, 328, 544, -733, -978, -517, -978, -762, -221, -466, -5, -466, -250, 11939, 11694, 12155, 11694, 11910, -93, -338, 123, -338, -122, 6243, 5998, 6459, 5998, 6214, -2322, -4212, -21285, -38610, -2322, -4212, -21285, -38610, -45666, -82836, 430, 780, -1677, -3042, -2322, -4212, 430, 780, -23693, -42978, -48074, -87204, -1677, -3042, -48074, -87204, -26058, -47268, 65790, 119340, 255420, 463320, 65790, 119340, 255420, 463320, 499230, 905580, 1118, 2028, 3225, 5850, 35174, 63804, 37281, 67626, -2322, -4212, 430, 780, 65790, 119340, 1118, 2028, 35174, 63804, -24295, -44070, -48676, -88296, -2279, -4134, -48676, -88296, -26660, -48360, 282209, 511914, 526019, 954174, 3225, 5850, 37281, 67626, -18877, -34242, 3139, 5694, 526019, 954174, 8643, 15678, 281091, 509886, 3006, -450, -81, -450, -3537, 6408, -936, -81, -648, -936, -4023, -936, -4023, -7992, 382, -2, 39, -2, -345, 6408, -936, 3784, -488, -473, -1040, 39, -1040, -528, -936, -4023, -936, -4023, -7992, -488, -831, -936, -488, -4415, -8384, -831, -8384, -4800, -28674, 5886, 2196, 5886, 36756, -62694, 10746, 2196, 7866, 10746, 41616, 10746, 41616, 81306, -274, 110, 69, 110, 453, 518, 902, 861, 902, 1245, 2250, -342, -374, 106, -62694, 10746, -1030, 218, -33502, 5762, -571, -1138, -59, -1138, -626, 6557, 12227, 69, 861, -445, 67, 12227, 195, 6531, -342, -3429, -342, -3429, -7398, 106, -237, -342, 106, -3821, -7790, -237, -7790, -4206, 10746, 41616, 10746, 41616, 81306, 218, 561, 5762, 6105, -342, 106, 10746, 218, 5762, -3919, -7888, -335, -7888, -4304, 45977, 85667, 561, 6105, -3037, 547, 85667, 1443, 45795, 35964, 20412, -5508, 15228, -5508, 1566, -378, -5508, -39906, 17496, -3240, -1026, -3240, -21762, 76788, 43740, -11340, 32724, -11340, 1566, -378, -1836, -3780, -11340, -45738, -11340, -45738, -89964, 17496, -3240, -1026, -3240, -21762, 37908, -6156, -1026, -4428, -6156, -24678, -6156, -24678, -48492, 4092, 2364, -516, 1788, -516, 270, 54, -516, -4338, 2040, -264, -18, -264, -2322, 76788, 43740, -11340, 32724, -11340, 44916, 25692, -6348, 19284, -6348, -2802, -3018, -6204, -6420, 270, 54, -6204, -6420, -3132, -3348, -11340, -45738, -11340, -45738, -89964, -6348, -10170, -11340, -6348, -50106, -94332, -10170, -94332, -54396, 17784, -2952, -738, -2952, -21474, 38196, -5868, -738, -4140, -5868, -24390, -5868, -24390, -48204, 2040, -264, -18, -264, -2322, 38196, -5868, 22452, -3180, -3090, -6492, -18, -6492, -3420, -5868, -24390, -5868, -24390, -48204, -3180, -5238, -5868, -3180, -26742, -50556, -5238, -50556, -29052, -353700, -198180, 61020, -146340, 61020, -9720, 9720, 61020, 405000, -169020, 38340, 16200, 38340, 223560, -761940, -431460, 119340, -321300, 119340, -9720, 9720, 24300, 43740, 119340, 463320, 119340, 463320, 905580, -169020, 38340, 16200, 38340, 223560, -373140, 67500, 16200, 50220, 67500, 252720, 67500, 252720, 490860, -3876, -2148, 732, -1572, 732, -54, 162, 732, 4554, -1824, 480, 234, 480, 2538, 876, 2604, 5484, 3180, 5484, 4698, 4914, 5484, 9306, 2928, 5232, 4986, 5232, 7290, 26892, 15228, -4212, 11340, -4212, -4980, -2820, 780, -2100, 780, -761940, -431460, 119340, -321300, 119340, -12948, -7332, 2028, -5460, 2028, -407364, -230676, 63804, -171780, 63804, -3894, -3678, -7296, -7080, -822, -606, -7296, -7080, -4224, -4008, 38874, 39090, 72894, 73110, -54, 162, 4698, 4914, -3138, -2922, -66, 150, 72894, 73110, 702, 918, 38718, 38934, -4212, -38610, -4212, -38610, -82836, 780, -3042, -4212, 780, -42978, -87204, -3042, -87204, -47268, 119340, 463320, 119340, 463320, 905580, 2028, 5850, 63804, 67626, -4212, 780, 119340, 2028, 63804, -44070, -88296, -4134, -88296, -48360, 511914, 954174, 5850, 67626, -34242, 5694, 954174, 15678, 509886, 17856, -2880, -666, -2880, -21402, 38268, -5796, -666, -4068, -5796, -24318, -5796, -24318, -48132, 2112, -192, 54, -192, -2250, 38268, -5796, 22524, -3108, -3018, -6420, 54, -6420, -3348, -5796, -24318, -5796, -24318, -48132, -3108, -5166, -5796, -3108, -26670, -50484, -5166, -50484, -28980, -172224, 35136, 12996, 35136, 220356, -376344, 64296, 12996, 47016, 64296, 249516, 64296, 249516, 487656, -1824, 480, 234, 480, 2538, 2928, 5232, 4986, 5232, 7290, 13320, -2232, -2424, 456, -376344, 64296, -6360, 1128, -201192, 34392, -3606, -7008, -534, -7008, -3936, 39162, 73182, 234, 4986, -2850, 222, 73182, 990, 39006, -2232, -20754, -2232, -20754, -44568, 456, -1602, -2232, 456, -23106, -46920, -1602, -46920, -25416, 64296, 249516, 64296, 249516, 487656, 1128, 3186, 34392, 36450, -2232, 456, 64296, 1128, 34392, -23694, -47508, -2190, -47508, -26004, 275682, 513822, 3186, 36450, -18402, 3102, 513822, 8478, 274590])\n assert answers_match(candidate(expression='3*5-2*3+4'), [-27, -15, 63, 9, 39, 1, 5, 63, 91, 1, 31, 13, 31, 43])\n assert answers_match(candidate(expression='10+5*2-3*4'), [-40, -10, 8, -10, 38, -150, -60, 8, 18, 20, 68, -60, 68, 108])\n assert answers_match(candidate(expression='1+2+3+4+5+6'), [21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21])\n assert answers_match(candidate(expression='8*9-7+6*5-4'), [-32, -192, -32, -192, -416, 64, 224, -32, 64, -256, -480, 224, -192, 288, 59, 39, 59, 39, 11, 22, 42, 71, 91, -32, 64, 59, 22, 71, -228, -452, 252, -164, 316, 31, 3, 42, 91, -164, 316, 291, 106, 351])\n assert answers_match(candidate(expression='8*3+2*4-1+9'), [-72, 216, 8, 144, 152, -240, 480, 8, 80, 144, 152, 192, 152, 224, 12, 48, 22, 39, 40, -240, 480, -156, 312, 78, 150, 22, 150, 94, 81, 89, 129, 89, 161, 39, 40, 129, 87, 96, 168, 40, 168, 112])\n assert answers_match(candidate(expression='3*2+2-1*2+1'), [3, 3, 15, 9, 15, 3, 3, 27, 27, 9, 15, 9, 21, 21, 5, 5, 9, 7, 9, 9, 9, 5, 5, 27, 27, 21, 33, 21, 7, 13, 7, 19, 19, 7, 9, 11, 7, 19, 19, 15, 23, 15])\n assert answers_match(candidate(expression='9*2+10-3*4+5-1+8'), [108, -324, 108, -324, -324, 36, -108, -54, 36, -180, -180, -108, -198, -108, 18, 1026, 18, 1026, 1026, -36, 108, 234, 378, -216, -126, 504, -36, 234, -36, -36, 36, -54, 36, 594, 594, 108, 378, -72, 18, 648, 108, 378, 108, -324, 108, -324, -324, 36, -108, -54, 36, -180, -180, -108, -198, -108, 0, 1296, 0, 1296, 1296, 0, 1296, 0, 1296, 1296, -36, 108, 234, 378, -36, 108, 288, 432, 288, 432, -216, -126, 504, -36, 234, -216, -126, 648, 648, -36, 234, -36, 288, 288, -36, -36, 36, -54, 36, 594, 594, 108, 378, -72, 18, 648, 108, 378, -36, -36, 36, -54, 36, 720, 720, 720, 720, 108, 378, 108, 432, 432, -72, 18, 648, 108, 378, -72, 18, 792, 792, 108, 378, 108, 432, 432, 28, -20, 28, -20, -20, 20, 4, 10, 20, -4, -4, 4, -6, 4, 18, 130, 18, 130, 130, 12, 28, 42, 58, -8, 2, 72, 12, 42, 12, 12, 20, 10, 20, 82, 82, 28, 58, 8, 18, 88, 28, 58, 108, 60, 108, 60, 60, 100, 84, 90, 100, 76, 76, 84, 74, 84, 28, -20, 28, -20, -20, 20, 4, 10, 20, -4, -4, 4, -6, 4, 0, 1296, 0, 1296, 1296, 0, 1296, 0, 1296, 1296, 0, 400, 0, 400, 400, 0, 1680, 0, 1680, 1680, 0, 400, 0, 400, 400, -4, 12, 266, 282, -4, 12, 320, 336, 320, 336, 12, 28, 42, 58, 92, 108, 12, 28, 320, 336, 320, 336, 96, 112, 416, 432, 96, 112, -144, -54, 576, 36, 306, -144, -54, 720, 720, 36, 306, 36, 360, 360, -8, 2, 72, 12, 42, 72, 82, -8, 2, 720, 720, 216, 936, 216, -4, 266, -4, 320, 320, 12, 42, 92, 12, 320, 320, 96, 416, 96, -100, -100, -28, -118, -28, 530, 530, 44, 314, -136, -46, 584, 44, 314, -100, -100, -28, -118, -28, 656, 656, 656, 656, 44, 314, 44, 368, 368, -136, -46, 584, 44, 314, -136, -46, 728, 728, 44, 314, 44, 368, 368, 12, 12, 20, 10, 20, 82, 82, 28, 58, 8, 18, 88, 28, 58, 92, 92, 100, 90, 100, 12, 12, 20, 10, 20, 656, 656, 656, 656, 208, 208, 848, 848, 208, 208, 12, 282, 12, 336, 336, 28, 58, 108, 28, 336, 336, 112, 432, 112, -128, -38, 592, 52, 322, -128, -38, 736, 736, 52, 322, 52, 376, 376, 8, 18, 88, 28, 58, 88, 98, 8, 18, 736, 736, 232, 952, 232, 12, 282, 12, 336, 336, 28, 58, 108, 28, 336, 336, 112, 432, 112])\n assert answers_match(candidate(expression='3+2*2+1-5*3+4'), [-61, -29, -49, -13, -9, -61, -29, -25, -25, -13, -9, -13, -1, -1, -27, -11, -21, -3, -1, -26, -10, -27, -11, -25, -25, 3, 10, 3, -17, -13, -17, -5, -5, -3, -1, -2, -3, -5, -5, 7, 10, 7, -160, -80, -130, -40, -30, -160, -80, -70, -70, -40, -30, -40, -10, -10, -27, -11, -21, -3, -1, -24, -8, -18, 0, 2, -26, -10, -27, -11, -20, -4, -27, -11, -24, -8, -7, -7, 21, 28, 21, -70, -70, 21, 42, 28, 21, 70, 21, 42, -17, -13, -17, -5, -5, -3, -1, -2, -3, -5, -5, 7, 10, 7, -56, -46, -56, -26, -26, -3, -1, 0, 2, -2, -3, 4, -3, 0, 1, 1, 13, 16, 13, -26, -26, 13, 22, 16, 13, 34, 13, 22])\n assert answers_match(candidate(expression='3*3-2*2+1*1-0*0+1'), [-9, -3, -9, -15, -9, -9, -3, -9, -9, -15, -9, -15, -9, -9, -9, 9, -9, -27, -9, -9, -3, -9, -3, -9, -9, -9, -9, -9, -15, -9, -15, -9, -9, -15, 3, -15, -15, 3, 3, 3, 3, 3, -6, -3, -6, -9, -6, -6, -3, -6, -6, -9, -6, -9, -6, -6, -9, 9, -9, -27, -9, -6, 9, -6, -21, -6, -9, -6, -9, -6, -6, -3, -9, -6, -6, -3, -9, -9, -9, -9, -9, -6, -6, -9, -6, -9, -9, -6, -9, -6, -12, -6, -12, -6, -6, -12, 6, -12, -12, 6, 6, 6, 6, 6, -9, -6, -9, -6, -6, -12, 6, -9, 6, -12, -12, -9, -12, -9, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 9, 6, 9, 12, 9, 9, 6, 9, 9, 12, 9, 12, 9, 9, 9, 0, 9, 18, 9, 9, 6, 9, 6, 9, 9, 9, 9, 9, 12, 9, 12, 9, 9, 12, 3, 12, 12, 3, 3, 3, 3, 3, 0, -3, 0, 3, 0, 0, -3, 0, 0, 3, 0, 3, 0, 0, 9, 6, 9, 12, 9, 9, 6, 9, 9, 12, 9, 12, 9, 9, -9, 0, -9, -18, -9, -6, 0, -6, -12, -6, 9, 0, 9, 18, 9, 0, 0, 0, 0, 0, 9, 0, 9, 18, 9, -9, -12, -9, -12, -6, -9, -9, -12, -6, -9, 9, 6, 9, 6, 0, -3, 9, 6, -9, -12, -6, -9, 9, 6, 0, -3, 9, 6, -9, -9, -9, -9, -9, -6, -6, -9, -6, -9, -9, -6, -9, -6, 9, 9, 9, 9, 9, 0, 0, 9, 9, -9, -6, 9, 0, 9, -9, -9, -6, -9, -6, 9, 9, 0, 9, -9, -6, 9, 0, 9, -6, 0, -6, 0, 0, -6, 12, -6, -6, 12, 12, 12, 12, 12, -3, 0, -3, 0, 0, -6, 12, -3, 12, -6, -6, -3, -6, -3, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 9, 12, 9, 9, 12, 3, 12, 12, 3, 3, 3, 3, 3, 3, 0, 3, 0, 0, 12, 9, 12, 9, 9, -6, 3, -3, 3, 12, 3, 3, 3, 12, 3, -6, -6, -3, -6, -3, 12, 12, 3, 12, -6, -3, 12, 3, 12, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 1, 3, 3, 5, 3, 3, 1, 3, 1, 3, 3, 3, 9, 3, -3, 3, 3, 5, 3, 5, 3, 3, 3, 3, 3, 1, 3, 1, 3, 3, 1, 7, 1, 1, 7, 7, 7, 7, 7, 4, 5, 4, 3, 4, 4, 5, 4, 4, 3, 4, 3, 4, 4, 3, 9, 3, -3, 3, 4, 9, 4, -1, 4, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 3, 3, 3, 3, 3, 4, 4, 3, 4, 3, 3, 4, 3, 4, 2, 4, 2, 4, 4, 2, 8, 2, 2, 8, 8, 8, 8, 8, 3, 4, 3, 4, 4, 2, 8, 3, 8, 2, 2, 3, 2, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 6, 9, 12, 9, 9, 6, 9, 9, 12, 9, 12, 9, 9, 9, 0, 9, 18, 9, 9, 6, 9, 6, 9, 9, 9, 9, 9, 12, 9, 12, 9, 9, 12, 3, 12, 12, 3, 3, 3, 3, 3, 21, 14, 21, 28, 21, 21, 14, 21, 21, 28, 21, 28, 21, 21, 21, 0, 21, 42, 21, 21, 14, 21, 14, 21, 21, 21, 21, 21, 28, 21, 28, 21, 21, 28, 7, 28, 28, 7, 7, 7, 7, 7, -2, -3, -2, -1, -2, -2, -3, -2, -2, -1, -2, -1, -2, -2, 7, 6, 7, 8, 7, 7, 6, 7, 7, 8, 7, 8, 7, 7, 6, 5, 6, 7, 6, 6, 5, 6, 6, 7, 6, 7, 6, 6, 7, 6, 7, 8, 7, 7, 6, 7, 7, 8, 7, 8, 7, 7, 15, 14, 15, 16, 15, 15, 14, 15, 15, 16, 15, 16, 15, 15, -9, 0, -9, -18, -9, -6, 0, -6, -12, -6, 9, 0, 9, 18, 9, 0, 0, 0, 0, 0, 9, 0, 9, 18, 9, 3, 0, 3, 6, 3, 4, 0, 4, 8, 4, 9, 0, 9, 18, 9, 21, 0, 21, 42, 21, -2, 0, -2, -4, -2, 7, 0, 7, 14, 7, 6, 0, 6, 12, 6, 7, 0, 7, 14, 7, 15, 0, 15, 30, 15, -9, -10, -9, -10, -6, -7, -9, -10, -6, -7, 9, 8, 9, 8, 0, -1, 9, 8, -9, -10, -6, -7, 9, 8, 0, -1, 9, 8, 3, 2, 3, 2, 4, 3, 3, 2, 4, 3, 9, 8, 9, 8, 21, 20, 21, 20, -2, -3, 7, 6, 6, 5, 7, 6, 15, 14, -9, -10, -6, -7, 9, 8, 0, -1, 9, 8, 3, 2, 4, 3, 9, 8, 21, 20, -2, -3, 7, 6, 6, 5, 7, 6, 15, 14, -9, -9, -9, -9, -9, -6, -6, -9, -6, -9, -9, -6, -9, -6, 9, 9, 9, 9, 9, 0, 0, 9, 9, -9, -6, 9, 0, 9, -9, -9, -6, -9, -6, 9, 9, 0, 9, -9, -6, 9, 0, 9, 3, 3, 3, 3, 3, 4, 4, 3, 4, 3, 3, 4, 3, 4, 9, 9, 9, 9, 9, 21, 21, 21, 21, 21, -2, -2, 7, 7, 6, 6, 7, 7, 15, 15, -9, -6, 9, 0, 9, 3, 4, 9, 21, -2, 7, 6, 7, 15, -9, -9, -6, -9, -6, 9, 9, 0, 9, -9, -6, 9, 0, 9, 3, 3, 4, 3, 4, 9, 9, 21, 21, -2, 7, 6, 7, 15, -9, -6, 9, 0, 9, 3, 4, 9, 21, -2, 7, 6, 7, 15, -8, -2, -8, -2, -2, -8, 10, -8, -8, 10, 10, 10, 10, 10, -5, -2, -5, -2, -2, -8, 10, -5, 10, -8, -8, -5, -8, -5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 10, 7, 7, 10, 1, 10, 10, 1, 1, 1, 1, 1, 1, -2, 1, -2, -2, 10, 7, 10, 7, 7, -8, 1, -5, 1, 10, 1, 1, 1, 10, 1, -8, -8, -5, -8, -5, 10, 10, 1, 10, -8, -5, 10, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 6, 4, 6, 6, 4, 10, 4, 4, 10, 10, 10, 10, 10, 5, 6, 5, 6, 6, 4, 10, 5, 10, 4, 4, 5, 4, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 7, 10, 7, 7, 10, 1, 10, 10, 1, 1, 1, 1, 1, 22, 15, 22, 15, 15, 22, 1, 22, 22, 1, 1, 1, 1, 1, -1, -2, -1, -2, -2, 8, 7, 8, 7, 7, 7, 6, 7, 6, 6, 8, 7, 8, 7, 7, 16, 15, 16, 15, 15, -8, 1, -5, 1, 10, 1, 1, 1, 10, 1, 4, 1, 5, 1, 10, 1, 22, 1, -1, 1, 8, 1, 7, 1, 8, 1, 16, 1, -8, -8, -5, -8, -5, 10, 10, 1, 10, -8, -5, 10, 1, 10, 4, 4, 5, 4, 5, 10, 10, 22, 22, -1, 8, 7, 8, 16, -8, -5, 10, 1, 10, 4, 5, 10, 22, -1, 8, 7, 8, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(expression='10*2-5*3+1'), [-180, -140, -120, -120, -80, 0, 4, -120, 60, -129, -89, 6, -89, 46])\n assert answers_match(candidate(expression='3*3*3-2*2*2+1*1*1'), [-81, -81, -81, -81, -81, -63, -63, -81, -63, -81, -81, -63, -81, -63, -81, -81, -81, -81, -81, -54, -54, -54, -54, -81, -63, -81, -54, -54, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 54, 54, 54, 45, 45, 54, 45, 54, 54, 45, 54, 45, -27, -27, -27, -27, -27, 54, 54, 54, 54, 54, -36, -36, -36, -36, 45, 45, -9, -9, 45, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 45, 54, 45, -27, -27, 54, 54, -36, -36, 45, -9, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -9, -9, -9, -9, -3, -3, -9, -3, -9, -9, -3, -9, -3, -9, -9, -9, -9, -9, 0, 0, 0, 0, -9, -3, -9, 0, 0, -9, -9, -3, -9, -3, -9, -9, 0, 0, -9, -3, -9, 0, 0, 54, 54, 54, 54, 54, 45, 45, 54, 45, 54, 54, 45, 54, 45, 126, 126, 126, 126, 126, 105, 105, 126, 105, 126, 126, 105, 126, 105, -27, -27, -27, -27, -27, 54, 54, 54, 54, 54, 45, 45, 45, 45, 45, 54, 54, 54, 54, 54, 126, 126, 126, 126, 126, -42, -42, -42, -42, 39, 39, -15, -15, 39, 39, 6, 6, 6, 6, 39, 39, 87, 87, -15, -15, 39, 39, 33, 33, 39, 39, 87, 87, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -3, -9, 0, 0, 54, 45, 126, 105, -27, 54, 45, 54, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 45, 54, 45, -27, -27, 54, 54, -36, -36, 45, -9, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -9, -3, -9, -3, -9, -9, 0, 0, -9, -3, -9, 0, 0, 54, 54, 45, 54, 45, 126, 126, 105, 126, 105, -27, -27, 54, 54, 45, 45, 54, 54, 126, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -3, -9, 0, 0, 54, 45, 126, 105, -27, 54, 45, 54, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -81, -81, -81, -81, -63, -63, -81, -63, -81, -81, -63, -81, -63, -81, -81, -81, -81, -81, -54, -54, -54, -54, -81, -63, -81, -54, -54, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 54, 54, 54, 45, 45, 54, 45, 54, 54, 45, 54, 45, -27, -27, -27, -27, -27, 54, 54, 54, 54, 54, -36, -36, -36, -36, 45, 45, -9, -9, 45, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 45, 54, 45, -27, -27, 54, 54, -36, -36, 45, -9, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, 15, 15, 15, 15, 15, 17, 17, 15, 17, 15, 15, 17, 15, 17, 15, 15, 15, 15, 15, 18, 18, 18, 18, 15, 17, 15, 18, 18, 15, 15, 17, 15, 17, 15, 15, 18, 18, 15, 17, 15, 18, 18, 15, 15, 15, 15, 15, 17, 17, 15, 17, 15, 15, 17, 15, 17, 15, 15, 15, 15, 15, 18, 18, 18, 18, 15, 17, 15, 18, 18, 15, 15, 17, 15, 17, 15, 15, 18, 18, 15, 17, 15, 18, 18, 54, 54, 54, 54, 54, 45, 45, 54, 45, 54, 54, 45, 54, 45, 126, 126, 126, 126, 126, 105, 105, 126, 105, 126, 126, 105, 126, 105, 54, 54, 54, 54, 54, 45, 45, 54, 45, 54, 54, 45, 54, 45, 150, 150, 150, 150, 150, 125, 125, 150, 125, 150, 150, 125, 150, 125, 150, 150, 150, 150, 150, 125, 125, 150, 125, 150, 150, 125, 150, 125, -27, -27, -27, -27, -27, 54, 54, 54, 54, 54, 45, 45, 45, 45, 45, 54, 54, 54, 54, 54, 126, 126, 126, 126, 126, -27, -27, -27, -27, -27, 54, 54, 54, 54, 54, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 54, 54, 54, 54, 54, 126, 126, 126, 126, 126, 54, 54, 54, 54, 54, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, -44, -44, -44, -44, 37, 37, -17, -17, 37, 37, 4, 4, 4, 4, 37, 37, 85, 85, -17, -17, 37, 37, 31, 31, 37, 37, 85, 85, -44, -44, -44, -44, 37, 37, -17, -17, 37, 37, 20, 20, 20, 20, 20, 20, 20, 20, 37, 37, 85, 85, 37, 37, 101, 101, 101, 101, -17, -17, 37, 37, 31, 31, 37, 37, 85, 85, -17, -17, 37, 37, 47, 47, 47, 47, 37, 37, 85, 85, 37, 37, 101, 101, 101, 101, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -3, -9, 0, 0, 54, 45, 126, 105, -27, 54, 45, 54, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, 15, 17, 15, 18, 18, 15, 17, 15, 18, 18, 54, 45, 126, 105, 54, 45, 150, 125, 150, 125, -27, 54, 45, 54, 126, -27, 54, 69, 69, 54, 126, 54, 150, 150, -44, -44, 37, -17, 37, 4, 4, 37, 85, -17, 37, 31, 37, 85, -44, -44, 37, -17, 37, 20, 20, 20, 20, 37, 85, 37, 101, 101, -17, 37, 31, 37, 85, -17, 37, 47, 47, 37, 85, 37, 101, 101, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 45, 54, 45, -27, -27, 54, 54, -36, -36, 45, -9, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -9, -3, -9, -3, -9, -9, 0, 0, -9, -3, -9, 0, 0, 54, 54, 45, 54, 45, 126, 126, 105, 126, 105, -27, -27, 54, 54, 45, 45, 54, 54, 126, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -3, -9, 0, 0, 54, 45, 126, 105, -27, 54, 45, 54, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -81, -63, -81, -63, -81, -81, -54, -54, -81, -63, -81, -54, -54, 54, 54, 45, 54, 45, -27, -27, 54, 54, -36, -36, 45, -9, 45, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, 15, 15, 17, 15, 17, 15, 15, 18, 18, 15, 17, 15, 18, 18, 15, 15, 17, 15, 17, 15, 15, 18, 18, 15, 17, 15, 18, 18, 54, 54, 45, 54, 45, 126, 126, 105, 126, 105, 54, 54, 45, 54, 45, 150, 150, 125, 150, 125, 150, 150, 125, 150, 125, -27, -27, 54, 54, 45, 45, 54, 54, 126, 126, -27, -27, 54, 54, 69, 69, 69, 69, 54, 54, 126, 126, 54, 54, 150, 150, 150, 150, -44, -44, 37, -17, 37, 4, 4, 37, 85, -17, 37, 31, 37, 85, -44, -44, 37, -17, 37, 20, 20, 20, 20, 37, 85, 37, 101, 101, -17, 37, 31, 37, 85, -17, 37, 47, 47, 37, 85, 37, 101, 101, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, -9, -3, -9, 0, 0, 54, 45, 126, 105, -27, 54, 45, 54, 126, -42, -42, 39, -15, 39, 6, 6, 39, 87, -15, 39, 33, 39, 87, -81, -63, -81, -54, -54, 54, 45, -27, 54, -36, -36, 45, -9, 45, 15, 17, 15, 18, 18, 15, 17, 15, 18, 18, 54, 45, 126, 105, 54, 45, 150, 125, 150, 125, -27, 54, 45, 54, 126, -27, 54, 69, 69, 54, 126, 54, 150, 150, -44, -44, 37, -17, 37, 4, 4, 37, 85, -17, 37, 31, 37, 85, -44, -44, 37, -17, 37, 20, 20, 20, 20, 37, 85, 37, 101, 101, -17, 37, 31, 37, 85, -17, 37, 47, 47, 37, 85, 37, 101, 101])\n assert answers_match(candidate(expression='4+4+4+4+4+4+4+4+4+4'), [40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40])\n assert answers_match(candidate(expression='10-9-8-7-6-5-4-3-2-1'), [5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, 1, -1, 3, 1, 5, 5, 7, -3, -1, 3, 9, 1, 3, -5, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 11, 9, 13, 11, 15, 7, 9, 11, 5, 9, 13, 7, 9, 3, 5, 7, 3, 5, 1, 15, 17, 13, 15, 11, 9, 7, 1, -1, 11, 9, 9, 7, 19, 17, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, 7, 3, 9, 7, 13, 1, 5, 7, -1, 3, 9, 1, 3, -5, 11, 15, 9, 11, 5, 7, 3, 17, 13, 9, 1, 11, 9, 19, 7, 13, 5, 7, -1, 15, 9, 7, 17, 13, 5, 15, 13, 23, -1, -3, 1, -1, 3, -5, -3, -1, -7, -3, 1, -5, -3, -9, 3, 5, 1, 3, -1, -1, -3, 7, 5, 1, -5, 3, 1, 9, -1, 3, -3, -1, -7, 5, 1, -1, 7, 3, -3, 5, 3, 11, 5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, -7, -5, -9, -7, -11, -3, -5, -7, -1, -5, -9, -3, -5, 1, 1, -1, 3, 1, 5, 11, 9, 13, 11, 15, -1, -3, 1, -1, 3, 1, -1, 3, 1, 5, -11, -13, -9, -11, -7, 5, 7, -3, -1, 7, 9, 5, 7, 15, 17, -5, -3, 3, 5, 5, 7, -7, -5, -3, -1, 7, 9, -5, -3, -3, -1, -15, -13, 3, 9, 1, 3, -5, 11, 5, 3, 13, 9, 1, 11, 9, 19, -1, -7, 1, -1, 7, 3, 9, -9, -3, 1, 11, -1, 1, -11, 3, -5, 5, 3, 13, -7, 1, 3, -9, -5, 5, -7, -5, -17, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 9, 13, 7, 9, 3, 5, 1, 15, 11, 7, -1, 9, 7, 17, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, 5, 1, 7, 5, 11, -7, -11, -5, -7, -1, -1, 3, 9, 13, -3, 1, -1, 3, -13, -9, 5, -3, 7, 5, 15, -5, 3, 5, -7, -3, 7, -5, -3, -15, 1, 7, -1, 1, -7, 9, 3, 1, 11, 7, -1, 9, 7, 17, -3, -9, -1, -3, 5, 1, 7, -11, -5, -1, 9, -3, -1, -13, 1, -7, 3, 1, 11, -9, -1, 1, -11, -7, 3, -9, -7, -19, 13, 11, 15, 13, 17, 9, 11, 13, 7, 11, 15, 9, 11, 5, 17, 19, 15, 17, 13, 13, 11, 21, 19, 15, 9, 17, 15, 23, 13, 17, 11, 13, 7, 19, 15, 13, 21, 17, 11, 19, 17, 25, 7, 9, 5, 7, 3, 11, 9, 7, 13, 9, 5, 11, 9, 15, 13, 11, 15, 13, 17, 3, 1, 5, 3, 7, 9, 11, 17, 19, 7, 9, 9, 11, -1, 1, 13, 7, 15, 13, 21, 5, 11, 13, 3, 7, 15, 5, 7, -3, 11, 15, 9, 11, 5, 17, 13, 11, 19, 15, 9, 17, 15, 23, 7, 3, 9, 7, 13, 11, 15, 1, 5, 9, 17, 7, 9, -1, 11, 5, 13, 11, 19, 3, 9, 11, 1, 5, 13, 3, 5, -5, 5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, 1, -1, 3, 1, 5, 5, 7, -3, -1, 3, 9, 1, 3, -5, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 19, 21, 17, 19, 15, 23, 21, 19, 25, 21, 17, 23, 21, 27, 15, 13, 17, 15, 19, 19, 21, 11, 13, 17, 23, 15, 17, 9, 19, 15, 21, 19, 25, 13, 17, 19, 11, 15, 21, 13, 15, 7, 11, 9, 13, 11, 15, 7, 9, 11, 5, 9, 13, 7, 9, 3, -1, -3, 1, -1, 3, -5, -3, -1, -7, -3, 1, -5, -3, -9, 13, 11, 15, 13, 17, 9, 11, 13, 7, 11, 15, 9, 11, 5, 11, 9, 13, 11, 15, 7, 9, 11, 5, 9, 13, 7, 9, 3, 25, 23, 27, 25, 29, 21, 23, 25, 19, 23, 27, 21, 23, 17, 5, 7, 3, 5, 1, 15, 17, 13, 15, 11, 3, 5, 1, 3, -1, 5, 7, 3, 5, 1, -7, -5, -9, -7, -11, 17, 19, 15, 17, 13, 7, 9, 5, 7, 3, 5, 7, 3, 5, 1, 19, 21, 17, 19, 15, 15, 17, 13, 15, 11, 3, 5, 1, 3, -1, 17, 19, 15, 17, 13, 15, 17, 13, 15, 11, 29, 31, 27, 29, 25, 9, 7, 1, -1, 11, 9, 9, 7, 19, 17, -1, -3, 7, 5, 9, 7, -3, -5, 1, -1, 11, 9, -1, -3, 1, -1, -11, -13, 13, 11, 21, 19, 11, 9, 13, 11, 3, 1, 9, 7, 1, -1, 23, 21, 15, 13, 11, 9, -1, -3, 13, 11, 11, 9, 25, 23, 9, 7, 19, 17, 7, 5, 9, 7, -3, -5, 21, 19, 11, 9, 9, 7, 23, 21, 19, 17, 7, 5, 21, 19, 19, 17, 33, 31, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, 1, -5, 3, 1, 9, 5, 11, -7, -1, 3, 13, 1, 3, -9, 5, -3, 7, 5, 15, -5, 3, 5, -7, -3, 7, -5, -3, -15, 15, 9, 17, 15, 23, 7, 13, 15, 5, 9, 17, 7, 9, -1, 5, 11, 3, 5, -3, 19, 25, 17, 19, 11, 13, 7, 1, -5, 15, 9, 13, 7, 27, 21, 5, 15, 3, 5, -7, 17, 7, 5, 19, 15, 3, 17, 15, 29, 11, 3, 13, 11, 21, 1, 9, 11, -1, 3, 13, 1, 3, -9, 15, 23, 13, 15, 5, 11, 3, 25, 17, 13, 1, 15, 13, 27, 11, 21, 9, 11, -1, 23, 13, 11, 25, 21, 9, 23, 21, 35, 7, 3, 9, 7, 13, 1, 5, 7, -1, 3, 9, 1, 3, -5, 11, 15, 9, 11, 5, 7, 3, 17, 13, 9, 1, 11, 9, 19, 7, 13, 5, 7, -1, 15, 9, 7, 17, 13, 5, 15, 13, 23, -1, 3, -3, -1, -7, 5, 1, -1, 7, 3, -3, 5, 3, 11, 7, 3, 9, 7, 13, -5, -9, -3, -5, 1, 1, 5, 11, 15, -1, 3, 1, 5, -11, -7, 7, -1, 9, 7, 17, -3, 5, 7, -5, -1, 9, -3, -1, -13, 3, 9, 1, 3, -5, 11, 5, 3, 13, 9, 1, 11, 9, 19, -1, -7, 1, -1, 7, 3, 9, -9, -3, 1, 11, -1, 1, -11, 3, -5, 5, 3, 13, -7, 1, 3, -9, -5, 5, -7, -5, -17, 13, 17, 11, 13, 7, 19, 15, 13, 21, 17, 11, 19, 17, 25, 9, 5, 11, 9, 15, 13, 17, 3, 7, 11, 19, 9, 11, 1, 13, 7, 15, 13, 21, 5, 11, 13, 3, 7, 15, 5, 7, -3, 7, 3, 9, 7, 13, 1, 5, 7, -1, 3, 9, 1, 3, -5, 21, 17, 23, 21, 27, 15, 19, 21, 13, 17, 23, 15, 17, 9, 11, 15, 9, 11, 5, -1, 3, -3, -1, -7, 13, 17, 11, 13, 7, 11, 15, 9, 11, 5, 25, 29, 23, 25, 19, 7, 3, 17, 13, 5, 1, 7, 3, -5, -9, 19, 15, 9, 5, 7, 3, 21, 17, 17, 13, 5, 1, 19, 15, 17, 13, 31, 27, 9, 1, 11, 9, 19, -1, 7, 9, -3, 1, 11, -1, 1, -11, 13, 21, 11, 13, 3, 9, 1, 23, 15, 11, -1, 13, 11, 25, 9, 19, 7, 9, -3, 21, 11, 9, 23, 19, 7, 21, 19, 33, 7, 13, 5, 7, -1, 15, 9, 7, 17, 13, 5, 15, 13, 23, 3, -3, 5, 3, 11, 7, 13, -5, 1, 5, 15, 3, 5, -7, 7, -1, 9, 7, 17, -3, 5, 7, -5, -1, 9, -3, -1, -13, 17, 11, 19, 17, 25, 9, 15, 17, 7, 11, 19, 9, 11, 1, 7, 13, 5, 7, -1, 21, 27, 19, 21, 13, 15, 9, 3, -3, 17, 11, 15, 9, 29, 23, 7, 17, 5, 7, -5, 19, 9, 7, 21, 17, 5, 19, 17, 31, 13, 5, 15, 13, 23, 3, 11, 13, 1, 5, 15, 3, 5, -7, 17, 25, 15, 17, 7, 13, 5, 27, 19, 15, 3, 17, 15, 29, 13, 23, 11, 13, 1, 25, 15, 13, 27, 23, 11, 25, 23, 37, -3, -5, -1, -3, 1, -7, -5, -3, -9, -5, -1, -7, -5, -11, 1, 3, -1, 1, -3, -3, -5, 5, 3, -1, -7, 1, -1, 7, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, -9, -7, -11, -9, -13, -5, -7, -9, -3, -7, -11, -5, -7, -1, -3, -5, -1, -3, 1, -13, -15, -11, -13, -9, -7, -5, 1, 3, -9, -7, -7, -5, -17, -15, -3, -9, -1, -3, 5, -11, -5, -3, -13, -9, -1, -11, -9, -19, -5, -1, -7, -5, -11, 1, -3, -5, 3, -1, -7, 1, -1, 7, -9, -13, -7, -9, -3, -5, -1, -15, -11, -7, 1, -9, -7, -17, -5, -11, -3, -5, 3, -13, -7, -5, -15, -11, -3, -13, -11, -21, 3, 5, 1, 3, -1, 7, 5, 3, 9, 5, 1, 7, 5, 11, -1, -3, 1, -1, 3, 3, 5, -5, -3, 1, 7, -1, 1, -7, 3, -1, 5, 3, 9, -3, 1, 3, -5, -1, 5, -3, -1, -9, -3, -5, -1, -3, 1, -7, -5, -3, -9, -5, -1, -7, -5, -11, 9, 7, 11, 9, 13, 5, 7, 9, 3, 7, 11, 5, 7, 1, 1, 3, -1, 1, -3, -9, -7, -11, -9, -13, 3, 5, 1, 3, -1, 1, 3, -1, 1, -3, 13, 15, 11, 13, 9, -3, -5, 5, 3, -5, -7, -3, -5, -13, -15, 7, 5, -1, -3, -3, -5, 9, 7, 5, 3, -5, -7, 7, 5, 5, 3, 17, 15, -1, -7, 1, -1, 7, -9, -3, -1, -11, -7, 1, -9, -7, -17, 3, 9, 1, 3, -5, -1, -7, 11, 5, 1, -9, 3, 1, 13, -1, 7, -3, -1, -11, 9, 1, -1, 11, 7, -3, 9, 7, 19, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, -7, -11, -5, -7, -1, -3, 1, -13, -9, -5, 3, -7, -5, -15, -3, -9, -1, -3, 5, -11, -5, -3, -13, -9, -1, -11, -9, -19, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, -3, 1, -5, -3, -9, 9, 13, 7, 9, 3, 3, -1, -7, -11, 5, 1, 3, -1, 15, 11, -3, 5, -5, -3, -13, 7, -1, -3, 9, 5, -5, 7, 5, 17, 1, -5, 3, 1, 9, -7, -1, 1, -9, -5, 3, -7, -5, -15, 5, 11, 3, 5, -3, 1, -5, 13, 7, 3, -7, 5, 3, 15, 1, 9, -1, 1, -9, 11, 3, 1, 13, 9, -1, 11, 9, 21, 5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, 1, -1, 3, 1, 5, 5, 7, -3, -1, 3, 9, 1, 3, -5, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 11, 9, 13, 11, 15, 7, 9, 11, 5, 9, 13, 7, 9, 3, 5, 7, 3, 5, 1, 15, 17, 13, 15, 11, 9, 7, 1, -1, 11, 9, 9, 7, 19, 17, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, 7, 3, 9, 7, 13, 1, 5, 7, -1, 3, 9, 1, 3, -5, 11, 15, 9, 11, 5, 7, 3, 17, 13, 9, 1, 11, 9, 19, 7, 13, 5, 7, -1, 15, 9, 7, 17, 13, 5, 15, 13, 23, -11, -9, -13, -11, -15, -7, -9, -11, -5, -9, -13, -7, -9, -3, -15, -17, -13, -15, -11, -11, -9, -19, -17, -13, -7, -15, -13, -21, -11, -15, -9, -11, -5, -17, -13, -11, -19, -15, -9, -17, -15, -23, -5, -7, -3, -5, -1, -9, -7, -5, -11, -7, -3, -9, -7, -13, -11, -9, -13, -11, -15, -1, 1, -3, -1, -5, -7, -9, -15, -17, -5, -7, -7, -9, 3, 1, -11, -5, -13, -11, -19, -3, -9, -11, -1, -5, -13, -3, -5, 5, -9, -13, -7, -9, -3, -15, -11, -9, -17, -13, -7, -15, -13, -21, -5, -1, -7, -5, -11, -9, -13, 1, -3, -7, -15, -5, -7, 3, -9, -3, -11, -9, -17, -1, -7, -9, 1, -3, -11, -1, -3, 7, -1, -3, 1, -1, 3, -5, -3, -1, -7, -3, 1, -5, -3, -9, 3, 5, 1, 3, -1, -1, -3, 7, 5, 1, -5, 3, 1, 9, -1, 3, -3, -1, -7, 5, 1, -1, 7, 3, -3, 5, 3, 11, 13, 11, 15, 13, 17, 9, 11, 13, 7, 11, 15, 9, 11, 5, 17, 19, 15, 17, 13, 13, 11, 21, 19, 15, 9, 17, 15, 23, 13, 17, 11, 13, 7, 19, 15, 13, 21, 17, 11, 19, 17, 25, -3, -5, -1, -3, 1, -7, -5, -3, -9, -5, -1, -7, -5, -11, 1, 3, -1, 1, -3, -3, -5, 5, 3, -1, -7, 1, -1, 7, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, -1, -3, 1, -1, 3, -5, -3, -1, -7, -3, 1, -5, -3, -9, 3, 5, 1, 3, -1, -1, -3, 7, 5, 1, -5, 3, 1, 9, -1, 3, -3, -1, -7, 5, 1, -1, 7, 3, -3, 5, 3, 11, -17, -19, -15, -17, -13, -21, -19, -17, -23, -19, -15, -21, -19, -25, -13, -11, -15, -13, -17, -17, -19, -9, -11, -15, -21, -13, -15, -7, -17, -13, -19, -17, -23, -11, -15, -17, -9, -13, -19, -11, -13, -5, 5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, -7, -5, -9, -7, -11, -3, -5, -7, -1, -5, -9, -3, -5, 1, 7, 9, 5, 7, 3, 11, 9, 7, 13, 9, 5, 11, 9, 15, 5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, 19, 21, 17, 19, 15, 23, 21, 19, 25, 21, 17, 23, 21, 27, -9, -7, -11, -9, -13, -5, -7, -9, -3, -7, -11, -5, -7, -1, 3, 5, 1, 3, -1, 7, 5, 3, 9, 5, 1, 7, 5, 11, 5, 7, 3, 5, 1, 9, 7, 5, 11, 7, 3, 9, 7, 13, -11, -9, -13, -11, -15, -7, -9, -11, -5, -9, -13, -7, -9, -3, -7, -5, -9, -7, -11, -3, -5, -7, -1, -5, -9, -3, -5, 1, 7, 9, 5, 7, 3, 11, 9, 7, 13, 9, 5, 11, 9, 15, -9, -7, -11, -9, -13, -5, -7, -9, -3, -7, -11, -5, -7, -1, -7, -5, -9, -7, -11, -3, -5, -7, -1, -5, -9, -3, -5, 1, -23, -21, -25, -23, -27, -19, -21, -23, -17, -21, -25, -19, -21, -15, 1, -1, 3, 1, 5, 11, 9, 13, 11, 15, -1, -3, 1, -1, 3, 1, -1, 3, 1, 5, -11, -13, -9, -11, -7, 13, 11, 15, 13, 17, 3, 1, 5, 3, 7, 1, -1, 3, 1, 5, 15, 13, 17, 15, 19, 11, 9, 13, 11, 15, -1, -3, 1, -1, 3, 13, 11, 15, 13, 17, 11, 9, 13, 11, 15, 25, 23, 27, 25, 29, -3, -5, -1, -3, 1, -13, -15, -11, -13, -9, -1, -3, 1, -1, 3, -3, -5, -1, -3, 1, 9, 7, 11, 9, 13, 1, -1, 3, 1, 5, 11, 9, 13, 11, 15, -15, -17, -13, -15, -11, -5, -7, -3, -5, -1, -1, -3, 1, -1, 3, 13, 11, 15, 13, 17, -3, -5, -1, -3, 1, -1, -3, 1, -1, 3, -17, -19, -15, -17, -13, 1, -1, 3, 1, 5, -11, -13, -9, -11, -7, 3, 1, 5, 3, 7, 1, -1, 3, 1, 5, 15, 13, 17, 15, 19, -13, -15, -11, -13, -9, -1, -3, 1, -1, 3, 1, -1, 3, 1, 5, -15, -17, -13, -15, -11, -11, -13, -9, -11, -7, 3, 1, 5, 3, 7, -13, -15, -11, -13, -9, -11, -13, -9, -11, -7, -27, -29, -25, -27, -23, 5, 7, -3, -1, 7, 9, 5, 7, 15, 17, -5, -3, 3, 5, 5, 7, -7, -5, -3, -1, 7, 9, -5, -3, -3, -1, -15, -13, 9, 11, 17, 19, 7, 9, 9, 11, -1, 1, 5, 7, -3, -1, 19, 21, 11, 13, 7, 9, -5, -3, 9, 11, 7, 9, 21, 23, 5, 7, 15, 17, 3, 5, 5, 7, -7, -5, 17, 19, 7, 9, 5, 7, 19, 21, 15, 17, 3, 5, 17, 19, 15, 17, 29, 31, -7, -5, 1, 3, -9, -7, -7, -5, -17, -15, 3, 5, -5, -3, -7, -5, 5, 7, 1, 3, -9, -7, 3, 5, 1, 3, 13, 15, 5, 7, -3, -1, 7, 9, 5, 7, 15, 17, -11, -9, -19, -17, -9, -7, -11, -9, -1, 1, -5, -3, 3, 5, 9, 11, 17, 19, -7, -5, 1, 3, -5, -3, 3, 5, -21, -19, -13, -11, 5, 7, -7, -5, 7, 9, 5, 7, 19, 21, -9, -7, 3, 5, 5, 7, -11, -9, -7, -5, 7, 9, -9, -7, -7, -5, -23, -21, -3, -1, 7, 9, -5, -3, -3, -1, -15, -13, 9, 11, -1, 1, -3, -1, 11, 13, 7, 9, -5, -3, 9, 11, 7, 9, 21, 23, -7, -5, -17, -15, -5, -3, -7, -5, 5, 7, -3, -1, 7, 9, -19, -17, -9, -7, -5, -3, 9, 11, -7, -5, -5, -3, -21, -19, -3, -1, -15, -13, -1, 1, -3, -1, 11, 13, -17, -15, -5, -3, -3, -1, -19, -17, -15, -13, -1, 1, -17, -15, -15, -13, -31, -29, 3, 9, 1, 3, -5, 11, 5, 3, 13, 9, 1, 11, 9, 19, -1, -7, 1, -1, 7, 3, 9, -9, -3, 1, 11, -1, 1, -11, 3, -5, 5, 3, 13, -7, 1, 3, -9, -5, 5, -7, -5, -17, 13, 7, 15, 13, 21, 5, 11, 13, 3, 7, 15, 5, 7, -3, 3, 9, 1, 3, -5, 17, 23, 15, 17, 9, 11, 5, -1, -7, 13, 7, 11, 5, 25, 19, 3, 13, 1, 3, -9, 15, 5, 3, 17, 13, 1, 15, 13, 27, 9, 1, 11, 9, 19, -1, 7, 9, -3, 1, 11, -1, 1, -11, 13, 21, 11, 13, 3, 9, 1, 23, 15, 11, -1, 13, 11, 25, 9, 19, 7, 9, -3, 21, 11, 9, 23, 19, 7, 21, 19, 33, -3, -9, -1, -3, 5, -11, -5, -3, -13, -9, -1, -11, -9, -19, 1, 7, -1, 1, -7, -3, -9, 9, 3, -1, -11, 1, -1, 11, -3, 5, -5, -3, -13, 7, -1, -3, 9, 5, -5, 7, 5, 17, 3, 9, 1, 3, -5, 11, 5, 3, 13, 9, 1, 11, 9, 19, -13, -7, -15, -13, -21, -5, -11, -13, -3, -7, -15, -5, -7, 3, -1, -7, 1, -1, 7, 13, 7, 15, 13, 21, -3, -9, -1, -3, 5, -1, -7, 1, -1, 7, -17, -23, -15, -17, -9, 3, 9, -9, -3, 5, 11, 3, 9, 17, 23, -11, -5, 1, 7, 3, 9, -13, -7, -9, -3, 5, 11, -11, -5, -9, -3, -25, -19, 1, 11, -1, 1, -11, 13, 3, 1, 15, 11, -1, 13, 11, 25, -3, -13, -1, -3, 9, 1, 11, -15, -5, -1, 13, -3, -1, -17, 1, -11, 3, 1, 15, -13, -1, 1, -15, -11, 3, -13, -11, -27, 3, -5, 5, 3, 13, -7, 1, 3, -9, -5, 5, -7, -5, -17, 7, 15, 5, 7, -3, 3, -5, 17, 9, 5, -7, 7, 5, 19, 3, 13, 1, 3, -9, 15, 5, 3, 17, 13, 1, 15, 13, 27, -9, -1, -11, -9, -19, 1, -7, -9, 3, -1, -11, 1, -1, 11, 3, -5, 5, 3, 13, -13, -21, -11, -13, -3, -7, 1, 7, 15, -9, -1, -7, 1, -23, -15, 3, -9, 5, 3, 17, -11, 1, 3, -13, -9, 5, -11, -9, -25, -5, 5, -7, -5, -17, 7, -3, -5, 9, 5, -7, 7, 5, 19, -9, -19, -7, -9, 3, -5, 5, -21, -11, -7, 7, -9, -7, -23, -5, -17, -3, -5, 9, -19, -7, -5, -21, -17, -3, -19, -17, -33, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 9, 13, 7, 9, 3, 5, 1, 15, 11, 7, -1, 9, 7, 17, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, 5, 1, 7, 5, 11, -7, -11, -5, -7, -1, -1, 3, 9, 13, -3, 1, -1, 3, -13, -9, 5, -3, 7, 5, 15, -5, 3, 5, -7, -3, 7, -5, -3, -15, 1, 7, -1, 1, -7, 9, 3, 1, 11, 7, -1, 9, 7, 17, -3, -9, -1, -3, 5, 1, 7, -11, -5, -1, 9, -3, -1, -13, 1, -7, 3, 1, 11, -9, -1, 1, -11, -7, 3, -9, -7, -19, 11, 15, 9, 11, 5, 17, 13, 11, 19, 15, 9, 17, 15, 23, 7, 3, 9, 7, 13, 11, 15, 1, 5, 9, 17, 7, 9, -1, 11, 5, 13, 11, 19, 3, 9, 11, 1, 5, 13, 3, 5, -5, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 19, 15, 21, 19, 25, 13, 17, 19, 11, 15, 21, 13, 15, 7, 9, 13, 7, 9, 3, -3, 1, -5, -3, -9, 11, 15, 9, 11, 5, 9, 13, 7, 9, 3, 23, 27, 21, 23, 17, 5, 1, 15, 11, 3, -1, 5, 1, -7, -11, 17, 13, 7, 3, 5, 1, 19, 15, 15, 11, 3, -1, 17, 13, 15, 11, 29, 25, 7, -1, 9, 7, 17, -3, 5, 7, -5, -1, 9, -3, -1, -13, 11, 19, 9, 11, 1, 7, -1, 21, 13, 9, -3, 11, 9, 23, 7, 17, 5, 7, -5, 19, 9, 7, 21, 17, 5, 19, 17, 31, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, 1, -5, 3, 1, 9, 5, 11, -7, -1, 3, 13, 1, 3, -9, 5, -3, 7, 5, 15, -5, 3, 5, -7, -3, 7, -5, -3, -15, 15, 9, 17, 15, 23, 7, 13, 15, 5, 9, 17, 7, 9, -1, 5, 11, 3, 5, -3, 19, 25, 17, 19, 11, 13, 7, 1, -5, 15, 9, 13, 7, 27, 21, 5, 15, 3, 5, -7, 17, 7, 5, 19, 15, 3, 17, 15, 29, 11, 3, 13, 11, 21, 1, 9, 11, -1, 3, 13, 1, 3, -9, 15, 23, 13, 15, 5, 11, 3, 25, 17, 13, 1, 15, 13, 27, 11, 21, 9, 11, -1, 23, 13, 11, 25, 21, 9, 23, 21, 35, -5, -1, -7, -5, -11, 1, -3, -5, 3, -1, -7, 1, -1, 7, -9, -13, -7, -9, -3, -5, -1, -15, -11, -7, 1, -9, -7, -17, -5, -11, -3, -5, 3, -13, -7, -5, -15, -11, -3, -13, -11, -21, 3, -1, 5, 3, 9, -3, 1, 3, -5, -1, 5, -3, -1, -9, -5, -1, -7, -5, -11, 7, 11, 5, 7, 1, 1, -3, -9, -13, 3, -1, 1, -3, 13, 9, -5, 3, -7, -5, -15, 5, -3, -5, 7, 3, -7, 5, 3, 15, -1, -7, 1, -1, 7, -9, -3, -1, -11, -7, 1, -9, -7, -17, 3, 9, 1, 3, -5, -1, -7, 11, 5, 1, -9, 3, 1, 13, -1, 7, -3, -1, -11, 9, 1, -1, 11, 7, -3, 9, 7, 19, 5, 1, 7, 5, 11, -1, 3, 5, -3, 1, 7, -1, 1, -7, 9, 13, 7, 9, 3, 5, 1, 15, 11, 7, -1, 9, 7, 17, 5, 11, 3, 5, -3, 13, 7, 5, 15, 11, 3, 13, 11, 21, -11, -15, -9, -11, -5, -17, -13, -11, -19, -15, -9, -17, -15, -23, -7, -3, -9, -7, -13, -11, -15, -1, -5, -9, -17, -7, -9, 1, -11, -5, -13, -11, -19, -3, -9, -11, -1, -5, -13, -3, -5, 5, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, 11, 15, 9, 11, 5, 17, 13, 11, 19, 15, 9, 17, 15, 23, -5, -1, -7, -5, -11, 1, -3, -5, 3, -1, -7, 1, -1, 7, -3, 1, -5, -3, -9, 3, -1, -3, 5, 1, -5, 3, 1, 9, -19, -15, -21, -19, -25, -13, -17, -19, -11, -15, -21, -13, -15, -7, 5, 1, 7, 5, 11, -7, -11, -5, -7, -1, 7, 3, 9, 7, 13, 5, 1, 7, 5, 11, 19, 15, 21, 19, 25, -9, -13, -7, -9, -3, 3, -1, 5, 3, 9, 5, 1, 7, 5, 11, -11, -15, -9, -11, -5, -7, -11, -5, -7, -1, 7, 3, 9, 7, 13, -9, -13, -7, -9, -3, -7, -11, -5, -7, -1, -23, -27, -21, -23, -17, -1, 3, 9, 13, -3, 1, -1, 3, -13, -9, 11, 15, 1, 5, -1, 3, 13, 17, 9, 13, -3, 1, 11, 15, 9, 13, 23, 27, -5, -1, -15, -11, -3, 1, -5, -1, 7, 11, -1, 3, 9, 13, -17, -13, -7, -3, -3, 1, 11, 15, -5, -1, -3, 1, -19, -15, -1, 3, -13, -9, 1, 5, -1, 3, 13, 17, -15, -11, -3, 1, -1, 3, -17, -13, -13, -9, 1, 5, -15, -11, -13, -9, -29, -25, 5, -3, 7, 5, 15, -5, 3, 5, -7, -3, 7, -5, -3, -15, 9, 17, 7, 9, -1, 5, -3, 19, 11, 7, -5, 9, 7, 21, 5, 15, 3, 5, -7, 17, 7, 5, 19, 15, 3, 17, 15, 29, -7, 1, -9, -7, -17, 3, -5, -7, 5, 1, -9, 3, 1, 13, 5, -3, 7, 5, 15, -11, -19, -9, -11, -1, -5, 3, 9, 17, -7, 1, -5, 3, -21, -13, 5, -7, 7, 5, 19, -9, 3, 5, -11, -7, 7, -9, -7, -23, -3, 7, -5, -3, -15, 9, -1, -3, 11, 7, -5, 9, 7, 21, -7, -17, -5, -7, 5, -3, 7, -19, -9, -5, 9, -7, -5, -21, -3, -15, -1, -3, 11, -17, -5, -3, -19, -15, -1, -17, -15, -31, 1, 7, -1, 1, -7, 9, 3, 1, 11, 7, -1, 9, 7, 17, -3, -9, -1, -3, 5, 1, 7, -11, -5, -1, 9, -3, -1, -13, 1, -7, 3, 1, 11, -9, -1, 1, -11, -7, 3, -9, -7, -19, 11, 5, 13, 11, 19, 3, 9, 11, 1, 5, 13, 3, 5, -5, 1, 7, -1, 1, -7, 15, 21, 13, 15, 7, 9, 3, -3, -9, 11, 5, 9, 3, 23, 17, 1, 11, -1, 1, -11, 13, 3, 1, 15, 11, -1, 13, 11, 25, 7, -1, 9, 7, 17, -3, 5, 7, -5, -1, 9, -3, -1, -13, 11, 19, 9, 11, 1, 7, -1, 21, 13, 9, -3, 11, 9, 23, 7, 17, 5, 7, -5, 19, 9, 7, 21, 17, 5, 19, 17, 31, -5, -11, -3, -5, 3, -13, -7, -5, -15, -11, -3, -13, -11, -21, -1, 5, -3, -1, -9, -5, -11, 7, 1, -3, -13, -1, -3, 9, -5, 3, -7, -5, -15, 5, -3, -5, 7, 3, -7, 5, 3, 15, 1, 7, -1, 1, -7, 9, 3, 1, 11, 7, -1, 9, 7, 17, -15, -9, -17, -15, -23, -7, -13, -15, -5, -9, -17, -7, -9, 1, -3, -9, -1, -3, 5, 11, 5, 13, 11, 19, -5, -11, -3, -5, 3, -3, -9, -1, -3, 5, -19, -25, -17, -19, -11, 1, 7, -11, -5, 3, 9, 1, 7, 15, 21, -13, -7, -1, 5, 1, 7, -15, -9, -11, -5, 3, 9, -13, -7, -11, -5, -27, -21, -1, 9, -3, -1, -13, 11, 1, -1, 13, 9, -3, 11, 9, 23, -5, -15, -3, -5, 7, -1, 9, -17, -7, -3, 11, -5, -3, -19, -1, -13, 1, -1, 13, -15, -3, -1, -17, -13, 1, -15, -13, -29, 1, -7, 3, 1, 11, -9, -1, 1, -11, -7, 3, -9, -7, -19, 5, 13, 3, 5, -5, 1, -7, 15, 7, 3, -9, 5, 3, 17, 1, 11, -1, 1, -11, 13, 3, 1, 15, 11, -1, 13, 11, 25, -11, -3, -13, -11, -21, -1, -9, -11, 1, -3, -13, -1, -3, 9, 1, -7, 3, 1, 11, -15, -23, -13, -15, -5, -9, -1, 5, 13, -11, -3, -9, -1, -25, -17, 1, -11, 3, 1, 15, -13, -1, 1, -15, -11, 3, -13, -11, -27, -7, 3, -9, -7, -19, 5, -5, -7, 7, 3, -9, 5, 3, 17, -11, -21, -9, -11, 1, -7, 3, -23, -13, -9, 5, -11, -9, -25, -7, -19, -5, -7, 7, -21, -9, -7, -23, -19, -5, -21, -19, -35])\n assert answers_match(candidate(expression='9-8+7-6*5+4-3*2+1'), [-6, 6, 42, 18, 42, -6, 6, 102, 102, 18, 42, 18, 72, 72, 19, 21, 27, 23, 27, 39, 41, 19, 21, 102, 102, 87, 147, 87, 13, 37, 13, 67, 67, 23, 27, 43, 23, 67, 67, 57, 97, 57, 1, -1, -7, -3, -7, 1, -1, -17, -17, -3, -7, -3, -12, -12, 29, 27, 21, 25, 21, 1, -1, -7, -3, -7, 57, 55, 37, 35, 1, -1, 29, 27, 1, -1, 88, 88, 73, 133, 73, -17, -17, 67, -17, 151, 91, -17, 67, -17, 11, 35, 11, 65, 65, 21, 25, 41, 21, 65, 65, 55, 95, 55, -3, -7, -3, -12, -12, 25, 21, -3, -7, 53, 33, -3, 25, -3, 58, 58, 48, 88, 48, -12, -12, 44, -12, 100, 60, -12, 44, -12, -6, 6, 42, 18, 42, -6, 6, 102, 102, 18, 42, 18, 72, 72, 19, 21, 27, 23, 27, 39, 41, 19, 21, 102, 102, 87, 147, 87, 13, 37, 13, 67, 67, 23, 27, 43, 23, 67, 67, 57, 97, 57, 9, -9, -63, -27, -63, 9, -9, -153, -153, -27, -63, -27, -108, -108, 9, -9, -63, -27, -63, 9, -9, -153, -153, -27, -63, -27, -108, -108, 29, 27, 21, 25, 21, 1, -1, -7, -3, -7, 29, 27, 21, 25, 21, -31, -33, -39, -35, -39, -31, -33, -39, -35, -39, 57, 55, 37, 35, 1, -1, 29, 27, 1, -1, 57, 55, 37, 35, -63, -65, -63, -65, 29, 27, 1, -1, 29, 27, -31, -33, -31, -33, 72, 72, 57, 117, 57, -33, -33, 51, -33, 135, 75, -33, 51, -33, 72, 72, 57, 117, 57, -153, -153, -153, -153, 51, -33, 51, -129, -129, 135, 75, -33, 51, -33, 135, 75, -225, -225, 51, -33, 51, -129, -129, 11, 35, 11, 65, 65, 21, 25, 41, 21, 65, 65, 55, 95, 55, -3, -7, -3, -12, -12, 25, 21, -3, -7, 53, 33, -3, 25, -3, 58, 58, 48, 88, 48, -12, -12, 44, -12, 100, 60, -12, 44, -12, 11, 35, 11, 65, 65, 21, 25, 41, 21, 65, 65, 55, 95, 55, -19, -55, -19, -100, -100, -19, -55, -19, -100, -100, 25, 21, -3, -7, 25, 21, -35, -39, -35, -39, 53, 33, -3, 25, -3, 53, 33, -67, -67, 25, -3, 25, -35, -35, 50, 50, 40, 80, 40, -20, -20, 36, -20, 92, 52, -20, 36, -20, 50, 50, 40, 80, 40, -100, -100, -100, -100, 36, -20, 36, -84, -84, 92, 52, -20, 36, -20, 92, 52, -148, -148, 36, -20, 36, -84, -84, 8, -4, -40, -16, -40, 8, -4, -100, -100, -16, -40, -16, -70, -70, -17, -19, -25, -21, -25, -37, -39, -17, -19, -100, -100, -85, -145, -85, -11, -35, -11, -65, -65, -21, -25, -41, -21, -65, -65, -55, -95, -55, 1, 3, 9, 5, 9, 1, 3, 19, 19, 5, 9, 5, 14, 14, -27, -25, -19, -23, -19, 1, 3, 9, 5, 9, -55, -53, -35, -33, 1, 3, -27, -25, 1, 3, -86, -86, -71, -131, -71, 19, 19, -65, 19, -149, -89, 19, -65, 19, -9, -33, -9, -63, -63, -19, -23, -39, -19, -63, -63, -53, -93, -53, 5, 9, 5, 14, 14, -23, -19, 5, 9, -51, -31, 5, -23, 5, -56, -56, -46, -86, -46, 14, 14, -42, 14, -98, -58, 14, -42, 14, -6, -18, -54, -30, -54, -6, -18, -114, -114, -30, -54, -30, -84, -84, -31, -33, -39, -35, -39, -51, -53, -31, -33, -114, -114, -99, -159, -99, -25, -49, -25, -79, -79, -35, -39, -55, -35, -79, -79, -69, -109, -69, 8, -4, -40, -16, -40, 8, -4, -100, -100, -16, -40, -16, -70, -70, -17, -19, -25, -21, -25, -37, -39, -17, -19, -100, -100, -85, -145, -85, -11, -35, -11, -65, -65, -21, -25, -41, -21, -65, -65, -55, -95, -55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 16, 8, 16, 0, 4, 36, 36, 8, 16, 8, 26, 26, 0, -24, -96, -48, -96, 0, -24, -216, -216, -48, -96, -48, -156, -156, 0, 4, 16, 8, 16, 0, 4, 36, 36, 8, 16, 8, 26, 26, 19, 21, 27, 23, 27, -9, -7, -1, -5, -1, 19, 21, 27, 23, 27, -41, -39, -33, -37, -33, -41, -39, -33, -37, -33, -27, -25, -19, -23, -19, 1, 3, 9, 5, 9, -41, -39, -33, -37, -33, -27, -25, -19, -23, -19, -5, -3, 3, -1, 3, -5, -3, 3, -1, 3, 5, 7, 13, 9, 13, -65, -63, -57, -61, -57, 5, 7, 13, 9, 13, 39, 41, 19, 21, -17, -15, 11, 13, -17, -15, 39, 41, 19, 21, -81, -79, -81, -79, 11, 13, -17, -15, 11, 13, -49, -47, -49, -47, -55, -53, -35, -33, 1, 3, -27, -25, 1, 3, -69, -67, -49, -47, -55, -53, -35, -33, -9, -7, -9, -7, 9, 11, -117, -115, 9, 11, 19, 21, -9, -7, 19, 21, -41, -39, -41, -39, -27, -25, 1, 3, -41, -39, -27, -25, -5, -3, -5, -3, 5, 7, -65, -63, 5, 7, 90, 90, 75, 135, 75, -15, -15, 69, -15, 153, 93, -15, 69, -15, 90, 90, 75, 135, 75, -135, -135, -135, -135, 69, -15, 69, -111, -111, 153, 93, -15, 69, -15, 153, 93, -207, -207, 69, -15, 69, -111, -111, -84, -84, -69, -129, -69, 21, 21, -63, 21, -147, -87, 21, -63, 21, -126, -126, -111, -171, -111, -84, -84, -69, -129, -69, 0, 0, 0, 0, 36, 36, -216, -216, 36, 36, 75, -9, 75, -105, -105, -63, 21, -105, -63, 3, 3, 33, -177, 33, 135, 75, -33, 51, -33, 135, 75, -225, -225, 51, -33, 51, -129, -129, -147, -87, 21, -63, 21, -189, -129, -147, -87, -9, -9, 45, -333, 45, 75, -9, 75, -105, -105, -63, 21, -105, -63, 3, 3, 33, -177, 33, 13, 37, 13, 67, 67, 23, 27, 43, 23, 67, 67, 57, 97, 57, -1, -5, -1, -10, -10, 27, 23, -1, -5, 55, 35, -1, 27, -1, 60, 60, 50, 90, 50, -10, -10, 46, -10, 102, 62, -10, 46, -10, 13, 37, 13, 67, 67, 23, 27, 43, 23, 67, 67, 57, 97, 57, -17, -53, -17, -98, -98, -17, -53, -17, -98, -98, 27, 23, -1, -5, 27, 23, -33, -37, -33, -37, 55, 35, -1, 27, -1, 55, 35, -65, -65, 27, -1, 27, -33, -33, 52, 52, 42, 82, 42, -18, -18, 38, -18, 94, 54, -18, 38, -18, 52, 52, 42, 82, 42, -98, -98, -98, -98, 38, -18, 38, -82, -82, 94, 54, -18, 38, -18, 94, 54, -146, -146, 38, -18, 38, -82, -82, -9, -33, -9, -63, -63, -19, -23, -39, -19, -63, -63, -53, -93, -53, 5, 9, 5, 14, 14, -23, -19, 5, 9, -51, -31, 5, -23, 5, -56, -56, -46, -86, -46, 14, 14, -42, 14, -98, -58, 14, -42, 14, -23, -47, -23, -77, -77, -33, -37, -53, -33, -77, -77, -67, -107, -67, -9, -33, -9, -63, -63, -19, -23, -39, -19, -63, -63, -53, -93, -53, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 15, 7, 25, 25, -35, -83, -35, -143, -143, 7, 15, 7, 25, 25, 23, 27, -5, -1, 23, 27, -37, -33, -37, -33, -23, -19, 5, 9, -37, -33, -23, -19, -1, 3, -1, 3, 9, 13, -61, -57, 9, 13, 43, 23, -13, 15, -13, 43, 23, -77, -77, 15, -13, 15, -45, -45, -51, -31, 5, -23, 5, -65, -45, -51, -31, -5, -5, 13, -113, 13, 23, -5, 23, -37, -37, -23, 5, -37, -23, -1, -1, 9, -61, 9, 61, 61, 51, 91, 51, -9, -9, 47, -9, 103, 63, -9, 47, -9, 61, 61, 51, 91, 51, -89, -89, -89, -89, 47, -9, 47, -73, -73, 103, 63, -9, 47, -9, 103, 63, -137, -137, 47, -9, 47, -73, -73, -55, -55, -45, -85, -45, 15, 15, -41, 15, -97, -57, 15, -41, 15, -83, -83, -73, -113, -73, -55, -55, -45, -85, -45, 1, 1, 1, 1, 25, 25, -143, -143, 25, 25, 51, -5, 51, -69, -69, -41, 15, -69, -41, 3, 3, 23, -117, 23, 91, 51, -21, 35, -21, 91, 51, -149, -149, 35, -21, 35, -85, -85, -97, -57, 15, -41, 15, -125, -85, -97, -57, -5, -5, 31, -221, 31, 51, -5, 51, -69, -69, -41, 15, -69, -41, 3, 3, 23, -117, 23])\n assert answers_match(candidate(expression='1*2*3*4*5*6*7*8-9'), [-5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, 40302, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, 40266, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, -5040, 40104, 40104, 40104, 40104, 40104, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 39240, 39240, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, 33840, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, -5040, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311, 40311])\n assert answers_match(candidate(expression='100-50+25*5-12*2'), [525, 400, -51, 400, -176, 1525, 1150, -51, -251, 350, -226, 1150, -226, -626, -425, -300, 151, -300, 276, -475, -350, -1425, -1050, -99, -299, 151, 101, 351, 450, -126, 1250, -126, -526, -250, 326, -350, -1050, -174, -574, 326, 226, 726])\n assert answers_match(candidate(expression='4*4-3*3+2*2-1*1'), [-44, -44, -56, -44, -56, -44, -44, -56, -92, -44, -56, -44, -56, -92, -28, -28, -32, -28, -32, -44, -44, -28, -28, -64, -100, -32, -100, -68, -44, -56, -44, -56, -92, -28, -32, -44, -28, -64, -100, -32, -100, -68, 20, 20, 24, 20, 24, 20, 20, 24, 36, 20, 24, 20, 24, 36, -12, -12, -8, -12, -8, 20, 20, 24, 20, 24, -44, -44, -28, -28, 20, 20, -12, -12, 20, 20, -72, -108, -40, -108, -76, 24, 36, -8, 24, -92, -60, 36, -28, 36, -44, -56, -44, -56, -92, -28, -32, -44, -28, -64, -100, -32, -100, -68, 20, 24, 20, 24, 36, -12, -8, 20, 24, -44, -28, 20, -12, 20, -72, -108, -40, -108, -76, 24, 36, -8, 24, -92, -60, 36, -28, 36, 1, 1, -2, 1, -2, 1, 1, -2, -11, 1, -2, 1, -2, -11, 5, 5, 4, 5, 4, 1, 1, 5, 5, -4, -13, 4, -13, -5, 1, -2, 1, -2, -11, 5, 4, 1, 5, -4, -13, 4, -13, -5, 20, 20, 24, 20, 24, 20, 20, 24, 36, 20, 24, 20, 24, 36, 65, 65, 78, 65, 78, 65, 65, 78, 117, 65, 78, 65, 78, 117, -18, -18, -17, -18, -17, 14, 14, 15, 14, 15, 9, 9, 10, 9, 10, 14, 14, 15, 14, 15, 41, 41, 42, 41, 42, -44, -44, -28, -28, 20, 20, -12, -12, 20, 20, 1, 1, 5, 5, 20, 20, 65, 65, -18, -18, 14, 14, 9, 9, 14, 14, 41, 41, -69, -105, -37, -105, -73, 27, 39, -5, 27, -89, -57, 39, -25, 39, -6, -15, 2, -15, -7, 27, 39, 90, 129, -17, 15, 10, 15, 42, -89, -57, 39, -25, 39, 1, 9, 39, 129, -37, 27, 17, 27, 81, -44, -56, -44, -56, -92, -28, -32, -44, -28, -64, -100, -32, -100, -68, 20, 24, 20, 24, 36, -12, -8, 20, 24, -44, -28, 20, -12, 20, -72, -108, -40, -108, -76, 24, 36, -8, 24, -92, -60, 36, -28, 36, 1, -2, 1, -2, -11, 5, 4, 1, 5, -4, -13, 4, -13, -5, 20, 24, 20, 24, 36, 65, 78, 65, 78, 117, -18, -17, 14, 15, 9, 10, 14, 15, 41, 42, -44, -28, 20, -12, 20, 1, 5, 20, 65, -18, 14, 9, 14, 41, -69, -105, -37, -105, -73, 27, 39, -5, 27, -89, -57, 39, -25, 39, -6, -15, 2, -15, -7, 27, 39, 90, 129, -17, 15, 10, 15, 42, -89, -57, 39, -25, 39, 1, 9, 39, 129, -37, 27, 17, 27, 81])\n assert answers_match(candidate(expression='3*2-1+4*5-6*7+8*9'), [5631, 9663, 1311, 9663, 5343, 951, 1623, -417, -777, 9183, 4863, 1623, 3135, -105, 1365, 2373, 285, 2373, 1293, 951, 1623, -3315, -5667, 231, -129, -147, -129, -507, 9183, 4863, 1623, 3135, -105, 1893, 813, 1623, -5667, 3783, 543, 381, 543, -2859, 7041, 12081, 1641, 12081, 6681, 1191, 2031, -519, -969, 11481, 6081, 2031, 3921, -129, 1365, 2373, 285, 2373, 1293, 1353, 2361, 273, 2361, 1281, 717, 1221, -3549, -6069, 1191, 2031, -3549, -6069, -4497, -7689, 231, -129, -147, -129, -507, 345, -105, -147, -159, -147, -525, -105, -525, -609, 9159, 4839, 1599, 3111, -129, 1869, 789, 1599, -5691, 3759, 519, 357, 519, -2883, 11481, 6081, 2031, 3921, -129, 1869, 789, 1761, 681, 1221, -6069, 2031, -6069, -7689, 3759, 519, 357, 519, -2883, 4785, 735, 357, 249, 357, -3045, 735, -3045, -3801, -5625, -9657, -1305, -9657, -5337, -945, -1617, 423, 783, -9177, -4857, -1617, -3129, 111, -1359, -2367, -279, -2367, -1287, -945, -1617, 3321, 5673, -225, 135, 153, 135, 513, -9177, -4857, -1617, -3129, 111, -1887, -807, -1617, 5673, -3777, -537, -375, -537, 2865, 4221, 7245, 981, 7245, 4005, 711, 1215, -315, -585, 6885, 3645, 1215, 2349, -81, -7035, -12075, -1635, -12075, -6675, -1185, -2025, 525, 975, -11475, -6075, -2025, -3915, 135, -1479, -2487, -399, -2487, -1407, -1491, -2499, -411, -2499, -1419, -1359, -2367, -279, -2367, -1287, -1467, -2475, -387, -2475, -1395, -1347, -2355, -267, -2355, -1275, 1185, 2025, -3081, -5265, 1659, 2835, -3081, -5265, -4029, -6885, -711, -1215, 3555, 6075, 711, 1215, -1185, -2025, -5925, -10125, -6873, -11745, 3555, 6075, -4977, -8505, 4503, 7695, 663, 303, 285, 303, -75, 777, 327, 285, 273, 285, -93, 327, -93, -177, -225, 135, 153, 135, 513, 549, 279, -339, 111, 33, 21, 153, 45, 165, 321, -57, 363, -57, -141, 153, 531, 279, 111, -309, -393, 531, -225, 615, 9207, 4887, 1647, 3159, -81, 1917, 837, 1647, -5643, 3807, 567, 405, 567, -2835, 11529, 6129, 2079, 3969, -81, 1917, 837, 1809, 729, 1269, -6021, 2079, -6021, -7641, 3807, 567, 405, 567, -2835, 4833, 783, 405, 297, 405, -2997, 783, -2997, -3753, -9153, -4833, -1593, -3105, 135, -1863, -783, -1593, 5697, -3753, -513, -351, -513, 2889, 6885, 3645, 1215, 2349, -81, -11475, -6075, -2025, -3915, 135, -2943, -1863, -3051, -1971, -1863, -783, -2835, -1755, -1755, -675, 2025, -5265, 2835, -5265, -6885, -1215, 6075, 1215, -2025, -10125, -11745, 6075, -8505, 7695, 4239, 999, 837, 999, -2403, 5265, 1215, 837, 729, 837, -2565, 1215, -2565, -3321, -3753, -513, -351, -513, 2889, 3213, 783, -4779, -729, -1431, -1539, -351, -1323, -243, 1161, -2241, 1539, -2241, -2997, -351, 3051, 783, -729, -4509, -5265, 3051, -3753, 3807, 1881, 3225, 441, 3225, 1785, 321, 545, -135, -255, 3065, 1625, 545, 1049, -31, 459, 795, 99, 795, 435, 321, 545, -1101, -1885, 81, -39, -45, -39, -165, 3065, 1625, 545, 1049, -31, 635, 275, 545, -1885, 1265, 185, 131, 185, -949, 2351, 4031, 551, 4031, 2231, 401, 681, -169, -319, 3831, 2031, 681, 1311, -39, 459, 795, 99, 795, 435, 455, 791, 95, 791, 431, 243, 411, -1179, -2019, 401, 681, -1179, -2019, -1495, -2559, 81, -39, -45, -39, -165, 119, -31, -45, -49, -45, -171, -31, -171, -199, 3057, 1617, 537, 1041, -39, 627, 267, 537, -1893, 1257, 177, 123, 177, -957, 3831, 2031, 681, 1311, -39, 627, 267, 591, 231, 411, -2019, 681, -2019, -2559, 1257, 177, 123, 177, -957, 1599, 249, 123, 87, 123, -1011, 249, -1011, -1263, -1873, -3217, -433, -3217, -1777, -313, -537, 143, 263, -3057, -1617, -537, -1041, 39, -451, -787, -91, -787, -427, -313, -537, 1109, 1893, -73, 47, 53, 47, 173, -3057, -1617, -537, -1041, 39, -627, -267, -537, 1893, -1257, -177, -123, -177, 957, -1871, -3215, -431, -3215, -1775, -311, -535, 145, 265, -3055, -1615, -535, -1039, 41, -449, -785, -89, -785, -425, -311, -535, 1111, 1895, -71, 49, 55, 49, 175, -3055, -1615, -535, -1039, 41, -625, -265, -535, 1895, -1255, -175, -121, -175, 959, 4221, 7245, 981, 7245, 4005, 711, 1215, -315, -585, 6885, 3645, 1215, 2349, -81, -7035, -12075, -1635, -12075, -6675, -1185, -2025, 525, 975, -11475, -6075, -2025, -3915, 135, -469, -805, -109, -805, -445, -79, -135, 35, 65, -765, -405, -135, -261, 9, -3283, -5635, -763, -5635, -3115, -553, -945, 245, 455, -5355, -2835, -945, -1827, 63, -4221, -7245, -981, -7245, -4005, -711, -1215, 315, 585, -6885, -3645, -1215, -2349, 81, -531, -867, -171, -867, -507, -543, -879, -183, -879, -519, -411, -747, -51, -747, -387, -519, -855, -159, -855, -495, -399, -735, -39, -735, -375, -489, -825, -129, -825, -465, -493, -829, -133, -829, -469, -451, -787, -91, -787, -427, -449, -785, -89, -785, -425, -519, -855, -159, -855, -495, -399, -735, -39, -735, -375, -469, -805, -109, -805, -445, -439, -775, -79, -775, -415, -429, -765, -69, -765, -405, 1185, 2025, -3081, -5265, 1659, 2835, -3081, -5265, -4029, -6885, -711, -1215, 3555, 6075, 711, 1215, -1185, -2025, -5925, -10125, -6873, -11745, 3555, 6075, -4977, -8505, 4503, 7695, 711, 1215, -711, -1215, 869, 1485, -711, -1215, -1027, -1755, -79, -135, 1343, 2295, 79, 135, 1501, 2565, 711, 1215, -1185, -2025, -79, -135, -553, -945, -711, -1215, -4977, -8505, -5925, -10125, 4503, 7695, -4029, -6885, 5451, 9315, -1659, -2835, -1975, -3375, 1343, 2295, 1501, 2565, -4029, -6885, 5451, 9315, -79, -135, 2291, 3915, 3081, 5265, 519, 159, 141, 159, -219, 633, 183, 141, 129, 141, -237, 183, -237, -321, -369, -9, 9, -9, 369, 405, 135, -483, -33, -111, -123, 9, -99, 21, 177, -201, 219, -201, -285, 9, 387, 135, -33, -453, -537, 387, -369, 471, 225, 105, 99, 105, -21, 263, 113, 99, 95, 99, -27, 113, -27, -55, -73, 47, 53, 47, 173, -71, 49, 55, 49, 175, 405, 135, -483, -33, 35, 65, -187, 23, -261, 9, -27, -39, 93, -15, 105, 15, 11, 53, 55, -15, 105, 35, 65, 75, 177, -201, 219, -201, -285, 9, 387, 135, -33, -453, -537, 387, -369, 471, 135, 9, 149, 9, -19, 65, 191, 79, 205, 135, -33, 65, 23, 9, -369, -453, 471, -285, 555, -75, -103, 191, 205, -285, 555, 65, 275, 345, 9207, 4887, 1647, 3159, -81, 1917, 837, 1647, -5643, 3807, 567, 405, 567, -2835, 11529, 6129, 2079, 3969, -81, 1917, 837, 1809, 729, 1269, -6021, 2079, -6021, -7641, 3807, 567, 405, 567, -2835, 4833, 783, 405, 297, 405, -2997, 783, -2997, -3753, -9153, -4833, -1593, -3105, 135, -1863, -783, -1593, 5697, -3753, -513, -351, -513, 2889, 6885, 3645, 1215, 2349, -81, -11475, -6075, -2025, -3915, 135, -2943, -1863, -3051, -1971, -1863, -783, -2835, -1755, -1755, -675, 2025, -5265, 2835, -5265, -6885, -1215, 6075, 1215, -2025, -10125, -11745, 6075, -8505, 7695, 4239, 999, 837, 999, -2403, 5265, 1215, 837, 729, 837, -2565, 1215, -2565, -3321, -3753, -513, -351, -513, 2889, 3213, 783, -4779, -729, -1431, -1539, -351, -1323, -243, 1161, -2241, 1539, -2241, -2997, -351, 3051, 783, -729, -4509, -5265, 3051, -3753, 3807, 3105, 1665, 585, 1089, 9, 675, 315, 585, -1845, 1305, 225, 171, 225, -909, 3879, 2079, 729, 1359, 9, 675, 315, 639, 279, 459, -1971, 729, -1971, -2511, 1305, 225, 171, 225, -909, 1647, 297, 171, 135, 171, -963, 297, -963, -1215, -3033, -1593, -513, -1017, 63, -603, -243, -513, 1917, -1233, -153, -99, -153, 981, -3015, -1575, -495, -999, 81, -585, -225, -495, 1935, -1215, -135, -81, -135, 999, 6885, 3645, 1215, 2349, -81, -11475, -6075, -2025, -3915, 135, -765, -405, -135, -261, 9, -5355, -2835, -945, -1827, 63, -6885, -3645, -1215, -2349, 81, -1323, -963, -1431, -1071, -243, 117, -1215, -855, -135, 225, -945, -585, -981, -621, -603, -243, -585, -225, -1215, -855, -135, 225, -765, -405, -495, -135, -405, -45, 2025, -5265, 2835, -5265, -6885, -1215, 6075, 1215, -2025, -10125, -11745, 6075, -8505, 7695, 1215, -1215, 1485, -1215, -1755, -135, 2295, 135, 2565, 1215, -2025, -135, -945, -1215, -8505, -10125, 7695, -6885, 9315, -2835, -3375, 2295, 2565, -6885, 9315, -135, 3915, 5265, 4095, 855, 693, 855, -2547, 5121, 1071, 693, 585, 693, -2709, 1071, -2709, -3465, -3897, -657, -495, -657, 2745, 3069, 639, -4923, -873, -1575, -1683, -495, -1467, -387, 1017, -2385, 1395, -2385, -3141, -495, 2907, 639, -873, -4653, -5409, 2907, -3897, 3663, 1449, 369, 315, 369, -765, 1791, 441, 315, 279, 315, -819, 441, -819, -1071, -1233, -153, -99, -153, 981, -1215, -135, -81, -135, 999, 3069, 639, -4923, -873, -261, 9, -2259, -369, -2925, -495, -819, -927, 261, -711, 369, -441, -477, -99, -81, -711, 369, -261, 9, 99, 1017, -2385, 1395, -2385, -3141, -495, 2907, 639, -873, -4653, -5409, 2907, -3897, 3663, 639, -495, 765, -495, -747, 9, 1143, 135, 1269, 639, -873, 9, -369, -495, -3897, -4653, 3663, -3141, 4419, -1251, -1503, 1143, 1269, -3141, 4419, 9, 1899, 2529])\n assert answers_match(candidate(expression='3*3*3*3-2*2*2'), [-135, -135, 108, -54, 108, 9, 9, 108, 252, -54, 108, 90, 108, 252, -135, -135, 108, -54, 108, 57, 57, 57, 57, 108, 252, 108, 300, 300, -54, 108, 90, 108, 252, -54, 108, 138, 138, 108, 252, 108, 300, 300, -135, -135, 108, -54, 108, 9, 9, 108, 252, -54, 108, 90, 108, 252, -135, -135, 108, -54, 108, -135, -135, 108, -54, 108, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 108, 252, 108, 300, 300, 108, 252, 108, 108, 316, 316, 316, 316, 316, -54, 108, 90, 108, 252, -54, 108, 138, 138, 108, 252, 108, 300, 300, -54, 108, 90, 108, 252, -54, 108, -54, 108, 154, 154, 154, 154, 154, 108, 252, 108, 300, 300, 108, 252, 108, 108, 316, 316, 316, 316, 316])\n assert answers_match(candidate(expression='1+2+3+4+5+6+7+8'), [36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36])\n assert answers_match(candidate(expression='50+25-10*2+5'), [5, 50, 155, 60, 85, 5, 50, 455, 455, 60, 85, 60, 135, 135])\n assert answers_match(candidate(expression='5*5-4*4+3*3-2*2+1*1'), [125, 125, 65, 125, 65, -235, -235, -55, -235, 125, 65, -235, -55, -235, -115, -115, -135, -115, -135, -235, -235, -475, -475, -15, -195, -175, -195, -355, 125, 65, -235, -55, -235, -115, -135, -235, -475, -15, -195, -175, -195, -355, 445, 445, 305, 445, 305, -395, -395, 25, -395, 445, 305, -395, 25, -395, -115, -115, -135, -115, -135, -275, -275, -295, -275, -295, -395, -395, -635, -635, -395, -395, -635, -635, -1115, -1115, -15, -195, -175, -195, -355, 145, -275, -175, -335, -275, -435, -275, -435, -755, 125, 65, -235, -55, -235, -115, -135, -235, -475, -15, -195, -175, -195, -355, 445, 305, -395, 25, -395, -115, -135, -275, -295, -395, -635, -395, -635, -1115, -15, -195, -175, -195, -355, 145, -275, -175, -335, -275, -435, -275, -435, -755, -10, -10, -25, -10, -25, -100, -100, -55, -100, -10, -25, -100, -55, -100, -70, -70, -75, -70, -75, -100, -100, -160, -160, -45, -90, -85, -90, -130, -10, -25, -100, -55, -100, -70, -75, -100, -160, -45, -90, -85, -90, -130, 445, 445, 305, 445, 305, -395, -395, 25, -395, 445, 305, -395, 25, -395, 310, 310, 215, 310, 215, -260, -260, 25, -260, 310, 215, -260, 25, -260, -205, -205, -210, -205, -210, -365, -365, -370, -365, -370, -70, -70, -75, -70, -75, -365, -365, -370, -365, -370, -230, -230, -235, -230, -235, -395, -395, -635, -635, -395, -395, -635, -635, -1115, -1115, -260, -260, -320, -320, -395, -395, -260, -260, -725, -725, -1205, -1205, -320, -320, -1205, -1205, -800, -800, 0, -180, -160, -180, -340, 160, -260, -160, -320, -260, -420, -260, -420, -740, -45, -90, -85, -90, -130, 160, -260, 115, -170, -220, -380, -85, -380, -245, -260, -420, -260, -420, -740, -170, -210, -260, -170, -480, -800, -210, -800, -530, 125, 65, -235, -55, -235, -115, -135, -235, -475, -15, -195, -175, -195, -355, 445, 305, -395, 25, -395, -115, -135, -275, -295, -395, -635, -395, -635, -1115, -15, -195, -175, -195, -355, 145, -275, -175, -335, -275, -435, -275, -435, -755, -10, -25, -100, -55, -100, -70, -75, -100, -160, -45, -90, -85, -90, -130, 445, 305, -395, 25, -395, 310, 215, -260, 25, -260, -205, -210, -365, -370, -70, -75, -365, -370, -230, -235, -395, -635, -395, -635, -1115, -260, -320, -395, -260, -725, -1205, -320, -1205, -800, 0, -180, -160, -180, -340, 160, -260, -160, -320, -260, -420, -260, -420, -740, -45, -90, -85, -90, -130, 160, -260, 115, -170, -220, -380, -85, -380, -245, -260, -420, -260, -420, -740, -170, -210, -260, -170, -480, -800, -210, -800, -530, -25, -25, -10, -25, -10, 65, 65, 20, 65, -25, -10, 65, 20, 65, 35, 35, 40, 35, 40, 65, 65, 125, 125, 10, 55, 50, 55, 95, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, 35, 35, 40, 35, 40, 75, 75, 80, 75, 80, 105, 105, 165, 165, 105, 105, 165, 165, 285, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -100, -100, -85, -100, -85, -10, -10, -55, -10, -100, -85, -10, -55, -10, -40, -40, -35, -40, -35, -10, -10, 50, 50, -65, -20, -25, -20, 20, -100, -85, -10, -55, -10, -40, -35, -10, 50, -65, -20, -25, -20, 20, -25, -25, -10, -25, -10, 65, 65, 20, 65, -25, -10, 65, 20, 65, 35, 35, 40, 35, 40, 65, 65, 125, 125, 10, 55, 50, 55, 95, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, 345, 345, 230, 345, 230, -345, -345, 0, -345, 345, 230, -345, 0, -345, 210, 210, 140, 210, 140, -210, -210, 0, -210, 210, 140, -210, 0, -210, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, 120, 120, 80, 120, 80, -120, -120, 0, -120, 120, 80, -120, 0, -120, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, -265, -265, -260, -265, -260, -425, -425, -420, -425, -420, -130, -130, -125, -130, -125, -425, -425, -420, -425, -420, -290, -290, -285, -290, -285, 35, 35, 40, 35, 40, 75, 75, 80, 75, 80, -40, -40, -35, -40, -35, 35, 35, 40, 35, 40, -375, -375, -370, -375, -370, -240, -240, -235, -240, -235, 75, 75, 80, 75, 80, -150, -150, -145, -150, -145, 75, 75, 80, 75, 80, -345, -345, -585, -585, -345, -345, -585, -585, -1065, -1065, -210, -210, -270, -270, -345, -345, -210, -210, -675, -675, -1155, -1155, -270, -270, -1155, -1155, -750, -750, 105, 105, 165, 165, 105, 105, 165, 165, 285, 285, -120, -120, -60, -60, 105, 105, 165, 165, -345, -345, -210, -210, 105, 105, -120, -120, 105, 105, -735, -735, -1215, -1215, -330, -330, -1215, -1215, -810, -810, 165, 165, 285, 285, -60, -60, 165, 165, -1065, -1065, -660, -660, 285, 285, -390, -390, 285, 285, 10, -170, -150, -170, -330, 170, -250, -150, -310, -250, -410, -250, -410, -730, -35, -80, -75, -80, -120, 170, -250, 125, -160, -210, -370, -75, -370, -235, -250, -410, -250, -410, -730, -160, -200, -250, -160, -470, -790, -200, -790, -520, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -65, -20, -25, -20, 20, 10, 55, 50, 55, 95, 120, -225, 75, -135, -30, 75, 45, -75, -30, 75, -250, -410, -115, -410, -275, 50, 90, -25, 50, -360, -225, 90, -135, 90, -225, -385, -225, -385, -705, -135, -175, -225, -135, -445, -765, -175, -765, -495, 75, 115, 75, 115, 195, -75, -35, 75, 115, -225, -135, 75, -75, 75, -485, -805, -215, -805, -535, 115, 195, -35, 115, -705, -435, 195, -255, 195, 125, 65, -235, -55, -235, -115, -135, -235, -475, -15, -195, -175, -195, -355, 445, 305, -395, 25, -395, -115, -135, -275, -295, -395, -635, -395, -635, -1115, -15, -195, -175, -195, -355, 145, -275, -175, -335, -275, -435, -275, -435, -755, -10, -25, -100, -55, -100, -70, -75, -100, -160, -45, -90, -85, -90, -130, 445, 305, -395, 25, -395, 310, 215, -260, 25, -260, -205, -210, -365, -370, -70, -75, -365, -370, -230, -235, -395, -635, -395, -635, -1115, -260, -320, -395, -260, -725, -1205, -320, -1205, -800, 0, -180, -160, -180, -340, 160, -260, -160, -320, -260, -420, -260, -420, -740, -45, -90, -85, -90, -130, 160, -260, 115, -170, -220, -380, -85, -380, -245, -260, -420, -260, -420, -740, -170, -210, -260, -170, -480, -800, -210, -800, -530, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -100, -85, -10, -55, -10, -40, -35, -10, 50, -65, -20, -25, -20, 20, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, 345, 230, -345, 0, -345, 210, 140, -210, 0, -210, -105, -70, 105, 0, 105, 120, 80, -120, 0, -120, -105, -70, 105, 0, 105, -265, -260, -425, -420, -130, -125, -425, -420, -290, -285, 35, 40, 75, 80, -40, -35, 35, 40, -375, -370, -240, -235, 75, 80, -150, -145, 75, 80, -345, -585, -345, -585, -1065, -210, -270, -345, -210, -675, -1155, -270, -1155, -750, 105, 165, 105, 165, 285, -120, -60, 105, 165, -345, -210, 105, -120, 105, -735, -1215, -330, -1215, -810, 165, 285, -60, 165, -1065, -660, 285, -390, 285, 10, -170, -150, -170, -330, 170, -250, -150, -310, -250, -410, -250, -410, -730, -35, -80, -75, -80, -120, 170, -250, 125, -160, -210, -370, -75, -370, -235, -250, -410, -250, -410, -730, -160, -200, -250, -160, -470, -790, -200, -790, -520, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -65, -20, -25, -20, 20, 10, 55, 50, 55, 95, 120, -225, 75, -135, -30, 75, 45, -75, -30, 75, -250, -410, -115, -410, -275, 50, 90, -25, 50, -360, -225, 90, -135, 90, -225, -385, -225, -385, -705, -135, -175, -225, -135, -445, -765, -175, -765, -495, 75, 115, 75, 115, 195, -75, -35, 75, 115, -225, -135, 75, -75, 75, -485, -805, -215, -805, -535, 115, 195, -35, 115, -705, -435, 195, -255, 195, 45, 45, 33, 45, 33, -27, -27, 9, -27, 45, 33, -27, 9, -27, -3, -3, -7, -3, -7, -27, -27, -75, -75, 17, -19, -15, -19, -51, 45, 33, -27, 9, -27, -3, -7, -27, -75, 17, -19, -15, -19, -51, 109, 109, 81, 109, 81, -59, -59, 25, -59, 109, 81, -59, 25, -59, -3, -3, -7, -3, -7, -35, -35, -39, -35, -39, -59, -59, -107, -107, -59, -59, -107, -107, -203, -203, 17, -19, -15, -19, -51, 49, -35, -15, -47, -35, -67, -35, -67, -131, 45, 33, -27, 9, -27, -3, -7, -27, -75, 17, -19, -15, -19, -51, 109, 81, -59, 25, -59, -3, -7, -35, -39, -59, -107, -59, -107, -203, 17, -19, -15, -19, -51, 49, -35, -15, -47, -35, -67, -35, -67, -131, 18, 18, 15, 18, 15, 0, 0, 9, 0, 18, 15, 0, 9, 0, 6, 6, 5, 6, 5, 0, 0, -12, -12, 11, 2, 3, 2, -6, 18, 15, 0, 9, 0, 6, 5, 0, -12, 11, 2, 3, 2, -6, 109, 109, 81, 109, 81, -59, -59, 25, -59, 109, 81, -59, 25, -59, 82, 82, 63, 82, 63, -32, -32, 25, -32, 82, 63, -32, 25, -32, -21, -21, -22, -21, -22, -53, -53, -54, -53, -54, 6, 6, 5, 6, 5, -53, -53, -54, -53, -54, -26, -26, -27, -26, -27, -59, -59, -107, -107, -59, -59, -107, -107, -203, -203, -32, -32, -44, -44, -59, -59, -32, -32, -125, -125, -221, -221, -44, -44, -221, -221, -140, -140, 20, -16, -12, -16, -48, 52, -32, -12, -44, -32, -64, -32, -64, -128, 11, 2, 3, 2, -6, 52, -32, 43, -14, -24, -56, 3, -56, -29, -32, -64, -32, -64, -128, -14, -22, -32, -14, -76, -140, -22, -140, -86, 45, 33, -27, 9, -27, -3, -7, -27, -75, 17, -19, -15, -19, -51, 109, 81, -59, 25, -59, -3, -7, -35, -39, -59, -107, -59, -107, -203, 17, -19, -15, -19, -51, 49, -35, -15, -47, -35, -67, -35, -67, -131, 18, 15, 0, 9, 0, 6, 5, 0, -12, 11, 2, 3, 2, -6, 109, 81, -59, 25, -59, 82, 63, -32, 25, -32, -21, -22, -53, -54, 6, 5, -53, -54, -26, -27, -59, -107, -59, -107, -203, -32, -44, -59, -32, -125, -221, -44, -221, -140, 20, -16, -12, -16, -48, 52, -32, -12, -44, -32, -64, -32, -64, -128, 11, 2, 3, 2, -6, 52, -32, 43, -14, -24, -56, 3, -56, -29, -32, -64, -32, -64, -128, -14, -22, -32, -14, -76, -140, -22, -140, -86, -25, -25, -10, -25, -10, 65, 65, 20, 65, -25, -10, 65, 20, 65, 35, 35, 40, 35, 40, 65, 65, 125, 125, 10, 55, 50, 55, 95, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, 35, 35, 40, 35, 40, 75, 75, 80, 75, 80, 105, 105, 165, 165, 105, 105, 165, 165, 285, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -105, -105, -42, -105, -42, 273, 273, 84, 273, -105, -42, 273, 84, 273, 147, 147, 168, 147, 168, 273, 273, 525, 525, 42, 231, 210, 231, 399, -105, -42, 273, 84, 273, 147, 168, 273, 525, 42, 231, 210, 231, 399, -441, -441, -294, -441, -294, 441, 441, 0, 441, -441, -294, 441, 0, 441, 147, 147, 168, 147, 168, 315, 315, 336, 315, 336, 441, 441, 693, 693, 441, 441, 693, 693, 1197, 1197, 42, 231, 210, 231, 399, -126, 315, 210, 378, 315, 483, 315, 483, 819, -105, -42, 273, 84, 273, 147, 168, 273, 525, 42, 231, 210, 231, 399, -441, -294, 441, 0, 441, 147, 168, 315, 336, 441, 693, 441, 693, 1197, 42, 231, 210, 231, 399, -126, 315, 210, 378, 315, 483, 315, 483, 819, -64, -64, -61, -64, -61, -46, -46, -55, -46, -64, -61, -46, -55, -46, -52, -52, -51, -52, -51, -46, -46, -34, -34, -57, -48, -49, -48, -40, -64, -61, -46, -55, -46, -52, -51, -46, -34, -57, -48, -49, -48, -40, 11, 11, 14, 11, 14, 29, 29, 20, 29, 11, 14, 29, 20, 29, 23, 23, 24, 23, 24, 29, 29, 41, 41, 18, 27, 26, 27, 35, 11, 14, 29, 20, 29, 23, 24, 29, 41, 18, 27, 26, 27, 35, 0, 0, 3, 0, 3, 18, 18, 9, 18, 0, 3, 18, 9, 18, 12, 12, 13, 12, 13, 18, 18, 30, 30, 7, 16, 15, 16, 24, 0, 3, 18, 9, 18, 12, 13, 18, 30, 7, 16, 15, 16, 24, 11, 11, 14, 11, 14, 29, 29, 20, 29, 11, 14, 29, 20, 29, 23, 23, 24, 23, 24, 29, 29, 41, 41, 18, 27, 26, 27, 35, 11, 14, 29, 20, 29, 23, 24, 29, 41, 18, 27, 26, 27, 35, 75, 75, 78, 75, 78, 93, 93, 84, 93, 75, 78, 93, 84, 93, 87, 87, 88, 87, 88, 93, 93, 105, 105, 82, 91, 90, 91, 99, 75, 78, 93, 84, 93, 87, 88, 93, 105, 82, 91, 90, 91, 99, 345, 345, 230, 345, 230, -345, -345, 0, -345, 345, 230, -345, 0, -345, 210, 210, 140, 210, 140, -210, -210, 0, -210, 210, 140, -210, 0, -210, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, 120, 120, 80, 120, 80, -120, -120, 0, -120, 120, 80, -120, 0, -120, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, 9, 9, 6, 9, 6, -9, -9, 0, -9, 9, 6, -9, 0, -9, -18, -18, -12, -18, -12, 18, 18, 0, 18, -18, -12, 18, 0, 18, -105, -105, -70, -105, -70, 105, 105, 0, 105, -105, -70, 105, 0, 105, -441, -441, -294, -441, -294, 441, 441, 0, 441, -441, -294, 441, 0, 441, 156, 156, 104, 156, 104, -156, -156, 0, -156, 156, 104, -156, 0, -156, -69, -69, -46, -69, -46, 69, 69, 0, 69, -69, -46, 69, 0, 69, -36, -36, -24, -36, -24, 36, 36, 0, 36, -36, -24, 36, 0, 36, -69, -69, -46, -69, -46, 69, 69, 0, 69, -69, -46, 69, 0, 69, -261, -261, -174, -261, -174, 261, 261, 0, 261, -261, -174, 261, 0, 261, -241, -241, -240, -241, -240, -401, -401, -400, -401, -400, -106, -106, -105, -106, -105, -401, -401, -400, -401, -400, -266, -266, -265, -266, -265, 59, 59, 60, 59, 60, 99, 99, 100, 99, 100, -16, -16, -15, -16, -15, 59, 59, 60, 59, 60, -351, -351, -350, -351, -350, -216, -216, -215, -216, -215, 99, 99, 100, 99, 100, -126, -126, -125, -126, -125, 99, 99, 100, 99, 100, -33, -33, -32, -33, -32, -65, -65, -64, -65, -64, -6, -6, -5, -6, -5, -65, -65, -64, -65, -64, -38, -38, -37, -38, -37, 59, 59, 60, 59, 60, 99, 99, 100, 99, 100, 267, 267, 268, 267, 268, 435, 435, 436, 435, 436, -52, -52, -51, -52, -51, 23, 23, 24, 23, 24, 12, 12, 13, 12, 13, 23, 23, 24, 23, 24, 87, 87, 88, 87, 88, -351, -351, -350, -351, -350, -216, -216, -215, -216, -215, 99, 99, 100, 99, 100, -126, -126, -125, -126, -125, 99, 99, 100, 99, 100, -15, -15, -14, -15, -14, 12, 12, 13, 12, 13, 99, 99, 100, 99, 100, 435, 435, 436, 435, 436, -162, -162, -161, -162, -161, 63, 63, 64, 63, 64, 30, 30, 31, 30, 31, 63, 63, 64, 63, 64, 255, 255, 256, 255, 256, -345, -345, -585, -585, -345, -345, -585, -585, -1065, -1065, -210, -210, -270, -270, -345, -345, -210, -210, -675, -675, -1155, -1155, -270, -270, -1155, -1155, -750, -750, 105, 105, 165, 165, 105, 105, 165, 165, 285, 285, -120, -120, -60, -60, 105, 105, 165, 165, -345, -345, -210, -210, 105, 105, -120, -120, 105, 105, -735, -735, -1215, -1215, -330, -330, -1215, -1215, -810, -810, 165, 165, 285, 285, -60, -60, 165, 165, -1065, -1065, -660, -660, 285, 285, -390, -390, 285, 285, -9, -9, -57, -57, -9, -9, -57, -57, -153, -153, 18, 18, 6, 6, -9, -9, 18, 18, -75, -75, -171, -171, 6, 6, -171, -171, -90, -90, 105, 105, 165, 165, 105, 105, 165, 165, 285, 285, 441, 441, 693, 693, 441, 441, 693, 693, 1197, 1197, -156, -156, -144, -144, 69, 69, 81, 81, 36, 36, 48, 48, 69, 69, 81, 81, 261, 261, 273, 273, -345, -345, -210, -210, 105, 105, -120, -120, 105, 105, -9, -9, 18, 18, 105, 105, 441, 441, -156, -156, 69, 69, 36, 36, 69, 69, 261, 261, -711, -711, -1191, -1191, -306, -306, -1191, -1191, -786, -786, 189, 189, 309, 309, -36, -36, 189, 189, -1041, -1041, -636, -636, 309, 309, -366, -366, 309, 309, -87, -87, -183, -183, -6, -6, -183, -183, -102, -102, 189, 189, 309, 309, 813, 813, 1317, 1317, -144, -144, 81, 81, 48, 48, 81, 81, 273, 273, -1041, -1041, -636, -636, 309, 309, -366, -366, 309, 309, -33, -33, 48, 48, 309, 309, 1317, 1317, -474, -474, 201, 201, 102, 102, 201, 201, 777, 777, 6, -174, -154, -174, -334, 166, -254, -154, -314, -254, -414, -254, -414, -734, -39, -84, -79, -84, -124, 166, -254, 121, -164, -214, -374, -79, -374, -239, -254, -414, -254, -414, -734, -164, -204, -254, -164, -474, -794, -204, -794, -524, 6, 51, 46, 51, 91, -34, 71, 46, 86, 71, 111, 71, 111, 191, -69, -24, -29, -24, 16, 6, 51, 46, 51, 91, 116, -229, 71, -139, -34, 71, 41, -79, -34, 71, -254, -414, -119, -414, -279, 46, 86, -29, 46, -364, -229, 86, -139, 86, -229, -389, -229, -389, -709, -139, -179, -229, -139, -449, -769, -179, -769, -499, 71, 111, 71, 111, 191, -79, -39, 71, 111, -229, -139, 71, -79, 71, -489, -809, -219, -809, -539, 111, 191, -39, 111, -709, -439, 191, -259, 191, 22, -14, -10, -14, -46, 54, -30, -10, -42, -30, -62, -30, -62, -126, 13, 4, 5, 4, -4, 54, -30, 45, -12, -22, -54, 5, -54, -27, -30, -62, -30, -62, -126, -12, -20, -30, -12, -74, -138, -20, -138, -84, 6, 51, 46, 51, 91, -34, 71, 46, 86, 71, 111, 71, 111, 191, 22, 211, 190, 211, 379, -146, 295, 190, 358, 295, 463, 295, 463, 799, -57, -48, -49, -48, -40, 18, 27, 26, 27, 35, 7, 16, 15, 16, 24, 18, 27, 26, 27, 35, 82, 91, 90, 91, 99, 116, -229, 71, -139, -34, 71, 41, -79, -34, 71, 4, -5, -5, 13, -34, 71, -146, 295, 53, -103, -22, 47, -11, 25, -22, 47, -86, 175, -238, -398, -103, -398, -263, 62, 102, -13, 62, -348, -213, 102, -123, 102, -30, -62, -3, -62, -35, 62, 102, 270, 438, -49, 26, 15, 26, 90, -348, -213, 102, -123, 102, -12, 15, 102, 438, -159, 66, 33, 66, 258, -229, -389, -229, -389, -709, -139, -179, -229, -139, -449, -769, -179, -769, -499, 71, 111, 71, 111, 191, -79, -39, 71, 111, -229, -139, 71, -79, 71, -489, -809, -219, -809, -539, 111, 191, -39, 111, -709, -439, 191, -259, 191, -5, -37, -5, -37, -101, 13, 5, -5, 13, -49, -113, 5, -113, -59, 71, 111, 71, 111, 191, 295, 463, 295, 463, 799, -103, -95, 47, 55, 25, 33, 47, 55, 175, 183, -229, -139, 71, -79, 71, -5, 13, 71, 295, -103, 47, 25, 47, 175, -473, -793, -203, -793, -523, 127, 207, -23, 127, -693, -423, 207, -243, 207, -57, -121, -3, -121, -67, 127, 207, 543, 879, -95, 55, 33, 55, 183, -693, -423, 207, -243, 207, -21, 33, 207, 879, -315, 135, 69, 135, 519, 125, 65, -235, -55, -235, -115, -135, -235, -475, -15, -195, -175, -195, -355, 445, 305, -395, 25, -395, -115, -135, -275, -295, -395, -635, -395, -635, -1115, -15, -195, -175, -195, -355, 145, -275, -175, -335, -275, -435, -275, -435, -755, -10, -25, -100, -55, -100, -70, -75, -100, -160, -45, -90, -85, -90, -130, 445, 305, -395, 25, -395, 310, 215, -260, 25, -260, -205, -210, -365, -370, -70, -75, -365, -370, -230, -235, -395, -635, -395, -635, -1115, -260, -320, -395, -260, -725, -1205, -320, -1205, -800, 0, -180, -160, -180, -340, 160, -260, -160, -320, -260, -420, -260, -420, -740, -45, -90, -85, -90, -130, 160, -260, 115, -170, -220, -380, -85, -380, -245, -260, -420, -260, -420, -740, -170, -210, -260, -170, -480, -800, -210, -800, -530, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -100, -85, -10, -55, -10, -40, -35, -10, 50, -65, -20, -25, -20, 20, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, 345, 230, -345, 0, -345, 210, 140, -210, 0, -210, -105, -70, 105, 0, 105, 120, 80, -120, 0, -120, -105, -70, 105, 0, 105, -265, -260, -425, -420, -130, -125, -425, -420, -290, -285, 35, 40, 75, 80, -40, -35, 35, 40, -375, -370, -240, -235, 75, 80, -150, -145, 75, 80, -345, -585, -345, -585, -1065, -210, -270, -345, -210, -675, -1155, -270, -1155, -750, 105, 165, 105, 165, 285, -120, -60, 105, 165, -345, -210, 105, -120, 105, -735, -1215, -330, -1215, -810, 165, 285, -60, 165, -1065, -660, 285, -390, 285, 10, -170, -150, -170, -330, 170, -250, -150, -310, -250, -410, -250, -410, -730, -35, -80, -75, -80, -120, 170, -250, 125, -160, -210, -370, -75, -370, -235, -250, -410, -250, -410, -730, -160, -200, -250, -160, -470, -790, -200, -790, -520, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -65, -20, -25, -20, 20, 10, 55, 50, 55, 95, 120, -225, 75, -135, -30, 75, 45, -75, -30, 75, -250, -410, -115, -410, -275, 50, 90, -25, 50, -360, -225, 90, -135, 90, -225, -385, -225, -385, -705, -135, -175, -225, -135, -445, -765, -175, -765, -495, 75, 115, 75, 115, 195, -75, -35, 75, 115, -225, -135, 75, -75, 75, -485, -805, -215, -805, -535, 115, 195, -35, 115, -705, -435, 195, -255, 195, 45, 33, -27, 9, -27, -3, -7, -27, -75, 17, -19, -15, -19, -51, 109, 81, -59, 25, -59, -3, -7, -35, -39, -59, -107, -59, -107, -203, 17, -19, -15, -19, -51, 49, -35, -15, -47, -35, -67, -35, -67, -131, 18, 15, 0, 9, 0, 6, 5, 0, -12, 11, 2, 3, 2, -6, 109, 81, -59, 25, -59, 82, 63, -32, 25, -32, -21, -22, -53, -54, 6, 5, -53, -54, -26, -27, -59, -107, -59, -107, -203, -32, -44, -59, -32, -125, -221, -44, -221, -140, 20, -16, -12, -16, -48, 52, -32, -12, -44, -32, -64, -32, -64, -128, 11, 2, 3, 2, -6, 52, -32, 43, -14, -24, -56, 3, -56, -29, -32, -64, -32, -64, -128, -14, -22, -32, -14, -76, -140, -22, -140, -86, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -105, -42, 273, 84, 273, 147, 168, 273, 525, 42, 231, 210, 231, 399, -441, -294, 441, 0, 441, 147, 168, 315, 336, 441, 693, 441, 693, 1197, 42, 231, 210, 231, 399, -126, 315, 210, 378, 315, 483, 315, 483, 819, -64, -61, -46, -55, -46, -52, -51, -46, -34, -57, -48, -49, -48, -40, 11, 14, 29, 20, 29, 23, 24, 29, 41, 18, 27, 26, 27, 35, 0, 3, 18, 9, 18, 12, 13, 18, 30, 7, 16, 15, 16, 24, 11, 14, 29, 20, 29, 23, 24, 29, 41, 18, 27, 26, 27, 35, 75, 78, 93, 84, 93, 87, 88, 93, 105, 82, 91, 90, 91, 99, 345, 230, -345, 0, -345, 210, 140, -210, 0, -210, -105, -70, 105, 0, 105, 120, 80, -120, 0, -120, -105, -70, 105, 0, 105, 9, 6, -9, 0, -9, -18, -12, 18, 0, 18, -105, -70, 105, 0, 105, -441, -294, 441, 0, 441, 156, 104, -156, 0, -156, -69, -46, 69, 0, 69, -36, -24, 36, 0, 36, -69, -46, 69, 0, 69, -261, -174, 261, 0, 261, -241, -240, -401, -400, -106, -105, -401, -400, -266, -265, 59, 60, 99, 100, -16, -15, 59, 60, -351, -350, -216, -215, 99, 100, -126, -125, 99, 100, -33, -32, -65, -64, -6, -5, -65, -64, -38, -37, 59, 60, 99, 100, 267, 268, 435, 436, -52, -51, 23, 24, 12, 13, 23, 24, 87, 88, -351, -350, -216, -215, 99, 100, -126, -125, 99, 100, -15, -14, 12, 13, 99, 100, 435, 436, -162, -161, 63, 64, 30, 31, 63, 64, 255, 256, -345, -585, -345, -585, -1065, -210, -270, -345, -210, -675, -1155, -270, -1155, -750, 105, 165, 105, 165, 285, -120, -60, 105, 165, -345, -210, 105, -120, 105, -735, -1215, -330, -1215, -810, 165, 285, -60, 165, -1065, -660, 285, -390, 285, -9, -57, -9, -57, -153, 18, 6, -9, 18, -75, -171, 6, -171, -90, 105, 165, 105, 165, 285, 441, 693, 441, 693, 1197, -156, -144, 69, 81, 36, 48, 69, 81, 261, 273, -345, -210, 105, -120, 105, -9, 18, 105, 441, -156, 69, 36, 69, 261, -711, -1191, -306, -1191, -786, 189, 309, -36, 189, -1041, -636, 309, -366, 309, -87, -183, -6, -183, -102, 189, 309, 813, 1317, -144, 81, 48, 81, 273, -1041, -636, 309, -366, 309, -33, 48, 309, 1317, -474, 201, 102, 201, 777, 6, -174, -154, -174, -334, 166, -254, -154, -314, -254, -414, -254, -414, -734, -39, -84, -79, -84, -124, 166, -254, 121, -164, -214, -374, -79, -374, -239, -254, -414, -254, -414, -734, -164, -204, -254, -164, -474, -794, -204, -794, -524, 6, 51, 46, 51, 91, -34, 71, 46, 86, 71, 111, 71, 111, 191, -69, -24, -29, -24, 16, 6, 51, 46, 51, 91, 116, -229, 71, -139, -34, 71, 41, -79, -34, 71, -254, -414, -119, -414, -279, 46, 86, -29, 46, -364, -229, 86, -139, 86, -229, -389, -229, -389, -709, -139, -179, -229, -139, -449, -769, -179, -769, -499, 71, 111, 71, 111, 191, -79, -39, 71, 111, -229, -139, 71, -79, 71, -489, -809, -219, -809, -539, 111, 191, -39, 111, -709, -439, 191, -259, 191, 22, -14, -10, -14, -46, 54, -30, -10, -42, -30, -62, -30, -62, -126, 13, 4, 5, 4, -4, 54, -30, 45, -12, -22, -54, 5, -54, -27, -30, -62, -30, -62, -126, -12, -20, -30, -12, -74, -138, -20, -138, -84, 6, 51, 46, 51, 91, -34, 71, 46, 86, 71, 111, 71, 111, 191, 22, 211, 190, 211, 379, -146, 295, 190, 358, 295, 463, 295, 463, 799, -57, -48, -49, -48, -40, 18, 27, 26, 27, 35, 7, 16, 15, 16, 24, 18, 27, 26, 27, 35, 82, 91, 90, 91, 99, 116, -229, 71, -139, -34, 71, 41, -79, -34, 71, 4, -5, -5, 13, -34, 71, -146, 295, 53, -103, -22, 47, -11, 25, -22, 47, -86, 175, -238, -398, -103, -398, -263, 62, 102, -13, 62, -348, -213, 102, -123, 102, -30, -62, -3, -62, -35, 62, 102, 270, 438, -49, 26, 15, 26, 90, -348, -213, 102, -123, 102, -12, 15, 102, 438, -159, 66, 33, 66, 258, -229, -389, -229, -389, -709, -139, -179, -229, -139, -449, -769, -179, -769, -499, 71, 111, 71, 111, 191, -79, -39, 71, 111, -229, -139, 71, -79, 71, -489, -809, -219, -809, -539, 111, 191, -39, 111, -709, -439, 191, -259, 191, -5, -37, -5, -37, -101, 13, 5, -5, 13, -49, -113, 5, -113, -59, 71, 111, 71, 111, 191, 295, 463, 295, 463, 799, -103, -95, 47, 55, 25, 33, 47, 55, 175, 183, -229, -139, 71, -79, 71, -5, 13, 71, 295, -103, 47, 25, 47, 175, -473, -793, -203, -793, -523, 127, 207, -23, 127, -693, -423, 207, -243, 207, -57, -121, -3, -121, -67, 127, 207, 543, 879, -95, 55, 33, 55, 183, -693, -423, 207, -243, 207, -21, 33, 207, 879, -315, 135, 69, 135, 519])\n assert answers_match(candidate(expression='10-5+3-2+1*2*3-4*5'), [-30, -6, -10, -6, 14, -30, -6, -10, -10, -6, 14, -6, 14, 14, -100, -28, -40, -28, 32, -66, -18, -100, -28, -10, -10, 0, -6, 0, 2, 22, 2, 22, 22, -28, 32, -18, -28, 22, 22, 72, 42, 72, 38, 14, 18, 14, -6, 38, 14, 18, 18, 14, -6, 14, -6, -6, 5, 5, 5, 5, 5, 73, 25, 33, 25, -15, -12, 0, -46, -10, 56, 20, 5, 5, 73, 25, 30, 30, 40, 34, 40, 18, 18, 25, 13, 28, 34, 16, 25, 13, -10, 10, -10, 10, 10, -40, 20, -30, -40, 10, 10, 60, 30, 60, 10, -10, 10, -10, -10, 5, 5, 25, -15, 0, -10, 20, 5, 25, 50, 50, 100, 70, 100, -10, -10, 25, -35, 40, 70, -20, 25, -35, -30, -6, -10, -6, 14, -30, -6, -10, -10, -6, 14, -6, 14, 14, -100, -28, -40, -28, 32, -66, -18, -100, -28, -10, -10, 0, -6, 0, 2, 22, 2, 22, 22, -28, 32, -18, -28, 22, 22, 72, 42, 72, 38, 14, 18, 14, -6, 38, 14, 18, 18, 14, -6, 14, -6, -6, 38, 14, 18, 14, -6, 38, 14, 18, 18, 14, -6, 14, -6, -6, 180, 60, 80, 60, -40, 248, 80, 108, 80, -60, 180, 60, 80, 60, -40, 248, 80, 108, 80, -60, 248, 80, 108, 80, -60, 78, 30, 44, 20, 146, 50, 95, 35, 163, 55, 78, 30, 44, 20, 146, 50, 146, 50, 180, 60, 248, 80, 180, 60, 248, 80, 248, 80, 30, 30, 40, 34, 40, 18, 18, 25, 13, 28, 34, 16, 25, 13, 30, 30, 40, 34, 40, 18, 18, 18, 18, 0, -12, 0, -12, -12, 18, 24, 6, 15, 3, 18, 24, 6, 6, 0, -12, 0, -12, -12, -30, -10, -30, -10, -10, -60, 0, -50, -60, -10, -10, 40, 10, 40, -10, -30, -10, -30, -30, -15, -15, 5, -35, -20, -30, 0, -15, 5, 30, 30, 80, 50, 80, -30, -30, 5, -55, 20, 50, -40, 5, -55, -30, -10, -30, -10, -10, -60, 0, -50, -60, -10, -10, 40, 10, 40, -10, -30, -10, -30, -30, -10, -30, -10, -30, -30, 60, -40, 80, -60, 60, -40, 80, -60, 80, -60, 30, 20, 50, 35, 55, 30, 20, 50, 50, 60, 80, 60, 80, 80, 30, 30, 80, 50, 80, -30, -30, 5, -55, 20, 50, -40, 5, -55, 30, 30, 80, 50, 80, -30, -30, -30, -30, -120, -180, -120, -180, -180, -30, 0, -90, -45, -105, -30, 0, -90, -90, -120, -180, -120, -180, -180, 40, 16, 20, 16, -4, 40, 16, 20, 20, 16, -4, 16, -4, -4, 110, 38, 50, 38, -22, 76, 28, 110, 38, 20, 20, 10, 16, 10, 8, -12, 8, -12, -12, 38, -22, 28, 38, -12, -12, -62, -32, -62, -28, -4, -8, -4, 16, -28, -4, -8, -8, -4, 16, -4, 16, 16, 5, 5, 5, 5, 5, -63, -15, -23, -15, 25, 22, 10, 56, 20, -46, -10, 5, 5, -63, -15, -20, -20, -30, -24, -30, -8, -8, -15, -3, -18, -24, -6, -15, -3, 20, 0, 20, 0, 0, 50, -10, 40, 50, 0, 0, -50, -20, -50, 0, 20, 0, 20, 20, 5, 5, -15, 25, 10, 20, -10, 5, -15, -40, -40, -90, -60, -90, 20, 20, -15, 45, -30, -60, 30, -15, 45, 34, 10, 14, 10, -10, 34, 10, 14, 14, 10, -10, 10, -10, -10, 104, 32, 44, 32, -28, 70, 22, 104, 32, 14, 14, 4, 10, 4, 2, -18, 2, -18, -18, 32, -28, 22, 32, -18, -18, -68, -38, -68, 40, 16, 20, 16, -4, 40, 16, 20, 20, 16, -4, 16, -4, -4, 110, 38, 50, 38, -22, 76, 28, 110, 38, 20, 20, 10, 16, 10, 8, -12, 8, -12, -12, 38, -22, 28, 38, -12, -12, -62, -32, -62, -30, -6, -10, -6, 14, -30, -6, -10, -10, -6, 14, -6, 14, 14, -30, -6, -10, -6, 14, -30, -6, -10, -10, -6, 14, -6, 14, 14, -28, -4, -8, -4, 16, -28, -4, -8, -8, -4, 16, -4, 16, 16, -34, -10, -14, -10, 10, -34, -10, -14, -14, -10, 10, -10, 10, 10, -28, -4, -8, -4, 16, -28, -4, -8, -8, -4, 16, -4, 16, 16, -170, -50, -70, -50, 50, -102, -30, -42, -30, 30, -170, -50, -70, -50, 50, -102, -30, -42, -30, 30, -102, -30, -42, -30, 30, -170, -50, -70, -50, 50, -238, -70, -98, -70, 70, 34, 10, 14, 10, -10, -170, -50, -70, -50, 50, -170, -50, -70, -50, 50, -170, -50, -70, -50, 50, -238, -70, -98, -70, 70, -34, -10, -14, -10, 10, -238, -70, -98, -70, 70, -102, -30, -136, -40, -34, -10, -85, -25, -17, -5, -102, -30, -136, -40, -34, -10, -34, -10, 0, 0, 68, 20, 0, 0, 68, 20, 68, 20, -68, -20, -34, -10, -136, -40, -85, -25, -153, -45, 34, 10, 68, 20, -68, -20, -34, -10, -102, -30, -102, -30, -136, -40, -34, -10, -136, -40, -170, -50, -102, -30, -170, -50, -102, -30, -102, -30, -170, -50, -238, -70, 34, 10, -170, -50, -170, -50, -170, -50, -238, -70, -34, -10, -238, -70, -10, -10, 0, -6, 0, -22, -22, -15, -27, -12, -6, -24, -15, -27, -10, -10, 0, -6, 0, -22, -22, -22, -22, -40, -52, -40, -52, -52, -22, -16, -34, -25, -37, -22, -16, -34, -34, -40, -52, -40, -52, -52, -20, -20, -30, -24, -30, -8, -8, -15, -3, -18, -24, -6, -15, -3, -26, -26, -36, -30, -36, -20, -20, -30, -24, -30, -10, -10, -10, -10, -8, -8, -14, -14, -8, -8, 10, -2, 10, -2, -2, 10, 22, -26, 10, 10, 10, 22, -14, 22, -2, 4, -14, -5, -17, -2, 4, -14, -14, -20, -32, -20, -32, -32, -8, -14, 4, -5, 7, -26, -32, -8, -14, -2, -2, 4, -14, 4, 10, -2, 10, -2, -2, 10, 22, -26, 10, 10, 10, 22, -14, 22, 10, 30, 10, 30, 30, -20, 40, -10, -20, 30, 30, 80, 50, 80, 30, 10, 30, 10, 10, 25, 25, 45, 5, 20, 10, 40, 25, 45, 70, 70, 120, 90, 120, 10, 10, 45, -15, 60, 90, 0, 45, -15, 10, 30, 10, 30, 30, -20, 40, -10, -20, 30, 30, 80, 50, 80, 30, 10, 30, 10, 10, 30, 10, 30, 10, 10, 100, 0, 120, -20, 100, 0, 120, -20, 120, -20, 70, 60, 90, 75, 95, 70, 60, 90, 90, 100, 120, 100, 120, 120, 70, 70, 120, 90, 120, 10, 10, 45, -15, 60, 90, 0, 45, -15, 70, 70, 120, 90, 120, 10, 10, 10, 10, -80, -140, -80, -140, -140, 10, 40, -50, -5, -65, 10, 40, -50, -50, -80, -140, -80, -140, -140, 40, 20, 40, 20, 20, 70, 10, 60, 70, 20, 20, -30, 0, -30, 20, 40, 20, 40, 40, 25, 25, 5, 45, 30, 40, 10, 25, 5, -20, -20, -70, -40, -70, 40, 40, 5, 65, -10, -40, 50, 5, 65, 10, -10, 10, -10, -10, 40, -20, 30, 40, -10, -10, -60, -30, -60, 40, 20, 40, 20, 20, 70, 10, 60, 70, 20, 20, -30, 0, -30, 10, 30, 10, 30, 30, 10, 30, 10, 30, 30, 20, 40, 20, 40, 40, -10, 10, -10, 10, 10, 20, 40, 20, 40, 40, -50, 50, -30, 30, -50, 50, -30, 30, -30, 30, -50, 50, -70, 70, 10, -10, -50, 50, -50, 50, -50, 50, -70, 70, -10, 10, -70, 70, -30, -40, -10, -25, -5, -30, -40, -10, -10, 0, 20, 0, 20, 20, -20, -10, -40, -25, -45, 10, 20, -20, -10, -30, -30, -40, -10, -40, -50, -30, -50, -30, -30, -50, -70, 10, -50, -50, -50, -70, -10, -70, 30, 30, 80, 50, 80, -30, -30, 5, -55, 20, 50, -40, 5, -55, 30, 30, 80, 50, 80, -30, -30, -30, -30, -120, -180, -120, -180, -180, -30, 0, -90, -45, -105, -30, 0, -90, -90, -120, -180, -120, -180, -180, -20, -20, -70, -40, -70, 40, 40, 5, 65, -10, -40, 50, 5, 65, -50, -50, -100, -70, -100, -20, -20, -70, -40, -70, 30, 30, 30, 30, 40, 40, 10, 10, 40, 40, 130, 70, 130, 70, 70, 130, 190, -50, 130, 130, 130, 190, 10, 190, 70, 100, 10, 55, -5, 70, 100, 10, 10, -20, -80, -20, -80, -80, 40, 10, 100, 55, 115, -50, -80, 40, 10, 70, 70, 100, 10, 100, 130, 70, 130, 70, 70, 130, 190, -50, 130, 130, 130, 190, 10, 190])\n assert answers_match(candidate(expression='1*2+3-4*5+6*7-8*9+10'), [3465, 1785, 441, 1305, -39, 425, 145, 441, -2599, 1505, 161, 65, 161, -1279, 6385, 3305, 841, 2425, -39, 425, 145, 305, 25, 81, -2959, 841, -2959, -5239, 1505, 161, 65, 161, -1279, 2825, 361, 65, -55, 1, -1439, 361, -1439, -2519, 855, 435, 99, 315, -21, 95, 25, 99, -661, 365, 29, 5, 29, -331, 6385, 3305, 841, 2425, -39, 3775, 1955, 499, 1435, -21, -31, -101, -151, -221, 95, 25, -151, -221, -25, -95, 81, -2959, 841, -2959, -5239, -261, -1021, 841, 499, -3415, -5695, -1021, -5695, -3301, 1535, 191, 95, 191, -1249, 2855, 391, 95, -25, 31, -1409, 391, -1409, -2489, 365, 29, 5, 29, -331, 2855, 391, 1685, 229, -121, -241, 5, -241, -115, 31, -1409, 391, -1409, -2489, -131, -491, 391, 229, -1625, -2705, -491, -2705, -1571, 867, 447, 111, 327, -9, 107, 37, 111, -649, 377, 41, 17, 41, -319, 1597, 827, 211, 607, -9, 107, 37, 77, 7, 21, -739, 211, -739, -1309, 377, 41, 17, 41, -319, 707, 91, 17, -13, 1, -359, 91, -359, -629, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -873, -453, -117, -333, 3, -113, -43, -117, 643, -383, -47, -23, -47, 313, 5947, 3077, 781, 2257, -39, 3337, 1727, 439, 1267, -21, 1597, 827, 211, 607, -9, 1597, 827, 211, 607, -9, -143, -73, -17, -53, 3, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -197, -127, -227, -157, -125, -55, -113, -43, -437, -367, -311, -241, -227, -157, -227, -157, -143, -73, 135, -2905, 895, -2905, -5185, -207, -967, 895, 553, -3361, -5641, -967, -5641, -3247, 21, -739, 211, -739, -1309, -435, 325, -207, 553, 781, 439, 211, 211, -17, -3665, -5945, -1271, -5945, -3551, -1043, -1613, 325, 553, -5603, -3209, -1613, -1613, -17, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, 397, 61, 37, 61, -299, 727, 111, 37, 7, 21, -339, 111, -339, -609, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, 2677, 381, 1507, 219, 727, 111, 727, 111, -53, 3, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, 75, -1365, 435, -1365, -2445, -87, -447, 435, 273, -1581, -2661, -447, -2661, -1527, 21, -339, 111, -339, -609, -195, 165, -87, 273, 381, 219, 111, 111, 3, -1725, -2805, -591, -2805, -1671, -483, -753, 165, 273, -2643, -1509, -753, -753, 3, 3465, 1785, 441, 1305, -39, 425, 145, 441, -2599, 1505, 161, 65, 161, -1279, 6385, 3305, 841, 2425, -39, 425, 145, 305, 25, 81, -2959, 841, -2959, -5239, 1505, 161, 65, 161, -1279, 2825, 361, 65, -55, 1, -1439, 361, -1439, -2519, 855, 435, 99, 315, -21, 95, 25, 99, -661, 365, 29, 5, 29, -331, 6385, 3305, 841, 2425, -39, 3775, 1955, 499, 1435, -21, -31, -101, -151, -221, 95, 25, -151, -221, -25, -95, 81, -2959, 841, -2959, -5239, -261, -1021, 841, 499, -3415, -5695, -1021, -5695, -3301, 1535, 191, 95, 191, -1249, 2855, 391, 95, -25, 31, -1409, 391, -1409, -2489, 365, 29, 5, 29, -331, 2855, 391, 1685, 229, -121, -241, 5, -241, -115, 31, -1409, 391, -1409, -2489, -131, -491, 391, 229, -1625, -2705, -491, -2705, -1571, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -873, -453, -117, -333, 3, -113, -43, -117, 643, -383, -47, -23, -47, 313, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, 1305, 675, 171, 495, -9, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 1305, 675, 171, 495, -9, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -197, -127, -227, -157, -125, -55, -113, -43, -437, -367, -311, -241, -227, -157, -227, -157, -143, -73, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -105, -35, -75, -5, -105, -35, -75, -5, -125, -55, -113, -43, -125, -55, -105, -35, -105, -35, -425, -355, -299, -229, -215, -145, -215, -145, -131, -61, -425, -355, -299, -229, -75, -5, -75, -5, -215, -145, -131, -61, -215, -145, -75, -5, -75, -5, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, 57, -703, 247, -703, -1273, -399, 361, -171, 589, 817, 475, 247, 247, 19, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, -19, 741, -209, 741, 1311, -19, 741, -209, 741, 1311, -399, 361, -171, 589, -399, 361, -19, 741, -19, 741, 741, 399, 171, 171, -57, 741, 399, -209, -209, 171, -57, 171, -209, -209, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, -3629, -5909, -1235, -5909, -3515, 741, 1311, 741, 1311, 361, 589, 361, 741, 741, -5339, -2945, -1349, -1349, 247, -5339, -2945, 1311, 1311, -1349, 247, -1349, 1311, 1311, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, 397, 61, 37, 61, -299, 727, 111, 37, 7, 21, -339, 111, -339, -609, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, 2677, 381, 1507, 219, 727, 111, 727, 111, -53, 3, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, 75, -1365, 435, -1365, -2445, -87, -447, 435, 273, -1581, -2661, -447, -2661, -1527, 21, -339, 111, -339, -609, -195, 165, -87, 273, 381, 219, 111, 111, 3, -1725, -2805, -591, -2805, -1671, -483, -753, 165, 273, -2643, -1509, -753, -753, 3, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, -395, -59, -35, -59, 301, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, 2545, 361, 1375, 199, 595, 91, 595, 91, -185, -17, 2545, 361, 1375, 199, -705, -89, -705, -89, 595, 91, -185, -17, 595, 91, -705, -89, -705, -89, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, -245, -365, -119, -365, -239, -15, 15, -15, 15, -35, -23, -35, -15, -15, -335, -209, -125, -125, -41, -335, -209, 15, 15, -125, -41, -125, 15, 15, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 37, -323, 127, -323, -593, -179, 181, -71, 289, 397, 235, 127, 127, 19, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, -179, 181, -71, 289, -179, 181, 1, 361, 1, 361, 361, 199, 91, 91, -17, 361, 199, -89, -89, 91, -17, 91, -89, -89, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, -1709, -2789, -575, -2789, -1655, 361, 631, 361, 631, 181, 289, 181, 361, 361, -2519, -1385, -629, -629, 127, -2519, -1385, 631, 631, -629, 127, -629, 631, 631, 3465, 1785, 441, 1305, -39, 425, 145, 441, -2599, 1505, 161, 65, 161, -1279, 6385, 3305, 841, 2425, -39, 425, 145, 305, 25, 81, -2959, 841, -2959, -5239, 1505, 161, 65, 161, -1279, 2825, 361, 65, -55, 1, -1439, 361, -1439, -2519, 855, 435, 99, 315, -21, 95, 25, 99, -661, 365, 29, 5, 29, -331, 6385, 3305, 841, 2425, -39, 3775, 1955, 499, 1435, -21, -31, -101, -151, -221, 95, 25, -151, -221, -25, -95, 81, -2959, 841, -2959, -5239, -261, -1021, 841, 499, -3415, -5695, -1021, -5695, -3301, 1535, 191, 95, 191, -1249, 2855, 391, 95, -25, 31, -1409, 391, -1409, -2489, 365, 29, 5, 29, -331, 2855, 391, 1685, 229, -121, -241, 5, -241, -115, 31, -1409, 391, -1409, -2489, -131, -491, 391, 229, -1625, -2705, -491, -2705, -1571, 867, 447, 111, 327, -9, 107, 37, 111, -649, 377, 41, 17, 41, -319, 1597, 827, 211, 607, -9, 107, 37, 77, 7, 21, -739, 211, -739, -1309, 377, 41, 17, 41, -319, 707, 91, 17, -13, 1, -359, 91, -359, -629, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -873, -453, -117, -333, 3, -113, -43, -117, 643, -383, -47, -23, -47, 313, 5947, 3077, 781, 2257, -39, 3337, 1727, 439, 1267, -21, 1597, 827, 211, 607, -9, 1597, 827, 211, 607, -9, -143, -73, -17, -53, 3, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -197, -127, -227, -157, -125, -55, -113, -43, -437, -367, -311, -241, -227, -157, -227, -157, -143, -73, 135, -2905, 895, -2905, -5185, -207, -967, 895, 553, -3361, -5641, -967, -5641, -3247, 21, -739, 211, -739, -1309, -435, 325, -207, 553, 781, 439, 211, 211, -17, -3665, -5945, -1271, -5945, -3551, -1043, -1613, 325, 553, -5603, -3209, -1613, -1613, -17, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, 397, 61, 37, 61, -299, 727, 111, 37, 7, 21, -339, 111, -339, -609, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, 2677, 381, 1507, 219, 727, 111, 727, 111, -53, 3, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, 75, -1365, 435, -1365, -2445, -87, -447, 435, 273, -1581, -2661, -447, -2661, -1527, 21, -339, 111, -339, -609, -195, 165, -87, 273, 381, 219, 111, 111, 3, -1725, -2805, -591, -2805, -1671, -483, -753, 165, 273, -2643, -1509, -753, -753, 3, 3465, 1785, 441, 1305, -39, 425, 145, 441, -2599, 1505, 161, 65, 161, -1279, 6385, 3305, 841, 2425, -39, 425, 145, 305, 25, 81, -2959, 841, -2959, -5239, 1505, 161, 65, 161, -1279, 2825, 361, 65, -55, 1, -1439, 361, -1439, -2519, 855, 435, 99, 315, -21, 95, 25, 99, -661, 365, 29, 5, 29, -331, 6385, 3305, 841, 2425, -39, 3775, 1955, 499, 1435, -21, -31, -101, -151, -221, 95, 25, -151, -221, -25, -95, 81, -2959, 841, -2959, -5239, -261, -1021, 841, 499, -3415, -5695, -1021, -5695, -3301, 1535, 191, 95, 191, -1249, 2855, 391, 95, -25, 31, -1409, 391, -1409, -2489, 365, 29, 5, 29, -331, 2855, 391, 1685, 229, -121, -241, 5, -241, -115, 31, -1409, 391, -1409, -2489, -131, -491, 391, 229, -1625, -2705, -491, -2705, -1571, 3465, 1785, 441, 1305, -39, 425, 145, 441, -2599, 1505, 161, 65, 161, -1279, 6385, 3305, 841, 2425, -39, 425, 145, 305, 25, 81, -2959, 841, -2959, -5239, 1505, 161, 65, 161, -1279, 2825, 361, 65, -55, 1, -1439, 361, -1439, -2519, 855, 435, 99, 315, -21, 95, 25, 99, -661, 365, 29, 5, 29, -331, 6385, 3305, 841, 2425, -39, 3775, 1955, 499, 1435, -21, -31, -101, -151, -221, 95, 25, -151, -221, -25, -95, 81, -2959, 841, -2959, -5239, -261, -1021, 841, 499, -3415, -5695, -1021, -5695, -3301, 1535, 191, 95, 191, -1249, 2855, 391, 95, -25, 31, -1409, 391, -1409, -2489, 365, 29, 5, 29, -331, 2855, 391, 1685, 229, -121, -241, 5, -241, -115, 31, -1409, 391, -1409, -2489, -131, -491, 391, 229, -1625, -2705, -491, -2705, -1571, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -1595, -825, -209, -605, 11, -105, -35, -75, -5, -19, 741, -209, 741, 1311, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -873, -453, -117, -333, 3, -113, -43, -117, 643, -383, -47, -23, -47, 313, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -873, -453, -117, -333, 3, -113, -43, -117, 643, -383, -47, -23, -47, 313, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -885, -465, -129, -345, -9, -125, -55, -129, 631, -395, -59, -35, -59, 301, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, -865, -445, -109, -325, 11, -105, -35, -109, 651, -375, -39, -15, -39, 321, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, 1305, 675, 171, 495, -9, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 1305, 675, 171, 495, -9, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, 1305, 675, 171, 495, -9, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, 5655, 2925, 741, 2145, -39, 3045, 1575, 399, 1155, -21, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 1305, 675, 171, 495, -9, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, 1305, 675, 171, 495, -9, -435, -225, -57, -165, 3, 1305, 675, 171, 495, -9, 1305, 675, 171, 495, -9, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -1595, -825, -209, -605, 11, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -197, -127, -227, -157, -125, -55, -113, -43, -437, -367, -311, -241, -227, -157, -227, -157, -143, -73, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -105, -35, -75, -5, -105, -35, -75, -5, -125, -55, -113, -43, -125, -55, -105, -35, -105, -35, -425, -355, -299, -229, -215, -145, -215, -145, -131, -61, -425, -355, -299, -229, -75, -5, -75, -5, -215, -145, -131, -61, -215, -145, -75, -5, -75, -5, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -197, -127, -227, -157, -125, -55, -113, -43, -437, -367, -311, -241, -227, -157, -227, -157, -143, -73, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -335, -265, -455, -385, -209, -139, -455, -385, -329, -259, -105, -35, -75, -5, -105, -35, -75, -5, -105, -35, -75, -5, -105, -35, -75, -5, -105, -35, -75, -5, -125, -55, -113, -43, -125, -55, -105, -35, -105, -35, -125, -55, -113, -43, -125, -55, -125, -55, -105, -35, -105, -35, -105, -35, -105, -35, -105, -35, -425, -355, -299, -229, -215, -145, -215, -145, -131, -61, -425, -355, -299, -229, -75, -5, -75, -5, -215, -145, -131, -61, -215, -145, -75, -5, -75, -5, -425, -355, -299, -229, -215, -145, -215, -145, -131, -61, -425, -355, -299, -229, -425, -355, -299, -229, -75, -5, -75, -5, -75, -5, -75, -5, -75, -5, -215, -145, -131, -61, -215, -145, -75, -5, -75, -5, -215, -145, -131, -61, -215, -145, -215, -145, -75, -5, -75, -5, -75, -5, -75, -5, -75, -5, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, 57, -703, 247, -703, -1273, -399, 361, -171, 589, 817, 475, 247, 247, 19, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, -19, 741, -209, 741, 1311, -19, 741, -209, 741, 1311, -399, 361, -171, 589, -399, 361, -19, 741, -19, 741, 741, 399, 171, 171, -57, 741, 399, -209, -209, 171, -57, 171, -209, -209, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, -3629, -5909, -1235, -5909, -3515, 741, 1311, 741, 1311, 361, 589, 361, 741, 741, -5339, -2945, -1349, -1349, 247, -5339, -2945, 1311, 1311, -1349, 247, -1349, 1311, 1311, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, 57, -703, 247, -703, -1273, -399, 361, -171, 589, 817, 475, 247, 247, 19, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, 171, -2869, 931, -2869, -5149, -171, -931, 931, 589, -3325, -5605, -931, -5605, -3211, -19, 741, -209, 741, 1311, -19, 741, -209, 741, 1311, -19, 741, -209, 741, 1311, -19, 741, -209, 741, 1311, -19, 741, -209, 741, 1311, -399, 361, -171, 589, -399, 361, -19, 741, -19, 741, -399, 361, -171, 589, -399, 361, -399, 361, -19, 741, -19, 741, -19, 741, -19, 741, -19, 741, 741, 399, 171, 171, -57, 741, 399, -209, -209, 171, -57, 171, -209, -209, 741, 399, 171, 171, -57, 741, 399, 741, 399, -209, -209, -209, -209, -209, 171, -57, 171, -209, -209, 171, -57, 171, 171, -209, -209, -209, -209, -209, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, -3629, -5909, -1235, -5909, -3515, 741, 1311, 741, 1311, 361, 589, 361, 741, 741, -5339, -2945, -1349, -1349, 247, -5339, -2945, 1311, 1311, -1349, 247, -1349, 1311, 1311, -3629, -5909, -1235, -5909, -3515, -1007, -1577, 361, 589, -5567, -3173, -1577, -1577, 19, -3629, -5909, -1235, -5909, -3515, -3629, -5909, -1235, -5909, -3515, 741, 1311, 741, 1311, 741, 1311, 741, 1311, 741, 1311, 361, 589, 361, 741, 741, 361, 589, 361, 361, 741, 741, 741, 741, 741, -5339, -2945, -1349, -1349, 247, -5339, -2945, 1311, 1311, -1349, 247, -1349, 1311, 1311, -5339, -2945, -1349, -1349, 247, -5339, -2945, -5339, -2945, 1311, 1311, 1311, 1311, 1311, -1349, 247, -1349, 1311, 1311, -1349, 247, -1349, -1349, 1311, 1311, 1311, 1311, 1311, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, 397, 61, 37, 61, -299, 727, 111, 37, 7, 21, -339, 111, -339, -609, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, 2677, 381, 1507, 219, 727, 111, 727, 111, -53, 3, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, 75, -1365, 435, -1365, -2445, -87, -447, 435, 273, -1581, -2661, -447, -2661, -1527, 21, -339, 111, -339, -609, -195, 165, -87, 273, 381, 219, 111, 111, 3, -1725, -2805, -591, -2805, -1671, -483, -753, 165, 273, -2643, -1509, -753, -753, 3, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, -395, -59, -35, -59, 301, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, 2545, 361, 1375, 199, 595, 91, 595, 91, -185, -17, 2545, 361, 1375, 199, -705, -89, -705, -89, 595, 91, -185, -17, 595, 91, -705, -89, -705, -89, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, -245, -365, -119, -365, -239, -15, 15, -15, 15, -35, -23, -35, -15, -15, -335, -209, -125, -125, -41, -335, -209, 15, 15, -125, -41, -125, 15, 15, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 37, -323, 127, -323, -593, -179, 181, -71, 289, 397, 235, 127, 127, 19, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, -179, 181, -71, 289, -179, 181, 1, 361, 1, 361, 361, 199, 91, 91, -17, 361, 199, -89, -89, 91, -17, 91, -89, -89, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, -1709, -2789, -575, -2789, -1655, 361, 631, 361, 631, 181, 289, 181, 361, 361, -2519, -1385, -629, -629, 127, -2519, -1385, 631, 631, -629, 127, -629, 631, 631, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, 397, 61, 37, 61, -299, 727, 111, 37, 7, 21, -339, 111, -339, -609, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, 2677, 381, 1507, 219, 727, 111, 727, 111, -53, 3, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, 75, -1365, 435, -1365, -2445, -87, -447, 435, 273, -1581, -2661, -447, -2661, -1527, 21, -339, 111, -339, -609, -195, 165, -87, 273, 381, 219, 111, 111, 3, -1725, -2805, -591, -2805, -1671, -483, -753, 165, 273, -2643, -1509, -753, -753, 3, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, 1555, 211, 115, 211, -1229, 2875, 411, 115, -5, 51, -1389, 411, -1389, -2469, 385, 49, 25, 49, -311, 2875, 411, 1705, 249, -101, -221, 25, -221, -95, 51, -1389, 411, -1389, -2469, -111, -471, 411, 249, -1605, -2685, -471, -2685, -1551, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -375, -39, -15, -39, 321, -705, -89, -15, 15, 1, 361, -89, 361, 631, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, -395, -59, -35, -59, 301, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, -395, -59, -35, -59, 301, -383, -47, -23, -47, 313, -395, -59, -35, -59, 301, -395, -59, -35, -59, 301, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, -375, -39, -15, -39, 321, 2545, 361, 1375, 199, 595, 91, 595, 91, -185, -17, 2545, 361, 1375, 199, -705, -89, -705, -89, 595, 91, -185, -17, 595, 91, -705, -89, -705, -89, 2545, 361, 1375, 199, 595, 91, 595, 91, -185, -17, 2545, 361, 1375, 199, 2545, 361, 1375, 199, -705, -89, -705, -89, -705, -89, -705, -89, -705, -89, 595, 91, -185, -17, 595, 91, -705, -89, -705, -89, 595, 91, -185, -17, 595, 91, 595, 91, -705, -89, -705, -89, -705, -89, -705, -89, -705, -89, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, -245, -365, -119, -365, -239, -15, 15, -15, 15, -35, -23, -35, -15, -15, -335, -209, -125, -125, -41, -335, -209, 15, 15, -125, -41, -125, 15, 15, -245, -365, -119, -365, -239, -107, -137, -35, -23, -347, -221, -137, -137, -53, -245, -365, -119, -365, -239, -245, -365, -119, -365, -239, -15, 15, -15, 15, -15, 15, -15, 15, -15, 15, -35, -23, -35, -15, -15, -35, -23, -35, -35, -15, -15, -15, -15, -15, -335, -209, -125, -125, -41, -335, -209, 15, 15, -125, -41, -125, 15, 15, -335, -209, -125, -125, -41, -335, -209, -335, -209, 15, 15, 15, 15, 15, -125, -41, -125, 15, 15, -125, -41, -125, -125, 15, 15, 15, 15, 15, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 37, -323, 127, -323, -593, -179, 181, -71, 289, 397, 235, 127, 127, 19, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, -179, 181, -71, 289, -179, 181, 1, 361, 1, 361, 361, 199, 91, 91, -17, 361, 199, -89, -89, 91, -17, 91, -89, -89, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, -1709, -2789, -575, -2789, -1655, 361, 631, 361, 631, 181, 289, 181, 361, 361, -2519, -1385, -629, -629, 127, -2519, -1385, 631, 631, -629, 127, -629, 631, 631, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 37, -323, 127, -323, -593, -179, 181, -71, 289, 397, 235, 127, 127, 19, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 91, -1349, 451, -1349, -2429, -71, -431, 451, 289, -1565, -2645, -431, -2645, -1511, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, 1, 361, -89, 361, 631, -179, 181, -71, 289, -179, 181, 1, 361, 1, 361, -179, 181, -71, 289, -179, 181, -179, 181, 1, 361, 1, 361, 1, 361, 1, 361, 1, 361, 361, 199, 91, 91, -17, 361, 199, -89, -89, 91, -17, 91, -89, -89, 361, 199, 91, 91, -17, 361, 199, 361, 199, -89, -89, -89, -89, -89, 91, -17, 91, -89, -89, 91, -17, 91, 91, -89, -89, -89, -89, -89, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, -1709, -2789, -575, -2789, -1655, 361, 631, 361, 631, 181, 289, 181, 361, 361, -2519, -1385, -629, -629, 127, -2519, -1385, 631, 631, -629, 127, -629, 631, 631, -1709, -2789, -575, -2789, -1655, -467, -737, 181, 289, -2627, -1493, -737, -737, 19, -1709, -2789, -575, -2789, -1655, -1709, -2789, -575, -2789, -1655, 361, 631, 361, 631, 361, 631, 361, 631, 361, 631, 181, 289, 181, 361, 361, 181, 289, 181, 181, 361, 361, 361, 361, 361, -2519, -1385, -629, -629, 127, -2519, -1385, 631, 631, -629, 127, -629, 631, 631, -2519, -1385, -629, -629, 127, -2519, -1385, -2519, -1385, 631, 631, 631, 631, 631, -629, 127, -629, 631, 631, -629, 127, -629, -629, 631, 631, 631, 631, 631])\n assert answers_match(candidate(expression='1*2*3+4*5*6-7*8*9'), [-19914, -19914, -2874, -17994, -2874, -3786, -3786, -2874, 13254, -17994, -2874, -1866, -2874, 13254, -19914, -19914, -2874, -17994, -2874, -762, -762, -762, -762, -2874, 13254, -2874, 16278, 16278, -17994, -2874, -1866, -2874, 13254, -17994, -2874, 1158, 1158, -2874, 13254, -2874, 16278, 16278, -34860, -34860, -5040, -31500, -5040, -6636, -6636, -5040, 23184, -31500, -5040, -3276, -5040, 23184, -22908, -22908, -3312, -20700, -3312, -34860, -34860, -5040, -31500, -5040, -762, -762, -762, -762, -588, -588, -732, -732, -588, -588, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -17946, -2826, -1818, -2826, 13302, -17946, -2826, 1206, 1206, -2826, 13302, -2826, 16326, 16326, -31500, -5040, -3276, -5040, 23184, -20700, -3312, -31500, -5040, 1206, 1206, 2772, 1476, 2772, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -9954, -9954, -1434, -8994, -1434, -1890, -1890, -1434, 6630, -8994, -1434, -930, -1434, 6630, -9954, -9954, -1434, -8994, -1434, -378, -378, -378, -378, -1434, 6630, -1434, 8142, 8142, -8994, -1434, -930, -1434, 6630, -8994, -1434, 582, 582, -1434, 6630, -1434, 8142, 8142, -34860, -34860, -5040, -31500, -5040, -6636, -6636, -5040, 23184, -31500, -5040, -3276, -5040, 23184, -24900, -24900, -3600, -22500, -3600, -4740, -4740, -3600, 16560, -22500, -3600, -2340, -3600, 16560, -22908, -22908, -3312, -20700, -3312, -34860, -34860, -5040, -31500, -5040, -12948, -12948, -1872, -11700, -1872, -34860, -34860, -5040, -31500, -5040, -24900, -24900, -3600, -22500, -3600, -258, -258, -258, -258, -84, -84, -228, -228, -84, -84, -378, -378, -378, -378, -84, -84, -204, -204, -228, -228, -84, -84, -348, -348, -84, -84, -204, -204, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -3312, -5040, -1872, -5040, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, -17946, -2826, -1818, -2826, 13302, -17946, -2826, 1206, 1206, -2826, 13302, -2826, 16326, 16326, -31500, -5040, -3276, -5040, 23184, -20700, -3312, -31500, -5040, 1206, 1206, 2772, 1476, 2772, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -8946, -1386, -882, -1386, 6678, -8946, -1386, 630, 630, -1386, 6678, -1386, 8190, 8190, -31500, -5040, -3276, -5040, 23184, -22500, -3600, -2340, -3600, 16560, -20700, -3312, -31500, -5040, -11700, -1872, -31500, -5040, -22500, -3600, 1710, 1710, 3276, 1980, 3276, 630, 630, 3276, 2196, 1980, 3276, 900, 3276, 2196, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -3312, -5040, -1872, -5040, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, -19914, -19914, -2874, -17994, -2874, -3786, -3786, -2874, 13254, -17994, -2874, -1866, -2874, 13254, -19914, -19914, -2874, -17994, -2874, -762, -762, -762, -762, -2874, 13254, -2874, 16278, 16278, -17994, -2874, -1866, -2874, 13254, -17994, -2874, 1158, 1158, -2874, 13254, -2874, 16278, 16278, -34860, -34860, -5040, -31500, -5040, -6636, -6636, -5040, 23184, -31500, -5040, -3276, -5040, 23184, -22908, -22908, -3312, -20700, -3312, -34860, -34860, -5040, -31500, -5040, -762, -762, -762, -762, -588, -588, -732, -732, -588, -588, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -17946, -2826, -1818, -2826, 13302, -17946, -2826, 1206, 1206, -2826, 13302, -2826, 16326, 16326, -31500, -5040, -3276, -5040, 23184, -20700, -3312, -31500, -5040, 1206, 1206, 2772, 1476, 2772, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -9954, -9954, -1434, -8994, -1434, -1890, -1890, -1434, 6630, -8994, -1434, -930, -1434, 6630, -9954, -9954, -1434, -8994, -1434, -378, -378, -378, -378, -1434, 6630, -1434, 8142, 8142, -8994, -1434, -930, -1434, 6630, -8994, -1434, 582, 582, -1434, 6630, -1434, 8142, 8142, -9954, -9954, -1434, -8994, -1434, -1890, -1890, -1434, 6630, -8994, -1434, -930, -1434, 6630, -9954, -9954, -1434, -8994, -1434, -378, -378, -378, -378, -1434, 6630, -1434, 8142, 8142, -8994, -1434, -930, -1434, 6630, -8994, -1434, 582, 582, -1434, 6630, -1434, 8142, 8142, -34860, -34860, -5040, -31500, -5040, -6636, -6636, -5040, 23184, -31500, -5040, -3276, -5040, 23184, -24900, -24900, -3600, -22500, -3600, -4740, -4740, -3600, 16560, -22500, -3600, -2340, -3600, 16560, -34860, -34860, -5040, -31500, -5040, -6636, -6636, -5040, 23184, -31500, -5040, -3276, -5040, 23184, -24900, -24900, -3600, -22500, -3600, -4740, -4740, -3600, 16560, -22500, -3600, -2340, -3600, 16560, -24900, -24900, -3600, -22500, -3600, -4740, -4740, -3600, 16560, -22500, -3600, -2340, -3600, 16560, -22908, -22908, -3312, -20700, -3312, -34860, -34860, -5040, -31500, -5040, -12948, -12948, -1872, -11700, -1872, -34860, -34860, -5040, -31500, -5040, -24900, -24900, -3600, -22500, -3600, -22908, -22908, -3312, -20700, -3312, -34860, -34860, -5040, -31500, -5040, -12948, -12948, -1872, -11700, -1872, -12948, -12948, -1872, -11700, -1872, -34860, -34860, -5040, -31500, -5040, -24900, -24900, -3600, -22500, -3600, -34860, -34860, -5040, -31500, -5040, -24900, -24900, -3600, -22500, -3600, -24900, -24900, -3600, -22500, -3600, -258, -258, -258, -258, -84, -84, -228, -228, -84, -84, -378, -378, -378, -378, -84, -84, -204, -204, -228, -228, -84, -84, -348, -348, -84, -84, -204, -204, -258, -258, -258, -258, -84, -84, -228, -228, -84, -84, -378, -378, -378, -378, -378, -378, -378, -378, -84, -84, -204, -204, -84, -84, -204, -204, -204, -204, -228, -228, -84, -84, -348, -348, -84, -84, -204, -204, -228, -228, -84, -84, -348, -348, -348, -348, -84, -84, -204, -204, -84, -84, -204, -204, -204, -204, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -3312, -5040, -1872, -5040, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -5040, 23184, -3600, 16560, -3600, 16560, -3312, -5040, -1872, -5040, -3600, -3312, -5040, -1872, -1872, -5040, -3600, -5040, -3600, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 8568, 8568, 29736, 21096, 29736, 21096, 21096, 19368, 29736, 10728, 29736, 21096, 19368, 29736, 10728, 10728, 29736, 21096, 29736, 21096, 21096, -17946, -2826, -1818, -2826, 13302, -17946, -2826, 1206, 1206, -2826, 13302, -2826, 16326, 16326, -31500, -5040, -3276, -5040, 23184, -20700, -3312, -31500, -5040, 1206, 1206, 2772, 1476, 2772, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -8946, -1386, -882, -1386, 6678, -8946, -1386, 630, 630, -1386, 6678, -1386, 8190, 8190, -31500, -5040, -3276, -5040, 23184, -22500, -3600, -2340, -3600, 16560, -20700, -3312, -31500, -5040, -11700, -1872, -31500, -5040, -22500, -3600, 1710, 1710, 3276, 1980, 3276, 630, 630, 3276, 2196, 1980, 3276, 900, 3276, 2196, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -3312, -5040, -1872, -5040, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, -17946, -2826, -1818, -2826, 13302, -17946, -2826, 1206, 1206, -2826, 13302, -2826, 16326, 16326, -31500, -5040, -3276, -5040, 23184, -20700, -3312, -31500, -5040, 1206, 1206, 2772, 1476, 2772, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -8946, -1386, -882, -1386, 6678, -8946, -1386, 630, 630, -1386, 6678, -1386, 8190, 8190, -8946, -1386, -882, -1386, 6678, -8946, -1386, 630, 630, -1386, 6678, -1386, 8190, 8190, -31500, -5040, -3276, -5040, 23184, -22500, -3600, -2340, -3600, 16560, -31500, -5040, -3276, -5040, 23184, -22500, -3600, -2340, -3600, 16560, -22500, -3600, -2340, -3600, 16560, -20700, -3312, -31500, -5040, -11700, -1872, -31500, -5040, -22500, -3600, -20700, -3312, -31500, -5040, -11700, -1872, -11700, -1872, -31500, -5040, -22500, -3600, -31500, -5040, -22500, -3600, -22500, -3600, 1710, 1710, 3276, 1980, 3276, 630, 630, 3276, 2196, 1980, 3276, 900, 3276, 2196, 1710, 1710, 3276, 1980, 3276, 630, 630, 630, 630, 3276, 2196, 3276, 2196, 2196, 1980, 3276, 900, 3276, 2196, 1980, 3276, 900, 900, 3276, 2196, 3276, 2196, 2196, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -3312, -5040, -1872, -5040, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, -2448, 13680, -2448, 16704, 16704, -5040, 23184, -3312, -5040, 16704, 16704, 29232, 18864, 29232, -1008, 7056, -1008, 8568, 8568, -1008, 7056, -1008, 8568, 8568, -5040, 23184, -3600, 16560, -5040, 23184, -3600, 16560, -3600, 16560, -3312, -5040, -1872, -5040, -3600, -3312, -5040, -1872, -1872, -5040, -3600, -5040, -3600, -3600, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 29736, 21096, 19368, 29736, 10728, 29736, 21096, 17208, 17208, 29736, 19368, 29736, 8568, 8568, 8568, 8568, 29736, 21096, 29736, 21096, 21096, 19368, 29736, 10728, 29736, 21096, 19368, 29736, 10728, 10728, 29736, 21096, 29736, 21096, 21096])\n assert answers_match(candidate(expression='1*2+3*4-5*6+7*8-9*10'), [8534, 974, 434, 974, -7126, 16004, 1964, 434, -196, 164, -7936, 1964, -7936, -14236, 1646, 134, 26, 134, -1486, 16004, 1964, 9116, 1124, -646, -1276, 26, -1276, -604, 164, -7936, 1964, -7936, -14236, -676, -2296, 1964, 1124, -9016, -15316, -2296, -15316, -8596, 1706, 194, 86, 194, -1426, 3200, 392, 86, -40, 32, -1588, 392, -1588, -2848, -1798, -286, -178, -286, 1334, -1738, -226, -118, -226, 1394, 15008, 1832, 8120, 992, 3200, 392, 4676, 572, -244, -28, -1186, -1816, -514, -1816, -1144, -454, -580, -178, -118, -1732, -1060, -580, -724, -244, 272, -7828, 2072, -7828, -14128, -568, -2188, 2072, 1232, -8908, -15208, -2188, -15208, -8488, 32, -1588, 392, -1588, -2848, -988, 632, -388, 1232, 1832, 992, 392, 572, -28, -9448, -15748, -2728, -15748, -9028, -2128, -3388, 632, 1232, -14908, -8188, -3388, -4828, -28, 2854, 334, 154, 334, -2366, 5344, 664, 154, -56, 64, -2636, 664, -2636, -4736, 558, 54, 18, 54, -486, 5344, 664, 3048, 384, -206, -416, 18, -416, -192, 64, -2636, 664, -2636, -4736, -216, -756, 664, 384, -2996, -5096, -756, -5096, -2856, 1706, 194, 86, 194, -1426, 3200, 392, 86, -40, 32, -1588, 392, -1588, -2848, -3974, -446, -194, -446, 3334, -7460, -908, -194, 100, -68, 3712, -908, 3712, 6652, -650, -146, -110, -146, 394, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -530, -26, 10, -26, 514, 15008, 1832, 8120, 992, 3200, 392, 4676, 572, -244, -28, 4348, 532, 2052, 252, 3200, 392, -7460, -908, 5824, 712, 904, 112, 904, 112, 904, 112, -4016, -488, -1006, -1636, -334, -1636, -964, -274, -400, 2, 62, -1552, -880, -400, -544, -64, -386, -596, -162, -596, -372, -274, -400, 346, 640, -110, -50, -50, -50, 10, -1552, -880, -400, -544, -64, -512, -288, -400, 640, -656, -176, -176, -176, 304, 272, -7828, 2072, -7828, -14128, -568, -2188, 2072, 1232, -8908, -15208, -2188, -15208, -8488, 32, -1588, 392, -1588, -2848, -988, 632, -388, 1232, 1832, 992, 392, 572, -28, -9448, -15748, -2728, -15748, -9028, -2128, -3388, 632, 1232, -14908, -8188, -3388, -4828, -28, 172, -2528, 772, -2528, -4628, -108, -648, 772, 492, -2888, -4988, -648, -4988, -2748, 32, -1588, 392, -1588, -2848, -68, 3712, -908, 3712, 6652, -848, -308, -248, 292, -248, 292, -248, 292, 352, 892, 1832, 992, 392, 572, -28, 532, 252, 392, -908, 712, 112, 112, 112, -488, -9268, -15568, -2548, -15568, -8848, -1948, -3208, 812, 1412, -14728, -8008, -3208, -4648, 152, -3068, -5168, -828, -5168, -2928, -1948, -3208, 4252, 7192, -308, 292, 292, 292, 892, -14728, -8008, -3208, -4648, 152, -4328, -2088, -3208, 7192, -5768, -968, -968, -968, 3832, 14220, 1620, 720, 1620, -11880, 26670, 3270, 720, -330, 270, -13230, 3270, -13230, -23730, 2740, 220, 40, 220, -2480, 26670, 3270, 15190, 1870, -1080, -2130, 40, -2130, -1010, 270, -13230, 3270, -13230, -23730, -1130, -3830, 3270, 1870, -15030, -25530, -3830, -25530, -14330, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, -3000, -480, -300, -480, 2220, -2900, -380, -200, -380, 2320, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, -1980, -3030, -860, -3030, -1910, -760, -970, -300, -200, -2890, -1770, -970, -1210, -410, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 2854, 334, 154, 334, -2366, 5344, 664, 154, -56, 64, -2636, 664, -2636, -4736, 558, 54, 18, 54, -486, 5344, 664, 3048, 384, -206, -416, 18, -416, -192, 64, -2636, 664, -2636, -4736, -216, -756, 664, 384, -2996, -5096, -756, -5096, -2856, 2860, 340, 160, 340, -2360, 5350, 670, 160, -50, 70, -2630, 670, -2630, -4730, 564, 60, 24, 60, -480, 5350, 670, 3054, 390, -200, -410, 24, -410, -186, 70, -2630, 670, -2630, -4730, -210, -750, 670, 390, -2990, -5090, -750, -5090, -2850, 568, 64, 28, 64, -476, 1066, 130, 28, -14, 10, -530, 130, -530, -950, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, -8520, -960, -420, -960, 7140, -15990, -1950, -420, 210, -150, 7950, -1950, 7950, 14250, -650, -146, -110, -146, 394, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -530, -26, 10, -26, 514, -704, -200, -164, -200, 340, -604, -100, -64, -100, 440, -590, -86, -50, -86, 454, -584, -80, -44, -80, 460, -580, -76, -40, -76, 464, -520, -16, 20, -16, 524, -604, -100, -64, -100, 440, -520, -16, 20, -16, 524, -484, 20, 56, 20, 560, 14842, 1810, 7954, 970, 3034, 370, 4510, 550, -410, -50, 4182, 510, 1886, 230, 3034, 370, -7626, -930, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, 4182, 510, 1886, 230, 3690, 450, 1394, 170, 1066, 130, -9594, -1170, 5330, 650, -9594, -1170, -15990, -1950, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 10086, 1230, 1886, 230, 738, 90, 246, 30, -82, -10, -5002, -610, 1886, 230, -5002, -610, -7954, -970, -1006, -1636, -334, -1636, -964, -274, -400, 2, 62, -1552, -880, -400, -544, -64, -386, -596, -162, -596, -372, -274, -400, 346, 640, -110, -50, -50, -50, 10, -1552, -880, -400, -544, -64, -512, -288, -400, 640, -656, -176, -176, -176, 304, -1620, -2670, -500, -2670, -1550, -400, -610, 60, 160, -2530, -1410, -610, -850, -50, -386, -596, -162, -596, -372, -380, -590, -156, -590, -366, -152, -194, 468, 846, -400, -610, 468, 846, 840, 1470, -110, -50, -50, -50, 10, -164, -64, -50, -44, -40, 20, -64, 20, 56, -1538, -866, -386, -530, -50, -498, -274, -386, 654, -642, -162, -162, -162, 318, -2530, -1410, -610, -850, -50, -498, -274, -450, -226, -194, 846, -610, 846, 1470, -642, -162, -162, -162, 318, -1074, -274, -162, -114, -82, 398, -274, 398, 686, 290, -7810, 2090, -7810, -14110, -550, -2170, 2090, 1250, -8890, -15190, -2170, -15190, -8470, 50, -1570, 410, -1570, -2830, -970, 650, -370, 1250, 1850, 1010, 410, 590, -10, -9430, -15730, -2710, -15730, -9010, -2110, -3370, 650, 1250, -14890, -8170, -3370, -4810, -10, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 50, -1570, 410, -1570, -2830, -50, 3730, -890, 3730, 6670, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, 1850, 1010, 410, 590, -10, 550, 270, 410, -890, 730, 130, 130, 130, -470, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 250, -2450, 850, -2450, -4550, -30, -570, 850, 570, -2810, -4910, -570, -4910, -2670, 10, -530, 130, -530, -950, -90, 4770, -1170, 4770, 8550, 50, -2650, 650, -2650, -4750, -90, 4770, -1170, 4770, 8550, -150, 7950, -1950, 7950, 14250, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, -1370, -830, -370, 170, -230, 310, -170, 370, -130, 410, 470, 1010, -370, 170, 470, 1010, 830, 1370, 1810, 970, 370, 550, -50, 510, 230, 370, -930, 690, 90, 90, 90, -510, 3050, 1650, 650, 950, -50, 510, 230, 450, 170, 130, -1170, 650, -1170, -1950, 690, 90, 90, 90, -510, 1230, 230, 90, 30, -10, -610, 230, -610, -970, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, -15390, -25890, -4190, -25890, -14690, -3190, -5290, 1410, 2410, -24490, -13290, -5290, -7690, 310, -3050, -5150, -810, -5150, -2910, -2990, -5090, -750, -5090, -2850, -710, -1130, 5490, 9270, -3190, -5290, 5490, 9270, 9210, 15510, -290, 310, 310, 310, 910, -830, 170, 310, 370, 410, 1010, 170, 1010, 1370, -14570, -7850, -3050, -4490, 310, -4170, -1930, -3050, 7350, -5610, -810, -810, -810, 3990, -24490, -13290, -5290, -7690, 310, -4170, -1930, -3690, -1450, -1130, 9270, -5290, 9270, 15510, -5610, -810, -810, -810, 3990, -9930, -1930, -810, -330, -10, 4790, -1930, 4790, 7670, 8534, 974, 434, 974, -7126, 16004, 1964, 434, -196, 164, -7936, 1964, -7936, -14236, 1646, 134, 26, 134, -1486, 16004, 1964, 9116, 1124, -646, -1276, 26, -1276, -604, 164, -7936, 1964, -7936, -14236, -676, -2296, 1964, 1124, -9016, -15316, -2296, -15316, -8596, 1706, 194, 86, 194, -1426, 3200, 392, 86, -40, 32, -1588, 392, -1588, -2848, -1798, -286, -178, -286, 1334, -1738, -226, -118, -226, 1394, 15008, 1832, 8120, 992, 3200, 392, 4676, 572, -244, -28, -1186, -1816, -514, -1816, -1144, -454, -580, -178, -118, -1732, -1060, -580, -724, -244, 272, -7828, 2072, -7828, -14128, -568, -2188, 2072, 1232, -8908, -15208, -2188, -15208, -8488, 32, -1588, 392, -1588, -2848, -988, 632, -388, 1232, 1832, 992, 392, 572, -28, -9448, -15748, -2728, -15748, -9028, -2128, -3388, 632, 1232, -14908, -8188, -3388, -4828, -28, 2854, 334, 154, 334, -2366, 5344, 664, 154, -56, 64, -2636, 664, -2636, -4736, 558, 54, 18, 54, -486, 5344, 664, 3048, 384, -206, -416, 18, -416, -192, 64, -2636, 664, -2636, -4736, -216, -756, 664, 384, -2996, -5096, -756, -5096, -2856, 1706, 194, 86, 194, -1426, 3200, 392, 86, -40, 32, -1588, 392, -1588, -2848, -3974, -446, -194, -446, 3334, -7460, -908, -194, 100, -68, 3712, -908, 3712, 6652, -650, -146, -110, -146, 394, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -530, -26, 10, -26, 514, 15008, 1832, 8120, 992, 3200, 392, 4676, 572, -244, -28, 4348, 532, 2052, 252, 3200, 392, -7460, -908, 5824, 712, 904, 112, 904, 112, 904, 112, -4016, -488, -1006, -1636, -334, -1636, -964, -274, -400, 2, 62, -1552, -880, -400, -544, -64, -386, -596, -162, -596, -372, -274, -400, 346, 640, -110, -50, -50, -50, 10, -1552, -880, -400, -544, -64, -512, -288, -400, 640, -656, -176, -176, -176, 304, 272, -7828, 2072, -7828, -14128, -568, -2188, 2072, 1232, -8908, -15208, -2188, -15208, -8488, 32, -1588, 392, -1588, -2848, -988, 632, -388, 1232, 1832, 992, 392, 572, -28, -9448, -15748, -2728, -15748, -9028, -2128, -3388, 632, 1232, -14908, -8188, -3388, -4828, -28, 172, -2528, 772, -2528, -4628, -108, -648, 772, 492, -2888, -4988, -648, -4988, -2748, 32, -1588, 392, -1588, -2848, -68, 3712, -908, 3712, 6652, -848, -308, -248, 292, -248, 292, -248, 292, 352, 892, 1832, 992, 392, 572, -28, 532, 252, 392, -908, 712, 112, 112, 112, -488, -9268, -15568, -2548, -15568, -8848, -1948, -3208, 812, 1412, -14728, -8008, -3208, -4648, 152, -3068, -5168, -828, -5168, -2928, -1948, -3208, 4252, 7192, -308, 292, 292, 292, 892, -14728, -8008, -3208, -4648, 152, -4328, -2088, -3208, 7192, -5768, -968, -968, -968, 3832, 14220, 1620, 720, 1620, -11880, 26670, 3270, 720, -330, 270, -13230, 3270, -13230, -23730, 2740, 220, 40, 220, -2480, 26670, 3270, 15190, 1870, -1080, -2130, 40, -2130, -1010, 270, -13230, 3270, -13230, -23730, -1130, -3830, 3270, 1870, -15030, -25530, -3830, -25530, -14330, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, -3000, -480, -300, -480, 2220, -2900, -380, -200, -380, 2320, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, -1980, -3030, -860, -3030, -1910, -760, -970, -300, -200, -2890, -1770, -970, -1210, -410, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 14220, 1620, 720, 1620, -11880, 26670, 3270, 720, -330, 270, -13230, 3270, -13230, -23730, 2740, 220, 40, 220, -2480, 26670, 3270, 15190, 1870, -1080, -2130, 40, -2130, -1010, 270, -13230, 3270, -13230, -23730, -1130, -3830, 3270, 1870, -15030, -25530, -3830, -25530, -14330, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, -3000, -480, -300, -480, 2220, -2900, -380, -200, -380, 2320, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, -1980, -3030, -860, -3030, -1910, -760, -970, -300, -200, -2890, -1770, -970, -1210, -410, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 2854, 334, 154, 334, -2366, 5344, 664, 154, -56, 64, -2636, 664, -2636, -4736, 558, 54, 18, 54, -486, 5344, 664, 3048, 384, -206, -416, 18, -416, -192, 64, -2636, 664, -2636, -4736, -216, -756, 664, 384, -2996, -5096, -756, -5096, -2856, 2860, 340, 160, 340, -2360, 5350, 670, 160, -50, 70, -2630, 670, -2630, -4730, 564, 60, 24, 60, -480, 5350, 670, 3054, 390, -200, -410, 24, -410, -186, 70, -2630, 670, -2630, -4730, -210, -750, 670, 390, -2990, -5090, -750, -5090, -2850, 2854, 334, 154, 334, -2366, 5344, 664, 154, -56, 64, -2636, 664, -2636, -4736, 558, 54, 18, 54, -486, 5344, 664, 3048, 384, -206, -416, 18, -416, -192, 64, -2636, 664, -2636, -4736, -216, -756, 664, 384, -2996, -5096, -756, -5096, -2856, 2860, 340, 160, 340, -2360, 5350, 670, 160, -50, 70, -2630, 670, -2630, -4730, 564, 60, 24, 60, -480, 5350, 670, 3054, 390, -200, -410, 24, -410, -186, 70, -2630, 670, -2630, -4730, -210, -750, 670, 390, -2990, -5090, -750, -5090, -2850, 2860, 340, 160, 340, -2360, 5350, 670, 160, -50, 70, -2630, 670, -2630, -4730, 564, 60, 24, 60, -480, 5350, 670, 3054, 390, -200, -410, 24, -410, -186, 70, -2630, 670, -2630, -4730, -210, -750, 670, 390, -2990, -5090, -750, -5090, -2850, 568, 64, 28, 64, -476, 1066, 130, 28, -14, 10, -530, 130, -530, -950, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, -8520, -960, -420, -960, 7140, -15990, -1950, -420, 210, -150, 7950, -1950, 7950, 14250, 568, 64, 28, 64, -476, 1066, 130, 28, -14, 10, -530, 130, -530, -950, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, 2840, 320, 140, 320, -2380, 5330, 650, 140, -70, 50, -2650, 650, -2650, -4750, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, -8520, -960, -420, -960, 7140, -15990, -1950, -420, 210, -150, 7950, -1950, 7950, 14250, -5112, -576, -252, -576, 4284, -9594, -1170, -252, 126, -90, 4770, -1170, 4770, 8550, -8520, -960, -420, -960, 7140, -15990, -1950, -420, 210, -150, 7950, -1950, 7950, 14250, -8520, -960, -420, -960, 7140, -15990, -1950, -420, 210, -150, 7950, -1950, 7950, 14250, -650, -146, -110, -146, 394, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -530, -26, 10, -26, 514, -704, -200, -164, -200, 340, -604, -100, -64, -100, 440, -590, -86, -50, -86, 454, -584, -80, -44, -80, 460, -580, -76, -40, -76, 464, -520, -16, 20, -16, 524, -604, -100, -64, -100, 440, -520, -16, 20, -16, 524, -484, 20, 56, 20, 560, -650, -146, -110, -146, 394, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -590, -86, -50, -86, 454, -530, -26, 10, -26, 514, -704, -200, -164, -200, 340, -604, -100, -64, -100, 440, -704, -200, -164, -200, 340, -604, -100, -64, -100, 440, -590, -86, -50, -86, 454, -584, -80, -44, -80, 460, -590, -86, -50, -86, 454, -584, -80, -44, -80, 460, -584, -80, -44, -80, 460, -580, -76, -40, -76, 464, -520, -16, 20, -16, 524, -604, -100, -64, -100, 440, -520, -16, 20, -16, 524, -484, 20, 56, 20, 560, -580, -76, -40, -76, 464, -520, -16, 20, -16, 524, -604, -100, -64, -100, 440, -604, -100, -64, -100, 440, -520, -16, 20, -16, 524, -484, 20, 56, 20, 560, -520, -16, 20, -16, 524, -484, 20, 56, 20, 560, -484, 20, 56, 20, 560, 14842, 1810, 7954, 970, 3034, 370, 4510, 550, -410, -50, 4182, 510, 1886, 230, 3034, 370, -7626, -930, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, 4182, 510, 1886, 230, 3690, 450, 1394, 170, 1066, 130, -9594, -1170, 5330, 650, -9594, -1170, -15990, -1950, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 10086, 1230, 1886, 230, 738, 90, 246, 30, -82, -10, -5002, -610, 1886, 230, -5002, -610, -7954, -970, 14842, 1810, 7954, 970, 3034, 370, 4510, 550, -410, -50, 4182, 510, 1886, 230, 3034, 370, -7626, -930, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, 25010, 3050, 13530, 1650, 5330, 650, 7790, 950, -410, -50, 4182, 510, 1886, 230, 3690, 450, 1394, 170, 4182, 510, 1886, 230, 3690, 450, 1394, 170, 3690, 450, 1394, 170, 1066, 130, -9594, -1170, 5330, 650, -9594, -1170, -15990, -1950, 1066, 130, -9594, -1170, 5330, 650, 5330, 650, -9594, -1170, -15990, -1950, -9594, -1170, -15990, -1950, -15990, -1950, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 10086, 1230, 1886, 230, 738, 90, 246, 30, -82, -10, -5002, -610, 1886, 230, -5002, -610, -7954, -970, 5658, 690, 738, 90, 738, 90, 738, 90, -4182, -510, 10086, 1230, 1886, 230, 10086, 1230, 1886, 230, 738, 90, 246, 30, 738, 90, 246, 30, 246, 30, -82, -10, -5002, -610, 1886, 230, -5002, -610, -7954, -970, -82, -10, -5002, -610, 1886, 230, 1886, 230, -5002, -610, -7954, -970, -5002, -610, -7954, -970, -7954, -970, -1006, -1636, -334, -1636, -964, -274, -400, 2, 62, -1552, -880, -400, -544, -64, -386, -596, -162, -596, -372, -274, -400, 346, 640, -110, -50, -50, -50, 10, -1552, -880, -400, -544, -64, -512, -288, -400, 640, -656, -176, -176, -176, 304, -1620, -2670, -500, -2670, -1550, -400, -610, 60, 160, -2530, -1410, -610, -850, -50, -386, -596, -162, -596, -372, -380, -590, -156, -590, -366, -152, -194, 468, 846, -400, -610, 468, 846, 840, 1470, -110, -50, -50, -50, 10, -164, -64, -50, -44, -40, 20, -64, 20, 56, -1538, -866, -386, -530, -50, -498, -274, -386, 654, -642, -162, -162, -162, 318, -2530, -1410, -610, -850, -50, -498, -274, -450, -226, -194, 846, -610, 846, 1470, -642, -162, -162, -162, 318, -1074, -274, -162, -114, -82, 398, -274, 398, 686, -1006, -1636, -334, -1636, -964, -274, -400, 2, 62, -1552, -880, -400, -544, -64, -386, -596, -162, -596, -372, -274, -400, 346, 640, -110, -50, -50, -50, 10, -1552, -880, -400, -544, -64, -512, -288, -400, 640, -656, -176, -176, -176, 304, -1620, -2670, -500, -2670, -1550, -400, -610, 60, 160, -2530, -1410, -610, -850, -50, -1620, -2670, -500, -2670, -1550, -400, -610, 60, 160, -2530, -1410, -610, -850, -50, -386, -596, -162, -596, -372, -380, -590, -156, -590, -366, -386, -596, -162, -596, -372, -380, -590, -156, -590, -366, -380, -590, -156, -590, -366, -152, -194, 468, 846, -400, -610, 468, 846, 840, 1470, -152, -194, 468, 846, -400, -610, -400, -610, 468, 846, 840, 1470, 468, 846, 840, 1470, 840, 1470, -110, -50, -50, -50, 10, -164, -64, -50, -44, -40, 20, -64, 20, 56, -110, -50, -50, -50, 10, -164, -64, -164, -64, -50, -44, -50, -44, -44, -40, 20, -64, 20, 56, -40, 20, -64, -64, 20, 56, 20, 56, 56, -1538, -866, -386, -530, -50, -498, -274, -386, 654, -642, -162, -162, -162, 318, -2530, -1410, -610, -850, -50, -498, -274, -450, -226, -194, 846, -610, 846, 1470, -642, -162, -162, -162, 318, -1074, -274, -162, -114, -82, 398, -274, 398, 686, -1538, -866, -386, -530, -50, -498, -274, -386, 654, -642, -162, -162, -162, 318, -2530, -1410, -610, -850, -50, -2530, -1410, -610, -850, -50, -498, -274, -450, -226, -498, -274, -450, -226, -450, -226, -194, 846, -610, 846, 1470, -194, 846, -610, -610, 846, 1470, 846, 1470, 1470, -642, -162, -162, -162, 318, -1074, -274, -162, -114, -82, 398, -274, 398, 686, -642, -162, -162, -162, 318, -1074, -274, -1074, -274, -162, -114, -162, -114, -114, -82, 398, -274, 398, 686, -82, 398, -274, -274, 398, 686, 398, 686, 686, 290, -7810, 2090, -7810, -14110, -550, -2170, 2090, 1250, -8890, -15190, -2170, -15190, -8470, 50, -1570, 410, -1570, -2830, -970, 650, -370, 1250, 1850, 1010, 410, 590, -10, -9430, -15730, -2710, -15730, -9010, -2110, -3370, 650, 1250, -14890, -8170, -3370, -4810, -10, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 50, -1570, 410, -1570, -2830, -50, 3730, -890, 3730, 6670, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, 1850, 1010, 410, 590, -10, 550, 270, 410, -890, 730, 130, 130, 130, -470, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 250, -2450, 850, -2450, -4550, -30, -570, 850, 570, -2810, -4910, -570, -4910, -2670, 10, -530, 130, -530, -950, -90, 4770, -1170, 4770, 8550, 50, -2650, 650, -2650, -4750, -90, 4770, -1170, 4770, 8550, -150, 7950, -1950, 7950, 14250, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, -1370, -830, -370, 170, -230, 310, -170, 370, -130, 410, 470, 1010, -370, 170, 470, 1010, 830, 1370, 1810, 970, 370, 550, -50, 510, 230, 370, -930, 690, 90, 90, 90, -510, 3050, 1650, 650, 950, -50, 510, 230, 450, 170, 130, -1170, 650, -1170, -1950, 690, 90, 90, 90, -510, 1230, 230, 90, 30, -10, -610, 230, -610, -970, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, -15390, -25890, -4190, -25890, -14690, -3190, -5290, 1410, 2410, -24490, -13290, -5290, -7690, 310, -3050, -5150, -810, -5150, -2910, -2990, -5090, -750, -5090, -2850, -710, -1130, 5490, 9270, -3190, -5290, 5490, 9270, 9210, 15510, -290, 310, 310, 310, 910, -830, 170, 310, 370, 410, 1010, 170, 1010, 1370, -14570, -7850, -3050, -4490, 310, -4170, -1930, -3050, 7350, -5610, -810, -810, -810, 3990, -24490, -13290, -5290, -7690, 310, -4170, -1930, -3690, -1450, -1130, 9270, -5290, 9270, 15510, -5610, -810, -810, -810, 3990, -9930, -1930, -810, -330, -10, 4790, -1930, 4790, 7670, 290, -7810, 2090, -7810, -14110, -550, -2170, 2090, 1250, -8890, -15190, -2170, -15190, -8470, 50, -1570, 410, -1570, -2830, -970, 650, -370, 1250, 1850, 1010, 410, 590, -10, -9430, -15730, -2710, -15730, -9010, -2110, -3370, 650, 1250, -14890, -8170, -3370, -4810, -10, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 50, -1570, 410, -1570, -2830, -50, 3730, -890, 3730, 6670, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, 1850, 1010, 410, 590, -10, 550, 270, 410, -890, 730, 130, 130, 130, -470, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 450, -13050, 3450, -13050, -23550, -950, -3650, 3450, 2050, -14850, -25350, -3650, -25350, -14150, 50, -2650, 650, -2650, -4750, -1650, 1050, -650, 2050, 3050, 1650, 650, 950, -50, -15750, -26250, -4550, -26250, -15050, -3550, -5650, 1050, 2050, -24850, -13650, -5650, -8050, -50, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 250, -2450, 850, -2450, -4550, -30, -570, 850, 570, -2810, -4910, -570, -4910, -2670, 190, -2510, 790, -2510, -4610, -90, -630, 790, 510, -2870, -4970, -630, -4970, -2730, 250, -2450, 850, -2450, -4550, -30, -570, 850, 570, -2810, -4910, -570, -4910, -2670, 250, -2450, 850, -2450, -4550, -30, -570, 850, 570, -2810, -4910, -570, -4910, -2670, 10, -530, 130, -530, -950, -90, 4770, -1170, 4770, 8550, 50, -2650, 650, -2650, -4750, -90, 4770, -1170, 4770, 8550, -150, 7950, -1950, 7950, 14250, 10, -530, 130, -530, -950, -90, 4770, -1170, 4770, 8550, 50, -2650, 650, -2650, -4750, 50, -2650, 650, -2650, -4750, -90, 4770, -1170, 4770, 8550, -150, 7950, -1950, 7950, 14250, -90, 4770, -1170, 4770, 8550, -150, 7950, -1950, 7950, 14250, -150, 7950, -1950, 7950, 14250, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, -1370, -830, -370, 170, -230, 310, -170, 370, -130, 410, 470, 1010, -370, 170, 470, 1010, 830, 1370, -830, -290, -230, 310, -230, 310, -230, 310, 370, 910, -1370, -830, -370, 170, -1370, -830, -370, 170, -230, 310, -170, 370, -230, 310, -170, 370, -170, 370, -130, 410, 470, 1010, -370, 170, 470, 1010, 830, 1370, -130, 410, 470, 1010, -370, 170, -370, 170, 470, 1010, 830, 1370, 470, 1010, 830, 1370, 830, 1370, 1810, 970, 370, 550, -50, 510, 230, 370, -930, 690, 90, 90, 90, -510, 3050, 1650, 650, 950, -50, 510, 230, 450, 170, 130, -1170, 650, -1170, -1950, 690, 90, 90, 90, -510, 1230, 230, 90, 30, -10, -610, 230, -610, -970, 1810, 970, 370, 550, -50, 510, 230, 370, -930, 690, 90, 90, 90, -510, 3050, 1650, 650, 950, -50, 3050, 1650, 650, 950, -50, 510, 230, 450, 170, 510, 230, 450, 170, 450, 170, 130, -1170, 650, -1170, -1950, 130, -1170, 650, 650, -1170, -1950, -1170, -1950, -1950, 690, 90, 90, 90, -510, 1230, 230, 90, 30, -10, -610, 230, -610, -970, 690, 90, 90, 90, -510, 1230, 230, 1230, 230, 90, 30, 90, 30, 30, -10, -610, 230, -610, -970, -10, -610, 230, 230, -610, -970, -610, -970, -970, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, -15390, -25890, -4190, -25890, -14690, -3190, -5290, 1410, 2410, -24490, -13290, -5290, -7690, 310, -3050, -5150, -810, -5150, -2910, -2990, -5090, -750, -5090, -2850, -710, -1130, 5490, 9270, -3190, -5290, 5490, 9270, 9210, 15510, -290, 310, 310, 310, 910, -830, 170, 310, 370, 410, 1010, 170, 1010, 1370, -14570, -7850, -3050, -4490, 310, -4170, -1930, -3050, 7350, -5610, -810, -810, -810, 3990, -24490, -13290, -5290, -7690, 310, -4170, -1930, -3690, -1450, -1130, 9270, -5290, 9270, 15510, -5610, -810, -810, -810, 3990, -9930, -1930, -810, -330, -10, 4790, -1930, 4790, 7670, -9250, -15550, -2530, -15550, -8830, -1930, -3190, 830, 1430, -14710, -7990, -3190, -4630, 170, -3050, -5150, -810, -5150, -2910, -1930, -3190, 4270, 7210, -290, 310, 310, 310, 910, -14710, -7990, -3190, -4630, 170, -4310, -2070, -3190, 7210, -5750, -950, -950, -950, 3850, -15390, -25890, -4190, -25890, -14690, -3190, -5290, 1410, 2410, -24490, -13290, -5290, -7690, 310, -15390, -25890, -4190, -25890, -14690, -3190, -5290, 1410, 2410, -24490, -13290, -5290, -7690, 310, -3050, -5150, -810, -5150, -2910, -2990, -5090, -750, -5090, -2850, -3050, -5150, -810, -5150, -2910, -2990, -5090, -750, -5090, -2850, -2990, -5090, -750, -5090, -2850, -710, -1130, 5490, 9270, -3190, -5290, 5490, 9270, 9210, 15510, -710, -1130, 5490, 9270, -3190, -5290, -3190, -5290, 5490, 9270, 9210, 15510, 5490, 9270, 9210, 15510, 9210, 15510, -290, 310, 310, 310, 910, -830, 170, 310, 370, 410, 1010, 170, 1010, 1370, -290, 310, 310, 310, 910, -830, 170, -830, 170, 310, 370, 310, 370, 370, 410, 1010, 170, 1010, 1370, 410, 1010, 170, 170, 1010, 1370, 1010, 1370, 1370, -14570, -7850, -3050, -4490, 310, -4170, -1930, -3050, 7350, -5610, -810, -810, -810, 3990, -24490, -13290, -5290, -7690, 310, -4170, -1930, -3690, -1450, -1130, 9270, -5290, 9270, 15510, -5610, -810, -810, -810, 3990, -9930, -1930, -810, -330, -10, 4790, -1930, 4790, 7670, -14570, -7850, -3050, -4490, 310, -4170, -1930, -3050, 7350, -5610, -810, -810, -810, 3990, -24490, -13290, -5290, -7690, 310, -24490, -13290, -5290, -7690, 310, -4170, -1930, -3690, -1450, -4170, -1930, -3690, -1450, -3690, -1450, -1130, 9270, -5290, 9270, 15510, -1130, 9270, -5290, -5290, 9270, 15510, 9270, 15510, 15510, -5610, -810, -810, -810, 3990, -9930, -1930, -810, -330, -10, 4790, -1930, 4790, 7670, -5610, -810, -810, -810, 3990, -9930, -1930, -9930, -1930, -810, -330, -810, -330, -330, -10, 4790, -1930, 4790, 7670, -10, 4790, -1930, -1930, 4790, 7670, 4790, 7670, 7670])\n assert answers_match(candidate(expression='2*3-4+5*6-7+8*9-10'), [-72, 628, -212, 628, 1188, 88, -612, -92, 68, 828, 1388, -612, 908, -532, -64, 76, -92, 76, 188, 24, -116, -32, -172, -92, 68, 28, 4, 60, 748, 1308, -692, 828, -612, 116, 228, -116, -172, 828, -612, -252, -36, -540, -120, 1140, -372, 1140, 2148, 168, -1092, -156, 132, 1500, 2508, -1092, 1644, -948, -64, 76, -92, 76, 188, -104, 36, -132, 36, 148, 24, -116, -32, -172, 40, -100, -32, -172, -72, -212, -76, 84, 44, 20, 76, -156, 132, 44, 84, 20, 76, 4, 76, 116, 748, 1308, -692, 828, -612, 116, 228, -116, -172, 828, -612, -252, -36, -540, 1340, 2348, -1252, 1484, -1108, 116, 228, 76, 188, -116, -172, -100, -172, -212, 764, -676, -316, -100, -604, 1484, -1108, -316, -676, -100, -604, 44, -604, -964, 68, -632, 208, -632, -1192, -92, 608, 88, -72, -832, -1392, 608, -912, 528, 60, -80, 88, -80, -192, -28, 112, 28, 168, 88, -72, -32, -8, -64, -752, -1312, 688, -832, 608, -120, -232, 112, 168, -832, 608, 248, 32, 536, -84, 756, -252, 756, 1428, 108, -732, -108, 84, 996, 1668, -732, 1092, -636, 56, -504, 168, -504, -952, -72, 488, 72, -56, -664, -1112, 488, -728, 424, -60, -200, -32, -200, -312, -100, -240, -72, -240, -352, 60, -80, 88, -80, -192, -70, -210, -42, -210, -322, 50, -90, 78, -90, -202, -8, 132, -64, 76, 8, 148, -64, 76, -104, 36, -28, 112, 28, 168, -4, 136, -24, 116, -92, 48, -132, 8, 28, 168, -102, 38, 18, 158, -88, 72, 32, 8, 64, -168, 120, 32, 72, 8, 64, -8, 64, 104, 92, -68, -28, -4, -60, -108, 84, 72, -56, 92, 132, -28, 102, -18, -24, 32, -40, 32, 72, -4, -60, -28, -8, 60, 100, -60, 70, -50, 708, 1268, -732, 788, -652, 76, 188, -156, -212, 788, -652, -292, -76, -580, 1300, 2308, -1292, 1444, -1148, 76, 188, 36, 148, -156, -212, -140, -212, -252, 724, -716, -356, -140, -644, 1444, -1148, -356, -716, -140, -644, 4, -644, -1004, -752, -1312, 688, -832, 608, -120, -232, 112, 168, -832, 608, 248, 32, 536, 856, 1528, -872, 952, -776, -604, -1052, 548, -668, 484, -240, -352, -280, -392, -120, -232, -250, -362, -130, -242, 132, 76, 148, 76, 36, 112, 168, 136, 116, 48, 8, 168, 38, 158, 772, -668, -308, -92, -596, 1492, -1100, -308, -668, -92, -596, 52, -596, -956, -848, 592, 232, 16, 520, 952, -776, -668, 484, -848, -1208, 232, -938, 142, 196, -308, 340, -308, -668, 16, 520, 232, 52, -560, -920, 520, -650, 430, -33, 317, -103, 317, 597, 47, -303, -43, 37, 417, 697, -303, 457, -263, -29, 41, -43, 41, 97, 15, -55, -13, -83, -43, 37, 17, 5, 33, 377, 657, -343, 417, -303, 61, 117, -55, -83, 417, -303, -123, -15, -267, -57, 573, -183, 573, 1077, 87, -543, -75, 69, 753, 1257, -543, 825, -471, -29, 41, -43, 41, 97, -49, 21, -63, 21, 77, 15, -55, -13, -83, 23, -47, -13, -83, -33, -103, -35, 45, 25, 13, 41, -75, 69, 25, 45, 13, 41, 5, 41, 61, 377, 657, -343, 417, -303, 61, 117, -55, -83, 417, -303, -123, -15, -267, 673, 1177, -623, 745, -551, 61, 117, 41, 97, -55, -83, -47, -83, -103, 385, -335, -155, -47, -299, 745, -551, -155, -335, -47, -299, 25, -299, -479, 33, -317, 103, -317, -597, -47, 303, 43, -37, -417, -697, 303, -457, 263, 29, -41, 43, -41, -97, -15, 55, 13, 83, 43, -37, -17, -5, -33, -377, -657, 343, -417, 303, -61, -117, 55, 83, -417, 303, 123, 15, 267, 37, -313, 107, -313, -593, -43, 307, 47, -33, -413, -693, 307, -453, 267, 33, -37, 47, -37, -93, -11, 59, 17, 87, 47, -33, -13, -1, -29, -373, -653, 347, -413, 307, -57, -113, 59, 87, -413, 307, 127, 19, 271, -84, 756, -252, 756, 1428, 108, -732, -108, 84, 996, 1668, -732, 1092, -636, 56, -504, 168, -504, -952, -72, 488, 72, -56, -664, -1112, 488, -728, 424, -21, 189, -63, 189, 357, 27, -183, -27, 21, 249, 417, -183, 273, -159, 21, -189, 63, -189, -357, -27, 183, 27, -21, -249, -417, 183, -273, 159, 49, -441, 147, -441, -833, -63, 427, 63, -49, -581, -973, 427, -637, 371, -61, -131, -47, -131, -187, -101, -171, -87, -171, -227, 59, -11, 73, -11, -67, -71, -141, -57, -141, -197, 49, -21, 63, -21, -77, -27, -97, -13, -97, -153, -47, -117, -33, -117, -173, 29, -41, 43, -41, -97, 33, -37, 47, -37, -93, -71, -141, -57, -141, -197, 49, -21, 63, -21, -77, -17, -87, -3, -87, -143, 19, -51, 33, -51, -107, 43, -27, 57, -27, -83, 0, 70, -56, 14, 16, 86, -56, 14, -96, -26, -20, 50, 36, 106, 4, 74, -16, 54, -84, -14, -124, -54, 36, 106, -94, -24, 26, 96, -1, 69, -29, 41, 7, 77, -29, 41, -49, 21, -15, 55, 13, 83, -11, 59, 17, 87, 4, 74, -16, 54, -5, 65, -11, 59, -15, 55, -77, -7, -117, -47, 43, 113, -87, -17, 33, 103, -43, 27, -63, 7, 13, 83, 17, 87, -87, -17, 33, 103, -33, 37, 3, 73, 27, 97, -88, 72, 32, 8, 64, -168, 120, 32, 72, 8, 64, -8, 64, 104, 92, -68, -28, -4, -60, -108, 84, 72, -56, 92, 132, -28, 102, -18, -24, 32, -40, 32, 72, -4, -60, -28, -8, 60, 100, -60, 70, -50, -47, 33, 13, 1, 29, -87, 57, 13, 33, 1, 29, -7, 29, 49, 47, -33, -13, -1, -29, 43, -37, -17, -5, -33, -108, 84, 72, -56, -27, 21, 27, -21, 63, -49, 77, 117, -43, 87, -33, 43, 63, -13, -17, 87, -33, 33, -3, -27, -16, 40, -32, 40, 80, 4, -52, -20, 0, 68, 108, -52, 78, -42, -15, 13, -23, 13, 33, -1, -29, -5, -33, -20, 0, -11, -5, -1, 61, 101, -59, 71, -49, 27, 47, -29, -33, 71, -49, 17, -19, -43, 718, 1278, -722, 798, -642, 86, 198, -146, -202, 798, -642, -282, -66, -570, 1310, 2318, -1282, 1454, -1138, 86, 198, 46, 158, -146, -202, -130, -202, -242, 734, -706, -346, -130, -634, 1454, -1138, -346, -706, -130, -634, 14, -634, -994, -742, -1302, 698, -822, 618, -110, -222, 122, 178, -822, 618, 258, 42, 546, 866, 1538, -862, 962, -766, -594, -1042, 558, -658, 494, -230, -342, -270, -382, -110, -222, -240, -352, -120, -232, 142, 86, 158, 86, 46, 122, 178, 146, 126, 58, 18, 178, 48, 168, 782, -658, -298, -82, -586, 1502, -1090, -298, -658, -82, -586, 62, -586, -946, -838, 602, 242, 26, 530, 962, -766, -658, 494, -838, -1198, 242, -928, 152, 206, -298, 350, -298, -658, 26, 530, 242, 62, -550, -910, 530, -640, 440, 357, 637, -363, 397, -323, 41, 97, -75, -103, 397, -323, -143, -35, -287, 653, 1157, -643, 725, -571, 41, 97, 21, 77, -75, -103, -67, -103, -123, 365, -355, -175, -67, -319, 725, -571, -175, -355, -67, -319, 5, -319, -499, -377, -657, 343, -417, 303, -61, -117, 55, 83, -417, 303, 123, 15, 267, -373, -653, 347, -413, 307, -57, -113, 59, 87, -413, 307, 127, 19, 271, 866, 1538, -862, 962, -766, -594, -1042, 558, -658, 494, 209, 377, -223, 233, -199, -229, -397, 203, -253, 179, -521, -913, 487, -577, 431, -151, -207, -191, -247, -31, -87, -161, -217, -41, -97, -117, -173, -137, -193, -61, -117, -57, -113, -161, -217, -41, -97, -107, -163, -71, -127, -47, -103, 70, 14, 86, 14, -26, 50, 106, 74, 54, -14, -54, 106, -24, 96, 69, 41, 77, 41, 21, 55, 83, 59, 87, 74, 54, 65, 59, 55, -7, -47, 113, -17, 103, 27, 7, 83, 87, -17, 103, 37, 73, 97, 782, -658, -298, -82, -586, 1502, -1090, -298, -658, -82, -586, 62, -586, -946, -838, 602, 242, 26, 530, 962, -766, -658, 494, -838, -1198, 242, -928, 152, 206, -298, 350, -298, -658, 26, 530, 242, 62, -550, -910, 530, -640, 440, 413, -307, -127, -19, -271, 773, -523, -127, -307, -19, -271, 53, -271, -451, -433, 287, 107, -1, 251, -397, 323, 143, 35, 287, 962, -766, -658, 494, 233, -199, -253, 179, -577, 431, -703, -1063, 377, -793, 287, -397, -577, 107, 143, -793, 287, -307, 17, 233, 134, -370, 278, -370, -730, -46, 458, 170, -10, -622, -982, 458, -712, 368, 125, -127, 197, -127, -307, -1, 251, 35, 287, 170, -10, 89, 35, -1, -559, -919, 521, -649, 431, -253, -433, 251, 287, -649, 431, -163, 161, 377])\n assert answers_match(candidate(expression='9*8-7*6+5*4-3*2'), [324, -936, -1188, -936, -2448, 1458, -1314, -1188, -2322, -1314, -2826, -1314, -2826, -5094, -216, -396, -432, -396, -612, 1458, -1314, 918, -774, -1512, -2646, -432, -2646, -1566, -1314, -2826, -1314, -2826, -5094, -774, -990, -1314, -774, -3150, -5418, -990, -5418, -3258, -36, 144, 180, 144, 360, -198, 198, 180, 342, 198, 414, 198, 414, 738, -396, -216, -180, -216, 0, -36, 144, 180, 144, 360, 1242, -1242, 702, -702, -198, 198, 522, -522, -198, 198, -1620, -2754, -540, -2754, -1674, 180, 342, -180, 180, -2538, -1458, 342, -1098, 342, -1242, -2754, -1242, -2754, -5022, -702, -918, -1242, -702, -3078, -5346, -918, -5346, -3186, 198, 414, 198, 414, 738, -522, -306, 198, 414, -1242, -702, 198, -522, 198, -3186, -5454, -1026, -5454, -3294, 414, 738, -306, 414, -5022, -2862, 738, -2142, 738, 100, -40, -68, -40, -208, 226, -82, -68, -194, -82, -250, -82, -250, -502, 40, 20, 16, 20, -4, 226, -82, 166, -22, -104, -230, 16, -230, -110, -82, -250, -82, -250, -502, -22, -46, -82, -22, -286, -538, -46, -538, -298, -36, 144, 180, 144, 360, -198, 198, 180, 342, 198, 414, 198, 414, 738, -260, 1040, 1300, 1040, 2600, -1430, 1430, 1300, 2470, 1430, 2990, 1430, 2990, 5330, -316, -296, -292, -296, -272, 44, 64, 68, 64, 88, 20, 40, 44, 40, 64, 44, 64, 68, 64, 88, 380, 400, 404, 400, 424, 1242, -1242, 702, -702, -198, 198, 522, -522, -198, 198, 10, -10, -50, 50, -198, 198, -1430, 1430, 602, -602, -118, 118, -70, 70, -118, 118, -790, 790, -1572, -2706, -492, -2706, -1626, 228, 390, -132, 228, -2490, -1410, 390, -1050, 390, -116, -242, 4, -242, -122, 228, 390, 1684, 2854, -292, 68, 44, 68, 404, -2490, -1410, 390, -1050, 390, -26, 94, 390, 2854, -1210, 230, 134, 230, 1574, -1242, -2754, -1242, -2754, -5022, -702, -918, -1242, -702, -3078, -5346, -918, -5346, -3186, 198, 414, 198, 414, 738, -522, -306, 198, 414, -1242, -702, 198, -522, 198, -3186, -5454, -1026, -5454, -3294, 414, 738, -306, 414, -5022, -2862, 738, -2142, 738, -10, -178, -10, -178, -430, 50, 26, -10, 50, -214, -466, 26, -466, -226, 198, 414, 198, 414, 738, 1430, 2990, 1430, 2990, 5330, -602, -578, 118, 142, 70, 94, 118, 142, 790, 814, -1242, -702, 198, -522, 198, -10, 50, 198, 1430, -602, 118, 70, 118, 790, -3138, -5406, -978, -5406, -3246, 462, 786, -258, 462, -4974, -2814, 786, -2094, 786, -226, -478, 14, -478, -238, 462, 786, 3374, 5714, -578, 142, 94, 142, 814, -4974, -2814, 786, -2094, 786, -46, 194, 786, 5714, -2414, 466, 274, 466, 3154])\n assert answers_match(candidate(expression='7*8-9+2*3-1+4'), [21, -91, -14, -63, -70, 210, -406, -14, -140, -63, -70, -126, -70, -196, -35, 77, 0, 49, 56, 42, -126, -14, 42, -84, -210, 0, -98, -14, -7, -14, -70, -14, -140, 49, 56, -14, 42, -28, -154, 56, -42, 42, 51, 35, 46, 39, 38, 78, -10, 46, 28, 39, 38, 30, 38, 20, -11, 5, -6, 1, 2, 43, 59, 48, 55, 56, 42, -126, -14, 42, -90, 270, 10, -30, -98, 294, -54, -180, 30, -68, 16, 36, 18, -6, 48, -68, 16, 130, -20, 142, -31, -38, -94, -38, -164, 25, 32, -38, 18, -52, -178, 32, -66, 18, 47, 46, 38, 46, 28, 1, 2, 55, 56, -38, 18, 94, -6, 102, -46, -172, 38, -60, 24, 44, 26, 2, 56, -60, 24, 138, -12, 150])\n assert answers_match(candidate(expression='20*3+5-4*7+6-8*1'), [-240, -240, -240, -240, -240, -360, -360, -720, -360, -240, -240, -360, -720, -360, 160, 160, 160, 160, 160, -440, -440, 160, 160, -1040, -680, 160, -440, 160, -240, -240, -360, -720, -360, 160, 160, -440, 160, -1040, -680, 160, -440, 160, -240, -240, -240, -240, -240, -360, -360, -720, -360, -240, -240, -360, -720, -360, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, -440, -440, 160, 160, -440, -440, 520, 520, 520, 520, -1040, -680, 160, -440, 160, -1040, -680, 880, 880, -440, 160, -440, 520, 520, -240, -240, -360, -720, -360, 160, 160, -440, 160, -1040, -680, 160, -440, 160, -240, -240, -360, -720, -360, 400, 400, 400, 400, -440, 160, -440, 520, 520, -1040, -680, 160, -440, 160, -1040, -680, 880, 880, -440, 160, -440, 520, 520, 45, 45, 45, 45, 45, 39, 39, 21, 39, 45, 45, 39, 21, 39, 65, 65, 65, 65, 65, 35, 35, 65, 65, 5, 23, 65, 35, 65, 45, 45, 39, 21, 39, 65, 65, 35, 65, 5, 23, 65, 35, 65, 140, 140, 140, 140, 140, 134, 134, 116, 134, 140, 140, 134, 116, 134, 45, 45, 45, 45, 45, 39, 39, 21, 39, 45, 45, 39, 21, 39, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 305, 305, 305, 305, 305, 780, 780, 780, 780, 780, 305, 305, 305, 305, 305, -402, -402, 198, 198, -402, -402, 558, 558, 558, 558, 35, 35, 65, 65, 130, 130, 35, 35, 558, 558, 558, 558, 425, 425, 1090, 1090, 425, 425, -888, -528, 312, -288, 312, -888, -528, 1032, 1032, -288, 312, -288, 672, 672, 5, 23, 65, 35, 65, 100, 118, 5, 23, 1032, 1032, 785, 2020, 785, -402, 198, -402, 558, 558, 35, 65, 130, 35, 558, 558, 425, 1090, 425, -240, -240, -360, -720, -360, 160, 160, -440, 160, -1040, -680, 160, -440, 160, -240, -240, -360, -720, -360, 400, 400, 400, 400, -440, 160, -440, 520, 520, -1040, -680, 160, -440, 160, -1040, -680, 880, 880, -440, 160, -440, 520, 520, 45, 45, 39, 21, 39, 65, 65, 35, 65, 5, 23, 65, 35, 65, 140, 140, 134, 116, 134, 45, 45, 39, 21, 39, 400, 400, 400, 400, 305, 305, 780, 780, 305, 305, -402, 198, -402, 558, 558, 35, 65, 130, 35, 558, 558, 425, 1090, 425, -888, -528, 312, -288, 312, -888, -528, 1032, 1032, -288, 312, -288, 672, 672, 5, 23, 65, 35, 65, 100, 118, 5, 23, 1032, 1032, 785, 2020, 785, -402, 198, -402, 558, 558, 35, 65, 130, 35, 558, 558, 425, 1090, 425])\n assert answers_match(candidate(expression='7-2*3+1*4-5'), [3, 3, 15, 3, -15, 2, 2, 15, 14, -2, -20, 2, -20, -16, 10, 10, -20, 10, 55, 0, 0, 14, 14, 1, 0, -20, -2, -16, -12, -30, -8, -30, -26, 30, 75, 0, 14, -9, -5, 75, 3, 59])\n assert answers_match(candidate(expression='9+8*7-6+5*4-3+2*1'), [57, 57, -103, 57, -103, -103, -103, -39, -135, 57, -103, -103, -39, -135, 153, 153, -199, 153, -199, -103, -103, -247, -247, -39, -135, -39, -135, -279, 57, -103, -103, -39, -135, 153, -199, -103, -247, -39, -135, -39, -135, -279, -23, -23, 137, -23, 137, 137, 137, 73, 169, -23, 137, 137, 73, 169, 41, 41, -87, 41, -87, -39, -39, 153, -39, 153, -183, -183, -327, -327, 137, 137, -159, -159, 161, 161, -7, -103, -7, -103, -247, 73, 169, -7, 73, -151, -295, 169, -127, 193, 57, -103, -103, -39, -135, 153, -199, -103, -247, -39, -135, -39, -135, -279, -23, 137, 137, 73, 169, 41, -87, -39, 153, -183, -327, 137, -159, 161, -7, -103, -7, -103, -247, 73, 169, -7, 73, -151, -295, 169, -127, 193, 64, 64, 44, 64, 44, 44, 44, 52, 40, 64, 44, 44, 52, 40, 76, 76, 32, 76, 32, 44, 44, 26, 26, 52, 40, 52, 40, 22, 64, 44, 44, 52, 40, 76, 32, 44, 26, 52, 40, 52, 40, 22, 12, 12, 32, 12, 32, 32, 32, 24, 36, 12, 32, 32, 24, 36, 54, 54, 74, 54, 74, 74, 74, 66, 78, 54, 74, 74, 66, 78, 41, 41, -87, 41, -87, -39, -39, 153, -39, 153, -36, -36, 144, -36, 144, -4, -4, 48, -4, 48, -46, -46, 174, -46, 174, -148, -148, -292, -292, 172, 172, -124, -124, 196, 196, 34, 34, 16, 16, 32, 32, 74, 74, -124, -124, 196, 196, 184, 184, 56, 56, 224, 224, -21, -117, -21, -117, -261, 59, 155, -21, 59, -165, -309, 155, -141, 179, 56, 44, 56, 44, 26, 24, 36, 66, 78, -21, 59, 56, 24, 66, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, 57, -103, -103, -39, -135, 153, -199, -103, -247, -39, -135, -39, -135, -279, -23, 137, 137, 73, 169, 41, -87, -39, 153, -183, -327, 137, -159, 161, -7, -103, -7, -103, -247, 73, 169, -7, 73, -151, -295, 169, -127, 193, 64, 44, 44, 52, 40, 76, 32, 44, 26, 52, 40, 52, 40, 22, 12, 32, 32, 24, 36, 54, 74, 74, 66, 78, 41, -87, -39, 153, -36, 144, -4, 48, -46, 174, -148, -292, 172, -124, 196, 34, 16, 32, 74, -124, 196, 184, 56, 224, -21, -117, -21, -117, -261, 59, 155, -21, 59, -165, -309, 155, -141, 179, 56, 44, 56, 44, 26, 24, 36, 66, 78, -21, 59, 56, 24, 66, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, 102, 102, -238, 102, -238, -238, -238, -102, -306, 102, -238, -238, -102, -306, 306, 306, -442, 306, -442, -238, -238, -544, -544, -102, -306, -102, -306, -612, 102, -238, -238, -102, -306, 306, -442, -238, -544, -102, -306, -102, -306, -612, -68, -68, 272, -68, 272, 272, 272, 136, 340, -68, 272, 272, 136, 340, 68, 68, -204, 68, -204, -102, -102, 306, -102, 306, -408, -408, -714, -714, 272, 272, -357, -357, 323, 323, -34, -238, -34, -238, -544, 136, 340, -34, 136, -340, -646, 340, -289, 391, 102, -238, -238, -102, -306, 306, -442, -238, -544, -102, -306, -102, -306, -612, -68, 272, 272, 136, 340, 68, -204, -102, 306, -408, -714, 272, -357, 323, -34, -238, -34, -238, -544, 136, 340, -34, 136, -340, -646, 340, -289, 391, 64, 64, 44, 64, 44, 44, 44, 52, 40, 64, 44, 44, 52, 40, 76, 76, 32, 76, 32, 44, 44, 26, 26, 52, 40, 52, 40, 22, 64, 44, 44, 52, 40, 76, 32, 44, 26, 52, 40, 52, 40, 22, 118, 118, 98, 118, 98, 98, 98, 106, 94, 118, 98, 98, 106, 94, 130, 130, 86, 130, 86, 98, 98, 80, 80, 106, 94, 106, 94, 76, 118, 98, 98, 106, 94, 130, 86, 98, 80, 106, 94, 106, 94, 76, 12, 12, 32, 12, 32, 32, 32, 24, 36, 12, 32, 32, 24, 36, 54, 54, 74, 54, 74, 74, 74, 66, 78, 54, 74, 74, 66, 78, 12, 12, 32, 12, 32, 32, 32, 24, 36, 12, 32, 32, 24, 36, 54, 54, 74, 54, 74, 74, 74, 66, 78, 54, 74, 74, 66, 78, 108, 108, 128, 108, 128, 128, 128, 120, 132, 108, 128, 128, 120, 132, 23, 23, -69, 23, -69, -57, -57, 171, -57, 171, -54, -54, 162, -54, 162, -22, -22, 66, -22, 66, -64, -64, 192, -64, 192, 68, 68, -204, 68, -204, -102, -102, 306, -102, 306, -54, -54, 162, -54, 162, -108, -108, 324, -108, 324, -22, -22, 66, -22, 66, -64, -64, 192, -64, 192, -22, -22, 66, -22, 66, -64, -64, 192, -64, 192, -118, -118, 354, -118, 354, -148, -148, -292, -292, 172, 172, -124, -124, 196, 196, 34, 34, 16, 16, 32, 32, 74, 74, -124, -124, 196, 196, 184, 184, 56, 56, 224, 224, -328, -328, -634, -634, 352, 352, -277, -277, 403, 403, 34, 34, 16, 16, 88, 88, 70, 70, 32, 32, 74, 74, 32, 32, 74, 74, 128, 128, -97, -97, 223, 223, 211, 211, 83, 83, 251, 251, -277, -277, 403, 403, 211, 211, 427, 427, 83, 83, 251, 251, 83, 83, 251, 251, 467, 467, -21, -117, -21, -117, -261, 59, 155, -21, 59, -165, -309, 155, -141, 179, 56, 44, 56, 44, 26, 24, 36, 66, 78, -21, 59, 56, 24, 66, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, -66, -270, -66, -270, -576, 104, 308, -66, 104, -372, -678, 308, -321, 359, 56, 44, 56, 44, 26, 110, 98, 110, 98, 80, 24, 36, 66, 78, 24, 36, 66, 78, 120, 132, -21, 59, 56, 24, 66, -66, 104, 56, 110, 24, 66, 24, 66, 120, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, -324, -630, 356, -273, 407, 38, 20, 92, 74, 36, 78, 36, 78, 132, -93, 227, 215, 87, 255, -273, 407, 215, 431, 87, 255, 87, 255, 471, 57, -103, -103, -39, -135, 153, -199, -103, -247, -39, -135, -39, -135, -279, -23, 137, 137, 73, 169, 41, -87, -39, 153, -183, -327, 137, -159, 161, -7, -103, -7, -103, -247, 73, 169, -7, 73, -151, -295, 169, -127, 193, 64, 44, 44, 52, 40, 76, 32, 44, 26, 52, 40, 52, 40, 22, 12, 32, 32, 24, 36, 54, 74, 74, 66, 78, 41, -87, -39, 153, -36, 144, -4, 48, -46, 174, -148, -292, 172, -124, 196, 34, 16, 32, 74, -124, 196, 184, 56, 224, -21, -117, -21, -117, -261, 59, 155, -21, 59, -165, -309, 155, -141, 179, 56, 44, 56, 44, 26, 24, 36, 66, 78, -21, 59, 56, 24, 66, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, 102, -238, -238, -102, -306, 306, -442, -238, -544, -102, -306, -102, -306, -612, -68, 272, 272, 136, 340, 68, -204, -102, 306, -408, -714, 272, -357, 323, -34, -238, -34, -238, -544, 136, 340, -34, 136, -340, -646, 340, -289, 391, 64, 44, 44, 52, 40, 76, 32, 44, 26, 52, 40, 52, 40, 22, 118, 98, 98, 106, 94, 130, 86, 98, 80, 106, 94, 106, 94, 76, 12, 32, 32, 24, 36, 54, 74, 74, 66, 78, 12, 32, 32, 24, 36, 54, 74, 74, 66, 78, 108, 128, 128, 120, 132, 23, -69, -57, 171, -54, 162, -22, 66, -64, 192, 68, -204, -102, 306, -54, 162, -108, 324, -22, 66, -64, 192, -22, 66, -64, 192, -118, 354, -148, -292, 172, -124, 196, 34, 16, 32, 74, -124, 196, 184, 56, 224, -328, -634, 352, -277, 403, 34, 16, 88, 70, 32, 74, 32, 74, 128, -97, 223, 211, 83, 251, -277, 403, 211, 427, 83, 251, 83, 251, 467, -21, -117, -21, -117, -261, 59, 155, -21, 59, -165, -309, 155, -141, 179, 56, 44, 56, 44, 26, 24, 36, 66, 78, -21, 59, 56, 24, 66, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, -66, -270, -66, -270, -576, 104, 308, -66, 104, -372, -678, 308, -321, 359, 56, 44, 56, 44, 26, 110, 98, 110, 98, 80, 24, 36, 66, 78, 24, 36, 66, 78, 120, 132, -21, 59, 56, 24, 66, -66, 104, 56, 110, 24, 66, 24, 66, 120, -144, -288, 176, -120, 200, 38, 20, 36, 78, -120, 200, 188, 60, 228, -324, -630, 356, -273, 407, 38, 20, 92, 74, 36, 78, 36, 78, 132, -93, 227, 215, 87, 255, -273, 407, 215, 431, 87, 255, 87, 255, 471])\n assert answers_match(candidate(expression='7*6-5*4+3*2-1*0'), [-308, -98, -308, -98, -98, -448, 42, -308, -448, 42, 42, 42, 42, 42, -140, -98, -140, -98, -98, -448, 42, -280, 42, -308, -448, -140, -448, -280, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 70, 28, 70, 28, 28, 98, 0, 70, 98, 0, 0, 0, 0, 0, -56, -98, -56, -98, -98, 70, 28, 70, 28, 28, -406, 0, -238, 0, 98, 0, -154, 0, 98, 0, -308, -448, -140, -448, -280, 70, 98, -56, 70, -406, -238, 98, -154, 98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -8, 22, -8, 22, 22, -28, 42, -8, -28, 42, 42, 42, 42, 42, 16, 22, 16, 22, 22, -28, 42, -4, 42, -8, -28, 16, -28, -4, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 70, 28, 70, 28, 28, 98, 0, 70, 98, 0, 0, 0, 0, 0, 370, 148, 370, 148, 148, 518, 0, 370, 518, 0, 0, 0, 0, 0, -92, -98, -92, -98, -98, 34, 28, 34, 28, 28, 28, 22, 28, 22, 22, 34, 28, 34, 28, 28, 154, 148, 154, 148, 148, -406, 0, -238, 0, 98, 0, -154, 0, 98, 0, 14, 0, 38, 0, 98, 0, 518, 0, -190, 0, 62, 0, 50, 0, 62, 0, 302, 0, -308, -448, -140, -448, -280, 70, 98, -56, 70, -406, -238, 98, -154, 98, -8, -28, 16, -28, -4, 70, 98, 370, 518, -92, 34, 28, 34, 154, -406, -238, 98, -154, 98, 14, 38, 98, 518, -190, 62, 50, 62, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n assert answers_match(candidate(expression='99-98+97-96+95-94'), [1, 1, -1, 189, -1, 1, 1, -1, -1, 189, -1, 189, -1, -1, 1, 1, 3, -187, 3, -193, -193, 1, 1, 1, 1, 3, -191, 3, 1, -189, 1, -189, -189, -187, 3, -381, -187, 1, 1, 3, -191, 3])\n assert answers_match(candidate(expression='1*1*1*1*1*1*1*1*1*1'), [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(expression='9*8*7-6*5+4*3-2*1'), [-3384, -3384, -5976, -3384, -5976, -3384, -3384, -5976, -10296, -3384, -5976, -3384, -5976, -10296, -1944, -1944, -2376, -1944, -2376, -3384, -3384, -1944, -1944, -6696, -11016, -2376, -11016, -6696, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 648, 1080, 648, 1080, 648, 648, 1080, 1800, 648, 1080, 648, 1080, 1800, -1368, -1368, -936, -1368, -936, 648, 648, 1080, 648, 1080, -3384, -3384, -1944, -1944, 648, 648, -1368, -1368, 648, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 1080, 648, 1080, 1800, -1368, -936, 648, 1080, -3384, -1944, 648, -1368, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, 18, 18, -306, 18, -306, 18, 18, -306, -846, 18, -306, 18, -306, -846, 198, 198, 144, 198, 144, 18, 18, 198, 198, -396, -936, 144, -936, -396, 18, -306, 18, -306, -846, 198, 144, 18, 198, -396, -936, 144, -936, -396, 648, 648, 1080, 648, 1080, 648, 648, 1080, 1800, 648, 1080, 648, 1080, 1800, 4050, 4050, 6750, 4050, 6750, 4050, 4050, 6750, 11250, 4050, 6750, 4050, 6750, 11250, -1620, -1620, -1566, -1620, -1566, 396, 396, 450, 396, 450, 270, 270, 324, 270, 324, 396, 396, 450, 396, 450, 2286, 2286, 2340, 2286, 2340, -3384, -3384, -1944, -1944, 648, 648, -1368, -1368, 648, 648, 18, 18, 198, 198, 648, 648, 4050, 4050, -1620, -1620, 396, 396, 270, 270, 396, 396, 2286, 2286, -6858, -11178, -2538, -11178, -6858, 1206, 1926, -810, 1206, -10170, -5850, 1926, -4122, 1926, -432, -972, 108, -972, -432, 1206, 1926, 7632, 12132, -1566, 450, 324, 450, 2340, -10170, -5850, 1926, -4122, 1926, 36, 576, 1926, 12132, -4878, 1170, 792, 1170, 6840, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 1080, 648, 1080, 1800, -1368, -936, 648, 1080, -3384, -1944, 648, -1368, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, 18, -306, 18, -306, -846, 198, 144, 18, 198, -396, -936, 144, -936, -396, 648, 1080, 648, 1080, 1800, 4050, 6750, 4050, 6750, 11250, -1620, -1566, 396, 450, 270, 324, 396, 450, 2286, 2340, -3384, -1944, 648, -1368, 648, 18, 198, 648, 4050, -1620, 396, 270, 396, 2286, -6858, -11178, -2538, -11178, -6858, 1206, 1926, -810, 1206, -10170, -5850, 1926, -4122, 1926, -432, -972, 108, -972, -432, 1206, 1926, 7632, 12132, -1566, 450, 324, 450, 2340, -10170, -5850, 1926, -4122, 1926, 36, 576, 1926, 12132, -4878, 1170, 792, 1170, 6840, -3384, -3384, -5976, -3384, -5976, -3384, -3384, -5976, -10296, -3384, -5976, -3384, -5976, -10296, -1944, -1944, -2376, -1944, -2376, -3384, -3384, -1944, -1944, -6696, -11016, -2376, -11016, -6696, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 648, 1080, 648, 1080, 648, 648, 1080, 1800, 648, 1080, 648, 1080, 1800, -1368, -1368, -936, -1368, -936, 648, 648, 1080, 648, 1080, -3384, -3384, -1944, -1944, 648, 648, -1368, -1368, 648, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 1080, 648, 1080, 1800, -1368, -936, 648, 1080, -3384, -1944, 648, -1368, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, 450, 450, 414, 450, 414, 450, 450, 414, 354, 450, 414, 450, 414, 354, 470, 470, 464, 470, 464, 450, 450, 470, 470, 404, 344, 464, 344, 404, 450, 414, 450, 414, 354, 470, 464, 450, 470, 404, 344, 464, 344, 404, 450, 450, 414, 450, 414, 450, 450, 414, 354, 450, 414, 450, 414, 354, 470, 470, 464, 470, 464, 450, 450, 470, 470, 404, 344, 464, 344, 404, 450, 414, 450, 414, 354, 470, 464, 450, 470, 404, 344, 464, 344, 404, 648, 648, 1080, 648, 1080, 648, 648, 1080, 1800, 648, 1080, 648, 1080, 1800, 4050, 4050, 6750, 4050, 6750, 4050, 4050, 6750, 11250, 4050, 6750, 4050, 6750, 11250, 648, 648, 1080, 648, 1080, 648, 648, 1080, 1800, 648, 1080, 648, 1080, 1800, 4482, 4482, 7470, 4482, 7470, 4482, 4482, 7470, 12450, 4482, 7470, 4482, 7470, 12450, 4482, 4482, 7470, 4482, 7470, 4482, 4482, 7470, 12450, 4482, 7470, 4482, 7470, 12450, -1652, -1652, -1646, -1652, -1646, 364, 364, 370, 364, 370, 238, 238, 244, 238, 244, 364, 364, 370, 364, 370, 2254, 2254, 2260, 2254, 2260, -1652, -1652, -1646, -1652, -1646, 364, 364, 370, 364, 370, 478, 478, 484, 478, 484, 478, 478, 484, 478, 484, 364, 364, 370, 364, 370, 2254, 2254, 2260, 2254, 2260, 364, 364, 370, 364, 370, 2494, 2494, 2500, 2494, 2500, 2494, 2494, 2500, 2494, 2500, -3384, -3384, -1944, -1944, 648, 648, -1368, -1368, 648, 648, 18, 18, 198, 198, 648, 648, 4050, 4050, -1620, -1620, 396, 396, 270, 270, 396, 396, 2286, 2286, -3384, -3384, -1944, -1944, 648, 648, -1368, -1368, 648, 648, 450, 450, 470, 470, 450, 450, 470, 470, 648, 648, 4050, 4050, 648, 648, 4482, 4482, 4482, 4482, -1652, -1652, 364, 364, 238, 238, 364, 364, 2254, 2254, -1652, -1652, 364, 364, 478, 478, 478, 478, 364, 364, 2254, 2254, 364, 364, 2494, 2494, 2494, 2494, -6842, -11162, -2522, -11162, -6842, 1222, 1942, -794, 1222, -10154, -5834, 1942, -4106, 1942, -416, -956, 124, -956, -416, 1222, 1942, 7648, 12148, -1550, 466, 340, 466, 2356, -10154, -5834, 1942, -4106, 1942, 52, 592, 1942, 12148, -4862, 1186, 808, 1186, 6856, -6842, -11162, -2522, -11162, -6842, 1222, 1942, -794, 1222, -10154, -5834, 1942, -4106, 1942, 400, 340, 460, 340, 400, 400, 340, 460, 340, 400, 1222, 1942, 7648, 12148, 1222, 1942, 8464, 13444, 8464, 13444, -1646, 370, 244, 370, 2260, -1646, 370, 484, 484, 370, 2260, 370, 2500, 2500, -10154, -5834, 1942, -4106, 1942, 52, 592, 1942, 12148, -4862, 1186, 808, 1186, 6856, -10154, -5834, 1942, -4106, 1942, 1348, 1408, 1348, 1408, 1942, 12148, 1942, 13444, 13444, -4958, 1090, 712, 1090, 6760, -4958, 1090, 1432, 1432, 1090, 6760, 1090, 7480, 7480, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 1080, 648, 1080, 1800, -1368, -936, 648, 1080, -3384, -1944, 648, -1368, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, 18, -306, 18, -306, -846, 198, 144, 18, 198, -396, -936, 144, -936, -396, 648, 1080, 648, 1080, 1800, 4050, 6750, 4050, 6750, 11250, -1620, -1566, 396, 450, 270, 324, 396, 450, 2286, 2340, -3384, -1944, 648, -1368, 648, 18, 198, 648, 4050, -1620, 396, 270, 396, 2286, -6858, -11178, -2538, -11178, -6858, 1206, 1926, -810, 1206, -10170, -5850, 1926, -4122, 1926, -432, -972, 108, -972, -432, 1206, 1926, 7632, 12132, -1566, 450, 324, 450, 2340, -10170, -5850, 1926, -4122, 1926, 36, 576, 1926, 12132, -4878, 1170, 792, 1170, 6840, -3384, -5976, -3384, -5976, -10296, -1944, -2376, -3384, -1944, -6696, -11016, -2376, -11016, -6696, 648, 1080, 648, 1080, 1800, -1368, -936, 648, 1080, -3384, -1944, 648, -1368, 648, -6984, -11304, -2664, -11304, -6984, 1080, 1800, -936, 1080, -10296, -5976, 1800, -4248, 1800, 450, 414, 450, 414, 354, 470, 464, 450, 470, 404, 344, 464, 344, 404, 450, 414, 450, 414, 354, 470, 464, 450, 470, 404, 344, 464, 344, 404, 648, 1080, 648, 1080, 1800, 4050, 6750, 4050, 6750, 11250, 648, 1080, 648, 1080, 1800, 4482, 7470, 4482, 7470, 12450, 4482, 7470, 4482, 7470, 12450, -1652, -1646, 364, 370, 238, 244, 364, 370, 2254, 2260, -1652, -1646, 364, 370, 478, 484, 478, 484, 364, 370, 2254, 2260, 364, 370, 2494, 2500, 2494, 2500, -3384, -1944, 648, -1368, 648, 18, 198, 648, 4050, -1620, 396, 270, 396, 2286, -3384, -1944, 648, -1368, 648, 450, 470, 450, 470, 648, 4050, 648, 4482, 4482, -1652, 364, 238, 364, 2254, -1652, 364, 478, 478, 364, 2254, 364, 2494, 2494, -6842, -11162, -2522, -11162, -6842, 1222, 1942, -794, 1222, -10154, -5834, 1942, -4106, 1942, -416, -956, 124, -956, -416, 1222, 1942, 7648, 12148, -1550, 466, 340, 466, 2356, -10154, -5834, 1942, -4106, 1942, 52, 592, 1942, 12148, -4862, 1186, 808, 1186, 6856, -6842, -11162, -2522, -11162, -6842, 1222, 1942, -794, 1222, -10154, -5834, 1942, -4106, 1942, 400, 340, 460, 340, 400, 400, 340, 460, 340, 400, 1222, 1942, 7648, 12148, 1222, 1942, 8464, 13444, 8464, 13444, -1646, 370, 244, 370, 2260, -1646, 370, 484, 484, 370, 2260, 370, 2500, 2500, -10154, -5834, 1942, -4106, 1942, 52, 592, 1942, 12148, -4862, 1186, 808, 1186, 6856, -10154, -5834, 1942, -4106, 1942, 1348, 1408, 1348, 1408, 1942, 12148, 1942, 13444, 13444, -4958, 1090, 712, 1090, 6760, -4958, 1090, 1432, 1432, 1090, 6760, 1090, 7480, 7480])\n assert answers_match(candidate(expression='1*2*3*4*5-6*7+8'), [-2040, -1080, -360, -696, 24, -420, -180, -360, 1260, -840, -120, -84, -120, 636, -2040, -1080, -360, -696, 24, -60, 20, -60, 20, -360, 1260, -360, 1620, 1620, -872, -152, -116, -152, 604, -872, -152, 52, 52, -152, 604, -152, 772, 772, -2040, -1080, -360, -696, 24, -420, -180, -360, 1260, -840, -120, -84, -120, 636, -2040, -1080, -360, -696, 24, -2040, -1080, -360, -696, 24, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, -360, 1260, -360, 1620, 1620, -360, 1260, -360, -360, 1710, 1710, 1710, 1710, 1710, -880, -160, -124, -160, 596, -880, -160, 44, 44, -160, 596, -160, 764, 764, -880, -160, -124, -160, 596, -880, -160, -880, -160, 86, 86, 86, 86, 86, -160, 596, -160, 764, 764, -160, 596, -160, -160, 806, 806, 806, 806, 806, -2040, -1080, -360, -696, 24, -420, -180, -360, 1260, -840, -120, -84, -120, 636, -2040, -1080, -360, -696, 24, -60, 20, -60, 20, -360, 1260, -360, 1620, 1620, -872, -152, -116, -152, 604, -872, -152, 52, 52, -152, 604, -152, 772, 772, -2040, -1080, -360, -696, 24, -420, -180, -360, 1260, -840, -120, -84, -120, 636, -2040, -1080, -360, -696, 24, -420, -180, -360, 1260, -840, -120, -84, -120, 636, -2040, -1080, -360, -696, 24, -2040, -1080, -360, -696, 24, -2040, -1080, -360, -696, 24, -2040, -1080, -360, -696, 24, -2040, -1080, -360, -696, 24, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, 30, 70, -360, 1260, -360, 1620, 1620, -360, 1260, -360, -360, 1710, 1710, 1710, 1710, 1710, -360, 1260, -360, 1620, 1620, -360, 1260, -360, 1260, -360, -360, -360, -360, -360, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, 1710, -880, -160, -124, -160, 596, -880, -160, 44, 44, -160, 596, -160, 764, 764, -880, -160, -124, -160, 596, -880, -160, -880, -160, 86, 86, 86, 86, 86, -160, 596, -160, 764, 764, -160, 596, -160, -160, 806, 806, 806, 806, 806, -880, -160, -124, -160, 596, -880, -160, 44, 44, -160, 596, -160, 764, 764, -880, -160, -124, -160, 596, -880, -160, -124, -160, 596, -880, -160, -880, -160, -880, -160, -880, -160, -880, -160, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -160, 596, -160, 764, 764, -160, 596, -160, -160, 806, 806, 806, 806, 806, -160, 596, -160, 764, 764, -160, 596, -160, 596, -160, -160, -160, -160, -160, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806, 806])\n assert answers_match(candidate(expression='3+3*3-3*3+3*3-3*3'), [147, -15, -15, -15, -177, 336, 12, -15, -69, -69, -231, 12, -231, -393, 39, -15, -15, -15, -69, 336, 12, 228, 12, -69, -123, -15, -123, -69, -69, -231, 12, -231, -393, -69, -123, 12, 12, -285, -447, -123, -447, -285, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -69, -15, -15, -15, 39, -51, 3, 3, 3, 57, 273, 3, 165, 3, 3, 3, 57, 3, -51, 3, -123, -177, -69, -177, -123, -24, -24, -15, 3, -159, -105, -24, -51, 3, -51, -213, 30, -213, -375, -51, -105, 30, 30, -267, -429, -105, -429, -267, 3, 3, 3, 3, 3, -51, 3, 3, 57, 3, 3, 3, 3, 3, -321, -483, -159, -483, -321, -24, -24, 3, 57, -429, -267, -24, -105, 57, 57, 3, 3, 3, -51, 120, 12, 3, -15, -15, -69, 12, -69, -123, 21, 3, 3, 3, -15, 120, 12, 84, 12, -15, -33, 3, -33, -15, -15, -69, 12, -69, -123, -15, -33, 12, 12, -87, -141, -33, -141, -87, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -87, 21, 21, 21, 129, -213, 3, 21, 57, 57, 165, 3, 165, 273, -33, -15, -15, -15, 3, -15, 3, 3, 3, 21, -15, 3, 3, 3, 21, -15, 3, 3, 3, 21, 3, 21, 21, 21, 39, 273, 3, 165, 3, 3, 3, 57, 3, -51, 3, 57, 3, 21, 3, 3, 3, -213, 3, 93, 3, -15, 3, -15, 3, -15, 3, -123, 3, -105, -159, -51, -159, -105, -6, -6, 3, 21, -141, -87, -6, -33, 21, -33, -51, -15, -51, -33, -6, -6, 66, 102, -15, 3, 3, 3, 21, -141, -87, -6, -33, 21, -33, -15, -6, 102, -51, 3, 3, 3, 57, -51, -213, 30, -213, -375, -51, -105, 30, 30, -267, -429, -105, -429, -267, 3, 3, 3, 3, 3, -51, 3, 3, 57, 3, 3, 3, 3, 3, -321, -483, -159, -483, -321, -24, -24, 3, 57, -429, -267, -24, -105, 57, 3, -51, 30, -51, -105, 3, -15, 30, 30, -69, -123, -15, -123, -69, 3, 3, 3, 3, 3, 57, 165, 3, 165, 273, -51, -33, 3, 21, 3, 21, 3, 21, 57, 75, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -303, -465, -141, -465, -303, -6, -6, 21, 75, -411, -249, -6, -87, 75, -87, -141, -33, -141, -87, -6, -6, 210, 318, -33, 21, 21, 21, 75, -411, -249, -6, -87, 75, -87, -33, -6, 318, -141, 21, 21, 21, 183, 288, -36, -36, -36, -360, 666, 18, -36, -144, -144, -468, 18, -468, -792, 72, -36, -36, -36, -144, 666, 18, 450, 18, -144, -252, -36, -252, -144, -144, -468, 18, -468, -792, -144, -252, 18, 18, -576, -900, -252, -900, -576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -144, -36, -36, -36, 72, -108, 0, 0, 0, 108, 540, 0, 324, 0, 0, 0, 108, 0, -108, 0, -252, -360, -144, -360, -252, -54, -54, -36, 0, -324, -216, -54, -108, 0, -108, -432, 54, -432, -756, -108, -216, 54, 54, -540, -864, -216, -864, -540, 0, 0, 0, 0, 0, -108, 0, 0, 108, 0, 0, 0, 0, 0, -648, -972, -324, -972, -648, -54, -54, 0, 108, -864, -540, -54, -216, 108, 57, 3, 3, 3, -51, 120, 12, 3, -15, -15, -69, 12, -69, -123, 21, 3, 3, 3, -15, 120, 12, 84, 12, -15, -33, 3, -33, -15, -15, -69, 12, -69, -123, -15, -33, 12, 12, -87, -141, -33, -141, -87, 63, 9, 9, 9, -45, 126, 18, 9, -9, -9, -63, 18, -63, -117, 27, 9, 9, 9, -9, 126, 18, 90, 18, -9, -27, 9, -27, -9, -9, -63, 18, -63, -117, -9, -27, 18, 18, -81, -135, -27, -135, -81, -45, 9, 9, 9, 63, -108, 0, 9, 27, 27, 81, 0, 81, 135, -135, 27, 27, 27, 189, -324, 0, 27, 81, 81, 243, 0, 243, 405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -135, 27, 27, 27, 189, -324, 0, 27, 81, 81, 243, 0, 243, 405, -225, 45, 45, 45, 315, -540, 0, 45, 135, 135, 405, 0, 405, 675, -33, -15, -15, -15, 3, -15, 3, 3, 3, 21, -15, 3, 3, 3, 21, -15, 3, 3, 3, 21, 3, 21, 21, 21, 39, -54, -36, -36, -36, -18, -18, 0, 0, 0, 18, -15, 3, 3, 3, 21, -9, 9, 9, 9, 27, -9, 9, 9, 9, 27, 9, 27, 27, 27, 45, -18, 0, 0, 0, 18, 9, 27, 27, 27, 45, 27, 45, 45, 45, 63, 252, 0, 144, 0, -18, 0, 36, 0, -72, 0, 36, 0, 0, 0, -18, 0, -234, 0, 72, 0, -36, 0, -36, 0, -36, 0, -144, 0, 540, 0, 324, 0, 0, 0, 108, 0, -108, 0, 36, 0, 0, 0, 0, 0, -36, 0, -108, 0, -324, 0, 0, 0, -324, 0, -540, 0, 72, 0, -36, 0, -36, 0, -36, 0, -144, 0, 198, 0, -18, 0, -36, 0, -72, 0, -72, 0, -180, 0, -18, 0, -180, 0, -288, 0, -105, -159, -51, -159, -105, -6, -6, 3, 21, -141, -87, -6, -33, 21, -33, -51, -15, -51, -33, -6, -6, 66, 102, -15, 3, 3, 3, 21, -141, -87, -6, -33, 21, -33, -15, -6, 102, -51, 3, 3, 3, 57, -207, -315, -99, -315, -207, -9, -9, 9, 45, -279, -171, -9, -63, 45, -33, -51, -15, -51, -33, -27, -45, -9, -45, -27, 27, 45, 99, 153, -9, -9, 99, 153, 171, 261, -15, 3, 3, 3, 21, -36, 0, 3, 9, 9, 27, 0, 27, 45, -135, -81, 0, -27, 27, -27, -9, 0, 108, -45, 9, 9, 9, 63, -279, -171, -9, -63, 45, -27, -9, -9, 9, 45, 153, -9, 153, 261, -45, 9, 9, 9, 63, -108, 0, 9, 27, 27, 81, 0, 81, 135, -45, -207, 36, -207, -369, -45, -99, 36, 36, -261, -423, -99, -423, -261, 9, 9, 9, 9, 9, -45, 9, 9, 63, 9, 9, 9, 9, 9, -315, -477, -153, -477, -315, -18, -18, 9, 63, -423, -261, -18, -99, 63, 9, -45, 36, -45, -99, 9, -9, 36, 36, -63, -117, -9, -117, -63, 9, 9, 9, 9, 9, 63, 171, 9, 171, 279, -45, -27, 9, 27, 9, 27, 9, 27, 63, 81, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, -297, -459, -135, -459, -297, 0, 0, 27, 81, -405, -243, 0, -81, 81, -81, -135, -27, -135, -81, 0, 0, 216, 324, -27, 27, 27, 27, 81, -405, -243, 0, -81, 81, -81, -27, 0, 324, -135, 27, 27, 27, 189, -108, -432, 54, -432, -756, -108, -216, 54, 54, -540, -864, -216, -864, -540, 0, 0, 0, 0, 0, -108, 0, 0, 108, 0, 0, 0, 0, 0, -648, -972, -324, -972, -648, -54, -54, 0, 108, -864, -540, -54, -216, 108, 9, -45, 36, -45, -99, 9, -9, 36, 36, -63, -117, -9, -117, -63, 27, -27, 54, -27, -81, 27, 9, 54, 54, -45, -99, 9, -99, -45, 27, 81, 0, 81, 135, 81, 243, 0, 243, 405, 0, 0, 0, 0, 0, 81, 243, 0, 243, 405, 135, 405, 0, 405, 675, -45, -27, 9, 27, 9, 27, 9, 27, 63, 81, -108, -90, 0, 18, 9, 27, 27, 45, 27, 45, 81, 99, 0, 18, 81, 99, 135, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -297, -459, -135, -459, -297, 0, 0, 27, 81, -405, -243, 0, -81, 81, -81, -135, -27, -135, -81, 0, 0, 216, 324, -27, 27, 27, 27, 81, -405, -243, 0, -81, 81, -81, -27, 0, 324, -135, 27, 27, 27, 189, -603, -927, -279, -927, -603, -9, -9, 45, 153, -819, -495, -9, -171, 153, -81, -135, -27, -135, -81, -63, -117, -9, -117, -63, 99, 153, 315, 477, -9, -9, 315, 477, 531, 801, -27, 27, 27, 27, 81, -90, 18, 27, 45, 45, 99, 18, 99, 153, -387, -225, 18, -63, 99, -63, -9, 18, 342, -117, 45, 45, 45, 207, -819, -495, -9, -171, 153, -63, -9, -9, 45, 153, 477, -9, 477, 801, -117, 45, 45, 45, 207, -306, 18, 45, 99, 99, 261, 18, 261, 423])\n assert answers_match(candidate(expression='1+2+3*4-5*6+7-8*9'), [900, 60, 900, -660, -660, 120, -48, 36, 120, -660, -660, -768, -1524, -768, 180, 12, 180, -132, -132, -270, -102, -210, -42, -396, -312, -252, -270, -210, -564, -564, -672, -1428, -672, -132, -132, -726, -186, -1860, -1104, -564, -726, -186, 310, 30, 310, -210, -210, 50, -6, 22, 50, -210, -210, -246, -498, -246, 180, 12, 180, -132, -132, -410, -18, -410, 318, 318, -140, -84, -80, -24, -80, -24, -80, -24, -20, 36, -252, -168, -108, -126, -66, -122, -94, -108, 22, -140, -80, -80, -80, -20, -564, -564, -672, -1428, -672, -132, -132, -726, -186, -1860, -1104, -564, -726, -186, -114, -114, -150, -402, -150, -132, -132, 318, 318, -708, -168, -168, -168, 372, -1716, -960, -420, -582, -42, -546, -294, -420, 750, -708, -168, -168, -168, 372, 1496, 96, 1496, -1104, -1104, 196, -84, 56, 196, -1104, -1104, -1284, -2544, -1284, 296, 16, 296, -224, -224, -454, -174, -354, -74, -664, -524, -424, -454, -354, -944, -944, -1124, -2384, -1124, -224, -224, -1214, -314, -3104, -1844, -944, -1214, -314, 310, 30, 310, -210, -210, 50, -6, 22, 50, -210, -210, -246, -498, -246, 316, 36, 316, -204, -204, 56, 0, 28, 56, -204, -204, -240, -492, -240, 60, 4, 60, -44, -44, -530, -26, -530, 406, 406, 296, 16, 296, -224, -224, -530, -26, -530, 406, 406, -884, -44, -884, 676, 676, -140, -84, -80, -24, -80, -24, -80, -24, -20, 36, -194, -138, -94, -38, -80, -24, -74, -18, -70, -14, -10, 46, -94, -38, -10, 46, 26, 82, -252, -168, -108, -126, -66, -122, -94, -108, 22, -140, -80, -80, -80, -20, -376, -236, -136, -166, -66, -122, -94, -116, -88, -84, 46, -136, 46, 124, -140, -80, -80, -80, -20, -194, -94, -80, -74, -70, -10, -94, -10, 26, -548, -548, -656, -1412, -656, -116, -116, -710, -170, -1844, -1088, -548, -710, -170, -98, -98, -134, -386, -134, -116, -116, 334, 334, -692, -152, -152, -152, 388, -1700, -944, -404, -566, -26, -530, -278, -404, 766, -692, -152, -152, -152, 388, -944, -944, -1124, -2384, -1124, -224, -224, -1214, -314, -3104, -1844, -944, -1214, -314, -98, -98, -134, -386, -134, -44, -44, -80, -332, -80, -44, -44, 406, 406, -224, -224, 406, 406, 676, 676, -692, -152, -152, -152, 388, -1178, -278, -152, -98, -62, 478, -278, 478, 802, -1700, -944, -404, -566, -26, -530, -278, -404, 766, -692, -152, -152, -152, 388, -2816, -1556, -656, -926, -26, -530, -278, -476, -224, -188, 982, -656, 982, 1684, -692, -152, -152, -152, 388, -1178, -278, -152, -98, -62, 478, -278, 478, 802, 900, 60, 900, -660, -660, 120, -48, 36, 120, -660, -660, -768, -1524, -768, 180, 12, 180, -132, -132, -270, -102, -210, -42, -396, -312, -252, -270, -210, -564, -564, -672, -1428, -672, -132, -132, -726, -186, -1860, -1104, -564, -726, -186, 310, 30, 310, -210, -210, 50, -6, 22, 50, -210, -210, -246, -498, -246, 180, 12, 180, -132, -132, -410, -18, -410, 318, 318, -140, -84, -80, -24, -80, -24, -80, -24, -20, 36, -252, -168, -108, -126, -66, -122, -94, -108, 22, -140, -80, -80, -80, -20, -564, -564, -672, -1428, -672, -132, -132, -726, -186, -1860, -1104, -564, -726, -186, -114, -114, -150, -402, -150, -132, -132, 318, 318, -708, -168, -168, -168, 372, -1716, -960, -420, -582, -42, -546, -294, -420, 750, -708, -168, -168, -168, 372, 1794, 114, 1794, -1326, -1326, 234, -102, 66, 234, -1326, -1326, -1542, -3054, -1542, 354, 18, 354, -270, -270, -546, -210, -426, -90, -798, -630, -510, -546, -426, -1134, -1134, -1350, -2862, -1350, -270, -270, -1458, -378, -3726, -2214, -1134, -1458, -378, 1794, 114, 1794, -1326, -1326, 234, -102, 66, 234, -1326, -1326, -1542, -3054, -1542, 354, 18, 354, -270, -270, -546, -210, -426, -90, -798, -630, -510, -546, -426, -1134, -1134, -1350, -2862, -1350, -270, -270, -1458, -378, -3726, -2214, -1134, -1458, -378, 310, 30, 310, -210, -210, 50, -6, 22, 50, -210, -210, -246, -498, -246, 316, 36, 316, -204, -204, 56, 0, 28, 56, -204, -204, -240, -492, -240, 310, 30, 310, -210, -210, 50, -6, 22, 50, -210, -210, -246, -498, -246, 319, 39, 319, -201, -201, 59, 3, 31, 59, -201, -201, -237, -489, -237, 319, 39, 319, -201, -201, 59, 3, 31, 59, -201, -201, -237, -489, -237, 0, 0, 0, 0, 0, -590, -30, -590, 450, 450, 236, 12, 236, -180, -180, -590, -30, -590, 450, 450, -944, -48, -944, 720, 720, 0, 0, 0, 0, 0, -590, -30, -590, 450, 450, 354, 18, 354, -270, -270, 354, 18, 354, -270, -270, -590, -30, -590, 450, 450, -944, -48, -944, 720, 720, -590, -30, -590, 450, 450, -1121, -57, -1121, 855, 855, -1121, -57, -1121, 855, 855, -140, -84, -80, -24, -80, -24, -80, -24, -20, 36, -194, -138, -94, -38, -80, -24, -74, -18, -70, -14, -10, 46, -94, -38, -10, 46, 26, 82, -140, -84, -80, -24, -80, -24, -80, -24, -20, 36, -221, -165, -101, -45, -221, -165, -101, -45, -80, -24, -74, -18, -80, -24, -71, -15, -71, -15, -65, -9, -5, 51, -89, -33, -5, 51, 31, 87, -65, -9, -5, 51, -101, -45, -101, -45, -5, 51, 31, 87, -5, 51, 49, 105, 49, 105, -252, -168, -108, -126, -66, -122, -94, -108, 22, -140, -80, -80, -80, -20, -376, -236, -136, -166, -66, -122, -94, -116, -88, -84, 46, -136, 46, 124, -140, -80, -80, -80, -20, -194, -94, -80, -74, -70, -10, -94, -10, 26, -252, -168, -108, -126, -66, -122, -94, -108, 22, -140, -80, -80, -80, -20, -438, -270, -150, -186, -66, -438, -270, -150, -186, -66, -122, -94, -116, -88, -122, -94, -113, -85, -113, -85, -72, 58, -124, 58, 136, -72, 58, -150, -150, 58, 136, 58, 175, 175, -140, -80, -80, -80, -20, -194, -94, -80, -74, -70, -10, -94, -10, 26, -140, -80, -80, -80, -20, -221, -101, -221, -101, -80, -74, -80, -71, -71, -65, -5, -89, -5, 31, -65, -5, -101, -101, -5, 31, -5, 49, 49, -540, -540, -648, -1404, -648, -108, -108, -702, -162, -1836, -1080, -540, -702, -162, -90, -90, -126, -378, -126, -108, -108, 342, 342, -684, -144, -144, -144, 396, -1692, -936, -396, -558, -18, -522, -270, -396, 774, -684, -144, -144, -144, 396, -936, -936, -1116, -2376, -1116, -216, -216, -1206, -306, -3096, -1836, -936, -1206, -306, -90, -90, -126, -378, -126, -36, -36, -72, -324, -72, -36, -36, 414, 414, -216, -216, 414, 414, 684, 684, -684, -144, -144, -144, 396, -1170, -270, -144, -90, -54, 486, -270, 486, 810, -1692, -936, -396, -558, -18, -522, -270, -396, 774, -684, -144, -144, -144, 396, -2808, -1548, -648, -918, -18, -522, -270, -468, -216, -180, 990, -648, 990, 1692, -684, -144, -144, -144, 396, -1170, -270, -144, -90, -54, 486, -270, 486, 810, -540, -540, -648, -1404, -648, -108, -108, -702, -162, -1836, -1080, -540, -702, -162, -90, -90, -126, -378, -126, -108, -108, 342, 342, -684, -144, -144, -144, 396, -1692, -936, -396, -558, -18, -522, -270, -396, 774, -684, -144, -144, -144, 396, -1134, -1134, -1350, -2862, -1350, -270, -270, -1458, -378, -3726, -2214, -1134, -1458, -378, -1134, -1134, -1350, -2862, -1350, -270, -270, -1458, -378, -3726, -2214, -1134, -1458, -378, -90, -90, -126, -378, -126, -36, -36, -72, -324, -72, -90, -90, -126, -378, -126, -9, -9, -45, -297, -45, -9, -9, -45, -297, -45, 0, 0, 450, 450, -180, -180, 450, 450, 720, 720, 0, 0, 450, 450, -270, -270, -270, -270, 450, 450, 720, 720, 450, 450, 855, 855, 855, 855, -684, -144, -144, -144, 396, -1170, -270, -144, -90, -54, 486, -270, 486, 810, -684, -144, -144, -144, 396, -1413, -333, -1413, -333, -144, -90, -144, -63, -63, -9, 531, -225, 531, 855, -9, 531, -333, -333, 531, 855, 531, 1017, 1017, -1692, -936, -396, -558, -18, -522, -270, -396, 774, -684, -144, -144, -144, 396, -2808, -1548, -648, -918, -18, -522, -270, -468, -216, -180, 990, -648, 990, 1692, -684, -144, -144, -144, 396, -1170, -270, -144, -90, -54, 486, -270, 486, 810, -1692, -936, -396, -558, -18, -522, -270, -396, 774, -684, -144, -144, -144, 396, -3366, -1854, -774, -1098, -18, -3366, -1854, -774, -1098, -18, -522, -270, -468, -216, -522, -270, -441, -189, -441, -189, -72, 1098, -540, 1098, 1800, -72, 1098, -774, -774, 1098, 1800, 1098, 2151, 2151, -684, -144, -144, -144, 396, -1170, -270, -144, -90, -54, 486, -270, 486, 810, -684, -144, -144, -144, 396, -1413, -333, -1413, -333, -144, -90, -144, -63, -63, -9, 531, -225, 531, 855, -9, 531, -333, -333, 531, 855, 531, 1017, 1017])\n assert answers_match(candidate(expression='1*2*3*4*5'), [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120])\n assert answers_match(candidate(expression='6*7+8-9*10+11-12'), [-396, -396, -444, -972, -444, -12, -12, -456, -24, -1116, -588, -156, -456, -24, -396, -396, -444, -972, -444, 324, 324, 324, 324, -456, -24, -456, 354, 354, -1116, -588, -156, -456, -24, -1116, -588, 684, 684, -456, -24, -456, 354, 354, -31, -31, -39, -127, -39, 33, 33, -41, 31, -151, -63, 9, -41, 31, 9, 9, 1, -87, 1, -31, -31, -39, -127, -39, 324, 324, 324, 324, 369, 369, 729, 729, 369, 369, -451, -19, -451, 359, 359, -41, 31, -1, -41, 359, 359, 409, 809, 409, -1056, -528, -96, -396, 36, -1056, -528, 744, 744, -396, 36, -396, 414, 414, -151, -63, 9, -41, 31, -111, -23, -151, -63, 744, 744, 849, 1689, 849, -451, -19, -451, 359, 359, -41, 31, -1, -41, 359, 359, 409, 809, 409])\n assert answers_match(candidate(expression='8*3+4-2*9+5-1'), [-152, -152, -120, -160, -120, 232, 232, -56, 200, -176, -136, 240, -56, 200, -152, -152, -120, -160, -120, 520, 520, 520, 520, -56, 200, -56, 392, 392, -176, -136, 240, -56, 200, -176, -136, 552, 552, -56, 200, -56, 392, 392, 2, 2, 6, 1, 6, 50, 50, 14, 46, -1, 4, 51, 14, 46, 30, 30, 34, 29, 34, 2, 2, 6, 1, 6, 520, 520, 520, 520, 338, 338, 702, 702, 338, 338, -84, 172, -84, 364, 364, 14, 46, 42, 14, 364, 364, 238, 490, 238, -169, -129, 247, -49, 207, -169, -129, 559, 559, -49, 207, -49, 399, 399, -1, 4, 51, 14, 46, 27, 32, -1, 4, 559, 559, 363, 755, 363, -84, 172, -84, 364, 364, 14, 46, 42, 14, 364, 364, 238, 490, 238])\n assert answers_match(candidate(expression='2*2*2*2-1+1*1*1'), [0, 0, 0, 0, 0, 16, 16, 0, 16, 0, 0, 16, 0, 16, 8, 8, 8, 8, 8, 12, 12, 16, 16, 0, 16, 8, 12, 16, 0, 0, 16, 0, 16, 8, 8, 12, 16, 0, 16, 8, 12, 16, 0, 0, 0, 0, 0, 16, 16, 0, 16, 0, 0, 16, 0, 16, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 10, 10, 14, 14, 10, 10, 16, 16, 16, 16, 0, 16, 8, 12, 16, 0, 16, 12, 12, 10, 14, 10, 16, 16, 0, 0, 16, 0, 16, 8, 8, 12, 16, 0, 16, 8, 12, 16, 0, 0, 16, 0, 16, 12, 12, 12, 12, 10, 14, 10, 16, 16, 0, 16, 8, 12, 16, 0, 16, 12, 12, 10, 14, 10, 16, 16, 0, 0, 0, 0, 0, 16, 16, 0, 16, 0, 0, 16, 0, 16, 8, 8, 8, 8, 8, 12, 12, 16, 16, 0, 16, 8, 12, 16, 0, 0, 16, 0, 16, 8, 8, 12, 16, 0, 16, 8, 12, 16, 0, 0, 0, 0, 0, 16, 16, 0, 16, 0, 0, 16, 0, 16, 0, 0, 0, 0, 0, 16, 16, 0, 16, 0, 0, 16, 0, 16, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 9, 13, 13, 9, 9, 15, 15, 15, 15, 9, 9, 13, 13, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 16, 8, 12, 16, 0, 16, 12, 12, 10, 14, 10, 16, 16, 0, 16, 8, 12, 16, 0, 16, 0, 16, 14, 14, 14, 14, 14, 9, 13, 9, 15, 15, 9, 13, 9, 9, 16, 16, 16, 16, 16, 0, 0, 16, 0, 16, 8, 8, 12, 16, 0, 16, 8, 12, 16, 0, 0, 16, 0, 16, 12, 12, 12, 12, 10, 14, 10, 16, 16, 0, 16, 8, 12, 16, 0, 16, 12, 12, 10, 14, 10, 16, 16, 0, 0, 16, 0, 16, 8, 8, 12, 16, 0, 16, 8, 12, 16, 0, 0, 16, 0, 16, 0, 0, 16, 0, 16, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 9, 13, 9, 15, 15, 9, 13, 9, 9, 16, 16, 16, 16, 16, 0, 16, 8, 12, 16, 0, 16, 12, 12, 10, 14, 10, 16, 16, 0, 16, 8, 12, 16, 0, 16, 0, 16, 14, 14, 14, 14, 14, 9, 13, 9, 15, 15, 9, 13, 9, 9, 16, 16, 16, 16, 16])\n assert answers_match(candidate(expression='5*5*5-3*3*3+2*2*2'), [-2350, -2350, -4375, -3025, -4375, -1150, -1150, -4375, -3175, -3025, -4375, -1825, -4375, -3175, -2350, -2350, -4375, -3025, -4375, -750, -750, -750, -750, -4375, -3175, -4375, -2775, -2775, -3025, -4375, -1825, -4375, -3175, -3025, -4375, -1425, -1425, -4375, -3175, -4375, -2775, -2775, 1650, 1650, 3000, 2100, 3000, 850, 850, 3000, 2200, 2100, 3000, 1300, 3000, 2200, -1100, -1100, -2000, -1400, -2000, 1650, 1650, 3000, 2100, 3000, -350, -350, -350, -350, 650, 650, -100, -100, 650, 650, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -2900, -4250, -1700, -4250, -3050, -2900, -4250, -1300, -1300, -4250, -3050, -4250, -2650, -2650, 2100, 3000, 1300, 3000, 2200, -1400, -2000, 2100, 3000, -900, -900, 1100, -400, 1100, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -370, -370, -775, -505, -775, -130, -130, -775, -535, -505, -775, -265, -775, -535, -370, -370, -775, -505, -775, -50, -50, -50, -50, -775, -535, -775, -455, -455, -505, -775, -265, -775, -535, -505, -775, -185, -185, -775, -535, -775, -455, -455, 1650, 1650, 3000, 2100, 3000, 850, 850, 3000, 2200, 2100, 3000, 1300, 3000, 2200, 3630, 3630, 6600, 4620, 6600, 1870, 1870, 6600, 4840, 4620, 6600, 2860, 6600, 4840, -1100, -1100, -2000, -1400, -2000, 1650, 1650, 3000, 2100, 3000, 880, 880, 1600, 1120, 1600, 1650, 1650, 3000, 2100, 3000, 3630, 3630, 6600, 4620, 6600, -510, -510, -510, -510, 490, 490, -260, -260, 490, 490, 30, 30, 30, 30, 490, 490, 1030, 1030, -260, -260, 490, 490, 280, 280, 490, 490, 1030, 1030, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -400, -160, -400, -80, -80, 3000, 2200, 6600, 4840, -2000, 3000, 1600, 3000, 6600, -2160, -2160, 1840, -1160, 1840, 0, 0, 1840, 4000, -1160, 1840, 1000, 1840, 4000, -2900, -4250, -1700, -4250, -3050, -2900, -4250, -1300, -1300, -4250, -3050, -4250, -2650, -2650, 2100, 3000, 1300, 3000, 2200, -1400, -2000, 2100, 3000, -900, -900, 1100, -400, 1100, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -380, -650, -140, -650, -410, -380, -650, -60, -60, -650, -410, -650, -330, -330, 2100, 3000, 1300, 3000, 2200, 4620, 6600, 2860, 6600, 4840, -1400, -2000, 2100, 3000, 1120, 1600, 2100, 3000, 4620, 6600, -1060, -1060, 940, -560, 940, 20, 20, 940, 2020, -560, 940, 520, 940, 2020, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -400, -160, -400, -80, -80, 3000, 2200, 6600, 4840, -2000, 3000, 1600, 3000, 6600, -2160, -2160, 1840, -1160, 1840, 0, 0, 1840, 4000, -1160, 1840, 1000, 1840, 4000, -2350, -2350, -4375, -3025, -4375, -1150, -1150, -4375, -3175, -3025, -4375, -1825, -4375, -3175, -2350, -2350, -4375, -3025, -4375, -750, -750, -750, -750, -4375, -3175, -4375, -2775, -2775, -3025, -4375, -1825, -4375, -3175, -3025, -4375, -1425, -1425, -4375, -3175, -4375, -2775, -2775, 1650, 1650, 3000, 2100, 3000, 850, 850, 3000, 2200, 2100, 3000, 1300, 3000, 2200, -1100, -1100, -2000, -1400, -2000, 1650, 1650, 3000, 2100, 3000, -350, -350, -350, -350, 650, 650, -100, -100, 650, 650, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -2900, -4250, -1700, -4250, -3050, -2900, -4250, -1300, -1300, -4250, -3050, -4250, -2650, -2650, 2100, 3000, 1300, 3000, 2200, -1400, -2000, 2100, 3000, -900, -900, 1100, -400, 1100, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, 26, 26, -55, -1, -55, 74, 74, -55, -7, -1, -55, 47, -55, -7, 26, 26, -55, -1, -55, 90, 90, 90, 90, -55, -7, -55, 9, 9, -1, -55, 47, -55, -7, -1, -55, 63, 63, -55, -7, -55, 9, 9, 26, 26, -55, -1, -55, 74, 74, -55, -7, -1, -55, 47, -55, -7, 26, 26, -55, -1, -55, 90, 90, 90, 90, -55, -7, -55, 9, 9, -1, -55, 47, -55, -7, -1, -55, 63, 63, -55, -7, -55, 9, 9, 1650, 1650, 3000, 2100, 3000, 850, 850, 3000, 2200, 2100, 3000, 1300, 3000, 2200, 3630, 3630, 6600, 4620, 6600, 1870, 1870, 6600, 4840, 4620, 6600, 2860, 6600, 4840, 1650, 1650, 3000, 2100, 3000, 850, 850, 3000, 2200, 2100, 3000, 1300, 3000, 2200, 4026, 4026, 7320, 5124, 7320, 2074, 2074, 7320, 5368, 5124, 7320, 3172, 7320, 5368, 4026, 4026, 7320, 5124, 7320, 2074, 2074, 7320, 5368, 5124, 7320, 3172, 7320, 5368, -1100, -1100, -2000, -1400, -2000, 1650, 1650, 3000, 2100, 3000, 880, 880, 1600, 1120, 1600, 1650, 1650, 3000, 2100, 3000, 3630, 3630, 6600, 4620, 6600, -1100, -1100, -2000, -1400, -2000, 1650, 1650, 3000, 2100, 3000, 1276, 1276, 2320, 1624, 2320, 1276, 1276, 2320, 1624, 2320, 1650, 1650, 3000, 2100, 3000, 3630, 3630, 6600, 4620, 6600, 1650, 1650, 3000, 2100, 3000, 4026, 4026, 7320, 5124, 7320, 4026, 4026, 7320, 5124, 7320, -542, -542, -542, -542, 458, 458, -292, -292, 458, 458, -2, -2, -2, -2, 458, 458, 998, 998, -292, -292, 458, 458, 248, 248, 458, 458, 998, 998, -542, -542, -542, -542, 458, 458, -292, -292, 458, 458, 106, 106, 106, 106, 106, 106, 106, 106, 458, 458, 998, 998, 458, 458, 1106, 1106, 1106, 1106, -292, -292, 458, 458, 248, 248, 458, 458, 998, 998, -292, -292, 458, 458, 356, 356, 356, 356, 458, 458, 998, 998, 458, 458, 1106, 1106, 1106, 1106, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -400, -160, -400, -80, -80, 3000, 2200, 6600, 4840, -2000, 3000, 1600, 3000, 6600, -2160, -2160, 1840, -1160, 1840, 0, 0, 1840, 4000, -1160, 1840, 1000, 1840, 4000, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, 320, 368, 320, 384, 384, 320, 368, 320, 384, 384, 3000, 2200, 6600, 4840, 3000, 2200, 7320, 5368, 7320, 5368, -2000, 3000, 1600, 3000, 6600, -2000, 3000, 2320, 2320, 3000, 6600, 3000, 7320, 7320, -2192, -2192, 1808, -1192, 1808, -32, -32, 1808, 3968, -1192, 1808, 968, 1808, 3968, -2192, -2192, 1808, -1192, 1808, 400, 400, 400, 400, 1808, 3968, 1808, 4400, 4400, -1192, 1808, 968, 1808, 3968, -1192, 1808, 1400, 1400, 1808, 3968, 1808, 4400, 4400, -2900, -4250, -1700, -4250, -3050, -2900, -4250, -1300, -1300, -4250, -3050, -4250, -2650, -2650, 2100, 3000, 1300, 3000, 2200, -1400, -2000, 2100, 3000, -900, -900, 1100, -400, 1100, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -380, -650, -140, -650, -410, -380, -650, -60, -60, -650, -410, -650, -330, -330, 2100, 3000, 1300, 3000, 2200, 4620, 6600, 2860, 6600, 4840, -1400, -2000, 2100, 3000, 1120, 1600, 2100, 3000, 4620, 6600, -1060, -1060, 940, -560, 940, 20, 20, 940, 2020, -560, 940, 520, 940, 2020, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -400, -160, -400, -80, -80, 3000, 2200, 6600, 4840, -2000, 3000, 1600, 3000, 6600, -2160, -2160, 1840, -1160, 1840, 0, 0, 1840, 4000, -1160, 1840, 1000, 1840, 4000, -2900, -4250, -1700, -4250, -3050, -2900, -4250, -1300, -1300, -4250, -3050, -4250, -2650, -2650, 2100, 3000, 1300, 3000, 2200, -1400, -2000, 2100, 3000, -900, -900, 1100, -400, 1100, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, 124, 70, 172, 70, 118, 124, 70, 188, 188, 70, 118, 70, 134, 134, 124, 70, 172, 70, 118, 124, 70, 188, 188, 70, 118, 70, 134, 134, 2100, 3000, 1300, 3000, 2200, 4620, 6600, 2860, 6600, 4840, 2100, 3000, 1300, 3000, 2200, 5124, 7320, 3172, 7320, 5368, 5124, 7320, 3172, 7320, 5368, -1400, -2000, 2100, 3000, 1120, 1600, 2100, 3000, 4620, 6600, -1400, -2000, 2100, 3000, 1624, 2320, 1624, 2320, 2100, 3000, 4620, 6600, 2100, 3000, 5124, 7320, 5124, 7320, -1092, -1092, 908, -592, 908, -12, -12, 908, 1988, -592, 908, 488, 908, 1988, -1092, -1092, 908, -592, 908, 204, 204, 204, 204, 908, 1988, 908, 2204, 2204, -592, 908, 488, 908, 1988, -592, 908, 704, 704, 908, 1988, 908, 2204, 2204, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, -400, -160, -400, -80, -80, 3000, 2200, 6600, 4840, -2000, 3000, 1600, 3000, 6600, -2160, -2160, 1840, -1160, 1840, 0, 0, 1840, 4000, -1160, 1840, 1000, 1840, 4000, -4000, -2800, -4000, -2400, -2400, 3000, 2200, -2000, 3000, -2000, -2000, 2000, -1000, 2000, 320, 368, 320, 384, 384, 320, 368, 320, 384, 384, 3000, 2200, 6600, 4840, 3000, 2200, 7320, 5368, 7320, 5368, -2000, 3000, 1600, 3000, 6600, -2000, 3000, 2320, 2320, 3000, 6600, 3000, 7320, 7320, -2192, -2192, 1808, -1192, 1808, -32, -32, 1808, 3968, -1192, 1808, 968, 1808, 3968, -2192, -2192, 1808, -1192, 1808, 400, 400, 400, 400, 1808, 3968, 1808, 4400, 4400, -1192, 1808, 968, 1808, 3968, -1192, 1808, 1400, 1400, 1808, 3968, 1808, 4400, 4400])\n assert answers_match(candidate(expression='5*3+10-2*8+4'), [-55, -35, 495, 5, 355, -55, -35, 660, 660, 5, 355, 5, 460, 460, 1, 5, 111, 13, 83, 41, 45, 1, 5, 660, 660, 276, 756, 276, -11, 339, -11, 444, 444, 13, 83, 53, 13, 444, 444, 188, 508, 188])\n assert answers_match(candidate(expression='9*8-7*6+5*4-3*2+1'), [1269, 639, -1251, 9, -1251, -999, -1125, -1251, -3519, 261, -999, -1251, -999, -2511, 3537, 2151, -2007, 765, -2007, -999, -1125, -2133, -2259, -2007, -4275, -2007, -4275, -7677, 261, -999, -1251, -999, -2511, 1395, -1377, -1251, -2385, -1377, -2889, -1377, -2889, -5157, -81, -171, -441, -261, -441, -405, -423, -441, -765, -225, -405, -441, -405, -621, 3537, 2151, -2007, 765, -2007, 2187, 1341, -1197, 495, -1197, -1485, -1503, -2619, -2637, -405, -423, -2619, -2637, -1539, -1557, -2007, -4275, -2007, -4275, -7677, -1197, -1521, -2007, -1197, -4761, -8163, -1521, -8163, -4923, 315, -945, -1197, -945, -2457, 1449, -1323, -1197, -2331, -1323, -2835, -1323, -2835, -5103, -225, -405, -441, -405, -621, 1449, -1323, 909, -783, -1521, -2655, -441, -2655, -1575, -1323, -2835, -1323, -2835, -5103, -783, -999, -1323, -783, -3159, -5427, -999, -5427, -3267, -171, -81, 189, 9, 189, 153, 171, 189, 513, -27, 153, 189, 153, 369, -495, -297, 297, -99, 297, 153, 171, 315, 333, 297, 621, 297, 621, 1107, -27, 153, 189, 153, 369, -189, 207, 189, 351, 207, 423, 207, 423, 747, -531, -441, -171, -351, -171, -207, -189, -171, 153, -387, -207, -171, -207, 9, -171, -81, 189, 9, 189, 153, 171, 189, 513, -27, 153, 189, 153, 369, 3105, 1863, -1863, 621, -1863, 1755, 1053, -1053, 351, -1053, -495, -297, 297, -99, 297, 1305, 783, -783, 261, -783, -495, -297, 297, -99, 297, -1647, -1629, -2781, -2763, -567, -549, -2781, -2763, -1701, -1683, 153, 171, 315, 333, -207, -189, 153, 171, -2565, -2547, -1485, -1467, 315, 333, -1125, -1107, 315, 333, -1863, -4131, -1863, -4131, -7533, -1053, -1377, -1863, -1053, -4617, -8019, -1377, -8019, -4779, 297, 621, 297, 621, 1107, -783, -459, 297, 621, -1863, -1053, 297, -783, 297, -4779, -8181, -1539, -8181, -4941, 621, 1107, -459, 621, -7533, -4293, 1107, -3213, 1107, 333, -927, -1179, -927, -2439, 1467, -1305, -1179, -2313, -1305, -2817, -1305, -2817, -5085, -207, -387, -423, -387, -603, 1467, -1305, 927, -765, -1503, -2637, -423, -2637, -1557, -1305, -2817, -1305, -2817, -5085, -765, -981, -1305, -765, -3141, -5409, -981, -5409, -3249, -27, 153, 189, 153, 369, -189, 207, 189, 351, 207, 423, 207, 423, 747, -387, -207, -171, -207, 9, -27, 153, 189, 153, 369, 1251, -1233, 711, -693, -189, 207, 531, -513, -189, 207, -1611, -2745, -531, -2745, -1665, 189, 351, -171, 189, -2529, -1449, 351, -1089, 351, -1233, -2745, -1233, -2745, -5013, -693, -909, -1233, -693, -3069, -5337, -909, -5337, -3177, 207, 423, 207, 423, 747, -513, -297, 207, 423, -1233, -693, 207, -513, 207, -3177, -5445, -1017, -5445, -3285, 423, 747, -297, 423, -5013, -2853, 747, -2133, 747, 205, 135, -75, 65, -75, -47, -61, -75, -327, 93, -47, -75, -47, -215, 457, 303, -159, 149, -159, -47, -61, -173, -187, -159, -411, -159, -411, -789, 93, -47, -75, -47, -215, 219, -89, -75, -201, -89, -257, -89, -257, -509, 55, 45, 15, 35, 15, 19, 17, 15, -21, 39, 19, 15, 19, -5, 457, 303, -159, 149, -159, 307, 213, -69, 119, -69, -101, -103, -227, -229, 19, 17, -227, -229, -107, -109, -159, -411, -159, -411, -789, -69, -105, -159, -69, -465, -843, -105, -843, -483, 99, -41, -69, -41, -209, 225, -83, -69, -195, -83, -251, -83, -251, -503, 39, 19, 15, 19, -5, 225, -83, 165, -23, -105, -231, 15, -231, -111, -83, -251, -83, -251, -503, -23, -47, -83, -23, -287, -539, -47, -539, -299, -171, -81, 189, 9, 189, 153, 171, 189, 513, -27, 153, 189, 153, 369, -495, -297, 297, -99, 297, 153, 171, 315, 333, 297, 621, 297, 621, 1107, -27, 153, 189, 153, 369, -189, 207, 189, 351, 207, 423, 207, 423, 747, -1235, -585, 1365, 65, 1365, 1105, 1235, 1365, 3705, -195, 1105, 1365, 1105, 2665, -3575, -2145, 2145, -715, 2145, 1105, 1235, 2275, 2405, 2145, 4485, 2145, 4485, 7995, -195, 1105, 1365, 1105, 2665, -1365, 1495, 1365, 2535, 1495, 3055, 1495, 3055, 5395, -331, -321, -291, -311, -291, -295, -293, -291, -255, -315, -295, -291, -295, -271, 29, 39, 69, 49, 69, 65, 67, 69, 105, 45, 65, 69, 65, 89, 5, 15, 45, 25, 45, 41, 43, 45, 81, 21, 41, 45, 41, 65, 29, 39, 69, 49, 69, 65, 67, 69, 105, 45, 65, 69, 65, 89, 365, 375, 405, 385, 405, 401, 403, 405, 441, 381, 401, 405, 401, 425, 3105, 1863, -1863, 621, -1863, 1755, 1053, -1053, 351, -1053, -495, -297, 297, -99, 297, 1305, 783, -783, 261, -783, -495, -297, 297, -99, 297, 25, 15, -15, 5, -15, -125, -75, 75, -25, 75, -495, -297, 297, -99, 297, -3575, -2145, 2145, -715, 2145, 1505, 903, -903, 301, -903, -295, -177, 177, -59, 177, -175, -105, 105, -35, 105, -295, -177, 177, -59, 177, -1975, -1185, 1185, -395, 1185, -1575, -1573, -2709, -2707, -495, -493, -2709, -2707, -1629, -1627, 225, 227, 387, 389, -135, -133, 225, 227, -2493, -2491, -1413, -1411, 387, 389, -1053, -1051, 387, 389, -119, -117, -245, -243, 1, 3, -245, -243, -125, -123, 225, 227, 387, 389, 1681, 1683, 2851, 2853, -295, -293, 65, 67, 41, 43, 65, 67, 401, 403, -2493, -2491, -1413, -1411, 387, 389, -1053, -1051, 387, 389, -29, -27, 91, 93, 387, 389, 2851, 2853, -1213, -1211, 227, 229, 131, 133, 227, 229, 1571, 1573, -1863, -4131, -1863, -4131, -7533, -1053, -1377, -1863, -1053, -4617, -8019, -1377, -8019, -4779, 297, 621, 297, 621, 1107, -783, -459, 297, 621, -1863, -1053, 297, -783, 297, -4779, -8181, -1539, -8181, -4941, 621, 1107, -459, 621, -7533, -4293, 1107, -3213, 1107, -15, -267, -15, -267, -645, 75, 39, -15, 75, -321, -699, 39, -699, -339, 297, 621, 297, 621, 1107, 2145, 4485, 2145, 4485, 7995, -903, -867, 177, 213, 105, 141, 177, 213, 1185, 1221, -1863, -1053, 297, -783, 297, -15, 75, 297, 2145, -903, 177, 105, 177, 1185, -4707, -8109, -1467, -8109, -4869, 693, 1179, -387, 693, -7461, -4221, 1179, -3141, 1179, -339, -717, 21, -717, -357, 693, 1179, 5061, 8571, -867, 213, 141, 213, 1221, -7461, -4221, 1179, -3141, 1179, -69, 291, 1179, 8571, -3621, 699, 411, 699, 4731, 325, -935, -1187, -935, -2447, 1459, -1313, -1187, -2321, -1313, -2825, -1313, -2825, -5093, -215, -395, -431, -395, -611, 1459, -1313, 919, -773, -1511, -2645, -431, -2645, -1565, -1313, -2825, -1313, -2825, -5093, -773, -989, -1313, -773, -3149, -5417, -989, -5417, -3257, -35, 145, 181, 145, 361, -197, 199, 181, 343, 199, 415, 199, 415, 739, -395, -215, -179, -215, 1, -35, 145, 181, 145, 361, 1243, -1241, 703, -701, -197, 199, 523, -521, -197, 199, -1619, -2753, -539, -2753, -1673, 181, 343, -179, 181, -2537, -1457, 343, -1097, 343, -1241, -2753, -1241, -2753, -5021, -701, -917, -1241, -701, -3077, -5345, -917, -5345, -3185, 199, 415, 199, 415, 739, -521, -305, 199, 415, -1241, -701, 199, -521, 199, -3185, -5453, -1025, -5453, -3293, 415, 739, -305, 415, -5021, -2861, 739, -2141, 739, 101, -39, -67, -39, -207, 227, -81, -67, -193, -81, -249, -81, -249, -501, 41, 21, 17, 21, -3, 227, -81, 167, -21, -103, -229, 17, -229, -109, -81, -249, -81, -249, -501, -21, -45, -81, -21, -285, -537, -45, -537, -297, -35, 145, 181, 145, 361, -197, 199, 181, 343, 199, 415, 199, 415, 739, -259, 1041, 1301, 1041, 2601, -1429, 1431, 1301, 2471, 1431, 2991, 1431, 2991, 5331, -315, -295, -291, -295, -271, 45, 65, 69, 65, 89, 21, 41, 45, 41, 65, 45, 65, 69, 65, 89, 381, 401, 405, 401, 425, 1243, -1241, 703, -701, -197, 199, 523, -521, -197, 199, 11, -9, -49, 51, -197, 199, -1429, 1431, 603, -601, -117, 119, -69, 71, -117, 119, -789, 791, -1571, -2705, -491, -2705, -1625, 229, 391, -131, 229, -2489, -1409, 391, -1049, 391, -115, -241, 5, -241, -121, 229, 391, 1685, 2855, -291, 69, 45, 69, 405, -2489, -1409, 391, -1049, 391, -25, 95, 391, 2855, -1209, 231, 135, 231, 1575, -1241, -2753, -1241, -2753, -5021, -701, -917, -1241, -701, -3077, -5345, -917, -5345, -3185, 199, 415, 199, 415, 739, -521, -305, 199, 415, -1241, -701, 199, -521, 199, -3185, -5453, -1025, -5453, -3293, 415, 739, -305, 415, -5021, -2861, 739, -2141, 739, -9, -177, -9, -177, -429, 51, 27, -9, 51, -213, -465, 27, -465, -225, 199, 415, 199, 415, 739, 1431, 2991, 1431, 2991, 5331, -601, -577, 119, 143, 71, 95, 119, 143, 791, 815, -1241, -701, 199, -521, 199, -9, 51, 199, 1431, -601, 119, 71, 119, 791, -3137, -5405, -977, -5405, -3245, 463, 787, -257, 463, -4973, -2813, 787, -2093, 787, -225, -477, 15, -477, -237, 463, 787, 3375, 5715, -577, 143, 95, 143, 815, -4973, -2813, 787, -2093, 787, -45, 195, 787, 5715, -2413, 467, 275, 467, 3155])\n assert answers_match(candidate(expression='5+5+5+5+5+5+5+5+5+5'), [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50])\n assert answers_match(candidate(expression='9*8+7*6-5*4+3*2'), [-2700, -3960, -1188, -3960, -2448, 702, 954, -432, 702, -3582, -2070, 954, -1314, 954, 0, -180, 216, -180, 36, 702, 954, 3402, 4734, -756, 378, 324, 378, 1458, -3582, -2070, 954, -1314, 954, 198, 414, 954, 4734, -1638, 630, 522, 630, 2790, -5940, -8640, -2700, -8640, -5400, 1350, 1890, -1080, 1350, -7830, -4590, 1890, -2970, 1890, 0, -180, 216, -180, 36, 360, 180, 576, 180, 396, 1350, 1890, 4050, 5670, 1350, 1890, 4050, 5670, 7650, 10710, -756, 378, 324, 378, 1458, -1836, 594, 324, 684, 594, 1674, 594, 1674, 3114, -3510, -1998, 1026, -1242, 1026, 270, 486, 1026, 4806, -1566, 702, 594, 702, 2862, -7830, -4590, 1890, -2970, 1890, 270, 486, 990, 1206, 1890, 5670, 1890, 5670, 10710, -1566, 702, 594, 702, 2862, -3726, 1134, 594, 1314, 1134, 3294, 1134, 3294, 6174, -236, -376, -68, -376, -208, 142, 170, 16, 142, -334, -166, 170, -82, 170, 64, 44, 88, 44, 68, 142, 170, 442, 590, -20, 106, 100, 106, 226, -334, -166, 170, -82, 170, 86, 110, 170, 590, -118, 134, 122, 134, 374, -5940, -8640, -2700, -8640, -5400, 1350, 1890, -1080, 1350, -7830, -4590, 1890, -2970, 1890, -3476, -5056, -1580, -5056, -3160, 790, 1106, -632, 790, -4582, -2686, 1106, -1738, 1106, 400, 380, 424, 380, 404, 760, 740, 784, 740, 764, 64, 44, 88, 44, 68, 760, 740, 784, 740, 764, 424, 404, 448, 404, 428, 1350, 1890, 4050, 5670, 1350, 1890, 4050, 5670, 7650, 10710, 790, 1106, 1090, 1526, 1350, 1890, 790, 1106, 4450, 6230, 8050, 11270, 1090, 1526, 8050, 11270, 4690, 6566, -804, 330, 276, 330, 1410, -1884, 546, 276, 636, 546, 1626, 546, 1626, 3066, -20, 106, 100, 106, 226, -1884, 546, -1100, 322, 436, 796, 100, 796, 460, 546, 1626, 546, 1626, 3066, 322, 442, 546, 322, 1786, 3226, 442, 3226, 1882, -3510, -1998, 1026, -1242, 1026, 270, 486, 1026, 4806, -1566, 702, 594, 702, 2862, -7830, -4590, 1890, -2970, 1890, 270, 486, 990, 1206, 1890, 5670, 1890, 5670, 10710, -1566, 702, 594, 702, 2862, -3726, 1134, 594, 1314, 1134, 3294, 1134, 3294, 6174, -262, -94, 242, -10, 242, 158, 182, 242, 662, -46, 206, 194, 206, 446, -7830, -4590, 1890, -2970, 1890, -4582, -2686, 1106, -1738, 1106, 830, 854, 1550, 1574, 158, 182, 1550, 1574, 878, 902, 1890, 5670, 1890, 5670, 10710, 1106, 1526, 1890, 1106, 6230, 11270, 1526, 11270, 6566, -1614, 654, 546, 654, 2814, -3774, 1086, 546, 1266, 1086, 3246, 1086, 3246, 6126, -46, 206, 194, 206, 446, -3774, 1086, -2206, 638, 866, 1586, 194, 1586, 914, 1086, 3246, 1086, 3246, 6126, 638, 878, 1086, 638, 3566, 6446, 878, 6446, 3758])\n assert answers_match(candidate(expression='10*9-8*7+6*5-4*3'), [2890, -1910, -1910, -1910, -6710, 7370, -3030, -1910, -4150, -3030, -7830, -3030, -7830, -14550, -50, -650, -650, -650, -1250, 7370, -3030, 4430, -1770, -2750, -4990, -650, -4990, -2890, -3030, -7830, -3030, -7830, -14550, -1770, -2370, -3030, -1770, -8670, -15390, -2370, -15390, -9090, -350, 250, 250, 250, 850, -910, 390, 250, 530, 390, 990, 390, 990, 1830, -890, -290, -290, -290, 310, -350, 250, 250, 250, 850, 6650, -2850, 3710, -1590, -910, 390, 2870, -1230, -910, 390, -2990, -5230, -890, -5230, -3130, 250, 530, -290, 250, -4870, -2770, 530, -2170, 530, -2850, -7650, -2850, -7650, -14370, -1590, -2190, -2850, -1590, -8490, -15210, -2190, -15210, -8910, 390, 990, 390, 990, 1830, -1230, -630, 390, 990, -2850, -1590, 390, -1230, 390, -8730, -15450, -2430, -15450, -9150, 990, 1830, -630, 990, -14370, -8070, 1830, -6270, 1830, 370, -110, -110, -110, -590, 818, -222, -110, -334, -222, -702, -222, -702, -1374, 76, 16, 16, 16, -44, 818, -222, 524, -96, -194, -418, 16, -418, -208, -222, -702, -222, -702, -1374, -96, -156, -222, -96, -786, -1458, -156, -1458, -828, -350, 250, 250, 250, 850, -910, 390, 250, 530, 390, 990, 390, 990, 1830, -2870, 2050, 2050, 2050, 6970, -7462, 3198, 2050, 4346, 3198, 8118, 3198, 8118, 15006, -512, -452, -452, -452, -392, 28, 88, 88, 88, 148, -8, 52, 52, 52, 112, 28, 88, 88, 88, 148, 532, 592, 592, 592, 652, 6650, -2850, 3710, -1590, -910, 390, 2870, -1230, -910, 390, 98, -42, -196, 84, -910, 390, -7462, 3198, 3248, -1392, -532, 228, -280, 120, -532, 228, -4060, 1740, -2882, -5122, -782, -5122, -3022, 358, 638, -182, 358, -4762, -2662, 638, -2062, 638, -218, -442, -8, -442, -232, 358, 638, 3022, 5318, -452, 88, 52, 88, 592, -4762, -2662, 638, -2062, 638, -82, 128, 638, 5318, -2332, 368, 188, 368, 2888, -2850, -7650, -2850, -7650, -14370, -1590, -2190, -2850, -1590, -8490, -15210, -2190, -15210, -8910, 390, 990, 390, 990, 1830, -1230, -630, 390, 990, -2850, -1590, 390, -1230, 390, -8730, -15450, -2430, -15450, -9150, 990, 1830, -630, 990, -14370, -8070, 1830, -6270, 1830, -42, -522, -42, -522, -1194, 84, 24, -42, 84, -606, -1278, 24, -1278, -648, 390, 990, 390, 990, 1830, 3198, 8118, 3198, 8118, 15006, -1392, -1332, 228, 288, 120, 180, 228, 288, 1740, 1800, -2850, -1590, 390, -1230, 390, -42, 84, 390, 3198, -1392, 228, 120, 228, 1740, -8622, -15342, -2322, -15342, -9042, 1098, 1938, -522, 1098, -14262, -7962, 1938, -6162, 1938, -630, -1302, 0, -1302, -672, 1098, 1938, 9090, 15978, -1332, 288, 180, 288, 1800, -14262, -7962, 1938, -6162, 1938, -222, 408, 1938, 15978, -6972, 1128, 588, 1128, 8688])\n assert answers_match(candidate(expression='9*8-7+6*5-4*3+2'), [819, 495, -261, 279, -261, -81, -135, -261, -1161, 369, -171, -171, -171, -711, 1827, 1125, -513, 657, -513, -81, -135, -333, -387, -513, -1413, -513, -1413, -2673, 369, -171, -171, -171, -711, 873, -297, -171, -423, -297, -837, -297, -837, -1593, -801, -477, 279, -261, 279, 99, 153, 279, 1179, -351, 189, 189, 189, 729, 675, 405, -225, 225, -225, -945, -567, 315, -315, 315, -441, -387, -693, -639, 99, 153, -405, -351, 135, 189, -225, -1125, -225, -1125, -2385, 315, 1215, -225, 315, -1485, -2745, 1215, -1305, 1395, 405, -135, -135, -135, -675, 909, -261, -135, -387, -261, -801, -261, -801, -1557, -351, 189, 189, 189, 729, 333, -117, -423, 207, -351, -603, 189, -315, 225, -117, -657, -117, -657, -1413, 207, 747, -117, 207, -873, -1629, 747, -765, 855, 155, 119, 35, 95, 35, 55, 49, 35, -65, 105, 45, 45, 45, -15, 267, 189, 7, 137, 7, 55, 49, 27, 21, 7, -93, 7, -93, -233, 105, 45, 45, 45, -15, 161, 31, 45, 17, 31, -29, 31, -29, -113, -81, -45, 39, -21, 39, 19, 25, 39, 139, -31, 29, 29, 29, 89, -25, 11, 95, 35, 95, 75, 81, 95, 195, 25, 85, 85, 85, 145, 675, 405, -225, 225, -225, -945, -567, 315, -315, 315, -885, -531, 295, -295, 295, -225, -135, 75, -75, 75, -1065, -639, 355, -355, 355, -281, -275, -533, -527, 259, 265, -245, -239, 295, 301, 15, 21, -13, -7, 19, 25, 75, 81, -245, -239, 295, 301, 275, 281, 55, 61, 335, 341, -225, -1125, -225, -1125, -2385, 315, 1215, -225, 315, -1485, -2745, 1215, -1305, 1395, 295, 195, 295, 195, 55, 75, 175, 355, 455, -225, 315, 295, 75, 355, -1325, -2585, 1375, -1145, 1555, 155, 15, 175, 455, -1145, 1555, 1455, 355, 1755, 389, -151, -151, -151, -691, 893, -277, -151, -403, -277, -817, -277, -817, -1573, -367, 173, 173, 173, 713, 317, -133, -439, 191, -367, -619, 173, -331, 209, -133, -673, -133, -673, -1429, 191, 731, -133, 191, -889, -1645, 731, -781, 839, 109, 49, 49, 49, -11, 165, 35, 49, 21, 35, -25, 35, -25, -109, -31, 29, 29, 29, 89, 25, 85, 85, 85, 145, 317, -133, -439, 191, -411, 179, -103, 47, -495, 215, -271, -523, 269, -235, 305, 25, -3, 29, 85, -235, 305, 285, 65, 345, -133, -673, -133, -673, -1429, 191, 731, -133, 191, -889, -1645, 731, -781, 839, 179, 119, 179, 119, 35, 47, 107, 215, 275, -133, 191, 179, 47, 215, -793, -1549, 827, -685, 935, 95, 11, 107, 275, -685, 935, 875, 215, 1055])\n assert answers_match(candidate(expression='8*9-2*3+5*2'), [-136, -184, -56, -184, -104, 728, 896, 104, 248, -112, -32, 896, 128, 416, 46, 40, 56, 40, 50, 728, 896, 910, 1120, 34, 178, 76, 178, 220, -112, -32, 896, 128, 416, 112, 122, 896, 1120, 58, 346, 142, 346, 430])\n assert answers_match(candidate(expression='8*7-6*5+4*3-2*1'), [-376, -376, -664, -376, -664, -376, -376, -664, -1144, -376, -664, -376, -664, -1144, -216, -216, -264, -216, -264, -376, -376, -216, -216, -744, -1224, -264, -1224, -744, -376, -664, -376, -664, -1144, -216, -264, -376, -216, -744, -1224, -264, -1224, -744, 72, 72, 120, 72, 120, 72, 72, 120, 200, 72, 120, 72, 120, 200, -152, -152, -104, -152, -104, 72, 72, 120, 72, 120, -376, -376, -216, -216, 72, 72, -152, -152, 72, 72, -776, -1256, -296, -1256, -776, 120, 200, -104, 120, -1144, -664, 200, -472, 200, -376, -664, -376, -664, -1144, -216, -264, -376, -216, -744, -1224, -264, -1224, -744, 72, 120, 72, 120, 200, -152, -104, 72, 120, -376, -216, 72, -152, 72, -776, -1256, -296, -1256, -776, 120, 200, -104, 120, -1144, -664, 200, -472, 200, 2, 2, -34, 2, -34, 2, 2, -34, -94, 2, -34, 2, -34, -94, 22, 22, 16, 22, 16, 2, 2, 22, 22, -44, -104, 16, -104, -44, 2, -34, 2, -34, -94, 22, 16, 2, 22, -44, -104, 16, -104, -44, 72, 72, 120, 72, 120, 72, 72, 120, 200, 72, 120, 72, 120, 200, 450, 450, 750, 450, 750, 450, 450, 750, 1250, 450, 750, 450, 750, 1250, -180, -180, -174, -180, -174, 44, 44, 50, 44, 50, 30, 30, 36, 30, 36, 44, 44, 50, 44, 50, 254, 254, 260, 254, 260, -376, -376, -216, -216, 72, 72, -152, -152, 72, 72, 2, 2, 22, 22, 72, 72, 450, 450, -180, -180, 44, 44, 30, 30, 44, 44, 254, 254, -762, -1242, -282, -1242, -762, 134, 214, -90, 134, -1130, -650, 214, -458, 214, -48, -108, 12, -108, -48, 134, 214, 848, 1348, -174, 50, 36, 50, 260, -1130, -650, 214, -458, 214, 4, 64, 214, 1348, -542, 130, 88, 130, 760, -376, -664, -376, -664, -1144, -216, -264, -376, -216, -744, -1224, -264, -1224, -744, 72, 120, 72, 120, 200, -152, -104, 72, 120, -376, -216, 72, -152, 72, -776, -1256, -296, -1256, -776, 120, 200, -104, 120, -1144, -664, 200, -472, 200, 2, -34, 2, -34, -94, 22, 16, 2, 22, -44, -104, 16, -104, -44, 72, 120, 72, 120, 200, 450, 750, 450, 750, 1250, -180, -174, 44, 50, 30, 36, 44, 50, 254, 260, -376, -216, 72, -152, 72, 2, 22, 72, 450, -180, 44, 30, 44, 254, -762, -1242, -282, -1242, -762, 134, 214, -90, 134, -1130, -650, 214, -458, 214, -48, -108, 12, -108, -48, 134, 214, 848, 1348, -174, 50, 36, 50, 260, -1130, -650, 214, -458, 214, 4, 64, 214, 1348, -542, 130, 88, 130, 760])\n assert answers_match(candidate(expression='3+3*3-3+3*3-3+3'), [30, -24, -6, -6, -24, 66, -42, -6, -24, -6, -24, 3, -24, -42, -24, 30, 12, 12, 30, 30, -24, -24, 30, -42, -60, 12, -42, 12, 12, -6, 21, -6, -24, 12, 30, 12, 12, -24, -42, 30, -24, 30, 18, 0, 6, 6, 0, 30, -6, 6, 0, 6, 0, 9, 0, -6, -6, 12, 6, 6, 12, 0, 18, 12, 12, 18, 30, -24, -24, 30, -6, 12, -6, 12, -24, 30, -30, -48, 24, -30, 24, -6, -12, 6, 12, -30, 24, 6, 6, 24, 6, -12, 15, -12, -30, 6, 24, 6, 6, -30, -48, 24, -30, 24, 12, 6, 15, 6, 0, 6, 12, 12, 18, 6, 6, 6, 6, 6, -24, -42, 30, -24, 30, 0, -6, 12, 18, -24, 30, 12, 12, 30, 54, -54, -18, -18, -54, 126, -90, -18, -54, -18, -54, 0, -54, -90, -54, 54, 18, 18, 54, 54, -54, -54, 54, -90, -126, 18, -90, 18, 18, -18, 36, -18, -54, 18, 54, 18, 18, -54, -90, 54, -54, 54, 18, 0, 6, 6, 0, 30, -6, 6, 0, 6, 0, 9, 0, -6, 24, 6, 12, 12, 6, 36, 0, 12, 6, 12, 6, 15, 6, 0, -6, 12, 6, 6, 12, 0, 18, 12, 12, 18, -9, 9, 3, 3, 9, 0, 18, 12, 12, 18, 6, 24, 18, 18, 24, 18, -18, -36, 36, -18, 18, -18, 18, -36, 36, 54, -54, -54, 54, -18, 18, -36, 36, -18, 18, -36, 36, -9, 9, -36, 36, -54, 54, -30, -48, 24, -30, 24, -6, -12, 6, 12, -30, 24, 6, 6, 24, -60, -96, 48, -60, 48, -6, -12, 0, -6, 6, 12, 3, 12, 18, -24, 30, 12, 12, 30, -60, 48, 12, 30, 12, 30, 3, 30, 48, 6, -12, 15, -12, -30, 6, 24, 6, 6, -30, -48, 24, -30, 24, 12, 6, 15, 6, 0, 6, 12, 12, 18, 6, 6, 6, 6, 6, -24, -42, 30, -24, 30, 0, -6, 12, 18, -24, 30, 12, 12, 30, 3, -33, 21, -33, -69, 3, 39, 3, 3, -69, -105, 39, -69, 39, 12, 6, 15, 6, 0, 18, 12, 21, 12, 6, 6, 12, 12, 18, 3, 9, 12, 18, 18, 24, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, -24, -42, 30, -24, 30, 0, -6, 12, 18, -24, 30, 12, 12, 30, -54, -90, 54, -54, 54, 0, -6, 6, 0, 12, 18, 9, 18, 24, -18, 36, 18, 18, 36, -54, 54, 18, 36, 18, 36, 9, 36, 54])\n assert answers_match(candidate(expression='5*6-7+8-9*10+11'), [900, 460, 100, 350, -10, 900, 460, -600, -600, 350, -10, 350, -325, -325, -910, -470, -110, -360, 0, -990, -550, -910, -470, 0, 0, -210, -1890, -210, 460, 100, 460, -215, -215, -360, 0, -440, -360, 55, 55, -45, -845, -45, 204, 116, 44, 94, 22, 204, 116, -96, -96, 94, 22, 94, -41, -41, -186, -98, -26, -76, -4, -158, -70, 2, -48, 24, -234, -146, -154, -66, -174, -86, -186, -98, -158, -70, 0, 0, -210, -1890, -210, 504, 504, -126, 462, -1134, 546, 126, -126, 462, 416, 56, 416, -259, -259, -404, -44, -484, -404, 11, 11, -89, -889, -89, 116, 44, 116, -19, -19, -76, -4, -48, 24, -124, -44, -64, -76, -48, 11, 11, -89, -889, -89, 251, 251, -49, 231, -529, 271, 71, -49, 231])\n assert answers_match(candidate(expression='5*5-4*4+3*3-2*2+1'), [125, 65, -235, -55, -235, -115, -135, -235, -475, -15, -195, -175, -195, -355, 445, 305, -395, 25, -395, -115, -135, -275, -295, -395, -635, -395, -635, -1115, -15, -195, -175, -195, -355, 145, -275, -175, -335, -275, -435, -275, -435, -755, -10, -25, -100, -55, -100, -70, -75, -100, -160, -45, -90, -85, -90, -130, 445, 305, -395, 25, -395, 310, 215, -260, 25, -260, -205, -210, -365, -370, -70, -75, -365, -370, -230, -235, -395, -635, -395, -635, -1115, -260, -320, -395, -260, -725, -1205, -320, -1205, -800, 0, -180, -160, -180, -340, 160, -260, -160, -320, -260, -420, -260, -420, -740, -45, -90, -85, -90, -130, 160, -260, 115, -170, -220, -380, -85, -380, -245, -260, -420, -260, -420, -740, -170, -210, -260, -170, -480, -800, -210, -800, -530, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -100, -85, -10, -55, -10, -40, -35, -10, 50, -65, -20, -25, -20, 20, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, 345, 230, -345, 0, -345, 210, 140, -210, 0, -210, -105, -70, 105, 0, 105, 120, 80, -120, 0, -120, -105, -70, 105, 0, 105, -265, -260, -425, -420, -130, -125, -425, -420, -290, -285, 35, 40, 75, 80, -40, -35, 35, 40, -375, -370, -240, -235, 75, 80, -150, -145, 75, 80, -345, -585, -345, -585, -1065, -210, -270, -345, -210, -675, -1155, -270, -1155, -750, 105, 165, 105, 165, 285, -120, -60, 105, 165, -345, -210, 105, -120, 105, -735, -1215, -330, -1215, -810, 165, 285, -60, 165, -1065, -660, 285, -390, 285, 10, -170, -150, -170, -330, 170, -250, -150, -310, -250, -410, -250, -410, -730, -35, -80, -75, -80, -120, 170, -250, 125, -160, -210, -370, -75, -370, -235, -250, -410, -250, -410, -730, -160, -200, -250, -160, -470, -790, -200, -790, -520, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -65, -20, -25, -20, 20, 10, 55, 50, 55, 95, 120, -225, 75, -135, -30, 75, 45, -75, -30, 75, -250, -410, -115, -410, -275, 50, 90, -25, 50, -360, -225, 90, -135, 90, -225, -385, -225, -385, -705, -135, -175, -225, -135, -445, -765, -175, -765, -495, 75, 115, 75, 115, 195, -75, -35, 75, 115, -225, -135, 75, -75, 75, -485, -805, -215, -805, -535, 115, 195, -35, 115, -705, -435, 195, -255, 195, 45, 33, -27, 9, -27, -3, -7, -27, -75, 17, -19, -15, -19, -51, 109, 81, -59, 25, -59, -3, -7, -35, -39, -59, -107, -59, -107, -203, 17, -19, -15, -19, -51, 49, -35, -15, -47, -35, -67, -35, -67, -131, 18, 15, 0, 9, 0, 6, 5, 0, -12, 11, 2, 3, 2, -6, 109, 81, -59, 25, -59, 82, 63, -32, 25, -32, -21, -22, -53, -54, 6, 5, -53, -54, -26, -27, -59, -107, -59, -107, -203, -32, -44, -59, -32, -125, -221, -44, -221, -140, 20, -16, -12, -16, -48, 52, -32, -12, -44, -32, -64, -32, -64, -128, 11, 2, 3, 2, -6, 52, -32, 43, -14, -24, -56, 3, -56, -29, -32, -64, -32, -64, -128, -14, -22, -32, -14, -76, -140, -22, -140, -86, -25, -10, 65, 20, 65, 35, 40, 65, 125, 10, 55, 50, 55, 95, -105, -70, 105, 0, 105, 35, 40, 75, 80, 105, 165, 105, 165, 285, 10, 55, 50, 55, 95, -30, 75, 50, 90, 75, 115, 75, 115, 195, -105, -42, 273, 84, 273, 147, 168, 273, 525, 42, 231, 210, 231, 399, -441, -294, 441, 0, 441, 147, 168, 315, 336, 441, 693, 441, 693, 1197, 42, 231, 210, 231, 399, -126, 315, 210, 378, 315, 483, 315, 483, 819, -64, -61, -46, -55, -46, -52, -51, -46, -34, -57, -48, -49, -48, -40, 11, 14, 29, 20, 29, 23, 24, 29, 41, 18, 27, 26, 27, 35, 0, 3, 18, 9, 18, 12, 13, 18, 30, 7, 16, 15, 16, 24, 11, 14, 29, 20, 29, 23, 24, 29, 41, 18, 27, 26, 27, 35, 75, 78, 93, 84, 93, 87, 88, 93, 105, 82, 91, 90, 91, 99, 345, 230, -345, 0, -345, 210, 140, -210, 0, -210, -105, -70, 105, 0, 105, 120, 80, -120, 0, -120, -105, -70, 105, 0, 105, 9, 6, -9, 0, -9, -18, -12, 18, 0, 18, -105, -70, 105, 0, 105, -441, -294, 441, 0, 441, 156, 104, -156, 0, -156, -69, -46, 69, 0, 69, -36, -24, 36, 0, 36, -69, -46, 69, 0, 69, -261, -174, 261, 0, 261, -241, -240, -401, -400, -106, -105, -401, -400, -266, -265, 59, 60, 99, 100, -16, -15, 59, 60, -351, -350, -216, -215, 99, 100, -126, -125, 99, 100, -33, -32, -65, -64, -6, -5, -65, -64, -38, -37, 59, 60, 99, 100, 267, 268, 435, 436, -52, -51, 23, 24, 12, 13, 23, 24, 87, 88, -351, -350, -216, -215, 99, 100, -126, -125, 99, 100, -15, -14, 12, 13, 99, 100, 435, 436, -162, -161, 63, 64, 30, 31, 63, 64, 255, 256, -345, -585, -345, -585, -1065, -210, -270, -345, -210, -675, -1155, -270, -1155, -750, 105, 165, 105, 165, 285, -120, -60, 105, 165, -345, -210, 105, -120, 105, -735, -1215, -330, -1215, -810, 165, 285, -60, 165, -1065, -660, 285, -390, 285, -9, -57, -9, -57, -153, 18, 6, -9, 18, -75, -171, 6, -171, -90, 105, 165, 105, 165, 285, 441, 693, 441, 693, 1197, -156, -144, 69, 81, 36, 48, 69, 81, 261, 273, -345, -210, 105, -120, 105, -9, 18, 105, 441, -156, 69, 36, 69, 261, -711, -1191, -306, -1191, -786, 189, 309, -36, 189, -1041, -636, 309, -366, 309, -87, -183, -6, -183, -102, 189, 309, 813, 1317, -144, 81, 48, 81, 273, -1041, -636, 309, -366, 309, -33, 48, 309, 1317, -474, 201, 102, 201, 777, 6, -174, -154, -174, -334, 166, -254, -154, -314, -254, -414, -254, -414, -734, -39, -84, -79, -84, -124, 166, -254, 121, -164, -214, -374, -79, -374, -239, -254, -414, -254, -414, -734, -164, -204, -254, -164, -474, -794, -204, -794, -524, 6, 51, 46, 51, 91, -34, 71, 46, 86, 71, 111, 71, 111, 191, -69, -24, -29, -24, 16, 6, 51, 46, 51, 91, 116, -229, 71, -139, -34, 71, 41, -79, -34, 71, -254, -414, -119, -414, -279, 46, 86, -29, 46, -364, -229, 86, -139, 86, -229, -389, -229, -389, -709, -139, -179, -229, -139, -449, -769, -179, -769, -499, 71, 111, 71, 111, 191, -79, -39, 71, 111, -229, -139, 71, -79, 71, -489, -809, -219, -809, -539, 111, 191, -39, 111, -709, -439, 191, -259, 191, 22, -14, -10, -14, -46, 54, -30, -10, -42, -30, -62, -30, -62, -126, 13, 4, 5, 4, -4, 54, -30, 45, -12, -22, -54, 5, -54, -27, -30, -62, -30, -62, -126, -12, -20, -30, -12, -74, -138, -20, -138, -84, 6, 51, 46, 51, 91, -34, 71, 46, 86, 71, 111, 71, 111, 191, 22, 211, 190, 211, 379, -146, 295, 190, 358, 295, 463, 295, 463, 799, -57, -48, -49, -48, -40, 18, 27, 26, 27, 35, 7, 16, 15, 16, 24, 18, 27, 26, 27, 35, 82, 91, 90, 91, 99, 116, -229, 71, -139, -34, 71, 41, -79, -34, 71, 4, -5, -5, 13, -34, 71, -146, 295, 53, -103, -22, 47, -11, 25, -22, 47, -86, 175, -238, -398, -103, -398, -263, 62, 102, -13, 62, -348, -213, 102, -123, 102, -30, -62, -3, -62, -35, 62, 102, 270, 438, -49, 26, 15, 26, 90, -348, -213, 102, -123, 102, -12, 15, 102, 438, -159, 66, 33, 66, 258, -229, -389, -229, -389, -709, -139, -179, -229, -139, -449, -769, -179, -769, -499, 71, 111, 71, 111, 191, -79, -39, 71, 111, -229, -139, 71, -79, 71, -489, -809, -219, -809, -539, 111, 191, -39, 111, -709, -439, 191, -259, 191, -5, -37, -5, -37, -101, 13, 5, -5, 13, -49, -113, 5, -113, -59, 71, 111, 71, 111, 191, 295, 463, 295, 463, 799, -103, -95, 47, 55, 25, 33, 47, 55, 175, 183, -229, -139, 71, -79, 71, -5, 13, 71, 295, -103, 47, 25, 47, 175, -473, -793, -203, -793, -523, 127, 207, -23, 127, -693, -423, 207, -243, 207, -57, -121, -3, -121, -67, 127, 207, 543, 879, -95, 55, 33, 55, 183, -693, -423, 207, -243, 207, -21, 33, 207, 879, -315, 135, 69, 135, 519])\n assert answers_match(candidate(expression='7-6+5*4-3'), [-4, -16, -4, -16, -34, 6, 18, -4, 6, -22, -40, 18, -19, 21])\n assert answers_match(candidate(expression='10-5*2+3*2-1'), [-15, -25, -15, -25, -35, -3, -5, -15, -3, -29, -39, -5, -39, -15, 25, 35, 25, 35, 45, 3, 5, 13, 15, -15, -3, 25, 3, 13, -31, -41, -7, -41, -17, 39, 49, 5, 15, -31, -7, 49, 5, 25])\n assert answers_match(candidate(expression='5-3*2+4*3'), [-37, -49, -13, -49, -25, 28, 36, 11, 16, -39, -15, 36, 9, 24])\n assert answers_match(candidate(expression='3-2*2+1+4*5'), [-43, -51, -43, -67, -67, -22, -26, -23, -22, -67, -67, -42, -47, -42, 23, 27, 23, 35, 35, 20, 24, 23, 27, 17, 18, 23, 20, 23, -55, -55, -30, -35, -30, 35, 35, 20, 35, 5, 10, 35, 20, 35])\n assert answers_match(candidate(expression='1+2+3+4+5+6+7+8+9+0'), [45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45])\n assert answers_match(candidate(expression='9+8*7+6-5*4+3-2*1+0'), [-87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -55, -55, -55, -55, -55, -151, -151, -55, -55, -87, -87, -55, -151, -55, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, -39, -39, -39, -39, -39, 105, 105, 105, 105, 105, -183, -183, -87, -87, 105, 105, -39, -39, 105, 105, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 105, 105, 105, 105, 105, -39, -39, 105, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -55, -55, -55, -55, -55, -151, -151, -55, -55, -87, -87, -55, -151, -55, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, -39, -39, -39, -39, -39, 105, 105, 105, 105, 105, -39, -39, -39, -39, -39, 273, 273, 273, 273, 273, 273, 273, 273, 273, 273, -183, -183, -87, -87, 105, 105, -39, -39, 105, 105, -183, -183, -87, -87, 441, 441, 441, 441, -39, -39, 105, 105, -39, -39, 273, 273, 273, 273, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 105, 105, 105, 105, 105, -39, -39, 105, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, -39, -39, 105, 105, -39, -39, 273, 273, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 50, 50, 50, 50, 50, 38, 38, 50, 50, 46, 46, 50, 38, 50, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 52, 52, 52, 52, 52, 70, 70, 70, 70, 70, 34, 34, 46, 46, 70, 70, 52, 52, 70, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 52, 52, 70, 70, 34, 46, 70, 52, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 92, 92, 92, 92, 92, 80, 80, 92, 92, 88, 88, 92, 80, 92, 88, 88, 88, 88, 88, 92, 92, 80, 92, 88, 88, 92, 80, 92, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 50, 50, 50, 50, 50, 38, 38, 50, 50, 46, 46, 50, 38, 50, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 504, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, 294, -46, -46, -46, -46, -46, 98, 98, 98, 98, 98, -46, -46, -46, -46, -46, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 52, 52, 52, 52, 52, 70, 70, 70, 70, 70, 94, 94, 94, 94, 94, 52, 52, 52, 52, 52, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 238, 238, 238, 238, 238, 406, 406, 406, 406, 406, 238, 238, 238, 238, 238, -169, -169, -73, -73, 119, 119, -25, -25, 119, 119, -169, -169, -73, -73, 455, 455, 455, 455, -25, -25, 119, 119, -25, -25, 287, 287, 287, 287, 34, 34, 46, 46, 70, 70, 52, 52, 70, 70, 76, 76, 88, 88, 34, 34, 46, 46, 455, 455, 455, 455, 406, 406, 700, 700, 406, 406, -46, -46, 98, 98, -46, -46, 266, 266, 266, 266, 52, 52, 70, 70, 94, 94, 52, 52, 266, 266, 266, 266, 238, 238, 406, 406, 238, 238, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 329, 329, 329, 329, 294, 294, 504, 504, 294, 294, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 105, 105, 105, 105, 105, -39, -39, 105, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, -39, -39, 105, 105, -39, -39, 273, 273, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 52, 52, 70, 70, 34, 46, 70, 52, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 88, 88, 88, 92, 92, 80, 92, 88, 88, 92, 80, 92, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 294, 294, 294, 294, 294, 504, 504, 504, 504, 504, 294, 294, 294, 294, 294, -46, -46, 98, 98, -46, -46, 266, 266, 266, 266, 52, 52, 70, 70, 94, 94, 52, 52, 266, 266, 266, 266, 238, 238, 406, 406, 238, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 329, 329, 329, 329, 294, 294, 504, 504, 294, 294, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -136, -136, -136, -136, -136, -340, -340, -136, -136, -204, -204, -136, -340, -136, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, 204, -102, -102, -102, -102, -102, 204, 204, 204, 204, 204, -408, -408, -204, -204, 204, 204, -102, -102, 204, 204, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 204, 204, 204, 204, 204, -102, -102, 204, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -204, -136, -136, -136, -136, -136, -340, -340, -136, -136, -204, -204, -136, -340, -136, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, -102, -102, -102, -102, -102, 204, 204, 204, 204, 204, -102, -102, -102, -102, -102, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, -408, -408, -204, -204, 204, 204, -102, -102, 204, 204, -408, -408, -204, -204, 918, 918, 918, 918, -102, -102, 204, 204, -102, -102, 561, 561, 561, 561, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 680, 680, 680, 680, -102, 204, -102, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 204, 204, 204, 204, 204, -102, -102, 204, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, -102, -102, 204, 204, -102, -102, 561, 561, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 680, 680, 680, 680, -102, 204, -102, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 50, 50, 50, 50, 50, 38, 38, 50, 50, 46, 46, 50, 38, 50, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 52, 52, 52, 52, 52, 70, 70, 70, 70, 70, 34, 34, 46, 46, 70, 70, 52, 52, 70, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 52, 52, 70, 70, 34, 46, 70, 52, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 104, 104, 104, 104, 92, 92, 104, 104, 100, 100, 104, 92, 104, 100, 100, 100, 100, 100, 104, 104, 92, 104, 100, 100, 104, 92, 104, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 106, 106, 106, 106, 106, 124, 124, 124, 124, 124, 88, 88, 100, 100, 124, 124, 106, 106, 124, 124, 100, 100, 104, 92, 104, 124, 124, 106, 124, 88, 100, 124, 106, 124, 100, 100, 100, 100, 100, 104, 104, 92, 104, 100, 100, 104, 92, 104, 124, 124, 124, 124, 124, 106, 106, 124, 124, 88, 100, 124, 106, 124, 100, 100, 104, 92, 104, 124, 124, 106, 124, 88, 100, 124, 106, 124, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 88, 92, 92, 92, 92, 92, 80, 80, 92, 92, 88, 88, 92, 80, 92, 88, 88, 88, 88, 88, 92, 92, 80, 92, 88, 88, 92, 80, 92, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 50, 50, 50, 50, 50, 38, 38, 50, 50, 46, 46, 50, 38, 50, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, 200, 200, 200, 200, 200, 188, 188, 200, 200, 196, 196, 200, 188, 200, 196, 196, 196, 196, 196, 200, 200, 188, 200, 196, 196, 200, 188, 200, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 50, 50, 50, 50, 50, 38, 38, 50, 50, 46, 46, 50, 38, 50, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 104, 104, 104, 104, 104, 92, 92, 104, 104, 100, 100, 104, 92, 104, 100, 100, 100, 100, 100, 104, 104, 92, 104, 100, 100, 104, 92, 104, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 540, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 1080, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 330, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, -46, -46, -46, -46, -46, 98, 98, 98, 98, 98, -46, -46, -46, -46, -46, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 52, 52, 52, 52, 52, 70, 70, 70, 70, 70, 94, 94, 94, 94, 94, 52, 52, 52, 52, 52, 266, 266, 266, 266, 266, 266, 266, 266, 266, 266, 238, 238, 238, 238, 238, 406, 406, 406, 406, 406, 238, 238, 238, 238, 238, -118, -118, -118, -118, -118, 188, 188, 188, 188, 188, -118, -118, -118, -118, -118, 545, 545, 545, 545, 545, 545, 545, 545, 545, 545, 52, 52, 52, 52, 52, 70, 70, 70, 70, 70, 106, 106, 106, 106, 106, 124, 124, 124, 124, 124, 94, 94, 94, 94, 94, 52, 52, 52, 52, 52, 202, 202, 202, 202, 202, 52, 52, 52, 52, 52, 106, 106, 106, 106, 106, 293, 293, 293, 293, 293, 293, 293, 293, 293, 293, 265, 265, 265, 265, 265, 433, 433, 433, 433, 433, 265, 265, 265, 265, 265, 545, 545, 545, 545, 545, 545, 545, 545, 545, 545, 265, 265, 265, 265, 265, 481, 481, 481, 481, 481, 433, 433, 433, 433, 433, 265, 265, 265, 265, 265, 865, 865, 865, 865, 865, 265, 265, 265, 265, 265, 481, 481, 481, 481, 481, -169, -169, -73, -73, 119, 119, -25, -25, 119, 119, -169, -169, -73, -73, 455, 455, 455, 455, -25, -25, 119, 119, -25, -25, 287, 287, 287, 287, 34, 34, 46, 46, 70, 70, 52, 52, 70, 70, 76, 76, 88, 88, 34, 34, 46, 46, 455, 455, 455, 455, 406, 406, 700, 700, 406, 406, -46, -46, 98, 98, -46, -46, 266, 266, 266, 266, 52, 52, 70, 70, 94, 94, 52, 52, 266, 266, 266, 266, 238, 238, 406, 406, 238, 238, -376, -376, -172, -172, 236, 236, -70, -70, 236, 236, -376, -376, -172, -172, 950, 950, 950, 950, -70, -70, 236, 236, -70, -70, 593, 593, 593, 593, 34, 34, 46, 46, 70, 70, 52, 52, 70, 70, 88, 88, 100, 100, 124, 124, 106, 106, 124, 124, 76, 76, 88, 88, 34, 34, 46, 46, 184, 184, 196, 196, 34, 34, 46, 46, 88, 88, 100, 100, 509, 509, 509, 509, 460, 460, 754, 754, 460, 460, 950, 950, 950, 950, 460, 460, 838, 838, 754, 754, 460, 460, 1510, 1510, 460, 460, 838, 838, -46, -46, 98, 98, -46, -46, 266, 266, 266, 266, 52, 52, 70, 70, 94, 94, 52, 52, 266, 266, 266, 266, 238, 238, 406, 406, 238, 238, -118, -118, 188, 188, -118, -118, 545, 545, 545, 545, 52, 52, 70, 70, 106, 106, 124, 124, 94, 94, 52, 52, 202, 202, 52, 52, 106, 106, 293, 293, 293, 293, 265, 265, 433, 433, 265, 265, 545, 545, 545, 545, 265, 265, 481, 481, 433, 433, 265, 265, 865, 865, 265, 265, 481, 481, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 329, 329, 329, 329, 294, 294, 504, 504, 294, 294, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 680, 680, 680, 680, -102, 204, -102, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 100, 100, 104, 92, 104, 124, 124, 106, 124, 88, 100, 124, 106, 124, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 196, 196, 200, 188, 200, 46, 46, 50, 38, 50, 100, 100, 104, 92, 104, 365, 365, 365, 365, 330, 330, 540, 540, 330, 330, 680, 680, 680, 680, 330, 330, 600, 600, 540, 540, 330, 330, 1080, 1080, 330, 330, 600, 600, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -118, 188, -118, 545, 545, 52, 70, 106, 124, 94, 52, 202, 52, 106, 293, 293, 265, 433, 265, 545, 545, 265, 481, 433, 265, 865, 265, 481, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -376, -172, 236, -70, 236, -376, -172, 950, 950, -70, 236, -70, 593, 593, 34, 46, 70, 52, 70, 88, 100, 124, 106, 124, 76, 88, 34, 46, 184, 196, 34, 46, 88, 100, 509, 509, 460, 754, 460, 950, 950, 460, 838, 754, 460, 1510, 460, 838, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -118, 188, -118, 545, 545, 52, 70, 106, 124, 94, 52, 202, 52, 106, 293, 293, 265, 433, 265, 545, 545, 265, 481, 433, 265, 865, 265, 481, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 105, 105, 105, 105, 105, -39, -39, 105, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -87, -87, -87, -55, -55, -151, -55, -87, -87, -55, -151, -55, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, -39, -39, 105, 105, -39, -39, 273, 273, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 52, 52, 70, 70, 34, 46, 70, 52, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 88, 88, 88, 92, 92, 80, 92, 88, 88, 92, 80, 92, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 329, 329, 329, 329, 329, 329, 329, 329, 329, 329, 294, 294, 294, 294, 294, 504, 504, 504, 504, 504, 294, 294, 294, 294, 294, -46, -46, 98, 98, -46, -46, 266, 266, 266, 266, 52, 52, 70, 70, 94, 94, 52, 52, 266, 266, 266, 266, 238, 238, 406, 406, 238, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 329, 329, 329, 329, 294, 294, 504, 504, 294, 294, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 204, 204, 204, 204, 204, -102, -102, 204, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -204, -204, -204, -136, -136, -340, -136, -204, -204, -136, -340, -136, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, -102, -102, 204, 204, -102, -102, 561, 561, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 680, 680, 680, 680, -102, 204, -102, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 70, 70, 70, 70, 70, 52, 52, 70, 70, 34, 46, 70, 52, 70, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 100, 100, 100, 100, 100, 104, 104, 92, 104, 100, 100, 104, 92, 104, 124, 124, 124, 124, 124, 106, 106, 124, 124, 88, 100, 124, 106, 124, 100, 100, 104, 92, 104, 124, 124, 106, 124, 88, 100, 124, 106, 124, 88, 88, 88, 88, 88, 92, 92, 80, 92, 88, 88, 92, 80, 92, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 196, 196, 196, 196, 196, 200, 200, 188, 200, 196, 196, 200, 188, 200, 46, 46, 46, 46, 46, 50, 50, 38, 50, 46, 46, 50, 38, 50, 100, 100, 100, 100, 100, 104, 104, 92, 104, 100, 100, 104, 92, 104, 365, 365, 365, 365, 365, 365, 365, 365, 365, 365, 330, 330, 330, 330, 330, 540, 540, 540, 540, 540, 330, 330, 330, 330, 330, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 330, 330, 330, 330, 330, 600, 600, 600, 600, 600, 540, 540, 540, 540, 540, 330, 330, 330, 330, 330, 1080, 1080, 1080, 1080, 1080, 330, 330, 330, 330, 330, 600, 600, 600, 600, 600, -46, -46, 98, 98, -46, -46, 266, 266, 266, 266, 52, 52, 70, 70, 94, 94, 52, 52, 266, 266, 266, 266, 238, 238, 406, 406, 238, 238, -118, -118, 188, 188, -118, -118, 545, 545, 545, 545, 52, 52, 70, 70, 106, 106, 124, 124, 94, 94, 52, 52, 202, 202, 52, 52, 106, 106, 293, 293, 293, 293, 265, 265, 433, 433, 265, 265, 545, 545, 545, 545, 265, 265, 481, 481, 433, 433, 265, 265, 865, 865, 265, 265, 481, 481, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -376, -172, 236, -70, 236, -376, -172, 950, 950, -70, 236, -70, 593, 593, 34, 46, 70, 52, 70, 88, 100, 124, 106, 124, 76, 88, 34, 46, 184, 196, 34, 46, 88, 100, 509, 509, 460, 754, 460, 950, 950, 460, 838, 754, 460, 1510, 460, 838, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -118, 188, -118, 545, 545, 52, 70, 106, 124, 94, 52, 202, 52, 106, 293, 293, 265, 433, 265, 545, 545, 265, 481, 433, 265, 865, 265, 481, -87, -87, -55, -151, -55, 105, 105, -39, 105, -183, -87, 105, -39, 105, -87, -87, -55, -151, -55, 329, 329, 329, 329, -39, 105, -39, 273, 273, -183, -87, 105, -39, 105, -183, -87, 441, 441, -39, 105, -39, 273, 273, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 329, 329, 329, 329, 294, 294, 504, 504, 294, 294, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -204, -204, -136, -340, -136, 204, 204, -102, 204, -408, -204, 204, -102, 204, -204, -204, -136, -340, -136, 680, 680, 680, 680, -102, 204, -102, 561, 561, -408, -204, 204, -102, 204, -408, -204, 918, 918, -102, 204, -102, 561, 561, 46, 46, 50, 38, 50, 70, 70, 52, 70, 34, 46, 70, 52, 70, 100, 100, 104, 92, 104, 124, 124, 106, 124, 88, 100, 124, 106, 124, 88, 88, 92, 80, 92, 46, 46, 50, 38, 50, 196, 196, 200, 188, 200, 46, 46, 50, 38, 50, 100, 100, 104, 92, 104, 365, 365, 365, 365, 330, 330, 540, 540, 330, 330, 680, 680, 680, 680, 330, 330, 600, 600, 540, 540, 330, 330, 1080, 1080, 330, 330, 600, 600, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -118, 188, -118, 545, 545, 52, 70, 106, 124, 94, 52, 202, 52, 106, 293, 293, 265, 433, 265, 545, 545, 265, 481, 433, 265, 865, 265, 481, -169, -73, 119, -25, 119, -169, -73, 455, 455, -25, 119, -25, 287, 287, 34, 46, 70, 52, 70, 76, 88, 34, 46, 455, 455, 406, 700, 406, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -376, -172, 236, -70, 236, -376, -172, 950, 950, -70, 236, -70, 593, 593, 34, 46, 70, 52, 70, 88, 100, 124, 106, 124, 76, 88, 34, 46, 184, 196, 34, 46, 88, 100, 509, 509, 460, 754, 460, 950, 950, 460, 838, 754, 460, 1510, 460, 838, -46, 98, -46, 266, 266, 52, 70, 94, 52, 266, 266, 238, 406, 238, -118, 188, -118, 545, 545, 52, 70, 106, 124, 94, 52, 202, 52, 106, 293, 293, 265, 433, 265, 545, 545, 265, 481, 433, 265, 865, 265, 481])\n assert answers_match(candidate(expression='100-50*2+25'), [-1250, -25, 1350, 25, 125])\n assert answers_match(candidate(expression='8*7+6-5*4+3'), [-176, -80, 112, -32, 112, -176, -80, 448, 448, -32, 112, -32, 280, 280, 27, 39, 63, 45, 63, 69, 81, 27, 39, 448, 448, 399, 693, 399, -53, 91, -53, 259, 259, 45, 63, 87, 45, 259, 259, 231, 399, 231])\n assert answers_match(candidate(expression='99*99-99+99'), [-9801, 9801, 9603, 99, 9801])\n assert answers_match(candidate(expression='4*3-2+1-5*6+7'), [260, 148, 212, 92, 72, 260, 148, 116, 116, 92, 72, 92, 32, 32, -252, -140, -204, -84, -64, -260, -148, -252, -140, 260, 260, -156, -260, -156, 148, 128, 148, 88, 88, -84, -64, -92, -84, 148, 148, -44, -92, -44, 74, 46, 62, 32, 27, 74, 46, 38, 38, 32, 27, 32, 17, 17, -60, -32, -48, -18, -13, -54, -26, -42, -12, -7, -65, -37, -57, -29, -56, -28, -60, -32, -54, -26, 260, 260, -156, -260, -156, 182, 182, 0, 78, -65, 39, 52, 0, 78, 127, 107, 127, 67, 67, -105, -85, -113, -105, 127, 127, -65, -113, -65, 46, 41, 46, 31, 31, -18, -13, -12, -7, -23, -15, -14, -18, -12, 127, 127, -65, -113, -65, 91, 91, 7, 43, -23, 25, 31, 7, 43])\n assert answers_match(candidate(expression='9*8*7-6*5*4+3*2*1'), [-21096, -21096, -29736, -21096, -29736, -10728, -10728, -29736, -19368, -21096, -29736, -10728, -29736, -19368, -21096, -21096, -29736, -21096, -29736, -8568, -8568, -8568, -8568, -29736, -19368, -29736, -17208, -17208, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 3600, 5040, 3600, 5040, 1872, 1872, 5040, 3312, 3600, 5040, 1872, 5040, 3312, -16560, -16560, -23184, -16560, -23184, 3600, 3600, 5040, 3600, 5040, -7704, -7704, -7704, -7704, 1872, 1872, -6192, -6192, 1872, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 5040, 1872, 5040, 3312, -16560, -23184, 3600, 5040, -7704, -7704, 1872, -6192, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2196, -2196, -3276, -2196, -3276, -900, -900, -3276, -1980, -2196, -3276, -900, -3276, -1980, -2196, -2196, -3276, -2196, -3276, -630, -630, -630, -630, -3276, -1980, -3276, -1710, -1710, -2196, -3276, -900, -3276, -1980, -2196, -3276, -630, -630, -3276, -1980, -3276, -1710, -1710, 3600, 3600, 5040, 3600, 5040, 1872, 1872, 5040, 3312, 3600, 5040, 1872, 5040, 3312, 22500, 22500, 31500, 22500, 31500, 11700, 11700, 31500, 20700, 22500, 31500, 11700, 31500, 20700, -16560, -16560, -23184, -16560, -23184, 3600, 3600, 5040, 3600, 5040, 2340, 2340, 3276, 2340, 3276, 3600, 3600, 5040, 3600, 5040, 22500, 22500, 31500, 22500, 31500, -8082, -8082, -8082, -8082, 1494, 1494, -6570, -6570, 1494, 1494, -522, -522, -522, -522, 1494, 1494, 9054, 9054, -6570, -6570, 1494, 1494, 990, 990, 1494, 1494, 9054, 9054, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2772, -1476, -2772, -1206, -1206, 5040, 3312, 31500, 20700, -23184, 5040, 3276, 5040, 31500, -16218, -16218, 2934, -13194, 2934, -1098, -1098, 2934, 18054, -13194, 2934, 1926, 2934, 18054, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 5040, 1872, 5040, 3312, -16560, -23184, 3600, 5040, -7704, -7704, 1872, -6192, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2196, -3276, -900, -3276, -1980, -2196, -3276, -630, -630, -3276, -1980, -3276, -1710, -1710, 3600, 5040, 1872, 5040, 3312, 22500, 31500, 11700, 31500, 20700, -16560, -23184, 3600, 5040, 2340, 3276, 3600, 5040, 22500, 31500, -8082, -8082, 1494, -6570, 1494, -522, -522, 1494, 9054, -6570, 1494, 990, 1494, 9054, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2772, -1476, -2772, -1206, -1206, 5040, 3312, 31500, 20700, -23184, 5040, 3276, 5040, 31500, -16218, -16218, 2934, -13194, 2934, -1098, -1098, 2934, 18054, -13194, 2934, 1926, 2934, 18054, -21096, -21096, -29736, -21096, -29736, -10728, -10728, -29736, -19368, -21096, -29736, -10728, -29736, -19368, -21096, -21096, -29736, -21096, -29736, -8568, -8568, -8568, -8568, -29736, -19368, -29736, -17208, -17208, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 3600, 5040, 3600, 5040, 1872, 1872, 5040, 3312, 3600, 5040, 1872, 5040, 3312, -16560, -16560, -23184, -16560, -23184, 3600, 3600, 5040, 3600, 5040, -7704, -7704, -7704, -7704, 1872, 1872, -6192, -6192, 1872, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 5040, 1872, 5040, 3312, -16560, -23184, 3600, 5040, -7704, -7704, 1872, -6192, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, 204, 204, 84, 204, 84, 348, 348, 84, 228, 204, 84, 348, 84, 228, 204, 204, 84, 204, 84, 378, 378, 378, 378, 84, 228, 84, 258, 258, 204, 84, 348, 84, 228, 204, 84, 378, 378, 84, 228, 84, 258, 258, 204, 204, 84, 204, 84, 348, 348, 84, 228, 204, 84, 348, 84, 228, 204, 204, 84, 204, 84, 378, 378, 378, 378, 84, 228, 84, 258, 258, 204, 84, 348, 84, 228, 204, 84, 378, 378, 84, 228, 84, 258, 258, 3600, 3600, 5040, 3600, 5040, 1872, 1872, 5040, 3312, 3600, 5040, 1872, 5040, 3312, 22500, 22500, 31500, 22500, 31500, 11700, 11700, 31500, 20700, 22500, 31500, 11700, 31500, 20700, 3600, 3600, 5040, 3600, 5040, 1872, 1872, 5040, 3312, 3600, 5040, 1872, 5040, 3312, 24900, 24900, 34860, 24900, 34860, 12948, 12948, 34860, 22908, 24900, 34860, 12948, 34860, 22908, 24900, 24900, 34860, 24900, 34860, 12948, 12948, 34860, 22908, 24900, 34860, 12948, 34860, 22908, -16560, -16560, -23184, -16560, -23184, 3600, 3600, 5040, 3600, 5040, 2340, 2340, 3276, 2340, 3276, 3600, 3600, 5040, 3600, 5040, 22500, 22500, 31500, 22500, 31500, -16560, -16560, -23184, -16560, -23184, 3600, 3600, 5040, 3600, 5040, 4740, 4740, 6636, 4740, 6636, 4740, 4740, 6636, 4740, 6636, 3600, 3600, 5040, 3600, 5040, 22500, 22500, 31500, 22500, 31500, 3600, 3600, 5040, 3600, 5040, 24900, 24900, 34860, 24900, 34860, 24900, 24900, 34860, 24900, 34860, -8130, -8130, -8130, -8130, 1446, 1446, -6618, -6618, 1446, 1446, -570, -570, -570, -570, 1446, 1446, 9006, 9006, -6618, -6618, 1446, 1446, 942, 942, 1446, 1446, 9006, 9006, -8130, -8130, -8130, -8130, 1446, 1446, -6618, -6618, 1446, 1446, 390, 390, 390, 390, 390, 390, 390, 390, 1446, 1446, 9006, 9006, 1446, 1446, 9966, 9966, 9966, 9966, -6618, -6618, 1446, 1446, 942, 942, 1446, 1446, 9006, 9006, -6618, -6618, 1446, 1446, 1902, 1902, 1902, 1902, 1446, 1446, 9006, 9006, 1446, 1446, 9966, 9966, 9966, 9966, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2772, -1476, -2772, -1206, -1206, 5040, 3312, 31500, 20700, -23184, 5040, 3276, 5040, 31500, -16218, -16218, 2934, -13194, 2934, -1098, -1098, 2934, 18054, -13194, 2934, 1926, 2934, 18054, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, 588, 732, 588, 762, 762, 588, 732, 588, 762, 762, 5040, 3312, 31500, 20700, 5040, 3312, 34860, 22908, 34860, 22908, -23184, 5040, 3276, 5040, 31500, -23184, 5040, 6636, 6636, 5040, 31500, 5040, 34860, 34860, -16266, -16266, 2886, -13242, 2886, -1146, -1146, 2886, 18006, -13242, 2886, 1878, 2886, 18006, -16266, -16266, 2886, -13242, 2886, 774, 774, 774, 774, 2886, 18006, 2886, 19926, 19926, -13242, 2886, 1878, 2886, 18006, -13242, 2886, 3798, 3798, 2886, 18006, 2886, 19926, 19926, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 5040, 1872, 5040, 3312, -16560, -23184, 3600, 5040, -7704, -7704, 1872, -6192, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2196, -3276, -900, -3276, -1980, -2196, -3276, -630, -630, -3276, -1980, -3276, -1710, -1710, 3600, 5040, 1872, 5040, 3312, 22500, 31500, 11700, 31500, 20700, -16560, -23184, 3600, 5040, 2340, 3276, 3600, 5040, 22500, 31500, -8082, -8082, 1494, -6570, 1494, -522, -522, 1494, 9054, -6570, 1494, 990, 1494, 9054, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2772, -1476, -2772, -1206, -1206, 5040, 3312, 31500, 20700, -23184, 5040, 3276, 5040, 31500, -16218, -16218, 2934, -13194, 2934, -1098, -1098, 2934, 18054, -13194, 2934, 1926, 2934, 18054, -21096, -29736, -10728, -29736, -19368, -21096, -29736, -8568, -8568, -29736, -19368, -29736, -17208, -17208, 3600, 5040, 1872, 5040, 3312, -16560, -23184, 3600, 5040, -7704, -7704, 1872, -6192, 1872, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, 204, 84, 348, 84, 228, 204, 84, 378, 378, 84, 228, 84, 258, 258, 204, 84, 348, 84, 228, 204, 84, 378, 378, 84, 228, 84, 258, 258, 3600, 5040, 1872, 5040, 3312, 22500, 31500, 11700, 31500, 20700, 3600, 5040, 1872, 5040, 3312, 24900, 34860, 12948, 34860, 22908, 24900, 34860, 12948, 34860, 22908, -16560, -23184, 3600, 5040, 2340, 3276, 3600, 5040, 22500, 31500, -16560, -23184, 3600, 5040, 4740, 6636, 4740, 6636, 3600, 5040, 22500, 31500, 3600, 5040, 24900, 34860, 24900, 34860, -8130, -8130, 1446, -6618, 1446, -570, -570, 1446, 9006, -6618, 1446, 942, 1446, 9006, -8130, -8130, 1446, -6618, 1446, 390, 390, 390, 390, 1446, 9006, 1446, 9966, 9966, -6618, 1446, 942, 1446, 9006, -6618, 1446, 1902, 1902, 1446, 9006, 1446, 9966, 9966, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, -2772, -1476, -2772, -1206, -1206, 5040, 3312, 31500, 20700, -23184, 5040, 3276, 5040, 31500, -16218, -16218, 2934, -13194, 2934, -1098, -1098, 2934, 18054, -13194, 2934, 1926, 2934, 18054, -29232, -18864, -29232, -16704, -16704, 5040, 3312, -23184, 5040, -15840, -15840, 3312, -12816, 3312, 588, 732, 588, 762, 762, 588, 732, 588, 762, 762, 5040, 3312, 31500, 20700, 5040, 3312, 34860, 22908, 34860, 22908, -23184, 5040, 3276, 5040, 31500, -23184, 5040, 6636, 6636, 5040, 31500, 5040, 34860, 34860, -16266, -16266, 2886, -13242, 2886, -1146, -1146, 2886, 18006, -13242, 2886, 1878, 2886, 18006, -16266, -16266, 2886, -13242, 2886, 774, 774, 774, 774, 2886, 18006, 2886, 19926, 19926, -13242, 2886, 1878, 2886, 18006, -13242, 2886, 3798, 3798, 2886, 18006, 2886, 19926, 19926])\n assert answers_match(candidate(expression='7+8*3-2*5+6'), [-145, -97, 95, -1, 95, 9, 15, 95, 249, -43, 53, 27, 53, 123, -285, -195, 165, -15, 165, 9, 15, 23, 29, 165, 319, 165, 319, 473, -43, 53, 27, 53, 123, -99, 81, 27, 41, 81, 151, 81, 151, 221])\n assert answers_match(candidate(expression='1+2-3*4+5-6*7+8'), [246, 126, 36, 78, -12, 246, 126, -132, -132, 78, -12, 78, -84, -84, 76, 36, 6, 20, -10, 66, 26, 76, 36, -132, -132, -162, -312, -162, 94, 4, 94, -68, -68, 20, -10, 10, 20, -68, -68, -82, -152, -82, 82, 42, 12, 26, -4, 82, 42, -44, -44, 26, -4, 26, -28, -28, -94, -54, -24, -38, -8, -88, -48, -18, -32, -2, -114, -74, -104, -64, -98, -58, -94, -54, -88, -48, -104, -104, -134, -284, -134, -44, -44, -164, -74, -464, -314, -224, -164, -74, 110, 20, 110, -52, -52, 36, 6, 26, 36, -52, -52, -66, -136, -66, 42, 12, 42, -12, -12, -38, -8, -32, -2, -58, -48, -42, -38, -32, -40, -40, -54, -124, -54, -12, -12, -68, -26, -208, -138, -96, -68, -26, 246, 126, 36, 78, -12, 246, 126, -132, -132, 78, -12, 78, -84, -84, 76, 36, 6, 20, -10, 66, 26, 76, 36, -132, -132, -162, -312, -162, 94, 4, 94, -68, -68, 20, -10, 10, 20, -68, -68, -82, -152, -82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -94, -54, -24, -38, -8, -88, -48, -18, -32, -2, -94, -54, -24, -38, -8, -85, -45, -15, -29, 1, -85, -45, -15, -29, 1, -114, -74, -104, -64, -98, -58, -94, -54, -88, -48, -114, -74, -104, -64, -90, -50, -90, -50, -94, -54, -88, -48, -94, -54, -85, -45, -85, -45, -90, -90, -120, -270, -120, -30, -30, -150, -60, -450, -300, -210, -150, -60, -90, -90, -120, -270, -120, 0, 0, 0, 0, -150, -60, -150, -15, -15, -450, -300, -210, -150, -60, -450, -300, -90, -90, -150, -60, -150, -15, -15, 110, 20, 110, -52, -52, 36, 6, 26, 36, -52, -52, -66, -136, -66, 42, 12, 42, -12, -12, -38, -8, -32, -2, -58, -48, -42, -38, -32, -40, -40, -54, -124, -54, -12, -12, -68, -26, -208, -138, -96, -68, -26, 110, 20, 110, -52, -52, 36, 6, 26, 36, -52, -52, -66, -136, -66, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, -38, -8, -32, -2, -38, -8, -29, 1, -29, 1, -58, -48, -42, -38, -32, -58, -48, -34, -34, -38, -32, -38, -29, -29, -34, -34, -48, -118, -48, -6, -6, -62, -20, -202, -132, -90, -62, -20, -34, -34, -48, -118, -48, 8, 8, 8, 8, -62, -20, -62, 1, 1, -202, -132, -90, -62, -20, -202, -132, -34, -34, -62, -20, -62, 1, 1])\n assert answers_match(candidate(expression='1+2+3+4+5+6+7+8+9'), [45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45])\n assert answers_match(candidate(expression='2*3+4*5-6*7+8'), [-674, -354, -114, -226, 14, -134, -54, -114, 426, -274, -34, -22, -34, 218, -1190, -630, -210, -406, 14, -134, -54, -110, -30, -30, 510, -210, 510, 870, -274, -34, -22, -34, 218, -502, -82, -22, 2, 2, 254, -82, 254, 422, -334, -174, -54, -110, 10, -64, -24, -54, 216, -134, -14, -8, -14, 112, -1190, -630, -210, -406, 14, -850, -450, -150, -290, 10, -44, -4, -20, 20, -64, -24, -20, 20, -40, 0, -30, 510, -210, 510, 870, 30, 300, -210, -150, 600, 960, 300, 960, 660, -282, -42, -30, -42, 210, -510, -90, -30, -6, -6, 246, -90, 246, 414, -134, -14, -8, -14, 112, -510, -90, -362, -62, 12, 36, -8, 36, 16, -6, 246, -90, 246, 414, 22, 148, -90, -62, 288, 456, 148, 456, 316])\n assert answers_match(candidate(expression='9-8+7*6-5+4*3-2+1'), [-6, 50, 57, 29, 71, -41, 85, 57, 127, 29, 71, 29, 71, 141, -6, -62, -69, -41, -83, 1, 43, 1, -69, 99, 169, -69, 85, -83, 15, 57, 15, 57, 127, -41, -83, 15, -41, 85, 155, -83, 71, -97, -36, -28, -27, -31, -25, -41, -23, -27, -17, -31, -25, -31, -25, -15, -6, -14, -15, -11, -17, -36, -44, -45, -41, -47, 1, 43, 1, -69, 1, -65, 1, -21, 1, -81, 81, 151, -87, 67, -101, -21, -11, -15, -45, 67, -101, -95, -29, -119, 21, 63, 21, 63, 133, -35, -77, 21, -35, 91, 161, -77, 77, -91, -33, -27, -33, -27, -17, -11, -17, -41, -47, 21, -35, -33, -11, -41, 79, 149, -89, 65, -103, -23, -13, -17, -47, 65, -103, -97, -31, -121, -6, 114, 129, 69, 159, -81, 189, 129, 279, 69, 159, 69, 159, 309, -6, -126, -141, -81, -171, 9, 99, 9, -141, 219, 369, -141, 189, -171, 39, 129, 39, 129, 279, -81, -171, 39, -81, 189, 339, -171, 159, -201, -36, -28, -27, -31, -25, -41, -23, -27, -17, -31, -25, -31, -25, -15, -76, -68, -67, -71, -65, -81, -63, -67, -57, -71, -65, -71, -65, -55, -6, -14, -15, -11, -17, -36, -44, -45, -41, -47, -6, -14, -15, -11, -17, -36, -44, -45, -41, -47, -76, -84, -85, -81, -87, 9, 35, 9, -77, 9, -73, 9, -29, 9, -89, 9, 99, 9, -141, 9, -73, 9, -153, 9, -29, 9, -89, 9, -29, 9, -89, 9, -169, 81, 151, -87, 67, -101, -21, -11, -15, -45, 67, -101, -95, -29, -119, 177, 327, -183, 147, -213, -21, -11, -61, -51, -15, -45, -15, -45, -85, 51, -117, -111, -45, -135, 147, -213, -111, -231, -45, -135, -45, -135, -255, 21, 63, 21, 63, 133, -35, -77, 21, -35, 91, 161, -77, 77, -91, -33, -27, -33, -27, -17, -11, -17, -41, -47, 21, -35, -33, -11, -41, 79, 149, -89, 65, -103, -23, -13, -17, -47, 65, -103, -97, -31, -121, 53, 143, 53, 143, 293, -67, -157, 53, -67, 203, 353, -157, 173, -187, -33, -27, -33, -27, -17, -73, -67, -73, -67, -57, -11, -17, -41, -47, -11, -17, -41, -47, -81, -87, 21, -35, -33, -11, -41, 53, -67, -33, -73, -11, -41, -11, -41, -81, 79, 149, -89, 65, -103, -23, -13, -17, -47, 65, -103, -97, -31, -121, 175, 325, -185, 145, -215, -23, -13, -63, -53, -17, -47, -17, -47, -87, 49, -119, -113, -47, -137, 145, -215, -113, -233, -47, -137, -47, -137, -257, 8, -48, -55, -27, -69, 43, -83, -55, -125, -27, -69, -27, -69, -139, 8, 64, 71, 43, 85, 1, -41, 1, 71, -97, -167, 71, -83, 85, -13, -55, -13, -55, -125, 43, 85, -13, 43, -83, -153, 85, -69, 99, 38, 30, 29, 33, 27, 43, 25, 29, 19, 33, 27, 33, 27, 17, 8, 16, 17, 13, 19, 38, 46, 47, 43, 49, 1, -41, 1, 71, 1, 67, 1, 23, 1, 83, -79, -149, 89, -65, 103, 23, 13, 17, 47, -65, 103, 97, 31, 121, -19, -61, -19, -61, -131, 37, 79, -19, 37, -89, -159, 79, -75, 93, 35, 29, 35, 29, 19, 13, 19, 43, 49, -19, 37, 35, 13, 43, -77, -147, 91, -63, 105, 25, 15, 19, 49, -63, 105, 99, 33, 123, -6, 42, 48, 24, 60, -36, 72, 48, 108, 24, 60, 24, 60, 120, -6, -54, -60, -36, -72, 0, 36, 0, -60, 84, 144, -60, 72, -72, 12, 48, 12, 48, 108, -36, -72, 12, -36, 72, 132, -72, 60, -84, 8, -56, -64, -32, -80, 48, -96, -64, -144, -32, -80, -32, -80, -160, 8, 72, 80, 48, 96, 0, -48, 0, 80, -112, -192, 80, -96, 96, -16, -64, -16, -64, -144, 48, 96, -16, 48, -96, -176, 96, -80, 112, -46, -54, -55, -51, -57, -41, -59, -55, -65, -51, -57, -51, -57, -67, -86, -94, -95, -91, -97, -81, -99, -95, -105, -91, -97, -91, -97, -107, 38, 30, 29, 33, 27, 43, 25, 29, 19, 33, 27, 33, 27, 17, -41, -49, -50, -46, -52, -36, -54, -50, -60, -46, -52, -46, -52, -62, 43, 35, 34, 38, 32, 48, 30, 34, 24, 38, 32, 38, 32, 22, -6, 2, 3, -1, 5, -36, -28, -27, -31, -25, -6, 2, 3, -1, 5, -36, -28, -27, -31, -25, -76, -68, -67, -71, -65, 8, 16, 17, 13, 19, 38, 46, 47, 43, 49, -6, 2, 3, -1, 5, 8, 16, 17, 13, 19, -46, -38, -37, -41, -35, -86, -78, -77, -81, -75, 38, 46, 47, 43, 49, -41, -33, -32, -36, -30, 43, 51, 52, 48, 54, 0, 44, 0, -68, 0, -64, 0, -20, 0, -80, 0, 108, 0, -132, 0, -64, 0, -144, 0, -20, 0, -80, 0, -20, 0, -80, 0, -160, 0, -40, 0, 72, 0, 68, 0, 24, 0, 84, 0, 36, 0, -60, 0, -48, 0, 80, 0, -100, 0, -180, 0, 68, 0, -90, 0, 78, 0, -4, 0, -64, 0, -4, 0, -64, 0, -144, 0, 24, 0, 84, 0, -4, 0, 24, 0, -84, 0, -164, 0, 84, 0, -74, 0, 94, 75, 145, -93, 61, -107, -27, -17, -21, -51, 61, -107, -101, -35, -125, 171, 321, -189, 141, -219, -27, -17, -67, -57, -21, -51, -21, -51, -91, 45, -123, -117, -51, -141, 141, -219, -117, -237, -51, -141, -51, -141, -261, -79, -149, 89, -65, 103, 23, 13, 17, 47, -65, 103, 97, 31, 121, 63, 123, -81, 51, -93, -91, -171, 101, -75, 117, -61, -71, -101, -111, 23, 13, -56, -66, 28, 18, 3, -27, 3, -27, -67, 17, 47, 3, 17, -37, -77, 47, -32, 52, 63, -105, -99, -33, -123, 159, -201, -99, -219, -33, -123, -33, -123, -243, -63, 105, 99, 33, 123, 51, -93, -75, 117, -153, -273, 99, -138, 114, -9, -99, -9, -99, -219, 33, 123, -9, 33, -129, -249, 123, -114, 138, 23, 65, 23, 65, 135, -33, -75, 23, -33, 93, 163, -75, 79, -89, -31, -25, -31, -25, -15, -9, -15, -39, -45, 23, -33, -31, -9, -39, 81, 151, -87, 67, -101, -21, -11, -15, -45, 67, -101, -95, -29, -119, 55, 145, 55, 145, 295, -65, -155, 55, -65, 205, 355, -155, 175, -185, -31, -25, -31, -25, -15, -71, -65, -71, -65, -55, -9, -15, -39, -45, -9, -15, -39, -45, -79, -85, 23, -33, -31, -9, -39, 55, -65, -31, -71, -9, -39, -9, -39, -79, 81, 151, -87, 67, -101, -21, -11, -15, -45, 67, -101, -95, -29, -119, 177, 327, -183, 147, -213, -21, -11, -61, -51, -15, -45, -15, -45, -85, 51, -117, -111, -45, -135, 147, -213, -111, -231, -45, -135, -45, -135, -255, -19, -61, -19, -61, -131, 37, 79, -19, 37, -89, -159, 79, -75, 93, 35, 29, 35, 29, 19, 13, 19, 43, 49, -19, 37, 35, 13, 43, -77, -147, 91, -63, 105, 25, 15, 19, 49, -63, 105, 99, 33, 123, 19, 55, 19, 55, 115, -29, -65, 19, -29, 79, 139, -65, 67, -77, -23, -71, -23, -71, -151, 41, 89, -23, 41, -103, -183, 89, -87, 105, -49, -55, -49, -55, -65, -89, -95, -89, -95, -105, 35, 29, 35, 29, 19, -44, -50, -44, -50, -60, 40, 34, 40, 34, 24, -1, 5, -31, -25, -1, 5, -31, -25, -71, -65, 13, 19, 43, 49, -1, 5, 13, 19, -41, -35, -81, -75, 43, 49, -36, -30, 48, 54, 23, -33, -31, -9, -39, 55, -65, -31, -71, -9, -39, -9, -39, -79, -19, 37, 35, 13, 43, 19, -29, -23, 41, -49, -89, 35, -44, 40, -1, -31, -1, -31, -71, 13, 43, -1, 13, -41, -81, 43, -36, 48, 77, 147, -91, 63, -105, -25, -15, -19, -49, 63, -105, -99, -33, -123, 173, 323, -187, 143, -217, -25, -15, -65, -55, -19, -49, -19, -49, -89, 47, -121, -115, -49, -139, 143, -217, -115, -235, -49, -139, -49, -139, -259, -77, -147, 91, -63, 105, 25, 15, 19, 49, -63, 105, 99, 33, 123, 65, 125, -79, 53, -91, -89, -169, 103, -73, 119, -59, -69, -99, -109, 25, 15, -54, -64, 30, 20, 5, -25, 5, -25, -65, 19, 49, 5, 19, -35, -75, 49, -30, 54, 65, -103, -97, -31, -121, 161, -199, -97, -217, -31, -121, -31, -121, -241, -61, 107, 101, 35, 125, 53, -91, -73, 119, -151, -271, 101, -136, 116, -7, -97, -7, -97, -217, 35, 125, -7, 35, -127, -247, 125, -112, 140])\n assert answers_match(candidate(expression='6*5-4*3+2*1'), [-90, -90, -54, -90, -54, 30, 30, -30, 30, -90, -54, 30, -30, 30, 10, 10, 16, 10, 16, 30, 30, 130, 130, -40, 20, 20, 20, 80, -90, -54, 30, -30, 30, 10, 16, 30, 130, -40, 20, 20, 20, 80])\n assert answers_match(candidate(expression='3-5+8*2-1+4*6'), [182, 222, -202, 142, -242, 7, 12, -34, -41, 142, -242, -68, -74, -116, 302, 367, -322, 237, -387, 7, 12, 2, 7, -34, -41, -34, -41, -46, 117, -267, -93, -99, -141, 237, -387, -93, -123, -99, -141, -99, -141, -171, -186, -226, 198, -146, 238, -11, -16, 30, 37, -146, 238, 64, 70, 112, 230, 280, -250, 180, -300, -138, -168, 150, -108, 180, -43, -48, -48, -53, -11, -16, -45, -50, -13, -18, 14, 7, 14, 7, 2, 30, 37, 14, 30, 5, 0, 37, 3, 35, 132, -252, -78, -84, -126, 252, -372, -78, -108, -84, -126, -84, -126, -156, -156, 228, 54, 60, 102, 180, -300, -108, 180, -138, -168, 54, -150, 42, -36, -78, -36, -78, -108, 60, 102, -36, 60, -90, -120, 102, -102, 90])\n assert answers_match(candidate(expression='100-99+98-97+96'), [96, -96, 96, -96, -96, -94, 98, -290, -94, 96, 96, 98, -98, 98])\n assert answers_match(candidate(expression='9-3+4-2*3'), [8, 0, 8, -6, -6, 4, 12, -4, 4, 12, 12, 24, 0, 24])\n assert answers_match(candidate(expression='1+1*1+1*1*1+1-1*1'), [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 5, 5, 5, 5, 7, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6, 6, 6, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 5, 5, 5, 5, 7, 5, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 3, 3])\n assert answers_match(candidate(expression='1*2+3*4-5*6+7'), [-181, -97, -37, -55, 5, -51, -23, -37, 93, -69, -9, -9, -9, 51, -305, -165, -65, -95, 5, -51, -23, -45, -17, -13, 117, -65, 117, 195, -69, -9, -9, -9, 51, -123, -23, -9, -3, 1, 61, -23, 61, 97, -181, -97, -37, -55, 5, -51, -23, -37, 93, -69, -9, -9, -9, 51, -305, -165, -65, -95, 5, -305, -165, -65, -95, 5, -51, -23, -45, -17, -51, -23, -45, -17, -45, -17, -13, 117, -65, 117, 195, -13, 117, -65, -65, 117, 195, 117, 195, 195, -69, -9, -9, -9, 51, -123, -23, -9, -3, 1, 61, -23, 61, 97, -69, -9, -9, -9, 51, -123, -23, -123, -23, -9, -3, -9, -3, -3, 1, 61, -23, 61, 97, 1, 61, -23, -23, 61, 97, 61, 97, 97])\n", "comparison": "unordered"}, "public_tests": ["\"2-1-1\"", "\"2*3-4*5\""], "hints": [], "metadata": {"canonical_parameter_names": ["expression"], "leetcode_dataset_entry_point": "Solution().diffWaysToCompute", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:11+00:00", "tests_total": 189, "tests_dropped": 75, "flags": ["any_order"], "topic_tags": ["math", "string", "dynamic-programming", "recursion", "memoization", "bracket-sequences"]}, "language": "ruby", "interface": {"raw_signature": "def diff_ways_to_compute(expression)", "container": null, "callable": "diff_ways_to_compute", "parameters": [{"name": "expression", "type": "String"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 242, "task_id": "valid-anagram", "difficulty": "Easy", "problem_description": "Given two strings s and t, return true if t is an anagram of s, and false otherwise.\n\nExample 1:\n\nInput: s = \"anagram\", t = \"nagaram\"\nOutput: true\n\nExample 2:\n\nInput: s = \"rat\", t = \"car\"\nOutput: false\n\nConstraints:\n\n- 1 <= s.length, t.length <= 5 * 10^4\n- s and t consist of lowercase English letters.\n\nFollow up: What if the inputs contain Unicode characters? How would you adapt your solution to such a case?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"zyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s = \"abcde\",t = \"edcba\") == True\n assert candidate(s = \"abc\",t = \"abcd\") == False\n assert candidate(s = \"apple\",t = \"pale\") == False\n assert candidate(s = \"hello\",t = \"bello\") == False\n assert candidate(s = \"aacc\",t = \"ccac\") == False\n assert candidate(s = \"abc\",t = \"def\") == False\n assert candidate(s = \"abc\",t = \"cba\") == True\n assert candidate(s = \"abcd\",t = \"abce\") == False\n assert candidate(s = \"anagram\",t = \"nagaram\") == True\n assert candidate(s = \"rat\",t = \"car\") == False\n assert candidate(s = \"a\",t = \"a\") == True\n assert candidate(s = \"ab\",t = \"ba\") == True\n assert candidate(s = \"listen\",t = \"silent\") == True\n assert candidate(s = \"abcd\",t = \"dcba\") == True\n assert candidate(s = \"triangle\",t = \"integral\") == True\n assert candidate(s = \"aabbcc\",t = \"abcabc\") == True\n assert candidate(s = \"ababababababababab\",t = \"bababababababababa\") == True\n assert candidate(s = \"theeyes\",t = \"theysee\") == True\n assert candidate(s = \"repeatedcharactershere\",t = \"repeatedcharactershere\") == True\n assert candidate(s = \"ababababab\",t = \"bababababa\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzxxyywwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(s = \"astronomer\",t = \"moonstarer\") == True\n assert candidate(s = \"thisisananagram\",t = \"isanagramthis\") == False\n assert candidate(s = \"aabbcc\",t = \"ccbbaa\") == True\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnooooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz\",t = \"zzzzyyyxxxwwwwvvvvuuuuttttssssrrrrqqqqppppooooonnnnmmmmllllkkkkjjjjiiiigggghhhhffffffeeeeeeeeddccccbbbbaaaa\") == False\n assert candidate(s = \"anagram\",t = \"nagarams\") == False\n assert candidate(s = \"dormitory\",t = \"dirtyroom\") == True\n assert candidate(s = \"anananana\",t = \"naanaanna\") == True\n assert candidate(s = \"thisisanagramtest\",t = \"agamnartisiesttst\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(s = \"aabbcc\",t = \"aabbc\") == False\n assert candidate(s = \"thisisaverylongstringthatwearetesting\",t = \"averylongstringthatwearetestingthisis\") == True\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",t = \"godzylathedelvropmusfixnworbquickthe\") == False\n assert candidate(s = \"thisisananagram\",t = \"isananagramthis\") == True\n assert candidate(s = \"unitedstates\",t = \"adtenisestatesu\") == False\n assert candidate(s = \"mississippi\",t = \"mississipi\") == False\n assert candidate(s = \"elevenplus\",t = \"twelvestop\") == False\n assert candidate(s = \"a\",t = \"b\") == False\n assert candidate(s = \"anagramanagramanagram\",t = \"nagaramnagaramnagaram\") == True\n assert candidate(s = \"aabbccdd\",t = \"ddbbaacc\") == True\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",t = \"quickbrownfoxjumpsoverthelazydoga\") == True\n assert candidate(s = \"abcdeabced\",t = \"abcedabcde\") == True\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",t = \"thelazydogjumpsoveraquickbrownfox\") == True\n assert candidate(s = \"pythonprogramming\",t = \"nohtypgnimmargorp\") == True\n assert candidate(s = \"aquickbrownfoxjumpsoverthelazydog\",t = \"quickbrownfoxjumpsoverthelazygod\") == False\n assert candidate(s = \"noon\",t = \"noon\") == True\n assert candidate(s = \"anagrammatic\",t = \"icnagarammat\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zyxwvutsrqponmlkjihgfedcba\") == False\n assert candidate(s = \"abacabadabacaba\",t = \"bacabacabacaba\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggeeffddeebbaa\") == False\n assert candidate(s = \"conversation\",t = \"voicesranton\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggeeffddccbbbaa\") == False\n assert candidate(s = \"anagramanagram\",t = \"nagaramnagaram\") == True\n assert candidate(s = \"night\",t = \"thing\") == True\n assert candidate(s = \"aaabbbccc\",t = \"bbbaaacc\") == False\n assert candidate(s = \"samecharacters\",t = \"charactersames\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyxwvuttsrqponmlkjihgfeddcbaabbccddeeffgghhiijjkkllmmnnooppqqrrss\") == False\n assert candidate(s = \"mississippi\",t = \"ssmissippii\") == True\n assert candidate(s = \"abcabcabcabcabcabc\",t = \"abcabcabcabcabcabc\") == True\n assert candidate(s = \"xxyyzz\",t = \"zzxxyy\") == True\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",t = \"thequickbrownfoxjumpsoverthelazygod\") == True\n assert candidate(s = \"elevenpluszwo\",t = \"twelvezillion\") == False\n assert candidate(s = \"notanagramhere\",t = \"anagramherenot\") == True\n assert candidate(s = \"uniqueanagram\",t = \"nagramuniqueanagram\") == False\n assert candidate(s = \"fluster\",t = \"restful\") == True\n assert candidate(s = \"aaaaaa\",t = \"aaaaa\") == False\n assert candidate(s = \"punishments\",t = \"ninepunishment\") == False\n assert candidate(s = \"thirty\",t = \"typhrirt\") == False\n assert candidate(s = \"racecar\",t = \"carrace\") == True\n assert candidate(s = \"ab\",t = \"aabb\") == False\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\",t = \"mnbvcxzlkjhgfdsapoiuytrewq\") == True\n assert candidate(s = \"abacax\",t = \"aacxab\") == True\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",t = \"zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s = \"questionnaire\",t = \"reinquirequest\") == False\n assert candidate(s = \"anagramatically\",t = \"gramaticallyanagram\") == False\n assert candidate(s = \"uniquecharacters\",t = \"uniquecharactersx\") == False\n assert candidate(s = \"abcdabcdabcd\",t = \"dcbaabcdabcd\") == True\n assert candidate(s = \"adobe\",t = \"abode\") == True\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzzyyxwwvvuuttssrrqqppoonnmlkkjjiihhggffeeeeddccbaab\") == False\n assert candidate(s = \"abcabcabcabc\",t = \"cbacbacbacba\") == True\n assert candidate(s = \"schoolmaster\",t = \"theclassroom\") == True\n assert candidate(s = \"embarrassing\",t = \"backgroundsere\") == False\n assert candidate(s = \"racecar\",t = \"racecar\") == True\n assert candidate(s = \"nematocysts\",t = \"cytoplasmnets\") == False\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"zzyyxxwwvvuuttsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbaa\") == False\n", "comparison": "exact"}, "public_tests": ["\"anagram\"\n\"nagaram\"", "\"rat\"\n\"car\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().isAnagram", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:13+00:00", "tests_total": 107, "tests_dropped": 21, "flags": [], "topic_tags": ["hash-table", "string", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def is_anagram(s, t)", "container": null, "callable": "is_anagram", "parameters": [{"name": "s", "type": "String"}, {"name": "t", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 258, "task_id": "add-digits", "difficulty": "Easy", "problem_description": "Given an integer num, repeatedly add all its digits until the result has only one digit, and return it.\n\nExample 1:\n\nInput: num = 38\nOutput: 2\nExplanation: The process is\n38 --> 3 + 8 --> 11\n11 --> 1 + 1 --> 2\nSince 2 has only one digit, return it.\n\nExample 2:\n\nInput: num = 0\nOutput: 0\n\nConstraints:\n\n- 0 <= num <= 2^31 - 1\n\nFollow up: Could you do it without any loop/recursion in O(1) runtime?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 10) == 1\n assert candidate(num = 9) == 9\n assert candidate(num = 111111111) == 9\n assert candidate(num = 47) == 2\n assert candidate(num = 456789) == 3\n assert candidate(num = 38) == 2\n assert candidate(num = 45) == 9\n assert candidate(num = 234567890) == 8\n assert candidate(num = 1000000000) == 1\n assert candidate(num = 942) == 6\n assert candidate(num = 123) == 6\n assert candidate(num = 987654321) == 9\n assert candidate(num = 0) == 0\n assert candidate(num = 4567) == 4\n assert candidate(num = 1) == 1\n assert candidate(num = 111) == 3\n assert candidate(num = 999999999) == 9\n assert candidate(num = 19) == 1\n assert candidate(num = 9999) == 9\n assert candidate(num = 10000) == 1\n assert candidate(num = 222222222) == 9\n assert candidate(num = 555555555) == 9\n assert candidate(num = 888888888) == 9\n assert candidate(num = 1111111111) == 1\n assert candidate(num = 27) == 9\n assert candidate(num = 444444444) == 9\n assert candidate(num = 777777777) == 9\n assert candidate(num = 666666666) == 9\n assert candidate(num = 123456789) == 9\n assert candidate(num = 5) == 5\n assert candidate(num = 333333333) == 9\n assert candidate(num = 11) == 2\n assert candidate(num = 1234567890) == 9\n assert candidate(num = 94528) == 1\n assert candidate(num = 18) == 9\n assert candidate(num = 4321) == 1\n assert candidate(num = 369369369) == 9\n", "comparison": "exact"}, "public_tests": ["38", "0"], "hints": ["A naive implementation of the above process is trivial. Could you come up with other methods?", "What are all the possible results?", "How do they occur, periodically or randomly?", "You may find this Wikipedia article useful."], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().addDigits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:44+00:00", "tests_total": 75, "tests_dropped": 38, "flags": [], "topic_tags": ["math", "simulation", "number-theory"]}, "language": "ruby", "interface": {"raw_signature": "def add_digits(num)", "container": null, "callable": "add_digits", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 260, "task_id": "single-number-iii", "difficulty": "Medium", "problem_description": "Given an integer array nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. You can return the answer in any order.\n\nYou must write an algorithm that runs in linear runtime complexity and uses only constant extra space.\n\nExample 1:\n\nInput: nums = [1,2,1,3,2,5]\nOutput: [3,5]\nExplanation: [5, 3] is also a valid answer.\n\nExample 2:\n\nInput: nums = [-1,0]\nOutput: [-1,0]\n\nExample 3:\n\nInput: nums = [0,1]\nOutput: [1,0]\n\nConstraints:\n\n- 2 <= nums.length <= 3 * 10^4\n- -2^31 <= nums[i] <= 2^31 - 1\n- Each integer in nums will appear twice, only two integers will appear once.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[2147483647, -2147483648, 2147483647, -2147483648, 1, 2, 1, 3, 2, 5]), [3, 5])\n assert answers_match(candidate(nums=[3, 4, 5, 4, 3, 6]), [5, 6])\n assert answers_match(candidate(nums=[4, 1, 4, 13, 6, 7, 6, 7]), [13, 1])\n assert answers_match(candidate(nums=[4, 1, 4, 13, 6, 13, 2, 6]), [1, 2])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8]), [9, 1])\n assert answers_match(candidate(nums=[2, 2, 3, 4, 3, 4, 5, 5, 6, 7]), [7, 6])\n assert answers_match(candidate(nums=[-1, 0]), [-1, 0])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11]), [0, 0])\n assert answers_match(candidate(nums=[10, 1, 10, 3, 7, 3, 5, 5]), [7, 1])\n assert answers_match(candidate(nums=[10, 20, 10, 30, 40, 50, 40, 50]), [30, 20])\n assert answers_match(candidate(nums=[3, 1, 2, 3, 2, 5, 6, 6]), [5, 1])\n assert answers_match(candidate(nums=[0, 0, 1, 2, 3, 3, 4, 4, 5, 5]), [1, 2])\n assert answers_match(candidate(nums=[10, 20, 10, 30, 30, 40]), [20, 40])\n assert answers_match(candidate(nums=[0, 1]), [1, 0])\n assert answers_match(candidate(nums=[1, -2, -2, 3, 3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10, 1, 12]), [11, -15])\n assert answers_match(candidate(nums=[2147483647, -2147483648, 2147483647, -2]), [-2, -2147483648])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 3]), [3, 2])\n assert answers_match(candidate(nums=[4, 1, 4, 6, 7, 7]), [1, 6])\n assert answers_match(candidate(nums=[1000000000, 1000000000, 500000000, 2000000000]), [500000000, 2000000000])\n assert answers_match(candidate(nums=[-1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, 11]), [11, 2])\n assert answers_match(candidate(nums=[-2147483648, 2147483647, -2147483648, 2]), [2147483647, 2])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 5, 6, 6]), [5, 4])\n assert answers_match(candidate(nums=[1, 1, 2, 3, 2, 4, 5, 5, 6, 6]), [3, 4])\n assert answers_match(candidate(nums=[1, 2, 1, 3, 2, 5]), [3, 5])\n assert answers_match(candidate(nums=[10, 1, 10, 3, 3, 5, 5, 2]), [1, 2])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 1000000000, 5]), [5, -1000000000])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 4]), [3, 4])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 1000, 2000]), [1000, 2000])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]), [60, 20])\n assert answers_match(candidate(nums=[100, 200, 100, 300, 400, 500, 300, 400, 600, 500, 700, 800, 900, 800, 900, 1100, 1200, 1100, 1300, 1400, 1300, 1400, 1600, 1700]), [44, 1108])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 21]), [21, 20])\n assert answers_match(candidate(nums=[987654321, 123456789, 987654321, 234567890, 345678901, 234567890, 456789012, 567890123, 345678901, 456789012, 678901234, 567890123, 789012345, 678901234, 890123456]), [123456789, 436825017])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11]), [8, 0])\n assert answers_match(candidate(nums=[-2147483648, 2147483647, -2147483648, 1, 2, 1, 2, 3, 4, 3, 4, 5, 6, 5, 6, 7, 8, 7, 8, 9, 10, 9, 10, 11, 12, 11, 12]), [2147483647, 0])\n assert answers_match(candidate(nums=[5, 7, 5, 7, 9, 11, 9, 11, 13, 15, 13, 15, 17, 19, 17, 19, 21, 23, 21, 23, 25, 27, 25, 27, 29, 31, 29, 31, 33, 35, 33, 35, 37, 39]), [39, 37])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 25]), [0, 0])\n assert answers_match(candidate(nums=[0, 1, 0, 2, 3, 4, 3, 4, 5, 6, 5, 6, 7, 8, 7, 8, 9, 10, 9, 10, 11, 12, 11, 12, 13, 14, 13, 14, 15, 16, 15, 16, 17, 18, 17, 18, 19, 20, 19, 20, 21, 22, 21, 22, 23, 24, 25, 26]), [15, 0])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 1, 2]), [1, 34])\n assert answers_match(candidate(nums=[999999999, 999999999, 1000000000, 1000000000, 1000000001, 1000000001, 1000000002, 1000000002, 1000000003, 1000000004, 1000000005, 1000000005]), [1000000003, 1000000004])\n assert answers_match(candidate(nums=[10000, 10000, 20000, 20000, 30000, 30000, 40000, 40000, 50000, 50000, 60000, 60000, 70000, 70000, 80000, 80000, 90000, 90000, 11111, 22222]), [11111, 22222])\n assert answers_match(candidate(nums=[1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 33]), [31, 33])\n assert answers_match(candidate(nums=[100000, 200000, 100000, 300000, 400000, 500000, 300000, 400000, 600000, 500000, 700000, 800000, 900000, 800000, 900000, 1100000, 1200000, 1100000, 1300000, 1400000, 1300000, 1400000, 1600000, 1700000]), [34016, 1299744])\n assert answers_match(candidate(nums=[-10, -10, -20, -20, -30, -30, -40, -40, -50, -50, -60, -60, -70, -70, -80, -80, -90, -90, 0, 99]), [99, 0])\n assert answers_match(candidate(nums=[100000, 100000, 200000, 300000, 400000, 500000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 600000, 700000, 800000, 900000, 1000000, 1000001]), [1000001, 1000000])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 21]), [19, 21])\n assert answers_match(candidate(nums=[5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 22]), [21, 22])\n assert answers_match(candidate(nums=[0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3, 5, 7, 9, 11, 12, 11, 13, 13, 14, 12, 15, 16, 15, 17, 17, 18, 18, 19, 19, 20, 20]), [12, 16])\n assert answers_match(candidate(nums=[-2147483648, 2147483647, -2147483648, 100000, 200000, 100000, 300000, 300000, 400000, 2147483647, 400000, 500000, 600000, 500000, 600000]), [200000, 0])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 31]), [1, 0])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19]), [11, 10])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230]), [231, 0])\n assert answers_match(candidate(nums=[1000, 1001, 1000, 1002, 1002, 1003, 1003, 1004, 1004, 1005, 1005, 1006, 1006, 1007, 1007, 1008, 1008, 1009, 1009, 1010, 1011]), [1001, 1])\n assert answers_match(candidate(nums=[123, 123, 456, 456, 789, 789, 101112, 101112, 131415, 131415, 161718, 161718, 192021, 192021, 222324, 222324, 252627, 252627, 282930, 282930, 313233, 343536]), [313233, 343536])\n assert answers_match(candidate(nums=[1000, 2000, 1000, 3000, 4000, 5000, 3000, 4000, 6000, 5000, 7000, 8000, 9000, 8000, 9000, 11000, 12000, 11000, 13000, 14000, 13000, 14000, 16000, 17000, 18000, 19000, 18000, 19000, 21000, 22000, 21000, 22000, 23000, 24000, 23000, 24000, 25000, 26000]), [14488, 25936])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]), [9, 34])\n assert answers_match(candidate(nums=[1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011]), [1011, 1010])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 32]), [31, 32])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31]), [31, 30])\n assert answers_match(candidate(nums=[-2147483648, 2147483647, -2147483648, 1, 2, 1, 3, 2]), [2147483647, 3])\n assert answers_match(candidate(nums=[-1000000000, -1000000000, 1000000000, 1000000000, 2147483647, -2147483648]), [2147483647, -2147483648])\n assert answers_match(candidate(nums=[-1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9, -9, -10, -10, -11, -11, -12, -12, -13, -13, -14, -14, -15, -15, -16, -16, -17, -17, -18, -18, -19, -19, -20, -20, -21, -21, -22, -22, -23, -23, -24, -24, -25, -25, -26, -26, -27, -27, -28, -28, -29, -29, -30, -31]), [-31, -30])\n assert answers_match(candidate(nums=[1000000000, 1000000000, 2147483647, 2147483647, 123456789, -123456789]), [-123456789, 123456789])\n assert answers_match(candidate(nums=[100, 200, 100, 300, 200, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000, 1000, 1100, 1100, 1200, 1300]), [300, 420])\n assert answers_match(candidate(nums=[0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9, -9, -10, -11]), [-11, -10])\n assert answers_match(candidate(nums=[999999999, 999999999, 888888888, 888888888, 777777777, 777777777, 666666666, 666666666, 555555555, 555555555, 123456789, 987654321]), [123456789, 987654321])\n assert answers_match(candidate(nums=[100000000, 100000001, 100000000, 200000000, 200000000, 300000000, 300000000, 400000000, 400000000, 500000000, 500000000, 600000000, 600000000, 700000000, 700000000, 800000000, 800000000, 900000000, 900000000, 1000000002, 1000000003]), [100000001, 1])\n assert answers_match(candidate(nums=[1000, 1000, 2000, 3000, 3000, 4000, 4000, 5000, 5000, 6000, 6000, 7000, 7000, 8000, 8000, 9000, 9000, 10000, 10000, 11000, 12000]), [11000, 10544])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 1000000000, -1000000000, 999999999, 999999999, 888888888, 888888888, 777777777, 777777777, 666666666, 666666666, 555555555, 123456789]), [555555555, 123456789])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200]), [1100, 1200])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -1, -2, -3, -4, -5, -6, -7, -8, -9, 100, 101]), [101, 100])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2]), [31, 3])\n assert answers_match(candidate(nums=[1000000000, 999999999, 1000000000, 888888888, 777777777, 888888888, 666666666, 555555555, 666666666, 444444444, 333333333, 222222222, 222222222, 111111111, 111111111, 333333333, 444444444, 555555555, 777777777, 999999999]), [0, 0])\n assert answers_match(candidate(nums=[-1000000000, -999999999, -1000000000, -888888888, -777777777, -888888888, -666666666, -555555555, -666666666, -444444444, -333333333, -222222222, -222222222, -111111111, -111111111, -333333333, -444444444, -555555555, -777777777, -999999999]), [0, 0])\n assert answers_match(candidate(nums=[999999999, 999999999, 888888888, 888888888, 777777777, 777777777, 666666666, 666666666, 555555555, 555555555, 444444444, 333333333, 222222222, 111111111, 111111111, 222222222]), [333333333, 444444444])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3, 5, 7, 9, 11, 12, 11, 13, 13, 14, 12, 15, 16, 15, 17, 17, 18, 18, 19, 19, 20, 20]), [12, 16])\n assert answers_match(candidate(nums=[-10, -20, -10, -30, -40, -50, -30, -40, -50, -60, -70, -80, -90, -100, -60, -70, -80, -90, -100, -110, -120]), [-110, 100])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51]), [51, 50])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100]), [1100, 1000])\n assert answers_match(candidate(nums=[1000000000, 1, 1000000000, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 11, 11, 13, 14]), [14, 12])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]), [30, 0])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [11, 20])\n assert answers_match(candidate(nums=[1, 1, 1000000000, 1000000000, -1, -1, 2000000000, 2000000000, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 21]), [11, 1])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 31, 32, 33]), [0, 0])\n assert answers_match(candidate(nums=[100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000, 1001, 1002, 1002]), [1001, 1000])\n assert answers_match(candidate(nums=[5, 7, 5, 7, 9, 11, 9, 11, 13, 15, 13, 15, 17, 19, 17, 19, 21, 23, 21, 23, 25, 27, 25, 27, 29, 31, 29, 31, 33, 35, 33, 35, 37, 39, 37, 39, 41, 43]), [43, 41])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 22]), [23, 21])\n assert answers_match(candidate(nums=[5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 37]), [35, 37])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 21]), [0, 0])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3, 5, 7, 9, 11, 12, 11, 13, 13, 14, 12]), [12, 0])\n assert answers_match(candidate(nums=[2147483647, -2147483648, 2147483647, -2147483648, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9]), [9, 8])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 35]), [35, 34])\n assert answers_match(candidate(nums=[1000000000, 999999999, 1000000000, 888888888, 777777777, 888888888, 666666666, 666666666]), [999999999, 777777777])\n assert answers_match(candidate(nums=[1, 2, 1, 3, 2, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15]), [2, 0])\n assert answers_match(candidate(nums=[100000, 100000, 200000, 200000, 300000, 300000, 400000, 400000, 500000, 500000, 600000, 600000, 700000, 700000, 800000, 800000, 900000, 900000, 1, 2]), [1, 2])\n assert answers_match(candidate(nums=[-1000000000, -1000000000, 2000000000, 2000000000, 1000000, 1000000, -100000, -100000, 50000, 50000, 999999999, 1000000001]), [999999999, 1000000001])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12]), [11, 12])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]), [21, 28])\n", "comparison": "unordered"}, "public_tests": ["[1,2,1,3,2,5]", "[-1,0]", "[0,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:48+00:00", "tests_total": 102, "tests_dropped": 5, "flags": ["any_order"], "topic_tags": ["array", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def single_number(nums)", "container": null, "callable": "single_number", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 263, "task_id": "ugly-number", "difficulty": "Easy", "problem_description": "An ugly number is a positive integer which does not have a prime factor other than 2, 3, and 5.\n\nGiven an integer n, return true if n is an ugly number.\n\nExample 1:\n\nInput: n = 6\nOutput: true\nExplanation: 6 = 2 × 3\n\nExample 2:\n\nInput: n = 1\nOutput: true\nExplanation: 1 has no prime factors.\n\nExample 3:\n\nInput: n = 14\nOutput: false\nExplanation: 14 is not ugly since it includes the prime factor 7.\n\nConstraints:\n\n- -2^31 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == False\n assert candidate(n = 8) == True\n assert candidate(n = -2147483648) == False\n assert candidate(n = 100000) == True\n assert candidate(n = 100) == True\n assert candidate(n = 30) == True\n assert candidate(n = -1) == False\n assert candidate(n = 125) == True\n assert candidate(n = 14) == False\n assert candidate(n = 2147483647) == False\n assert candidate(n = 6) == True\n assert candidate(n = 1) == True\n assert candidate(n = 1000000000) == True\n assert candidate(n = 7) == False\n assert candidate(n = 1024) == True\n assert candidate(n = 59049) == True\n assert candidate(n = 45) == True\n assert candidate(n = 180000000) == True\n assert candidate(n = 135) == True\n assert candidate(n = 729) == True\n assert candidate(n = 216) == True\n assert candidate(n = 2000000000) == True\n assert candidate(n = 50000) == True\n assert candidate(n = 1000000002) == False\n assert candidate(n = 1968300000) == True\n assert candidate(n = 86400) == True\n assert candidate(n = 60) == True\n assert candidate(n = 1500000000) == True\n assert candidate(n = 30000) == True\n assert candidate(n = 225) == True\n assert candidate(n = 15625) == True\n assert candidate(n = 3126) == False\n assert candidate(n = 720) == True\n assert candidate(n = 46656) == True\n assert candidate(n = 16000000) == True\n assert candidate(n = 250) == True\n assert candidate(n = 1048576) == True\n assert candidate(n = -10) == False\n assert candidate(n = 3600) == True\n assert candidate(n = 256) == True\n assert candidate(n = 1600000000) == True\n assert candidate(n = 2187000) == True\n assert candidate(n = 307200000) == True\n assert candidate(n = 1000000001) == False\n assert candidate(n = 24) == True\n assert candidate(n = 9765625) == True\n assert candidate(n = 531441) == True\n assert candidate(n = 987654321) == False\n assert candidate(n = 15) == True\n assert candidate(n = 180) == True\n assert candidate(n = 500000) == True\n assert candidate(n = 150000000) == True\n assert candidate(n = 1800000000) == True\n assert candidate(n = 3125) == True\n assert candidate(n = 2352) == False\n assert candidate(n = 120) == True\n assert candidate(n = 40500000) == True\n assert candidate(n = 105) == False\n assert candidate(n = 8388608) == True\n assert candidate(n = 243) == True\n assert candidate(n = 84) == False\n", "comparison": "exact"}, "public_tests": ["6", "1", "14"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isUgly", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:53+00:00", "tests_total": 74, "tests_dropped": 13, "flags": [], "topic_tags": ["math"]}, "language": "ruby", "interface": {"raw_signature": "def is_ugly(n)", "container": null, "callable": "is_ugly", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 264, "task_id": "ugly-number-ii", "difficulty": "Medium", "problem_description": "An ugly number is a positive integer whose prime factors are limited to 2, 3, and 5.\n\nGiven an integer n, return the n^th ugly number.\n\nExample 1:\n\nInput: n = 10\nOutput: 12\nExplanation: [1, 2, 3, 4, 5, 6, 8, 9, 10, 12] is the sequence of the first 10 ugly numbers.\n\nExample 2:\n\nInput: n = 1\nOutput: 1\nExplanation: 1 has no prime factors, therefore all of its prime factors are limited to 2, 3, and 5.\n\nConstraints:\n\n- 1 <= n <= 1690\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 15) == 24\n assert candidate(n = 200) == 16200\n assert candidate(n = 1690) == 2123366400\n assert candidate(n = 1) == 1\n assert candidate(n = 50) == 243\n assert candidate(n = 10) == 12\n assert candidate(n = 5) == 5\n assert candidate(n = 1400) == 516560652\n assert candidate(n = 3) == 3\n assert candidate(n = 1575) == 1230187500\n assert candidate(n = 1600) == 1399680000\n assert candidate(n = 1685) == 2066242608\n assert candidate(n = 900) == 26244000\n assert candidate(n = 1688) == 2099520000\n assert candidate(n = 100) == 1536\n assert candidate(n = 1000) == 51200000\n assert candidate(n = 300) == 82944\n assert candidate(n = 550) == 1555200\n assert candidate(n = 1200) == 174960000\n assert candidate(n = 600) == 2460375\n assert candidate(n = 4) == 4\n assert candidate(n = 1675) == 1990656000\n assert candidate(n = 1650) == 1769472000\n assert candidate(n = 1550) == 1093500000\n assert candidate(n = 1300) == 306110016\n assert candidate(n = 2) == 2\n assert candidate(n = 1024) == 60466176\n assert candidate(n = 8) == 9\n assert candidate(n = 1689) == 2109375000\n assert candidate(n = 800) == 12754584\n assert candidate(n = 400) == 311040\n assert candidate(n = 9) == 10\n assert candidate(n = 750) == 8748000\n assert candidate(n = 6) == 6\n assert candidate(n = 500) == 937500\n assert candidate(n = 7) == 8\n assert candidate(n = 1680) == 2025000000\n assert candidate(n = 1500) == 859963392\n", "comparison": "exact"}, "public_tests": ["10", "1"], "hints": ["The naive approach is to call isUgly for every number until you reach the n^th one. Most numbers are not ugly. Try to focus your effort on generating only the ugly ones.", "An ugly number must be multiplied by either 2, 3, or 5 from a smaller ugly number.", "The key is how to maintain the order of the ugly numbers. Try a similar approach of merging from three sorted lists: L_1, L_2, and L_3.", "Assume you have U_k, the k^th ugly number. Then U_{k+1} must be Min(L_1 * 2, L_2 * 3, L_3 * 5)."], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().nthUglyNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:43:55+00:00", "tests_total": 38, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "math", "dynamic-programming", "heap-priority-queue"]}, "language": "ruby", "interface": {"raw_signature": "def nth_ugly_number(n)", "container": null, "callable": "nth_ugly_number", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 268, "task_id": "missing-number", "difficulty": "Easy", "problem_description": "Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.\n\nExample 1:\n\nInput: nums = [3,0,1]\nOutput: 2\nExplanation:\nn = 3 since there are 3 numbers, so all numbers are in the range [0,3]. 2 is the missing number in the range since it does not appear in nums.\n\nExample 2:\n\nInput: nums = [0,1]\nOutput: 2\nExplanation:\nn = 2 since there are 2 numbers, so all numbers are in the range [0,2]. 2 is the missing number in the range since it does not appear in nums.\n\nExample 3:\n\nInput: nums = [9,6,4,2,3,5,7,0,1]\nOutput: 8\nExplanation:\nn = 9 since there are 9 numbers, so all numbers are in the range [0,9]. 8 is the missing number in the range since it does not appear in nums.\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 10^4\n- 0 <= nums[i] <= n\n- All the numbers of nums are unique.\n\nFollow up: Could you implement a solution using only O(1) extra space complexity and O(n) runtime complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [3, 0, 1]) == 2\n assert candidate(nums = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(nums = [0]) == 1\n assert candidate(nums = [5, 2, 4, 6, 3, 0, 1]) == 7\n assert candidate(nums = [0, 2, 3, 4]) == 1\n assert candidate(nums = [8, 6, 4, 2, 0, 1, 3, 5, 7]) == 9\n assert candidate(nums = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 0\n assert candidate(nums = [5, 2, 4, 0, 1]) == 3\n assert candidate(nums = [0, 1]) == 2\n assert candidate(nums = [9, 6, 4, 2, 3, 5, 7, 0, 1]) == 8\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10]) == 9\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(nums = [0, 1, 2, 3, 5]) == 4\n assert candidate(nums = [1, 0, 2, 4]) == 3\n assert candidate(nums = [14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 15\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15]) == 11\n assert candidate(nums = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 1\n assert candidate(nums = [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 15\n assert candidate(nums = [2, 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15]) == 14\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15, 0]) == 16\n assert candidate(nums = [1, 0, 13, 14, 15, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 11, 13, 14, 15, 0]) == 16\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14]) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16]) == 15\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15]) == 13\n assert candidate(nums = [1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0]) == 2\n assert candidate(nums = [15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 14\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15]) == 9\n assert candidate(nums = [2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19, 22, 21, 24, 23, 26, 25, 28, 27, 30, 29, 32, 31, 34, 33, 36, 35, 38, 37, 40, 39, 42, 41, 44, 43, 46, 45, 48, 47, 50, 49, 52, 51, 54, 53, 56, 55, 58, 57, 60, 59, 62, 61, 64, 63, 66, 65, 68, 67, 70, 69, 72, 71, 74, 73, 76, 75, 78, 77, 80, 79, 82, 81, 84, 83, 86, 85, 88, 87, 90, 89, 92, 91, 94, 93, 96, 95, 98, 97, 100, 99]) == 0\n assert candidate(nums = [42, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 41\n assert candidate(nums = [33, 31, 35, 32, 30, 29, 34, 28, 36, 27, 37, 26, 38, 25, 39, 24, 40, 23, 41, 22, 42, 21, 43, 20, 44, 19, 45, 18, 46, 17, 47, 16, 48, 15, 49, 14, 50, 13, 51, 12, 52, 11, 53, 10, 54, 9, 55, 8, 56, 7, 57, 6, 58, 5, 59, 4, 60, 3, 61, 2, 62, 1]) == 0\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 13, 14, 15]) == 11\n assert candidate(nums = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 1\n", "comparison": "exact"}, "public_tests": ["[3,0,1]", "[0,1]", "[9,6,4,2,3,5,7,0,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().missingNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:04+00:00", "tests_total": 47, "tests_dropped": 7, "flags": [], "topic_tags": ["array", "hash-table", "math", "binary-search", "bit-manipulation", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def missing_number(nums)", "container": null, "callable": "missing_number", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 273, "task_id": "integer-to-english-words", "difficulty": "Hard", "problem_description": "Convert a non-negative integer num to its English words representation.\n\nExample 1:\n\nInput: num = 123\nOutput: \"One Hundred Twenty Three\"\n\nExample 2:\n\nInput: num = 12345\nOutput: \"Twelve Thousand Three Hundred Forty Five\"\n\nExample 3:\n\nInput: num = 1234567\nOutput: \"One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven\"\n\nConstraints:\n\n- 0 <= num <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 9) == \"Nine\"\n assert candidate(num = 10) == \"Ten\"\n assert candidate(num = 100000000) == \"One Hundred Million\"\n assert candidate(num = 1234567) == \"One Million Two Hundred Thirty Four Thousand Five Hundred Sixty Seven\"\n assert candidate(num = 999) == \"Nine Hundred Ninety Nine\"\n assert candidate(num = 10000000) == \"Ten Million\"\n assert candidate(num = 29) == \"Twenty Nine\"\n assert candidate(num = 31) == \"Thirty One\"\n assert candidate(num = 30) == \"Thirty\"\n assert candidate(num = 1000000000) == \"One Billion\"\n assert candidate(num = 110) == \"One Hundred Ten\"\n assert candidate(num = 5) == \"Five\"\n assert candidate(num = 11) == \"Eleven\"\n assert candidate(num = 1000) == \"One Thousand\"\n assert candidate(num = 123) == \"One Hundred Twenty Three\"\n assert candidate(num = 12345) == \"Twelve Thousand Three Hundred Forty Five\"\n assert candidate(num = 1001) == \"One Thousand One\"\n assert candidate(num = 21) == \"Twenty One\"\n assert candidate(num = 0) == \"Zero\"\n assert candidate(num = 39) == \"Thirty Nine\"\n assert candidate(num = 100) == \"One Hundred\"\n assert candidate(num = 111) == \"One Hundred Eleven\"\n assert candidate(num = 2147483647) == \"Two Billion One Hundred Forty Seven Million Four Hundred Eighty Three Thousand Six Hundred Forty Seven\"\n assert candidate(num = 100000) == \"One Hundred Thousand\"\n assert candidate(num = 999999999) == \"Nine Hundred Ninety Nine Million Nine Hundred Ninety Nine Thousand Nine Hundred Ninety Nine\"\n assert candidate(num = 1000000) == \"One Million\"\n assert candidate(num = 999999) == \"Nine Hundred Ninety Nine Thousand Nine Hundred Ninety Nine\"\n assert candidate(num = 19) == \"Nineteen\"\n assert candidate(num = 10000) == \"Ten Thousand\"\n assert candidate(num = 101) == \"One Hundred One\"\n assert candidate(num = 500000050) == \"Five Hundred Million Fifty\"\n assert candidate(num = 111111111) == \"One Hundred Eleven Million One Hundred Eleven Thousand One Hundred Eleven\"\n assert candidate(num = 555555555) == \"Five Hundred Fifty Five Million Five Hundred Fifty Five Thousand Five Hundred Fifty Five\"\n assert candidate(num = 1111111111) == \"One Billion One Hundred Eleven Million One Hundred Eleven Thousand One Hundred Eleven\"\n assert candidate(num = 890123456) == \"Eight Hundred Ninety Million One Hundred Twenty Three Thousand Four Hundred Fifty Six\"\n assert candidate(num = 508) == \"Five Hundred Eight\"\n assert candidate(num = 1010101010) == \"One Billion Ten Million One Hundred One Thousand Ten\"\n assert candidate(num = 50000050) == \"Fifty Million Fifty\"\n assert candidate(num = 99) == \"Ninety Nine\"\n assert candidate(num = 1000010001) == \"One Billion Ten Thousand One\"\n assert candidate(num = 807000000) == \"Eight Hundred Seven Million\"\n assert candidate(num = 900000009) == \"Nine Hundred Million Nine\"\n assert candidate(num = 123456789) == \"One Hundred Twenty Three Million Four Hundred Fifty Six Thousand Seven Hundred Eighty Nine\"\n assert candidate(num = 11000011) == \"Eleven Million Eleven\"\n assert candidate(num = 900000090) == \"Nine Hundred Million Ninety\"\n assert candidate(num = 1010001000) == \"One Billion Ten Million One Thousand\"\n assert candidate(num = 1000000001) == \"One Billion One\"\n assert candidate(num = 1001001001) == \"One Billion One Million One Thousand One\"\n assert candidate(num = 999000999) == \"Nine Hundred Ninety Nine Million Nine Hundred Ninety Nine\"\n assert candidate(num = 1234567890) == \"One Billion Two Hundred Thirty Four Million Five Hundred Sixty Seven Thousand Eight Hundred Ninety\"\n assert candidate(num = 2000000000) == \"Two Billion\"\n assert candidate(num = 9876) == \"Nine Thousand Eight Hundred Seventy Six\"\n assert candidate(num = 1000010) == \"One Million Ten\"\n assert candidate(num = 987654321) == \"Nine Hundred Eighty Seven Million Six Hundred Fifty Four Thousand Three Hundred Twenty One\"\n assert candidate(num = 990000000) == \"Nine Hundred Ninety Million\"\n assert candidate(num = 123000456) == \"One Hundred Twenty Three Million Four Hundred Fifty Six\"\n assert candidate(num = 203040506) == \"Two Hundred Three Million Forty Thousand Five Hundred Six\"\n assert candidate(num = 101010101) == \"One Hundred One Million Ten Thousand One Hundred One\"\n assert candidate(num = 500000500) == \"Five Hundred Million Five Hundred\"\n assert candidate(num = 2100000100) == \"Two Billion One Hundred Million One Hundred\"\n assert candidate(num = 450000000) == \"Four Hundred Fifty Million\"\n assert candidate(num = 123000000) == \"One Hundred Twenty Three Million\"\n assert candidate(num = 4321) == \"Four Thousand Three Hundred Twenty One\"\n assert candidate(num = 900009000) == \"Nine Hundred Million Nine Thousand\"\n assert candidate(num = 1100000000) == \"One Billion One Hundred Million\"\n assert candidate(num = 123400000) == \"One Hundred Twenty Three Million Four Hundred Thousand\"\n assert candidate(num = 1000001) == \"One Million One\"\n assert candidate(num = 9999) == \"Nine Thousand Nine Hundred Ninety Nine\"\n assert candidate(num = 900900000) == \"Nine Hundred Million Nine Hundred Thousand\"\n assert candidate(num = 60012003) == \"Sixty Million Twelve Thousand Three\"\n", "comparison": "exact"}, "public_tests": ["123", "12345", "1234567"], "hints": ["Did you see a pattern in dividing the number into chunk of words? For example, 123 and 123000.", "Group the number by thousands (3 digits). You can write a helper function that takes a number less than 1000 and convert just that chunk to words.", "There are many edge cases. What are some good test cases? Does your code work with input such as 0? Or 1000010? (middle chunk is zero and should not be printed out)"], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().numberToWords", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:14+00:00", "tests_total": 74, "tests_dropped": 4, "flags": [], "topic_tags": ["math", "string", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def number_to_words(num)", "container": null, "callable": "number_to_words", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 274, "task_id": "h-index", "difficulty": "Medium", "problem_description": "Given an array of integers citations where citations[i] is the number of citations a researcher received for their i^th paper, return the researcher's h-index.\n\nAccording to the definition of h-index on Wikipedia: The h-index is defined as the maximum value of h such that the given researcher has published at least h papers that have each been cited at least h times.\n\nExample 1:\n\nInput: citations = [3,0,6,1,5]\nOutput: 3\nExplanation: [3,0,6,1,5] means the researcher has 5 papers in total and each of them had received 3, 0, 6, 1, 5 citations respectively.\nSince the researcher has 3 papers with at least 3 citations each and the remaining two with no more than 3 citations each, their h-index is 3.\n\nExample 2:\n\nInput: citations = [1,3,1]\nOutput: 1\n\nConstraints:\n\n- n == citations.length\n- 1 <= n <= 5000\n- 0 <= citations[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(citations = [10, 8, 5, 4, 3]) == 4\n assert candidate(citations = [1]) == 1\n assert candidate(citations = [3, 0, 6, 1, 5]) == 3\n assert candidate(citations = [0, 1, 2, 3, 4]) == 2\n assert candidate(citations = [1000, 999, 998, 997, 996]) == 5\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(citations = [0, 0, 0, 0, 0]) == 0\n assert candidate(citations = [8, 8, 8, 8, 8, 8, 8]) == 7\n assert candidate(citations = [10, 10, 10, 10]) == 4\n assert candidate(citations = [1, 3, 1]) == 1\n assert candidate(citations = [100, 0, 1, 2]) == 2\n assert candidate(citations = [11, 15, 0, 6, 9, 12]) == 5\n assert candidate(citations = [0, 1, 2, 3, 4, 5]) == 3\n assert candidate(citations = [11, 15]) == 2\n assert candidate(citations = [1, 2, 3, 4, 5, 6]) == 3\n assert candidate(citations = [6, 5, 4, 3, 2, 1]) == 3\n assert candidate(citations = [4, 4, 4, 4, 3]) == 4\n assert candidate(citations = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 5\n assert candidate(citations = [0]) == 0\n assert candidate(citations = [1, 2, 3, 4, 5]) == 3\n assert candidate(citations = [0, 0, 0, 0]) == 0\n assert candidate(citations = [1000, 1000, 1000]) == 3\n assert candidate(citations = [5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [34, 23, 12, 45, 67, 89, 100, 99, 88, 77, 66, 55, 44, 33, 22, 11, 0]) == 14\n assert candidate(citations = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 7\n assert candidate(citations = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 10\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 1\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [10, 8, 5, 4, 3, 1, 0]) == 4\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 6\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1000]) == 1\n assert candidate(citations = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981, 980]) == 20\n assert candidate(citations = [100, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 11\n assert candidate(citations = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 14\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [200, 190, 180, 170, 160, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 19\n assert candidate(citations = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15]) == 15\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 10\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1000]) == 1\n assert candidate(citations = [1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0]) == 10\n assert candidate(citations = [10, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 9\n assert candidate(citations = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 9\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000]) == 1\n assert candidate(citations = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 19\n assert candidate(citations = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 5\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 10\n assert candidate(citations = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4]) == 3\n assert candidate(citations = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 3\n assert candidate(citations = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == 2\n assert candidate(citations = [1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 8, 9, 10, 11, 12]) == 6\n assert candidate(citations = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 5\n assert candidate(citations = [250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250]) == 31\n assert candidate(citations = [0, 1000, 2, 500, 3, 750, 4, 250, 5, 125]) == 5\n assert candidate(citations = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [25, 20, 15, 10, 5, 0, 0, 0, 0, 0]) == 5\n assert candidate(citations = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 10\n assert candidate(citations = [10, 8, 5, 4, 3, 2, 1, 0]) == 4\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000]) == 5\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [500, 250, 125, 62, 31, 15, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 7\n assert candidate(citations = [1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 3\n assert candidate(citations = [1, 100, 2, 99, 3, 98, 4, 97, 5, 96, 6, 95, 7, 94, 8, 93, 9, 92, 10, 91]) == 10\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [100, 50, 25, 10, 5, 2]) == 5\n assert candidate(citations = [50, 40, 30, 20, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 5\n assert candidate(citations = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7]) == 5\n assert candidate(citations = [1, 0, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 15\n assert candidate(citations = [150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 14\n assert candidate(citations = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991]) == 10\n assert candidate(citations = [100, 50, 25, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 5\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 8\n assert candidate(citations = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 9\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 15\n", "comparison": "exact"}, "public_tests": ["[3,0,6,1,5]", "[1,3,1]"], "hints": ["An easy approach is to sort the array first.", "What are the possible values of h-index?", "A faster approach is to use extra space."], "metadata": {"canonical_parameter_names": ["citations"], "leetcode_dataset_entry_point": "Solution().hIndex", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:16+00:00", "tests_total": 79, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "sorting", "counting-sort"]}, "language": "ruby", "interface": {"raw_signature": "def h_index(citations)", "container": null, "callable": "h_index", "parameters": [{"name": "citations", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 275, "task_id": "h-index-ii", "difficulty": "Medium", "problem_description": "Given an array of integers citations where citations[i] is the number of citations a researcher received for their i^th paper and citations is sorted in non-descending order, return the researcher's h-index.\n\nAccording to the definition of h-index on Wikipedia: The h-index is defined as the maximum value of h such that the given researcher has published at least h papers that have each been cited at least h times.\n\nYou must write an algorithm that runs in logarithmic time.\n\nExample 1:\n\nInput: citations = [0,1,3,5,6]\nOutput: 3\nExplanation: [0,1,3,5,6] means the researcher has 5 papers in total and each of them had received 0, 1, 3, 5, 6 citations respectively.\nSince the researcher has 3 papers with at least 3 citations each and the remaining two with no more than 3 citations each, their h-index is 3.\n\nExample 2:\n\nInput: citations = [1,2,100]\nOutput: 2\n\nConstraints:\n\n- n == citations.length\n- 1 <= n <= 10^5\n- 0 <= citations[i] <= 1000\n- citations is sorted in ascending order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(citations = [1]) == 1\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(citations = [100]) == 1\n assert candidate(citations = [0, 0, 0, 0, 0]) == 0\n assert candidate(citations = [100, 100, 100, 100, 100]) == 5\n assert candidate(citations = [0, 0, 4, 4, 5, 6]) == 4\n assert candidate(citations = [0, 1, 2, 3, 4, 5]) == 3\n assert candidate(citations = [11, 15]) == 2\n assert candidate(citations = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 4\n assert candidate(citations = [1, 2, 2, 3, 3, 4, 4, 5, 5, 5]) == 4\n assert candidate(citations = [1, 2, 100]) == 2\n assert candidate(citations = [1, 3, 3, 3, 3, 3, 3]) == 3\n assert candidate(citations = [0]) == 0\n assert candidate(citations = [0, 1, 3, 5, 6]) == 3\n assert candidate(citations = [0, 0, 0, 0]) == 0\n assert candidate(citations = [1, 3, 8, 100]) == 3\n assert candidate(citations = [1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(citations = [5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [0, 0, 4, 4, 4, 5, 6]) == 4\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 4\n assert candidate(citations = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 10\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 25\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 50\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 10\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 20\n assert candidate(citations = [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10]) == 9\n assert candidate(citations = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20]) == 14\n assert candidate(citations = [1, 2, 3, 4, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 10\n assert candidate(citations = [10, 20, 30, 40, 50, 60, 70, 80, 90, 1000]) == 10\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10]) == 7\n assert candidate(citations = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 20\n assert candidate(citations = [0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10]) == 7\n assert candidate(citations = [1, 1, 1, 1, 1, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [1, 2, 2, 2, 3, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 8\n assert candidate(citations = [1, 1, 1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 13\n assert candidate(citations = [1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 7\n assert candidate(citations = [0, 0, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 4\n assert candidate(citations = [1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(citations = [0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14]) == 12\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000]) == 1\n assert candidate(citations = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 13\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 10\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 13\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]) == 11\n assert candidate(citations = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 9\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(citations = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(citations = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30]) == 20\n assert candidate(citations = [0, 0, 0, 0, 0, 1, 1, 1, 1, 100]) == 1\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(citations = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 10\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 15\n assert candidate(citations = [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 8\n assert candidate(citations = [0, 1, 1, 2, 2, 3, 3, 4, 4, 5]) == 3\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000]) == 1\n assert candidate(citations = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 13\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(citations = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(citations = [1, 2, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(citations = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 20\n assert candidate(citations = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1000]) == 1\n assert candidate(citations = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 15\n assert candidate(citations = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == 10\n assert candidate(citations = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n", "comparison": "exact"}, "public_tests": ["[0,1,3,5,6]", "[1,2,100]"], "hints": ["Expected runtime complexity is in O(log n) and the input is sorted."], "metadata": {"canonical_parameter_names": ["citations"], "leetcode_dataset_entry_point": "Solution().hIndex", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:18+00:00", "tests_total": 80, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def h_index(citations)", "container": null, "callable": "h_index", "parameters": [{"name": "citations", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 279, "task_id": "perfect-squares", "difficulty": "Medium", "problem_description": "Given an integer n, return the least number of perfect square numbers that sum to n.\n\nA perfect square is an integer that is the square of an integer; in other words, it is the product of some integer with itself. For example, 1, 4, 9, and 16 are perfect squares while 3 and 11 are not.\n\nExample 1:\n\nInput: n = 12\nOutput: 3\nExplanation: 12 = 4 + 4 + 4.\n\nExample 2:\n\nInput: n = 13\nOutput: 2\nExplanation: 13 = 4 + 9.\n\nConstraints:\n\n- 1 <= n <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 625) == 1\n assert candidate(n = 8) == 2\n assert candidate(n = 100) == 1\n assert candidate(n = 4) == 1\n assert candidate(n = 12) == 3\n assert candidate(n = 16) == 1\n assert candidate(n = 17) == 2\n assert candidate(n = 10000) == 1\n assert candidate(n = 9) == 1\n assert candidate(n = 9876) == 3\n assert candidate(n = 6) == 3\n assert candidate(n = 9999) == 4\n assert candidate(n = 23) == 4\n assert candidate(n = 1) == 1\n assert candidate(n = 10) == 2\n assert candidate(n = 13) == 2\n assert candidate(n = 25) == 1\n assert candidate(n = 3) == 3\n assert candidate(n = 9801) == 1\n assert candidate(n = 156) == 4\n assert candidate(n = 2356) == 3\n assert candidate(n = 63) == 4\n assert candidate(n = 4001) == 2\n assert candidate(n = 144) == 1\n assert candidate(n = 8200) == 2\n assert candidate(n = 5678) == 3\n assert candidate(n = 2345) == 3\n assert candidate(n = 1111) == 4\n assert candidate(n = 1600) == 1\n assert candidate(n = 7500) == 3\n assert candidate(n = 50) == 2\n assert candidate(n = 3333) == 3\n assert candidate(n = 300) == 3\n assert candidate(n = 28) == 4\n assert candidate(n = 6250) == 2\n assert candidate(n = 8402) == 2\n assert candidate(n = 3000) == 3\n assert candidate(n = 64) == 1\n assert candidate(n = 98) == 2\n assert candidate(n = 2) == 2\n assert candidate(n = 8401) == 3\n assert candidate(n = 1024) == 1\n assert candidate(n = 38) == 3\n assert candidate(n = 7776) == 3\n assert candidate(n = 8000) == 2\n assert candidate(n = 169) == 1\n assert candidate(n = 75) == 3\n assert candidate(n = 5000) == 2\n assert candidate(n = 9500) == 4\n assert candidate(n = 19) == 3\n assert candidate(n = 7199) == 4\n assert candidate(n = 77) == 3\n assert candidate(n = 1999) == 4\n assert candidate(n = 5625) == 1\n assert candidate(n = 81) == 1\n assert candidate(n = 7654) == 3\n assert candidate(n = 48) == 3\n assert candidate(n = 4321) == 2\n assert candidate(n = 7777) == 3\n assert candidate(n = 6400) == 1\n assert candidate(n = 325) == 2\n assert candidate(n = 9000) == 2\n assert candidate(n = 4999) == 4\n assert candidate(n = 4369) == 2\n assert candidate(n = 400) == 1\n assert candidate(n = 78) == 3\n assert candidate(n = 31) == 4\n assert candidate(n = 1234) == 2\n assert candidate(n = 3125) == 2\n assert candidate(n = 2017) == 2\n assert candidate(n = 85) == 2\n assert candidate(n = 196) == 1\n assert candidate(n = 8999) == 4\n assert candidate(n = 84) == 3\n", "comparison": "exact"}, "public_tests": ["12", "13"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().numSquares", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:25+00:00", "tests_total": 75, "tests_dropped": 1, "flags": [], "topic_tags": ["math", "dynamic-programming", "breadth-first-search", "knapsack-problem", "complete-knapsack"]}, "language": "ruby", "interface": {"raw_signature": "def num_squares(n)", "container": null, "callable": "num_squares", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 282, "task_id": "expression-add-operators", "difficulty": "Hard", "problem_description": "Given a string num that contains only digits and an integer target, return all possibilities to insert the binary operators '+', '-', and/or '*' between the digits of num so that the resultant expression evaluates to the target value.\n\nNote that operands in the returned expressions should not contain leading zeros.\n\nNote that a number can contain multiple digits.\n\nExample 1:\n\nInput: num = \"123\", target = 6\nOutput: [\"1*2*3\",\"1+2+3\"]\nExplanation: Both \"1*2*3\" and \"1+2+3\" evaluate to 6.\n\nExample 2:\n\nInput: num = \"232\", target = 8\nOutput: [\"2*3+2\",\"2+3*2\"]\nExplanation: Both \"2*3+2\" and \"2+3*2\" evaluate to 8.\n\nExample 3:\n\nInput: num = \"3456237490\", target = 9191\nOutput: []\nExplanation: There are no expressions that can be created from \"3456237490\" to evaluate to 9191.\n\nConstraints:\n\n- 1 <= num.length <= 10\n- num consists of only digits.\n- -2^31 <= target <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = \"232\",target = 8) == ['2+3*2', '2*3+2']\n assert candidate(num = \"123\",target = 6) == ['1+2+3', '1*2*3']\n assert candidate(num = \"00\",target = 0) == ['0+0', '0-0', '0*0']\n assert candidate(num = \"105\",target = 5) == ['1*0+5', '10-5']\n assert candidate(num = \"3\",target = 3) == ['3']\n assert candidate(num = \"34\",target = 14) == []\n assert candidate(num = \"3456237490\",target = 9191) == []\n assert candidate(num = \"12\",target = 3) == ['1+2']\n assert candidate(num = \"0105\",target = 5) == ['0+1*0+5', '0-1*0+5', '0*1+0+5', '0*1-0+5', '0*1*0+5', '0+10-5', '0*10+5']\n assert candidate(num = \"123456789\",target = 100) == ['1+2+3+4+5+6+7+8*9', '1+2+3-4+5+6+78+9', '1+2+3-4*5+6*7+8*9', '1+2+3*4-5-6+7+89', '1+2+3-45+67+8*9', '1+2-3*4+5*6+7+8*9', '1+2-3*4-5+6*7+8*9', '1+2*3+4+5+67+8+9', '1+2*3+4*5-6+7+8*9', '1+2*3-4-5+6+7+89', '1+2+34-5+67-8+9', '1+2+34*5+6-7-8*9', '1+2*34-56+78+9', '1-2+3*4+5+67+8+9', '1-2+3*4*5+6*7+8-9', '1-2+3*4*5-6+7*8-9', '1-2+3+45+6+7*8-9', '1-2-3+4*5+67+8+9', '1-2-3+45+6*7+8+9', '1-2-3+45-6+7*8+9', '1-2-3+45-6-7+8*9', '1-2*3+4*5+6+7+8*9', '1-2*3-4+5*6+7+8*9', '1-2*3-4-5+6*7+8*9', '1-2-34+56+7+8*9', '1*2+3+4*5+6+78-9', '1*2+3-4+5*6+78-9', '1*2+3*4+5-6+78+9', '1*2+3+45+67-8-9', '1*2-3+4-5+6+7+89', '1*2-3+4*5-6+78+9', '1*2*3+4+5+6+7+8*9', '1*2*3-4+5+6+78+9', '1*2*3-4*5+6*7+8*9', '1*2*3*4+5+6+7*8+9', '1*2*3*4+5+6-7+8*9', '1*2*3*4-5-6+78+9', '1*2*3-45+67+8*9', '1*2+34+5+6*7+8+9', '1*2+34+5-6+7*8+9', '1*2+34+5-6-7+8*9', '1*2+34+56+7-8+9', '1*2*34+56-7-8-9', '1+23-4+5+6+78-9', '1+23-4-5+6+7+8*9', '1+23-4+56+7+8+9', '1+23*4+5-6+7-8+9', '1+23*4-5+6+7+8-9', '1-23+4*5+6+7+89', '1-23-4+5*6+7+89', '1-23-4-5+6*7+89', '1*23+4+5+67-8+9', '1*23-4+5-6-7+89', '1+234-56-7-8*9', '1*234+5-67-8*9', '12+3+4+5-6-7+89', '12+3-4+5+67+8+9', '12+3*4+5+6+7*8+9', '12+3*4+5+6-7+8*9', '12+3*4-5-6+78+9', '12+3*45+6*7-89', '12-3+4*5+6+7*8+9', '12-3+4*5+6-7+8*9', '12-3-4+5-6+7+89', '12-3-4+5*6+7*8+9', '12-3-4+5*6-7+8*9', '12*3-4+5-6+78-9', '12*3-4-5-6+7+8*9', '12*3-4*5+67+8+9', '12+34+5*6+7+8+9', '12+34-5+6*7+8+9', '12+34-5-6+7*8+9', '12+34-5-6-7+8*9', '123+4-5+67-89', '123+4*5-6*7+8-9', '123-4-5-6-7+8-9', '123+45-67+8-9', '123-45-67+89']\n assert candidate(num = \"10000\",target = 1) == ['1+0+0+0+0', '1+0+0+0-0', '1+0+0+0*0', '1+0+0-0+0', '1+0+0-0-0', '1+0+0-0*0', '1+0+0*0+0', '1+0+0*0-0', '1+0+0*0*0', '1+0-0+0+0', '1+0-0+0-0', '1+0-0+0*0', '1+0-0-0+0', '1+0-0-0-0', '1+0-0-0*0', '1+0-0*0+0', '1+0-0*0-0', '1+0-0*0*0', '1+0*0+0+0', '1+0*0+0-0', '1+0*0+0*0', '1+0*0-0+0', '1+0*0-0-0', '1+0*0-0*0', '1+0*0*0+0', '1+0*0*0-0', '1+0*0*0*0', '1-0+0+0+0', '1-0+0+0-0', '1-0+0+0*0', '1-0+0-0+0', '1-0+0-0-0', '1-0+0-0*0', '1-0+0*0+0', '1-0+0*0-0', '1-0+0*0*0', '1-0-0+0+0', '1-0-0+0-0', '1-0-0+0*0', '1-0-0-0+0', '1-0-0-0-0', '1-0-0-0*0', '1-0-0*0+0', '1-0-0*0-0', '1-0-0*0*0', '1-0*0+0+0', '1-0*0+0-0', '1-0*0+0*0', '1-0*0-0+0', '1-0*0-0-0', '1-0*0-0*0', '1-0*0*0+0', '1-0*0*0-0', '1-0*0*0*0']\n assert candidate(num = \"9999999999\",target = 1000000000) == []\n assert candidate(num = \"123456789\",target = 4321) == []\n assert candidate(num = \"456\",target = 456) == ['456']\n assert candidate(num = \"12345\",target = 30) == ['1+2*3*4+5']\n assert candidate(num = \"1000000\",target = 1) == ['1+0+0+0+0+0+0', '1+0+0+0+0+0-0', '1+0+0+0+0+0*0', '1+0+0+0+0-0+0', '1+0+0+0+0-0-0', '1+0+0+0+0-0*0', '1+0+0+0+0*0+0', '1+0+0+0+0*0-0', '1+0+0+0+0*0*0', '1+0+0+0-0+0+0', '1+0+0+0-0+0-0', '1+0+0+0-0+0*0', '1+0+0+0-0-0+0', '1+0+0+0-0-0-0', '1+0+0+0-0-0*0', '1+0+0+0-0*0+0', '1+0+0+0-0*0-0', '1+0+0+0-0*0*0', '1+0+0+0*0+0+0', '1+0+0+0*0+0-0', '1+0+0+0*0+0*0', '1+0+0+0*0-0+0', '1+0+0+0*0-0-0', '1+0+0+0*0-0*0', '1+0+0+0*0*0+0', '1+0+0+0*0*0-0', '1+0+0+0*0*0*0', '1+0+0-0+0+0+0', '1+0+0-0+0+0-0', '1+0+0-0+0+0*0', '1+0+0-0+0-0+0', '1+0+0-0+0-0-0', '1+0+0-0+0-0*0', '1+0+0-0+0*0+0', '1+0+0-0+0*0-0', '1+0+0-0+0*0*0', '1+0+0-0-0+0+0', '1+0+0-0-0+0-0', '1+0+0-0-0+0*0', '1+0+0-0-0-0+0', '1+0+0-0-0-0-0', '1+0+0-0-0-0*0', '1+0+0-0-0*0+0', '1+0+0-0-0*0-0', '1+0+0-0-0*0*0', '1+0+0-0*0+0+0', '1+0+0-0*0+0-0', '1+0+0-0*0+0*0', '1+0+0-0*0-0+0', '1+0+0-0*0-0-0', '1+0+0-0*0-0*0', '1+0+0-0*0*0+0', '1+0+0-0*0*0-0', '1+0+0-0*0*0*0', '1+0+0*0+0+0+0', '1+0+0*0+0+0-0', '1+0+0*0+0+0*0', '1+0+0*0+0-0+0', '1+0+0*0+0-0-0', '1+0+0*0+0-0*0', '1+0+0*0+0*0+0', '1+0+0*0+0*0-0', '1+0+0*0+0*0*0', '1+0+0*0-0+0+0', '1+0+0*0-0+0-0', '1+0+0*0-0+0*0', '1+0+0*0-0-0+0', '1+0+0*0-0-0-0', '1+0+0*0-0-0*0', '1+0+0*0-0*0+0', '1+0+0*0-0*0-0', '1+0+0*0-0*0*0', '1+0+0*0*0+0+0', '1+0+0*0*0+0-0', '1+0+0*0*0+0*0', '1+0+0*0*0-0+0', '1+0+0*0*0-0-0', '1+0+0*0*0-0*0', '1+0+0*0*0*0+0', '1+0+0*0*0*0-0', '1+0+0*0*0*0*0', '1+0-0+0+0+0+0', '1+0-0+0+0+0-0', '1+0-0+0+0+0*0', '1+0-0+0+0-0+0', '1+0-0+0+0-0-0', '1+0-0+0+0-0*0', '1+0-0+0+0*0+0', '1+0-0+0+0*0-0', '1+0-0+0+0*0*0', '1+0-0+0-0+0+0', '1+0-0+0-0+0-0', '1+0-0+0-0+0*0', '1+0-0+0-0-0+0', '1+0-0+0-0-0-0', '1+0-0+0-0-0*0', '1+0-0+0-0*0+0', '1+0-0+0-0*0-0', '1+0-0+0-0*0*0', '1+0-0+0*0+0+0', '1+0-0+0*0+0-0', '1+0-0+0*0+0*0', '1+0-0+0*0-0+0', '1+0-0+0*0-0-0', '1+0-0+0*0-0*0', '1+0-0+0*0*0+0', '1+0-0+0*0*0-0', '1+0-0+0*0*0*0', '1+0-0-0+0+0+0', '1+0-0-0+0+0-0', '1+0-0-0+0+0*0', '1+0-0-0+0-0+0', '1+0-0-0+0-0-0', '1+0-0-0+0-0*0', '1+0-0-0+0*0+0', '1+0-0-0+0*0-0', '1+0-0-0+0*0*0', '1+0-0-0-0+0+0', '1+0-0-0-0+0-0', '1+0-0-0-0+0*0', '1+0-0-0-0-0+0', '1+0-0-0-0-0-0', '1+0-0-0-0-0*0', '1+0-0-0-0*0+0', '1+0-0-0-0*0-0', '1+0-0-0-0*0*0', '1+0-0-0*0+0+0', '1+0-0-0*0+0-0', '1+0-0-0*0+0*0', '1+0-0-0*0-0+0', '1+0-0-0*0-0-0', '1+0-0-0*0-0*0', '1+0-0-0*0*0+0', '1+0-0-0*0*0-0', '1+0-0-0*0*0*0', '1+0-0*0+0+0+0', '1+0-0*0+0+0-0', '1+0-0*0+0+0*0', '1+0-0*0+0-0+0', '1+0-0*0+0-0-0', '1+0-0*0+0-0*0', '1+0-0*0+0*0+0', '1+0-0*0+0*0-0', '1+0-0*0+0*0*0', '1+0-0*0-0+0+0', '1+0-0*0-0+0-0', '1+0-0*0-0+0*0', '1+0-0*0-0-0+0', '1+0-0*0-0-0-0', '1+0-0*0-0-0*0', '1+0-0*0-0*0+0', '1+0-0*0-0*0-0', '1+0-0*0-0*0*0', '1+0-0*0*0+0+0', '1+0-0*0*0+0-0', '1+0-0*0*0+0*0', '1+0-0*0*0-0+0', '1+0-0*0*0-0-0', '1+0-0*0*0-0*0', '1+0-0*0*0*0+0', '1+0-0*0*0*0-0', '1+0-0*0*0*0*0', '1+0*0+0+0+0+0', '1+0*0+0+0+0-0', '1+0*0+0+0+0*0', '1+0*0+0+0-0+0', '1+0*0+0+0-0-0', '1+0*0+0+0-0*0', '1+0*0+0+0*0+0', '1+0*0+0+0*0-0', '1+0*0+0+0*0*0', '1+0*0+0-0+0+0', '1+0*0+0-0+0-0', '1+0*0+0-0+0*0', '1+0*0+0-0-0+0', '1+0*0+0-0-0-0', '1+0*0+0-0-0*0', '1+0*0+0-0*0+0', '1+0*0+0-0*0-0', '1+0*0+0-0*0*0', '1+0*0+0*0+0+0', '1+0*0+0*0+0-0', '1+0*0+0*0+0*0', '1+0*0+0*0-0+0', '1+0*0+0*0-0-0', '1+0*0+0*0-0*0', '1+0*0+0*0*0+0', '1+0*0+0*0*0-0', '1+0*0+0*0*0*0', '1+0*0-0+0+0+0', '1+0*0-0+0+0-0', '1+0*0-0+0+0*0', '1+0*0-0+0-0+0', '1+0*0-0+0-0-0', '1+0*0-0+0-0*0', '1+0*0-0+0*0+0', '1+0*0-0+0*0-0', '1+0*0-0+0*0*0', '1+0*0-0-0+0+0', '1+0*0-0-0+0-0', '1+0*0-0-0+0*0', '1+0*0-0-0-0+0', '1+0*0-0-0-0-0', '1+0*0-0-0-0*0', '1+0*0-0-0*0+0', '1+0*0-0-0*0-0', '1+0*0-0-0*0*0', '1+0*0-0*0+0+0', '1+0*0-0*0+0-0', '1+0*0-0*0+0*0', '1+0*0-0*0-0+0', '1+0*0-0*0-0-0', '1+0*0-0*0-0*0', '1+0*0-0*0*0+0', '1+0*0-0*0*0-0', '1+0*0-0*0*0*0', '1+0*0*0+0+0+0', '1+0*0*0+0+0-0', '1+0*0*0+0+0*0', '1+0*0*0+0-0+0', '1+0*0*0+0-0-0', '1+0*0*0+0-0*0', '1+0*0*0+0*0+0', '1+0*0*0+0*0-0', '1+0*0*0+0*0*0', '1+0*0*0-0+0+0', '1+0*0*0-0+0-0', '1+0*0*0-0+0*0', '1+0*0*0-0-0+0', '1+0*0*0-0-0-0', '1+0*0*0-0-0*0', '1+0*0*0-0*0+0', '1+0*0*0-0*0-0', '1+0*0*0-0*0*0', '1+0*0*0*0+0+0', '1+0*0*0*0+0-0', '1+0*0*0*0+0*0', '1+0*0*0*0-0+0', '1+0*0*0*0-0-0', '1+0*0*0*0-0*0', '1+0*0*0*0*0+0', '1+0*0*0*0*0-0', '1+0*0*0*0*0*0', '1-0+0+0+0+0+0', '1-0+0+0+0+0-0', '1-0+0+0+0+0*0', '1-0+0+0+0-0+0', '1-0+0+0+0-0-0', '1-0+0+0+0-0*0', '1-0+0+0+0*0+0', '1-0+0+0+0*0-0', '1-0+0+0+0*0*0', '1-0+0+0-0+0+0', '1-0+0+0-0+0-0', '1-0+0+0-0+0*0', '1-0+0+0-0-0+0', '1-0+0+0-0-0-0', '1-0+0+0-0-0*0', '1-0+0+0-0*0+0', '1-0+0+0-0*0-0', '1-0+0+0-0*0*0', '1-0+0+0*0+0+0', '1-0+0+0*0+0-0', '1-0+0+0*0+0*0', '1-0+0+0*0-0+0', '1-0+0+0*0-0-0', '1-0+0+0*0-0*0', '1-0+0+0*0*0+0', '1-0+0+0*0*0-0', '1-0+0+0*0*0*0', '1-0+0-0+0+0+0', '1-0+0-0+0+0-0', '1-0+0-0+0+0*0', '1-0+0-0+0-0+0', '1-0+0-0+0-0-0', '1-0+0-0+0-0*0', '1-0+0-0+0*0+0', '1-0+0-0+0*0-0', '1-0+0-0+0*0*0', '1-0+0-0-0+0+0', '1-0+0-0-0+0-0', '1-0+0-0-0+0*0', '1-0+0-0-0-0+0', '1-0+0-0-0-0-0', '1-0+0-0-0-0*0', '1-0+0-0-0*0+0', '1-0+0-0-0*0-0', '1-0+0-0-0*0*0', '1-0+0-0*0+0+0', '1-0+0-0*0+0-0', '1-0+0-0*0+0*0', '1-0+0-0*0-0+0', '1-0+0-0*0-0-0', '1-0+0-0*0-0*0', '1-0+0-0*0*0+0', '1-0+0-0*0*0-0', '1-0+0-0*0*0*0', '1-0+0*0+0+0+0', '1-0+0*0+0+0-0', '1-0+0*0+0+0*0', '1-0+0*0+0-0+0', '1-0+0*0+0-0-0', '1-0+0*0+0-0*0', '1-0+0*0+0*0+0', '1-0+0*0+0*0-0', '1-0+0*0+0*0*0', '1-0+0*0-0+0+0', '1-0+0*0-0+0-0', '1-0+0*0-0+0*0', '1-0+0*0-0-0+0', '1-0+0*0-0-0-0', '1-0+0*0-0-0*0', '1-0+0*0-0*0+0', '1-0+0*0-0*0-0', '1-0+0*0-0*0*0', '1-0+0*0*0+0+0', '1-0+0*0*0+0-0', '1-0+0*0*0+0*0', '1-0+0*0*0-0+0', '1-0+0*0*0-0-0', '1-0+0*0*0-0*0', '1-0+0*0*0*0+0', '1-0+0*0*0*0-0', '1-0+0*0*0*0*0', '1-0-0+0+0+0+0', '1-0-0+0+0+0-0', '1-0-0+0+0+0*0', '1-0-0+0+0-0+0', '1-0-0+0+0-0-0', '1-0-0+0+0-0*0', '1-0-0+0+0*0+0', '1-0-0+0+0*0-0', '1-0-0+0+0*0*0', '1-0-0+0-0+0+0', '1-0-0+0-0+0-0', '1-0-0+0-0+0*0', '1-0-0+0-0-0+0', '1-0-0+0-0-0-0', '1-0-0+0-0-0*0', '1-0-0+0-0*0+0', '1-0-0+0-0*0-0', '1-0-0+0-0*0*0', '1-0-0+0*0+0+0', '1-0-0+0*0+0-0', '1-0-0+0*0+0*0', '1-0-0+0*0-0+0', '1-0-0+0*0-0-0', '1-0-0+0*0-0*0', '1-0-0+0*0*0+0', '1-0-0+0*0*0-0', '1-0-0+0*0*0*0', '1-0-0-0+0+0+0', '1-0-0-0+0+0-0', '1-0-0-0+0+0*0', '1-0-0-0+0-0+0', '1-0-0-0+0-0-0', '1-0-0-0+0-0*0', '1-0-0-0+0*0+0', '1-0-0-0+0*0-0', '1-0-0-0+0*0*0', '1-0-0-0-0+0+0', '1-0-0-0-0+0-0', '1-0-0-0-0+0*0', '1-0-0-0-0-0+0', '1-0-0-0-0-0-0', '1-0-0-0-0-0*0', '1-0-0-0-0*0+0', '1-0-0-0-0*0-0', '1-0-0-0-0*0*0', '1-0-0-0*0+0+0', '1-0-0-0*0+0-0', '1-0-0-0*0+0*0', '1-0-0-0*0-0+0', '1-0-0-0*0-0-0', '1-0-0-0*0-0*0', '1-0-0-0*0*0+0', '1-0-0-0*0*0-0', '1-0-0-0*0*0*0', '1-0-0*0+0+0+0', '1-0-0*0+0+0-0', '1-0-0*0+0+0*0', '1-0-0*0+0-0+0', '1-0-0*0+0-0-0', '1-0-0*0+0-0*0', '1-0-0*0+0*0+0', '1-0-0*0+0*0-0', '1-0-0*0+0*0*0', '1-0-0*0-0+0+0', '1-0-0*0-0+0-0', '1-0-0*0-0+0*0', '1-0-0*0-0-0+0', '1-0-0*0-0-0-0', '1-0-0*0-0-0*0', '1-0-0*0-0*0+0', '1-0-0*0-0*0-0', '1-0-0*0-0*0*0', '1-0-0*0*0+0+0', '1-0-0*0*0+0-0', '1-0-0*0*0+0*0', '1-0-0*0*0-0+0', '1-0-0*0*0-0-0', '1-0-0*0*0-0*0', '1-0-0*0*0*0+0', '1-0-0*0*0*0-0', '1-0-0*0*0*0*0', '1-0*0+0+0+0+0', '1-0*0+0+0+0-0', '1-0*0+0+0+0*0', '1-0*0+0+0-0+0', '1-0*0+0+0-0-0', '1-0*0+0+0-0*0', '1-0*0+0+0*0+0', '1-0*0+0+0*0-0', '1-0*0+0+0*0*0', '1-0*0+0-0+0+0', '1-0*0+0-0+0-0', '1-0*0+0-0+0*0', '1-0*0+0-0-0+0', '1-0*0+0-0-0-0', '1-0*0+0-0-0*0', '1-0*0+0-0*0+0', '1-0*0+0-0*0-0', '1-0*0+0-0*0*0', '1-0*0+0*0+0+0', '1-0*0+0*0+0-0', '1-0*0+0*0+0*0', '1-0*0+0*0-0+0', '1-0*0+0*0-0-0', '1-0*0+0*0-0*0', '1-0*0+0*0*0+0', '1-0*0+0*0*0-0', '1-0*0+0*0*0*0', '1-0*0-0+0+0+0', '1-0*0-0+0+0-0', '1-0*0-0+0+0*0', '1-0*0-0+0-0+0', '1-0*0-0+0-0-0', '1-0*0-0+0-0*0', '1-0*0-0+0*0+0', '1-0*0-0+0*0-0', '1-0*0-0+0*0*0', '1-0*0-0-0+0+0', '1-0*0-0-0+0-0', '1-0*0-0-0+0*0', '1-0*0-0-0-0+0', '1-0*0-0-0-0-0', '1-0*0-0-0-0*0', '1-0*0-0-0*0+0', '1-0*0-0-0*0-0', '1-0*0-0-0*0*0', '1-0*0-0*0+0+0', '1-0*0-0*0+0-0', '1-0*0-0*0+0*0', '1-0*0-0*0-0+0', '1-0*0-0*0-0-0', '1-0*0-0*0-0*0', '1-0*0-0*0*0+0', '1-0*0-0*0*0-0', '1-0*0-0*0*0*0', '1-0*0*0+0+0+0', '1-0*0*0+0+0-0', '1-0*0*0+0+0*0', '1-0*0*0+0-0+0', '1-0*0*0+0-0-0', '1-0*0*0+0-0*0', '1-0*0*0+0*0+0', '1-0*0*0+0*0-0', '1-0*0*0+0*0*0', '1-0*0*0-0+0+0', '1-0*0*0-0+0-0', '1-0*0*0-0+0*0', '1-0*0*0-0-0+0', '1-0*0*0-0-0-0', '1-0*0*0-0-0*0', '1-0*0*0-0*0+0', '1-0*0*0-0*0-0', '1-0*0*0-0*0*0', '1-0*0*0*0+0+0', '1-0*0*0*0+0-0', '1-0*0*0*0+0*0', '1-0*0*0*0-0+0', '1-0*0*0*0-0-0', '1-0*0*0*0-0*0', '1-0*0*0*0*0+0', '1-0*0*0*0*0-0', '1-0*0*0*0*0*0']\n assert candidate(num = \"999\",target = 27) == ['9+9+9']\n assert candidate(num = \"1000\",target = 0) == ['1*0+0+0', '1*0+0-0', '1*0+0*0', '1*0-0+0', '1*0-0-0', '1*0-0*0', '1*0*0+0', '1*0*0-0', '1*0*0*0', '10*0+0', '10*0-0', '10*0*0', '100*0']\n assert candidate(num = \"12345\",target = 15) == ['1+2+3+4+5', '1-2*3+4*5', '1*2*3+4+5', '1+23-4-5']\n assert candidate(num = \"55555\",target = 100) == ['5*5*5-5*5']\n assert candidate(num = \"123456789\",target = 0) == ['1+2+3+4-5+67-8*9', '1+2+3-4*5+6+7-8+9', '1+2+3*4*5+6-78+9', '1+2-3*4+5-6-7+8+9', '1+2-3*4-5+6+7-8+9', '1+2-3*4+56-7*8+9', '1+2-3*4-56+7*8+9', '1+2-3*4-56-7+8*9', '1+2*3+4+5-6+7-8-9', '1+2*3-4-5-6+7-8+9', '1+2*3*4+5+6*7-8*9', '1+2*3*4+5-6-7-8-9', '1+2-34-56+78+9', '1-2+3+4-5*6+7+8+9', '1-2+3+4*5+67-89', '1-2+3-4*5-6+7+8+9', '1-2+3*4+5-6+7-8-9', '1-2+3*4*5+6+7-8*9', '1-2+3*4*5+6-7*8-9', '1-2+3*4*5-6*7-8-9', '1-2+3+45+6*7-89', '1-2+3-45+6*7-8+9', '1-2-3+4+5+67-8*9', '1-2-3+4-5-67+8*9', '1-2-3+4*5-6+7-8-9', '1-2-3*4-5-6+7+8+9', '1-2-3*4-56+78-9', '1-2-3+45+6-7*8+9', '1-2-3+45-6*7-8+9', '1-2*3+4+5+6+7-8-9', '1-2*3-4+5-6-7+8+9', '1-2*3-4-5+6+7-8+9', '1-2*3-4*5+6*7-8-9', '1-2*3-4+56-7*8+9', '1-2*3-4-56+7*8+9', '1-2*3-4-56-7+8*9', '1-2*3*4+5-6+7+8+9', '1-2*3*4-56+7+8*9', '1-2*3-45+67-8-9', '1-2-34+5+6+7+8+9', '1-2-34+5-6*7+8*9', '1-2-34-5*6+7*8+9', '1-2-34-5*6-7+8*9', '1*2+3+4+5-6-7+8-9', '1*2+3+4-5+6+7-8-9', '1*2+3+4*5-6*7+8+9', '1*2+3+4+56+7-8*9', '1*2+3+4+56-7*8-9', '1*2+3+4-56+7*8-9', '1*2+3-4-5-6-7+8+9', '1*2+3+45-67+8+9', '1*2-3+4-5-6+7-8+9', '1*2-3-4+5+6-7-8+9', '1*2-3-4+5-6+7+8-9', '1*2-3*4+5-67+8*9', '1*2*3+4-5+67-8*9', '1*2*3-4*5+6+7-8+9', '1*2*3*4-5*6+7+8-9', '1*2+34+5+6-7*8+9', '1*2+34+5-6*7-8+9', '1*2+34-5*6-7-8+9', '1*2-34+56-7-8-9', '1*2*34+5+6-7-8*9', '1*2*34-5+6-78+9', '1+23-4+5-6*7+8+9', '1+23-4-5*6-7+8+9', '1+23-4*5+6+7-8-9', '1+23-4*5*6+7+89', '1+23*4-5-6+7-89', '1-23+4*5-6+7-8+9', '1-23-4-56-7+89', '1-23*4*5+6*78-9', '1*23+4-5+67-89', '1*23+4*5-6*7+8-9', '1*23-4-5-6-7+8-9', '1*23+45-67+8-9', '1*23-45-67+89', '12+3+4-5-6-7+8-9', '12+3-4+5-6+7-8-9', '12+3-4*5-67+8*9', '12+3*4-5*6+7+8-9', '12+3-45+6+7+8+9', '12+3-45-6*7+8*9', '12-3+4+5+6-7-8-9', '12-3+4+56-78+9', '12-3-4-5+6-7-8+9', '12-3-4-5-6+7+8-9', '12-3*4+5+67-8*9', '12-3*4-5-67+8*9', '12*3+4-5*6+7-8-9', '12*3+4+56-7-89', '12*3-4*5-6+7-8-9', '12*3-4-56+7+8+9', '12*3*4-5-67-8*9', '12*3+45+6-78-9', '12+34-5+6-7*8+9', '12+34-5-6*7-8+9', '12+34-56-7+8+9', '12-34+5*6-7+8-9', '123-4-5-6*7-8*9']\n assert candidate(num = \"2324\",target = 20) == []\n assert candidate(num = \"2020\",target = 4) == ['2+0+2+0', '2+0+2-0', '2-0+2+0', '2-0+2-0']\n assert candidate(num = \"2147483647\",target = 2147483647) == ['2147483647']\n assert candidate(num = \"5050\",target = 5000) == []\n assert candidate(num = \"999999999\",target = 81) == ['9+9+9+9+9+9+9+9+9', '999-9-9-9-9*99', '999-9-9-9-99*9', '999-9-9-9*99-9', '999-9-9-99*9-9', '999-9-9*99-9-9', '999-9-99*9-9-9', '999-9*99-9-9-9', '999-99*9-9-9-9']\n assert candidate(num = \"1230\",target = 3) == ['1+2+3*0', '1+2-3*0']\n assert candidate(num = \"0123\",target = 6) == ['0+1+2+3', '0+1*2*3', '0*1+2*3']\n assert candidate(num = \"2323\",target = 8) == []\n assert candidate(num = \"54321\",target = 13) == ['5+4+3+2-1', '5*4-3*2-1']\n assert candidate(num = \"1111111111\",target = 100) == ['1+1+1*111-1-1-11', '1+1+1*111-1-11-1', '1+1+1*111-11-1-1', '1+1-1+1*111-1-11', '1+1-1+1*111-11-1', '1+1-1-1+1*111-11', '1+1-1-1-1*11+111', '1+1-1-1*1-11+111', '1+1-1-1*1+111-11', '1+1-1-1-11+1*111', '1+1-1-1-11*1+111', '1+1-1-1-11+111*1', '1+1-1-1*11-1+111', '1+1-1-1*11+111-1', '1+1-1-1+111-1*11', '1+1-1-1+111*1-11', '1+1-1-1+111-11*1', '1+1-1*1-1-11+111', '1+1-1*1-1+111-11', '1+1-1*1-11-1+111', '1+1-1*1-11+111-1', '1+1-1*1+111-1-11', '1+1-1*1+111-11-1', '1+1-1-11+1*111-1', '1+1-1-11-1+1*111', '1+1-1-11-1*1+111', '1+1-1-11-1+111*1', '1+1-1-11*1-1+111', '1+1-1-11*1+111-1', '1+1-1-11+111-1*1', '1+1-1-11+111*1-1', '1+1-1*11-1-1+111', '1+1-1*11-1+111-1', '1+1-1*11+111-1-1', '1+1-1+111-1-1*11', '1+1-1+111-1*1-11', '1+1-1+111-1-11*1', '1+1-1+111-1*11-1', '1+1-1+111*1-1-11', '1+1-1+111*1-11-1', '1+1-1+111-11-1*1', '1+1-1+111-11*1-1', '1+1*1-1-1-11+111', '1+1*1-1-1+111-11', '1+1*1-1-11-1+111', '1+1*1-1-11+111-1', '1+1*1-1+111-1-11', '1+1*1-1+111-11-1', '1+1*1*1*111-1-11', '1+1*1*1*111-11-1', '1+1*1-11-1-1+111', '1+1*1-11-1+111-1', '1+1*1-11+111-1-1', '1+1*1+111-1-1-11', '1+1*1+111-1-11-1', '1+1*1+111-11-1-1', '1+1*1*111-1-1*11', '1+1*1*111-1*1-11', '1+1*1*111-1-11*1', '1+1*1*111-1*11-1', '1+1*1*111*1-1-11', '1+1*1*111*1-11-1', '1+1*1*111-11-1*1', '1+1*1*111-11*1-1', '1+1-11+1*111-1-1', '1+1-11-1+1*111-1', '1+1-11-1-1+1*111', '1+1-11-1-1*1+111', '1+1-11-1-1+111*1', '1+1-11-1*1-1+111', '1+1-11-1*1+111-1', '1+1-11-1+111-1*1', '1+1-11-1+111*1-1', '1+1-11*1-1-1+111', '1+1-11*1-1+111-1', '1+1-11*1+111-1-1', '1+1-11+111-1-1*1', '1+1-11+111-1*1-1', '1+1-11+111*1-1-1', '1+1*11*11-11-11', '1+1+111-1-1-1*11', '1+1+111-1-1*1-11', '1+1+111-1-1-11*1', '1+1+111-1-1*11-1', '1+1+111-1*1-1-11', '1+1+111-1*1-11-1', '1+1+111-1-11-1*1', '1+1+111-1-11*1-1', '1+1+111-1*11-1-1', '1+1+111*1-1-1-11', '1+1+111*1-1-11-1', '1+1+111*1-11-1-1', '1+1+111-11-1-1*1', '1+1+111-11-1*1-1', '1+1+111-11*1-1-1', '1+1*111+1-1-1-11', '1+1*111+1-1-11-1', '1+1*111+1-11-1-1', '1+1*111-1+1-1-11', '1+1*111-1+1-11-1', '1+1*111-1-1+1-11', '1+1*111-1-1*1*11', '1+1*111-1-1-11+1', '1+1*111-1-1*11*1', '1+1*111-1*1-1*11', '1+1*111-1*1*1-11', '1+1*111-1*1-11*1', '1+1*111-1*1*11-1', '1+1*111-1-11+1-1', '1+1*111-1-11-1+1', '1+1*111-1-11*1*1', '1+1*111-1*11-1*1', '1+1*111-1*11*1-1', '1+1*111*1-1-1*11', '1+1*111*1-1*1-11', '1+1*111*1-1-11*1', '1+1*111*1-1*11-1', '1+1*111*1*1-1-11', '1+1*111*1*1-11-1', '1+1*111*1-11-1*1', '1+1*111*1-11*1-1', '1+1*111-11+1-1-1', '1+1*111-11-1+1-1', '1+1*111-11-1-1+1', '1+1*111-11-1*1*1', '1+1*111-11*1-1*1', '1+1*111-11*1*1-1', '1-1+1+1*111-1-11', '1-1+1+1*111-11-1', '1-1+1-1+1*111-11', '1-1+1-1-1*11+111', '1-1+1-1*1-11+111', '1-1+1-1*1+111-11', '1-1+1-1-11+1*111', '1-1+1-1-11*1+111', '1-1+1-1-11+111*1', '1-1+1-1*11-1+111', '1-1+1-1*11+111-1', '1-1+1-1+111-1*11', '1-1+1-1+111*1-11', '1-1+1-1+111-11*1', '1-1+1*1-1-11+111', '1-1+1*1-1+111-11', '1-1+1*1*1*111-11', '1-1+1*1-11-1+111', '1-1+1*1-11+111-1', '1-1+1*1+111-1-11', '1-1+1*1+111-11-1', '1-1+1*1*111-1*11', '1-1+1*1*111*1-11', '1-1+1*1*111-11*1', '1-1+1-11+1*111-1', '1-1+1-11-1+1*111', '1-1+1-11-1*1+111', '1-1+1-11-1+111*1', '1-1+1-11*1-1+111', '1-1+1-11*1+111-1', '1-1+1-11+111-1*1', '1-1+1-11+111*1-1', '1-1+1+111-1-1*11', '1-1+1+111-1*1-11', '1-1+1+111-1-11*1', '1-1+1+111-1*11-1', '1-1+1+111*1-1-11', '1-1+1+111*1-11-1', '1-1+1+111-11-1*1', '1-1+1+111-11*1-1', '1-1+1*111+1-1-11', '1-1+1*111+1-11-1', '1-1+1*111-1+1-11', '1-1+1*111-1*1*11', '1-1+1*111-1-11+1', '1-1+1*111-1*11*1', '1-1+1*111*1-1*11', '1-1+1*111*1*1-11', '1-1+1*111*1-11*1', '1-1+1*111-11+1-1', '1-1+1*111-11-1+1', '1-1+1*111-11*1*1', '1-1-1+1+1*111-11', '1-1-1+1-1*11+111', '1-1-1+1*1-11+111', '1-1-1+1*1+111-11', '1-1-1+1-11+1*111', '1-1-1+1-11*1+111', '1-1-1+1-11+111*1', '1-1-1+1+111-1*11', '1-1-1+1+111*1-11', '1-1-1+1+111-11*1', '1-1-1+1*111+1-11', '1-1-1+1*111-11+1', '1-1-1-1*11+1+111', '1-1-1-1*11+111+1', '1-1-1*1+1-11+111', '1-1-1*1+1+111-11', '1-1-1*1*1*11+111', '1-1-1*1-11+1+111', '1-1-1*1-11+111+1', '1-1-1*1*11+1*111', '1-1-1*1*11*1+111', '1-1-1*1*11+111*1', '1-1-1*1+111+1-11', '1-1-1*1+111-11+1', '1-1-1-11+1+1*111', '1-1-1-11+1*1+111', '1-1-1-11+1+111*1', '1-1-1-11+1*111+1', '1-1-1-11*1+1+111', '1-1-1-11*1+111+1', '1-1-1-11+111+1*1', '1-1-1-11+111*1+1', '1-1-1*11+1-1+111', '1-1-1*11+1*1*111', '1-1-1*11+1+111-1', '1-1-1*11+1*111*1', '1-1-1*11-1+1+111', '1-1-1*11-1+111+1', '1-1-1*11*1+1*111', '1-1-1*11*1*1+111', '1-1-1*11*1+111*1', '1-1-1*11+111+1-1', '1-1-1*11+111-1+1', '1-1-1*11+111*1*1', '1-1-1+111+1-1*11', '1-1-1+111+1*1-11', '1-1-1+111+1-11*1', '1-1-1+111-1*11+1', '1-1-1+111*1+1-11', '1-1-1+111*1-11+1', '1-1-1+111-11+1*1', '1-1-1+111-11*1+1', '1-1*1+1-1-11+111', '1-1*1+1-1+111-11', '1-1*1+1*1*111-11', '1-1*1+1-11-1+111', '1-1*1+1-11+111-1', '1-1*1+1+111-1-11', '1-1*1+1+111-11-1', '1-1*1+1*111-1*11', '1-1*1+1*111*1-11', '1-1*1+1*111-11*1', '1-1*1-1+1-11+111', '1-1*1-1+1+111-11', '1-1*1-1*1*11+111', '1-1*1-1-11+1+111', '1-1*1-1-11+111+1', '1-1*1-1*11+1*111', '1-1*1-1*11*1+111', '1-1*1-1*11+111*1', '1-1*1-1+111+1-11', '1-1*1-1+111-11+1', '1-1*1*1+1*111-11', '1-1*1*1-1*11+111', '1-1*1*1*1-11+111', '1-1*1*1*1+111-11', '1-1*1*1-11+1*111', '1-1*1*1-11*1+111', '1-1*1*1-11+111*1', '1-1*1*1*11-1+111', '1-1*1*1*11+111-1', '1-1*1*1+111-1*11', '1-1*1*1+111*1-11', '1-1*1*1+111-11*1', '1-1*1-11+1-1+111', '1-1*1-11+1*1*111', '1-1*1-11+1+111-1', '1-1*1-11+1*111*1', '1-1*1-11-1+1+111', '1-1*1-11-1+111+1', '1-1*1-11*1+1*111', '1-1*1-11*1*1+111', '1-1*1-11*1+111*1', '1-1*1-11+111+1-1', '1-1*1-11+111-1+1', '1-1*1-11+111*1*1', '1-1*1*11+1*111-1', '1-1*1*11-1+1*111', '1-1*1*11-1*1+111', '1-1*1*11-1+111*1', '1-1*1*11*1-1+111', '1-1*1*11*1+111-1', '1-1*1*11+111-1*1', '1-1*1*11+111*1-1', '1-1*1+111+1-1-11', '1-1*1+111+1-11-1', '1-1*1+111-1+1-11', '1-1*1+111-1*1*11', '1-1*1+111-1-11+1', '1-1*1+111-1*11*1', '1-1*1+111*1-1*11', '1-1*1+111*1*1-11', '1-1*1+111*1-11*1', '1-1*1+111-11+1-1', '1-1*1+111-11-1+1', '1-1*1+111-11*1*1', '1-1-11+1+1*111-1', '1-1-11+1-1+1*111', '1-1-11+1-1*1+111', '1-1-11+1-1+111*1', '1-1-11+1*1-1+111', '1-1-11+1*1*1*111', '1-1-11+1*1+111-1', '1-1-11+1*1*111*1', '1-1-11+1+111-1*1', '1-1-11+1+111*1-1', '1-1-11+1*111+1-1', '1-1-11+1*111-1+1', '1-1-11+1*111*1*1', '1-1-11-1+1+1*111', '1-1-11-1+1*1+111', '1-1-11-1+1+111*1', '1-1-11-1+1*111+1', '1-1-11-1*1+1+111', '1-1-11-1*1+111+1', '1-1-11-1+111+1*1', '1-1-11-1+111*1+1', '1-1-11*1+1-1+111', '1-1-11*1+1*1*111', '1-1-11*1+1+111-1', '1-1-11*1+1*111*1', '1-1-11*1-1+1+111', '1-1-11*1-1+111+1', '1-1-11*1*1+1*111', '1-1-11*1*1*1+111', '1-1-11*1*1+111*1', '1-1-11*1+111+1-1', '1-1-11*1+111-1+1', '1-1-11*1+111*1*1', '1-1-11+111+1-1*1', '1-1-11+111+1*1-1', '1-1-11+111-1+1*1', '1-1-11+111-1*1+1', '1-1-11+111*1+1-1', '1-1-11+111*1-1+1', '1-1-11+111*1*1*1', '1-1*11+1-1-1+111', '1-1*11+1-1+111-1', '1-1*11+1*1*111-1', '1-1*11+1+111-1-1', '1-1*11+1*111-1*1', '1-1*11+1*111*1-1', '1-1*11-1+1-1+111', '1-1*11-1+1*1*111', '1-1*11-1+1+111-1', '1-1*11-1+1*111*1', '1-1*11-1-1+1+111', '1-1*11-1-1+111+1', '1-1*11-1*1+1*111', '1-1*11-1*1*1+111', '1-1*11-1*1+111*1', '1-1*11-1+111+1-1', '1-1*11-1+111-1+1', '1-1*11-1+111*1*1', '1-1*11*1+1*111-1', '1-1*11*1-1+1*111', '1-1*11*1-1*1+111', '1-1*11*1-1+111*1', '1-1*11*1*1-1+111', '1-1*11*1*1+111-1', '1-1*11*1+111-1*1', '1-1*11*1+111*1-1', '1-1*11+11*11-11', '1-1*11-11+11*11', '1-1*11+111+1-1-1', '1-1*11+111-1+1-1', '1-1*11+111-1-1+1', '1-1*11+111-1*1*1', '1-1*11+111*1-1*1', '1-1*11+111*1*1-1', '1-1+111+1-1-1*11', '1-1+111+1-1*1-11', '1-1+111+1-1-11*1', '1-1+111+1-1*11-1', '1-1+111+1*1-1-11', '1-1+111+1*1-11-1', '1-1+111+1-11-1*1', '1-1+111+1-11*1-1', '1-1+111-1+1-1*11', '1-1+111-1+1*1-11', '1-1+111-1+1-11*1', '1-1+111-1-1*11+1', '1-1+111-1*1+1-11', '1-1+111-1*1*1*11', '1-1+111-1*1-11+1', '1-1+111-1*1*11*1', '1-1+111-1-11+1*1', '1-1+111-1-11*1+1', '1-1+111-1*11+1-1', '1-1+111-1*11-1+1', '1-1+111-1*11*1*1', '1-1+111*1+1-1-11', '1-1+111*1+1-11-1', '1-1+111*1-1+1-11', '1-1+111*1-1*1*11', '1-1+111*1-1-11+1', '1-1+111*1-1*11*1', '1-1+111*1*1-1*11', '1-1+111*1*1*1-11', '1-1+111*1*1-11*1', '1-1+111*1-11+1-1', '1-1+111*1-11-1+1', '1-1+111*1-11*1*1', '1-1+111-11+1-1*1', '1-1+111-11+1*1-1', '1-1+111-11-1+1*1', '1-1+111-11-1*1+1', '1-1+111-11*1+1-1', '1-1+111-11*1-1+1', '1-1+111-11*1*1*1', '1*1+1-1-1-11+111', '1*1+1-1-1+111-11', '1*1+1-1-11-1+111', '1*1+1-1-11+111-1', '1*1+1-1+111-1-11', '1*1+1-1+111-11-1', '1*1+1*1*111-1-11', '1*1+1*1*111-11-1', '1*1+1-11-1-1+111', '1*1+1-11-1+111-1', '1*1+1-11+111-1-1', '1*1+1+111-1-1-11', '1*1+1+111-1-11-1', '1*1+1+111-11-1-1', '1*1+1*111-1-1*11', '1*1+1*111-1*1-11', '1*1+1*111-1-11*1', '1*1+1*111-1*11-1', '1*1+1*111*1-1-11', '1*1+1*111*1-11-1', '1*1+1*111-11-1*1', '1*1+1*111-11*1-1', '1*1-1+1-1-11+111', '1*1-1+1-1+111-11', '1*1-1+1*1*111-11', '1*1-1+1-11-1+111', '1*1-1+1-11+111-1', '1*1-1+1+111-1-11', '1*1-1+1+111-11-1', '1*1-1+1*111-1*11', '1*1-1+1*111*1-11', '1*1-1+1*111-11*1', '1*1-1-1+1-11+111', '1*1-1-1+1+111-11', '1*1-1-1*1*11+111', '1*1-1-1-11+1+111', '1*1-1-1-11+111+1', '1*1-1-1*11+1*111', '1*1-1-1*11*1+111', '1*1-1-1*11+111*1', '1*1-1-1+111+1-11', '1*1-1-1+111-11+1', '1*1-1*1+1*111-11', '1*1-1*1-1*11+111', '1*1-1*1*1-11+111', '1*1-1*1*1+111-11', '1*1-1*1-11+1*111', '1*1-1*1-11*1+111', '1*1-1*1-11+111*1', '1*1-1*1*11-1+111', '1*1-1*1*11+111-1', '1*1-1*1+111-1*11', '1*1-1*1+111*1-11', '1*1-1*1+111-11*1', '1*1-1-11+1-1+111', '1*1-1-11+1*1*111', '1*1-1-11+1+111-1', '1*1-1-11+1*111*1', '1*1-1-11-1+1+111', '1*1-1-11-1+111+1', '1*1-1-11*1+1*111', '1*1-1-11*1*1+111', '1*1-1-11*1+111*1', '1*1-1-11+111+1-1', '1*1-1-11+111-1+1', '1*1-1-11+111*1*1', '1*1-1*11+1*111-1', '1*1-1*11-1+1*111', '1*1-1*11-1*1+111', '1*1-1*11-1+111*1', '1*1-1*11*1-1+111', '1*1-1*11*1+111-1', '1*1-1*11+111-1*1', '1*1-1*11+111*1-1', '1*1-1+111+1-1-11', '1*1-1+111+1-11-1', '1*1-1+111-1+1-11', '1*1-1+111-1*1*11', '1*1-1+111-1-11+1', '1*1-1+111-1*11*1', '1*1-1+111*1-1*11', '1*1-1+111*1*1-11', '1*1-1+111*1-11*1', '1*1-1+111-11+1-1', '1*1-1+111-11-1+1', '1*1-1+111-11*1*1', '1*1*1+1*111-1-11', '1*1*1+1*111-11-1', '1*1*1-1+1*111-11', '1*1*1-1-1*11+111', '1*1*1-1*1-11+111', '1*1*1-1*1+111-11', '1*1*1-1-11+1*111', '1*1*1-1-11*1+111', '1*1*1-1-11+111*1', '1*1*1-1*11-1+111', '1*1*1-1*11+111-1', '1*1*1-1+111-1*11', '1*1*1-1+111*1-11', '1*1*1-1+111-11*1', '1*1*1*1-1-11+111', '1*1*1*1-1+111-11', '1*1*1*1*1*111-11', '1*1*1*1-11-1+111', '1*1*1*1-11+111-1', '1*1*1*1+111-1-11', '1*1*1*1+111-11-1', '1*1*1*1*111-1*11', '1*1*1*1*111*1-11', '1*1*1*1*111-11*1', '1*1*1-11+1*111-1', '1*1*1-11-1+1*111', '1*1*1-11-1*1+111', '1*1*1-11-1+111*1', '1*1*1-11*1-1+111', '1*1*1-11*1+111-1', '1*1*1-11+111-1*1', '1*1*1-11+111*1-1', '1*1*1+111-1-1*11', '1*1*1+111-1*1-11', '1*1*1+111-1-11*1', '1*1*1+111-1*11-1', '1*1*1+111*1-1-11', '1*1*1+111*1-11-1', '1*1*1+111-11-1*1', '1*1*1+111-11*1-1', '1*1*1*111+1-1-11', '1*1*1*111+1-11-1', '1*1*1*111-1+1-11', '1*1*1*111-1*1*11', '1*1*1*111-1-11+1', '1*1*1*111-1*11*1', '1*1*1*111*1-1*11', '1*1*1*111*1*1-11', '1*1*1*111*1-11*1', '1*1*1*111-11+1-1', '1*1*1*111-11-1+1', '1*1*1*111-11*1*1', '1*1+11*11-11-11', '1*1-11+1-1-1+111', '1*1-11+1-1+111-1', '1*1-11+1*1*111-1', '1*1-11+1+111-1-1', '1*1-11+1*111-1*1', '1*1-11+1*111*1-1', '1*1-11-1+1-1+111', '1*1-11-1+1*1*111', '1*1-11-1+1+111-1', '1*1-11-1+1*111*1', '1*1-11-1-1+1+111', '1*1-11-1-1+111+1', '1*1-11-1*1+1*111', '1*1-11-1*1*1+111', '1*1-11-1*1+111*1', '1*1-11-1+111+1-1', '1*1-11-1+111-1+1', '1*1-11-1+111*1*1', '1*1-11*1+1*111-1', '1*1-11*1-1+1*111', '1*1-11*1-1*1+111', '1*1-11*1-1+111*1', '1*1-11*1*1-1+111', '1*1-11*1*1+111-1', '1*1-11*1+111-1*1', '1*1-11*1+111*1-1', '1*1-11+11*11-11', '1*1-11-11+11*11', '1*1-11+111+1-1-1', '1*1-11+111-1+1-1', '1*1-11+111-1-1+1', '1*1-11+111-1*1*1', '1*1-11+111*1-1*1', '1*1-11+111*1*1-1', '1*1+111+1-1-1-11', '1*1+111+1-1-11-1', '1*1+111+1-11-1-1', '1*1+111-1+1-1-11', '1*1+111-1+1-11-1', '1*1+111-1-1+1-11', '1*1+111-1-1*1*11', '1*1+111-1-1-11+1', '1*1+111-1-1*11*1', '1*1+111-1*1-1*11', '1*1+111-1*1*1-11', '1*1+111-1*1-11*1', '1*1+111-1*1*11-1', '1*1+111-1-11+1-1', '1*1+111-1-11-1+1', '1*1+111-1-11*1*1', '1*1+111-1*11-1*1', '1*1+111-1*11*1-1', '1*1+111*1-1-1*11', '1*1+111*1-1*1-11', '1*1+111*1-1-11*1', '1*1+111*1-1*11-1', '1*1+111*1*1-1-11', '1*1+111*1*1-11-1', '1*1+111*1-11-1*1', '1*1+111*1-11*1-1', '1*1+111-11+1-1-1', '1*1+111-11-1+1-1', '1*1+111-11-1-1+1', '1*1+111-11-1*1*1', '1*1+111-11*1-1*1', '1*1+111-11*1*1-1', '1*1*111+1-1-1*11', '1*1*111+1-1*1-11', '1*1*111+1-1-11*1', '1*1*111+1-1*11-1', '1*1*111+1*1-1-11', '1*1*111+1*1-11-1', '1*1*111+1-11-1*1', '1*1*111+1-11*1-1', '1*1*111-1+1-1*11', '1*1*111-1+1*1-11', '1*1*111-1+1-11*1', '1*1*111-1-1*11+1', '1*1*111-1*1+1-11', '1*1*111-1*1*1*11', '1*1*111-1*1-11+1', '1*1*111-1*1*11*1', '1*1*111-1-11+1*1', '1*1*111-1-11*1+1', '1*1*111-1*11+1-1', '1*1*111-1*11-1+1', '1*1*111-1*11*1*1', '1*1*111*1+1-1-11', '1*1*111*1+1-11-1', '1*1*111*1-1+1-11', '1*1*111*1-1*1*11', '1*1*111*1-1-11+1', '1*1*111*1-1*11*1', '1*1*111*1*1-1*11', '1*1*111*1*1*1-11', '1*1*111*1*1-11*1', '1*1*111*1-11+1-1', '1*1*111*1-11-1+1', '1*1*111*1-11*1*1', '1*1*111-11+1-1*1', '1*1*111-11+1*1-1', '1*1*111-11-1+1*1', '1*1*111-11-1*1+1', '1*1*111-11*1+1-1', '1*1*111-11*1-1+1', '1*1*111-11*1*1*1', '1+11*1*11-11-11', '1+11*11-1*11-11', '1+11*11*1-11-11', '1+11*11-11-1*11', '1+11*11-11*1-11', '1+11*11-11-11*1', '1-11+1+1*111-1-1', '1-11+1-1+1*111-1', '1-11+1-1-1+1*111', '1-11+1-1-1*1+111', '1-11+1-1-1+111*1', '1-11+1-1*1-1+111', '1-11+1-1*1+111-1', '1-11+1-1+111-1*1', '1-11+1-1+111*1-1', '1-11+1*1-1-1+111', '1-11+1*1-1+111-1', '1-11+1*1*1*111-1', '1-11+1*1+111-1-1', '1-11+1*1*111-1*1', '1-11+1*1*111*1-1', '1-11+1*11*11-11', '1-11+1+111-1-1*1', '1-11+1+111-1*1-1', '1-11+1+111*1-1-1', '1-11+1*111+1-1-1', '1-11+1*111-1+1-1', '1-11+1*111-1-1+1', '1-11+1*111-1*1*1', '1-11+1*111*1-1*1', '1-11+1*111*1*1-1', '1-11-1+1+1*111-1', '1-11-1+1-1+1*111', '1-11-1+1-1*1+111', '1-11-1+1-1+111*1', '1-11-1+1*1-1+111', '1-11-1+1*1*1*111', '1-11-1+1*1+111-1', '1-11-1+1*1*111*1', '1-11-1+1+111-1*1', '1-11-1+1+111*1-1', '1-11-1+1*111+1-1', '1-11-1+1*111-1+1', '1-11-1+1*111*1*1', '1-11-1-1+1+1*111', '1-11-1-1+1*1+111', '1-11-1-1+1+111*1', '1-11-1-1+1*111+1', '1-11-1-1*1+1+111', '1-11-1-1*1+111+1', '1-11-1-1+111+1*1', '1-11-1-1+111*1+1', '1-11-1*1+1-1+111', '1-11-1*1+1*1*111', '1-11-1*1+1+111-1', '1-11-1*1+1*111*1', '1-11-1*1-1+1+111', '1-11-1*1-1+111+1', '1-11-1*1*1+1*111', '1-11-1*1*1*1+111', '1-11-1*1*1+111*1', '1-11-1*1+111+1-1', '1-11-1*1+111-1+1', '1-11-1*1+111*1*1', '1-11-1*11+11*11', '1-11-1+111+1-1*1', '1-11-1+111+1*1-1', '1-11-1+111-1+1*1', '1-11-1+111-1*1+1', '1-11-1+111*1+1-1', '1-11-1+111*1-1+1', '1-11-1+111*1*1*1', '1-11*1+1-1-1+111', '1-11*1+1-1+111-1', '1-11*1+1*1*111-1', '1-11*1+1+111-1-1', '1-11*1+1*111-1*1', '1-11*1+1*111*1-1', '1-11*1-1+1-1+111', '1-11*1-1+1*1*111', '1-11*1-1+1+111-1', '1-11*1-1+1*111*1', '1-11*1-1-1+1+111', '1-11*1-1-1+111+1', '1-11*1-1*1+1*111', '1-11*1-1*1*1+111', '1-11*1-1*1+111*1', '1-11*1-1+111+1-1', '1-11*1-1+111-1+1', '1-11*1-1+111*1*1', '1-11*1*1+1*111-1', '1-11*1*1-1+1*111', '1-11*1*1-1*1+111', '1-11*1*1-1+111*1', '1-11*1*1*1-1+111', '1-11*1*1*1+111-1', '1-11*1*1+111-1*1', '1-11*1*1+111*1-1', '1-11*1+11*11-11', '1-11*1-11+11*11', '1-11*1+111+1-1-1', '1-11*1+111-1+1-1', '1-11*1+111-1-1+1', '1-11*1+111-1*1*1', '1-11*1+111*1-1*1', '1-11*1+111*1*1-1', '1-11+11*1*11-11', '1-11+11*11-1*11', '1-11+11*11*1-11', '1-11+11*11-11*1', '1-11-11+1*11*11', '1-11-11*1+11*11', '1-11-11+11*1*11', '1-11-11+11*11*1', '1-11+111+1-1-1*1', '1-11+111+1-1*1-1', '1-11+111+1*1-1-1', '1-11+111-1+1-1*1', '1-11+111-1+1*1-1', '1-11+111-1-1+1*1', '1-11+111-1-1*1+1', '1-11+111-1*1+1-1', '1-11+111-1*1-1+1', '1-11+111-1*1*1*1', '1-11+111*1+1-1-1', '1-11+111*1-1+1-1', '1-11+111*1-1-1+1', '1-11+111*1-1*1*1', '1-11+111*1*1-1*1', '1-11+111*1*1*1-1', '1*11-11-11+111', '1*11-11+111-11', '1*11*11+1-11-11', '1*11*11-11+1-11', '1*11*11-11-11+1', '1*11+111-11-11', '1+111+1-1-1-1*11', '1+111+1-1-1*1-11', '1+111+1-1-1-11*1', '1+111+1-1-1*11-1', '1+111+1-1*1-1-11', '1+111+1-1*1-11-1', '1+111+1-1-11-1*1', '1+111+1-1-11*1-1', '1+111+1-1*11-1-1', '1+111+1*1-1-1-11', '1+111+1*1-1-11-1', '1+111+1*1-11-1-1', '1+111+1-11-1-1*1', '1+111+1-11-1*1-1', '1+111+1-11*1-1-1', '1+111-1+1-1-1*11', '1+111-1+1-1*1-11', '1+111-1+1-1-11*1', '1+111-1+1-1*11-1', '1+111-1+1*1-1-11', '1+111-1+1*1-11-1', '1+111-1+1-11-1*1', '1+111-1+1-11*1-1', '1+111-1-1+1-1*11', '1+111-1-1+1*1-11', '1+111-1-1+1-11*1', '1+111-1-1-1*11+1', '1+111-1-1*1+1-11', '1+111-1-1*1*1*11', '1+111-1-1*1-11+1', '1+111-1-1*1*11*1', '1+111-1-1-11+1*1', '1+111-1-1-11*1+1', '1+111-1-1*11+1-1', '1+111-1-1*11-1+1', '1+111-1-1*11*1*1', '1+111-1*1+1-1-11', '1+111-1*1+1-11-1', '1+111-1*1-1+1-11', '1+111-1*1-1*1*11', '1+111-1*1-1-11+1', '1+111-1*1-1*11*1', '1+111-1*1*1-1*11', '1+111-1*1*1*1-11', '1+111-1*1*1-11*1', '1+111-1*1*1*11-1', '1+111-1*1-11+1-1', '1+111-1*1-11-1+1', '1+111-1*1-11*1*1', '1+111-1*1*11-1*1', '1+111-1*1*11*1-1', '1+111-1-11+1-1*1', '1+111-1-11+1*1-1', '1+111-1-11-1+1*1', '1+111-1-11-1*1+1', '1+111-1-11*1+1-1', '1+111-1-11*1-1+1', '1+111-1-11*1*1*1', '1+111-1*11+1-1-1', '1+111-1*11-1+1-1', '1+111-1*11-1-1+1', '1+111-1*11-1*1*1', '1+111-1*11*1-1*1', '1+111-1*11*1*1-1', '1+111*1+1-1-1-11', '1+111*1+1-1-11-1', '1+111*1+1-11-1-1', '1+111*1-1+1-1-11', '1+111*1-1+1-11-1', '1+111*1-1-1+1-11', '1+111*1-1-1*1*11', '1+111*1-1-1-11+1', '1+111*1-1-1*11*1', '1+111*1-1*1-1*11', '1+111*1-1*1*1-11', '1+111*1-1*1-11*1', '1+111*1-1*1*11-1', '1+111*1-1-11+1-1', '1+111*1-1-11-1+1', '1+111*1-1-11*1*1', '1+111*1-1*11-1*1', '1+111*1-1*11*1-1', '1+111*1*1-1-1*11', '1+111*1*1-1*1-11', '1+111*1*1-1-11*1', '1+111*1*1-1*11-1', '1+111*1*1*1-1-11', '1+111*1*1*1-11-1', '1+111*1*1-11-1*1', '1+111*1*1-11*1-1', '1+111*1-11+1-1-1', '1+111*1-11-1+1-1', '1+111*1-11-1-1+1', '1+111*1-11-1*1*1', '1+111*1-11*1-1*1', '1+111*1-11*1*1-1', '1+111-11+1-1-1*1', '1+111-11+1-1*1-1', '1+111-11+1*1-1-1', '1+111-11-1+1-1*1', '1+111-11-1+1*1-1', '1+111-11-1-1+1*1', '1+111-11-1-1*1+1', '1+111-11-1*1+1-1', '1+111-11-1*1-1+1', '1+111-11-1*1*1*1', '1+111-11*1+1-1-1', '1+111-11*1-1+1-1', '1+111-11*1-1-1+1', '1+111-11*1-1*1*1', '1+111-11*1*1-1*1', '1+111-11*1*1*1-1', '1*111+1+1-1-1-11', '1*111+1+1-1-11-1', '1*111+1+1-11-1-1', '1*111+1-1+1-1-11', '1*111+1-1+1-11-1', '1*111+1-1-1+1-11', '1*111+1-1-1*1*11', '1*111+1-1-1-11+1', '1*111+1-1-1*11*1', '1*111+1-1*1-1*11', '1*111+1-1*1*1-11', '1*111+1-1*1-11*1', '1*111+1-1*1*11-1', '1*111+1-1-11+1-1', '1*111+1-1-11-1+1', '1*111+1-1-11*1*1', '1*111+1-1*11-1*1', '1*111+1-1*11*1-1', '1*111+1*1-1-1*11', '1*111+1*1-1*1-11', '1*111+1*1-1-11*1', '1*111+1*1-1*11-1', '1*111+1*1*1-1-11', '1*111+1*1*1-11-1', '1*111+1*1-11-1*1', '1*111+1*1-11*1-1', '1*111+1-11+1-1-1', '1*111+1-11-1+1-1', '1*111+1-11-1-1+1', '1*111+1-11-1*1*1', '1*111+1-11*1-1*1', '1*111+1-11*1*1-1', '1*111-1+1+1-1-11', '1*111-1+1+1-11-1', '1*111-1+1-1+1-11', '1*111-1+1-1*1*11', '1*111-1+1-1-11+1', '1*111-1+1-1*11*1', '1*111-1+1*1-1*11', '1*111-1+1*1*1-11', '1*111-1+1*1-11*1', '1*111-1+1-11+1-1', '1*111-1+1-11-1+1', '1*111-1+1-11*1*1', '1*111-1-1+1+1-11', '1*111-1-1+1-11+1', '1*111-1-1*1*11+1', '1*111-1-1-11+1+1', '1*111-1-1*11+1*1', '1*111-1-1*11*1+1', '1*111-1*1+1-1*11', '1*111-1*1+1*1-11', '1*111-1*1+1-11*1', '1*111-1*1-1*11+1', '1*111-1*1*1+1-11', '1*111-1*1*1*1*11', '1*111-1*1*1-11+1', '1*111-1*1*1*11*1', '1*111-1*1-11+1*1', '1*111-1*1-11*1+1', '1*111-1*1*11+1-1', '1*111-1*1*11-1+1', '1*111-1*1*11*1*1', '1*111-1-11+1+1-1', '1*111-1-11+1-1+1', '1*111-1-11+1*1*1', '1*111-1-11-1+1+1', '1*111-1-11*1+1*1', '1*111-1-11*1*1+1', '1*111-1*11+1-1*1', '1*111-1*11+1*1-1', '1*111-1*11-1+1*1', '1*111-1*11-1*1+1', '1*111-1*11*1+1-1', '1*111-1*11*1-1+1', '1*111-1*11*1*1*1', '1*111*1+1-1-1*11', '1*111*1+1-1*1-11', '1*111*1+1-1-11*1', '1*111*1+1-1*11-1', '1*111*1+1*1-1-11', '1*111*1+1*1-11-1', '1*111*1+1-11-1*1', '1*111*1+1-11*1-1', '1*111*1-1+1-1*11', '1*111*1-1+1*1-11', '1*111*1-1+1-11*1', '1*111*1-1-1*11+1', '1*111*1-1*1+1-11', '1*111*1-1*1*1*11', '1*111*1-1*1-11+1', '1*111*1-1*1*11*1', '1*111*1-1-11+1*1', '1*111*1-1-11*1+1', '1*111*1-1*11+1-1', '1*111*1-1*11-1+1', '1*111*1-1*11*1*1', '1*111*1*1+1-1-11', '1*111*1*1+1-11-1', '1*111*1*1-1+1-11', '1*111*1*1-1*1*11', '1*111*1*1-1-11+1', '1*111*1*1-1*11*1', '1*111*1*1*1-1*11', '1*111*1*1*1*1-11', '1*111*1*1*1-11*1', '1*111*1*1-11+1-1', '1*111*1*1-11-1+1', '1*111*1*1-11*1*1', '1*111*1-11+1-1*1', '1*111*1-11+1*1-1', '1*111*1-11-1+1*1', '1*111*1-11-1*1+1', '1*111*1-11*1+1-1', '1*111*1-11*1-1+1', '1*111*1-11*1*1*1', '1*111+11-11-11', '1*111-11+1+1-1-1', '1*111-11+1-1+1-1', '1*111-11+1-1-1+1', '1*111-11+1-1*1*1', '1*111-11+1*1-1*1', '1*111-11+1*1*1-1', '1*111-11-1+1+1-1', '1*111-11-1+1-1+1', '1*111-11-1+1*1*1', '1*111-11-1-1+1+1', '1*111-11-1*1+1*1', '1*111-11-1*1*1+1', '1*111-11*1+1-1*1', '1*111-11*1+1*1-1', '1*111-11*1-1+1*1', '1*111-11*1-1*1+1', '1*111-11*1*1+1-1', '1*111-11*1*1-1+1', '1*111-11*1*1*1*1', '1*111-11+11-11', '1*111-11-11+11', '11+1*111-11-11', '11-1*11-11+111', '11-1*11+111-11', '11*1-11-11+111', '11*1-11+111-11', '11*1*11+1-11-11', '11*1*11-11+1-11', '11*1*11-11-11+1', '11*1+111-11-11', '11-11+1*111-11', '11-11-1*11+111', '11-11*1-11+111', '11-11*1+111-11', '11-11-11+1*111', '11-11-11*1+111', '11-11-11+111*1', '11-11+111-1*11', '11-11+111*1-11', '11-11+111-11*1', '11*11+1-1*11-11', '11*11+1*1-11-11', '11*11+1-11-1*11', '11*11+1-11*1-11', '11*11+1-11-11*1', '11*11-1*11+1-11', '11*11-1*11-11+1', '11*11*1+1-11-11', '11*11*1-11+1-11', '11*11*1-11-11+1', '11*11-11+1-1*11', '11*11-11+1*1-11', '11*11-11+1-11*1', '11*11-11-1*11+1', '11*11-11*1+1-11', '11*11-11*1-11+1', '11*11-11-11+1*1', '11*11-11-11*1+1', '11+111-1*11-11', '11+111*1-11-11', '11+111-11-1*11', '11+111-11*1-11', '11+111-11-11*1', '111+1+1-1-1-1*11', '111+1+1-1-1*1-11', '111+1+1-1-1-11*1', '111+1+1-1-1*11-1', '111+1+1-1*1-1-11', '111+1+1-1*1-11-1', '111+1+1-1-11-1*1', '111+1+1-1-11*1-1', '111+1+1-1*11-1-1', '111+1+1*1-1-1-11', '111+1+1*1-1-11-1', '111+1+1*1-11-1-1', '111+1+1-11-1-1*1', '111+1+1-11-1*1-1', '111+1+1-11*1-1-1', '111+1-1+1-1-1*11', '111+1-1+1-1*1-11', '111+1-1+1-1-11*1', '111+1-1+1-1*11-1', '111+1-1+1*1-1-11', '111+1-1+1*1-11-1', '111+1-1+1-11-1*1', '111+1-1+1-11*1-1', '111+1-1-1+1-1*11', '111+1-1-1+1*1-11', '111+1-1-1+1-11*1', '111+1-1-1-1*11+1', '111+1-1-1*1+1-11', '111+1-1-1*1*1*11', '111+1-1-1*1-11+1', '111+1-1-1*1*11*1', '111+1-1-1-11+1*1', '111+1-1-1-11*1+1', '111+1-1-1*11+1-1', '111+1-1-1*11-1+1', '111+1-1-1*11*1*1', '111+1-1*1+1-1-11', '111+1-1*1+1-11-1', '111+1-1*1-1+1-11', '111+1-1*1-1*1*11', '111+1-1*1-1-11+1', '111+1-1*1-1*11*1', '111+1-1*1*1-1*11', '111+1-1*1*1*1-11', '111+1-1*1*1-11*1', '111+1-1*1*1*11-1', '111+1-1*1-11+1-1', '111+1-1*1-11-1+1', '111+1-1*1-11*1*1', '111+1-1*1*11-1*1', '111+1-1*1*11*1-1', '111+1-1-11+1-1*1', '111+1-1-11+1*1-1', '111+1-1-11-1+1*1', '111+1-1-11-1*1+1', '111+1-1-11*1+1-1', '111+1-1-11*1-1+1', '111+1-1-11*1*1*1', '111+1-1*11+1-1-1', '111+1-1*11-1+1-1', '111+1-1*11-1-1+1', '111+1-1*11-1*1*1', '111+1-1*11*1-1*1', '111+1-1*11*1*1-1', '111+1*1+1-1-1-11', '111+1*1+1-1-11-1', '111+1*1+1-11-1-1', '111+1*1-1+1-1-11', '111+1*1-1+1-11-1', '111+1*1-1-1+1-11', '111+1*1-1-1*1*11', '111+1*1-1-1-11+1', '111+1*1-1-1*11*1', '111+1*1-1*1-1*11', '111+1*1-1*1*1-11', '111+1*1-1*1-11*1', '111+1*1-1*1*11-1', '111+1*1-1-11+1-1', '111+1*1-1-11-1+1', '111+1*1-1-11*1*1', '111+1*1-1*11-1*1', '111+1*1-1*11*1-1', '111+1*1*1-1-1*11', '111+1*1*1-1*1-11', '111+1*1*1-1-11*1', '111+1*1*1-1*11-1', '111+1*1*1*1-1-11', '111+1*1*1*1-11-1', '111+1*1*1-11-1*1', '111+1*1*1-11*1-1', '111+1*1-11+1-1-1', '111+1*1-11-1+1-1', '111+1*1-11-1-1+1', '111+1*1-11-1*1*1', '111+1*1-11*1-1*1', '111+1*1-11*1*1-1', '111+1-11+1-1-1*1', '111+1-11+1-1*1-1', '111+1-11+1*1-1-1', '111+1-11-1+1-1*1', '111+1-11-1+1*1-1', '111+1-11-1-1+1*1', '111+1-11-1-1*1+1', '111+1-11-1*1+1-1', '111+1-11-1*1-1+1', '111+1-11-1*1*1*1', '111+1-11*1+1-1-1', '111+1-11*1-1+1-1', '111+1-11*1-1-1+1', '111+1-11*1-1*1*1', '111+1-11*1*1-1*1', '111+1-11*1*1*1-1', '111+1*11-11-11', '111-1+1+1-1-1*11', '111-1+1+1-1*1-11', '111-1+1+1-1-11*1', '111-1+1+1-1*11-1', '111-1+1+1*1-1-11', '111-1+1+1*1-11-1', '111-1+1+1-11-1*1', '111-1+1+1-11*1-1', '111-1+1-1+1-1*11', '111-1+1-1+1*1-11', '111-1+1-1+1-11*1', '111-1+1-1-1*11+1', '111-1+1-1*1+1-11', '111-1+1-1*1*1*11', '111-1+1-1*1-11+1', '111-1+1-1*1*11*1', '111-1+1-1-11+1*1', '111-1+1-1-11*1+1', '111-1+1-1*11+1-1', '111-1+1-1*11-1+1', '111-1+1-1*11*1*1', '111-1+1*1+1-1-11', '111-1+1*1+1-11-1', '111-1+1*1-1+1-11', '111-1+1*1-1*1*11', '111-1+1*1-1-11+1', '111-1+1*1-1*11*1', '111-1+1*1*1-1*11', '111-1+1*1*1*1-11', '111-1+1*1*1-11*1', '111-1+1*1-11+1-1', '111-1+1*1-11-1+1', '111-1+1*1-11*1*1', '111-1+1-11+1-1*1', '111-1+1-11+1*1-1', '111-1+1-11-1+1*1', '111-1+1-11-1*1+1', '111-1+1-11*1+1-1', '111-1+1-11*1-1+1', '111-1+1-11*1*1*1', '111-1-1+1+1-1*11', '111-1-1+1+1*1-11', '111-1-1+1+1-11*1', '111-1-1+1-1*11+1', '111-1-1+1*1+1-11', '111-1-1+1*1-11+1', '111-1-1+1-11+1*1', '111-1-1+1-11*1+1', '111-1-1-1*11+1+1', '111-1-1*1+1+1-11', '111-1-1*1+1-11+1', '111-1-1*1*1*11+1', '111-1-1*1-11+1+1', '111-1-1*1*11+1*1', '111-1-1*1*11*1+1', '111-1-1-11+1+1*1', '111-1-1-11+1*1+1', '111-1-1-11*1+1+1', '111-1-1*11+1+1-1', '111-1-1*11+1-1+1', '111-1-1*11+1*1*1', '111-1-1*11-1+1+1', '111-1-1*11*1+1*1', '111-1-1*11*1*1+1', '111-1*1+1+1-1-11', '111-1*1+1+1-11-1', '111-1*1+1-1+1-11', '111-1*1+1-1*1*11', '111-1*1+1-1-11+1', '111-1*1+1-1*11*1', '111-1*1+1*1-1*11', '111-1*1+1*1*1-11', '111-1*1+1*1-11*1', '111-1*1+1-11+1-1', '111-1*1+1-11-1+1', '111-1*1+1-11*1*1', '111-1*1-1+1+1-11', '111-1*1-1+1-11+1', '111-1*1-1*1*11+1', '111-1*1-1-11+1+1', '111-1*1-1*11+1*1', '111-1*1-1*11*1+1', '111-1*1*1+1-1*11', '111-1*1*1+1*1-11', '111-1*1*1+1-11*1', '111-1*1*1-1*11+1', '111-1*1*1*1+1-11', '111-1*1*1*1*1*11', '111-1*1*1*1-11+1', '111-1*1*1*1*11*1', '111-1*1*1-11+1*1', '111-1*1*1-11*1+1', '111-1*1*1*11+1-1', '111-1*1*1*11-1+1', '111-1*1*1*11*1*1', '111-1*1-11+1+1-1', '111-1*1-11+1-1+1', '111-1*1-11+1*1*1', '111-1*1-11-1+1+1', '111-1*1-11*1+1*1', '111-1*1-11*1*1+1', '111-1*1*11+1-1*1', '111-1*1*11+1*1-1', '111-1*1*11-1+1*1', '111-1*1*11-1*1+1', '111-1*1*11*1+1-1', '111-1*1*11*1-1+1', '111-1*1*11*1*1*1', '111-1-11+1+1-1*1', '111-1-11+1+1*1-1', '111-1-11+1-1+1*1', '111-1-11+1-1*1+1', '111-1-11+1*1+1-1', '111-1-11+1*1-1+1', '111-1-11+1*1*1*1', '111-1-11-1+1+1*1', '111-1-11-1+1*1+1', '111-1-11-1*1+1+1', '111-1-11*1+1+1-1', '111-1-11*1+1-1+1', '111-1-11*1+1*1*1', '111-1-11*1-1+1+1', '111-1-11*1*1+1*1', '111-1-11*1*1*1+1', '111-1*11+1+1-1-1', '111-1*11+1-1+1-1', '111-1*11+1-1-1+1', '111-1*11+1-1*1*1', '111-1*11+1*1-1*1', '111-1*11+1*1*1-1', '111-1*11-1+1+1-1', '111-1*11-1+1-1+1', '111-1*11-1+1*1*1', '111-1*11-1-1+1+1', '111-1*11-1*1+1*1', '111-1*11-1*1*1+1', '111-1*11*1+1-1*1', '111-1*11*1+1*1-1', '111-1*11*1-1+1*1', '111-1*11*1-1*1+1', '111-1*11*1*1+1-1', '111-1*11*1*1-1+1', '111-1*11*1*1*1*1', '111-1*11+11-11', '111-1*11-11+11', '111*1+1+1-1-1-11', '111*1+1+1-1-11-1', '111*1+1+1-11-1-1', '111*1+1-1+1-1-11', '111*1+1-1+1-11-1', '111*1+1-1-1+1-11', '111*1+1-1-1*1*11', '111*1+1-1-1-11+1', '111*1+1-1-1*11*1', '111*1+1-1*1-1*11', '111*1+1-1*1*1-11', '111*1+1-1*1-11*1', '111*1+1-1*1*11-1', '111*1+1-1-11+1-1', '111*1+1-1-11-1+1', '111*1+1-1-11*1*1', '111*1+1-1*11-1*1', '111*1+1-1*11*1-1', '111*1+1*1-1-1*11', '111*1+1*1-1*1-11', '111*1+1*1-1-11*1', '111*1+1*1-1*11-1', '111*1+1*1*1-1-11', '111*1+1*1*1-11-1', '111*1+1*1-11-1*1', '111*1+1*1-11*1-1', '111*1+1-11+1-1-1', '111*1+1-11-1+1-1', '111*1+1-11-1-1+1', '111*1+1-11-1*1*1', '111*1+1-11*1-1*1', '111*1+1-11*1*1-1', '111*1-1+1+1-1-11', '111*1-1+1+1-11-1', '111*1-1+1-1+1-11', '111*1-1+1-1*1*11', '111*1-1+1-1-11+1', '111*1-1+1-1*11*1', '111*1-1+1*1-1*11', '111*1-1+1*1*1-11', '111*1-1+1*1-11*1', '111*1-1+1-11+1-1', '111*1-1+1-11-1+1', '111*1-1+1-11*1*1', '111*1-1-1+1+1-11', '111*1-1-1+1-11+1', '111*1-1-1*1*11+1', '111*1-1-1-11+1+1', '111*1-1-1*11+1*1', '111*1-1-1*11*1+1', '111*1-1*1+1-1*11', '111*1-1*1+1*1-11', '111*1-1*1+1-11*1', '111*1-1*1-1*11+1', '111*1-1*1*1+1-11', '111*1-1*1*1*1*11', '111*1-1*1*1-11+1', '111*1-1*1*1*11*1', '111*1-1*1-11+1*1', '111*1-1*1-11*1+1', '111*1-1*1*11+1-1', '111*1-1*1*11-1+1', '111*1-1*1*11*1*1', '111*1-1-11+1+1-1', '111*1-1-11+1-1+1', '111*1-1-11+1*1*1', '111*1-1-11-1+1+1', '111*1-1-11*1+1*1', '111*1-1-11*1*1+1', '111*1-1*11+1-1*1', '111*1-1*11+1*1-1', '111*1-1*11-1+1*1', '111*1-1*11-1*1+1', '111*1-1*11*1+1-1', '111*1-1*11*1-1+1', '111*1-1*11*1*1*1', '111*1*1+1-1-1*11', '111*1*1+1-1*1-11', '111*1*1+1-1-11*1', '111*1*1+1-1*11-1', '111*1*1+1*1-1-11', '111*1*1+1*1-11-1', '111*1*1+1-11-1*1', '111*1*1+1-11*1-1', '111*1*1-1+1-1*11', '111*1*1-1+1*1-11', '111*1*1-1+1-11*1', '111*1*1-1-1*11+1', '111*1*1-1*1+1-11', '111*1*1-1*1*1*11', '111*1*1-1*1-11+1', '111*1*1-1*1*11*1', '111*1*1-1-11+1*1', '111*1*1-1-11*1+1', '111*1*1-1*11+1-1', '111*1*1-1*11-1+1', '111*1*1-1*11*1*1', '111*1*1*1+1-1-11', '111*1*1*1+1-11-1', '111*1*1*1-1+1-11', '111*1*1*1-1*1*11', '111*1*1*1-1-11+1', '111*1*1*1-1*11*1', '111*1*1*1*1-1*11', '111*1*1*1*1*1-11', '111*1*1*1*1-11*1', '111*1*1*1-11+1-1', '111*1*1*1-11-1+1', '111*1*1*1-11*1*1', '111*1*1-11+1-1*1', '111*1*1-11+1*1-1', '111*1*1-11-1+1*1', '111*1*1-11-1*1+1', '111*1*1-11*1+1-1', '111*1*1-11*1-1+1', '111*1*1-11*1*1*1', '111*1+11-11-11', '111*1-11+1+1-1-1', '111*1-11+1-1+1-1', '111*1-11+1-1-1+1', '111*1-11+1-1*1*1', '111*1-11+1*1-1*1', '111*1-11+1*1*1-1', '111*1-11-1+1+1-1', '111*1-11-1+1-1+1', '111*1-11-1+1*1*1', '111*1-11-1-1+1+1', '111*1-11-1*1+1*1', '111*1-11-1*1*1+1', '111*1-11*1+1-1*1', '111*1-11*1+1*1-1', '111*1-11*1-1+1*1', '111*1-11*1-1*1+1', '111*1-11*1*1+1-1', '111*1-11*1*1-1+1', '111*1-11*1*1*1*1', '111*1-11+11-11', '111*1-11-11+11', '111+11-1*11-11', '111+11*1-11-11', '111+11-11-1*11', '111+11-11*1-11', '111+11-11-11*1', '111-11+1+1-1-1*1', '111-11+1+1-1*1-1', '111-11+1+1*1-1-1', '111-11+1-1+1-1*1', '111-11+1-1+1*1-1', '111-11+1-1-1+1*1', '111-11+1-1-1*1+1', '111-11+1-1*1+1-1', '111-11+1-1*1-1+1', '111-11+1-1*1*1*1', '111-11+1*1+1-1-1', '111-11+1*1-1+1-1', '111-11+1*1-1-1+1', '111-11+1*1-1*1*1', '111-11+1*1*1-1*1', '111-11+1*1*1*1-1', '111-11+1*11-11', '111-11-1+1+1-1*1', '111-11-1+1+1*1-1', '111-11-1+1-1+1*1', '111-11-1+1-1*1+1', '111-11-1+1*1+1-1', '111-11-1+1*1-1+1', '111-11-1+1*1*1*1', '111-11-1-1+1+1*1', '111-11-1-1+1*1+1', '111-11-1-1*1+1+1', '111-11-1*1+1+1-1', '111-11-1*1+1-1+1', '111-11-1*1+1*1*1', '111-11-1*1-1+1+1', '111-11-1*1*1+1*1', '111-11-1*1*1*1+1', '111-11-1*11+11', '111-11*1+1+1-1-1', '111-11*1+1-1+1-1', '111-11*1+1-1-1+1', '111-11*1+1-1*1*1', '111-11*1+1*1-1*1', '111-11*1+1*1*1-1', '111-11*1-1+1+1-1', '111-11*1-1+1-1+1', '111-11*1-1+1*1*1', '111-11*1-1-1+1+1', '111-11*1-1*1+1*1', '111-11*1-1*1*1+1', '111-11*1*1+1-1*1', '111-11*1*1+1*1-1', '111-11*1*1-1+1*1', '111-11*1*1-1*1+1', '111-11*1*1*1+1-1', '111-11*1*1*1-1+1', '111-11*1*1*1*1*1', '111-11*1+11-11', '111-11*1-11+11', '111-11+11-1*11', '111-11+11*1-11', '111-11+11-11*1', '111-11-11+1*11', '111-11-11*1+11', '111-11-11+11*1']\n assert candidate(num = \"2233\",target = 25) == []\n assert candidate(num = \"10000\",target = 10) == ['10+0+0+0', '10+0+0-0', '10+0+0*0', '10+0-0+0', '10+0-0-0', '10+0-0*0', '10+0*0+0', '10+0*0-0', '10+0*0*0', '10-0+0+0', '10-0+0-0', '10-0+0*0', '10-0-0+0', '10-0-0-0', '10-0-0*0', '10-0*0+0', '10-0*0-0', '10-0*0*0']\n assert candidate(num = \"1234567890\",target = 100) == ['1+2+3+4+5+6+7+8*9+0', '1+2+3+4+5+6+7+8*9-0', '1+2+3+4+5-6-7+8+90', '1+2+3+4-5+6+7-8+90', '1+2+3+4+56-7*8+90', '1+2+3+4-56+7*8+90', '1+2+3-4+5+6+78+9+0', '1+2+3-4+5+6+78+9-0', '1+2+3-4*5+6*7+8*9+0', '1+2+3-4*5+6*7+8*9-0', '1+2+3*4-5-6+7+89+0', '1+2+3*4-5-6+7+89-0', '1+2+3-45+67+8*9+0', '1+2+3-45+67+8*9-0', '1+2+3*45*6+7-8*90', '1+2-3-4+5-6+7+8+90', '1+2-3*4+5*6+7+8*9+0', '1+2-3*4+5*6+7+8*9-0', '1+2-3*4-5+6*7+8*9+0', '1+2-3*4-5+6*7+8*9-0', '1+2*3+4+5+6+78+9*0', '1+2*3+4+5+6+78-9*0', '1+2*3+4+5+67+8+9+0', '1+2*3+4+5+67+8+9-0', '1+2*3+4*5-6+7+8*9+0', '1+2*3+4*5-6+7+8*9-0', '1+2*3-4-5+6+7+89+0', '1+2*3-4-5+6+7+89-0', '1+2*3*4-5*6+7+8+90', '1+2*3*4*5-6-7-8+9*0', '1+2*3*4*5-6-7-8-9*0', '1+2+34-5+67-8+9+0', '1+2+34-5+67-8+9-0', '1+2+34*5+6-7-8*9+0', '1+2+34*5+6-7-8*9-0', '1+2+34+56+7+8*9*0', '1+2+34+56+7-8*9*0', '1+2+34+56+7+89*0', '1+2+34+56+7-89*0', '1+2-34+56-7-8+90', '1+2*34+5*6-7+8+9*0', '1+2*34+5*6-7+8-9*0', '1+2*34-56+78+9+0', '1+2*34-56+78+9-0', '1-2+3+4-5-6+7+8+90', '1-2+3-4+5+6-7+8+90', '1-2+3*4+5+6+78+9*0', '1-2+3*4+5+6+78-9*0', '1-2+3*4+5+67+8+9+0', '1-2+3*4+5+67+8+9-0', '1-2+3*4*5+6*7+8-9+0', '1-2+3*4*5+6*7+8-9-0', '1-2+3*4*5-6+7*8-9+0', '1-2+3*4*5-6+7*8-9-0', '1-2+3+45+6+7*8-9+0', '1-2+3+45+6+7*8-9-0', '1-2+3*45-6*7+8+9*0', '1-2+3*45-6*7+8-9*0', '1-2-3+4+5+6+7-8+90', '1-2-3+4*5+6+78+9*0', '1-2-3+4*5+6+78-9*0', '1-2-3+4*5+67+8+9+0', '1-2-3+4*5+67+8+9-0', '1-2-3-4+5*6+78+9*0', '1-2-3-4+5*6+78-9*0', '1-2-3-4*5+6*7-8+90', '1-2-3+45+6*7+8+9+0', '1-2-3+45+6*7+8+9-0', '1-2-3+45-6+7*8+9+0', '1-2-3+45-6+7*8+9-0', '1-2-3+45-6-7+8*9+0', '1-2-3+45-6-7+8*9-0', '1-2-3+45+67-8+9*0', '1-2-3+45+67-8-9*0', '1-2-3-45+67-8+90', '1-2*3+4*5+6+7+8*9+0', '1-2*3+4*5+6+7+8*9-0', '1-2*3+4*5-6-7+8+90', '1-2*3+4*5*6-7-8+9*0', '1-2*3+4*5*6-7-8-9*0', '1-2*3-4+5*6+7+8*9+0', '1-2*3-4+5*6+7+8*9-0', '1-2*3-4-5+6*7+8*9+0', '1-2*3-4-5+6*7+8*9-0', '1-2+34+5+6+7*8+9*0', '1-2+34+5+6+7*8-9*0', '1-2+34-5-6+78+9*0', '1-2+34-5-6+78-9*0', '1-2+34*5+6+7+8-90', '1-2-34+5*6+7+8+90', '1-2-34-5+6*7+8+90', '1-2-34-5-6+7*8+90', '1-2-34+56+7+8*9+0', '1-2-34+56+7+8*9-0', '1-2*34+5-6+78+90', '1-2-345+67*8-90', '1*2+3+4*5+6+78-9+0', '1*2+3+4*5+6+78-9-0', '1*2+3+4*5+67+8+9*0', '1*2+3+4*5+67+8-9*0', '1*2+3-4+5*6+78-9+0', '1*2+3-4+5*6+78-9-0', '1*2+3*4+5+6-7-8+90', '1*2+3*4+5-6+78+9+0', '1*2+3*4+5-6+78+9-0', '1*2+3*4+5*6+7*8+9*0', '1*2+3*4+5*6+7*8-9*0', '1*2+3+45+6*7+8+9*0', '1*2+3+45+6*7+8-9*0', '1*2+3+45-6+7*8+9*0', '1*2+3+45-6+7*8-9*0', '1*2+3+45+67-8-9+0', '1*2+3+45+67-8-9-0', '1*2+3-45+6*7+8+90', '1*2+3-45-6+7*8+90', '1*2-3+4-5+6+7+89+0', '1*2-3+4-5+6+7+89-0', '1*2-3+4*5+6-7-8+90', '1*2-3+4*5-6+78+9+0', '1*2-3+4*5-6+78+9-0', '1*2-3-4+5*6-7-8+90', '1*2-3+45-6*7+8+90', '1*2*3+4+5+6+7+8*9+0', '1*2*3+4+5+6+7+8*9-0', '1*2*3+4+5-6-7+8+90', '1*2*3+4-5+6+7-8+90', '1*2*3+4+56-7*8+90', '1*2*3+4-56+7*8+90', '1*2*3-4+5+6+78+9+0', '1*2*3-4+5+6+78+9-0', '1*2*3-4*5+6*7+8*9+0', '1*2*3-4*5+6*7+8*9-0', '1*2*3*4+5+6+7*8+9+0', '1*2*3*4+5+6+7*8+9-0', '1*2*3*4+5+6-7+8*9+0', '1*2*3*4+5+6-7+8*9-0', '1*2*3*4-5+6-7-8+90', '1*2*3*4-5-6+78+9+0', '1*2*3*4-5-6+78+9-0', '1*2*3-45+67+8*9+0', '1*2*3-45+67+8*9-0', '1*2+34+5+6*7+8+9+0', '1*2+34+5+6*7+8+9-0', '1*2+34+5-6+7*8+9+0', '1*2+34+5-6+7*8+9-0', '1*2+34+5-6-7+8*9+0', '1*2+34+5-6-7+8*9-0', '1*2+34+5*6-7*8+90', '1*2+34+5+67-8+9*0', '1*2+34+5+67-8-9*0', '1*2+34-5-6-7-8+90', '1*2+34*5+6-78+9*0', '1*2+34*5+6-78-9*0', '1*2+34+56+7-8+9+0', '1*2+34+56+7-8+9-0', '1*2*34+56-7-8-9+0', '1*2*34+56-7-8-9-0', '1+23+4+5+67+8*9*0', '1+23+4+5+67-8*9*0', '1+23+4+5+67+89*0', '1+23+4+5+67-89*0', '1+23+4*5-6*7+8+90', '1+23-4+5+6+78-9+0', '1+23-4+5+6+78-9-0', '1+23-4+5+67+8+9*0', '1+23-4+5+67+8-9*0', '1+23-4-5+6+7+8*9+0', '1+23-4-5+6+7+8*9-0', '1+23-4-5-6-7+8+90', '1+23-4+56+7+8+9+0', '1+23-4+56+7+8+9-0', '1+23*4+5-6+7-8+9+0', '1+23*4+5-6+7-8+9-0', '1+23*4-5+6+7+8-9+0', '1+23*4-5+6+7+8-9-0', '1+23+45-67+8+90', '1-23+4*5+6+7+89+0', '1-23+4*5+6+7+89-0', '1-23-4+5*6+7+89+0', '1-23-4+5*6+7+89-0', '1-23-4-5+6*7+89+0', '1-23-4-5+6*7+89-0', '1*23+4+5+67-8+9+0', '1*23+4+5+67-8+9-0', '1*23-4+5-6-7+89+0', '1*23-4+5-6-7+89-0', '1*23-4*5+6-7+8+90', '1*23*4-5+6+7+8*9*0', '1*23*4-5+6+7-8*9*0', '1*23*4-5+6+7+89*0', '1*23*4-5+6+7-89*0', '1+234+5+6-7*8-90', '1+234+5-6*7-8-90', '1+234-5*6-7-8-90', '1+234-56-7-8*9+0', '1+234-56-7-8*9-0', '1*234+5-67-8*9+0', '1*234+5-67-8*9-0', '1*234-56-78+9*0', '1*234-56-78-9*0', '12+3+4+5-6-7+89+0', '12+3+4+5-6-7+89-0', '12+3-4+5+6+78+9*0', '12+3-4+5+6+78-9*0', '12+3-4+5+67+8+9+0', '12+3-4+5+67+8+9-0', '12+3*4+5+6+7*8+9+0', '12+3*4+5+6+7*8+9-0', '12+3*4+5+6-7+8*9+0', '12+3*4+5+6-7+8*9-0', '12+3*4-5+6-7-8+90', '12+3*4-5-6+78+9+0', '12+3*4-5-6+78+9-0', '12+3*4*5-6-7*8+90', '12+3+45+6-7*8+90', '12+3+45-6*7-8+90', '12+3*45+6*7-89+0', '12+3*45+6*7-89-0', '12-3+4*5+6+7*8+9+0', '12-3+4*5+6+7*8+9-0', '12-3+4*5+6-7+8*9+0', '12-3+4*5+6-7+8*9-0', '12-3-4+5-6+7+89+0', '12-3-4+5-6+7+89-0', '12-3-4+5*6+7*8+9+0', '12-3-4+5*6+7*8+9-0', '12-3-4+5*6-7+8*9+0', '12-3-4+5*6-7+8*9-0', '12-3-4*5+6+7+8+90', '12-3*4+5+6+7-8+90', '12*3+4*5*6-7*8+9*0', '12*3+4*5*6-7*8-9*0', '12*3-4+5-6+78-9+0', '12*3-4+5-6+78-9-0', '12*3-4-5-6+7+8*9+0', '12*3-4-5-6+7+8*9-0', '12*3-4*5+6+78+9*0', '12*3-4*5+6+78-9*0', '12*3-4*5+67+8+9+0', '12*3-4*5+67+8+9-0', '12*3-4+56-78+90', '12*3*4-56-78+90', '12+34+5*6+7+8+9+0', '12+34+5*6+7+8+9-0', '12+34-5+6*7+8+9+0', '12+34-5+6*7+8+9-0', '12+34-5-6+7*8+9+0', '12+34-5-6+7*8+9-0', '12+34-5-6-7+8*9+0', '12+34-5-6-7+8*9-0', '12+34-5+67-8+9*0', '12+34-5+67-8-9*0', '12*34-5*6*7-8-90', '123+4-5+67-89+0', '123+4-5+67-89-0', '123+4*5-6*7+8-9+0', '123+4*5-6*7+8-9-0', '123-4-5-6-7+8-9+0', '123-4-5-6-7+8-9-0', '123-4+56+7+8-90', '123*4-56*7+8*9*0', '123*4-56*7-8*9*0', '123*4-56*7+89*0', '123*4-56*7-89*0', '123+45-67+8-9+0', '123+45-67+8-9-0', '123-45-67+89+0', '123-45-67+89-0']\n assert candidate(num = \"99999\",target = 99999) == ['99999']\n assert candidate(num = \"10000\",target = 0) == ['1*0+0+0+0', '1*0+0+0-0', '1*0+0+0*0', '1*0+0-0+0', '1*0+0-0-0', '1*0+0-0*0', '1*0+0*0+0', '1*0+0*0-0', '1*0+0*0*0', '1*0-0+0+0', '1*0-0+0-0', '1*0-0+0*0', '1*0-0-0+0', '1*0-0-0-0', '1*0-0-0*0', '1*0-0*0+0', '1*0-0*0-0', '1*0-0*0*0', '1*0*0+0+0', '1*0*0+0-0', '1*0*0+0*0', '1*0*0-0+0', '1*0*0-0-0', '1*0*0-0*0', '1*0*0*0+0', '1*0*0*0-0', '1*0*0*0*0', '10*0+0+0', '10*0+0-0', '10*0+0*0', '10*0-0+0', '10*0-0-0', '10*0-0*0', '10*0*0+0', '10*0*0-0', '10*0*0*0', '100*0+0', '100*0-0', '100*0*0', '1000*0']\n assert candidate(num = \"523\",target = 30) == ['5*2*3']\n assert candidate(num = \"24681012\",target = 24) == ['2+4+6+8+1+0+1+2', '2+4+6+8+1-0+1+2', '2+4+6+8*1*0+12', '2+4+6-8*1*0+12', '2+4+6-8+10*1*2', '2+4+6+81*0+12', '2+4+6-81*0+12', '2+4*6+8*1*0-1*2', '2+4*6+8*1*0*1-2', '2+4*6-8*1*0-1*2', '2+4*6-8*1*0*1-2', '2+4*6+81*0-1*2', '2+4*6+81*0*1-2', '2+4*6-81*0-1*2', '2+4*6-81*0*1-2', '2-4+6+8+1*0+12', '2-4+6+8-1*0+12', '2-4+6+8*1+0+12', '2-4+6+8*1-0+12', '2-4+6+8+10+1*2', '2-4+6+8+10*1+2', '2-4+6*8-10-12', '2*4+6+8+1+0-1+2', '2*4+6+8+1-0-1+2', '2*4+6+8+1*0+1*2', '2*4+6+8+1*0*1+2', '2*4+6+8-1+0+1+2', '2*4+6+8-1-0+1+2', '2*4+6+8-1*0+1*2', '2*4+6+8-1*0*1+2', '2*4+6+8*1+0+1*2', '2*4+6+8*1+0*1+2', '2*4+6+8*1-0+1*2', '2*4+6+8*1-0*1+2', '2*4+6+8-10+12', '2-46+8*10-12', '2*46-8*10+12', '24+6-8+1+0-1+2', '24+6-8+1-0-1+2', '24+6-8+1*0+1*2', '24+6-8+1*0*1+2', '24+6-8-1+0+1+2', '24+6-8-1-0+1+2', '24+6-8-1*0+1*2', '24+6-8-1*0*1+2', '24+6-8*1+0+1*2', '24+6-8*1+0*1+2', '24+6-8*1-0+1*2', '24+6-8*1-0*1+2', '24+6-8-10+12', '24+6*8*1*0*1*2', '24+6*8*1*0*12', '24+6*81*0*1*2', '24+6*81*0*12', '24-6+8+1+0-1-2', '24-6+8+1-0-1-2', '24-6+8+1*0-1*2', '24-6+8+1*0*1-2', '24-6+8-1+0+1-2', '24-6+8-1-0+1-2', '24-6+8-1*0-1*2', '24-6+8-1*0*1-2', '24-6+8*1+0-1*2', '24-6+8*1+0*1-2', '24-6+8*1-0-1*2', '24-6+8*1-0*1-2', '24-6+8+10-12', '24-6*8*1*0*1*2', '24-6*8*1*0*12', '24-6*81*0*1*2', '24-6*81*0*12', '24+68*1*0*1*2', '24+68*1*0*12', '24-68*1*0*1*2', '24-68*1*0*12', '24+681*0*1*2', '24+681*0*12', '24-681*0*1*2', '24-681*0*12']\n assert candidate(num = \"55555\",target = 3125) == ['5*5*5*5*5']\n assert candidate(num = \"12345\",target = 46) == []\n assert candidate(num = \"523\",target = 1) == []\n assert candidate(num = \"87654321\",target = 87654321) == ['87654321']\n assert candidate(num = \"1234\",target = 1) == ['1*2+3-4']\n assert candidate(num = \"101010\",target = 0) == ['1+0+1*0-1+0', '1+0+1*0-1-0', '1+0-1+0+1*0', '1+0-1+0-1*0', '1+0-1+0*1+0', '1+0-1+0*1-0', '1+0-1+0*1*0', '1+0-1+0*10', '1+0-1-0+1*0', '1+0-1-0-1*0', '1+0-1-0*1+0', '1+0-1-0*1-0', '1+0-1-0*1*0', '1+0-1-0*10', '1+0-1*0-1+0', '1+0-1*0-1-0', '1+0*1+0-1+0', '1+0*1+0-1-0', '1+0*1-0-1+0', '1+0*1-0-1-0', '1+0*1*0-1+0', '1+0*1*0-1-0', '1+0*10-1+0', '1+0*10-1-0', '1-0+1*0-1+0', '1-0+1*0-1-0', '1-0-1+0+1*0', '1-0-1+0-1*0', '1-0-1+0*1+0', '1-0-1+0*1-0', '1-0-1+0*1*0', '1-0-1+0*10', '1-0-1-0+1*0', '1-0-1-0-1*0', '1-0-1-0*1+0', '1-0-1-0*1-0', '1-0-1-0*1*0', '1-0-1-0*10', '1-0-1*0-1+0', '1-0-1*0-1-0', '1-0*1+0-1+0', '1-0*1+0-1-0', '1-0*1-0-1+0', '1-0*1-0-1-0', '1-0*1*0-1+0', '1-0*1*0-1-0', '1-0*10-1+0', '1-0*10-1-0', '1*0+1+0-1+0', '1*0+1+0-1-0', '1*0+1-0-1+0', '1*0+1-0-1-0', '1*0+1*0+1*0', '1*0+1*0-1*0', '1*0+1*0*1+0', '1*0+1*0*1-0', '1*0+1*0*1*0', '1*0+1*0*10', '1*0-1+0+1+0', '1*0-1+0+1-0', '1*0-1-0+1+0', '1*0-1-0+1-0', '1*0-1*0+1*0', '1*0-1*0-1*0', '1*0-1*0*1+0', '1*0-1*0*1-0', '1*0-1*0*1*0', '1*0-1*0*10', '1*0*1+0+1*0', '1*0*1+0-1*0', '1*0*1+0*1+0', '1*0*1+0*1-0', '1*0*1+0*1*0', '1*0*1+0*10', '1*0*1-0+1*0', '1*0*1-0-1*0', '1*0*1-0*1+0', '1*0*1-0*1-0', '1*0*1-0*1*0', '1*0*1-0*10', '1*0*1*0+1*0', '1*0*1*0-1*0', '1*0*1*0*1+0', '1*0*1*0*1-0', '1*0*1*0*1*0', '1*0*1*0*10', '1*0+10*1*0', '1*0+10-10', '1*0-10*1*0', '1*0-10+10', '1*0*10+1*0', '1*0*10-1*0', '1*0*10*1+0', '1*0*10*1-0', '1*0*10*1*0', '1*0*10*10', '1*0+101*0', '1*0-101*0', '1*0*101+0', '1*0*101-0', '1*0*101*0', '1*0*1010', '10+1*0-10', '10-1*0-10', '10*1+0-10', '10*1-0-10', '10*1*0+1*0', '10*1*0-1*0', '10*1*0*1+0', '10*1*0*1-0', '10*1*0*1*0', '10*1*0*10', '10-10+1*0', '10-10-1*0', '10-10*1+0', '10-10*1-0', '10*10*1*0', '10*101*0', '101*0+1*0', '101*0-1*0', '101*0*1+0', '101*0*1-0', '101*0*1*0', '101*0*10', '1010*1*0', '10101*0']\n assert candidate(num = \"123456\",target = 711) == []\n assert candidate(num = \"987654321\",target = 45) == ['9+8+7+6+5+4+3+2+1', '9+8+7+6+5+4+3*2*1', '9+8+7+6+5+4*3-2*1', '9+8+7+6+5*4-3-2*1', '9+8+7+6+5*4-3*2+1', '9+8+7+6-5-4+3+21', '9+8+7+6*5+4*3-21', '9+8+7+6*5-4-3-2*1', '9+8+7+6*5-4-3*2+1', '9+8+7+6*5-4*3+2+1', '9+8+7-6+5+4-3+21', '9+8+7-6+5*4+3*2+1', '9+8+7-6+5+43-21', '9+8+7*6-5+4*3-21', '9+8+7*6-5-4-3-2*1', '9+8+7*6-5-4-3*2+1', '9+8+7*6-5-4*3+2+1', '9+8+7*6-5*4+3+2+1', '9+8+7*6-5*4+3*2*1', '9+8+7+65-43-2+1', '9+8+7-65+43*2*1', '9+8-7+6+5+4*3*2*1', '9+8-7+6*5+4+3-2*1', '9+8-7-6+5+4+32*1', '9+8-7-6-5+43+2+1', '9+8*7+6-5*4-3-2-1', '9+8*7+6-5*4-3*2*1', '9+8*7-6-5+4*3-21', '9+8*7-6-5-4-3-2*1', '9+8*7-6-5-4-3*2+1', '9+8*7-6-5-4*3+2+1', '9+8*7-6-5*4+3+2+1', '9+8*7-6-5*4+3*2*1', '9+8*7-6*5+4+3+2+1', '9+8*7-6*5+4+3*2*1', '9+8*7-6*5+4*3-2*1', '9+8*7+65-43*2+1', '9+8*7-65+43+2*1', '9+8+76-54+3+2+1', '9+8+76-54+3*2*1', '9-8+7+6-5+4+32*1', '9-8+7-6-5*4+3*21', '9-8+7-6*5+4+3*21', '9-8+7*6+5+4-3*2-1', '9-8+7*6+5-4+3-2*1', '9-8+7*6+5*4+3-21', '9-8+7+65+4-32*1', '9-8+7+65-4-3-21', '9-8-7+6+5+43-2-1', '9-8-7-6+5*4*3-2-1', '9-8-7*6+54+32*1', '9-8-7+65+4+3-21', '9-8-7+65-4*3-2*1', '9-8*7+6+54+32*1', '9-8*7+65-4+32-1', '9-8+76+5-4-32-1', '9-8+76-5+4-32+1', '9-8-76+5*4*3*2*1', '9*8+7+6+5-43-2*1', '9*8+7+6-5-4-32+1', '9*8+7+6*5-43-21', '9*8+7-6+5-4*3-21', '9*8+7-6-5-4*3*2+1', '9*8+7-6*5-4+3-2-1', '9*8+7-6*5-4-3+2+1', '9*8+7*6-5-43-21', '9*8-7+6-5*4-3-2-1', '9*8-7+6-5*4-3*2*1', '9*8-7-6-5+4*3-21', '9*8-7-6-5-4-3-2*1', '9*8-7-6-5-4-3*2+1', '9*8-7-6-5-4*3+2+1', '9*8-7-6-5*4+3+2+1', '9*8-7-6-5*4+3*2*1', '9*8-7-6*5+4+3+2+1', '9*8-7-6*5+4+3*2*1', '9*8-7-6*5+4*3-2*1', '9*8-7*6+5+4+3+2+1', '9*8-7*6+5+4+3*2*1', '9*8-7*6+5+4*3-2*1', '9*8-7*6+5*4-3-2*1', '9*8-7*6+5*4-3*2+1', '9*8-7*6-5-4+3+21', '9*8-7+65-43*2+1', '9*8-7-65+43+2*1', '9*8-76+5+43+2-1', '9*8-76+54-3-2*1', '9*8-76+54-3*2+1', '9+87+6-5*4*3+2+1', '9+87-6-5-43+2+1', '9+87-65+4*3+2*1', '9+87-65-4-3+21', '9-87+6+54+3*21', '98+7-6+5+4-3*21', '98+7-6-54+3-2-1', '98+7-6-54-3+2+1', '98+7-65+4+3-2*1', '98-7+6-5*4-32*1', '98-7+6-54+3-2+1', '98-7-6+5-43-2*1', '98-7-6-5-4-32+1', '98-7*6+5*4-32+1', '98-7*6-5-4-3+2-1', '98+76*5-432-1', '98-76-5+4+3+21', '98-76-5-4+32*1', '98-76+54-32+1']\n assert candidate(num = \"000\",target = 0) == ['0+0+0', '0+0-0', '0+0*0', '0-0+0', '0-0-0', '0-0*0', '0*0+0', '0*0-0', '0*0*0']\n assert candidate(num = \"123456789\",target = 45) == ['1+2+3+4+5+6+7+8+9', '1+2+3+4+5-6*7+8*9', '1+2+3+4-5*6+7*8+9', '1+2+3+4-5*6-7+8*9', '1+2+3-4*5+6*7+8+9', '1+2+3-4*5-6+7*8+9', '1+2+3-4*5-6-7+8*9', '1+2+3*4+5+6*7-8-9', '1+2+3*4*5+6-7-8-9', '1+2+3-45+67+8+9', '1+2+3*45-6-78-9', '1+2-3+4*5+6*7-8-9', '1+2-3-4-5*6+7+8*9', '1+2-3*4+5*6+7+8+9', '1+2-3*4-5+6*7+8+9', '1+2-3*4-5-6+7*8+9', '1+2-3*4-5-6-7+8*9', '1+2-3*4*5+6+7+89', '1+2-3+45+6-7-8+9', '1+2-3+45-6+7+8-9', '1+2-3-45-6+7+89', '1+2*3+4*5-6+7+8+9', '1+2*3+4*5*6+7-89', '1+2*3-4-5-6*7+89', '1+2*3*4+5*6+7-8-9', '1+2*3*4-5+6*7-8-9', '1+2*3*4*5+6+7-89', '1+2-34+5+6+7*8+9', '1+2-34+5+6-7+8*9', '1+2-34-5-6+78+9', '1+2*34-5*6+7+8-9', '1-2+3+4-5*6+78-9', '1-2+3-4*5-6+78-9', '1-2+3*4*5-6-7+8-9', '1-2+3+45+6-7+8-9', '1-2+3-45+6-7+89', '1-2-3+4-5+67-8-9', '1-2-3*4+5+6+7*8-9', '1-2-3*4-5-6+78-9', '1-2-3+45-6-7+8+9', '1-2*3+4+5+6*7+8-9', '1-2*3+4+5-6+7*8-9', '1-2*3+4*5+6+7+8+9', '1-2*3+4*5-6*7+8*9', '1-2*3+4+56+7-8-9', '1-2*3-4+5*6+7+8+9', '1-2*3-4-5+6*7+8+9', '1-2*3-4-5-6+7*8+9', '1-2*3-4-5-6-7+8*9', '1-2*3*4+5-6+78-9', '1-2*3*4-5-6+7+8*9', '1-2*3+45-67+8*9', '1-2-34+5+6+78-9', '1-2-34-5+6+7+8*9', '1-2-34+56+7+8+9', '1-2*34+5*6-7+89', '1*2+3+4+5*6+7+8-9', '1*2+3+4-5+6*7+8-9', '1*2+3+4-5-6+7*8-9', '1*2+3*4-56+78+9', '1*2+3+45+67-8*9', '1*2+3-45+6+7+8*9', '1*2-3+4-5-6*7+89', '1*2-3-4*5+67+8-9', '1*2-3-4+56-7-8+9', '1*2-3*4+5+67-8-9', '1*2*3+4+5+6+7+8+9', '1*2*3+4+5-6*7+8*9', '1*2*3+4-5*6+7*8+9', '1*2*3+4-5*6-7+8*9', '1*2*3-4*5+6*7+8+9', '1*2*3-4*5-6+7*8+9', '1*2*3-4*5-6-7+8*9', '1*2*3*4+5+6-7+8+9', '1*2*3*4*5-6-78+9', '1*2*3-45+67+8+9', '1*2+34+5-6-7+8+9', '1*2+34-5+6+7-8+9', '1*2+34+56-7*8+9', '1*2+34-56+7*8+9', '1*2+34-56-7+8*9', '1*2-34+5*6+7*8-9', '1*2*34-5+6-7-8-9', '1*2*34+56-7-8*9', '1+23+4+5+6+7+8-9', '1+23+4-5*6+7*8-9', '1+23+4-5-67+89', '1+23-4-5+6+7+8+9', '1+23-4-5-6*7+8*9', '1+23-4*5+6*7+8-9', '1+23-4*5-6+7*8-9', '1+23*4+5-6-7*8+9', '1+23*4-5-6*7+8-9', '1+23*4-56+7-8+9', '1+23-45+67+8-9', '1-23+4-5+67-8+9', '1-23+4*5-6*7+89', '1-23-4+5+67+8-9', '1-23-4-5-6-7+89', '1-23*4+5+6*7+89', '1-23+45-67+89', '1*23+4*5-6+7-8+9', '1*23-4-56-7+89', '12+3+4-56-7+89', '12+3-4*5+67-8-9', '12+3*4+5+6-7+8+9', '12+3-45+6+78-9', '12+3*45-6-7-89', '12-3+4*5+6-7+8+9', '12-3+4+56-7-8-9', '12-3-4+5*6-7+8+9', '12-3-4-56+7+89', '12-3*4-5+67-8-9', '12-3*4*5+6+78+9', '12-3-45-6+78+9', '12*3+4+5+6-7-8+9', '12*3+4+5-6+7+8-9', '12*3-4-5-6+7+8+9', '12*3-4-56+78-9', '12*3*4-5*6-78+9', '12+34-5-6-7+8+9']\n assert candidate(num = \"999999999\",target = 999999999) == ['999999999']\n assert candidate(num = \"555555555\",target = 39916800) == []\n assert candidate(num = \"12323\",target = 25) == ['1-2+3+23', '1+23-2+3']\n assert candidate(num = \"101010101\",target = 50) == []\n assert candidate(num = \"1111\",target = 1) == ['1+1-1*1', '1+1*1-1', '1-1+1*1', '1-1*1+1', '1*1+1-1', '1*1-1+1', '1*1*1*1']\n assert candidate(num = \"999999999\",target = 899999999) == []\n assert candidate(num = \"1000000000\",target = 1000000000) == ['1000000000']\n assert candidate(num = \"2323\",target = 10) == ['2+3+2+3']\n assert candidate(num = \"100\",target = 0) == ['1*0+0', '1*0-0', '1*0*0', '10*0']\n assert candidate(num = \"222\",target = 24) == ['2+22', '22+2']\n assert candidate(num = \"1000\",target = 1) == ['1+0+0+0', '1+0+0-0', '1+0+0*0', '1+0-0+0', '1+0-0-0', '1+0-0*0', '1+0*0+0', '1+0*0-0', '1+0*0*0', '1-0+0+0', '1-0+0-0', '1-0+0*0', '1-0-0+0', '1-0-0-0', '1-0-0*0', '1-0*0+0', '1-0*0-0', '1-0*0*0']\n assert candidate(num = \"1234\",target = 10) == ['1+2+3+4', '1*2*3+4']\n assert candidate(num = \"223123\",target = 1) == ['2+2+3-1-2-3', '2+2+3-1*2*3', '2+2+3*1-2*3', '2+2-3+1+2-3', '2+2-3-1-2+3', '2+2-3*1*2+3', '2+2*3-1-2*3', '2-2+3-1+2-3', '2-2-3-1+2+3', '2-2*3+1*2+3', '2-2*3-1+2*3', '2-2*3*1+2+3', '2*2+3-1-2-3', '2*2+3-1*2*3', '2*2+3*1-2*3', '2*2-3+1+2-3', '2*2-3-1-2+3', '2*2-3*1*2+3', '2+23-1-23', '2-23-1+23', '22+3-1-23']\n assert candidate(num = \"1234123412\",target = 1234) == ['1+2+3+4-12+3*412', '1+2+3-4*1*2+3*412', '1+2+3-4+1234-1*2', '1+2+3-4+1234*1-2', '1+2+3+412*3+4-12', '1+2+3+412*3-4*1*2', '1+2+3*412+3+4-12', '1+2+3*412+3-4*1*2', '1+2+3*412-3-4+1*2', '1+2+3*412-3-4*1+2', '1+2-3-4+1*2+3*412', '1+2-3-4*1+2+3*412', '1+2-3+412*3-4+1*2', '1+2-3+412*3-4*1+2', '1+2*3-4+1234-1-2', '1+2+34*12*3+4+1+2', '1-2+3-4+1234+1*2', '1-2+3-4+1234*1+2', '1-2+3*412-3+4-1*2', '1-2+3*412-3+4*1-2', '1-2-3+4-1*2+3*412', '1-2-3+4*1-2+3*412', '1-2-3+412*3+4-1*2', '1-2-3+412*3+4*1-2', '1-2*3+4+1-2+3*412', '1-2*3+4+1234-1+2', '1-2*3+412*3+4+1-2', '1*2+3-4-1-2+3*412', '1*2+3-4+1234+1-2', '1*2+3+412*3-4-1-2', '1*2+3*412+3-4-1-2', '1*2+3*412-3-4+1+2', '1*2-3+4+1234-1-2', '1*2-3-4+1+2+3*412', '1*2-3+412*3-4+1+2', '1*2*3+4-12+3*412', '1*2*3-4*1*2+3*412', '1*2*3-4+1234-1*2', '1*2*3-4+1234*1-2', '1*2*3+412*3+4-12', '1*2*3+412*3-4*1*2', '1*2+34*12*3+4*1*2', '1*2+34*12*3-4+12', '12+3*412-3*4-1*2', '12+3*412-3*4*1-2', '12-3*4-1*2+3*412', '12-3*4*1-2+3*412', '12+34*12*3-4+1*2', '12+34*12*3-4*1+2', '1234+1+2+3-4-1*2', '1234+1+2+3-4*1-2', '1234+1+2*3-4-1-2', '1234+1-2+3-4+1*2', '1234+1-2+3-4*1+2', '1234+1-2*3+4-1+2', '1234+1*2+3-4+1-2', '1234+1*2-3+4-1-2', '1234+1*2*3-4-1*2', '1234+1*2*3-4*1-2', '1234-1+2-3+4-1*2', '1234-1+2-3+4*1-2', '1234-1+2*3-4+1-2', '1234-1-2-3+4+1*2', '1234-1-2-3+4*1+2', '1234-1-2*3+4+1+2', '1234-1*2+3-4+1+2', '1234-1*2-3+4-1+2', '1234-1*2*3+4+1*2', '1234-1*2*3+4*1+2', '1234*1+2+3-4+1-2', '1234*1+2-3+4-1-2', '1234*1+2*3-4-1*2', '1234*1+2*3-4*1-2', '1234*1-2+3-4+1+2', '1234*1-2-3+4-1+2', '1234*1-2*3+4+1*2', '1234*1-2*3+4*1+2']\n assert candidate(num = \"12345\",target = 27) == ['1+2*3+4*5', '12*3-4-5']\n assert candidate(num = \"100000000\",target = 100000000) == ['100000000']\n assert candidate(num = \"1234\",target = 24) == ['1*2*3*4', '12+3*4']\n assert candidate(num = \"987654321\",target = 100) == ['9+8+7+6*5+43+2+1', '9+8+7-6-5+43*2+1', '9+8+7*6+5+4+32*1', '9+8+7*6-5+43+2+1', '9+8+7*6*5-4*32+1', '9+8+7+65+4+3*2+1', '9+8+7+65+4*3-2+1', '9+8-7+65+4*3*2+1', '9+8*7+6+5+4*3*2*1', '9+8*7+6*5+4+3-2*1', '9+8*7-6+5+4+32*1', '9+8*7-6-5+43+2+1', '9+8+76+5+4-3+2-1', '9+8+76+5-4+3+2+1', '9+8+76+5-4+3*2*1', '9+8-76+54*3-2-1', '9-8+7+6+54+32*1', '9-8+7*6+5*4*3-2-1', '9-8+7+65-4+32-1', '9-8-7*6+54*3-21', '9-8-7+65+43-2*1', '9-8*7+6+54*3-21', '9-8*7*6-5+432*1', '9-8+76-5+4+3+21', '9-8+76-5-4+32*1', '9-8+76+54-32+1', '9*8+7+6+5+4+3+2+1', '9*8+7+6+5+4+3*2*1', '9*8+7+6+5+4*3-2*1', '9*8+7+6+5*4-3-2*1', '9*8+7+6+5*4-3*2+1', '9*8+7+6-5-4+3+21', '9*8+7+6*5+4*3-21', '9*8+7+6*5-4-3-2*1', '9*8+7+6*5-4-3*2+1', '9*8+7+6*5-4*3+2+1', '9*8+7-6+5+4-3+21', '9*8+7-6+5*4+3*2+1', '9*8+7-6+5+43-21', '9*8+7*6-5+4*3-21', '9*8+7*6-5-4-3-2*1', '9*8+7*6-5-4-3*2+1', '9*8+7*6-5-4*3+2+1', '9*8+7*6-5*4+3+2+1', '9*8+7*6-5*4+3*2*1', '9*8+7+65-43-2+1', '9*8+7-65+43*2*1', '9*8-7+6+5+4*3*2*1', '9*8-7+6*5+4+3-2*1', '9*8-7-6+5+4+32*1', '9*8-7-6-5+43+2+1', '9*8+76-54+3+2+1', '9*8+76-54+3*2*1', '9+87+6-5+4-3+2*1', '9+87+6-5-4+3*2+1', '9+87+6-5*4-3+21', '9+87-6+5+4+3-2*1', '9+87-6-5+4*3+2+1', '9+87*6-5*43*2-1', '98+7+6+5*4-32+1', '98+7+6-5-4-3+2-1', '98+7+6*5-4-32+1', '98+7-6+5-4+3-2-1', '98+7-6+5-4-3+2+1', '98+7-6-5+4+3-2+1', '98+7-6*5+4*3*2+1', '98+7*6+5-43-2*1', '98+7*6-5-4-32+1', '98-7+6+5+4-3-2-1', '98-7+6+5+4-3*2*1', '98-7+6+5-4+3-2+1', '98-7+6-5+4+3+2-1', '98-7-6+5+4+3+2+1', '98-7-6+5+4+3*2*1', '98-7-6+5+4*3-2*1', '98-7-6+5*4-3-2*1', '98-7-6+5*4-3*2+1', '98-7-6-5-4+3+21', '98-7*6+5*4+3+21', '98-76+54+3+21']\n", "comparison": "exact"}, "public_tests": ["\"123\"\n6", "\"232\"\n8", "\"3456237490\"\n9191"], "hints": ["Note that a number can contain multiple digits.", "Since the question asks us to find all of the valid expressions, we need a way to iterate over all of them. (Hint: Recursion!)", "We can keep track of the expression string and evaluate it at the very end. But that would take a lot of time. Can we keep track of the expression's value as well so as to avoid the evaluation at the very end of recursion?", "Think carefully about the multiply operator. It has a higher precedence than the addition and subtraction operators.\n1 + 2 = 3\n1 + 2 - 4 --> 3 - 4 --> -1\n1 + 2 - 4 * 12 --> -1 * 12 --> -12 (WRONG!)\n1 + 2 - 4 * 12 --> -1 - (-4) + (-4 * 12) --> 3 + (-48) --> -45 (CORRECT!)", "We simply need to keep track of the last operand in our expression and reverse it's effect on the expression's value while considering the multiply operator."], "metadata": {"canonical_parameter_names": ["num", "target"], "leetcode_dataset_entry_point": "Solution().addOperators", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:29+00:00", "tests_total": 67, "tests_dropped": 1, "flags": [], "topic_tags": ["math", "string", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def add_operators(num, target)", "container": null, "callable": "add_operators", "parameters": [{"name": "num", "type": "String"}, {"name": "target", "type": "Integer"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 287, "task_id": "find-the-duplicate-number", "difficulty": "Medium", "problem_description": "Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive.\n\nThere is only one repeated number in nums, return this repeated number.\n\nYou must solve the problem without modifying the array nums and using only constant extra space.\n\nExample 1:\n\nInput: nums = [1,3,4,2,2]\nOutput: 2\n\nExample 2:\n\nInput: nums = [3,1,3,4,2]\nOutput: 3\n\nExample 3:\n\nInput: nums = [3,3,3,3,3]\nOutput: 3\n\nConstraints:\n\n- 1 <= n <= 10^5\n- nums.length == n + 1\n- 1 <= nums[i] <= n\n- All the integers in nums appear only once except for precisely one integer which appears two or more times.\n\nFollow up:\n\n- How can we prove that at least one duplicate number must exist in nums?\n- Can you solve the problem in linear runtime complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 3, 3, 3]) == 3\n assert candidate(nums = [1, 2, 2, 3, 4]) == 2\n assert candidate(nums = [7, 9, 7, 4, 6, 2, 3, 8, 5, 1]) == 7\n assert candidate(nums = [3, 1, 3, 4, 2]) == 3\n assert candidate(nums = [1, 2, 3, 4, 4, 4, 5]) == 4\n assert candidate(nums = [3, 3, 3, 3, 3]) == 3\n assert candidate(nums = [1, 3, 4, 2, 2]) == 2\n assert candidate(nums = [5, 1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 6]) == 6\n assert candidate(nums = [1, 2, 3, 4, 4]) == 4\n assert candidate(nums = [1, 1, 2, 3, 4, 5]) == 1\n assert candidate(nums = [1, 1, 2, 3, 4]) == 1\n assert candidate(nums = [2, 2, 2, 2, 1]) == 2\n assert candidate(nums = [2, 2, 2, 2, 2]) == 2\n assert candidate(nums = [2, 1, 2, 3, 4, 5]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 5]) == 5\n assert candidate(nums = [1, 4, 4, 2, 3]) == 4\n assert candidate(nums = [2, 5, 9, 6, 9, 3, 8, 9, 7, 1]) == 9\n assert candidate(nums = [5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(nums = [1, 3, 2, 4, 5, 5, 6, 7, 8, 9]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 7]) == 7\n assert candidate(nums = [1, 3, 2, 5, 4, 6, 7, 8, 9, 10, 3]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10]) == 10\n assert candidate(nums = [2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 2]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5]) == 5\n assert candidate(nums = [5, 1, 4, 2, 5, 3, 5, 5, 5, 5]) == 5\n assert candidate(nums = [5, 4, 3, 2, 1, 6, 7, 8, 9, 2, 2]) == 2\n assert candidate(nums = [2, 1, 4, 3, 5, 6, 7, 8, 9, 10, 2]) == 2\n assert candidate(nums = [8, 7, 3, 6, 4, 2, 5, 7, 1, 9]) == 7\n assert candidate(nums = [1, 5, 2, 3, 5, 4, 5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 1\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1]) == 1\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(nums = [8, 9, 7, 6, 5, 4, 3, 2, 1, 8, 8]) == 8\n assert candidate(nums = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 3]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4]) == 4\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == 2\n assert candidate(nums = [1, 5, 3, 4, 2, 5]) == 5\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 10]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 8]) == 8\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9]) == 9\n assert candidate(nums = [10, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1]) == 1\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 6, 7, 8, 9, 10]) == 2\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 1]) == 1\n assert candidate(nums = [1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 1, 9, 10]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 6]) == 6\n assert candidate(nums = [10, 8, 7, 4, 6, 2, 9, 5, 3, 10, 1]) == 10\n assert candidate(nums = [1, 3, 2, 5, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 5]) == 5\n assert candidate(nums = [5, 2, 4, 3, 1, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1]) == 1\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 10]) == 1\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 5, 5]) == 5\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2]) == 2\n assert candidate(nums = [5, 4, 3, 2, 1, 1, 6, 7, 8, 9, 10]) == 1\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 9]) == 9\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 8, 8, 8, 8, 8]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3]) == 3\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 10]) == 1\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [2, 3, 1, 4, 5, 6, 7, 8, 9, 10, 2]) == 2\n assert candidate(nums = [5, 4, 3, 2, 1, 6, 5, 7, 8, 9, 10]) == 5\n assert candidate(nums = [1, 3, 5, 4, 2, 5, 6]) == 5\n assert candidate(nums = [8, 9, 7, 6, 5, 4, 3, 2, 1, 8]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 3\n assert candidate(nums = [10, 8, 9, 6, 3, 1, 2, 7, 4, 10, 5]) == 10\n assert candidate(nums = [1, 5, 4, 2, 3, 6, 7, 8, 9, 9, 10]) == 9\n assert candidate(nums = [10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5]) == 5\n", "comparison": "exact"}, "public_tests": ["[1,3,4,2,2]", "[3,1,3,4,2]", "[3,3,3,3,3]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findDuplicate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:36+00:00", "tests_total": 87, "tests_dropped": 10, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search", "bit-manipulation", "pigeonhole-principle", "floyds-cycle-finding-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def find_duplicate(nums)", "container": null, "callable": "find_duplicate", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 290, "task_id": "word-pattern", "difficulty": "Easy", "problem_description": "Given a pattern and a string s, find if s follows the same pattern.\n\nHere follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s. Specifically:\n\n- Each letter in pattern maps to exactly one unique word in s.\n- Each unique word in s maps to exactly one letter in pattern.\n- No two letters map to the same word, and no two words map to the same letter.\n\nExample 1:\n\nInput: pattern = \"abba\", s = \"dog cat cat dog\"\nOutput: true\nExplanation:\nThe bijection can be established as:\n- 'a' maps to \"dog\".\n- 'b' maps to \"cat\".\n\nExample 2:\n\nInput: pattern = \"abba\", s = \"dog cat cat fish\"\nOutput: false\n\nExample 3:\n\nInput: pattern = \"aaaa\", s = \"dog cat cat dog\"\nOutput: false\n\nConstraints:\n\n- 1 <= pattern.length <= 300\n- pattern contains only lower-case English letters.\n- 1 <= s.length <= 3000\n- s contains only lowercase English letters and spaces ' '.\n- s does not contain any leading or trailing spaces.\n- All the words in s are separated by a single space.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(pattern = \"aaaa\",s = \"dog cat cat dog\") == False\n assert candidate(pattern = \"abc\",s = \"dog dog dog\") == False\n assert candidate(pattern = \"abcd\",s = \"dog cat elephant fish\") == True\n assert candidate(pattern = \"aaaa\",s = \"dog dog dog dog\") == True\n assert candidate(pattern = \"he\",s = \"unit\") == False\n assert candidate(pattern = \"abb\",s = \"dog cat cat\") == True\n assert candidate(pattern = \"abab\",s = \"dog cat dog cat\") == True\n assert candidate(pattern = \"title\",s = \"title\") == False\n assert candidate(pattern = \"abc\",s = \"b c a\") == True\n assert candidate(pattern = \"abba\",s = \"dog dog dog dog\") == False\n assert candidate(pattern = \"aaa\",s = \"aa aa aa\") == True\n assert candidate(pattern = \"abc\",s = \"dog cat fish\") == True\n assert candidate(pattern = \"abba\",s = \"dog cat cat fish\") == False\n assert candidate(pattern = \"hello\",s = \"hello world\") == False\n assert candidate(pattern = \"abba\",s = \"dog cat cat dog\") == True\n assert candidate(pattern = \"jquery\",s = \"jquery\") == False\n assert candidate(pattern = \"a\",s = \"dog\") == True\n assert candidate(pattern = \"xyzyx\",s = \"apple banana cherry banana apple\") == True\n assert candidate(pattern = \"aabbccddeeff\",s = \"repeat a b c d e f\") == False\n assert candidate(pattern = \"aabbaa\",s = \"sun moon sun moon sun moon\") == False\n assert candidate(pattern = \"aabb\",s = \"apple banana apple banana\") == False\n assert candidate(pattern = \"abacaba\",s = \"car boat airplane car boat car airplane\") == False\n assert candidate(pattern = \"aabbccddeeff\",s = \"apple banana apple banana cherry cherry date date egg egg fig fig\") == False\n assert candidate(pattern = \"abcdefabc\",s = \"alpha beta gamma delta epsilon feta alpha beta gamma\") == True\n assert candidate(pattern = \"mnop\",s = \"red red blue blue\") == False\n assert candidate(pattern = \"qrstuv\",s = \"quick red slow tall ugly very\") == True\n assert candidate(pattern = \"aabbaa\",s = \"cat dog dog cat cat dog\") == False\n assert candidate(pattern = \"abcdab\",s = \"alpha beta gamma delta alpha beta\") == True\n assert candidate(pattern = \"pqrstuvw\",s = \"penny quill red slow tall usual very wavy\") == True\n assert candidate(pattern = \"aabbcc\",s = \"apple banana apple banana cherry cherry\") == False\n assert candidate(pattern = \"abcdef\",s = \"zebra lion tiger elephant fox dog\") == True\n assert candidate(pattern = \"abcabcabc\",s = \"cat dog bird cat dog bird cat dog bird\") == True\n assert candidate(pattern = \"aaaa\",s = \"cat cat cat cat\") == True\n assert candidate(pattern = \"abcdefgh\",s = \"alphabet in sequence\") == False\n assert candidate(pattern = \"abcdabcd\",s = \"sky cloud sun moon sky cloud sun moon\") == True\n assert candidate(pattern = \"abcabcabc\",s = \"car car car bike bike bike truck truck truck\") == False\n assert candidate(pattern = \"mnopq\",s = \"moon night ocean planet quest\") == True\n assert candidate(pattern = \"zzzz\",s = \"zebra zebra zebra zebra\") == True\n assert candidate(pattern = \"abcdabcd\",s = \"cat dog elephant fox cat dog elephant fox\") == True\n assert candidate(pattern = \"qrstuv\",s = \"zebra lion tiger bear eagle fox\") == True\n assert candidate(pattern = \"aaaaabbbbb\",s = \"cat cat cat cat cat dog dog dog dog dog\") == True\n assert candidate(pattern = \"xyxzy\",s = \"sky yacht sky yacht sky\") == False\n assert candidate(pattern = \"abcba\",s = \"tree bush grass bush tree\") == True\n assert candidate(pattern = \"qrstuvwx\",s = \"continuing the test\") == False\n assert candidate(pattern = \"abcabcabc\",s = \"hi ho ha hi ho ha hi ho ha\") == True\n assert candidate(pattern = \"abba\",s = \"ant bear bear ant\") == True\n assert candidate(pattern = \"pqrstuvw\",s = \"eight distinct words\") == False\n assert candidate(pattern = \"abab\",s = \"red blue red blue\") == True\n assert candidate(pattern = \"aabbcc\",s = \"moon moon star star sun sun\") == True\n assert candidate(pattern = \"aabbccdd\",s = \"red blue red blue red blue red blue\") == False\n assert candidate(pattern = \"abcdefg\",s = \"zebra ostrich lion tiger elephant seal fox\") == True\n assert candidate(pattern = \"abab\",s = \"apple banana apple banana\") == True\n assert candidate(pattern = \"ijklmnop\",s = \"another set of words\") == False\n assert candidate(pattern = \"aabbcc\",s = \"up down up down up down\") == False\n assert candidate(pattern = \"aabbcc\",s = \"red blue green red blue green\") == False\n assert candidate(pattern = \"mnopqrstuv\",s = \"elephant monkey lion tiger unicorn vampire werewolf goblin\") == False\n assert candidate(pattern = \"abcdefghij\",s = \"alpha beta gamma delta epsilon zeta eta theta iota kappa\") == True\n assert candidate(pattern = \"mnop\",s = \"moon night opus pug\") == True\n assert candidate(pattern = \"abcabc\",s = \"elephant elephant elephant dog dog dog\") == False\n assert candidate(pattern = \"abcb\",s = \"sun moon sun moon\") == False\n assert candidate(pattern = \"mnop\",s = \"moon night opal night\") == False\n assert candidate(pattern = \"mnopq\",s = \"five different words needed\") == False\n assert candidate(pattern = \"mnopqr\",s = \"man on top quick red\") == False\n assert candidate(pattern = \"abacaba\",s = \"car bike bus car bike car bike\") == False\n assert candidate(pattern = \"stuv\",s = \"shoe train umbrella vacuum\") == True\n assert candidate(pattern = \"qrst\",s = \"quick red small tall\") == True\n assert candidate(pattern = \"zzzz\",s = \"unique unique unique unique\") == True\n assert candidate(pattern = \"xyyx\",s = \"apple banana banana apple\") == True\n assert candidate(pattern = \"mnop\",s = \"moon night ocean planet\") == True\n assert candidate(pattern = \"aabbcc\",s = \"ant bee cat ant bee cat\") == False\n assert candidate(pattern = \"abcabcabc\",s = \"car boat plane car boat plane car boat plane\") == True\n assert candidate(pattern = \"vwxyzabc\",s = \"final set of words\") == False\n assert candidate(pattern = \"mnopqr\",s = \"moon night ocean pond quiet rain\") == True\n assert candidate(pattern = \"abab\",s = \"sun moon sun moon\") == True\n assert candidate(pattern = \"aabbaa\",s = \"hello world hello world hello world\") == False\n assert candidate(pattern = \"aaaa\",s = \"wolf wolf wolf wolf\") == True\n assert candidate(pattern = \"aabb\",s = \"red blue red blue\") == False\n assert candidate(pattern = \"abba\",s = \"hello world world hello\") == True\n assert candidate(pattern = \"abcdefg\",s = \"red blue green yellow purple orange pink\") == True\n assert candidate(pattern = \"mnopqr\",s = \"one two three four five six seven\") == False\n assert candidate(pattern = \"mnop\",s = \"mountain ocean night planet\") == True\n assert candidate(pattern = \"zzzzzzzzzz\",s = \"zero zero zero zero zero zero zero zero zero zero\") == True\n assert candidate(pattern = \"abcabc\",s = \"x y z x y z\") == True\n assert candidate(pattern = \"zzzz\",s = \"kite kite kite kite\") == True\n assert candidate(pattern = \"abac\",s = \"tree bush apple tree\") == False\n assert candidate(pattern = \"abcdabcd\",s = \"first second third fourth first second third fourth\") == True\n assert candidate(pattern = \"abcabc\",s = \"one two three one two three\") == True\n assert candidate(pattern = \"abac\",s = \"car truck airplane car\") == False\n assert candidate(pattern = \"zxyzzx\",s = \"zebra ostrich xerus zebra zebra xerus\") == False\n assert candidate(pattern = \"xyzx\",s = \"flower garden weed flower\") == True\n assert candidate(pattern = \"wwww\",s = \"word word word word\") == True\n assert candidate(pattern = \"abcd\",s = \"one two three four\") == True\n assert candidate(pattern = \"abac\",s = \"mango orange mango cherry\") == True\n assert candidate(pattern = \"xyzyxzyz\",s = \"red blue red blue red blue red blue\") == False\n assert candidate(pattern = \"xyyx\",s = \"xerox yellow yellow xerox\") == True\n assert candidate(pattern = \"abcabcabc\",s = \"sun moon earth sun moon earth sun moon earth\") == True\n assert candidate(pattern = \"xyzxyz\",s = \"moon sun moon sun moon sun\") == False\n assert candidate(pattern = \"xyzzyx\",s = \"tree bush apple apple bush tree\") == True\n assert candidate(pattern = \"zzzz\",s = \"star star star star\") == True\n assert candidate(pattern = \"abcdabcd\",s = \"one two three four one two three four\") == True\n assert candidate(pattern = \"abcdefghij\",s = \"one two three four five six seven eight nine ten\") == True\n assert candidate(pattern = \"abacaba\",s = \"sun moon sun moon earth sun moon\") == False\n assert candidate(pattern = \"abababa\",s = \"moon sun moon sun moon sun moon\") == True\n assert candidate(pattern = \"qrqrqr\",s = \"queen rabbit queen rabbit queen rabbit\") == True\n assert candidate(pattern = \"abcba\",s = \"start middle end middle start\") == True\n assert candidate(pattern = \"aabbaabb\",s = \"apple banana apple banana apple banana\") == False\n assert candidate(pattern = \"xyzx\",s = \"apple banana cherry apple\") == True\n assert candidate(pattern = \"abac\",s = \"one two three one\") == False\n assert candidate(pattern = \"abab\",s = \"up down up down down up\") == False\n assert candidate(pattern = \"ababab\",s = \"house car house car house car\") == True\n assert candidate(pattern = \"mnop\",s = \"red blue red green\") == False\n assert candidate(pattern = \"xyzz\",s = \"apple banana cherry cherry\") == True\n assert candidate(pattern = \"abca\",s = \"red blue green red\") == True\n assert candidate(pattern = \"ghijklmn\",s = \"next set of words\") == False\n assert candidate(pattern = \"aabbcc\",s = \"cat dog bird cat dog bird\") == False\n assert candidate(pattern = \"efgh\",s = \"elephant fox giraffe hippo\") == True\n assert candidate(pattern = \"aba\",s = \"car bike car\") == True\n assert candidate(pattern = \"abcdeabcde\",s = \"apple banana cat dog elephant apple banana cat dog elephant\") == True\n assert candidate(pattern = \"qrstuv\",s = \"table chair desk bed lamp shelf\") == True\n assert candidate(pattern = \"aabb\",s = \"car bike car bike\") == False\n assert candidate(pattern = \"mnop\",s = \"this is just a test\") == False\n assert candidate(pattern = \"mnopqrst\",s = \"more words for testing\") == False\n assert candidate(pattern = \"qrst\",s = \"unique words map correctly\") == True\n assert candidate(pattern = \"abcdefg\",s = \"one two three four five six seven\") == True\n assert candidate(pattern = \"aabbcc\",s = \"lion tiger lion tiger lion tiger\") == False\n assert candidate(pattern = \"abcabcabc\",s = \"hello world hello world hello world\") == False\n assert candidate(pattern = \"zzzzzz\",s = \"same same same same same same\") == True\n assert candidate(pattern = \"mnopqr\",s = \"zebra lion monkey narwhal otter penguin\") == True\n assert candidate(pattern = \"mnopq\",s = \"monster ocean night planet quest\") == True\n assert candidate(pattern = \"qrst\",s = \"quick red slow tall\") == True\n assert candidate(pattern = \"xyzxyz\",s = \"one two three one two three\") == True\n assert candidate(pattern = \"abacda\",s = \"car bike car dog car bike\") == False\n assert candidate(pattern = \"xyxzy\",s = \"red blue red blue green\") == False\n assert candidate(pattern = \"abcdefghij\",s = \"elephant monkey gorilla bear lion eagle wolf chicken dog ant\") == True\n assert candidate(pattern = \"aabbcc\",s = \"hello world hello world hello world\") == False\n assert candidate(pattern = \"aabbcc\",s = \"sun moon sun moon sun moon\") == False\n assert candidate(pattern = \"ababab\",s = \"red blue red blue red blue\") == True\n assert candidate(pattern = \"zzzz\",s = \"same same same same\") == True\n assert candidate(pattern = \"abcde\",s = \"alpha beta gamma delta epsilon\") == True\n assert candidate(pattern = \"abac\",s = \"hello world hello hello\") == False\n assert candidate(pattern = \"abcd\",s = \"alpha bravo charlie delta\") == True\n assert candidate(pattern = \"zzzz\",s = \"zoo zoo zoo zoo\") == True\n assert candidate(pattern = \"abcdefg\",s = \"pencil pen eraser notebook ruler glue scissor\") == True\n assert candidate(pattern = \"xyyx\",s = \"car truck truck car\") == True\n assert candidate(pattern = \"xyz\",s = \"sun moon stars\") == True\n assert candidate(pattern = \"abcdefg\",s = \"alpha bravo charlie delta echo foxtrot golf\") == True\n assert candidate(pattern = \"abcabcabc\",s = \"dog cat dog cat dog cat dog\") == False\n", "comparison": "exact"}, "public_tests": ["\"abba\"\n\"dog cat cat dog\"", "\"abba\"\n\"dog cat cat fish\"", "\"aaaa\"\n\"dog cat cat dog\""], "hints": [], "metadata": {"canonical_parameter_names": ["pattern", "s"], "leetcode_dataset_entry_point": "Solution().wordPattern", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:41+00:00", "tests_total": 147, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "string"]}, "language": "ruby", "interface": {"raw_signature": "def word_pattern(pattern, s)", "container": null, "callable": "word_pattern", "parameters": [{"name": "pattern", "type": "String"}, {"name": "s", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 292, "task_id": "nim-game", "difficulty": "Easy", "problem_description": "You are playing the following Nim Game with your friend:\n\n- Initially, there is a heap of stones on the table.\n- You and your friend will alternate taking turns, and you go first.\n- On each turn, the person whose turn it is will remove 1 to 3 stones from the heap.\n- The one who removes the last stone is the winner.\n\nGiven n, the number of stones in the heap, return true if you can win the game assuming both you and your friend play optimally, otherwise return false.\n\nExample 1:\n\nInput: n = 4\nOutput: false\nExplanation: These are the possible outcomes:\n1. You remove 1 stone. Your friend removes 3 stones, including the last stone. Your friend wins.\n2. You remove 2 stones. Your friend removes 2 stones, including the last stone. Your friend wins.\n3. You remove 3 stones. Your friend removes the last stone. Your friend wins.\nIn all outcomes, your friend wins.\n\nExample 2:\n\nInput: n = 1\nOutput: true\n\nExample 3:\n\nInput: n = 2\nOutput: true\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == True\n assert candidate(n = 21) == True\n assert candidate(n = 2147483647) == True\n assert candidate(n = 104) == False\n assert candidate(n = 100) == False\n assert candidate(n = 10) == True\n assert candidate(n = 5) == True\n assert candidate(n = 28) == False\n assert candidate(n = 40) == False\n assert candidate(n = 4) == False\n assert candidate(n = 16) == False\n assert candidate(n = 33) == True\n assert candidate(n = 17) == True\n assert candidate(n = 37) == True\n assert candidate(n = 2) == True\n assert candidate(n = 23) == True\n assert candidate(n = 1024) == False\n assert candidate(n = 8) == False\n assert candidate(n = 27) == True\n assert candidate(n = 35) == True\n assert candidate(n = 32) == False\n assert candidate(n = 20) == False\n assert candidate(n = 19) == True\n assert candidate(n = 24) == False\n assert candidate(n = 15) == True\n assert candidate(n = 31) == True\n assert candidate(n = 1) == True\n assert candidate(n = 7) == True\n assert candidate(n = 13) == True\n assert candidate(n = 25) == True\n assert candidate(n = 2147483646) == True\n assert candidate(n = 536870912) == False\n assert candidate(n = 1000) == False\n assert candidate(n = 262143) == True\n assert candidate(n = 268435456) == False\n assert candidate(n = 300) == False\n assert candidate(n = 2147483643) == True\n assert candidate(n = 33554432) == False\n assert candidate(n = 333333333) == True\n assert candidate(n = 2048) == False\n assert candidate(n = 1048576) == False\n assert candidate(n = 999) == True\n assert candidate(n = 8191) == True\n assert candidate(n = 36) == False\n assert candidate(n = 1000000000) == False\n assert candidate(n = 11) == True\n assert candidate(n = 32768) == False\n assert candidate(n = 200) == False\n assert candidate(n = 1048575) == True\n assert candidate(n = 500) == False\n assert candidate(n = 29) == True\n assert candidate(n = 131071) == True\n assert candidate(n = 67108864) == False\n assert candidate(n = 524288) == False\n assert candidate(n = 524287) == True\n assert candidate(n = 268435455) == True\n assert candidate(n = 134217728) == False\n assert candidate(n = 1073741823) == True\n assert candidate(n = 80) == False\n assert candidate(n = 16777215) == True\n assert candidate(n = 256) == False\n assert candidate(n = 131072) == False\n assert candidate(n = 81) == True\n assert candidate(n = 9) == True\n assert candidate(n = 6) == True\n assert candidate(n = 123456789) == True\n assert candidate(n = 8388608) == False\n assert candidate(n = 63) == True\n assert candidate(n = 999999999) == True\n assert candidate(n = 130) == True\n assert candidate(n = 47) == True\n assert candidate(n = 4096) == False\n assert candidate(n = 67108863) == True\n assert candidate(n = 32767) == True\n assert candidate(n = 34) == True\n assert candidate(n = 16384) == False\n assert candidate(n = 123) == True\n assert candidate(n = 16777216) == False\n assert candidate(n = 4194303) == True\n assert candidate(n = 30) == True\n assert candidate(n = 345) == True\n assert candidate(n = 2147483644) == False\n assert candidate(n = 8192) == False\n assert candidate(n = 65536) == False\n assert candidate(n = 18) == True\n assert candidate(n = 1023) == True\n assert candidate(n = 127) == True\n assert candidate(n = 2147483641) == True\n assert candidate(n = 14) == True\n assert candidate(n = 26) == True\n assert candidate(n = 536870911) == True\n assert candidate(n = 1000000) == False\n assert candidate(n = 33554431) == True\n assert candidate(n = 1337) == True\n assert candidate(n = 2097152) == False\n assert candidate(n = 12) == False\n assert candidate(n = 50) == True\n assert candidate(n = 134217727) == True\n assert candidate(n = 99) == True\n assert candidate(n = 8388607) == True\n assert candidate(n = 2097151) == True\n assert candidate(n = 4194304) == False\n assert candidate(n = 64) == False\n assert candidate(n = 2147483645) == True\n assert candidate(n = 128) == False\n assert candidate(n = 1073741824) == False\n assert candidate(n = 22) == True\n assert candidate(n = 262144) == False\n assert candidate(n = 39) == True\n assert candidate(n = 2147483640) == False\n assert candidate(n = 2147483642) == True\n assert candidate(n = 65535) == True\n assert candidate(n = 512) == False\n assert candidate(n = 38) == True\n", "comparison": "exact"}, "public_tests": ["4", "1", "2"], "hints": ["If there are 5 stones in the heap, could you figure out a way to remove the stones such that you will always be the winner?"], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().canWinNim", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:45+00:00", "tests_total": 114, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "brainteaser", "minimax-algorithm", "game-theory", "nim-game", "impartial-game"]}, "language": "ruby", "interface": {"raw_signature": "def can_win_nim(n)", "container": null, "callable": "can_win_nim", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 299, "task_id": "bulls-and-cows", "difficulty": "Medium", "problem_description": "You are playing the Bulls and Cows game with your friend.\n\nYou write down a secret number and ask your friend to guess what the number is. When your friend makes a guess, you provide a hint with the following info:\n\n- The number of \"bulls\", which are digits in the guess that are in the correct position.\n- The number of \"cows\", which are digits in the guess that are in your secret number but are located in the wrong position. Specifically, the non-bull digits in the guess that could be rearranged such that they become bulls.\n\nGiven the secret number secret and your friend's guess guess, return the hint for your friend's guess.\n\nThe hint should be formatted as \"xAyB\", where x is the number of bulls and y is the number of cows. Note that both secret and guess may contain duplicate digits.\n\nExample 1:\n\nInput: secret = \"1807\", guess = \"7810\"\nOutput: \"1A3B\"\nExplanation: Bulls are connected with a '|' and cows are underlined:\n\"1807\"\n |\n\"7810\"\n\nExample 2:\n\nInput: secret = \"1123\", guess = \"0111\"\nOutput: \"1A1B\"\nExplanation: Bulls are connected with a '|' and cows are underlined:\n\"1123\" \"1123\"\n | or |\n\"0111\" \"0111\"\nNote that only one of the two unmatched 1s is counted as a cow since the non-bull digits can only be rearranged to allow one 1 to be a bull.\n\nConstraints:\n\n- 1 <= secret.length, guess.length <= 1000\n- secret.length == guess.length\n- secret and guess consist of digits only.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(secret = \"1010101010\",guess = \"0101010101\") == \"0A10B\"\n assert candidate(secret = \"1234567890\",guess = \"1111111111\") == \"1A0B\"\n assert candidate(secret = \"0000\",guess = \"1111\") == \"0A0B\"\n assert candidate(secret = \"111222333\",guess = \"333222111\") == \"3A6B\"\n assert candidate(secret = \"9999999999\",guess = \"1111111111\") == \"0A0B\"\n assert candidate(secret = \"1112\",guess = \"1122\") == \"3A0B\"\n assert candidate(secret = \"9305\",guess = \"7315\") == \"2A0B\"\n assert candidate(secret = \"1122\",guess = \"2211\") == \"0A4B\"\n assert candidate(secret = \"1234567890\",guess = \"0987654321\") == \"0A10B\"\n assert candidate(secret = \"1111\",guess = \"1111\") == \"4A0B\"\n assert candidate(secret = \"0000\",guess = \"0000\") == \"4A0B\"\n assert candidate(secret = \"5678901234\",guess = \"1234567890\") == \"0A10B\"\n assert candidate(secret = \"1234\",guess = \"4321\") == \"0A4B\"\n assert candidate(secret = \"111222333\",guess = \"123123123\") == \"3A6B\"\n assert candidate(secret = \"1234567890\",guess = \"9876543210\") == \"2A8B\"\n assert candidate(secret = \"1123\",guess = \"0111\") == \"1A1B\"\n assert candidate(secret = \"1807\",guess = \"7810\") == \"1A3B\"\n assert candidate(secret = \"2222\",guess = \"1111\") == \"0A0B\"\n assert candidate(secret = \"0000000000\",guess = \"0000000000\") == \"10A0B\"\n assert candidate(secret = \"1234567890\",guess = \"1234567890\") == \"10A0B\"\n assert candidate(secret = \"0000000000\",guess = \"1111111111\") == \"0A0B\"\n assert candidate(secret = \"12345678901234567890\",guess = \"09876543210987654321\") == \"0A20B\"\n assert candidate(secret = \"1112223334\",guess = \"4332221110\") == \"3A6B\"\n assert candidate(secret = \"9876543210\",guess = \"0123456789\") == \"0A10B\"\n assert candidate(secret = \"5555555555\",guess = \"5555555555\") == \"10A0B\"\n assert candidate(secret = \"1111111111\",guess = \"1212121212\") == \"5A0B\"\n assert candidate(secret = \"123123\",guess = \"321321\") == \"2A4B\"\n assert candidate(secret = \"111222\",guess = \"222111\") == \"0A6B\"\n assert candidate(secret = \"001122\",guess = \"221100\") == \"2A4B\"\n assert candidate(secret = \"111122223333444455556666777788889999\",guess = \"999988887777666655554444333322221111\") == \"4A32B\"\n assert candidate(secret = \"1234123412\",guess = \"1234123412\") == \"10A0B\"\n assert candidate(secret = \"1111111111111111\",guess = \"1111111111111111\") == \"16A0B\"\n assert candidate(secret = \"5656565656\",guess = \"6565656565\") == \"0A10B\"\n assert candidate(secret = \"11223344\",guess = \"44332211\") == \"0A8B\"\n assert candidate(secret = \"888888\",guess = \"888888\") == \"6A0B\"\n assert candidate(secret = \"0123456789\",guess = \"9876543210\") == \"0A10B\"\n assert candidate(secret = \"1111222233334444\",guess = \"4444333322221111\") == \"0A16B\"\n assert candidate(secret = \"12345678901234567890\",guess = \"12345678900000000000\") == \"11A0B\"\n assert candidate(secret = \"00000000\",guess = \"88888888\") == \"0A0B\"\n assert candidate(secret = \"12345678900000000000\",guess = \"00000000001234567890\") == \"2A18B\"\n assert candidate(secret = \"1010101010\",guess = \"1010101010\") == \"10A0B\"\n assert candidate(secret = \"11223344556677889900\",guess = \"00998877665544332211\") == \"0A20B\"\n assert candidate(secret = \"12345678901234567890\",guess = \"12345678901234567890\") == \"20A0B\"\n assert candidate(secret = \"2234567890\",guess = \"0987654322\") == \"0A10B\"\n assert candidate(secret = \"1000000001\",guess = \"0111111110\") == \"0A4B\"\n assert candidate(secret = \"9111111119\",guess = \"9111111119\") == \"10A0B\"\n assert candidate(secret = \"99887766554433221100\",guess = \"00112233445566778899\") == \"0A20B\"\n assert candidate(secret = \"1111111111\",guess = \"0000000001\") == \"1A0B\"\n assert candidate(secret = \"1000100010\",guess = \"0111011101\") == \"0A6B\"\n assert candidate(secret = \"11112222333344445555\",guess = \"55554444333322221111\") == \"4A16B\"\n assert candidate(secret = \"1223344556\",guess = \"1122334455\") == \"5A4B\"\n assert candidate(secret = \"1112223334\",guess = \"4332221119\") == \"3A6B\"\n assert candidate(secret = \"0011001100\",guess = \"1100110011\") == \"0A8B\"\n assert candidate(secret = \"9876543210\",guess = \"9876543210\") == \"10A0B\"\n assert candidate(secret = \"2222222222\",guess = \"2222222222\") == \"10A0B\"\n assert candidate(secret = \"999988887777\",guess = \"888877776666\") == \"0A8B\"\n assert candidate(secret = \"98765432109876543210\",guess = \"01234567890123456789\") == \"0A20B\"\n assert candidate(secret = \"1122334455\",guess = \"1122334455\") == \"10A0B\"\n assert candidate(secret = \"1234123412\",guess = \"2143214321\") == \"0A10B\"\n assert candidate(secret = \"12341234\",guess = \"43214321\") == \"0A8B\"\n assert candidate(secret = \"555555\",guess = \"555555\") == \"6A0B\"\n assert candidate(secret = \"1111111111\",guess = \"1111111111\") == \"10A0B\"\n assert candidate(secret = \"1111111111\",guess = \"2222222222\") == \"0A0B\"\n assert candidate(secret = \"1000000000\",guess = \"0111111111\") == \"0A2B\"\n assert candidate(secret = \"1112223334\",guess = \"1111111111\") == \"3A0B\"\n assert candidate(secret = \"0123012301\",guess = \"1032103210\") == \"0A10B\"\n assert candidate(secret = \"9999999999\",guess = \"9999999999\") == \"10A0B\"\n assert candidate(secret = \"9876543210\",guess = \"1234567890\") == \"2A8B\"\n assert candidate(secret = \"1231231231\",guess = \"3123123123\") == \"0A9B\"\n assert candidate(secret = \"5638472910\",guess = \"1092748356\") == \"0A10B\"\n assert candidate(secret = \"1112223334\",guess = \"4333222111\") == \"2A8B\"\n assert candidate(secret = \"12345678901234567890\",guess = \"98765432109876543210\") == \"4A16B\"\n assert candidate(secret = \"1020304050\",guess = \"0102030405\") == \"0A10B\"\n assert candidate(secret = \"5678901234\",guess = \"5566778899\") == \"1A4B\"\n assert candidate(secret = \"101010\",guess = \"010101\") == \"0A6B\"\n assert candidate(secret = \"1122334455\",guess = \"5544332211\") == \"2A8B\"\n assert candidate(secret = \"1234123412\",guess = \"2341234123\") == \"0A9B\"\n assert candidate(secret = \"33331111\",guess = \"11113333\") == \"0A8B\"\n assert candidate(secret = \"2222222222\",guess = \"1111111111\") == \"0A0B\"\n assert candidate(secret = \"1111111111\",guess = \"1010101010\") == \"5A0B\"\n assert candidate(secret = \"111222333444555666777888999000\",guess = \"000999888777666555444333222111\") == \"0A30B\"\n assert candidate(secret = \"99998888777766665555\",guess = \"55554444333322221111\") == \"0A4B\"\n assert candidate(secret = \"0000000000\",guess = \"9999999999\") == \"0A0B\"\n assert candidate(secret = \"1221122112\",guess = \"2112211221\") == \"0A10B\"\n assert candidate(secret = \"5678901234\",guess = \"0123456789\") == \"0A10B\"\n assert candidate(secret = \"04730865\",guess = \"58600074\") == \"1A6B\"\n assert candidate(secret = \"1223344556\",guess = \"1223344556\") == \"10A0B\"\n assert candidate(secret = \"1234567890\",guess = \"5432109876\") == \"2A8B\"\n assert candidate(secret = \"12345678901234567890\",guess = \"01234567890123456789\") == \"0A20B\"\n assert candidate(secret = \"0000111122223333\",guess = \"3333222211110000\") == \"0A16B\"\n assert candidate(secret = \"1234567890\",guess = \"0123456789\") == \"0A10B\"\n assert candidate(secret = \"000000\",guess = \"000000\") == \"6A0B\"\n assert candidate(secret = \"111122223333\",guess = \"111122223333\") == \"12A0B\"\n assert candidate(secret = \"111122223333\",guess = \"333344445555\") == \"0A4B\"\n assert candidate(secret = \"25432109876543210987654321\",guess = \"10987654321098765432125432\") == \"0A26B\"\n assert candidate(secret = \"9999999999\",guess = \"8888888888\") == \"0A0B\"\n assert candidate(secret = \"8888888888\",guess = \"8888888888\") == \"10A0B\"\n assert candidate(secret = \"2457\",guess = \"5247\") == \"1A3B\"\n assert candidate(secret = \"5608055740\",guess = \"5708055640\") == \"8A2B\"\n assert candidate(secret = \"1234555555\",guess = \"5555555551\") == \"5A2B\"\n assert candidate(secret = \"1223344556\",guess = \"6554433221\") == \"0A10B\"\n assert candidate(secret = \"00112233445566778899\",guess = \"99887766554433221100\") == \"0A20B\"\n assert candidate(secret = \"1234123412\",guess = \"2345234523\") == \"0A7B\"\n assert candidate(secret = \"122112\",guess = \"211221\") == \"0A6B\"\n assert candidate(secret = \"112233\",guess = \"332211\") == \"2A4B\"\n assert candidate(secret = \"1231231231\",guess = \"3213213213\") == \"3A6B\"\n assert candidate(secret = \"1212121212\",guess = \"2121212121\") == \"0A10B\"\n assert candidate(secret = \"1221\",guess = \"1122\") == \"2A2B\"\n assert candidate(secret = \"123456\",guess = \"654321\") == \"0A6B\"\n assert candidate(secret = \"000111222\",guess = \"222111000\") == \"3A6B\"\n assert candidate(secret = \"12213312\",guess = \"21123312\") == \"4A4B\"\n assert candidate(secret = \"8888\",guess = \"8888\") == \"4A0B\"\n assert candidate(secret = \"999999\",guess = \"123456\") == \"0A0B\"\n assert candidate(secret = \"9876543210\",guess = \"1098765432\") == \"0A10B\"\n assert candidate(secret = \"9000000000\",guess = \"9000000000\") == \"10A0B\"\n", "comparison": "exact"}, "public_tests": ["\"1807\"\n\"7810\"", "\"1123\"\n\"0111\""], "hints": [], "metadata": {"canonical_parameter_names": ["secret", "guess"], "leetcode_dataset_entry_point": "Solution().getHint", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:56+00:00", "tests_total": 115, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "string", "counting"]}, "language": "ruby", "interface": {"raw_signature": "def get_hint(secret, guess)", "container": null, "callable": "get_hint", "parameters": [{"name": "secret", "type": "String"}, {"name": "guess", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 300, "task_id": "longest-increasing-subsequence", "difficulty": "Medium", "problem_description": "Given an integer array nums, return the length of the longest strictly increasing subsequence.\n\nExample 1:\n\nInput: nums = [10,9,2,5,3,7,101,18]\nOutput: 4\nExplanation: The longest increasing subsequence is [2,3,7,101], therefore the length is 4.\n\nExample 2:\n\nInput: nums = [0,1,0,3,2,3]\nOutput: 4\n\nExample 3:\n\nInput: nums = [7,7,7,7,7,7,7]\nOutput: 1\n\nConstraints:\n\n- 1 <= nums.length <= 2500\n- -10^4 <= nums[i] <= 10^4\n\nFollow up: Can you come up with an algorithm that runs in O(n log(n)) time complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7]) == 1\n assert candidate(nums = [1, 2, 2, 4, 5, 3]) == 4\n assert candidate(nums = [0, -1, 1]) == 2\n assert candidate(nums = [0, 1, 0, 3, 2, 3]) == 4\n assert candidate(nums = [1, 3, 5, 4, 7]) == 4\n assert candidate(nums = [1, 3, 6, 7, 9, 4, 10, 5, 6]) == 6\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == 4\n assert candidate(nums = [1, 2, 2, 2, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 2, 3]) == 3\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80]) == 6\n assert candidate(nums = [3, 4, -1, 0, 6, 2, 3]) == 4\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5]) == 5\n assert candidate(nums = [1, 3, 5, 7, 9]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [4, 10, 4, 3, 8, 9]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 50\n assert candidate(nums = [3, 1, 2, 4, 5, 7, 6, 8, 9, 10, 12, 11]) == 9\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110]) == 11\n assert candidate(nums = [-10, -5, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 11\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 3, 4, 7, 8, 10]) == 6\n assert candidate(nums = [2, 1, 5, 3, 6, 4, 8, 9, 7, 10, 12, 11, 13, 14]) == 9\n assert candidate(nums = [4, 10, 4, 3, 8, 9, 5, 6, 7, 8, 9, 10]) == 7\n assert candidate(nums = [100, 4, 200, 1, 3, 2, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115]) == 17\n assert candidate(nums = [2, 1, 5, 3, 7, 11, 8, 10, 13, 6, 9, 12, 15, 4, 14, 18, 16, 17, 19, 20]) == 11\n assert candidate(nums = [1, 2, 5, 3, 7, 10, 1, 12, 6, 8, 9, 11, 13]) == 8\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 102, 19, 103, 20, 104, 21, 105, 22, 106, 23, 107, 24, 108, 25, 109, 26, 110, 27]) == 13\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 100\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 1, 23, 1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 1, 43, 1, 44, 1, 45, 1, 46, 1, 47, 1, 48, 1, 49, 1, 50]) == 50\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == 15\n assert candidate(nums = [1, 3, 5, 4, 7, 8, 9, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 15\n assert candidate(nums = [1, 3, 5, 4, 7, 9, 8, 11, 13, 15, 17, 16, 19, 21, 23, 22, 25, 27, 29, 28, 31, 33, 35, 34, 37, 39, 38, 41, 43, 45, 44, 47, 49, 48, 51, 53, 55, 54, 57, 59, 58, 61, 63, 65, 64, 67, 69, 68, 71, 73, 75, 74, 77, 79, 78]) == 40\n assert candidate(nums = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [1, 3, 5, 2, 4, 6, 3, 5, 7, 4, 6, 8, 5, 7, 9, 6, 8, 10, 7, 9, 11, 8, 10, 12, 9, 11, 13, 10, 12, 14]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 100\n assert candidate(nums = [1, 10, 9, 11, 5, 7, 3, 6, 4, 8, 2]) == 4\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991]) == 1\n assert candidate(nums = [1, 9, 3, 4, 5, 6, 7, 8, 2, 10]) == 8\n assert candidate(nums = [25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 50\n assert candidate(nums = [2, 2, 2, 1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 4\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14]) == 14\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, 5, 4, 6, 7, 8, 9, 10]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 30\n assert candidate(nums = [3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 11\n assert candidate(nums = [2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 14\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4]) == 6\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120]) == 60\n assert candidate(nums = [100, 1, 101, 2, 102, 3, 103, 4, 104, 5, 105, 6, 106, 7, 107, 8, 108, 9, 109, 10]) == 10\n assert candidate(nums = [1, 3, 6, 7, 9, 4, 10, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 10\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 15\n assert candidate(nums = [-10000, 10000, -9999, 9999, -9998, 9998, -9997, 9997, -9996, 9996, -9995, 9995]) == 7\n assert candidate(nums = [1, 10, 11, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 2, 5, 3, 7, 101, 18]) == 53\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 11\n assert candidate(nums = [2, 2, 2, 2, 2, 3, 4, 5, 5, 6]) == 5\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200]) == 101\n assert candidate(nums = [300, 200, 100, 50, 25, 12, 6, 3, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 36\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 150, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 76\n assert candidate(nums = [23, 10, 12, 24, 25, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27]) == 17\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0]) == 1\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99]) == 50\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [5, 8, 7, 1, 9, 12, 10, 14, 13, 17, 16, 20, 19, 23, 22, 26, 25, 29, 28, 32, 31]) == 11\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45]) == 23\n assert candidate(nums = [3, 1, 2, 5, 2, 4, 3, 6, 10, 9, 15, 8, 7]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 4, 6, 8, 100, 3, 2, 1]) == 6\n assert candidate(nums = [5, 14, 23, 37, 2, 55, 27, 44, 31, 8, 48, 15, 47, 49, 34, 10, 29, 6, 12, 3, 26, 13, 16, 46, 1, 4, 17, 24, 39, 32, 21, 43, 42, 35, 50, 7, 9, 40, 19, 28, 36, 18, 22, 30, 38, 25, 41]) == 13\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 20\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 1\n assert candidate(nums = [1, 2, 8, 6, 4, 5, 3, 7]) == 5\n assert candidate(nums = [1, 3, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12]) == 7\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990]) == 1\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 1\n assert candidate(nums = [1, 5, 3, 4, 6, 7, 8, 2, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 18\n assert candidate(nums = [3, 1, 2, 4, 10, 6, 9, 2, 5, 3, 7, 101, 18, 8, 12, 15, 19, 20, 23, 25, 27, 29, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100]) == 50\n assert candidate(nums = [5, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 15\n assert candidate(nums = [2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981, 9980, 9979, 9978, 9977, 9976, 9975, 9974, 9973, 9972, 9971, 9970, 9969, 9968, 9967, 9966, 9965, 9964, 9963, 9962, 9961, 9960, 9959, 9958, 9957, 9956, 9955, 9954, 9953, 9952, 9951, 9950]) == 1\n assert candidate(nums = [1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1, 2500, 2, 2499, 3, 2498, 4, 2497, 5, 2496, 6, 2495, 7, 2494, 8, 2493, 9, 2492, 10, 2491]) == 11\n assert candidate(nums = [1, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 15\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [23, 1, 24, 11, 13, 12, 31, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]) == 50\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 5\n assert candidate(nums = [3, 5, 6, 2, 5, 4, 19, 5, 6, 7, 12]) == 6\n assert candidate(nums = [3, 1, 2, 5, 4, 8, 7, 10, 9, 13, 12, 15, 14, 17, 16, 19, 18, 21, 20, 23, 22]) == 11\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 11\n assert candidate(nums = [1, 2, 5, 3, 6, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 18\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [3, 5, 6, 2, 5, 4, 19, 5, 6, 7, 12]) == 6\n assert candidate(nums = [1, 3, 5, 4, 7, 9, 8, 11, 10, 13, 15, 14, 17]) == 9\n assert candidate(nums = [1, 3, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 22\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 1\n assert candidate(nums = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 0, -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 50\n assert candidate(nums = [1, 5, 3, 4, 2, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5]) == 18\n assert candidate(nums = [1, 3, 5, 4, 7, 9, 8, 11, 13, 12, 15, 17, 16, 19, 21, 20, 23, 25, 24, 27, 29, 28, 31, 33, 32, 35, 37, 36, 39, 41, 40, 43, 45, 44, 47, 49, 48, 51, 53, 52, 55, 57, 56, 59, 61, 60]) == 31\n assert candidate(nums = [1, 3, 5, 2, 8, 6, 10, 4, 12, 7, 14, 9, 16, 11, 18, 13, 20, 15, 22, 17, 24, 19, 26, 21, 28, 23, 30]) == 15\n assert candidate(nums = [1, 9, 2, 8, 3, 7, 4, 6, 5, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 16\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 22, 19, 23, 24]) == 7\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]) == 1\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 4, 6, 8, 10, 12, 14, 16, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 10\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 2\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 1\n assert candidate(nums = [5, 7, 4, 6, 2, 8, 3, 9, 1, 10]) == 5\n assert candidate(nums = [1, 3, 5, 4, 7]) == 4\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(nums = [1, 5, 3, 4, 7, 2, 6, 8, 9, 10, 11, 12, 13]) == 10\n assert candidate(nums = [1, 100, 2, 99, 3, 98, 4, 97, 5, 96, 6, 95, 7, 94, 8, 93, 9, 92, 10, 91]) == 11\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 50\n assert candidate(nums = [10, 22, 9, 33, 21, 50, 41, 60, 80, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 9\n assert candidate(nums = [5, 2, 8, 6, 3, 6, 9, 7]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51]) == 26\n assert candidate(nums = [1, 5, 3, 4, 6, 7, 2, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 18\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 10\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == 1\n", "comparison": "exact"}, "public_tests": ["[10,9,2,5,3,7,101,18]", "[0,1,0,3,2,3]", "[7,7,7,7,7,7,7]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().lengthOfLIS", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:44:59+00:00", "tests_total": 134, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-search", "dynamic-programming", "longest-increasing-subsequence"]}, "language": "ruby", "interface": {"raw_signature": "def length_of_lis(nums)", "container": null, "callable": "length_of_lis", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 306, "task_id": "additive-number", "difficulty": "Medium", "problem_description": "An additive number is a string whose digits can form an additive sequence.\n\nA valid additive sequence should contain at least three numbers. Except for the first two numbers, each subsequent number in the sequence must be the sum of the preceding two.\n\nGiven a string containing only digits, return true if it is an additive number or false otherwise.\n\nNote: Numbers in the additive sequence cannot have leading zeros, so sequence 1, 2, 03 or 1, 02, 3 is invalid.\n\nExample 1:\n\nInput: \"112358\"\nOutput: true\nExplanation:\nThe digits can form an additive sequence: 1, 1, 2, 3, 5, 8.\n1 + 1 = 2, 1 + 2 = 3, 2 + 3 = 5, 3 + 5 = 8\n\nExample 2:\n\nInput: \"199100199\"\nOutput: true\nExplanation:\nThe additive sequence is: 1, 99, 100, 199.\n1 + 99 = 100, 99 + 100 = 199\n\nConstraints:\n\n- 1 <= num.length <= 35\n- num consists only of digits.\n\nFollow up: How would you handle overflow for very large input integers?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = \"1203\") == False\n assert candidate(num = \"000\") == True\n assert candidate(num = \"112358\") == True\n assert candidate(num = \"101\") == True\n assert candidate(num = \"1023\") == False\n assert candidate(num = \"111\") == False\n assert candidate(num = \"123456789101112131415\") == False\n assert candidate(num = \"199100199\") == True\n assert candidate(num = \"199100199100199\") == False\n assert candidate(num = \"1112233558814327211122335588143272\") == False\n assert candidate(num = \"300330033006601299619912909229\") == False\n assert candidate(num = \"555555555555555555555555555555555\") == False\n assert candidate(num = \"19900199\") == False\n assert candidate(num = \"30003\") == False\n assert candidate(num = \"19910019900\") == False\n assert candidate(num = \"899221133233445566778899876555\") == False\n assert candidate(num = \"129911121325478121325478121325478\") == False\n assert candidate(num = \"0000000\") == True\n assert candidate(num = \"10101\") == False\n assert candidate(num = \"305185365910589560661212\") == False\n assert candidate(num = \"11112233558814323355881432335588\") == False\n assert candidate(num = \"1112233558814321345588\") == False\n assert candidate(num = \"92347625436528391098765432187654321\") == False\n assert candidate(num = \"1001002003005008001300\") == True\n assert candidate(num = \"1234567891011121314151617181920\") == False\n assert candidate(num = \"11122335588143\") == False\n assert candidate(num = \"211758234058327419099998\") == False\n assert candidate(num = \"10100101102103205308513\") == False\n assert candidate(num = \"111223355881433\") == False\n assert candidate(num = \"10101010101010101010101010101010\") == False\n assert candidate(num = \"10010020030050080013002100340055089\") == False\n assert candidate(num = \"112233445566778899\") == False\n assert candidate(num = \"111122335588143\") == True\n assert candidate(num = \"1010203050813213455881433\") == False\n assert candidate(num = \"1010101010\") == False\n assert candidate(num = \"3175823340583274190999988\") == False\n assert candidate(num = \"0000\") == True\n", "comparison": "exact"}, "public_tests": ["\"112358\"", "\"199100199\""], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().isAdditiveNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:06+00:00", "tests_total": 93, "tests_dropped": 56, "flags": [], "topic_tags": ["string", "backtracking"]}, "language": "ruby", "interface": {"raw_signature": "def is_additive_number(num)", "container": null, "callable": "is_additive_number", "parameters": [{"name": "num", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 309, "task_id": "best-time-to-buy-and-sell-stock-with-cooldown", "difficulty": "Medium", "problem_description": "You are given an array prices where prices[i] is the price of a given stock on the i^th day.\n\nFind the maximum profit you can achieve. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times) with the following restrictions:\n\n- After you sell your stock, you cannot buy stock on the next day (i.e., cooldown one day).\n\nNote: You may not engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).\n\nExample 1:\n\nInput: prices = [1,2,3,0,2]\nOutput: 3\nExplanation: transactions = [buy, sell, cooldown, buy, sell]\n\nExample 2:\n\nInput: prices = [1]\nOutput: 0\n\nConstraints:\n\n- 1 <= prices.length <= 5000\n- 0 <= prices[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(prices = [1, 2, 4]) == 3\n assert candidate(prices = [1, 2, 3, 0, 2, 3, 1, 4, 2, 5]) == 7\n assert candidate(prices = [2, 1, 4, 5, 2, 9, 7]) == 10\n assert candidate(prices = [1]) == 0\n assert candidate(prices = [3, 2, 6, 5, 0, 3]) == 7\n assert candidate(prices = [3, 2, 1]) == 0\n assert candidate(prices = [8, 9, 7, 9, 10, 1, 2, 3, 4, 1, 5]) == 8\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 8, 3, 8, 2, 6]) == 10\n assert candidate(prices = [1, 3, 2, 8, 4, 9]) == 8\n assert candidate(prices = [6, 1, 3, 2, 4, 7]) == 6\n assert candidate(prices = [7, 1, 5, 3, 6, 4]) == 5\n assert candidate(prices = [5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [1, 2, 3, 4, 5]) == 4\n assert candidate(prices = [1, 2, 3, 0, 2]) == 3\n assert candidate(prices = [1, 3, 7, 5, 10, 3]) == 9\n assert candidate(prices = [8, 9, 2, 8, 4, 9]) == 7\n assert candidate(prices = [5, 2, 3, 4, 1, 6, 7, 8, 9, 1]) == 9\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 1, 4, 5, 4, 7, 8, 9, 3, 2, 1, 0, 12, 14, 16, 18, 20, 19, 18, 17, 16, 15, 14]) == 33\n assert candidate(prices = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 12\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 0, 0, 3, 1, 4, 0, 2, 1, 2, 0, 1, 3]) == 11\n assert candidate(prices = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 12\n assert candidate(prices = [1, 2, 3, 0, 2, 3, 4, 5, 0, 6, 7, 8, 0, 9]) == 21\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 9, 2, 5, 8]) == 12\n assert candidate(prices = [100, 50, 200, 10, 150, 80, 120, 20, 180, 100, 140, 50, 250, 200, 300, 150, 350, 300, 400, 250, 450, 400, 500, 350, 550, 500, 600, 450, 650]) == 1310\n assert candidate(prices = [1, 5, 3, 8, 12, 6, 2, 9, 15, 10, 13, 7, 16, 11]) == 33\n assert candidate(prices = [5, 1, 1, 2, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(prices = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == 8\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 19\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 19\n assert candidate(prices = [10, 1, 1, 6, 9, 10, 7, 12, 6, 7, 5, 18, 9]) == 26\n assert candidate(prices = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 27\n assert candidate(prices = [10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1]) == 45\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(prices = [1, 2, 3, 8, 7, 6, 5, 4, 3, 2, 1, 9]) == 15\n assert candidate(prices = [1, 2, 3, 0, 2, 5, 0, 6, 1, 8]) == 13\n assert candidate(prices = [10, 20, 10, 10, 10, 20, 30, 10, 40, 50, 10, 60, 70, 10, 80, 90, 10]) == 180\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 7, 8, 9, 10, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(prices = [1, 4, 2, 7, 4, 8, 1, 10, 12, 20, 2]) == 25\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11]) == 10\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 6\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 3\n assert candidate(prices = [1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 5\n assert candidate(prices = [1, 5, 1, 3, 1, 7, 1, 9, 1, 11, 1, 13, 1, 15, 1, 17, 1, 19, 1, 21]) == 60\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 2, 8]) == 11\n assert candidate(prices = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 2\n assert candidate(prices = [10, 5, 20, 1, 15, 8, 12, 2, 18, 10, 14, 5, 25, 20, 30, 15, 35, 30, 40, 25, 45, 40, 50, 35, 55, 50, 60, 45, 65]) == 131\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 1, 2, 3, 4, 1, 2]) == 6\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 14\n assert candidate(prices = [1, 2, 3, 0, 2, 3, 4, 5, 0, 6]) == 11\n assert candidate(prices = [6, 1, 3, 2, 4, 7]) == 6\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 8, 2, 10, 3, 5]) == 13\n assert candidate(prices = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == 15\n assert candidate(prices = [1, 2, 3, 0, 3, 2, 3, 0, 4, 2, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0]) == 13\n assert candidate(prices = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 16\n assert candidate(prices = [1, 2, 5, 0, 1, 8, 0, 3, 4, 0, 5, 2, 3, 8, 9, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 36\n assert candidate(prices = [1, 4, 2, 7, 2, 8, 3, 9, 1, 10, 1, 11, 1, 12, 1, 13]) == 34\n assert candidate(prices = [1, 5, 2, 3, 7, 1, 4, 2, 8, 3, 5]) == 14\n assert candidate(prices = [1, 2, 5, 0, 2, 1, 2, 0, 2, 1, 0, 2, 3, 4, 5, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 21\n assert candidate(prices = [5, 2, 5, 4, 6, 9, 1, 3, 2, 8, 1, 7, 6, 3, 8, 9, 10, 5]) == 20\n assert candidate(prices = [1, 2, 3, 4, 5, 0, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 0, 6, 7, 8, 9]) == 24\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 5, 2]) == 5\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]) == 9\n assert candidate(prices = [3, 1, 4, 8, 7, 2, 5, 10, 9, 6, 11]) == 20\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 1, 5, 3, 6, 4, 1, 5, 3, 6, 4, 1, 5, 3, 6, 4]) == 20\n assert candidate(prices = [1, 4, 2, 10, 7, 5, 15, 13, 9, 11]) == 21\n assert candidate(prices = [10, 20, 10, 5, 2, 3, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 58\n assert candidate(prices = [10, 14, 14, 14, 13, 10, 9, 8, 7, 6, 5, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 19\n assert candidate(prices = [100, 90, 80, 50, 25, 20, 10, 5, 3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [1, 2, 3, 0, 2, 1, 3, 4, 1, 5, 0, 6, 3]) == 11\n assert candidate(prices = [8, 6, 4, 6, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 4\n assert candidate(prices = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 4\n assert candidate(prices = [2, 3, 5, 0, 1, 8, 0, 3, 4, 0, 5, 2, 3, 8, 9, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7]) == 30\n assert candidate(prices = [1, 2, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 11\n assert candidate(prices = [1, 2, 3, 0, 2, 5, 0, 4, 6, 0, 3, 8, 0, 10]) == 20\n assert candidate(prices = [1, 4, 2, 7, 2, 4, 1, 6, 1, 5, 2, 7, 2, 4, 1, 6, 1, 5, 2, 7, 2, 4, 1, 6, 1, 5, 2, 7, 2, 4, 1]) == 36\n assert candidate(prices = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 0\n assert candidate(prices = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 12\n assert candidate(prices = [5, 2, 5, 0, 1, 8, 0, 3, 4, 0, 5, 2, 3, 8, 9, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 32\n assert candidate(prices = [7, 6, 4, 3, 1]) == 0\n assert candidate(prices = [8, 6, 4, 6, 8, 7, 3, 5, 1, 9]) == 12\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 9\n assert candidate(prices = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]) == 11\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == 12\n assert candidate(prices = [1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 5]) == 14\n assert candidate(prices = [6, 1, 3, 2, 8, 0, 4, 2, 5, 10, 1, 3]) == 15\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(prices = [3, 3, 5, 0, 0, 3, 1, 4]) == 6\n assert candidate(prices = [2, 1, 4, 5, 2, 9, 7, 10, 3, 12, 8, 15]) == 22\n assert candidate(prices = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 5\n assert candidate(prices = [7, 1, 5, 3, 6, 4, 3, 7, 8, 2, 5, 10, 4]) == 17\n assert candidate(prices = [1, 2, 3, 8, 4, 9, 0, 5, 6, 7, 8, 9, 10, 11, 12]) == 19\n assert candidate(prices = [10, 1, 2, 8, 4, 9, 5, 6, 3, 10]) == 15\n assert candidate(prices = [10, 5, 0, 2, 1, 7, 5, 3, 2, 8]) == 13\n assert candidate(prices = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 5\n assert candidate(prices = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 0\n assert candidate(prices = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 18\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 8, 1, 2, 4, 5]) == 15\n assert candidate(prices = [3, 2, 6, 5, 0, 3, 4, 7, 8, 0, 5, 2, 3, 8, 9, 1, 2, 3, 4, 5]) == 25\n assert candidate(prices = [1, 2, 3, 0, 2, 5, 6, 1, 2, 3, 4, 5, 6]) == 11\n assert candidate(prices = [10, 1, 1, 6, 9, 1, 6, 1, 4, 7]) == 14\n assert candidate(prices = [10, 1, 1, 6, 9, 10, 3, 1, 3, 9, 5, 5, 5, 4, 5, 5, 6, 6, 6, 8]) == 21\n assert candidate(prices = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(prices = [1, 2, 3, 0, 2, 1, 2, 0, 2, 1, 0, 2, 3, 4, 5, 0, 0, 1, 2, 3, 4]) == 14\n assert candidate(prices = [8, 6, 4, 3, 3, 2, 3, 5, 7, 8, 5, 3, 5, 7, 8]) == 11\n", "comparison": "exact"}, "public_tests": ["[1,2,3,0,2]", "[1]"], "hints": [], "metadata": {"canonical_parameter_names": ["prices"], "leetcode_dataset_entry_point": "Solution().maxProfit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:10+00:00", "tests_total": 108, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_profit(prices)", "container": null, "callable": "max_profit", "parameters": [{"name": "prices", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 310, "task_id": "minimum-height-trees", "difficulty": "Medium", "problem_description": "A tree is an undirected graph in which any two vertices are connected by exactly one path. In other words, any connected graph without simple cycles is a tree.\n\nGiven a tree of n nodes labelled from 0 to n - 1, and an array of n - 1 edges where edges[i] = [a_i, b_i] indicates that there is an undirected edge between the two nodes a_i and b_i in the tree, you can choose any node of the tree as the root. When you select a node x as the root, the result tree has height h. Among all possible rooted trees, those with minimum height (i.e. min(h)) are called minimum height trees (MHTs).\n\nReturn a list of all MHTs' root labels. You can return the answer in any order.\n\nThe height of a rooted tree is the number of edges on the longest downward path between the root and a leaf.\n\nExample 1:\n\nInput: n = 4, edges = [[1,0],[1,2],[1,3]]\nOutput: [1]\nExplanation: As shown, the height of the tree is 1 when the root is the node with label 1 which is the only MHT.\n\nExample 2:\n\nInput: n = 6, edges = [[3,0],[3,1],[3,2],[3,4],[5,4]]\nOutput: [3,4]\n\nConstraints:\n\n- 1 <= n <= 2 * 10^4\n- edges.length == n - 1\n- 0 <= a_i, b_i < n\n- a_i != b_i\n- All the pairs (a_i, b_i) are distinct.\n- The given input is guaranteed to be a tree and there will be no repeated edges.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(n=2, edges=[[0, 1]]), [0, 1])\n assert answers_match(candidate(n=10, edges=[[0, 3], [1, 3], [2, 3], [4, 3], [5, 4], [5, 6], [5, 7], [8, 5], [8, 9]]), [4, 5])\n assert answers_match(candidate(n=6, edges=[[3, 0], [3, 1], [3, 2], [3, 4], [5, 4]]), [3, 4])\n assert answers_match(candidate(n=5, edges=[[0, 1], [1, 2], [0, 3], [3, 4]]), [0])\n assert answers_match(candidate(n=10, edges=[[0, 3], [1, 3], [2, 3], [4, 3], [5, 4], [5, 6], [5, 7], [8, 5], [9, 5]]), [4])\n assert answers_match(candidate(n=1, edges=[]), [0])\n assert answers_match(candidate(n=7, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [3, 5], [4, 6]]), [1, 2])\n assert answers_match(candidate(n=4, edges=[[1, 0], [1, 2], [1, 3]]), [1])\n assert answers_match(candidate(n=9, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [3, 7], [3, 8]]), [0])\n assert answers_match(candidate(n=12, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [4, 9], [5, 10], [5, 11]]), [1, 2])\n assert answers_match(candidate(n=10, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [3, 7], [4, 8], [5, 9]]), [0, 1])\n assert answers_match(candidate(n=10, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 8], [8, 9]]), [1])\n assert answers_match(candidate(n=12, edges=[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]), [5, 6])\n assert answers_match(candidate(n=10, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [3, 7], [3, 8], [3, 9]]), [0])\n assert answers_match(candidate(n=9, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 8]]), [0, 1])\n assert answers_match(candidate(n=9, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [5, 7], [5, 8]]), [0, 2])\n assert answers_match(candidate(n=13, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9], [4, 10], [5, 11], [6, 12]]), [0])\n assert answers_match(candidate(n=12, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11]]), [1])\n assert answers_match(candidate(n=15, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9], [4, 10], [5, 11], [6, 12], [7, 13], [8, 14]]), [0])\n assert answers_match(candidate(n=18, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [4, 9], [5, 10], [5, 11], [6, 12], [6, 13], [7, 14], [7, 15], [10, 16], [10, 17]]), [1, 2])\n assert answers_match(candidate(n=8, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [5, 7]]), [0, 2])\n assert answers_match(candidate(n=12, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [6, 8], [6, 9], [7, 10], [7, 11]]), [1, 3])\n assert answers_match(candidate(n=20, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [1, 6], [2, 7], [2, 8], [2, 9], [3, 10], [3, 11], [3, 12], [4, 13], [4, 14], [5, 15], [5, 16], [6, 17], [6, 18], [7, 19]]), [0])\n assert answers_match(candidate(n=15, edges=[[0, 1], [1, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]), [1, 2])\n assert answers_match(candidate(n=12, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11]]), [1])\n assert answers_match(candidate(n=18, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [4, 9], [5, 10], [5, 11], [6, 12], [6, 13], [7, 14], [7, 15], [9, 16], [10, 17]]), [1, 2])\n assert answers_match(candidate(n=11, edges=[[0, 1], [0, 2], [0, 3], [0, 4], [1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10]]), [0])\n assert answers_match(candidate(n=10, edges=[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]), [4, 5])\n assert answers_match(candidate(n=12, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9], [3, 10], [4, 11]]), [0, 1])\n assert answers_match(candidate(n=14, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13]]), [0])\n assert answers_match(candidate(n=11, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [6, 8], [6, 9], [9, 10]]), [3])\n assert answers_match(candidate(n=8, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [3, 7]]), [0])\n assert answers_match(candidate(n=13, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12]]), [0])\n assert answers_match(candidate(n=15, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]), [1])\n assert answers_match(candidate(n=11, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9], [4, 10]]), [0, 1])\n assert answers_match(candidate(n=12, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11]]), [0])\n assert answers_match(candidate(n=18, edges=[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17]]), [8, 9])\n assert answers_match(candidate(n=8, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7]]), [0, 1])\n assert answers_match(candidate(n=11, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10]]), [0, 1])\n assert answers_match(candidate(n=18, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14], [7, 15], [8, 16], [9, 17]]), [0, 1])\n assert answers_match(candidate(n=9, edges=[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]), [4])\n assert answers_match(candidate(n=13, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9], [3, 10], [4, 11], [5, 12]]), [0, 1])\n assert answers_match(candidate(n=15, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14]]), [0])\n assert answers_match(candidate(n=11, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]), [1, 2])\n assert answers_match(candidate(n=25, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [1, 6], [2, 7], [2, 8], [2, 9], [3, 10], [3, 11], [3, 12], [4, 13], [4, 14], [5, 15], [5, 16], [6, 17], [6, 18], [6, 19], [7, 20], [7, 21], [8, 22], [9, 23], [9, 24]]), [0])\n assert answers_match(candidate(n=16, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14], [7, 15]]), [0, 1])\n assert answers_match(candidate(n=20, edges=[[0, 1], [0, 2], [0, 3], [0, 4], [1, 5], [1, 6], [1, 7], [1, 8], [2, 9], [2, 10], [2, 11], [2, 12], [3, 13], [3, 14], [3, 15], [3, 16], [4, 17], [4, 18], [4, 19]]), [0])\n assert answers_match(candidate(n=15, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]), [0])\n assert answers_match(candidate(n=10, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 8], [5, 9]]), [0])\n assert answers_match(candidate(n=20, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [1, 6], [2, 7], [2, 8], [3, 9], [3, 10], [3, 11], [4, 12], [4, 13], [5, 14], [5, 15], [6, 16], [6, 17], [7, 18], [8, 19]]), [0])\n assert answers_match(candidate(n=10, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [4, 8], [4, 9]]), [0, 1])\n assert answers_match(candidate(n=20, edges=[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19]]), [9, 10])\n assert answers_match(candidate(n=20, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14], [7, 15], [7, 16], [8, 17], [8, 18], [9, 19]]), [0, 1])\n assert answers_match(candidate(n=9, edges=[[0, 1], [1, 2], [2, 3], [2, 4], [4, 5], [4, 6], [6, 7], [6, 8]]), [2, 4])\n assert answers_match(candidate(n=9, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8]]), [0])\n assert answers_match(candidate(n=25, edges=[[0, 1], [0, 2], [1, 3], [1, 4], [2, 5], [2, 6], [3, 7], [3, 8], [4, 9], [4, 10], [5, 11], [5, 12], [6, 13], [6, 14], [7, 15], [7, 16], [8, 17], [8, 18], [9, 19], [9, 20], [10, 21], [10, 22], [11, 23], [11, 24]]), [0])\n assert answers_match(candidate(n=15, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9], [3, 10], [4, 11], [5, 12], [7, 13], [7, 14]]), [0])\n assert answers_match(candidate(n=10, edges=[[0, 1], [0, 2], [0, 3], [1, 4], [1, 5], [2, 6], [2, 7], [3, 8], [3, 9]]), [0])\n assert answers_match(candidate(n=11, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [5, 9], [6, 10]]), [1])\n assert answers_match(candidate(n=15, edges=[[0, 1], [1, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12], [11, 13], [12, 14]]), [1, 2])\n assert answers_match(candidate(n=14, edges=[[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13]]), [6, 7])\n", "comparison": "unordered"}, "public_tests": ["4\n[[1,0],[1,2],[1,3]]", "6\n[[3,0],[3,1],[3,2],[3,4],[5,4]]"], "hints": ["How many MHTs can a graph have at most?"], "metadata": {"canonical_parameter_names": ["n", "edges"], "leetcode_dataset_entry_point": "Solution().findMinHeightTrees", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:12+00:00", "tests_total": 65, "tests_dropped": 4, "flags": ["any_order", "has_images"], "topic_tags": ["depth-first-search", "breadth-first-search", "graph", "topological-sort"]}, "language": "ruby", "interface": {"raw_signature": "def find_min_height_trees(n, edges)", "container": null, "callable": "find_min_height_trees", "parameters": [{"name": "n", "type": "Integer"}, {"name": "edges", "type": "Integer[][]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 312, "task_id": "burst-balloons", "difficulty": "Hard", "problem_description": "You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it represented by an array nums. You are asked to burst all the balloons.\n\nIf you burst the i^th balloon, you will get nums[i - 1] * nums[i] * nums[i + 1] coins. If i - 1 or i + 1 goes out of bounds of the array, then treat it as if there is a balloon with a 1 painted on it.\n\nReturn the maximum coins you can collect by bursting the balloons wisely.\n\nExample 1:\n\nInput: nums = [3,1,5,8]\nOutput: 167\nExplanation:\nnums = [3,1,5,8] --> [3,5,8] --> [3,8] --> [8] --> []\ncoins = 3*1*5 + 3*5*8 + 1*3*8 + 1*8*1 = 167\n\nExample 2:\n\nInput: nums = [1,5]\nOutput: 10\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 300\n- 0 <= nums[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 4, 3, 2, 1]) == 110\n assert candidate(nums = [1, 5]) == 10\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [7, 9, 8, 0, 7, 1, 3, 5, 5, 2, 3]) == 1654\n assert candidate(nums = [7, 9, 8, 0, 7, 1, 3, 5, 5, 7, 4, 5, 5, 5, 4]) == 2886\n assert candidate(nums = [3, 1, 5, 8]) == 167\n assert candidate(nums = [0, 0, 0]) == 0\n assert candidate(nums = [9, 76, 66, 18, 49, 79, 11, 31, 2, 83, 45, 12, 50, 88, 67, 34, 73, 39, 100, 87, 30, 6, 41, 72, 84, 17, 29, 63, 52, 75, 58, 92, 37, 35, 61, 43, 89, 64, 55, 19, 32, 62, 57, 90, 91, 33, 44, 27, 3, 76, 65, 68, 42, 8, 54, 60, 10, 80, 70, 12, 3, 5, 82, 46, 30, 81, 13, 26, 93, 14, 20, 78, 86, 25, 56, 1, 36, 59, 74, 15, 95, 16, 4, 7, 22, 69, 51, 38, 85, 23, 40, 94, 48, 6, 97, 24, 53, 9, 96, 21, 47, 77, 99, 31, 28, 45, 32]) == 35112384\n assert candidate(nums = [10, 10, 10, 10]) == 2110\n assert candidate(nums = [100]) == 100\n assert candidate(nums = [9, 76, 64, 21, 97, 60]) == 1086136\n assert candidate(nums = [8, 3, 8, 3, 8]) == 968\n assert candidate(nums = [0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5]) == 110\n assert candidate(nums = [7, 9, 8, 0, 7, 1, 3, 5, 5, 7, 3]) == 2107\n assert candidate(nums = [35, 16, 83, 87, 52, 15, 24, 91, 36, 80, 59, 27, 9, 81, 33, 17, 5, 74, 40, 85, 23, 47, 89, 69]) == 6802248\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]) == 5700600\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 10120\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2420\n assert candidate(nums = [5, 8, 6, 2, 3, 7, 4, 1, 9]) == 1704\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == 32339900\n assert candidate(nums = [100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 99]) == 474000\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, 4, 9, 0, 3, 0, 1]) == 23783\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 2427280\n assert candidate(nums = [8, 1, 9, 2, 10, 3, 11, 4, 12, 5, 13, 6, 14, 7, 15]) == 15717\n assert candidate(nums = [1, 3, 1, 5, 1, 7, 1, 9, 1, 11]) == 1510\n assert candidate(nums = [50, 40, 30, 20, 10, 5, 2, 1, 2, 5, 10, 20, 30, 40, 50]) == 309374\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 14636200\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 243660\n assert candidate(nums = [3, 2, 1, 4, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]) == 43888\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 4830\n assert candidate(nums = [1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100, 1, 100]) == 13150200\n assert candidate(nums = [5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1]) == 2010\n assert candidate(nums = [9, 75, 1, 99, 2, 98, 3, 97, 4, 96, 5]) == 2737551\n assert candidate(nums = [100, 1, 100, 1, 100, 1, 100, 1, 100]) == 3050100\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 13680\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80]) == 15284100\n assert candidate(nums = [99, 1, 98, 2, 97, 3, 96, 4, 95, 5]) == 2906611\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 741\n assert candidate(nums = [50, 20, 30, 10, 40, 60, 70, 80, 90, 10]) == 1428550\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 30\n assert candidate(nums = [50, 25, 75, 40, 60, 10, 80, 30, 90]) == 1779840\n assert candidate(nums = [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]) == 72420\n assert candidate(nums = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10]) == 2100\n assert candidate(nums = [50, 25, 75, 20, 80, 15, 85, 10, 90, 5, 95, 40, 60, 35, 65, 30, 70, 45, 55, 2]) == 4854150\n assert candidate(nums = [82, 9, 60, 27, 69, 64, 53, 80, 74, 97, 22, 5, 35, 46, 91, 16, 51, 86, 58, 3, 53, 29, 37, 24, 36, 72, 39, 68, 55, 76, 59, 79, 85, 43, 87, 66, 89, 25, 47, 20, 90, 83, 33, 38, 92, 48, 57, 93, 95, 70, 56, 88, 45, 26, 75, 98, 65, 4, 42, 77, 18, 23, 31, 19, 94, 49, 32, 21, 100, 30, 17, 28, 40, 11, 63, 67, 7, 62, 13, 73, 12, 14, 78, 2, 54, 71, 15, 6, 41, 81, 52, 96, 34, 44, 99, 84, 50, 8, 39]) == 35359128\n assert candidate(nums = [2, 3, 2, 4, 2, 3, 2]) == 120\n assert candidate(nums = [1, 3, 1, 5, 1, 3]) == 90\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 2401100\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2420\n assert candidate(nums = [9, 7, 6, 5, 4, 3, 2, 1]) == 1026\n assert candidate(nums = [10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 940\n assert candidate(nums = [9, 7, 5, 3, 1]) == 495\n assert candidate(nums = [30, 20, 10, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 88180\n assert candidate(nums = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 243660\n assert candidate(nums = [99, 1, 100, 1, 99, 1, 100]) == 2019700\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 2401100\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5820\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 13680\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2420\n assert candidate(nums = [100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50]) == 13005100\n assert candidate(nums = [23, 11, 77, 32, 45, 62, 88, 12, 56, 78, 91, 29, 48, 50, 65, 73, 82, 90, 18, 27]) == 5732245\n assert candidate(nums = [50, 24, 31, 29, 96, 9, 18, 45, 32, 27, 95, 38, 57, 47, 52, 56, 83, 40, 87, 91, 30, 72, 4, 36, 66, 6, 1, 49, 59, 27, 9, 81, 33, 17, 5, 74, 40, 85, 23, 47, 89, 69, 35, 16, 83, 87, 52, 15, 24, 91, 36, 80, 59, 27, 9, 81, 33, 17, 5, 74]) == 17249443\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 15220\n assert candidate(nums = [2, 3, 7, 5, 4, 1, 9, 6, 8, 2]) == 1723\n assert candidate(nums = [1, 3, 1, 5, 1, 7, 1, 9, 1]) == 617\n assert candidate(nums = [30, 20, 10, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 49060\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 45640\n assert candidate(nums = [20, 30, 40, 50, 60, 70, 80, 90, 100]) == 2382100\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 2670380\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5820\n assert candidate(nums = [1, 10, 1, 10, 1, 10, 1, 10, 1, 10]) == 3520\n assert candidate(nums = [50, 20, 50, 20, 50, 20, 50, 20, 50, 20, 50, 20, 50, 20, 50, 20, 50, 20, 50, 20, 50, 20]) == 1676050\n assert candidate(nums = [2, 5, 1, 3, 4, 6, 8, 7, 10, 9, 12, 11, 14, 13, 15]) == 13653\n assert candidate(nums = [50, 24, 30, 98, 99, 5, 91, 41, 72, 7, 42, 62, 95, 69, 32, 24, 38, 80, 44, 79, 9, 26, 6, 47, 93, 64, 39, 87, 63, 77, 85, 48, 52, 82, 35, 73, 12, 23, 59, 3, 78, 54, 75, 94, 19, 13, 71, 68, 28, 31, 5, 46, 89, 37, 90, 8, 60, 25, 97, 10, 30, 67, 49, 81, 20, 76, 61, 34, 14, 88, 17, 22, 4, 51, 15, 70, 18, 43, 40, 96, 36, 65, 83, 29, 57, 56, 21, 53, 92, 27, 33, 84, 45, 86, 16, 58, 74]) == 33856230\n assert candidate(nums = [9, 7, 5, 8, 6, 4, 2, 1, 3, 10]) == 2474\n assert candidate(nums = [100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0, 100, 0]) == 8010100\n assert candidate(nums = [5, 3, 8, 6, 2, 9, 1, 4, 7, 10, 11, 13, 12, 15, 14]) == 13102\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 9530\n assert candidate(nums = [5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1]) == 1260\n assert candidate(nums = [23, 45, 67, 89, 12, 34, 56, 78, 90, 11, 33, 55, 77, 22, 44, 66, 88, 10, 30, 50]) == 5055964\n assert candidate(nums = [30, 20, 40, 50, 10]) == 99330\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 2401100\n assert candidate(nums = [10, 1, 100, 5, 10]) == 16110\n assert candidate(nums = [30, 20, 10, 5, 1, 2, 3, 4, 5, 10, 20, 30]) == 37940\n assert candidate(nums = [9, 7, 3, 4, 6, 1, 2, 8, 5]) == 1614\n assert candidate(nums = [10, 1, 9, 2, 8, 3, 7, 4, 6, 5]) == 2630\n assert candidate(nums = [9, 7, 3, 1, 8, 6, 5, 4, 2]) == 1677\n", "comparison": "exact"}, "public_tests": ["[3,1,5,8]", "[1,5]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxCoins", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:17+00:00", "tests_total": 96, "tests_dropped": 6, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_coins(nums)", "container": null, "callable": "max_coins", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 313, "task_id": "super-ugly-number", "difficulty": "Medium", "problem_description": "A super ugly number is a positive integer whose prime factors are in the array primes.\n\nGiven an integer n and an array of integers primes, return the n^th super ugly number.\n\nThe n^th super ugly number is guaranteed to fit in a 32-bit signed integer.\n\nExample 1:\n\nInput: n = 12, primes = [2,7,13,19]\nOutput: 32\nExplanation: [1,2,4,7,8,13,14,16,19,26,28,32] is the sequence of the first 12 super ugly numbers given primes = [2,7,13,19].\n\nExample 2:\n\nInput: n = 1, primes = [2,3,5]\nOutput: 1\nExplanation: 1 has no prime factors, therefore all of its prime factors are in the array primes = [2,3,5].\n\nConstraints:\n\n- 1 <= n <= 10^5\n- 1 <= primes.length <= 100\n- 2 <= primes[i] <= 1000\n- primes[i] is guaranteed to be a prime number.\n- All the values of primes are unique and sorted in ascending order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 5,primes = [2, 7, 11]) == 8\n assert candidate(n = 5,primes = [2, 11, 13, 17, 19]) == 11\n assert candidate(n = 3,primes = [2, 3, 5, 7]) == 3\n assert candidate(n = 15,primes = [3, 5, 7]) == 81\n assert candidate(n = 10,primes = [2, 3, 5]) == 12\n assert candidate(n = 20,primes = [2, 11, 13, 17, 19]) == 88\n assert candidate(n = 2,primes = [2, 7]) == 2\n assert candidate(n = 12,primes = [2, 7, 13, 19]) == 32\n assert candidate(n = 1,primes = [2, 3, 5]) == 1\n assert candidate(n = 100,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 136\n assert candidate(n = 20,primes = [3, 5, 7, 11, 13]) == 75\n assert candidate(n = 25,primes = [2, 7, 13, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109]) == 56\n assert candidate(n = 200,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23]) == 384\n assert candidate(n = 150,primes = [2, 11, 13, 17, 19]) == 8704\n assert candidate(n = 750,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67]) == 1365\n assert candidate(n = 500,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397]) == 519\n assert candidate(n = 30,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 30\n assert candidate(n = 50,primes = [2, 5, 11, 13, 17]) == 272\n assert candidate(n = 10,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 10\n assert candidate(n = 500,primes = [2, 5, 7, 11, 13, 17, 19, 23, 29, 31]) == 3773\n assert candidate(n = 100,primes = [2, 3, 5, 7, 11]) == 280\n assert candidate(n = 200,primes = [2, 5, 7, 11, 13, 17, 19]) == 1444\n assert candidate(n = 2,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409]) == 2\n assert candidate(n = 50,primes = [2, 5, 7, 11, 13, 17, 19, 23, 29, 31]) == 104\n assert candidate(n = 250,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41]) == 399\n assert candidate(n = 500,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 700\n assert candidate(n = 5000,primes = [2, 3, 5, 7, 11]) == 14975037\n assert candidate(n = 5000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113]) == 12780\n assert candidate(n = 300,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 637\n assert candidate(n = 100000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 141797760\n assert candidate(n = 300,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61]) == 424\n assert candidate(n = 30,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 30\n assert candidate(n = 75,primes = [2, 11, 13, 17, 19, 23, 29, 31, 37, 41]) == 418\n assert candidate(n = 5000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313]) == 8170\n assert candidate(n = 300,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]) == 578\n assert candidate(n = 50,primes = [29, 31, 37, 41, 43, 47]) == 48749\n assert candidate(n = 120,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 144\n assert candidate(n = 100,primes = [11, 13, 17, 19, 23]) == 83521\n assert candidate(n = 300,primes = [3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 3483\n assert candidate(n = 500,primes = [2, 3, 5, 7, 11]) == 8960\n assert candidate(n = 30000,primes = [2, 5, 11, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 3950350\n assert candidate(n = 250,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113]) == 285\n assert candidate(n = 1000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23]) == 5474\n assert candidate(n = 300,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]) == 540\n assert candidate(n = 100000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499]) == 294980\n assert candidate(n = 100,primes = [2, 3, 5, 7]) == 450\n assert candidate(n = 1000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]) == 3751\n assert candidate(n = 60,primes = [2, 7, 13, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]) == 224\n assert candidate(n = 150,primes = [3, 5, 7, 11, 13, 17, 19]) == 1683\n assert candidate(n = 50,primes = [3, 5, 7, 13, 19, 23]) == 351\n assert candidate(n = 200,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 230\n assert candidate(n = 50,primes = [11, 13, 17, 19, 23]) == 6859\n assert candidate(n = 20000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113]) == 94794\n assert candidate(n = 15000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]) == 40560\n assert candidate(n = 50000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113]) == 383826\n assert candidate(n = 100,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 100\n assert candidate(n = 250,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313]) == 250\n assert candidate(n = 500,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]) == 850\n assert candidate(n = 1000,primes = [2, 5, 7, 11, 13, 17, 19]) == 48400\n assert candidate(n = 200,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 351\n assert candidate(n = 10000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 42718\n assert candidate(n = 125,primes = [2, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]) == 442\n assert candidate(n = 150,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]) == 182\n assert candidate(n = 40,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79]) == 40\n assert candidate(n = 1000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 4437\n assert candidate(n = 80,primes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 253\n assert candidate(n = 75,primes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 231\n assert candidate(n = 10000,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 42718\n assert candidate(n = 100,primes = [2, 3, 5, 7, 11, 13, 17, 19]) == 156\n assert candidate(n = 80,primes = [2, 5, 7, 11, 13, 17, 19, 23, 29, 31]) == 200\n assert candidate(n = 500,primes = [2, 5, 11, 13, 17, 19, 23, 29, 31, 37]) == 6256\n assert candidate(n = 100,primes = [2, 3, 5, 7]) == 450\n assert candidate(n = 40,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211]) == 40\n assert candidate(n = 150,primes = [2, 3, 5, 7]) == 1152\n assert candidate(n = 75,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 95\n assert candidate(n = 250,primes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103]) == 817\n assert candidate(n = 75,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]) == 76\n assert candidate(n = 150,primes = [2, 5, 7, 11, 13, 17, 19]) == 845\n assert candidate(n = 1000,primes = [2, 3, 5]) == 51200000\n assert candidate(n = 500,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 928\n assert candidate(n = 75,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == 75\n assert candidate(n = 50000,primes = [3, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79]) == 17610759\n assert candidate(n = 7500,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499]) == 11616\n assert candidate(n = 25,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23]) == 25\n assert candidate(n = 300,primes = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]) == 2457\n assert candidate(n = 75,primes = [5, 11, 13, 17, 19, 23, 29, 31, 37]) == 1375\n assert candidate(n = 75,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 82\n assert candidate(n = 20000,primes = [7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139]) == 2610239\n assert candidate(n = 750,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]) == 1323\n assert candidate(n = 15,primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 15\n assert candidate(n = 50,primes = [3, 7, 11, 13, 17, 19]) == 507\n assert candidate(n = 200,primes = [2, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79]) == 697\n assert candidate(n = 50,primes = [2, 5, 7, 11, 13, 17, 19, 23, 29]) == 112\n assert candidate(n = 50,primes = [3, 7, 11, 13, 17]) == 833\n", "comparison": "exact"}, "public_tests": ["12\n[2,7,13,19]", "1\n[2,3,5]"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "primes"], "leetcode_dataset_entry_point": "Solution().nthSuperUglyNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:19+00:00", "tests_total": 95, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "math", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def nth_super_ugly_number(n, primes)", "container": null, "callable": "nth_super_ugly_number", "parameters": [{"name": "n", "type": "Integer"}, {"name": "primes", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 315, "task_id": "count-of-smaller-numbers-after-self", "difficulty": "Hard", "problem_description": "Given an integer array nums, return an integer array counts where counts[i] is the number of smaller elements to the right of nums[i].\n\nExample 1:\n\nInput: nums = [5,2,6,1]\nOutput: [2,1,1,0]\nExplanation:\nTo the right of 5 there are 2 smaller elements (2 and 1).\nTo the right of 2 there is only 1 smaller element (1).\nTo the right of 6 there is 1 smaller element (1).\nTo the right of 1 there is 0 smaller element.\n\nExample 2:\n\nInput: nums = [-1]\nOutput: [0]\n\nExample 3:\n\nInput: nums = [-1,-1]\nOutput: [0,0]\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -10^4 <= nums[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-1, -1]) == [0, 0]\n assert candidate(nums = [10000, -10000, 5000, 0, 5000]) == [4, 0, 1, 0, 0]\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 10]) == [0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 1, 0, 1, 0, 1]) == [0, 2, 0, 1, 0, 0]\n assert candidate(nums = [0, -1, 1, -2, 2]) == [2, 1, 1, 0, 0]\n assert candidate(nums = [100, 200, 150, 100]) == [0, 2, 1, 0]\n assert candidate(nums = [100, 99, 98, 97, 96]) == [4, 3, 2, 1, 0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4]) == [6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [10000, -10000, 5000, 0, -5000]) == [4, 0, 2, 1, 0]\n assert candidate(nums = [-1]) == [0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1]) == [0]\n assert candidate(nums = [100, 99, 98, 97, 96, 95]) == [5, 4, 3, 2, 1, 0]\n assert candidate(nums = [5, 2, 6, 1, 8, 7, 4, 9]) == [3, 1, 2, 0, 2, 1, 0, 0]\n assert candidate(nums = [-5, -4, -3, -2, -1]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [0, 1, 2, 3, 4]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [5, 2, 6, 1]) == [2, 1, 1, 0]\n assert candidate(nums = [1, 1, 1, 1, 1]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [3, 2, 1, 0]) == [3, 2, 1, 0]\n assert candidate(nums = [5, 2, 5, 2, 3]) == [3, 0, 2, 0, 0]\n assert candidate(nums = [0, 2, 1, 5, 3, 4]) == [0, 1, 0, 2, 0, 0]\n assert candidate(nums = [3, 2, 1]) == [2, 1, 0]\n assert candidate(nums = [2, 2, 2, 2]) == [0, 0, 0, 0]\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10]) == [0, 1, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 4, 3, 2, 1]) == [4, 3, 2, 1, 0]\n assert candidate(nums = [0, 1, 2, 3]) == [0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3]) == [0, 0, 0]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9, 0, 2, 4, 6, 8]) == [1, 2, 3, 4, 5, 0, 0, 0, 0, 0]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]) == [1, 2, 3, 4, 5, 1, 1, 1, 1, 0]\n assert candidate(nums = [3, 2, 1, 0, -1, -2, -3]) == [6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 0]) == [7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [3, 2, 2, 6, 1]) == [3, 1, 1, 1, 0]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [10000, -10000, 5000, -5000, 0]) == [4, 0, 2, 0, 0]\n assert candidate(nums = [7, 8, 9, 1, 2, 3, 4, 5, 6]) == [6, 6, 6, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 3, 8, 6, 2, 7, 4, 1]) == [4, 2, 5, 3, 1, 2, 1, 0]\n assert candidate(nums = [-5, -4, -3, -2, -1, 0]) == [0, 0, 0, 0, 0, 0]\n assert candidate(nums = [3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2]) == [10, 8, 8, 6, 6, 4, 4, 2, 2, 0, 0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == [0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 2, 6, 1, 4, 3, 8, 7]) == [4, 1, 3, 0, 1, 0, 1, 0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [3, 2, 1, 4, 5, 0]) == [3, 2, 1, 1, 1, 0]\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1]) == [6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [8, 3, 6, 2, 5, 1, 7, 4]) == [7, 2, 4, 1, 2, 0, 1, 0]\n assert candidate(nums = [1, 3, 2, 3, 3, 2, 1]) == [0, 3, 1, 2, 2, 1, 0]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == [0, 4, 8, 0, 3, 6, 0, 2, 4, 0, 1, 2, 0, 0, 0]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [2, 0, 1]) == [2, 0, 0]\n assert candidate(nums = [3, 6, 4, 1, 8, 0, 5, 2, 9, 7]) == [3, 5, 3, 1, 4, 0, 1, 0, 1, 0]\n assert candidate(nums = [10000, -10000, 5000, 0, -5000, 10000, -10000]) == [5, 0, 3, 2, 1, 1, 0]\n assert candidate(nums = [0, -1, 1, -2, 2, -3, 3, -4, 4, -5, 5]) == [5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0]\n assert candidate(nums = [5, 2, 5, 1, 3, 3, 3, 2, 2, 1, 1]) == [9, 3, 8, 0, 4, 4, 4, 2, 2, 0, 0]\n assert candidate(nums = [0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [3, 4, 2, 1, 5]) == [2, 2, 1, 0, 0]\n assert candidate(nums = [0, 2, 1, 2, 1, 0, 1, 0, 2, 1, 0]) == [0, 7, 3, 6, 3, 0, 2, 0, 2, 1, 0]\n assert candidate(nums = [3, 2, 3, 1, 2, 4, 5]) == [3, 1, 2, 0, 0, 0, 0]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) == [0, 1, 2, 3, 4, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3]) == [0, 2, 4, 0, 1, 2, 0, 0, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 2, 6, 1, 9, 3, 8, 4]) == [4, 1, 3, 0, 3, 0, 1, 0]\n assert candidate(nums = [5, 2, 6, 1, 3, 7, 4, 8, 0, 9]) == [5, 2, 4, 1, 1, 2, 1, 1, 0, 0]\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [7, 3, 5, 4, 6, 9, 2, 10, 1]) == [6, 2, 3, 2, 2, 2, 1, 1, 0]\n assert candidate(nums = [0, 0, 0, 0, 0]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 0, -1, -2, -3, 10, 20, 30]) == [4, 4, 4, 3, 2, 1, 0, 0, 0, 0]\n assert candidate(nums = [2000, 1900, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3]) == [0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [10000, -10000, 5000, 0, -5000, 2000, -2000, 7500, -7500, 10000]) == [8, 0, 5, 3, 1, 2, 1, 1, 0, 0]\n assert candidate(nums = [5, 2, 6, 1, 9, 3, 7, 0, 8, 4]) == [5, 2, 4, 1, 5, 1, 2, 0, 1, 0]\n assert candidate(nums = [10, 20, 10, 20, 10, 20, 10]) == [0, 3, 0, 2, 0, 1, 0]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [7, 9, 1, 4, 3, 8, 2, 5, 6]) == [6, 7, 0, 2, 1, 3, 0, 0, 0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 3, 2, 3, 3, 2, 2]) == [0, 3, 0, 2, 2, 0, 0]\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [10000, 9999, 9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989, 9988, 9987, 9986, 9985, 9984, 9983, 9982, 9981]) == [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [5, 2, 6, 1, 4, 3]) == [4, 1, 3, 0, 1, 0]\n assert candidate(nums = [2, 0, 1, 3, 0, 2, 0, 1]) == [5, 0, 2, 4, 0, 2, 0, 0]\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [10000, -10000, 5000, -5000, 0, 2000, -2000, 7000, -7000, 1000]) == [9, 0, 6, 1, 2, 3, 1, 2, 0, 0]\n assert candidate(nums = [1, 3, 2, 2, 3, 1, 0, 4, 5, 2, 2, 1, 3, 4]) == [1, 7, 3, 3, 5, 1, 0, 4, 5, 1, 1, 0, 0, 0]\n assert candidate(nums = [10, 20, 30, 40, 50, 15, 25, 35, 45, 55]) == [0, 1, 2, 3, 4, 0, 0, 0, 0, 0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [0, -1, -2, -3, -4, -5]) == [5, 4, 3, 2, 1, 0]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [15, 10, 5, 0, -5, -10, -15, 20, 25, 30, 35, 40, 45]) == [6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [10000, -10000, 5000, -5000, 0]) == [4, 0, 2, 0, 0]\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12]) == [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0]\n assert candidate(nums = [10000, -10000, 5000, -5000, 0, 1, -1]) == [6, 0, 4, 0, 1, 1, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == [5, 0, 4, 0, 3, 0, 2, 0, 1, 0]\n assert candidate(nums = [10000, -10000, 5000, -5000, 7500, -7500, 2500, -2500, 0]) == [8, 0, 5, 1, 4, 0, 2, 0, 0]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [1, 3, 2, 5, 4, 8, 7, 10, 6, 9]) == [0, 1, 0, 1, 0, 2, 1, 2, 0, 0]\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 2, 6, 1, 8, 9, 3, 4, 10, 7, 11, 12, 13, 14, 15]) == [4, 1, 3, 0, 3, 3, 0, 0, 1, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 10000, -10000, 5000, -5000, 2500, -2500, 1250, -1250, 625, -625]) == [5, 9, 0, 7, 0, 5, 0, 3, 0, 1, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5]) == [0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == [8, 7, 6, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [10, 20, 30, 40, 50, 0]) == [1, 1, 1, 1, 1, 0]\n assert candidate(nums = [3, 2, 1, 4, 5]) == [2, 1, 0, 0, 0]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 5, 5, 5, 5]) == [0, 0, 0, 0, 0]\n assert candidate(nums = [5, 2, 6, 1, 8, 0, 7, 9]) == [3, 2, 2, 1, 2, 0, 0, 0]\n assert candidate(nums = [2, 0, 1, 3, 4, 0, 1, 2]) == [4, 0, 1, 3, 3, 0, 0, 0]\n assert candidate(nums = [-1, 2, 0, 1, -1, 2, 0, 1, -1, 2, 0, 1, -1, 2, 0, 1, -1, 2, 0, 1]) == [0, 14, 4, 8, 0, 11, 3, 6, 0, 8, 2, 4, 0, 5, 1, 2, 0, 2, 0, 0]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 10000, -10000, 5000, -5000, 0, 0, 0, 0, 0]) == [2, 8, 0, 6, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == [0, 9, 0, 8, 0, 7, 0, 6, 0, 5, 0, 4, 0, 3, 0, 2, 0, 1, 0, 0]\n assert candidate(nums = [10, 20, 30, 25, 15, 5, 40, 35, 20, 10, 50, 45, 30, 25, 15, 5]) == [2, 5, 8, 6, 3, 0, 7, 6, 3, 1, 5, 4, 3, 2, 1, 0]\n assert candidate(nums = [1, 3, 2, 3, 3, 2, 1]) == [0, 3, 1, 2, 2, 1, 0]\n assert candidate(nums = [5, 2, 6, 1, 8, 9, 3, 4]) == [4, 1, 3, 0, 2, 2, 0, 0]\n", "comparison": "exact"}, "public_tests": ["[5,2,6,1]", "[-1]", "[-1,-1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().countSmaller", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:24+00:00", "tests_total": 135, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search", "divide-and-conquer", "binary-indexed-tree", "segment-tree", "merge-sort", "ordered-set", "treap"]}, "language": "ruby", "interface": {"raw_signature": "def count_smaller(nums)", "container": null, "callable": "count_smaller", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 316, "task_id": "remove-duplicate-letters", "difficulty": "Medium", "problem_description": "Given a string s, remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all possible results.\n\nExample 1:\n\nInput: s = \"bcabc\"\nOutput: \"abc\"\n\nExample 2:\n\nInput: s = \"cbacdcbc\"\nOutput: \"acdb\"\n\nConstraints:\n\n- 1 <= s.length <= 10^4\n- s consists of lowercase English letters.\n\nNote: This question is the same as 1081: https://leetcode.com/problems/smallest-subsequence-of-distinct-characters/\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"rumeblidofervobenly\") == \"rumbidfevonly\"\n assert candidate(s = \"thesqtitxyetpxooxlqskyae\") == \"heitpoxlqskya\"\n assert candidate(s = \"thesqquishs\") == \"tequihs\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"russell\") == \"rusel\"\n assert candidate(s = \"cbacdcbc\") == \"acdb\"\n assert candidate(s = \"zyxzyzzyxzy\") == \"xyz\"\n assert candidate(s = \"xyz\") == \"xyz\"\n assert candidate(s = \"leetcode\") == \"letcod\"\n assert candidate(s = \"abacbabcabacbacbacbabcaba\") == \"abc\"\n assert candidate(s = \"zyxzyxzyxzyxzyx\") == \"xyz\"\n assert candidate(s = \"banana\") == \"ban\"\n assert candidate(s = \"zyxzyxzyx\") == \"xyz\"\n assert candidate(s = \"abcd\") == \"abcd\"\n assert candidate(s = \"bcabc\") == \"abc\"\n assert candidate(s = \"bbaaccaabb\") == \"acb\"\n assert candidate(s = \"ecbacba\") == \"eacb\"\n assert candidate(s = \"aabbcc\") == \"abc\"\n assert candidate(s = \"abacb\") == \"abc\"\n assert candidate(s = \"sphnsdczdcphqvh\") == \"hnsczdpqv\"\n assert candidate(s = \"xyzzyx\") == \"xyz\"\n assert candidate(s = \"eliminate\") == \"elimnat\"\n assert candidate(s = \"bcaacbcbabcbabcbbbcabcabcb\") == \"abc\"\n assert candidate(s = \"cccbba\") == \"cba\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == \"zyxwvutsrqponmlkjihgfedcba\"\n assert candidate(s = \"ababcabcabc\") == \"abc\"\n assert candidate(s = \"vvvvvvvvvvvvvvvvvvvvvvvvvv\") == \"v\"\n assert candidate(s = \"xyzzyxwvutsrqponmlkjihgfedcbazyxzyxwvutsrqponmlkjihgfedcba\") == \"axzywvutsrqponmlkjihgfedcb\"\n assert candidate(s = \"eleven\") == \"elvn\"\n assert candidate(s = \"abcabcabcabc\") == \"abc\"\n assert candidate(s = \"mississsipissippi\") == \"mips\"\n assert candidate(s = \"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk\") == \"k\"\n assert candidate(s = \"thisisaverycomplicatedstringwithmultiplesamecharacters\") == \"averycodingwhmulpst\"\n assert candidate(s = \"abcdabcdabcd\") == \"abcd\"\n assert candidate(s = \"vkgdffubqyfvcl\") == \"kgdfubqyvcl\"\n assert candidate(s = \"zyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxyzyxy\") == \"xyz\"\n assert candidate(s = \"thisisareallylongstringwithsomerepeatedcharacters\") == \"aelyginwhompdcrts\"\n assert candidate(s = \"aaaaabbbbccccdddd\") == \"abcd\"\n assert candidate(s = \"abcdabc\") == \"abcd\"\n assert candidate(s = \"abcdefghxyzzyxwvutsrqponmlkjihgfedcba\") == \"abcdefghxyzwvutsrqponmlkji\"\n assert candidate(s = \"abcdcbadef\") == \"abcdef\"\n assert candidate(s = \"elqodmxonqkdio\") == \"eldmxnqkio\"\n assert candidate(s = \"rclcar\") == \"clar\"\n assert candidate(s = \"aaabbbccc\") == \"abc\"\n assert candidate(s = \"abcdefghifghijklmnopqrstuvwxyz\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"zabaxyzc\") == \"abxyzc\"\n assert candidate(s = \"zyxzyxzyxzyxcba\") == \"xyzcba\"\n assert candidate(s = \"abababababababab\") == \"ab\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"dedededededededed\") == \"de\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnmzxcvbnmlkjhgfdsapoiuytrewq\") == \"abmzxcvnlkjhgfdspoiuytrewq\"\n assert candidate(s = \"abcdabcdabcdabcd\") == \"abcd\"\n assert candidate(s = \"limits\") == \"limts\"\n assert candidate(s = \"abcdzyxwvutsrqponmlkjihgfedcba\") == \"abcdzyxwvutsrqponmlkjihgfe\"\n assert candidate(s = \"zyzzyzxzyzy\") == \"xyz\"\n assert candidate(s = \"aabbbccddeeefffggghhhiiijjjkkkllmmmnnnooopppqqrrssttuuvvwwxxyyzz\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"zzyyxxwwvvttsrqqponnmlkkjjiihggffeeddccbbaa\") == \"zyxwvtsrqponmlkjihgfedcba\"\n assert candidate(s = \"rsvwzxcvbnmasdfghjklpoiuytrewq\") == \"rsvwzxcbnmadfghjklpoiuyteq\"\n assert candidate(s = \"abacabadabacaba\") == \"abcd\"\n assert candidate(s = \"rquyaedetziwq\") == \"rquyadetziw\"\n assert candidate(s = \"dabdc\") == \"abdc\"\n assert candidate(s = \"pppippiiqipqqipiqipiiiiii\") == \"ipq\"\n assert candidate(s = \"abacbabc\") == \"abc\"\n assert candidate(s = \"abcdexyzabcdexyz\") == \"abcdexyz\"\n assert candidate(s = \"abcdexyzvwxycba\") == \"abcdexyzvw\"\n assert candidate(s = \"eccbbbbdec\") == \"bdec\"\n assert candidate(s = \"axbxa\") == \"abx\"\n assert candidate(s = \"rhythm\") == \"rhytm\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"cbacdcbcxd\") == \"abcxd\"\n assert candidate(s = \"pppqqqrrrssstttuuuvvvwwwxxxxyyyyzzzz\") == \"pqrstuvwxyz\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"z\"\n assert candidate(s = \"elgoog\") == \"elgo\"\n assert candidate(s = \"abcdacdabcde\") == \"abcde\"\n assert candidate(s = \"cdadabcc\") == \"adbc\"\n assert candidate(s = \"abcdxyzzyxwvutsrqponmlkjihgfedcba\") == \"abcdxyzwvutsrqponmlkjihgfe\"\n assert candidate(s = \"nincompoop\") == \"incmop\"\n assert candidate(s = \"zzzzyyyxxxwwvvuuttssrrqqppoonnmmllkkiijjhhhgggffffeeeedddccccbbbaaa\") == \"zyxwvutsrqponmlkijhgfedcba\"\n assert candidate(s = \"leetcodeloveleetcode\") == \"cdelovt\"\n assert candidate(s = \"abcdefghijabcdejk\") == \"abcdefghijk\"\n assert candidate(s = \"abcdedcba\") == \"abcde\"\n assert candidate(s = \"aabbbccc\") == \"abc\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnmzyxcvbnmlkjhgfdsapoiuytrewq\") == \"abmzxcvnlkjhgfdspoiuytrewq\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm\") == \"abmqwertyuiopsdfghjklzxcvn\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzyxwvutsrqponmlkjihgfedcba\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"poiuytrewqlkjhgfdsazxcvbnmqwertyuioplkjhgfdsazxcvbnm\") == \"abmqwertyuioplkjhgfdszxcvn\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnmnbvcxzlkjhgfdsapoiuytrewq\") == \"abmnvcxzlkjhgfdspoiuytrewq\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"abacabadabcabc\") == \"abcd\"\n assert candidate(s = \"abacbdcba\") == \"abcd\"\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == \"a\"\n assert candidate(s = \"mississippi\") == \"misp\"\n assert candidate(s = \"abcdexyzzyxwvtsrqponmlkjihgfe\") == \"abcdexyzwvtsrqponmlkjihgf\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == \"azyxwvutsrqponmlkjihgfedcb\"\n assert candidate(s = \"aaaaaaaabbbbbbbbccccccccddddddddeeeeeeeefffffffff\") == \"abcdef\"\n assert candidate(s = \"ababababababababababababababababababab\") == \"ab\"\n assert candidate(s = \"zyxzyxzyxzyx\") == \"xyz\"\n assert candidate(s = \"razonator\") == \"azntor\"\n", "comparison": "exact"}, "public_tests": ["\"bcabc\"", "\"cbacdcbc\""], "hints": ["Greedily try to add one missing character. How to check if adding some character will not cause problems ? Use bit-masks to check whether you will be able to complete the sub-sequence if you add the character at some index i."], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().removeDuplicateLetters", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:26+00:00", "tests_total": 99, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "stack", "greedy", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def remove_duplicate_letters(s)", "container": null, "callable": "remove_duplicate_letters", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 318, "task_id": "maximum-product-of-word-lengths", "difficulty": "Medium", "problem_description": "Given a string array words, return the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. If no such two words exist, return 0.\n\nExample 1:\n\nInput: words = [\"abcw\",\"baz\",\"foo\",\"bar\",\"xtfn\",\"abcdef\"]\nOutput: 16\nExplanation: The two words can be \"abcw\", \"xtfn\".\n\nExample 2:\n\nInput: words = [\"a\",\"ab\",\"abc\",\"d\",\"cd\",\"bcd\",\"abcd\"]\nOutput: 4\nExplanation: The two words can be \"ab\", \"cd\".\n\nExample 3:\n\nInput: words = [\"a\",\"aa\",\"aaa\",\"aaaa\"]\nOutput: 0\nExplanation: No such pair of words.\n\nConstraints:\n\n- 2 <= words.length <= 1000\n- 1 <= words[i].length <= 1000\n- words[i] consists only of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['a', 'ab', 'abc', 'd', 'cd', 'bcd', 'abcd']) == 4\n assert candidate(words = ['eae', 'eaecbaaa', 'aadcba', 'bae', 'abc', 'abcbb', 'cba', 'abcd', 'ac', 'ba', 'aaaa', 'd', 'abac', 'ababc', 'abcabc', 'a', 'bc', 'b']) == 8\n assert candidate(words = ['abcw', 'baz', 'foo', 'bar', 'xtfn', 'abcdef']) == 16\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa']) == 0\n assert candidate(words = ['aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'aa']) == 0\n assert candidate(words = ['hello', 'world', 'python', 'programming']) == 0\n assert candidate(words = ['abc', 'def', 'ghi']) == 9\n assert candidate(words = ['arml', 'vb', 've', 'vef', 'k']) == 12\n assert candidate(words = ['eae', 'eaee', 'aaee', 'aee', 'eceeaeeea', 'cecceeaeea', 'eceeaeea']) == 0\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl', 'abcdefghijklnmopqrstuvwxyz']) == 0\n assert candidate(words = ['unique', 'strings', 'without', 'common', 'characters', 'different', 'letters']) == 42\n assert candidate(words = ['unique', 'letters', 'pair', 'matches', 'product', 'maximum', 'distinct', 'words', 'solution', 'algorithm']) == 49\n assert candidate(words = ['xylophone', 'guitar', 'violin', 'flute', 'drum', 'piano', 'harp', 'cymbal', 'trumpet', 'trombone', 'saxophone', 'clarinet', 'oboe', 'bassoon', 'tuba']) == 54\n assert candidate(words = ['aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'bbaacceegghhkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'ccaabbeegghhkkllmmnnooppqqrrssttuuvvwwxxyyzz']) == 0\n assert candidate(words = ['abcdefghij', 'klmnopqrstu', 'vwxyzabcde', 'fghijklmno', 'pqrstuvwx', 'yzabcdefg', 'hijklmnop', 'qrstuvwxy', 'zabcdefghij', 'klmnopqrstu', 'vwxyzabcde', 'fghijklmno', 'pqrstuvwx', 'yzabcdefg', 'hijklmnop', 'qrstuvwxy']) == 121\n assert candidate(words = ['qwerty', 'asdfgh', 'zxcvbn', 'polkij', 'mnbvcx', 'lkjhgf', 'ertyui', 'opasdf', 'ghjklz', 'xcvbnm']) == 36\n assert candidate(words = ['abcdefghij', 'klmnopqrstu', 'vwxyzabcde', 'fghijklmno', 'pqrstuvwx', 'yzabcdefg', 'hijklmnop', 'qrstuvwxy', 'zabcdefghij', 'klmnopqrstu']) == 121\n assert candidate(words = ['aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'mnopqrstuvwxyz', 'abcdef', 'ghijkl', 'qrstuv', 'wxyzab', 'cdefgh', 'ijklmn', 'opqrst', 'vwxyza', 'bcdefg', 'hijklm', 'nopqr', 'stuvw', 'xyza', 'bcdef', 'ghijk', 'lmnop', 'qrstu', 'vwxyz', 'abcdefg', 'hijklmn', 'opqrstu', 'vwxyzab', 'cdefghij', 'klmnopqr', 'stuvwxyz', 'abcdefghij', 'klmnopqrstu', 'vwxyzabcde', 'fghijklmnop', 'qrstuvwxy', 'zabcdefghi', 'jklmnopqrs', 'tuvwxyzabc', 'defghijklmno', 'pqrstuvwxyzabc', 'efghijklmnopqr', 'stuvwxyzabcd', 'tuvwxyzabcde', 'uvwxyzabcdefg', 'vwxyzabcdefgh', 'wxyzabcdefghi', 'xyzabcdefghij', 'yzabcdefghijk', 'zabcdefghijkl', 'abcdefghijkln']) == 168\n assert candidate(words = ['abcdefg', 'hijklmnop', 'qrstuv', 'wxyz', 'mnopqr', 'ghijkl', 'uvwxy', 'stuv', 'zabcde', 'fghij']) == 63\n assert candidate(words = ['qwertyuiop', 'asdfghjklzxcvbnm', 'qwerty', 'asdfgh', 'zxcvbn', 'mnbvcxz', 'lkjhgfdsa', 'poiuytrewq', 'bnmxcvz', 'poiuyt', 'lkjhgf', 'mnbvcx', 'lkjhgfdsazxcvbnm', 'qwertyuiopasdfghjklzxcvbnm']) == 160\n assert candidate(words = ['aabbccddeeff', 'ghhiiijjkkll', 'mmnnooppqqrr', 'ssttuuvvwwxx', 'yyzzzzz', 'abcdefg', 'hijklmnop', 'qrstuvwxyz', 'mnopqr', 'efghij', 'vwxyz', 'yzab', 'qrstuv', 'wxyzab', 'mnopqrstu', 'vwxyzabcd', 'efghijklm', 'nopqrstu', 'vwxyzab', 'cdefghij', 'klmnopqrstu', 'vwxyzabcd', 'efghijklmnopqr', 'stuvwxyzabcd']) == 168\n assert candidate(words = ['pqrs', 'tuvw', 'xyz', 'mnop', 'qrst', 'ijkl', 'efgh', 'abcd', 'nopqr', 'stuvw', 'xyzab', 'mnopqr', 'stuvwx', 'yzabcd', 'efghij', 'klmno', 'pqrstu', 'vwxyz', 'abcdefghij', 'klmnopqr', 'stuvwxyz', 'abcdefghijk', 'lmnopqrstu', 'vwxyzabcd', 'efghijklmnop', 'qrstu', 'vwxyzab', 'cdefghij', 'klmnopqrstu', 'vwxyzabcd', 'efghijklmnopqr', 'stuvwxyzabcd', 'mnopqrstu', 'vwxyzab', 'cdefghij', 'klmnopqrstu', 'vwxyzabcd', 'efghijklmnopqr', 'stuvwxyzabcd']) == 168\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'abcdefghij', 'klmnopqrst', 'tuvwxyz', 'abcdefghijklmno', 'pqrstuvwxyzabc']) == 105\n assert candidate(words = ['abcdefg', 'hijklmn', 'opqrstu', 'vwxyzab', 'cdefghi', 'jklmnop', 'qrstuvw', 'xyzabcd', 'efghijk', 'lmnopqr', 'stuvwxz', 'bcdefgh', 'ijklmno', 'pqrstuv', 'wxyzabc', 'defghij', 'klmnopq', 'rstuvwx', 'stuvwxy', 'tuwvxyz', 'uvwxyza', 'vwxyzb', 'wxyza', 'xyzab', 'yzabc', 'zabcd']) == 49\n assert candidate(words = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzabcdef', 'ghijklmo', 'nopqrstu', 'vwxyzabc', 'defghijk', 'lmnopqrs', 'tuvwxyz', 'abcdefghij', 'klmnopqr', 'stuvwxyzab', 'cdefghijkl', 'mnopqrstuv', 'wxyza', 'bcdefghijkl', 'mnopqrstuvw', 'xyzabcde', 'fghijklmno', 'pqrstuvwx', 'yzabcdefg', 'hijklmnopq', 'rstuvwxyz']) == 121\n assert candidate(words = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzabcd', 'efghij', 'klmnopqr', 'stuvwxyz', 'abcdijkl', 'mnopqrst', 'uvwxyzae', 'fghij', 'klmnop', 'qrstuv', 'yzab', 'efghi', 'klmno', 'pqrstuv', 'wxyz', 'abcd', 'efgh', 'ijkl', 'mnop', 'qrst', 'uvwx', 'yz', 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz']) == 64\n assert candidate(words = ['unique', 'letters', 'only', 'here', 'now', 'words', 'without', 'overlap', 'shared', 'characters', 'strings', 'distinct']) == 56\n assert candidate(words = ['aaaaabbbbbcccccdddddeeeeeffffffggggghhhhhhiiiiijjjjjjkkkkklllllmmmmmnnnnnooooo', 'pppppqqqqqrrrrrssssstttttuuuuuvvvvvwwwwwxxxxxyyyyyzzzzz', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb']) == 9898\n assert candidate(words = ['abcdefghijk', 'lmnopqrstuv', 'wxyzabcde', 'fghijklmn', 'opqrstuvw', 'xyzabcde', 'fghijklmn', 'opqrstuvw', 'xyzabcde', 'fghijklmn']) == 121\n assert candidate(words = ['unique', 'words', 'only', 'here', 'for', 'testing', 'purposes', 'please', 'do', 'not', 'reuse']) == 30\n assert candidate(words = ['abcdxyz', 'mnopqrs', 'tuvw', 'efghijkl', 'lmno', 'abxyz', 'mnop', 'tuwv', 'ijkl', 'efgh', 'lmn', 'abxyz', 'mnop', 'tuwv', 'ijkl', 'efgh', 'lmn', 'abxyz', 'mnop', 'tuwv']) == 56\n assert candidate(words = ['verylongwordindeed', 'anotherlongword', 'short', 'tiny', 'mediumsized', 'averylongword', 'tinywords', 'verysmall']) == 0\n assert candidate(words = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzab', 'cdefgh', 'ijklmn', 'opqrst', 'vwxyza', 'bcdefg', 'hijklmno', 'pqrstuvw', 'xyzabc', 'defghi', 'jklmnpqr', 'stuvwxyl', 'yzabcd', 'efghij', 'klmnopqr', 'stuvwxy', 'zabcde', 'fghijkln', 'opqrstuv', 'wxyza']) == 64\n assert candidate(words = ['unique', 'letters', 'only', 'here', 'these', 'words', 'have', 'no', 'commonality']) == 44\n assert candidate(words = ['abcde', 'fghij', 'klmno', 'pqrst', 'uvwxy', 'z', 'abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'y']) == 25\n assert candidate(words = ['zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', 'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc']) == 4356\n assert candidate(words = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'qazwsxedcrfvtgbyhnujmiklop', 'mnbvcxzlkjhgfdsapoiuytrewq', 'asdfghjklzxcvbnm', 'qwertyuiopasdfghjklzxcvbnm', 'asdfghjklqwertyuiopzxcvbnm']) == 160\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'qwertyuiop', 'asdfghjkl', 'zxcvbnm']) == 90\n assert candidate(words = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'qazwsxedc', 'rfvtgbyhn', 'ujmikolp', 'mnbvcxz', 'lkjhgfdsa', 'poiuytrewq', 'opmijnuhb', 'lyfgcrdxv', 'etahbdvsq']) == 90\n assert candidate(words = ['unique', 'words', 'only', 'here', 'not', 'sharing', 'any', 'letters', 'with', 'each', 'other', 'set', 'of', 'letters', 'are', 'different']) == 30\n assert candidate(words = ['abcdef', 'ghijkl', 'mnopqr', 'stuvwx', 'yzabcd', 'efghij', 'klmnop', 'qrstuv', 'wxyzab', 'cdefgh']) == 36\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'bcdefghijklmnopqrstuvwxyza', 'cdefghijklmnopqrstuvwxyzab']) == 0\n assert candidate(words = ['optimization', 'algorithms', 'coding', 'problems', 'data', 'structures', 'interview', 'preparation', 'practice']) == 32\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty']) == 36\n assert candidate(words = ['abcd', 'efgh', 'ijkl', 'mnop', 'qrst', 'uvwx', 'yzab', 'cdef', 'ghij', 'klmn', 'opqr', 'stuv', 'wxyz', 'mnopqr', 'stuvwx', 'yzabcd', 'efghij', 'klmno']) == 36\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'abcdefghij', 'klmnopqrstuvw', 'xyz', 'uvw', 'mnopqr', 'ghijkl']) == 130\n assert candidate(words = ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen', 'twenty', 'twentyone', 'twentytwo', 'twentythree', 'twentyfour', 'twentyfive', 'twentysix', 'twentyseven', 'twentyeight', 'twentynine', 'thirty']) == 44\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuv', 'abcdefghijk', 'qrstuvwxzy', 'abcdefgh', 'ijklmnop', 'qrstuvw', 'xyz', 'abcdefghij']) == 110\n assert candidate(words = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzabcdef', 'ghijklmo', 'nopqrstu', 'vwxyzabc', 'defghijk', 'lmnopqrs', 'tuvwxyz', 'abcdefghij', 'klmnopqr', 'stuvwxyzab', 'cdefghijkl', 'mnopqrstuv', 'wxyza', 'bcdefghijkl', 'mnopqrstuvw', 'xyzabcde', 'fghijklmno', 'pqrstuvwx', 'yzabcdefg', 'hijklmnopq', 'rstuvwxyz', 'abcde', 'fghij', 'klmno', 'pqrst', 'uvwxy', 'zabcd', 'efghi', 'jklmn', 'opqrs', 'tuvwx', 'yzabc', 'defgh', 'ijklm', 'nopqr', 'stuvw', 'xyzab', 'cdefg', 'hijkl', 'mnopq', 'rstuv', 'wxyza', 'bcdef', 'ghijk', 'lmnop', 'qrstu', 'vwxyz', 'abcde', 'fghij', 'klmno', 'pqrst', 'uvwxy', 'zabcd']) == 121\n assert candidate(words = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzabcd', 'efghij', 'klmnopqr', 'stuvwxyz', 'abcdijkl', 'mnopqrst', 'uvwxyzae']) == 64\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg', 'hh', 'ii', 'jj', 'kk', 'll', 'mm', 'nn', 'oo', 'pp', 'qq', 'rr', 'ss', 'tt', 'uu', 'vv', 'ww', 'xx', 'yy', 'zz']) == 4\n assert candidate(words = ['aaaaaa', 'bbbbbb', 'cccccc', 'dddddd', 'eeeeee', 'ffffff', 'gggggg', 'hhhhhh', 'iiiiii', 'jjjjjj']) == 36\n assert candidate(words = ['this', 'is', 'a', 'test', 'of', 'the', 'maximum', 'product', 'function', 'with', 'various', 'lengths', 'and', 'characters']) == 49\n assert candidate(words = ['abcdefghij', 'klmnopqrstu', 'vwxyzabcde', 'fghijklmno', 'pqrstuvwxyzabc', 'defghijklmnopq', 'rstuvwxyzabcd', 'efghijklmnopqr', 'stuvwxyzabcde', 'tuvwxyzabcdef', 'uvwxyzabcdefg', 'vwxyzabcdefgh', 'wxyzabcdefghi', 'xyzabcdefghij', 'yzabcdefghijk', 'zabcdefghijkl', 'abcdefghijkln']) == 143\n assert candidate(words = ['abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzabcdef', 'ghijklmn', 'opqrstuv', 'wxyzabcd', 'efghijkl', 'mnopqrst', 'qrstuvwx']) == 64\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'abcdefghijklmnopqrstuvwxyz']) == 1\n assert candidate(words = ['aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'zyxwvutsrqponmlkjihgfedcba', 'abcdefghijklmnopqrstuv', 'ghijklmnopqrstuvwxyz', 'mnopqrstuvwxyza', 'bcdefghijklmnopqrstuvwxyza']) == 0\n assert candidate(words = ['short', 'longerwords', 'tiny', 'largerwordsindeed', 'micro', 'nano', 'pico', 'femto', 'atto', 'zepto', 'yocto']) == 0\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']) == 1\n assert candidate(words = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'mnbvcxz', 'lkjhgfdsa', 'poiuytrewq', 'asdfghjklpoiuytrewq', 'zxcvbnmlkjhgfdsapoiuytrewq']) == 133\n assert candidate(words = ['aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl', 'abcdefghijqrstuvwxzy', 'uniquestringswithoutcommoncharacters', 'differentletters', 'optimizationalgorithms', 'codingproblems', 'datastructures', 'interviewpreparation', 'practice', 'abcdefgh', 'ijklmnop', 'qrstuvwx', 'yzabcd', 'efghij', 'klmnopqr', 'stuvwxyz', 'abcdijkl', 'mnopqrst', 'uvwxyzae']) == 112\n assert candidate(words = ['abcdexyz', 'mnopqrtuvw', 'ijklstuvwx', 'ghfxyz', 'abcdef', 'ghijklmn', 'opqrstuv', 'wxyz', 'abcd', 'efgh', 'ijkl', 'mnop', 'qrst', 'uvwx', 'yzab', 'mnop', 'qrst', 'uvwx', 'yzab']) == 80\n assert candidate(words = ['unique', 'letters', 'only', 'distinct', 'characters', 'different', 'setsof', 'words']) == 40\n assert candidate(words = ['abcdef', 'ghijkl', 'mnopqr', 'stuvwx', 'yzabcd', 'efghij', 'klmnop', 'qrstuv', 'wxyzaa', 'bcdefg']) == 36\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuvwxyzabcdefghijkl', 'abcdefghijqrstuvwxzy']) == 0\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqr', 'ghijkl', 'uvwxy', 'stuv', 'zabcde', 'fghij', 'qwerty', 'asdfghjklzxcvbnm', 'qwertyuiop', 'asdfgh', 'zxcvbn', 'mnbvcxz', 'lkjhgfdsa', 'poiuytrewq', 'bnmxcvz', 'poiuyt', 'lkjhgf', 'mnbvcx', 'lkjhgfdsazxcvbnm', 'qwertyuiopasdfghjklzxcvbnm']) == 160\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstuv', 'abcdefghij', 'klmnopqr', 'stuvwxyz']) == 100\n", "comparison": "exact"}, "public_tests": ["[\"abcw\",\"baz\",\"foo\",\"bar\",\"xtfn\",\"abcdef\"]", "[\"a\",\"ab\",\"abc\",\"d\",\"cd\",\"bcd\",\"abcd\"]", "[\"a\",\"aa\",\"aaa\",\"aaaa\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().maxProduct", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:31+00:00", "tests_total": 67, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "string", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def max_product(words)", "container": null, "callable": "max_product", "parameters": [{"name": "words", "type": "String[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 319, "task_id": "bulb-switcher", "difficulty": "Medium", "problem_description": "There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb.\n\nOn the third round, you toggle every third bulb (turning on if it's off or turning off if it's on). For the i^th round, you toggle every i bulb. For the n^th round, you only toggle the last bulb.\n\nReturn the number of bulbs that are on after n rounds.\n\nExample 1:\n\nInput: n = 3\nOutput: 1\nExplanation: At first, the three bulbs are [off, off, off].\nAfter the first round, the three bulbs are [on, on, on].\nAfter the second round, the three bulbs are [on, off, on].\nAfter the third round, the three bulbs are [on, off, off].\nSo you should return 1 because there is only one bulb is on.\n\nExample 2:\n\nInput: n = 0\nOutput: 0\n\nExample 3:\n\nInput: n = 1\nOutput: 1\n\nConstraints:\n\n- 0 <= n <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 0\n assert candidate(n = 3) == 1\n assert candidate(n = 100) == 10\n assert candidate(n = 4) == 2\n assert candidate(n = 16) == 4\n assert candidate(n = 9) == 3\n assert candidate(n = 1000000) == 1000\n assert candidate(n = 1) == 1\n assert candidate(n = 1000000000) == 31622\n assert candidate(n = 1000) == 31\n assert candidate(n = 10) == 3\n assert candidate(n = 25) == 5\n assert candidate(n = 1089) == 33\n assert candidate(n = 729) == 27\n assert candidate(n = 324) == 18\n assert candidate(n = 2304) == 48\n assert candidate(n = 23) == 4\n assert candidate(n = 2048) == 45\n assert candidate(n = 5000) == 70\n assert candidate(n = 36) == 6\n assert candidate(n = 529) == 23\n assert candidate(n = 676) == 26\n assert candidate(n = 2500) == 50\n assert candidate(n = 32768) == 181\n assert candidate(n = 1156) == 34\n assert candidate(n = 100000000) == 10000\n assert candidate(n = 29) == 5\n assert candidate(n = 576) == 24\n assert candidate(n = 144) == 12\n assert candidate(n = 900) == 30\n assert candidate(n = 50000) == 223\n assert candidate(n = 1681) == 41\n assert candidate(n = 17) == 4\n assert candidate(n = 1225) == 35\n assert candidate(n = 784) == 28\n assert candidate(n = 2401) == 49\n assert candidate(n = 10000000) == 3162\n assert candidate(n = 100000) == 316\n assert candidate(n = 20000) == 141\n assert candidate(n = 256) == 16\n assert candidate(n = 2025) == 45\n assert candidate(n = 81) == 9\n assert candidate(n = 123456789) == 11111\n assert candidate(n = 121) == 11\n assert candidate(n = 999999) == 999\n assert candidate(n = 2209) == 47\n assert candidate(n = 999999999) == 31622\n assert candidate(n = 49) == 7\n assert candidate(n = 4096) == 64\n assert candidate(n = 2116) == 46\n assert candidate(n = 16384) == 128\n assert candidate(n = 289) == 17\n assert candidate(n = 23456789) == 4843\n assert candidate(n = 2) == 1\n assert candidate(n = 225) == 15\n assert candidate(n = 8192) == 90\n assert candidate(n = 1764) == 42\n assert candidate(n = 65536) == 256\n assert candidate(n = 1296) == 36\n assert candidate(n = 987654321) == 31426\n assert candidate(n = 15) == 3\n assert candidate(n = 500000) == 707\n assert candidate(n = 961) == 31\n assert candidate(n = 196) == 14\n assert candidate(n = 361) == 19\n assert candidate(n = 13) == 3\n assert candidate(n = 625) == 25\n assert candidate(n = 789456) == 888\n assert candidate(n = 1600) == 40\n assert candidate(n = 1849) == 43\n assert candidate(n = 841) == 29\n assert candidate(n = 64) == 8\n assert candidate(n = 484) == 22\n assert candidate(n = 10000) == 100\n assert candidate(n = 1024) == 32\n assert candidate(n = 1369) == 37\n assert candidate(n = 1936) == 44\n assert candidate(n = 1444) == 38\n assert candidate(n = 169) == 13\n assert candidate(n = 19) == 4\n assert candidate(n = 400) == 20\n assert candidate(n = 1049) == 32\n assert candidate(n = 123456) == 351\n assert candidate(n = 441) == 21\n assert candidate(n = 1521) == 39\n", "comparison": "exact"}, "public_tests": ["3", "0", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().bulbSwitch", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:33+00:00", "tests_total": 85, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["math", "brainteaser"]}, "language": "ruby", "interface": {"raw_signature": "def bulb_switch(n)", "container": null, "callable": "bulb_switch", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 321, "task_id": "create-maximum-number", "difficulty": "Hard", "problem_description": "You are given two integer arrays nums1 and nums2 of lengths m and n respectively. nums1 and nums2 represent the digits of two numbers. You are also given an integer k.\n\nCreate the maximum number of length k <= m + n from digits of the two numbers. The relative order of the digits from the same array must be preserved.\n\nReturn an array of the k digits representing the answer.\n\nExample 1:\n\nInput: nums1 = [3,4,6,5], nums2 = [9,1,2,5,8,3], k = 5\nOutput: [9,8,6,5,3]\n\nExample 2:\n\nInput: nums1 = [6,7], nums2 = [6,0,4], k = 5\nOutput: [6,7,6,0,4]\n\nExample 3:\n\nInput: nums1 = [3,9], nums2 = [8,9], k = 3\nOutput: [9,8,9]\n\nConstraints:\n\n- m == nums1.length\n- n == nums2.length\n- 1 <= m, n <= 500\n- 0 <= nums1[i], nums2[i] <= 9\n- 1 <= k <= m + n\n- nums1 and nums2 do not have leading zeros.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [5, 5, 5, 5],nums2 = [5, 5, 5, 5],k = 7) == [5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0],k = 5) == [0, 0, 0, 0, 0]\n assert candidate(nums1 = [3, 4, 6, 5],nums2 = [9, 1, 2, 5, 8, 3],k = 5) == [9, 8, 6, 5, 3]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 18) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1]\n assert candidate(nums1 = [6, 7],nums2 = [6, 0, 4],k = 5) == [6, 7, 6, 0, 4]\n assert candidate(nums1 = [1, 6, 5, 4, 3, 2, 1],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 7) == [9, 8, 7, 6, 6, 5, 5]\n assert candidate(nums1 = [3, 9],nums2 = [8, 9],k = 3) == [9, 8, 9]\n assert candidate(nums1 = [1],nums2 = [1],k = 2) == [1, 1]\n assert candidate(nums1 = [0],nums2 = [0],k = 1) == [0]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 0],k = 5) == [9, 4, 6, 8, 0]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],k = 5) == [5, 5, 4, 3, 2]\n assert candidate(nums1 = [7],nums2 = [9, 8, 2],k = 3) == [9, 8, 7]\n assert candidate(nums1 = [1, 6, 5, 4, 3, 2, 1],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 10) == [9, 8, 7, 6, 6, 5, 5, 4, 4, 3]\n assert candidate(nums1 = [1, 6, 5, 4, 3],nums2 = [9, 8, 7, 6, 5],k = 5) == [9, 8, 7, 6, 6]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5],k = 5) == [5, 5, 5, 5, 5]\n assert candidate(nums1 = [5, 6],nums2 = [4, 0, 9],k = 4) == [6, 4, 0, 9]\n assert candidate(nums1 = [8, 6, 9],nums2 = [5, 9, 7, 6, 3, 2, 1],k = 5) == [9, 9, 7, 6, 3]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 10) == [9, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 0],k = 9) == [4, 6, 8, 1, 3, 5, 7, 9, 0]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0],nums2 = [0, 2, 4, 6, 8, 1, 3, 5, 7, 9],k = 9) == [9, 8, 8, 1, 3, 5, 7, 9, 0]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 10) == [9, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums1 = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9],nums2 = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 10) == [9, 9, 9, 9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums1 = [5, 6, 7, 8, 9],nums2 = [1, 2, 3, 4, 5],k = 10) == [5, 6, 7, 8, 9, 1, 2, 3, 4, 5]\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [1, 1, 1, 1, 1],k = 5) == [1, 1, 1, 1, 1]\n assert candidate(nums1 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5) == [0, 0, 0, 0, 0]\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5) == [0, 0, 0, 0, 0]\n assert candidate(nums1 = [4, 3, 2, 1],nums2 = [8, 7, 6, 5],k = 7) == [8, 7, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [6, 7, 6, 5, 4, 3, 2, 1],nums2 = [8, 7, 6, 5, 4, 3, 2, 1, 0],k = 8) == [8, 7, 7, 6, 6, 5, 5, 4]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 10) == [9, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1],k = 5) == [1, 1, 1, 1, 1]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6, 7, 8, 9],k = 6) == [7, 8, 9, 1, 2, 3]\n assert candidate(nums1 = [3, 9, 5, 0, 8],nums2 = [4, 6, 1, 7, 2],k = 8) == [9, 6, 5, 1, 7, 2, 0, 8]\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 0],k = 6) == [5, 5, 4, 3, 2, 1]\n assert candidate(nums1 = [9, 9, 9, 9, 9],nums2 = [8, 8, 8, 8, 8],k = 8) == [9, 9, 9, 9, 9, 8, 8, 8]\n assert candidate(nums1 = [3, 5, 7, 9],nums2 = [1, 2, 8, 6],k = 5) == [9, 1, 2, 8, 6]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],k = 3) == [5, 5, 4]\n assert candidate(nums1 = [9, 9, 9, 9],nums2 = [9, 9, 9, 9],k = 7) == [9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 10) == [9, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 15) == [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [0, 2, 4, 6, 8],k = 6) == [9, 0, 2, 4, 6, 8]\n assert candidate(nums1 = [5, 5, 5, 5],nums2 = [6, 6, 6, 6],k = 7) == [6, 6, 6, 6, 5, 5, 5]\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 9) == [9, 9, 8, 7, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 18) == [9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6, 7, 8, 9, 0],k = 9) == [5, 6, 7, 8, 9, 1, 2, 3, 0]\n assert candidate(nums1 = [0, 0, 0, 0],nums2 = [0, 0, 0, 0],k = 4) == [0, 0, 0, 0]\n assert candidate(nums1 = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],nums2 = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],k = 10) == [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [1],k = 6) == [9, 8, 7, 6, 5, 4]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 9) == [9, 9, 8, 7, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [2, 2, 2, 2, 2],nums2 = [2, 2, 2, 2, 2],k = 8) == [2, 2, 2, 2, 2, 2, 2, 2]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 15) == [9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 4, 3, 2, 1]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 0],k = 7) == [9, 1, 2, 3, 4, 5, 0]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 5) == [9, 9, 8, 7, 6]\n assert candidate(nums1 = [9, 3, 7, 8],nums2 = [5, 6, 2, 4, 3],k = 6) == [9, 8, 6, 2, 4, 3]\n assert candidate(nums1 = [9, 0, 9, 0, 9],nums2 = [9, 0, 9, 0, 9, 0, 9],k = 7) == [9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [9, 8, 7, 6, 5],k = 5) == [9, 8, 7, 6, 5]\n assert candidate(nums1 = [9, 9, 9, 9, 9, 9, 9, 9, 9],nums2 = [9, 9, 9, 9, 9, 9, 9, 9, 9],k = 15) == [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums1 = [9, 5, 3, 1, 7, 8],nums2 = [2, 6, 4, 0, 9, 5],k = 8) == [9, 9, 5, 5, 3, 1, 7, 8]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 10) == [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0],nums2 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 15) == [9, 8, 7, 6, 5, 6, 7, 8, 9, 5, 4, 3, 2, 1, 0]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 0],k = 7) == [8, 1, 3, 5, 7, 9, 0]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 8) == [9, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums1 = [5, 5, 5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5, 5, 5],k = 12) == [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums1 = [9, 8, 7, 6, 5],nums2 = [9, 8, 7, 6, 5],k = 10) == [9, 9, 8, 8, 7, 7, 6, 6, 5, 5]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 0],k = 10) == [2, 4, 6, 8, 1, 3, 5, 7, 9, 0]\n assert candidate(nums1 = [8, 9, 0, 1, 2, 3, 4, 5, 6, 7],nums2 = [7, 6, 5, 4, 3, 2, 1, 0, 9, 8],k = 10) == [9, 9, 8, 1, 2, 3, 4, 5, 6, 7]\n assert candidate(nums1 = [3, 5, 7, 9],nums2 = [1, 2, 4, 6, 8, 0],k = 6) == [9, 2, 4, 6, 8, 0]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 18) == [9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [9, 9, 9, 9, 9],k = 7) == [9, 9, 9, 9, 9, 1, 1]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 15) == [9, 8, 7, 6, 5, 4, 5, 6, 7, 8, 9, 4, 3, 2, 1]\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [9, 9, 9, 9, 9],k = 7) == [9, 9, 9, 9, 9, 0, 0]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 9) == [9, 9, 8, 7, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9],nums2 = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8],k = 10) == [9, 9, 9, 9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums1 = [9, 5, 3, 1, 7],nums2 = [8, 6, 4, 2, 0],k = 10) == [9, 8, 6, 5, 4, 3, 2, 1, 7, 0]\n assert candidate(nums1 = [5, 3, 9, 7, 1],nums2 = [8, 6, 4, 2, 0],k = 7) == [9, 8, 7, 6, 4, 2, 1]\n assert candidate(nums1 = [8, 5, 2, 3, 9],nums2 = [6, 7, 4, 5, 1],k = 8) == [8, 7, 5, 5, 2, 3, 9, 1]\n assert candidate(nums1 = [9, 7, 5, 3, 1],nums2 = [8, 6, 4, 2, 0],k = 9) == [9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums1 = [5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5],k = 9) == [5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums1 = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],nums2 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 15) == [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, 3]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == [1, 1, 1, 1, 1]\n assert candidate(nums1 = [9, 7, 5, 3, 1],nums2 = [1, 3, 5, 7, 9],k = 9) == [9, 7, 5, 3, 5, 7, 9, 3, 1]\n assert candidate(nums1 = [1, 2, 2, 1, 1],nums2 = [2, 2, 1, 1, 1],k = 5) == [2, 2, 2, 2, 1]\n assert candidate(nums1 = [9, 8, 7, 6, 5],nums2 = [5, 4, 3, 2, 1],k = 8) == [9, 8, 7, 6, 5, 5, 4, 3]\n assert candidate(nums1 = [3, 5, 7, 7, 8, 2, 1],nums2 = [6, 5, 3, 5, 6, 9, 8, 7],k = 10) == [9, 8, 7, 3, 5, 7, 7, 8, 2, 1]\n assert candidate(nums1 = [9, 9, 9, 9, 9],nums2 = [1, 1, 1, 1, 1],k = 5) == [9, 9, 9, 9, 9]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1],nums2 = [9, 9, 9, 9, 9, 9, 9],k = 10) == [9, 9, 9, 9, 9, 9, 9, 1, 1, 1]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 17) == [9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 2, 1]\n assert candidate(nums1 = [9, 2, 5, 6, 3, 1],nums2 = [8, 6, 7, 4, 5, 9],k = 8) == [9, 8, 9, 2, 5, 6, 3, 1]\n assert candidate(nums1 = [5, 3, 9, 1, 2],nums2 = [8, 4, 7, 6, 0],k = 5) == [9, 8, 7, 6, 2]\n assert candidate(nums1 = [9, 9, 9, 9, 9],nums2 = [1, 2, 3, 4, 5],k = 9) == [9, 9, 9, 9, 9, 2, 3, 4, 5]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 5) == [9, 9, 8, 8, 7]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1],nums2 = [9, 9, 9, 9, 9, 9],k = 12) == [9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 8) == [9, 9, 8, 7, 6, 5, 4, 3]\n assert candidate(nums1 = [9, 8, 7, 6, 5],nums2 = [4, 3, 2, 1, 0],k = 9) == [9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums1 = [9, 8, 7, 6, 5],nums2 = [5, 4, 3, 2, 1],k = 5) == [9, 8, 7, 6, 5]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [9, 8, 7],k = 8) == [9, 8, 7, 1, 2, 3, 4, 5]\n assert candidate(nums1 = [3, 5, 7, 7, 6, 2, 1],nums2 = [8, 7, 6, 5, 3, 0, 9, 1],k = 9) == [9, 3, 5, 7, 7, 6, 2, 1, 1]\n assert candidate(nums1 = [5, 6, 7, 8, 9],nums2 = [1, 2, 3, 4, 5],k = 7) == [8, 9, 1, 2, 3, 4, 5]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 9) == [2, 2, 2, 2, 2, 2, 2, 2, 2]\n assert candidate(nums1 = [3, 4, 5, 1, 6],nums2 = [7, 8, 2, 9, 0],k = 8) == [8, 9, 3, 4, 5, 1, 6, 0]\n assert candidate(nums1 = [9, 5, 3, 1, 7, 8],nums2 = [6, 4, 2, 0, 9, 8],k = 7) == [9, 9, 8, 5, 3, 7, 8]\n assert candidate(nums1 = [9, 8, 7],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 10) == [9, 8, 7, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0],nums2 = [0, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 15) == [9, 8, 7, 6, 5, 6, 7, 8, 9, 5, 4, 3, 2, 1, 0]\n assert candidate(nums1 = [0, 0, 0, 0],nums2 = [1, 1, 1, 1, 1, 1],k = 5) == [1, 1, 1, 1, 1]\n assert candidate(nums1 = [6, 7, 8, 9, 0],nums2 = [3, 4, 5, 6, 7, 8, 9],k = 10) == [8, 9, 3, 4, 5, 6, 7, 8, 9, 0]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],k = 8) == [5, 4, 3, 4, 5, 3, 2, 1]\n assert candidate(nums1 = [9, 8, 9, 8, 9],nums2 = [8, 9, 8, 9, 8],k = 9) == [9, 9, 8, 9, 8, 9, 8, 9, 8]\n assert candidate(nums1 = [5],nums2 = [5, 5, 5, 5, 5],k = 6) == [5, 5, 5, 5, 5, 5]\n assert candidate(nums1 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],nums2 = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 10) == [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 0],k = 8) == [6, 8, 1, 3, 5, 7, 9, 0]\n assert candidate(nums1 = [1],nums2 = [2, 3, 4, 5, 6, 7, 8, 9],k = 6) == [5, 6, 7, 8, 9, 1]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [0, 2, 4, 6, 8],k = 10) == [1, 3, 5, 7, 9, 0, 2, 4, 6, 8]\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [9, 9, 9, 9, 9],k = 5) == [9, 9, 9, 9, 9]\n assert candidate(nums1 = [9, 8, 7, 6, 5],nums2 = [9, 8, 7, 6, 5, 4],k = 7) == [9, 9, 8, 8, 7, 7, 6]\n assert candidate(nums1 = [6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6],k = 6) == [6, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [4, 4, 4, 4, 4],nums2 = [4, 4, 4, 4, 4],k = 9) == [4, 4, 4, 4, 4, 4, 4, 4, 4]\n", "comparison": "exact"}, "public_tests": ["[3,4,6,5]\n[9,1,2,5,8,3]\n5", "[6,7]\n[6,0,4]\n5", "[3,9]\n[8,9]\n3"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2", "k"], "leetcode_dataset_entry_point": "Solution().maxNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:38+00:00", "tests_total": 120, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "two-pointers", "stack", "greedy", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def max_number(nums1, nums2, k)", "container": null, "callable": "max_number", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 322, "task_id": "coin-change", "difficulty": "Medium", "problem_description": "You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.\n\nReturn the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1.\n\nYou may assume that you have an infinite number of each kind of coin.\n\nExample 1:\n\nInput: coins = [1,2,5], amount = 11\nOutput: 3\nExplanation: 11 = 5 + 5 + 1\n\nExample 2:\n\nInput: coins = [2], amount = 3\nOutput: -1\n\nExample 3:\n\nInput: coins = [1], amount = 0\nOutput: 0\n\nConstraints:\n\n- 1 <= coins.length <= 12\n- 1 <= coins[i] <= 2^31 - 1\n- 0 <= amount <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(coins = [186, 419, 83, 408],amount = 6249) == 20\n assert candidate(coins = [3, 7, 405, 436],amount = 8839) == 25\n assert candidate(coins = [3, 7, 405],amount = 8839) == 71\n assert candidate(coins = [2, 5, 10, 1],amount = 27) == 4\n assert candidate(coins = [1, 2, 5],amount = 1) == 1\n assert candidate(coins = [1, 3, 4, 5],amount = 7) == 2\n assert candidate(coins = [1],amount = 0) == 0\n assert candidate(coins = [5, 7, 8],amount = 100) == 13\n assert candidate(coins = [1, 3, 4],amount = 6) == 2\n assert candidate(coins = [4, 2, 1],amount = 11) == 4\n assert candidate(coins = [1, 3, 4],amount = 6) == 2\n assert candidate(coins = [1, 2, 5],amount = 11) == 3\n assert candidate(coins = [1, 2, 5],amount = 0) == 0\n assert candidate(coins = [2],amount = 3) == -1\n assert candidate(coins = [70, 171, 358, 439, 286],amount = 9963) == 27\n assert candidate(coins = [3, 7, 405, 88, 43],amount = 6803) == 24\n assert candidate(coins = [5, 7],amount = 15) == 3\n assert candidate(coins = [18, 27, 41],amount = 987) == 26\n assert candidate(coins = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048],amount = 4095) == 12\n assert candidate(coins = [5, 15, 25, 50],amount = 3000) == 60\n assert candidate(coins = [1, 2, 4, 8, 16],amount = 2048) == 128\n assert candidate(coins = [10, 20, 30, 40, 50, 60],amount = 1234) == -1\n assert candidate(coins = [3, 5, 7, 9, 11],amount = 9876) == 898\n assert candidate(coins = [18, 24, 28],amount = 100) == 4\n assert candidate(coins = [17, 29, 31, 37, 41, 43],amount = 5000) == 118\n assert candidate(coins = [3, 5],amount = 11) == 3\n assert candidate(coins = [17, 29, 41, 53, 65],amount = 8300) == 136\n assert candidate(coins = [11, 22, 33, 44, 55],amount = 6600) == 120\n assert candidate(coins = [34, 7, 23, 32, 5, 62],amount = 9999) == 164\n assert candidate(coins = [1, 5, 25, 50],amount = 9999) == 208\n assert candidate(coins = [2, 3, 7, 10],amount = 500) == 50\n assert candidate(coins = [7, 14, 21, 28, 35, 42, 49, 56],amount = 1000) == -1\n assert candidate(coins = [3, 6, 9, 12, 15],amount = 1000) == -1\n assert candidate(coins = [1, 5, 10, 25, 50],amount = 78) == 5\n assert candidate(coins = [10, 20, 30, 40, 50],amount = 9999) == -1\n assert candidate(coins = [1, 7, 11],amount = 100) == 10\n assert candidate(coins = [2, 3, 6, 12, 24, 48],amount = 500) == 13\n assert candidate(coins = [1, 2, 4, 8, 16, 32, 64],amount = 1023) == 21\n assert candidate(coins = [1],amount = 10000) == 10000\n assert candidate(coins = [7, 14, 30, 50, 80],amount = 287) == 6\n assert candidate(coins = [2, 4, 8, 16, 32, 64, 128],amount = 1023) == -1\n assert candidate(coins = [2, 3, 5, 7, 11, 13],amount = 5000) == 386\n assert candidate(coins = [3, 5, 7, 9, 11],amount = 10000) == 910\n assert candidate(coins = [7],amount = 100) == -1\n assert candidate(coins = [1, 2, 3, 5, 10],amount = 5000) == 500\n assert candidate(coins = [3, 6, 9, 12, 15],amount = 444) == 30\n assert candidate(coins = [3, 5, 7, 11, 13],amount = 997) == 77\n assert candidate(coins = [1, 3, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31],amount = 100) == 4\n assert candidate(coins = [7, 15, 23, 31],amount = 750) == 26\n assert candidate(coins = [23, 14, 5, 12],amount = 5000) == 220\n assert candidate(coins = [1, 5, 10, 25, 50, 100],amount = 357) == 7\n assert candidate(coins = [18, 24, 27, 36, 50],amount = 999) == 21\n assert candidate(coins = [1, 5, 10, 25, 50],amount = 9999) == 206\n assert candidate(coins = [1, 2, 5, 10, 20, 50, 100, 200],amount = 9999) == 56\n assert candidate(coins = [2, 5, 10, 25],amount = 100) == 4\n assert candidate(coins = [7, 15, 23, 42],amount = 999) == 27\n assert candidate(coins = [7, 17, 23, 29, 31],amount = 1000) == 34\n assert candidate(coins = [1, 3, 4, 6, 8, 10],amount = 450) == 45\n assert candidate(coins = [2, 3, 7],amount = 100) == 15\n assert candidate(coins = [5, 11, 23, 37, 41, 43, 61, 71, 73, 79, 83, 89],amount = 999) == 13\n assert candidate(coins = [1, 10, 100, 1000],amount = 9999) == 36\n assert candidate(coins = [186, 419, 83, 408],amount = 6249) == 20\n assert candidate(coins = [2, 3, 7],amount = 27) == 5\n assert candidate(coins = [3, 6, 9, 12, 15],amount = 9000) == 600\n assert candidate(coins = [1, 2, 5, 10, 20, 50, 100],amount = 9999) == 105\n assert candidate(coins = [5, 9, 12, 27, 31],amount = 1276) == 42\n assert candidate(coins = [2, 3, 7, 11, 19, 23],amount = 987) == 44\n assert candidate(coins = [10, 25, 50, 100],amount = 9876) == -1\n assert candidate(coins = [2, 6, 10, 14],amount = 9999) == -1\n assert candidate(coins = [10, 22, 35],amount = 1000) == 30\n assert candidate(coins = [2, 5, 11, 17, 23],amount = 1000) == 44\n assert candidate(coins = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],amount = 12) == 12\n assert candidate(coins = [1, 6, 10],amount = 111) == 12\n assert candidate(coins = [13, 21, 34, 55, 89, 144],amount = 6765) == 51\n assert candidate(coins = [1, 2, 5, 10],amount = 27) == 4\n assert candidate(coins = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29],amount = 8000) == 277\n assert candidate(coins = [1, 5, 10, 25],amount = 99) == 9\n assert candidate(coins = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048],amount = 1023) == 10\n assert candidate(coins = [10, 15, 20],amount = 120) == 6\n assert candidate(coins = [1, 2, 3, 4, 5],amount = 10000) == 2000\n assert candidate(coins = [1, 11, 21, 31],amount = 10000) == 330\n assert candidate(coins = [1, 3, 5, 7, 9],amount = 10000) == 1112\n assert candidate(coins = [1, 2, 5, 10, 20, 50, 100, 200],amount = 399) == 8\n assert candidate(coins = [13, 19, 23, 29, 31, 37, 41],amount = 9998) == 246\n assert candidate(coins = [1, 6, 13, 37, 150],amount = 9999) == 71\n assert candidate(coins = [10, 20, 50, 100, 200],amount = 10000) == 50\n assert candidate(coins = [1, 5, 10, 25, 50],amount = 87) == 5\n assert candidate(coins = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],amount = 10000) == 1000\n assert candidate(coins = [100, 200, 300, 400, 500],amount = 9999) == -1\n assert candidate(coins = [1, 3, 4, 5],amount = 150) == 30\n assert candidate(coins = [2, 5, 10, 20],amount = 98) == 9\n assert candidate(coins = [1, 2, 5, 10, 25],amount = 9999) == 403\n assert candidate(coins = [10, 25, 50],amount = 9999) == -1\n assert candidate(coins = [11, 17, 29, 31],amount = 10000) == 324\n assert candidate(coins = [7, 14, 28, 29],amount = 10000) == 345\n assert candidate(coins = [10, 25, 50],amount = 99) == -1\n assert candidate(coins = [1, 3, 4, 5, 7],amount = 10000) == 1429\n assert candidate(coins = [1, 3, 4, 5],amount = 15) == 3\n assert candidate(coins = [2, 5, 10, 20, 50, 100],amount = 9999) == 105\n assert candidate(coins = [13, 17, 19],amount = 1234) == 66\n assert candidate(coins = [1, 2, 5, 10, 20, 50, 100],amount = 3689) == 42\n assert candidate(coins = [335, 23, 102, 75, 402],amount = 9783) == 30\n assert candidate(coins = [2, 5, 10, 20, 50],amount = 399) == 12\n assert candidate(coins = [17, 29, 31, 37, 41, 43],amount = 8942) == 208\n assert candidate(coins = [2, 5, 10, 20, 50, 100],amount = 363) == 9\n assert candidate(coins = [12, 25, 50, 100, 200],amount = 3678) == 37\n assert candidate(coins = [13, 23, 33, 43, 53],amount = 888) == 26\n assert candidate(coins = [3, 6, 9, 12, 15, 18],amount = 100) == -1\n assert candidate(coins = [11, 17, 23],amount = 457) == 23\n assert candidate(coins = [2, 5, 10, 25],amount = 9999) == 403\n assert candidate(coins = [29, 81, 135, 50, 1],amount = 2101) == 19\n assert candidate(coins = [33, 37, 41, 43, 47, 53, 59],amount = 10000) == 170\n assert candidate(coins = [5, 11, 13],amount = 10000) == 770\n assert candidate(coins = [10, 20, 50, 100],amount = 345) == -1\n assert candidate(coins = [5, 10, 20, 50, 100],amount = 4321) == -1\n assert candidate(coins = [13, 112, 197, 84, 205],amount = 4873) == 26\n assert candidate(coins = [33, 77, 111, 155],amount = 8500) == 60\n assert candidate(coins = [7, 15, 23],amount = 1000) == 48\n", "comparison": "exact"}, "public_tests": ["[1,2,5]\n11", "[2]\n3", "[1]\n0"], "hints": [], "metadata": {"canonical_parameter_names": ["coins", "amount"], "leetcode_dataset_entry_point": "Solution().coinChange", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:40+00:00", "tests_total": 127, "tests_dropped": 9, "flags": [], "topic_tags": ["array", "dynamic-programming", "breadth-first-search", "knapsack-problem", "complete-knapsack"]}, "language": "ruby", "interface": {"raw_signature": "def coin_change(coins, amount)", "container": null, "callable": "coin_change", "parameters": [{"name": "coins", "type": "Integer[]"}, {"name": "amount", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 326, "task_id": "power-of-three", "difficulty": "Easy", "problem_description": "Given an integer n, return true if it is a power of three. Otherwise, return false.\n\nAn integer n is a power of three, if there exists an integer x such that n == 3^x.\n\nExample 1:\n\nInput: n = 27\nOutput: true\nExplanation: 27 = 3^3\n\nExample 2:\n\nInput: n = 0\nOutput: false\nExplanation: There is no x where 3^x = 0.\n\nExample 3:\n\nInput: n = -1\nOutput: false\nExplanation: There is no x where 3^x = (-1).\n\nConstraints:\n\n- -2^31 <= n <= 2^31 - 1\n\nFollow up: Could you solve it without loops/recursion?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == True\n assert candidate(n = 45) == False\n assert candidate(n = 729) == True\n assert candidate(n = 2147483647) == False\n assert candidate(n = 19683) == True\n assert candidate(n = 100) == False\n assert candidate(n = 244) == False\n assert candidate(n = 10) == False\n assert candidate(n = -1) == False\n assert candidate(n = -27) == False\n assert candidate(n = 0) == False\n assert candidate(n = -2147483648) == False\n assert candidate(n = 27) == True\n assert candidate(n = 6561) == True\n assert candidate(n = 2187) == True\n assert candidate(n = 1000000000) == False\n assert candidate(n = 81) == True\n assert candidate(n = -81) == False\n assert candidate(n = -243) == False\n assert candidate(n = 9) == True\n assert candidate(n = -3) == False\n assert candidate(n = 1) == True\n assert candidate(n = 243) == True\n assert candidate(n = 59049) == True\n assert candidate(n = 14124) == False\n assert candidate(n = 32805) == False\n assert candidate(n = 2147483646) == False\n assert candidate(n = 4096) == False\n assert candidate(n = -9) == False\n assert candidate(n = 82) == False\n assert candidate(n = 387420489) == True\n assert candidate(n = 1594323) == True\n assert candidate(n = 1000) == False\n assert candidate(n = 5) == False\n assert candidate(n = 28) == False\n assert candidate(n = -19683) == False\n assert candidate(n = -162) == False\n assert candidate(n = 4) == False\n assert candidate(n = 59050) == False\n assert candidate(n = 2) == False\n assert candidate(n = 1162261469) == False\n assert candidate(n = -6561) == False\n assert candidate(n = 80) == False\n assert candidate(n = 14348907) == True\n assert candidate(n = 1073741824) == False\n assert candidate(n = 100000) == False\n assert candidate(n = 231) == False\n assert candidate(n = 3645) == False\n assert candidate(n = -59049) == False\n assert candidate(n = 18) == False\n assert candidate(n = 500) == False\n assert candidate(n = 1594322) == False\n assert candidate(n = 20) == False\n assert candidate(n = 177147) == True\n assert candidate(n = -45) == False\n assert candidate(n = 19) == False\n assert candidate(n = 1162261467) == True\n assert candidate(n = 2188) == False\n assert candidate(n = 531441) == True\n assert candidate(n = 24) == False\n assert candidate(n = 129140163) == True\n assert candidate(n = 43046721) == True\n assert candidate(n = -1046527) == False\n assert candidate(n = 1162261468) == False\n assert candidate(n = 1162261466) == False\n assert candidate(n = 200) == False\n assert candidate(n = 6) == False\n assert candidate(n = 1111111111) == False\n assert candidate(n = 2125764400) == False\n", "comparison": "exact"}, "public_tests": ["27", "0", "-1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isPowerOfThree", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:50+00:00", "tests_total": 76, "tests_dropped": 7, "flags": [], "topic_tags": ["math", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def is_power_of_three(n)", "container": null, "callable": "is_power_of_three", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 327, "task_id": "count-of-range-sum", "difficulty": "Hard", "problem_description": "Given an integer array nums and two integers lower and upper, return the number of range sums that lie in [lower, upper] inclusive.\n\nRange sum S(i, j) is defined as the sum of the elements in nums between indices i and j inclusive, where i <= j.\n\nExample 1:\n\nInput: nums = [-2,5,-1], lower = -2, upper = 2\nOutput: 3\nExplanation: The three ranges are: [0,0], [2,2], and [0,2] and their respective sums are: -2, -1, 2.\n\nExample 2:\n\nInput: nums = [0], lower = 0, upper = 0\nOutput: 1\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -2^31 <= nums[i] <= 2^31 - 1\n- -10^5 <= lower <= upper <= 10^5\n- The answer is guaranteed to fit in a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3],lower = -5,upper = 5) == 24\n assert candidate(nums = [100, 200, 300, 400, 500],lower = 150,upper = 1000) == 11\n assert candidate(nums = [-1, -2, -3, -4, -5],lower = -10,upper = -5) == 7\n assert candidate(nums = [1, 2, 3, 4, 5],lower = 1,upper = 5) == 7\n assert candidate(nums = [100, 100, 100, 100, 100],lower = 200,upper = 400) == 9\n assert candidate(nums = [0, 0, 0, 0, 0],lower = 0,upper = 0) == 15\n assert candidate(nums = [-2, 5, -1],lower = -2,upper = 2) == 3\n assert candidate(nums = [5, 5, 5, 5, 5],lower = 10,upper = 20) == 9\n assert candidate(nums = [2147483647, -2147483648, -1, 0],lower = -1,upper = 1) == 4\n assert candidate(nums = [1, 2, 3],lower = 3,upper = 6) == 4\n assert candidate(nums = [0],lower = 0,upper = 0) == 1\n assert candidate(nums = [-1, -2, -3, -4, -5],lower = -10,upper = -1) == 12\n assert candidate(nums = [-1, -2, -3, -4, -5],lower = -10,upper = -3) == 10\n assert candidate(nums = [3, -2, 1, 5, 4],lower = -3,upper = 7) == 11\n assert candidate(nums = [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1],lower = -1,upper = 1) == 55\n assert candidate(nums = [1, 2, 3, 4, 5],lower = 1,upper = 10) == 12\n assert candidate(nums = [1, -1, 1, -1, 1, -1],lower = 0,upper = 1) == 15\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],lower = 0,upper = 0) == 210\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1],lower = -15,upper = -5) == 37\n assert candidate(nums = [100, -50, 200, -150, 300, -200, 400, -250, 500, -300],lower = 100,upper = 600) == 39\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],lower = -1,upper = 1) == 55\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],lower = 15,upper = 25) == 21\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],lower = 100,upper = 200) == 24\n assert candidate(nums = [1, -1, 1, -1, 1, -1],lower = 0,upper = 1) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],lower = 15,upper = 30) == 19\n assert candidate(nums = [5, 4, 3, 2, 1],lower = 2,upper = 7) == 8\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],lower = 1500,upper = 3500) == 23\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10, -11, 12, -13, 14, -15, 16, -17, 18, -19, 20],lower = -20,upper = 20) == 210\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],lower = -100,upper = -50) == 60\n assert candidate(nums = [-10, -20, -30, -40, -50],lower = -150,upper = -50) == 10\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],lower = -200,upper = -100) == 14\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = -2,upper = 2) == 55\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],lower = -1,upper = 1) == 55\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = 0,upper = 2) == 40\n assert candidate(nums = [100, -200, 300, -400, 500, -600, 700, -800, 900, -1000],lower = -500,upper = 500) == 40\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],lower = 100,upper = 500) == 37\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],lower = 15,upper = 30) == 19\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],lower = -500,upper = -100) == 37\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],lower = 50,upper = 100) == 40\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = -2,upper = 2) == 55\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],lower = 1500,upper = 3000) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],lower = 10,upper = 20) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],lower = 5,upper = 20) == 24\n assert candidate(nums = [100, -100, 200, -200, 300, -300, 400, -400, 500, -500, 600, -600, 700, -700, 800, -800, 900, -900, 1000, -1000],lower = -500,upper = 500) == 145\n assert candidate(nums = [100, 200, 300, 400, 500],lower = 150,upper = 1200) == 12\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],lower = 5,upper = 10) == 21\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = -5,upper = 5) == 465\n assert candidate(nums = [10, 20, 30, 40, 50],lower = 100,upper = 150) == 4\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50],lower = -50,upper = 50) == 55\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5],lower = -5,upper = 5) == 55\n assert candidate(nums = [5, -1, 5, -1, 5, -1, 5, -1, 5, -1, 5, -1, 5, -1, 5, -1, 5, -1, 5, -1],lower = 0,upper = 10) == 72\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20],lower = -200,upper = 0) == 206\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],lower = -30,upper = -15) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1],lower = 5,upper = 15) == 37\n assert candidate(nums = [5, -1, 5, -1, 5, -1, 5, -1, 5, -1],lower = 1,upper = 9) == 32\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10],lower = -10,upper = 10) == 55\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],lower = 25,upper = 45) == 13\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],lower = 150,upper = 450) == 30\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],lower = -30,upper = -15) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],lower = 55,upper = 100) == 73\n assert candidate(nums = [1, 2, 3, -6, 2, 3, -6, 2, 3],lower = 1,upper = 5) == 23\n assert candidate(nums = [5, -5, 5, -5, 5, -5, 5, -5, 5, -5],lower = -10,upper = 10) == 55\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = -1,upper = 1) == 55\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],lower = -450,upper = -150) == 30\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1],lower = -5,upper = 5) == 90\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],lower = 0,upper = 0) == 55\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],lower = 0,upper = 200) == 206\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],lower = 0,upper = 5) == 40\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = -1,upper = 1) == 210\n assert candidate(nums = [30, -10, 20, -20, 10, -10, 20, -20, 10, -10, 20, -20, 10, -10, 20, -20, 10, -10, 20, -20],lower = 0,upper = 20) == 135\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],lower = 15,upper = 30) == 31\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],lower = 5,upper = 15) == 19\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],lower = 3,upper = 7) == 30\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],lower = -20,upper = -10) == 14\n assert candidate(nums = [100, 200, 300, 400, 500],lower = 500,upper = 1500) == 10\n assert candidate(nums = [-10, 10, -10, 10, -10, 10, -10, 10, -10, 10],lower = -20,upper = 20) == 55\n assert candidate(nums = [1, 2, 3, 4, 5, -5, -4, -3, -2, -1],lower = 0,upper = 10) == 27\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],lower = -20,upper = -5) == 24\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],lower = 0,upper = 0) == 25\n assert candidate(nums = [1, 2, 3, 4, 5, -5, -4, -3, -2, -1],lower = -10,upper = 0) == 27\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],lower = -15,upper = -5) == 19\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5],lower = -10,upper = 10) == 54\n assert candidate(nums = [1000000, -1000000, 1000000, -1000000, 1000000, -1000000, 1000000, -1000000],lower = 0,upper = 1) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],lower = 50,upper = 100) == 60\n assert candidate(nums = [-1, 0, 1, -1, 0, 1, -1, 0, 1, -1],lower = -1,upper = 1) == 55\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],lower = 0,upper = 0) == 55\n", "comparison": "exact"}, "public_tests": ["[-2,5,-1]\n-2\n2", "[0]\n0\n0"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "lower", "upper"], "leetcode_dataset_entry_point": "Solution().countRangeSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:53+00:00", "tests_total": 101, "tests_dropped": 15, "flags": [], "topic_tags": ["array", "binary-search", "divide-and-conquer", "binary-indexed-tree", "segment-tree", "merge-sort", "ordered-set", "treap"]}, "language": "ruby", "interface": {"raw_signature": "def count_range_sum(nums, lower, upper)", "container": null, "callable": "count_range_sum", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "lower", "type": "Integer"}, {"name": "upper", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 329, "task_id": "longest-increasing-path-in-a-matrix", "difficulty": "Hard", "problem_description": "Given an m x n integers matrix, return the length of the longest increasing path in matrix.\n\nFrom each cell, you can either move in four directions: left, right, up, or down. You may not move diagonally or move outside the boundary (i.e., wrap-around is not allowed).\n\nExample 1:\n\nInput: matrix = [[9,9,4],[6,6,8],[2,1,1]]\nOutput: 4\nExplanation: The longest increasing path is [1, 2, 6, 9].\n\nExample 2:\n\nInput: matrix = [[3,4,5],[3,2,6],[2,2,1]]\nOutput: 4\nExplanation: The longest increasing path is [3, 4, 5, 6]. Moving diagonally is not allowed.\n\nExample 3:\n\nInput: matrix = [[1]]\nOutput: 1\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= m, n <= 200\n- 0 <= matrix[i][j] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[1, 2, 3], [6, 5, 4], [7, 8, 9]]) == 9\n assert candidate(matrix = [[7, 8, 9], [9, 7, 8], [8, 9, 7]]) == 3\n assert candidate(matrix = [[1]]) == 1\n assert candidate(matrix = [[1, 2, 3, 4, 5], [16, 17, 24, 23, 6], [15, 26, 25, 22, 7], [14, 21, 18, 19, 8], [13, 12, 11, 10, 9]]) == 20\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == 5\n assert candidate(matrix = [[9, 9, 4], [6, 6, 8], [2, 1, 1]]) == 4\n assert candidate(matrix = [[3, 3, 3], [3, 3, 3], [3, 3, 3]]) == 1\n assert candidate(matrix = [[3, 4, 5], [3, 2, 6], [2, 2, 1]]) == 4\n assert candidate(matrix = [[1, 3, 5], [2, 6, 4], [7, 8, 9]]) == 5\n assert candidate(matrix = [[1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7]]) == 16\n assert candidate(matrix = [[1, 20, 3, 10, 5], [6, 7, 8, 9, 11], [12, 13, 14, 15, 16], [17, 18, 19, 2, 1], [21, 22, 23, 24, 25]]) == 9\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [1, 3, 5, 7, 9]]) == 6\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20]]) == 8\n assert candidate(matrix = [[5, 8, 3, 2], [4, 10, 9, 7], [1, 6, 13, 12], [14, 11, 16, 15]]) == 5\n assert candidate(matrix = [[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9]]) == 9\n assert candidate(matrix = [[3, 3, 3, 3, 3], [3, 2, 2, 2, 3], [3, 2, 1, 2, 3], [3, 2, 2, 2, 3], [3, 3, 3, 3, 3]]) == 3\n assert candidate(matrix = [[10, 20, 30, 40], [41, 42, 43, 44], [45, 46, 47, 48], [49, 50, 51, 52]]) == 7\n assert candidate(matrix = [[1, 2, 3, 4], [12, 13, 14, 5], [11, 16, 15, 6], [10, 9, 8, 7]]) == 16\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [40, 39, 38, 37, 36, 35, 34, 33, 32, 31], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [60, 59, 58, 57, 56, 55, 54, 53, 52, 51], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [80, 79, 78, 77, 76, 75, 74, 73, 72, 71], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]]) == 100\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6]]) == 4\n assert candidate(matrix = [[9, 9, 9, 9], [9, 8, 7, 8], [9, 7, 6, 7], [9, 8, 7, 6]]) == 4\n assert candidate(matrix = [[7, 8, 9, 10], [6, 5, 4, 11], [15, 14, 13, 12], [16, 17, 18, 19]]) == 16\n assert candidate(matrix = [[1, 2, 3], [8, 9, 4], [7, 6, 5]]) == 9\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [14, 13, 12, 11, 10, 7], [15, 16, 17, 18, 19, 8], [20, 21, 22, 23, 24, 9], [25, 26, 27, 28, 29, 30]]) == 20\n assert candidate(matrix = [[10, 9, 8, 7, 6], [11, 10, 9, 8, 7], [12, 11, 10, 9, 8], [13, 12, 11, 10, 9], [14, 13, 12, 11, 10]]) == 9\n assert candidate(matrix = [[1, 2, 3, 4, 5], [16, 17, 24, 23, 6], [15, 26, 25, 22, 7], [14, 21, 18, 19, 8], [13, 12, 11, 10, 9], [32, 31, 30, 29, 28], [27, 26, 25, 24, 33], [34, 35, 36, 37, 38]]) == 20\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]]) == 10\n assert candidate(matrix = [[10, 16, 15, 21, 14], [9, 11, 17, 20, 13], [8, 12, 18, 19, 12], [7, 6, 5, 4, 3], [2, 1, 0, 9, 8]]) == 13\n assert candidate(matrix = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]) == 10\n assert candidate(matrix = [[1, 0, 7], [2, 6, 8], [3, 5, 9]]) == 8\n assert candidate(matrix = [[5, 4, 3, 2, 1], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [20, 19, 18, 17, 16], [21, 22, 23, 24, 25]]) == 21\n assert candidate(matrix = [[1, 2, 3], [6, 5, 4], [7, 8, 9], [12, 11, 10]]) == 12\n assert candidate(matrix = [[1, 10, 9, 13, 14, 15], [2, 11, 12, 16, 17, 18], [3, 4, 5, 19, 20, 21], [6, 7, 8, 22, 23, 24], [10, 9, 8, 7, 6, 5]]) == 11\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [19, 18, 17, 16, 15, 14, 13, 12, 11, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [29, 28, 27, 26, 25, 24, 23, 22, 21, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [39, 38, 37, 36, 35, 34, 33, 32, 31, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [49, 48, 47, 46, 45, 44, 43, 42, 41, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [59, 58, 57, 56, 55, 54, 53, 52, 51, 50]]) == 50\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) == 1\n assert candidate(matrix = [[1, 3, 1, 1], [1, 4, 1, 5], [1, 2, 1, 6], [1, 7, 1, 1]]) == 3\n assert candidate(matrix = [[5, 4, 3, 2, 1], [4, 3, 2, 1, 5], [3, 2, 1, 5, 4], [2, 1, 5, 4, 3], [1, 5, 4, 3, 2]]) == 5\n assert candidate(matrix = [[7, 8, 9, 10], [10, 6, 5, 4], [3, 2, 1, 12], [14, 13, 16, 15]]) == 6\n assert candidate(matrix = [[9, 8, 7, 6, 5], [8, 7, 6, 5, 4], [7, 6, 5, 4, 3], [6, 5, 4, 3, 2], [5, 4, 3, 2, 1]]) == 9\n assert candidate(matrix = [[1, 20, 3, 4, 5], [16, 17, 24, 23, 6], [15, 26, 25, 22, 7], [14, 21, 18, 19, 8], [13, 12, 11, 10, 9]]) == 18\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]]) == 11\n assert candidate(matrix = [[5, 8, 5, 8], [8, 8, 8, 8], [5, 8, 5, 8], [8, 8, 8, 8]]) == 2\n assert candidate(matrix = [[1, 3, 5, 7, 9], [10, 8, 6, 4, 2], [11, 13, 15, 17, 19], [20, 18, 16, 14, 12]]) == 12\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]]) == 21\n assert candidate(matrix = [[100, 99, 98, 97, 96], [95, 94, 93, 92, 91], [90, 89, 88, 87, 86], [85, 84, 83, 82, 81], [80, 79, 78, 77, 76]]) == 9\n assert candidate(matrix = [[10, 20, 30, 40, 50], [9, 8, 7, 6, 5], [4, 3, 2, 1, 0]]) == 11\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]]) == 9\n assert candidate(matrix = [[10, 9, 8, 7, 6], [19, 18, 17, 16, 15], [20, 21, 22, 23, 24], [29, 28, 27, 26, 25], [30, 31, 32, 33, 34]]) == 21\n assert candidate(matrix = [[3, 1, 6, 5, 9, 12], [10, 18, 4, 7, 11, 14], [17, 2, 19, 8, 13, 16], [15, 24, 21, 20, 23, 22]]) == 7\n assert candidate(matrix = [[5, 12, 15, 18, 19, 20, 21], [4, 9, 14, 17, 22, 23, 24], [3, 8, 13, 16, 25, 26, 27], [2, 7, 10, 11, 28, 29, 30], [1, 6, 5, 4, 31, 32, 33], [0, 1, 2, 3, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43]]) == 22\n assert candidate(matrix = [[1, 100, 1], [100, 1, 100], [1, 100, 1]]) == 2\n assert candidate(matrix = [[1, 2, 3], [6, 5, 4], [7, 8, 9], [10, 11, 12], [15, 14, 13], [16, 17, 18], [19, 20, 21], [24, 23, 22], [25, 26, 27], [30, 29, 28]]) == 26\n assert candidate(matrix = [[5, 3, 2, 4, 1], [4, 8, 7, 5, 6], [3, 9, 6, 2, 8], [1, 5, 4, 3, 2], [6, 7, 8, 9, 1]]) == 8\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [18, 17, 16, 15, 14, 13, 12, 11, 10], [19, 20, 21, 22, 23, 24, 25, 26, 27], [36, 35, 34, 33, 32, 31, 30, 29, 28], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54], [63, 62, 61, 60, 59, 58, 57, 56, 55], [64, 65, 66, 67, 68, 69, 70, 71, 72], [73, 74, 75, 76, 77, 78, 79, 80, 81]]) == 65\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == 10\n assert candidate(matrix = [[1, 2, 3], [6, 5, 4], [7, 8, 9]]) == 9\n assert candidate(matrix = [[10, 20, 10], [20, 30, 20], [10, 20, 30], [30, 40, 30], [20, 30, 40]]) == 3\n assert candidate(matrix = [[7, 7, 5, 2, 9], [6, 10, 11, 12, 8], [4, 5, 9, 8, 7], [3, 1, 6, 5, 4], [2, 3, 4, 5, 1]]) == 7\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20], [21, 23, 25, 27, 29]]) == 9\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [1, 2, 3], [4, 5, 6], [7, 8, 9], [1, 2, 3], [4, 5, 6], [7, 8, 9]]) == 5\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]]) == 13\n assert candidate(matrix = [[10, 11, 12, 13, 14, 15], [9, 8, 7, 6, 5, 16], [18, 17, 16, 15, 14, 13], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30]]) == 13\n assert candidate(matrix = [[9, 2, 3], [6, 5, 4], [3, 6, 9]]) == 6\n assert candidate(matrix = [[5, 6, 7, 8, 9], [4, 5, 6, 7, 8], [3, 4, 5, 6, 7], [2, 3, 4, 5, 6], [1, 2, 3, 4, 5]]) == 9\n assert candidate(matrix = [[1, 2, 3, 4, 5], [10, 9, 8, 7, 6], [11, 12, 13, 14, 15], [20, 19, 18, 17, 16], [21, 22, 23, 24, 25]]) == 25\n assert candidate(matrix = [[1, 2, 3, 4], [4, 3, 2, 1], [1, 2, 3, 4], [4, 3, 2, 1]]) == 4\n assert candidate(matrix = [[10, 9, 10, 11], [10, 8, 9, 10], [11, 9, 8, 9], [12, 10, 9, 8]]) == 4\n assert candidate(matrix = [[1, 3, 2], [6, 5, 4], [7, 8, 9], [12, 11, 10], [13, 15, 14], [18, 17, 16], [19, 21, 20], [24, 23, 22], [25, 27, 26], [30, 29, 28]]) == 22\n assert candidate(matrix = [[1, 15, 10], [20, 11, 16], [3, 21, 12], [4, 5, 6], [22, 23, 7], [8, 9, 13], [17, 18, 14], [24, 19, 25]]) == 10\n assert candidate(matrix = [[10, 6, 8], [9, 5, 7], [4, 1, 3], [12, 11, 13]]) == 4\n assert candidate(matrix = [[5, 8, 9, 10], [3, 4, 1, 2], [6, 7, 14, 13], [11, 12, 15, 16]]) == 6\n assert candidate(matrix = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [11, 13, 15, 17, 19], [12, 14, 16, 18, 20]]) == 8\n assert candidate(matrix = [[1, 5, 20, 11, 12, 13], [24, 23, 6, 15, 16, 17], [25, 22, 7, 14, 18, 19], [20, 9, 8, 7, 6, 5], [1, 2, 3, 4, 21, 26]]) == 11\n assert candidate(matrix = [[10, 16, 15, 14, 13], [9, 8, 7, 6, 5], [4, 3, 2, 1, 12], [17, 18, 19, 20, 11], [24, 23, 22, 21, 25]]) == 12\n assert candidate(matrix = [[10, 11, 12, 13], [9, 8, 7, 6], [14, 15, 16, 5], [17, 18, 19, 4], [20, 21, 22, 3], [23, 24, 25, 2]]) == 14\n assert candidate(matrix = [[9, 7, 5, 3, 1], [8, 6, 4, 2, 0], [11, 10, 9, 8, 7], [16, 15, 14, 13, 12], [17, 18, 19, 20, 21]]) == 12\n assert candidate(matrix = [[5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5]]) == 1\n assert candidate(matrix = [[1, 2, 3], [6, 5, 4], [7, 8, 9], [12, 11, 10], [13, 14, 15]]) == 15\n assert candidate(matrix = [[1, 2, 3, 4, 5], [4, 3, 2, 1, 6], [7, 8, 9, 10, 11], [10, 9, 8, 7, 12], [13, 14, 15, 16, 17]]) == 13\n assert candidate(matrix = [[1, 10, 19, 28, 37], [2, 9, 18, 27, 36], [3, 8, 17, 26, 35], [4, 7, 16, 25, 34], [5, 6, 15, 24, 33]]) == 13\n assert candidate(matrix = [[9, 1, 2], [3, 8, 4], [5, 6, 7]]) == 4\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 2, 2, 2, 1], [1, 2, 3, 2, 1], [1, 2, 2, 2, 1], [1, 1, 1, 1, 1]]) == 3\n assert candidate(matrix = [[3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3, 3]]) == 1\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 3, 3, 2, 1], [1, 2, 3, 4, 3, 1], [1, 2, 3, 3, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]) == 4\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]]) == 14\n assert candidate(matrix = [[1, 2, 3], [6, 5, 4], [7, 8, 9], [12, 11, 10], [13, 14, 15]]) == 15\n assert candidate(matrix = [[3, 1, 6], [7, 5, 2], [4, 8, 9]]) == 4\n assert candidate(matrix = [[1, 10, 19, 28], [2, 9, 18, 27], [3, 8, 17, 26], [4, 7, 16, 25], [5, 6, 15, 24], [14, 13, 12, 11]]) == 12\n", "comparison": "exact"}, "public_tests": ["[[9,9,4],[6,6,8],[2,1,1]]", "[[3,4,5],[3,2,6],[2,2,1]]", "[[1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix"], "leetcode_dataset_entry_point": "Solution().longestIncreasingPath", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:45:58+00:00", "tests_total": 88, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "depth-first-search", "breadth-first-search", "graph", "topological-sort", "memoization", "matrix", "directed-acyclic-graph"]}, "language": "ruby", "interface": {"raw_signature": "def longest_increasing_path(matrix)", "container": null, "callable": "longest_increasing_path", "parameters": [{"name": "matrix", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 330, "task_id": "patching-array", "difficulty": "Hard", "problem_description": "Given a sorted integer array nums and an integer n, add/patch elements to the array such that any number in the range [1, n] inclusive can be formed by the sum of some elements in the array.\n\nReturn the minimum number of patches required.\n\nExample 1:\n\nInput: nums = [1,3], n = 6\nOutput: 1\nExplanation:\nCombinations of nums are [1], [3], [1,3], which form possible sums of: 1, 3, 4.\nNow if we add/patch 2 to nums, the combinations are: [1], [2], [3], [1,3], [2,3], [1,2,3].\nPossible sums are 1, 2, 3, 4, 5, 6, which now covers the range [1, 6].\nSo we only need 1 patch.\n\nExample 2:\n\nInput: nums = [1,5,10], n = 20\nOutput: 2\nExplanation: The two patches can be [2, 4].\n\nExample 3:\n\nInput: nums = [1,2,2], n = 5\nOutput: 0\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- 1 <= nums[i] <= 10^4\n- nums is sorted in ascending order.\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 8],n = 8) == 1\n assert candidate(nums = [1],n = 2) == 1\n assert candidate(nums = [1, 2, 4, 13],n = 30) == 2\n assert candidate(nums = [1, 2, 4, 13, 43],n = 100) == 2\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],n = 2047) == 0\n assert candidate(nums = [1, 3, 5, 7],n = 15) == 1\n assert candidate(nums = [1, 5, 10],n = 20) == 2\n assert candidate(nums = [1, 3],n = 6) == 1\n assert candidate(nums = [1, 4, 8],n = 10) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],n = 55) == 0\n assert candidate(nums = [1],n = 1) == 0\n assert candidate(nums = [1, 2, 3, 4, 5],n = 15) == 0\n assert candidate(nums = [1, 2, 2],n = 5) == 0\n assert candidate(nums = [1, 3, 9, 27, 81, 243, 729],n = 10000) == 9\n assert candidate(nums = [1, 4, 13, 40, 100],n = 1000) == 6\n assert candidate(nums = [1, 1, 1, 1, 1],n = 10) == 1\n assert candidate(nums = [1, 2, 4, 13, 43],n = 100) == 2\n assert candidate(nums = [1, 2, 3, 6, 12, 24, 48, 96, 192, 384, 768],n = 1024) == 0\n assert candidate(nums = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],n = 500) == 3\n assert candidate(nums = [1, 4, 9, 16, 25, 36],n = 500) == 5\n assert candidate(nums = [2, 6, 18, 54, 162],n = 500) == 6\n assert candidate(nums = [1, 4, 10, 20],n = 30) == 2\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29],n = 100) == 1\n assert candidate(nums = [1, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095],n = 8000) == 3\n assert candidate(nums = [1, 4, 10, 20, 50, 100],n = 500) == 5\n assert candidate(nums = [1, 2, 5, 7],n = 23) == 2\n assert candidate(nums = [1, 10, 100, 1000, 10000],n = 100000) == 13\n assert candidate(nums = [1, 2, 4, 8, 16, 32],n = 1000) == 4\n assert candidate(nums = [1, 2, 2, 5],n = 21) == 1\n assert candidate(nums = [1, 5, 10, 20, 50, 100, 200, 500],n = 1000) == 4\n assert candidate(nums = [1, 2, 3, 7, 11, 13],n = 100) == 2\n assert candidate(nums = [1, 2, 8, 32, 128],n = 1024) == 6\n assert candidate(nums = [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000],n = 10000) == 6\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],n = 2048) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],n = 1000) == 7\n assert candidate(nums = [1, 3, 9],n = 50) == 4\n assert candidate(nums = [5, 8, 15],n = 50) == 4\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],n = 100) == 0\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096],n = 8192) == 1\n assert candidate(nums = [1, 2, 5, 10, 20, 50, 100, 250, 500, 1000],n = 2000) == 3\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],n = 2048) == 1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],n = 1024) == 1\n assert candidate(nums = [1, 2, 8, 16, 32, 64, 128],n = 256) == 2\n assert candidate(nums = [1, 2, 3, 5, 11, 21],n = 100) == 2\n assert candidate(nums = [1, 4, 10],n = 19) == 2\n assert candidate(nums = [1, 5, 10, 20, 50, 100],n = 10000) == 9\n assert candidate(nums = [1, 5, 10, 25, 50, 100],n = 1000) == 6\n assert candidate(nums = [1, 4, 10, 20, 25],n = 50) == 2\n assert candidate(nums = [2, 4, 6, 8],n = 20) == 1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],n = 2047) == 0\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144],n = 200) == 0\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],n = 1024) == 1\n assert candidate(nums = [1, 3, 9, 27, 81],n = 243) == 5\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024],n = 1023) == 0\n assert candidate(nums = [2, 6, 18, 54, 162],n = 1000) == 7\n assert candidate(nums = [1, 5, 10, 25, 50, 100, 200, 500, 1000],n = 1500) == 4\n assert candidate(nums = [1, 3, 9, 27, 81],n = 200) == 4\n assert candidate(nums = [1, 4, 10, 20, 25, 50],n = 100) == 2\n assert candidate(nums = [1, 4, 10, 20, 25],n = 100) == 3\n assert candidate(nums = [1, 3, 9, 27, 81, 243, 729],n = 1000000) == 15\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128],n = 1000) == 3\n assert candidate(nums = [1, 2, 8, 16],n = 31) == 1\n assert candidate(nums = [1, 3, 7, 15, 31],n = 1000) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1],n = 10) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],n = 10) == 0\n assert candidate(nums = [1, 2, 6],n = 14) == 2\n assert candidate(nums = [1, 2, 6, 18, 54, 162],n = 500) == 5\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128, 256, 512],n = 1023) == 1\n assert candidate(nums = [1, 5, 10, 20, 50],n = 1000) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],n = 20) == 1\n assert candidate(nums = [3, 7, 11, 15, 19],n = 50) == 2\n assert candidate(nums = [1, 5, 10, 20, 50, 100, 200, 500, 1000],n = 1500) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],n = 100) == 1\n assert candidate(nums = [1, 2, 6, 24, 120],n = 720) == 6\n assert candidate(nums = [1, 5, 10, 20, 50, 100],n = 200) == 3\n assert candidate(nums = [1, 2, 3, 6, 12, 24, 48, 96],n = 1024) == 3\n assert candidate(nums = [1, 3, 5, 7, 9],n = 20) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],n = 10) == 0\n assert candidate(nums = [1, 2, 2, 4, 8, 16],n = 31) == 0\n assert candidate(nums = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23],n = 100) == 0\n assert candidate(nums = [10, 20, 30, 40, 50],n = 150) == 4\n assert candidate(nums = [2, 3, 6, 7, 8, 10],n = 50) == 2\n assert candidate(nums = [1, 3, 7, 15, 31, 63],n = 127) == 2\n assert candidate(nums = [1, 2, 2, 3, 3, 5, 8, 13, 21, 34],n = 100) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],n = 20) == 0\n assert candidate(nums = [2, 4, 8, 16, 32],n = 1024) == 6\n assert candidate(nums = [3, 7, 15, 31, 63, 127],n = 255) == 3\n assert candidate(nums = [1, 3, 5, 7, 9],n = 50) == 2\n assert candidate(nums = [1, 7, 15, 31, 63, 127],n = 200) == 3\n assert candidate(nums = [1, 4, 10, 20, 50, 100],n = 200) == 3\n assert candidate(nums = [1, 5, 10, 20, 50, 100],n = 1000) == 6\n assert candidate(nums = [1, 2, 4, 8, 16, 32],n = 1023) == 4\n assert candidate(nums = [1, 2, 5, 10, 20, 50, 100],n = 1000) == 5\n assert candidate(nums = [1, 2, 5, 10, 25, 50],n = 100) == 2\n assert candidate(nums = [1, 2, 4, 8, 16],n = 31) == 0\n", "comparison": "exact"}, "public_tests": ["[1,3]\n6", "[1,5,10]\n20", "[1,2,2]\n5"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "n"], "leetcode_dataset_entry_point": "Solution().minPatches", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:01+00:00", "tests_total": 105, "tests_dropped": 10, "flags": [], "topic_tags": ["array", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def min_patches(nums, n)", "container": null, "callable": "min_patches", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 331, "task_id": "verify-preorder-serialization-of-a-binary-tree", "difficulty": "Medium", "problem_description": "One way to serialize a binary tree is to use preorder traversal. When we encounter a non-null node, we record the node's value. If it is a null node, we record using a sentinel value such as '#'.\n\nFor example, the above binary tree can be serialized to the string \"9,3,4,#,#,1,#,#,2,#,6,#,#\", where '#' represents a null node.\n\nGiven a string of comma-separated values preorder, return true if it is a correct preorder traversal serialization of a binary tree.\n\nIt is guaranteed that each comma-separated value in the string must be either an integer or a character '#' representing null pointer.\n\nYou may assume that the input format is always valid.\n\n- For example, it could never contain two consecutive commas, such as \"1,,3\".\n\nNote: You are not allowed to reconstruct the tree.\n\nExample 1:\n\nInput: preorder = \"9,3,4,#,#,1,#,#,2,#,6,#,#\"\nOutput: true\n\nExample 2:\n\nInput: preorder = \"1,#\"\nOutput: false\n\nExample 3:\n\nInput: preorder = \"9,#,#,1\"\nOutput: false\n\nConstraints:\n\n- 1 <= preorder.length <= 10^4\n- preorder consist of integers in the range [0, 100] and '#' separated by commas ','.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(preorder = \"1,2,#,#,3,4,#,#,5,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,#,#,5,6,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,#,#,4,5,#,#,#,#,6,7,#,#,#,#\") == False\n assert candidate(preorder = \"#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,#,#,5,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,#,#,5,#,#\") == True\n assert candidate(preorder = \"1,2,#,#,3,4,5,#,#,#,#,6,#,#,7,#,#\") == False\n assert candidate(preorder = \"1,2,3,#,#,4,5,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,#,4,#,#\") == True\n assert candidate(preorder = \"1,2,#,3,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,#,#,5,6,#,#,7,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,#,4,5,#,#,#\") == True\n assert candidate(preorder = \"1,#\") == False\n assert candidate(preorder = \"0,1,2,3,#,#,#,#,4,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,#,#,5,#,6,#,#\") == True\n assert candidate(preorder = \"0,0,0,0,#,#,#,0,#,#,#,0,#,#,#\") == False\n assert candidate(preorder = \"1,2,#,4,#,#,3,#,#\") == True\n assert candidate(preorder = \"9,3,4,#,#,1,#,#,2,#,6,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,#,#\") == True\n assert candidate(preorder = \"9,3,4,#,#,#,2,#,6,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,4,#,#,#,5,#,#\") == True\n assert candidate(preorder = \"1,2,#,3,#,#,4,#,#\") == True\n assert candidate(preorder = \"#,1\") == False\n assert candidate(preorder = \"1,2,#,3,4,#,#,5,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,#,5,#,#\") == False\n assert candidate(preorder = \"1,2,#,3,#,4,#,#,5,#,#,6,#,#\") == False\n assert candidate(preorder = \"9,#,#,1\") == False\n assert candidate(preorder = \"20,15,10,#,#,12,#,#,18,16,#,#,19,#,#,25,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,#,#,5,6,#,#,7,#,#,8,9,#,#,10,#,#,11,12,#,#,13,#,#,14,#,#,15,#,#\") == False\n assert candidate(preorder = \"10,5,3,#,#,8,7,#,#,#,9,#,11,#,12,#,#\") == True\n assert candidate(preorder = \"5,2,3,#,#,6,7,#,#,#,8,9,#,#,10,#,#\") == True\n assert candidate(preorder = \"5,4,2,1,#,#,#,3,#,#,7,6,#,#,8,#,#\") == True\n assert candidate(preorder = \"30,20,10,#,#,15,#,#,25,22,#,#,27,#,#,35,32,#,#,37,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,#,#,#,#,#,#,#,9,#,10,#,#,11,#,#,12,#,#,13,#,#,14,#,#,15,#,#\") == False\n assert candidate(preorder = \"9,4,#,6,7,#,#,8,#,#,5,3,#,#,#,#,1,#,#\") == False\n assert candidate(preorder = \"20,10,5,#,#,8,6,#,#,9,#,#,15,12,#,#,13,#,#,14,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,#,#,5,6,7,#,#,#,#,8,9,#,#,10,11,#,#,#,12,13,#,#,#,14,15,#,#,#,16,#,#\") == False\n assert candidate(preorder = \"7,3,2,#,#,6,#,#,4,#,5,#,#,1,#,9,#,#\") == False\n assert candidate(preorder = \"6,2,0,#,#,4,3,#,#,5,#,#\") == False\n assert candidate(preorder = \"10,4,3,2,#,#,#,5,#,6,#,#,8,7,#,#,#,9,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,#,#,#,8,9,10,11,12,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,6,7,#,#,8,9,#,#,#,10,11,#,#,#,12,13,#,#,#,14,#,#\") == False\n assert candidate(preorder = \"1,2,#,3,#,#,4,5,#,#,6,7,#,#,8,#,#,9,#,#,10,#,#\") == False\n assert candidate(preorder = \"1,2,#,#,3,4,5,#,#,#,6,7,8,9,#,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,#,8,9,#,#,10,#,#,11,12,#,#,13,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,9,#,#,#,#,#,10,11,12,#,#,#,13,14,15,#,#,#,16,17,18,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,8,#,#,#,9,#,10,#,#,11,12,#,#,13,#,#,14,#,#,15,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,#,5,#,#,#,6,7,8,#,#,9,#,#,10,11,12,#,#,#,13,14,15,#,#,#,16,17,18,#,#,#,19,20,#,#,#,21,22,23,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,#,7,#,8,9,#,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,6,7,#,#,#,8,9,#,#,#,10,11,#,#,#\") == False\n assert candidate(preorder = \"10,5,3,2,#,#,#,7,6,#,#,8,#,#,9,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,#,7,8,#,#,9,#,#,10,#,#\") == False\n assert candidate(preorder = \"5,2,1,#,#,#,6,3,#,#,7,8,#,#,9,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,#,#,#,#,9,10,11,#,#,#,12,13,14,#,#,#,15,16,17,#,#,#\") == False\n assert candidate(preorder = \"5,#,#,6,7,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,#,#,#,5,#,#,6,7,#,#,8,9,#,#,10,#,11,#,#\") == True\n assert candidate(preorder = \"3,1,0,#,#,#,2,#,4,5,#,#,#,6,#,#\") == False\n assert candidate(preorder = \"1,2,3,#,#,#,4,5,6,7,8,9,#,#,#,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,5,#,#,6,7,#,#,8,#,#,9,#,#\") == True\n assert candidate(preorder = \"5,1,0,#,#,2,#,#,6,3,#,#,#,7,#,8,#,#\") == False\n assert candidate(preorder = \"15,10,7,#,#,8,#,#,12,11,#,#,13,#,#,14,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,6,#,7,#,#,8,#,9,#,#\") == False\n assert candidate(preorder = \"9,4,1,#,#,2,#,#,5,3,#,#,6,#,#,7,#,#\") == False\n assert candidate(preorder = \"10,5,3,#,#,4,8,#,#,#,6,#,9,7,#,#,#,11,#,#\") == False\n assert candidate(preorder = \"100,50,25,#,#,30,#,#,75,60,#,#,80,#,#,125,110,#,#,130,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,#,8,9,#,#,10,11,#,#,12,13,#,#,14,15,#,#,16,17,#,#,18,19,#,#,20,21,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,#,#,3,4,5,#,#,#,6,7,8,9,#,#,#,10,11,#,#,#,12,13,#,#,#,14,15,#,#,#,16,17,#,#,#,18,19,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,#,6,7,8,9,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"100,50,25,#,#,75,#,#,150,125,#,#,175,#,#\") == True\n assert candidate(preorder = \"8,5,9,#,#,7,#,11,#,#,3,#,#,2,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,#,#,5,#,6,#,#,7,#,#,8,#,#,9,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,#,#,#,7,8,9,#,#,10,11,#,#,#,12,13,14,#,#,#,15,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,#,#,7,#,#,8,9,10,#,#,#,11,12,#,#,13,14,#,#,#,15,16,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,8,9,#,#,#,#,#,10,11,12,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,#,#,5,6,7,#,#,8,9,10,#,#,#,#,11,12,#,#,13,14,#,#,15,#,#,16,#,#,17,#,#,#,#,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"8,3,2,1,#,#,#,4,#,#,5,6,#,#,#,7,#,9,#,#\") == False\n assert candidate(preorder = \"6,2,0,8,#,#,#,5,#,#,7,#,3,#,#,1,0,#,9,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"5,3,6,8,#,#,#,4,#,#,2,9,#,#,10,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,#,5,6,#,#,#,7,8,#,#,9,10,#,#,#,11,12,#,#,#,13,#,#\") == False\n assert candidate(preorder = \"11,8,6,4,#,#,7,#,#,9,#,10,#,#,14,12,#,#,13,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,5,#,6,#,#,7,8,#,#,9,#,#,10,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,5,#,#,6,7,#,#,8,9,#,#,10,#,#,#\") == True\n assert candidate(preorder = \"15,10,5,#,#,7,#,#,20,17,#,#,25,#,#\") == True\n assert candidate(preorder = \"10,5,3,#,#,8,6,#,#,#,9,4,#,#,7,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,6,#,#,#,#,#,7,8,#,#,9,10,#,#,#,#\") == True\n assert candidate(preorder = \"3,1,2,#,#,4,5,#,#,#,6,7,8,#,#,#,#,9,#,#\") == False\n assert candidate(preorder = \"8,5,4,2,1,#,#,#,3,#,#,7,6,#,#,13,10,#,#,15,#,18,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,#,8,#,#,9,10,#,#,11,#,#\") == False\n assert candidate(preorder = \"9,8,7,6,#,#,5,4,3,#,#,2,#,#,1,#,#\") == False\n assert candidate(preorder = \"5,3,2,1,#,#,#,4,#,#,6,#,7,#,#\") == True\n assert candidate(preorder = \"5,3,2,#,#,4,#,#,6,#,7,8,#,#,9,#,10,#,#\") == True\n assert candidate(preorder = \"1,2,#,#,3,#,4,5,#,#,6,7,#,#,#,8,9,#,10,#,11,#,#\") == False\n assert candidate(preorder = \"9,3,4,#,#,1,#,#,2,#,6,7,#,#,8,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,#,8,9,#,#,10,11,#,#,12,#,13,#,14,#,#,15,#,#,16,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"2,1,#,#,3,#,#,4,#,#,5,#,#,6,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,#,7,8,9,#,#,10,#,#,11,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,#,6,7,8,#,#,#,9,#,#\") == False\n assert candidate(preorder = \"5,2,1,#,#,#,3,#,6,#,4,#,7,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,5,#,#,6,7,8,9,10,#,#,#,#,#,11,12,13,#,#,#,14,15,16,#,#,#,17,18,19,#,#,#,20,21,22,#,#,#,23,24,25,#,#,#\") == False\n assert candidate(preorder = \"3,9,#,#,20,15,#,#,7,#,#,6,#,#,18,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,7,#,8,#,9,#,10,#,11,#,12,#,13,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,6,7,8,9,#,#,#,#,#,10,11,12,13,#,#,#,#,#,14,15,16,17,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,#,#,4,5,6,7,#,#,#,#,8,9,#,#,10,#,#,#\") == True\n assert candidate(preorder = \"7,3,1,#,#,#,4,2,#,#,#,5,#,6,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,#,7,#,8,#,#,9,#,10,#,#,11,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,#,6,7,#,#,8,9,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,6,#,#,#,7,8,9,#,#,#,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,5,6,#,#,7,8,#,#,9,#,#,10,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,#,#,5,#,6,#,7,#,8,#,9,#,10,#,11,#,12,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,6,7,#,#,#,#,#,#,8,9,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,#,#,8,#,#,9,#,#,10,11,12,#,#,13,#,#,#,14,15,16,#,#,#,17,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,9,#,#,#,#,#,#,#,#,10,11,12,#,#,#,#,#,13,14,15,#,#,#,#,#,16,17,18,#,#,#,#,#,19,#,#\") == False\n assert candidate(preorder = \"5,1,#,#,4,3,6,#,#,#,2,#,7,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,#,#,#,5,#,6,#,7,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,#,4,#,5,#,6,#,7,#,8,#,9,#,10,#,11,#,12,#,#\") == False\n assert candidate(preorder = \"8,3,2,#,#,4,#,#,5,#,6,#,#,7,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,#,6,#,7,#,#,8,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,#,7,8,#,#,9,#,#,10,11,#,#,12,#,#,13,#,#\") == True\n assert candidate(preorder = \"9,3,4,5,#,#,#,1,#,#,2,7,#,#,8,#,#\") == True\n assert candidate(preorder = \"10,5,3,#,#,8,7,#,#,15,12,#,#,20,#,#\") == False\n assert candidate(preorder = \"9,6,5,#,#,#,13,10,#,#,15,#,18,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,7,#,8,#,#,9,#,10,#,11,#,#,#,#\") == True\n assert candidate(preorder = \"5,4,3,2,1,#,#,#,#,6,7,#,#,8,9,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,#,#,#,#,#,#,#,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"9,3,4,#,#,1,#,#,2,#,6,#,#,5,#,#,7,#,#,8,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,7,8,#,#,9,#,10,#,11,12,#,#,13,#,#,14,#,#,#,#,#,#,#,#\") == False\n assert candidate(preorder = \"10,5,3,2,#,#,4,#,#,7,#,6,#,#,8,9,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,7,#,#,8,9,#,#,10,11,#,#,12,13,#,#,14,15,#,#,16,17,#,#\") == False\n assert candidate(preorder = \"6,3,1,#,#,#,8,#,9,10,#,#,12,#,#\") == True\n assert candidate(preorder = \"8,5,3,#,2,#,#,4,#,#,6,1,#,#,7,#,#\") == True\n assert candidate(preorder = \"5,3,2,#,#,4,#,#,6,1,#,#,8,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,#,#,6,#,#,7,#,8,9,#,#,#,10,11,#,#,#,12,13,#,#,#,14,15,#,#,#\") == False\n assert candidate(preorder = \"1,2,#,3,#,4,5,#,#,6,#,7,#,8,#,#,9,#,10,#,11,#,#,#,#\") == False\n assert candidate(preorder = \"9,4,3,#,#,5,#,8,#,#,7,6,#,#,#,#\") == False\n assert candidate(preorder = \"5,1,4,#,#,3,#,#,6,2,#,#,8,#,#\") == True\n assert candidate(preorder = \"1,2,3,#,#,4,#,5,6,#,#,#,#\") == True\n assert candidate(preorder = \"1,2,3,4,5,6,#,#,7,8,#,#,9,10,#,#,#,11,12,#,#,#\") == False\n assert candidate(preorder = \"5,2,1,#,#,4,3,#,#,#,#,6,#,7,#,#\") == False\n assert candidate(preorder = \"1,2,3,#,#,4,#,5,#,6,7,#,#,#,#,#\") == False\n assert candidate(preorder = \"1,2,#,#,3,4,#,#,5,6,7,#,#,#,8,#,9,#,#\") == True\n assert candidate(preorder = \"2,1,0,#,#,#,3,#,4,#,5,#,#\") == True\n assert candidate(preorder = \"6,2,1,#,#,4,#,#,3,#,#,5,#,7,#,#\") == False\n", "comparison": "exact"}, "public_tests": ["\"9,3,4,#,#,1,#,#,2,#,6,#,#\"", "\"1,#\"", "\"9,#,#,1\""], "hints": [], "metadata": {"canonical_parameter_names": ["preorder"], "leetcode_dataset_entry_point": "Solution().isValidSerialization", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:03+00:00", "tests_total": 145, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["string", "stack", "tree", "binary-tree"]}, "language": "ruby", "interface": {"raw_signature": "def is_valid_serialization(preorder)", "container": null, "callable": "is_valid_serialization", "parameters": [{"name": "preorder", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 332, "task_id": "reconstruct-itinerary", "difficulty": "Hard", "problem_description": "You are given a list of airline tickets where tickets[i] = [from_i, to_i] represent the departure and the arrival airports of one flight. Reconstruct the itinerary in order and return it.\n\nAll of the tickets belong to a man who departs from \"JFK\", thus, the itinerary must begin with \"JFK\". If there are multiple valid itineraries, you should return the itinerary that has the smallest lexical order when read as a single string.\n\n- For example, the itinerary [\"JFK\", \"LGA\"] has a smaller lexical order than [\"JFK\", \"LGB\"].\n\nYou may assume all tickets form at least one valid itinerary. You must use all the tickets once and only once.\n\nExample 1:\n\nInput: tickets = [[\"MUC\",\"LHR\"],[\"JFK\",\"MUC\"],[\"SFO\",\"SJC\"],[\"LHR\",\"SFO\"]]\nOutput: [\"JFK\",\"MUC\",\"LHR\",\"SFO\",\"SJC\"]\n\nExample 2:\n\nInput: tickets = [[\"JFK\",\"SFO\"],[\"JFK\",\"ATL\"],[\"SFO\",\"ATL\"],[\"ATL\",\"JFK\"],[\"ATL\",\"SFO\"]]\nOutput: [\"JFK\",\"ATL\",\"JFK\",\"SFO\",\"ATL\",\"SFO\"]\nExplanation: Another possible reconstruction is [\"JFK\",\"SFO\",\"ATL\",\"JFK\",\"ATL\",\"SFO\"] but it is larger in lexical order.\n\nConstraints:\n\n- 1 <= tickets.length <= 300\n- tickets[i].length == 2\n- from_i.length == 3\n- to_i.length == 3\n- from_i and to_i consist of uppercase English letters.\n- from_i != to_i\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(tickets = [['JFK', 'NRT'], ['NRT', 'JFK']]) == ['JFK', 'NRT', 'JFK']\n assert candidate(tickets = [['JFK', 'MUC'], ['MUC', 'LHR'], ['LHR', 'SFO'], ['SFO', 'SJC']]) == ['JFK', 'MUC', 'LHR', 'SFO', 'SJC']\n assert candidate(tickets = [['JFK', 'AXA'], ['AXA', 'TIA'], ['TIA', 'JFK'], ['JFK', 'AXA']]) == ['JFK', 'AXA', 'TIA', 'JFK', 'AXA']\n assert candidate(tickets = [['EZE', 'TIA'], ['EZE', 'HOU'], ['AXA', 'TIA'], ['JFK', 'AXA'], ['ANU', 'JFK'], ['TIA', 'ANU'], ['JFK', 'TIA']]) == ['JFK', 'AXA', 'TIA', 'ANU', 'JFK', 'TIA']\n assert candidate(tickets = [['JFK', 'PEK'], ['PEK', 'LAX'], ['LAX', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SFO']]) == ['JFK', 'PEK', 'LAX', 'JFK', 'ORD', 'SFO']\n assert candidate(tickets = [['JFK', 'AXA'], ['AXA', 'TIA'], ['TIA', 'JFK'], ['JFK', 'TIA'], ['TIA', 'JFK']]) == ['JFK', 'AXA', 'TIA', 'JFK', 'TIA', 'JFK']\n assert candidate(tickets = [['MUC', 'LHR'], ['JFK', 'MUC'], ['SFO', 'SJC'], ['LHR', 'SFO']]) == ['JFK', 'MUC', 'LHR', 'SFO', 'SJC']\n assert candidate(tickets = [['JFK', 'KUL'], ['JFK', 'NRT'], ['NRT', 'JFK']]) == ['JFK', 'NRT', 'JFK', 'KUL']\n assert candidate(tickets = [['JFK', 'AAA'], ['JFK', 'BBB'], ['BBB', 'JFK']]) == ['JFK', 'BBB', 'JFK', 'AAA']\n assert candidate(tickets = [['JFK', 'SFO'], ['JFK', 'ATL'], ['SFO', 'ATL'], ['ATL', 'JFK'], ['ATL', 'SFO']]) == ['JFK', 'ATL', 'JFK', 'SFO', 'ATL', 'SFO']\n assert candidate(tickets = [['EZE', 'AXA'], ['TIA', 'ANU'], ['ANU', 'JFK'], ['JFK', 'ANU'], ['ANU', 'EZE'], ['TIA', 'ANU'], ['AXA', 'TIA'], ['TIA', 'JFK'], ['ANU', 'TIA'], ['JFK', 'TIA']]) == ['JFK', 'ANU', 'EZE', 'AXA', 'TIA', 'ANU', 'JFK', 'TIA', 'ANU', 'TIA', 'JFK']\n assert candidate(tickets = [['EZE', 'AXA'], ['TIA', 'ANU'], ['ANU', 'JFK'], ['JFK', 'TIA'], ['ANU', 'EZE'], ['TIA', 'ANU'], ['AXA', 'TIA'], ['TIA', 'JFK'], ['ANU', 'TIA'], ['JFK', 'TIA']]) == ['JFK', 'TIA', 'ANU', 'EZE', 'AXA', 'TIA', 'ANU', 'TIA', 'JFK', 'TIA', 'JFK']\n assert candidate(tickets = [['MUC', 'LHR'], ['JFK', 'MUC'], ['SFO', 'SJC'], ['LHR', 'SFO']]) == ['JFK', 'MUC', 'LHR', 'SFO', 'SJC']\n assert candidate(tickets = [['JFK', 'SFO'], ['JFK', 'ATL'], ['SFO', 'ATL'], ['ATL', 'JFK'], ['ATL', 'SFO']]) == ['JFK', 'ATL', 'JFK', 'SFO', 'ATL', 'SFO']\n assert candidate(tickets = [['EZE', 'AXA'], ['TIA', 'ANU'], ['ANU', 'JFK'], ['JFK', 'TIA'], ['AXA', 'TIA'], ['TIA', 'ANU'], ['AXA', 'EZE'], ['EZE', 'ANU'], ['AXA', 'TIA'], ['ANU', 'JFK'], ['JFK', 'TIA'], ['JFK', 'ANU'], ['ANU', 'EZE'], ['TIA', 'JFK'], ['EZE', 'TIA'], ['EZE', 'AXA'], ['AXA', 'TIA'], ['AXA', 'EZE'], ['TIA', 'AXA'], ['JFK', 'AXA'], ['AXA', 'TIA'], ['TIA', 'JFK'], ['AXA', 'EZE'], ['EZE', 'ANU'], ['JFK', 'TIA'], ['JFK', 'ANU'], ['ANU', 'JFK'], ['TIA', 'JFK'], ['JFK', 'TIA'], ['JFK', 'AXA'], ['AXA', 'TIA'], ['TIA', 'JFK'], ['AXA', 'EZE']]) == ['JFK', 'ANU', 'EZE', 'ANU', 'JFK', 'ANU', 'JFK', 'AXA', 'EZE', 'ANU', 'JFK', 'AXA', 'EZE', 'AXA', 'EZE', 'AXA', 'EZE', 'TIA', 'AXA', 'TIA', 'TIA', 'TIA', 'TIA', 'TIA', 'JFK', 'TIA', 'JFK', 'TIA', 'JFK', 'TIA', 'JFK', 'TIA', 'ANU', 'ANU']\n assert candidate(tickets = [['JFK', 'PDX'], ['PDX', 'JFK'], ['JFK', 'PDX'], ['PDX', 'LAX'], ['LAX', 'PDX'], ['PDX', 'JFK'], ['JFK', 'PDX'], ['PDX', 'LAX']]) == ['JFK', 'PDX', 'JFK', 'PDX', 'JFK', 'PDX', 'LAX', 'PDX', 'LAX']\n assert candidate(tickets = [['JFK', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK'], ['BKK', 'JFK'], ['JFK', 'LAX'], ['LAX', 'JFK'], ['JFK', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK'], ['BKK', 'LAX'], ['LAX', 'BKK'], ['BKK', 'SFO'], ['SFO', 'BKK']]) == ['JFK', 'BKK', 'JFK', 'BKK', 'LAX', 'BKK', 'LAX', 'BKK', 'LAX', 'BKK', 'LAX', 'BKK', 'LAX', 'BKK', 'LAX', 'BKK', 'LAX', 'JFK', 'LAX', 'BKK', 'SFO', 'BKK', 'SFO', 'BKK', 'SFO', 'BKK', 'SFO', 'BKK', 'SFO', 'BKK', 'SFO', 'BKK', 'SFO', 'BKK']\n assert candidate(tickets = [['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'DXB'], ['DXB', 'JFK']]) == ['JFK', 'LHR', 'DEL', 'DXB', 'JFK', 'LHR', 'DEL', 'DXB', 'JFK', 'LHR', 'DEL', 'DXB', 'JFK', 'LHR', 'DEL', 'DXB', 'JFK', 'LHR', 'DEL', 'DXB', 'JFK', 'LHR', 'DEL', 'DXB', 'JFK', 'LHR', 'DEL', 'DXB', 'JFK']\n assert candidate(tickets = [['JFK', 'BKK'], ['BKK', 'LHR'], ['LHR', 'AMS'], ['AMS', 'JFK'], ['JFK', 'DXB'], ['DXB', 'LAX'], ['LAX', 'BKK'], ['BKK', 'JFK']]) == ['JFK', 'BKK', 'JFK', 'DXB', 'LAX', 'BKK', 'LHR', 'AMS', 'JFK']\n assert candidate(tickets = [['JFK', 'IST'], ['IST', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK'], ['JFK', 'IST'], ['IST', 'SAW'], ['SAW', 'IST'], ['IST', 'JFK'], ['JFK', 'SAW'], ['SAW', 'JFK']]) == ['JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'IST', 'JFK', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'IST', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK', 'SAW', 'JFK']\n assert candidate(tickets = [['JFK', 'HOU'], ['HOU', 'SLC'], ['SLC', 'JFK'], ['JFK', 'HOU'], ['HOU', 'ORD'], ['ORD', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SLC'], ['SLC', 'HOU']]) == ['JFK', 'HOU', 'ORD', 'JFK', 'HOU', 'SLC', 'JFK', 'ORD', 'SLC', 'HOU']\n assert candidate(tickets = [['JFK', 'DEL'], ['DEL', 'BOM'], ['BOM', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LAX'], ['LAX', 'HOU'], ['HOU', 'SFO'], ['SFO', 'ORD'], ['ORD', 'JFK'], ['JFK', 'LAX'], ['LAX', 'JFK']]) == ['JFK', 'DEL', 'BOM', 'DXB', 'JFK', 'LAX', 'HOU', 'SFO', 'ORD', 'JFK', 'LAX', 'JFK']\n assert candidate(tickets = [['JFK', 'CDG'], ['CDG', 'MIA'], ['MIA', 'LAX'], ['LAX', 'HOU'], ['HOU', 'SFO'], ['SFO', 'HOU'], ['HOU', 'LAX'], ['LAX', 'MIA'], ['MIA', 'CDG'], ['CDG', 'JFK']]) == ['JFK', 'CDG', 'MIA', 'LAX', 'HOU', 'SFO', 'HOU', 'LAX', 'MIA', 'CDG', 'JFK']\n assert candidate(tickets = [['JFK', 'NRT'], ['NRT', 'JFK'], ['JFK', 'KUL'], ['KUL', 'NRT'], ['NRT', 'KUL'], ['KUL', 'JFK']]) == ['JFK', 'KUL', 'JFK', 'NRT', 'KUL', 'NRT', 'JFK']\n assert candidate(tickets = [['JFK', 'KUL'], ['KUL', 'LAX'], ['LAX', 'KUL'], ['KUL', 'SFO'], ['SFO', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SFO'], ['SFO', 'ORD'], ['ORD', 'JFK'], ['JFK', 'SFO']]) == ['JFK', 'KUL', 'LAX', 'KUL', 'SFO', 'JFK', 'ORD', 'JFK', 'SFO', 'ORD', 'SFO']\n assert candidate(tickets = [['JFK', 'AUA'], ['AUA', 'SYD'], ['SYD', 'LAX'], ['LAX', 'JFK'], ['JFK', 'PEK'], ['PEK', 'AUA'], ['AUA', 'SYD'], ['SYD', 'PEK'], ['PEK', 'JFK'], ['JFK', 'LAX'], ['LAX', 'SYD'], ['SYD', 'JFK'], ['JFK', 'AUA']]) == ['JFK', 'AUA', 'SYD', 'JFK', 'AUA', 'SYD', 'LAX', 'JFK', 'LAX', 'SYD', 'PEK', 'JFK', 'PEK', 'AUA']\n assert candidate(tickets = [['JFK', 'KUL'], ['KUL', 'LAX'], ['LAX', 'JFK'], ['JFK', 'HOU'], ['HOU', 'SFO'], ['SFO', 'JFK'], ['JFK', 'SLC'], ['SLC', 'HOU'], ['HOU', 'JFK']]) == ['JFK', 'HOU', 'JFK', 'KUL', 'LAX', 'JFK', 'SLC', 'HOU', 'SFO', 'JFK']\n assert candidate(tickets = [['JFK', 'IAH'], ['IAH', 'ORD'], ['ORD', 'DEN'], ['DEN', 'LAX'], ['LAX', 'SFO'], ['SFO', 'IAH'], ['IAH', 'ORD'], ['ORD', 'DEN'], ['DEN', 'LAX']]) == ['JFK', 'IAH', 'ORD', 'DEN', 'LAX', 'SFO', 'IAH', 'ORD', 'DEN', 'LAX']\n assert candidate(tickets = [['JFK', 'LGA'], ['LGA', 'JFK'], ['JFK', 'LGA'], ['LGA', 'JFK'], ['JFK', 'LGA'], ['LGA', 'JFK'], ['JFK', 'LGA'], ['LGA', 'JFK'], ['JFK', 'LGA'], ['LGA', 'JFK']]) == ['JFK', 'LGA', 'JFK', 'LGA', 'JFK', 'LGA', 'JFK', 'LGA', 'JFK', 'LGA', 'JFK']\n assert candidate(tickets = [['JFK', 'SFO'], ['SFO', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SFO'], ['SFO', 'LAX'], ['LAX', 'ORD'], ['ORD', 'JFK'], ['JFK', 'HOU'], ['HOU', 'SFO'], ['SFO', 'HOU']]) == ['JFK', 'HOU', 'SFO', 'JFK', 'ORD', 'JFK', 'SFO', 'LAX', 'JFK', 'SFO', 'LAX', 'ORD', 'SFO', 'HOU']\n assert candidate(tickets = [['JFK', 'AAA'], ['AAA', 'BBB'], ['BBB', 'CCC'], ['CCC', 'DDD'], ['DDD', 'JFK'], ['JFK', 'EZE'], ['EZE', 'JFK']]) == ['JFK', 'AAA', 'BBB', 'CCC', 'DDD', 'JFK', 'EZE', 'JFK']\n assert candidate(tickets = [['JFK', 'LAX'], ['LAX', 'SFO'], ['SFO', 'JFK'], ['JFK', 'LAX'], ['LAX', 'SFO'], ['SFO', 'LAX'], ['LAX', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'SFO'], ['SFO', 'JFK'], ['JFK', 'LAX'], ['LAX', 'SFO'], ['SFO', 'LAX'], ['LAX', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'SFO'], ['SFO', 'JFK'], ['JFK', 'LAX'], ['LAX', 'SFO'], ['SFO', 'LAX'], ['LAX', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'SFO'], ['SFO', 'JFK'], ['JFK', 'LAX'], ['LAX', 'SFO'], ['SFO', 'LAX'], ['LAX', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX']]) == ['JFK', 'LAX', 'JFK', 'LAX', 'JFK', 'LAX', 'JFK', 'LAX', 'JFK', 'LAX', 'SFO', 'JFK', 'SFO', 'JFK', 'SFO', 'JFK', 'SFO', 'JFK', 'SFO', 'LAX', 'SFO', 'LAX', 'SFO', 'LAX', 'SFO', 'LAX', 'SFO', 'LAX', 'SFO', 'LAX', 'SFO', 'LAX', 'SFO', 'LAX']\n assert candidate(tickets = [['JFK', 'KUL'], ['KUL', 'LAX'], ['LAX', 'JFK'], ['JFK', 'DUB'], ['DUB', 'ORD'], ['ORD', 'LAX'], ['LAX', 'HOU'], ['HOU', 'SFO'], ['SFO', 'JFK']]) == ['JFK', 'DUB', 'ORD', 'LAX', 'HOU', 'SFO', 'JFK', 'KUL', 'LAX', 'JFK']\n assert candidate(tickets = [['JFK', 'XYZ'], ['XYZ', 'ABC'], ['ABC', 'JKL'], ['JKL', 'MNO'], ['MNO', 'PQR'], ['PQR', 'JKL'], ['JKL', 'ABC'], ['ABC', 'XYZ'], ['XYZ', 'JFK'], ['JFK', 'MNO']]) == ['JFK', 'MNO', 'PQR', 'JKL', 'ABC', 'XYZ', 'JFK', 'XYZ', 'ABC', 'JKL', 'MNO']\n assert candidate(tickets = [['JFK', 'XYZ'], ['XYZ', 'ABC'], ['ABC', 'JFK'], ['JFK', 'XYZ'], ['XYZ', 'DEF'], ['DEF', 'ABC'], ['ABC', 'XYZ'], ['XYZ', 'DEF'], ['DEF', 'JFK']]) == ['JFK', 'XYZ', 'ABC', 'JFK', 'XYZ', 'DEF', 'ABC', 'XYZ', 'DEF', 'JFK']\n assert candidate(tickets = [['JFK', 'DEL'], ['DEL', 'JFK'], ['JFK', 'BOM'], ['BOM', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BOM'], ['BOM', 'JFK'], ['JFK', 'BOM'], ['BOM', 'DEL']]) == ['JFK', 'BOM', 'DEL', 'BOM', 'DEL', 'JFK', 'BOM', 'JFK', 'DEL', 'JFK', 'DEL']\n assert candidate(tickets = [['JFK', 'DEL'], ['DEL', 'BOM'], ['BOM', 'DEL'], ['DEL', 'LHR'], ['LHR', 'BOM'], ['BOM', 'SFO'], ['SFO', 'LHR'], ['LHR', 'SFO'], ['SFO', 'DEL'], ['DEL', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DEL'], ['DEL', 'BOM'], ['BOM', 'SFO'], ['SFO', 'JFK'], ['JFK', 'BOM'], ['BOM', 'LHR'], ['LHR', 'JFK'], ['JFK', 'SFO'], ['SFO', 'BOM']]) == ['JFK', 'BOM', 'DEL', 'BOM', 'LHR', 'BOM', 'SFO', 'BOM', 'SFO', 'DEL', 'JFK', 'DEL', 'LHR', 'JFK', 'LHR', 'SFO', 'JFK', 'SFO', 'LHR', 'DEL', 'BOM']\n assert candidate(tickets = [['JFK', 'BCN'], ['BCN', 'JFK'], ['JFK', 'MIA'], ['MIA', 'JFK'], ['JFK', 'DXB'], ['DXB', 'JFK'], ['JFK', 'SFO'], ['SFO', 'JFK']]) == ['JFK', 'BCN', 'JFK', 'DXB', 'JFK', 'MIA', 'JFK', 'SFO', 'JFK']\n assert candidate(tickets = [['JFK', 'DXB'], ['DXB', 'JFK'], ['JFK', 'DXB'], ['DXB', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'LHR'], ['LHR', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB'], ['DXB', 'JFK'], ['JFK', 'LHR'], ['LHR', 'DXB']]) == ['JFK', 'DXB', 'JFK', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'JFK', 'LHR', 'DXB', 'LHR', 'DXB', 'LHR', 'JFK', 'LHR', 'DXB']\n assert candidate(tickets = [['JFK', 'NRT'], ['NRT', 'JFK'], ['JFK', 'NRT'], ['NRT', 'PEK'], ['PEK', 'LAX'], ['LAX', 'PEK'], ['PEK', 'JFK'], ['JFK', 'LAX'], ['LAX', 'JFK'], ['JFK', 'PEK'], ['PEK', 'NRT'], ['NRT', 'LAX'], ['LAX', 'NRT'], ['NRT', 'JFK'], ['JFK', 'PEK'], ['PEK', 'LAX'], ['LAX', 'JFK']]) == ['JFK', 'LAX', 'JFK', 'NRT', 'JFK', 'NRT', 'JFK', 'PEK', 'JFK', 'PEK', 'LAX', 'NRT', 'LAX', 'PEK', 'NRT', 'PEK', 'LAX', 'JFK']\n assert candidate(tickets = [['JFK', 'FRA'], ['JFK', 'TIA'], ['FRA', 'JFK'], ['TIA', 'FRA'], ['FRA', 'TIA'], ['TIA', 'JFK']]) == ['JFK', 'FRA', 'JFK', 'TIA', 'FRA', 'TIA', 'JFK']\n assert candidate(tickets = [['JFK', 'YYZ'], ['YYZ', 'BOS'], ['BOS', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'YYZ'], ['YYZ', 'BOS'], ['BOS', 'JFK'], ['JFK', 'BOS'], ['BOS', 'YYZ'], ['YYZ', 'JFK']]) == ['JFK', 'BOS', 'JFK', 'YYZ', 'BOS', 'YYZ', 'BOS', 'YYZ', 'JFK', 'YYZ', 'JFK']\n assert candidate(tickets = [['JFK', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'YYZ'], ['YYZ', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'LHR'], ['LHR', 'JFK'], ['JFK', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR'], ['LHR', 'YYZ'], ['YYZ', 'JFK'], ['JFK', 'LHR']]) == ['JFK', 'LHR', 'JFK', 'LHR', 'YYZ', 'JFK', 'LHR', 'YYZ', 'JFK', 'LHR', 'YYZ', 'JFK', 'LHR', 'YYZ', 'JFK', 'LHR', 'YYZ', 'JFK', 'LHR', 'YYZ', 'JFK', 'YYZ', 'JFK', 'YYZ', 'JFK', 'YYZ', 'LHR', 'YYZ', 'LHR']\n assert candidate(tickets = [['JFK', 'NRT'], ['NRT', 'JFK'], ['JFK', 'KUL'], ['KUL', 'LAX'], ['LAX', 'NRT'], ['NRT', 'KUL'], ['KUL', 'JFK']]) == ['JFK', 'KUL', 'JFK', 'NRT', 'KUL', 'LAX', 'NRT', 'JFK']\n assert candidate(tickets = [['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'DEN'], ['DEN', 'LAX'], ['LAX', 'SFO'], ['SFO', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'DEN']]) == ['JFK', 'SFO', 'JFK', 'SFO', 'LAX', 'DEN', 'LAX', 'SFO', 'LAX', 'DEN']\n assert candidate(tickets = [['JFK', 'SFO'], ['SFO', 'ATL'], ['ATL', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SFO'], ['SFO', 'ORD'], ['ORD', 'ATL'], ['ATL', 'SFO'], ['SFO', 'JFK'], ['JFK', 'ORD'], ['ORD', 'ATL'], ['ATL', 'ORD'], ['ORD', 'SFO'], ['SFO', 'ATL'], ['ATL', 'JFK'], ['JFK', 'SFO'], ['SFO', 'ORD'], ['ORD', 'SFO'], ['SFO', 'ATL'], ['ATL', 'ORD'], ['ORD', 'JFK'], ['JFK', 'ATL'], ['ATL', 'ORD'], ['ORD', 'SFO'], ['SFO', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SFO'], ['SFO', 'ATL'], ['ATL', 'ORD'], ['ORD', 'JFK'], ['JFK', 'SFO']]) == ['JFK', 'ATL', 'JFK', 'ORD', 'ATL', 'JFK', 'ORD', 'ATL', 'ORD', 'JFK', 'ORD', 'JFK', 'SFO', 'ATL', 'ORD', 'SFO', 'ATL', 'ORD', 'SFO', 'ATL', 'ORD', 'SFO', 'ATL', 'SFO', 'JFK', 'SFO', 'JFK', 'SFO', 'ORD', 'SFO', 'ORD', 'SFO']\n assert candidate(tickets = [['JFK', 'ZRH'], ['ZRH', 'HOU'], ['HOU', 'JFK'], ['JFK', 'LHR'], ['LHR', 'HOU'], ['HOU', 'LHR'], ['LHR', 'ZRH'], ['ZRH', 'JFK']]) == ['JFK', 'LHR', 'HOU', 'JFK', 'ZRH', 'HOU', 'LHR', 'ZRH', 'JFK']\n assert candidate(tickets = [['JFK', 'IST'], ['IST', 'DXB'], ['DXB', 'ORD'], ['ORD', 'JFK'], ['JFK', 'IST'], ['IST', 'DXB'], ['DXB', 'ORD'], ['ORD', 'LAX'], ['LAX', 'JFK']]) == ['JFK', 'IST', 'DXB', 'ORD', 'JFK', 'IST', 'DXB', 'ORD', 'LAX', 'JFK']\n assert candidate(tickets = [['JFK', 'SFO'], ['SFO', 'ATL'], ['ATL', 'JFK'], ['JFK', 'SFO'], ['SFO', 'ORD'], ['ORD', 'SFO'], ['SFO', 'ATL'], ['ATL', 'SFO'], ['SFO', 'ORD'], ['ORD', 'JFK']]) == ['JFK', 'SFO', 'ATL', 'JFK', 'SFO', 'ATL', 'SFO', 'ORD', 'SFO', 'ORD', 'JFK']\n assert candidate(tickets = [['JFK', 'DXB'], ['DXB', 'SYD'], ['SYD', 'JFK'], ['JFK', 'DEL'], ['DEL', 'DXB'], ['DXB', 'SYD'], ['SYD', 'DEL'], ['DEL', 'JFK']]) == ['JFK', 'DEL', 'DXB', 'SYD', 'DEL', 'JFK', 'DXB', 'SYD', 'JFK']\n assert candidate(tickets = [['JFK', 'DXB'], ['DXB', 'BKK'], ['BKK', 'DXB'], ['DXB', 'JFK'], ['JFK', 'DEL'], ['DEL', 'DXB'], ['DXB', 'DEL'], ['DEL', 'BKK'], ['BKK', 'DEL'], ['DEL', 'JFK'], ['JFK', 'BKK'], ['BKK', 'JFK'], ['JFK', 'DXB']]) == ['JFK', 'BKK', 'DEL', 'BKK', 'DXB', 'BKK', 'JFK', 'DEL', 'DXB', 'DEL', 'JFK', 'DXB', 'JFK', 'DXB']\n assert candidate(tickets = [['JFK', 'CPT'], ['CPT', 'DEL'], ['DEL', 'DXB'], ['DXB', 'SFO'], ['SFO', 'HOU'], ['HOU', 'JFK'], ['JFK', 'BOM'], ['BOM', 'CPT'], ['CPT', 'HOU'], ['HOU', 'DXB'], ['DXB', 'JFK'], ['JFK', 'SFO'], ['SFO', 'DEL'], ['DEL', 'BOM'], ['BOM', 'HOU'], ['HOU', 'SFO'], ['SFO', 'DXB'], ['DXB', 'CPT'], ['CPT', 'BOM'], ['BOM', 'SFO']]) == ['JFK', 'BOM', 'CPT', 'BOM', 'HOU', 'DXB', 'CPT', 'DEL', 'BOM', 'SFO', 'DEL', 'DXB', 'JFK', 'CPT', 'HOU', 'JFK', 'SFO', 'DXB', 'SFO', 'HOU', 'SFO']\n assert candidate(tickets = [['JFK', 'LAX'], ['LAX', 'SFO'], ['SFO', 'HOU'], ['HOU', 'LAX'], ['LAX', 'JFK'], ['JFK', 'ORD'], ['ORD', 'SFO'], ['SFO', 'HOU'], ['HOU', 'ORD'], ['ORD', 'JFK']]) == ['JFK', 'LAX', 'JFK', 'ORD', 'SFO', 'HOU', 'LAX', 'SFO', 'HOU', 'ORD', 'JFK']\n assert candidate(tickets = [['JFK', 'NRT'], ['JFK', 'KUL'], ['NRT', 'JFK'], ['KUL', 'JFK'], ['JFK', 'NRT'], ['NRT', 'KUL'], ['KUL', 'NRT'], ['NRT', 'LAX'], ['LAX', 'HOU'], ['HOU', 'SYD'], ['SYD', 'JFK'], ['JFK', 'SYD'], ['SYD', 'HOU'], ['HOU', 'LAX'], ['LAX', 'NRT'], ['NRT', 'JFK'], ['JFK', 'LAX'], ['LAX', 'SYD'], ['SYD', 'JFK'], ['JFK', 'AUA'], ['AUA', 'SYD'], ['SYD', 'LAX'], ['LAX', 'JFK'], ['JFK', 'PEK'], ['PEK', 'AUA'], ['AUA', 'SYD'], ['SYD', 'PEK'], ['PEK', 'JFK']]) == ['JFK', 'AUA', 'SYD', 'HOU', 'LAX', 'HOU', 'SYD', 'JFK', 'KUL', 'JFK', 'LAX', 'JFK', 'NRT', 'JFK', 'NRT', 'JFK', 'PEK', 'AUA', 'SYD', 'JFK', 'SYD', 'LAX', 'NRT', 'KUL', 'NRT', 'LAX', 'SYD', 'PEK', 'JFK']\n assert candidate(tickets = [['JFK', 'NRT'], ['NRT', 'JFK'], ['JFK', 'KUL'], ['KUL', 'NRT'], ['NRT', 'JFK'], ['JFK', 'NRT']]) == ['JFK', 'KUL', 'NRT', 'JFK', 'NRT', 'JFK', 'NRT']\n assert candidate(tickets = [['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL'], ['DEL', 'BLR'], ['BLR', 'DEL'], ['DEL', 'JFK'], ['JFK', 'DEL']]) == ['JFK', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'BLR', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL', 'JFK', 'DEL']\n assert candidate(tickets = [['JFK', 'CDG'], ['CDG', 'HOU'], ['HOU', 'DXB'], ['DXB', 'SFO'], ['SFO', 'JFK'], ['JFK', 'DXB'], ['DXB', 'HOU'], ['HOU', 'CDG'], ['CDG', 'JFK'], ['JFK', 'HOU'], ['HOU', 'SFO'], ['SFO', 'DXB'], ['DXB', 'JFK'], ['JFK', 'SFO'], ['SFO', 'HOU'], ['HOU', 'CDG'], ['CDG', 'DXB'], ['DXB', 'SFO'], ['SFO', 'CDG'], ['CDG', 'HOU'], ['HOU', 'JFK'], ['JFK', 'CDG']]) == ['JFK', 'CDG', 'DXB', 'HOU', 'CDG', 'HOU', 'CDG', 'HOU', 'DXB', 'JFK', 'CDG', 'JFK', 'DXB', 'SFO', 'DXB', 'SFO', 'HOU', 'JFK', 'HOU', 'SFO', 'JFK', 'SFO', 'CDG']\n assert candidate(tickets = [['JFK', 'SFO'], ['SFO', 'DSM'], ['DSM', 'JFK'], ['JFK', 'SFO'], ['SFO', 'LAX'], ['LAX', 'JFK'], ['JFK', 'SFO'], ['SFO', 'DSM']]) == ['JFK', 'SFO', 'DSM', 'JFK', 'SFO', 'LAX', 'JFK', 'SFO', 'DSM']\n assert candidate(tickets = [['JFK', 'HOU'], ['HOU', 'LAX'], ['LAX', 'NRT'], ['NRT', 'DXB'], ['DXB', 'SFO'], ['SFO', 'MIA'], ['MIA', 'JFK'], ['JFK', 'HOU'], ['HOU', 'LAX'], ['LAX', 'NRT'], ['NRT', 'DXB'], ['DXB', 'SFO'], ['SFO', 'MIA'], ['MIA', 'JFK'], ['JFK', 'HOU'], ['HOU', 'LAX'], ['LAX', 'NRT'], ['NRT', 'DXB'], ['DXB', 'SFO'], ['SFO', 'MIA'], ['MIA', 'JFK'], ['JFK', 'HOU'], ['HOU', 'LAX'], ['LAX', 'NRT'], ['NRT', 'DXB'], ['DXB', 'SFO'], ['SFO', 'MIA'], ['MIA', 'JFK']]) == ['JFK', 'HOU', 'LAX', 'NRT', 'DXB', 'SFO', 'MIA', 'JFK', 'HOU', 'LAX', 'NRT', 'DXB', 'SFO', 'MIA', 'JFK', 'HOU', 'LAX', 'NRT', 'DXB', 'SFO', 'MIA', 'JFK', 'HOU', 'LAX', 'NRT', 'DXB', 'SFO', 'MIA', 'JFK']\n assert candidate(tickets = [['JFK', 'BOS'], ['BOS', 'SFO'], ['SFO', 'BOS'], ['BOS', 'JFK'], ['JFK', 'BOS'], ['BOS', 'JFK'], ['JFK', 'BOS'], ['BOS', 'SFO']]) == ['JFK', 'BOS', 'JFK', 'BOS', 'JFK', 'BOS', 'SFO', 'BOS', 'SFO']\n assert candidate(tickets = [['JFK', 'MEX'], ['MEX', 'LAX'], ['LAX', 'JFK'], ['JFK', 'MEX'], ['MEX', 'LAX'], ['LAX', 'MEX'], ['MEX', 'JFK'], ['JFK', 'LAX'], ['LAX', 'MEX'], ['MEX', 'LAX']]) == ['JFK', 'LAX', 'JFK', 'MEX', 'JFK', 'MEX', 'LAX', 'MEX', 'LAX', 'MEX', 'LAX']\n assert candidate(tickets = [['JFK', 'AAA'], ['AAA', 'BBB'], ['BBB', 'CCC'], ['CCC', 'DDD'], ['DDD', 'EEE'], ['EEE', 'DDD'], ['DDD', 'CCC'], ['CCC', 'BBB'], ['BBB', 'AAA'], ['AAA', 'JFK'], ['JFK', 'DDD'], ['DDD', 'EEE'], ['EEE', 'DDD'], ['DDD', 'CCC'], ['CCC', 'BBB'], ['BBB', 'AAA'], ['AAA', 'JFK']]) == ['JFK', 'AAA', 'BBB', 'AAA', 'JFK', 'DDD', 'CCC', 'BBB', 'CCC', 'DDD', 'EEE', 'DDD', 'EEE', 'DDD', 'CCC', 'BBB', 'AAA', 'JFK']\n assert candidate(tickets = [['JFK', 'AUA'], ['AUA', 'SFO'], ['SFO', 'HOU'], ['HOU', 'JFK'], ['JFK', 'AUA'], ['AUA', 'HOU'], ['HOU', 'SFO'], ['SFO', 'JFK'], ['JFK', 'AUA'], ['AUA', 'SFO'], ['SFO', 'HOU'], ['HOU', 'JFK']]) == ['JFK', 'AUA', 'HOU', 'JFK', 'AUA', 'SFO', 'HOU', 'JFK', 'AUA', 'SFO', 'HOU', 'SFO', 'JFK']\n", "comparison": "exact"}, "public_tests": ["[[\"MUC\",\"LHR\"],[\"JFK\",\"MUC\"],[\"SFO\",\"SJC\"],[\"LHR\",\"SFO\"]]", "[[\"JFK\",\"SFO\"],[\"JFK\",\"ATL\"],[\"SFO\",\"ATL\"],[\"ATL\",\"JFK\"],[\"ATL\",\"SFO\"]]"], "hints": [], "metadata": {"canonical_parameter_names": ["tickets"], "leetcode_dataset_entry_point": "Solution().findItinerary", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:06+00:00", "tests_total": 69, "tests_dropped": 6, "flags": ["has_images"], "topic_tags": ["array", "string", "depth-first-search", "graph", "sorting", "heap-priority-queue", "eulerian-circuit", "eulerian-path", "semi-eulerian-graph"]}, "language": "ruby", "interface": {"raw_signature": "def find_itinerary(tickets)", "container": null, "callable": "find_itinerary", "parameters": [{"name": "tickets", "type": "String[][]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 334, "task_id": "increasing-triplet-subsequence", "difficulty": "Medium", "problem_description": "Given an integer array nums, return true if there exists a triple of indices (i, j, k) such that i < j < k and nums[i] < nums[j] < nums[k]. If no such indices exists, return false.\n\nExample 1:\n\nInput: nums = [1,2,3,4,5]\nOutput: true\nExplanation: Any triplet where i < j < k is valid.\n\nExample 2:\n\nInput: nums = [5,4,3,2,1]\nOutput: false\nExplanation: No triplet exists.\n\nExample 3:\n\nInput: nums = [2,1,5,0,4,6]\nOutput: true\nExplanation: One of the valid triplet is (1, 4, 5), because nums[1] == 1 < nums[4] == 4 < nums[5] == 6.\n\nConstraints:\n\n- 1 <= nums.length <= 5 * 10^5\n- -2^31 <= nums[i] <= 2^31 - 1\n\nFollow up: Could you implement a solution that runs in O(n) time complexity and O(1) space complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 4, 3, 2, 1]) == False\n assert candidate(nums = [0, -1, 2, -3, 4, -5, 6, -7]) == True\n assert candidate(nums = [-1, 0, 1, 2, -1, -4]) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1]) == False\n assert candidate(nums = [20, 100, 10, 12, 5, 13]) == True\n assert candidate(nums = [1, 1, 1, 1, 1]) == False\n assert candidate(nums = [1, 2]) == False\n assert candidate(nums = [0, -1, 1]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2]) == False\n assert candidate(nums = [0, 4, 2, 1, 0, -1, -3]) == False\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == True\n assert candidate(nums = [2, 1, 5, 0, 4, 6]) == True\n assert candidate(nums = [1, 2, 0, 4, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5]) == True\n assert candidate(nums = [20, 100, 10, 12, 5, 13]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6]) == True\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18]) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 4, 5, 6, 5, 7, 5]) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5]) == True\n assert candidate(nums = [2147483647, -2147483648, 0, 1, -1, 2, -2, 3, -3]) == True\n assert candidate(nums = [1000000000, 999999999, 1, 1000000001]) == False\n assert candidate(nums = [10, 20, 30, 15, 25, 35]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 1, 9, 2, 5, 1]) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 3]) == True\n assert candidate(nums = [1, 2, 0, 4, 5, 3, 6]) == True\n assert candidate(nums = [1, 5, 2, 4, 3, 6, 7, 8, 9, 10, 0]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 1, 3, 7]) == True\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10]) == False\n assert candidate(nums = [9, 11, 13, 12, 14, 15, 16]) == True\n assert candidate(nums = [3, 1, 4, 2, 5, 7, 8]) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100, 1]) == False\n assert candidate(nums = [1, 3, 2, 4, 6, 5, 7, 8, 10, 9]) == True\n assert candidate(nums = [5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7]) == True\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8]) == True\n assert candidate(nums = [1, 2, 3, 2, 1, 4, 5]) == True\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 21, 22, 23]) == True\n assert candidate(nums = [7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9]) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 4, 7]) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5, 6, 7]) == True\n assert candidate(nums = [2, 1, 5, 0, 4, 6, 3, 8, 7, 9]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == True\n assert candidate(nums = [1, 20, 3, 10, 5, 15, 8, 25, 12]) == True\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == False\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, -2, -3, -4, -5]) == False\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 5]) == True\n assert candidate(nums = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [10, 9, 2, 5, 3, 7, 101, 18, 102, 103]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == True\n assert candidate(nums = [-1000000000, -999999999, -1000000001, -1000000002, -1000000003]) == False\n assert candidate(nums = [10, 1, 11, 1, 12, 1, 13, 1]) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == False\n assert candidate(nums = [10, 1, 20, 2, 30, 3, 40, 4, 50, 5]) == True\n assert candidate(nums = [8, 10, 4, 6, 9, 1, 5, 3, 7, 2]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 2, 4, 6, 8, 10]) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3]) == True\n assert candidate(nums = [3, 1, 4, 2, 5]) == True\n assert candidate(nums = [3, 5, 0, 2, 1, 4, 6, 7, 8, 9]) == True\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91]) == False\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8]) == True\n assert candidate(nums = [1000000000, 999999999, 1000000001, 1000000002, 999999998]) == True\n assert candidate(nums = [7, 7, 7, 8, 7, 7, 7, 7, 9, 7]) == True\n assert candidate(nums = [8, 1, 2, 3, 7, 4, 5]) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 1, 2, 3, 4, 5]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 1, 3, 5]) == True\n assert candidate(nums = [8, 1, 3, 7, 4, 6, 2, 9, 5, 10]) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == False\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4, 10, 11, 12, 13, 14]) == True\n assert candidate(nums = [6, 5, 4, 8, 7, 9, 2, 1, 3, 4]) == True\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000]) == False\n assert candidate(nums = [1, 2, 1, 3, 2, 4, 3, 5, 4, 6]) == True\n assert candidate(nums = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5]) == False\n assert candidate(nums = [1000000000, 999999999, 1000000001, 999999998, 1000000002, 999999997, 1000000003]) == True\n assert candidate(nums = [1, 2, 0, 4, 5, 3, 7, 8, 6, 9]) == True\n assert candidate(nums = [-10, -20, -15, -25, -30, -5, -35]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1]) == True\n assert candidate(nums = [1000000000, 999999999, 1000000001, 1000000002, 1000000003]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == True\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8]) == False\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5]) == True\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8]) == False\n assert candidate(nums = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, -1, -2, -3]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [1000000000, 500000000, 750000000, 1000000001, 1000000002]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 0, 6, 7, 8]) == True\n assert candidate(nums = [3, 2, 1, 2, 1, 0, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [3, 1, 2, 4, 6, 5, 7, 9, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 4, 5, 6]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1]) == False\n assert candidate(nums = [1000000000, -1000000000, 500000000, -500000000, 100000000, -100000000, 50000000, -50000000]) == True\n assert candidate(nums = [1, 5, 0, 4, 2, 3, 6]) == True\n assert candidate(nums = [1, 2, 3, 4, 3, 5, 4, 6, 5, 7, 6, 8]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 4]) == True\n assert candidate(nums = [3, 1, 2, 4, 3, 5, 6, 1, 2, 7]) == True\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [10, 20, 15, 25, 30, 5, 35]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8]) == True\n assert candidate(nums = [1, 3, 2, 4, 3, 5]) == True\n assert candidate(nums = [0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0]) == True\n assert candidate(nums = [8, 9, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [1000000000, 999999999, 1000000001, 1000000002, 999999998, 1000000003]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 3, 5]) == True\n assert candidate(nums = [7, 7, 7, 1, 2, 8, 10, 9, 11]) == True\n assert candidate(nums = [9, 11, 8, 9, 10, 7, 10]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9]) == False\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 1, 9, 5, 5, 5]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 4, 7, 6, 8, 9]) == True\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [5, 1, 4, 2, 3, 6]) == True\n assert candidate(nums = [2, 1, 3, 0, 4, -1, 5, 6, 7, 8]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5]) == True\n assert candidate(nums = [1, 2, 2, 1, 2, 3]) == True\n", "comparison": "exact"}, "public_tests": ["[1,2,3,4,5]", "[5,4,3,2,1]", "[2,1,5,0,4,6]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().increasingTriplet", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:11+00:00", "tests_total": 124, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "greedy", "longest-increasing-subsequence"]}, "language": "ruby", "interface": {"raw_signature": "def increasing_triplet(nums)", "container": null, "callable": "increasing_triplet", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 335, "task_id": "self-crossing", "difficulty": "Hard", "problem_description": "You are given an array of integers distance.\n\nYou start at the point (0, 0) on an X-Y plane, and you move distance[0] meters to the north, then distance[1] meters to the west, distance[2] meters to the south, distance[3] meters to the east, and so on. In other words, after each move, your direction changes counter-clockwise.\n\nReturn true if your path crosses itself or false if it does not.\n\nExample 1:\n\nInput: distance = [2,1,1,2]\nOutput: true\nExplanation: The path crosses itself at the point (0, 1).\n\nExample 2:\n\nInput: distance = [1,2,3,4]\nOutput: false\nExplanation: The path does not cross itself at any point.\n\nExample 3:\n\nInput: distance = [1,1,1,2,1]\nOutput: true\nExplanation: The path crosses itself at the point (0, 0).\n\nConstraints:\n\n- 1 <= distance.length <= 10^5\n- 1 <= distance[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(distance = [3, 5, 3, 4, 3, 4]) == True\n assert candidate(distance = [3, 3, 3, 2, 1]) == False\n assert candidate(distance = [1, 2, 3, 4, 1, 2, 3, 4]) == True\n assert candidate(distance = [1, 1, 1, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(distance = [1, 2, 3, 4, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == False\n assert candidate(distance = [3, 3, 3, 2, 1, 1]) == False\n assert candidate(distance = [1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 2, 2, 3, 4, 4, 5, 5]) == False\n assert candidate(distance = [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5]) == True\n assert candidate(distance = [6, 6, 6, 6, 6, 1]) == True\n assert candidate(distance = [3, 3, 3, 2, 2, 3, 4]) == True\n assert candidate(distance = [1, 2, 3, 4]) == False\n assert candidate(distance = [1, 2, 3, 4, 5, 6]) == False\n assert candidate(distance = [2, 1, 1, 2]) == True\n assert candidate(distance = [1, 1, 2, 2, 3, 4, 5, 6, 7, 8]) == False\n assert candidate(distance = [5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(distance = [1, 2, 3, 4, 5]) == False\n assert candidate(distance = [1, 1, 2, 2, 3, 3]) == False\n assert candidate(distance = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == False\n assert candidate(distance = [10, 2, 10, 1, 10, 2, 10]) == True\n assert candidate(distance = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 3, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 2, 3, 4, 5, 4, 3, 2, 1, 1]) == True\n assert candidate(distance = [10, 10, 1, 1, 10, 10, 1, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [3, 1, 3, 1, 3, 1, 3]) == True\n assert candidate(distance = [1, 2, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == True\n assert candidate(distance = [5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2]) == True\n assert candidate(distance = [1, 3, 2, 2, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [10, 1, 1, 10, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 1]) == False\n assert candidate(distance = [3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3]) == True\n assert candidate(distance = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 1]) == True\n assert candidate(distance = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == True\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == True\n assert candidate(distance = [1, 2, 3, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 1]) == False\n assert candidate(distance = [5, 5, 5, 5, 1, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [5, 10, 10, 5, 5, 10, 10, 5, 5, 10, 10]) == True\n assert candidate(distance = [1, 2, 3, 4, 3, 3, 2, 2, 1, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == True\n assert candidate(distance = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2]) == True\n assert candidate(distance = [1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1]) == True\n assert candidate(distance = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == False\n assert candidate(distance = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 1]) == False\n assert candidate(distance = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19]) == False\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 11]) == True\n assert candidate(distance = [5, 5, 1, 1, 5, 5, 1, 1, 5, 5, 1, 1, 5, 5, 1, 1]) == True\n assert candidate(distance = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7]) == True\n assert candidate(distance = [1, 1, 2, 2, 3, 3, 2, 2, 1, 1]) == True\n assert candidate(distance = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 4, 5, 4, 5, 4]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == True\n assert candidate(distance = [3, 3, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 1, 1]) == False\n assert candidate(distance = [5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1]) == True\n assert candidate(distance = [2, 3, 1, 4, 3, 2, 1]) == True\n assert candidate(distance = [8, 2, 8, 2, 8, 2, 8, 2, 8, 2]) == True\n assert candidate(distance = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 5, 5, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [5, 1, 2, 3, 4, 5, 6, 4, 3, 2, 1]) == True\n assert candidate(distance = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1]) == False\n assert candidate(distance = [2, 3, 1, 1, 2, 1, 1, 2, 3, 2]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [10, 10, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 3, 3, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == False\n assert candidate(distance = [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == True\n assert candidate(distance = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == True\n assert candidate(distance = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == False\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == True\n assert candidate(distance = [5, 6, 7, 8, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1]) == False\n assert candidate(distance = [1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1]) == True\n assert candidate(distance = [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7]) == True\n assert candidate(distance = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8]) == False\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(distance = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == True\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 5, 5, 5]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 4, 3, 3, 2, 2, 1, 1]) == True\n assert candidate(distance = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 100]) == False\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(distance = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 3, 3, 2, 1, 2, 1]) == True\n assert candidate(distance = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8]) == True\n assert candidate(distance = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(distance = [5, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(distance = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n", "comparison": "exact"}, "public_tests": ["[2,1,1,2]", "[1,2,3,4]", "[1,1,1,2,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["distance"], "leetcode_dataset_entry_point": "Solution().isSelfCrossing", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:13+00:00", "tests_total": 113, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "math", "geometry"]}, "language": "ruby", "interface": {"raw_signature": "def is_self_crossing(distance)", "container": null, "callable": "is_self_crossing", "parameters": [{"name": "distance", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 336, "task_id": "palindrome-pairs", "difficulty": "Hard", "problem_description": "You are given a 0-indexed array of unique strings words.\n\nA palindrome pair is a pair of integers (i, j) such that:\n\n- 0 <= i, j < words.length,\n- i != j, and\n- words[i] + words[j] (the concatenation of the two strings) is a palindrome.\n\nReturn an array of all the palindrome pairs of words.\n\nYou must write an algorithm with O(sum of words[i].length) runtime complexity.\n\nExample 1:\n\nInput: words = [\"abcd\",\"dcba\",\"lls\",\"s\",\"sssll\"]\nOutput: [[0,1],[1,0],[3,2],[2,4]]\nExplanation: The palindromes are [\"abcddcba\",\"dcbaabcd\",\"slls\",\"llssssll\"]\n\nExample 2:\n\nInput: words = [\"bat\",\"tab\",\"cat\"]\nOutput: [[0,1],[1,0]]\nExplanation: The palindromes are [\"battab\",\"tabbat\"]\n\nExample 3:\n\nInput: words = [\"a\",\"\"]\nOutput: [[0,1],[1,0]]\nExplanation: The palindromes are [\"a\",\"a\"]\n\nConstraints:\n\n- 1 <= words.length <= 5000\n- 0 <= words[i].length <= 300\n- words[i] consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['aabb', 'bbaa', 'abc', 'cba']) == [[0, 1], [1, 0], [2, 3], [3, 2]]\n assert candidate(words = ['bat', 'tab', 'cat']) == [[0, 1], [1, 0]]\n assert candidate(words = ['abc', 'cba', 'bca', 'xyz', 'zyx']) == [[0, 1], [1, 0], [3, 4], [4, 3]]\n assert candidate(words = ['abba', 'a', 'abc', 'cba']) == [[2, 3], [3, 2]]\n assert candidate(words = ['abcd', 'dcba', '', 'cba', 'abc']) == [[0, 3], [0, 1], [4, 1], [1, 0], [3, 4], [4, 3]]\n assert candidate(words = ['abba', 'a', 'abc', 'cba', 'bbaa', 'aba']) == [[2, 3], [3, 2]]\n assert candidate(words = ['ab', 'ba', 'abc', 'cba', 'abcd', 'dcba']) == [[0, 1], [1, 0], [2, 1], [2, 3], [0, 3], [3, 2], [4, 3], [4, 5], [2, 5], [5, 4]]\n assert candidate(words = ['aa', 'bb', 'aaa', 'bbb', 'aaaa', 'bbbb']) == [[0, 2], [2, 0], [1, 3], [3, 1], [2, 4], [4, 0], [0, 4], [4, 2], [3, 5], [5, 1], [1, 5], [5, 3]]\n assert candidate(words = ['aa', 'b', 'aaa', 'bb']) == [[0, 2], [2, 0], [3, 1], [1, 3]]\n assert candidate(words = ['a', '']) == [[0, 1], [1, 0]]\n assert candidate(words = ['abcd', 'dcba', 'lls', 's', 'sssll']) == [[0, 1], [1, 0], [3, 2], [2, 4]]\n assert candidate(words = ['abc', 'cba', 'bba', 'aab', 'aaa']) == [[0, 1], [1, 0]]\n assert candidate(words = ['a', 'b', 'c', 'd']) == []\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']) == []\n assert candidate(words = ['a', '']) == [[0, 1], [1, 0]]\n assert candidate(words = ['tacocat', 'racecar', 'banana', 'ananab', 'civic']) == [[2, 3], [3, 2]]\n assert candidate(words = ['aabb', 'bbaa', 'abab', 'baba', 'aaaa', 'bbbb']) == [[0, 1], [1, 0], [2, 3], [3, 2]]\n assert candidate(words = ['abcd', 'dcba']) == [[0, 1], [1, 0]]\n assert candidate(words = ['dcb', 'abcd', 'cba', 'abc', 'bca', 'bac', 'cab', 'a']) == [[0, 1], [1, 2], [2, 3], [3, 2], [5, 6], [6, 5]]\n assert candidate(words = ['abab', 'baba', 'abba', 'baab', 'aaaa', 'bbbb']) == [[0, 1], [1, 0]]\n assert candidate(words = ['abba', 'a', 'baa', 'b']) == [[2, 3]]\n assert candidate(words = ['abcd', 'dcba', 'lls', 's', 'sssll', 'ddsssll']) == [[0, 1], [1, 0], [3, 2], [2, 4]]\n assert candidate(words = ['a', 'abc', 'aba', 'xyz', 'zyx']) == [[3, 4], [4, 3]]\n assert candidate(words = ['', 'a', 'b', 'c', 'd']) == [[1, 0], [0, 1], [2, 0], [0, 2], [3, 0], [0, 3], [4, 0], [0, 4]]\n assert candidate(words = ['aabb', 'bbaa', 'aaaa', 'abba', 'baab']) == [[0, 1], [1, 0]]\n assert candidate(words = ['dcb', 'abcd', 'cba', 'cbcd']) == [[0, 1], [1, 2], [0, 3]]\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa', 'aaaaaaaaaaa', 'aaaaaaaaaaaa', 'aaaaaaaaaaaaa', 'aaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaa', 'aaaaaaaaaaaaaaaaaaaa']) == [[1, 0], [0, 1], [2, 0], [1, 2], [2, 1], [0, 2], [3, 0], [2, 3], [3, 1], [1, 3], [3, 2], [0, 3], [4, 0], [3, 4], [4, 1], [2, 4], [4, 2], [1, 4], [4, 3], [0, 4], [5, 0], [4, 5], [5, 1], [3, 5], [5, 2], [2, 5], [5, 3], [1, 5], [5, 4], [0, 5], [6, 0], [5, 6], [6, 1], [4, 6], [6, 2], [3, 6], [6, 3], [2, 6], [6, 4], [1, 6], [6, 5], [0, 6], [7, 0], [6, 7], [7, 1], [5, 7], [7, 2], [4, 7], [7, 3], [3, 7], [7, 4], [2, 7], [7, 5], [1, 7], [7, 6], [0, 7], [8, 0], [7, 8], [8, 1], [6, 8], [8, 2], [5, 8], [8, 3], [4, 8], [8, 4], [3, 8], [8, 5], [2, 8], [8, 6], [1, 8], [8, 7], [0, 8], [9, 0], [8, 9], [9, 1], [7, 9], [9, 2], [6, 9], [9, 3], [5, 9], [9, 4], [4, 9], [9, 5], [3, 9], [9, 6], [2, 9], [9, 7], [1, 9], [9, 8], [0, 9], [10, 0], [9, 10], [10, 1], [8, 10], [10, 2], [7, 10], [10, 3], [6, 10], [10, 4], [5, 10], [10, 5], [4, 10], [10, 6], [3, 10], [10, 7], [2, 10], [10, 8], [1, 10], [10, 9], [0, 10], [11, 0], [10, 11], [11, 1], [9, 11], [11, 2], [8, 11], [11, 3], [7, 11], [11, 4], [6, 11], [11, 5], [5, 11], [11, 6], [4, 11], [11, 7], [3, 11], [11, 8], [2, 11], [11, 9], [1, 11], [11, 10], [0, 11], [12, 0], [11, 12], [12, 1], [10, 12], [12, 2], [9, 12], [12, 3], [8, 12], [12, 4], [7, 12], [12, 5], [6, 12], [12, 6], [5, 12], [12, 7], [4, 12], [12, 8], [3, 12], [12, 9], [2, 12], [12, 10], [1, 12], [12, 11], [0, 12], [13, 0], [12, 13], [13, 1], [11, 13], [13, 2], [10, 13], [13, 3], [9, 13], [13, 4], [8, 13], [13, 5], [7, 13], [13, 6], [6, 13], [13, 7], [5, 13], [13, 8], [4, 13], [13, 9], [3, 13], [13, 10], [2, 13], [13, 11], [1, 13], [13, 12], [0, 13], [14, 0], [13, 14], [14, 1], [12, 14], [14, 2], [11, 14], [14, 3], [10, 14], [14, 4], [9, 14], [14, 5], [8, 14], [14, 6], [7, 14], [14, 7], [6, 14], [14, 8], [5, 14], [14, 9], [4, 14], [14, 10], [3, 14], [14, 11], [2, 14], [14, 12], [1, 14], [14, 13], [0, 14], [15, 0], [14, 15], [15, 1], [13, 15], [15, 2], [12, 15], [15, 3], [11, 15], [15, 4], [10, 15], [15, 5], [9, 15], [15, 6], [8, 15], [15, 7], [7, 15], [15, 8], [6, 15], [15, 9], [5, 15], [15, 10], [4, 15], [15, 11], [3, 15], [15, 12], [2, 15], [15, 13], [1, 15], [15, 14], [0, 15], [16, 0], [15, 16], [16, 1], [14, 16], [16, 2], [13, 16], [16, 3], [12, 16], [16, 4], [11, 16], [16, 5], [10, 16], [16, 6], [9, 16], [16, 7], [8, 16], [16, 8], [7, 16], [16, 9], [6, 16], [16, 10], [5, 16], [16, 11], [4, 16], [16, 12], [3, 16], [16, 13], [2, 16], [16, 14], [1, 16], [16, 15], [0, 16], [17, 0], [16, 17], [17, 1], [15, 17], [17, 2], [14, 17], [17, 3], [13, 17], [17, 4], [12, 17], [17, 5], [11, 17], [17, 6], [10, 17], [17, 7], [9, 17], [17, 8], [8, 17], [17, 9], [7, 17], [17, 10], [6, 17], [17, 11], [5, 17], [17, 12], [4, 17], [17, 13], [3, 17], [17, 14], [2, 17], [17, 15], [1, 17], [17, 16], [0, 17], [18, 0], [17, 18], [18, 1], [16, 18], [18, 2], [15, 18], [18, 3], [14, 18], [18, 4], [13, 18], [18, 5], [12, 18], [18, 6], [11, 18], [18, 7], [10, 18], [18, 8], [9, 18], [18, 9], [8, 18], [18, 10], [7, 18], [18, 11], [6, 18], [18, 12], [5, 18], [18, 13], [4, 18], [18, 14], [3, 18], [18, 15], [2, 18], [18, 16], [1, 18], [18, 17], [0, 18], [19, 0], [18, 19], [19, 1], [17, 19], [19, 2], [16, 19], [19, 3], [15, 19], [19, 4], [14, 19], [19, 5], [13, 19], [19, 6], [12, 19], [19, 7], [11, 19], [19, 8], [10, 19], [19, 9], [9, 19], [19, 10], [8, 19], [19, 11], [7, 19], [19, 12], [6, 19], [19, 13], [5, 19], [19, 14], [4, 19], [19, 15], [3, 19], [19, 16], [2, 19], [19, 17], [1, 19], [19, 18], [0, 19]]\n assert candidate(words = ['a', 'b', 'c', '', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']) == [[0, 3], [3, 0], [1, 3], [3, 1], [2, 3], [3, 2], [4, 3], [3, 4], [5, 3], [3, 5], [6, 3], [3, 6], [7, 3], [3, 7], [8, 3], [3, 8], [9, 3], [3, 9], [10, 3], [3, 10], [11, 3], [3, 11], [12, 3], [3, 12], [13, 3], [3, 13], [14, 3], [3, 14], [15, 3], [3, 15], [16, 3], [3, 16], [17, 3], [3, 17], [18, 3], [3, 18], [19, 3], [3, 19], [20, 3], [3, 20], [21, 3], [3, 21], [22, 3], [3, 22], [23, 3], [3, 23], [24, 3], [3, 24], [25, 3], [3, 25], [26, 3], [3, 26]]\n assert candidate(words = ['noon', 'civic', 'level', 'rotor', 'deified', 'redder', 'repaper', 'refer', 'reviver', 'reviled']) == []\n assert candidate(words = ['abba', 'baab', 'aabb', 'bbaa', 'aaaa', 'aaab', 'abaa', 'baaa', 'bbba', 'baba']) == [[2, 3], [3, 2], [5, 7], [7, 5]]\n assert candidate(words = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij']) == [[1, 0]]\n assert candidate(words = ['noon', 'civic', 'rotor', 'refer', 'deed', 'level', 'kayak', 'reviled', 'repaid']) == []\n assert candidate(words = ['race', 'car', '', '', 'racecar', 'ecar', 'cec', 'ceccec']) == [[0, 1], [0, 5], [2, 3], [4, 3], [3, 4], [5, 0], [6, 3], [3, 6], [7, 3], [7, 6], [6, 7], [3, 7]]\n assert candidate(words = ['abcdabcd', 'dcbaabcd', 'cdabcd', 'dcbabcd', 'abcbabc', 'cbababc', 'abcabcba', 'bcbabcba', 'cdcdcdcd', 'dcddcddc', 'abcd', 'dcba', 'cd', 'dc', 'abcdabc', 'dcbaabc', 'abc', 'cba']) == [[15, 1], [6, 17], [4, 7], [12, 9], [10, 17], [10, 11], [16, 11], [11, 10], [12, 13], [13, 12], [16, 17], [17, 16]]\n assert candidate(words = ['race', 'car', 'cec', 'dec', 'ded', 'level', 'deified', 'civic']) == [[0, 1]]\n assert candidate(words = ['abcde', 'edcba', 'fgh', 'hgf', 'xyz', 'zyx', 'ijk', 'kji', 'mnop', 'ponm', 'qrst', 'tsrq', 'uvw', 'wvu']) == [[0, 1], [1, 0], [2, 3], [3, 2], [4, 5], [5, 4], [6, 7], [7, 6], [8, 9], [9, 8], [10, 11], [11, 10], [12, 13], [13, 12]]\n assert candidate(words = ['race', 'ecar', 'car', 'racecar', 'carrace', 'arcec', 'cecarr', 'racecarcar']) == [[0, 2], [0, 1], [1, 0]]\n assert candidate(words = ['aabbcc', 'ccbbaa', 'abcde', 'edcba', 'abcd', 'dcba']) == [[0, 1], [1, 0], [2, 5], [2, 3], [4, 3], [3, 2], [4, 5], [5, 4]]\n assert candidate(words = ['aabbcc', 'ccbbaa', 'abc', 'cba', 'abcd', 'dcba', 'abcde', 'edcba', 'abcdef', 'fedcba', 'abcdefg', 'gfedcba', 'abcdefgh', 'hgfedcba', 'abcdefghi', 'ihgfedcba']) == [[0, 1], [1, 0], [2, 3], [3, 2], [4, 3], [4, 5], [2, 5], [5, 4], [6, 5], [6, 7], [4, 7], [7, 6], [8, 7], [8, 9], [6, 9], [9, 8], [10, 9], [10, 11], [8, 11], [11, 10], [12, 11], [12, 13], [10, 13], [13, 12], [14, 13], [14, 15], [12, 15], [15, 14]]\n assert candidate(words = ['abcde', 'edcba', 'fghij', 'jihgf', 'klmno', 'onmlk', 'pqrst', 'tsrqp', 'uvwxy', 'yxwuv']) == [[0, 1], [1, 0], [2, 3], [3, 2], [4, 5], [5, 4], [6, 7], [7, 6]]\n assert candidate(words = ['abab', 'baba', 'ab', 'ba', 'a', 'b', '', 'aba', 'bab', 'bba', 'aab', 'baa']) == [[0, 4], [8, 0], [0, 7], [5, 0], [0, 1], [1, 5], [7, 1], [1, 8], [4, 1], [1, 0], [2, 4], [5, 2], [2, 3], [3, 5], [4, 3], [3, 2], [4, 6], [6, 4], [5, 6], [6, 5], [7, 6], [2, 7], [7, 3], [6, 7], [8, 6], [3, 8], [8, 2], [6, 8], [2, 9], [4, 9], [3, 10], [5, 10], [10, 11], [11, 5], [11, 2], [11, 10]]\n assert candidate(words = ['aabbcc', 'ccbbaa', 'abcabc', 'cbabca', 'bacbac', 'abacab', 'bacbac', 'cababc', 'bcaacb', 'aabb', 'bbaa', 'aabbaa', 'abbbaa', 'aaabbb', 'baaabb', 'aababb', 'abbaab', 'bababa']) == [[0, 10], [0, 1], [9, 1], [1, 0], [9, 10], [10, 9], [9, 11], [11, 10]]\n assert candidate(words = ['xyxy', 'yxyx', 'yxx', 'xx', 'xyyx', 'yyxy', 'xyx', 'yyy', 'xyyxxyy', 'yyxxyyx', 'xyyyxyx', 'yyxyxxy', 'xyyxyyx', 'yyxxyxy', 'xyyyxxy', 'yyxyxyx', 'xyyxyxy', 'yyxxyyy', 'xyyyxyy', 'yyxxyxy', 'xyyxyyx', 'yyxxyxy', 'xyyyxxy', 'yyxyxyx', 'xyyxyxy', 'yyxxyyy', 'xyyyxyy', 'yyxxyxy', 'xyyxyyx', 'yyxxyxy', 'xyyyxxy', 'yyxyxyx', 'xyyxyxy', 'yyxxyyy']) == [[0, 6], [0, 1], [6, 1], [1, 0], [3, 2], [8, 9], [9, 8], [12, 28], [16, 4], [20, 28], [24, 4], [32, 4]]\n assert candidate(words = ['abcde', 'edcba', 'fghij', 'jihgf', 'klmno', 'onmlk']) == [[0, 1], [1, 0], [2, 3], [3, 2], [4, 5], [5, 4]]\n assert candidate(words = ['ab', 'ba', 'abc', 'cba', 'abcd', 'dcba', 'abcde', 'edcba', 'abcdef', 'fedcba', 'abcdefg', 'gfedcba']) == [[0, 1], [1, 0], [2, 1], [2, 3], [0, 3], [3, 2], [4, 3], [4, 5], [2, 5], [5, 4], [6, 5], [6, 7], [4, 7], [7, 6], [8, 7], [8, 9], [6, 9], [9, 8], [10, 9], [10, 11], [8, 11], [11, 10]]\n assert candidate(words = ['ab', 'ba', 'abc', 'cba', 'abcd', 'dcba', 'abcde', 'edcba', 'abcdef', 'fedcba', 'abcdefg', 'gfedcba', 'abcdefgh', 'hgfedcba', 'abcdefghi', 'ihgfedcba', 'abcdefghij', 'jihgfedcba', 'abcdefghijk', 'kjihgfedcba', 'abcdefghijkl', 'lkjihgfedcba', 'abcdefghijklm', 'mlkjihgfedcba', 'abcdefghijklmn', 'nmlkjihgfedcba', 'abcdefghijklmno', 'onmlkjihgfedcba', 'abcdefghijklmnop', 'ponmlkjihgfedcba', 'abcdefghijklmnopq', 'qponmlkjihgfedcba', 'abcdefghijklmnopqr', 'rponmlkjihgfedcba', 'abcdefghijklmnopqrs', 'spnmlkjihgfedcba', 'abcdefghijklmnopqrst', 'tspnmlkjihgfedcba', 'abcdefghijklmnopqrstu', 'ustpnmlkjihgfedcba', 'abcdefghijklmnopqrstuv', 'vustpnmlkjihgfedcba', 'abcdefghijklmnopqrstuvw', 'wvustpnmlkjihgfedcba', 'abcdefghijklmnopqrstuvwx', 'xwvustpnmlkjihgfedcba', 'abcdefghijklmnopqrstuvwxy', 'yxwvustpnmlkjihgfedcba', 'abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba']) == [[0, 1], [1, 0], [2, 1], [2, 3], [0, 3], [3, 2], [4, 3], [4, 5], [2, 5], [5, 4], [6, 5], [6, 7], [4, 7], [7, 6], [8, 7], [8, 9], [6, 9], [9, 8], [10, 9], [10, 11], [8, 11], [11, 10], [12, 11], [12, 13], [10, 13], [13, 12], [14, 13], [14, 15], [12, 15], [15, 14], [16, 15], [16, 17], [14, 17], [17, 16], [18, 17], [18, 19], [16, 19], [19, 18], [20, 19], [20, 21], [18, 21], [21, 20], [22, 21], [22, 23], [20, 23], [23, 22], [24, 23], [24, 25], [22, 25], [25, 24], [26, 25], [26, 27], [24, 27], [27, 26], [28, 27], [28, 29], [26, 29], [29, 28], [30, 29], [30, 31], [28, 31], [31, 30], [32, 31], [28, 33], [48, 49], [46, 49], [49, 48]]\n assert candidate(words = ['abcba', 'bcbaa', 'cbaab', 'baabc', 'aabcd', 'bcdcb', 'cdcbc', 'dcbcd', 'cbcdc', 'bcdbc', 'abcdc']) == [[2, 3], [3, 2], [6, 8], [8, 6]]\n assert candidate(words = ['abcde', 'edcba', '', '', 'abcdeedcba', 'aabcdeedcbaa', 'aaabcdeedcbaaa', 'aaaabcdeedcbaaaa', 'aaaaabcdeedcbaaaaa', 'abcdeedcbaaaaa', 'aabcdeedcbaaaaaa', 'aaabcdeedcbaaaaaaa', 'aaaabcdeedcbaaaaaaaa', 'aaaaabcdeedcbaaaaaaaaa', 'abcdeedcbaaaaaaaaaa']) == [[0, 1], [1, 0], [2, 3], [4, 3], [3, 4], [5, 3], [3, 5], [6, 3], [3, 6], [7, 3], [3, 7], [8, 3], [8, 9], [3, 8], [9, 4], [10, 5], [11, 6], [12, 7], [13, 9], [13, 8], [14, 4]]\n assert candidate(words = ['abacaba', 'abcbaca', 'abcdcba', 'abeceda', 'aabcdcbba', 'abcddcba', 'deified', 'civic', 'level', 'rotor', 'madam', 'refer', 'repaper', 'reviver', 'reviled', 'redder']) == []\n assert candidate(words = ['abacaba', 'acababa', 'bacabab', 'cabaaba', '', 'abacaba', 'acababa', 'bacabab', 'cabaaba']) == [[0, 4], [0, 5], [4, 0], [5, 4], [4, 5]]\n assert candidate(words = ['a', 'ab', 'abc', 'abcd', 'abcba', 'abccba', 'abcdcba', 'abccbaa']) == [[1, 0], [7, 5], [0, 7]]\n assert candidate(words = ['palindrome', 'emordnilap', 'word', 'drow', 'madam', 'ada', 'radar', 'kayak', 'reviled', 'devil']) == [[0, 1], [1, 0], [2, 3], [3, 2]]\n assert candidate(words = ['noon', 'moon', 'noontime', 'timenoon', 'time', 'emit']) == [[5, 2], [3, 5], [4, 5], [5, 4]]\n assert candidate(words = ['xyx', 'yxy', 'xxyy', 'yyxx', 'xyyx', 'yxxy', 'xyxx', 'yxx', 'xxy', 'yy', 'xy', 'yx', 'x', 'y', '', 'aaa', 'bbb', 'ccc', 'aaab', 'bbba', 'aaa', 'bbbb', 'cccc', 'dddd', 'dddb', 'bbbd', 'aaa', 'bbbb', 'cccc', 'dddd', 'dddb', 'bbbd']) == [[0, 14], [10, 0], [0, 11], [14, 0], [1, 14], [11, 1], [1, 10], [14, 1], [9, 2], [2, 7], [2, 3], [8, 3], [3, 9], [3, 2], [4, 14], [14, 4], [5, 14], [7, 5], [5, 8], [14, 5], [8, 6], [6, 11], [6, 0], [12, 6], [7, 13], [7, 10], [7, 8], [11, 8], [13, 8], [8, 7], [9, 14], [9, 13], [13, 9], [14, 9], [10, 12], [13, 10], [10, 11], [11, 13], [12, 11], [11, 10], [12, 14], [14, 12], [13, 14], [14, 13], [15, 14], [15, 26], [14, 15], [16, 14], [14, 16], [17, 14], [14, 17], [18, 26], [19, 16], [20, 14], [20, 26], [14, 20], [21, 14], [16, 21], [21, 16], [21, 27], [14, 21], [22, 14], [17, 22], [22, 17], [22, 28], [14, 22], [23, 14], [23, 29], [14, 23], [25, 16], [26, 14], [14, 26], [27, 14], [16, 27], [27, 16], [14, 27], [28, 14], [17, 28], [28, 17], [14, 28], [29, 14], [14, 29], [31, 16]]\n assert candidate(words = ['ab', 'ba', 'abc', 'cba', 'abcd', 'dcba', 'abcde', 'edcba', 'abcdef', 'fedcba', 'abcdefg', 'gfedcba', 'abcdefgh', 'hgfedcba', 'abcdefghi', 'ihgfedcba', 'abcdefghij', 'jihgfedcba']) == [[0, 1], [1, 0], [2, 1], [2, 3], [0, 3], [3, 2], [4, 3], [4, 5], [2, 5], [5, 4], [6, 5], [6, 7], [4, 7], [7, 6], [8, 7], [8, 9], [6, 9], [9, 8], [10, 9], [10, 11], [8, 11], [11, 10], [12, 11], [12, 13], [10, 13], [13, 12], [14, 13], [14, 15], [12, 15], [15, 14], [16, 15], [16, 17], [14, 17], [17, 16]]\n assert candidate(words = ['amanaplanacanalpanama', 'noon', 'civic', 'rotor', 'refer', 'deed', 'level', 'kayak', 'reviled', 'repaid']) == []\n assert candidate(words = ['aaaa', 'aaab', 'baaa', 'baba', 'abab', 'abba']) == [[1, 2], [2, 1], [3, 4], [4, 3]]\n assert candidate(words = ['abcdexyz', 'zyxcdeba', 'mnop', 'ponm', '', 'pponm', 'mnopq', 'zyxwvutsrqp', 'rqsponmlkjihgfedcba']) == [[2, 3], [3, 2], [2, 5], [6, 3]]\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == [[1, 0], [0, 1], [2, 0], [1, 2], [2, 1], [0, 2], [3, 0], [2, 3], [3, 1], [1, 3], [3, 2], [0, 3], [4, 0], [3, 4], [4, 1], [2, 4], [4, 2], [1, 4], [4, 3], [0, 4], [5, 0], [4, 5], [5, 1], [3, 5], [5, 2], [2, 5], [5, 3], [1, 5], [5, 4], [0, 5], [6, 0], [5, 6], [6, 1], [4, 6], [6, 2], [3, 6], [6, 3], [2, 6], [6, 4], [1, 6], [6, 5], [0, 6], [7, 0], [6, 7], [7, 1], [5, 7], [7, 2], [4, 7], [7, 3], [3, 7], [7, 4], [2, 7], [7, 5], [1, 7], [7, 6], [0, 7], [8, 0], [7, 8], [8, 1], [6, 8], [8, 2], [5, 8], [8, 3], [4, 8], [8, 4], [3, 8], [8, 5], [2, 8], [8, 6], [1, 8], [8, 7], [0, 8], [9, 0], [8, 9], [9, 1], [7, 9], [9, 2], [6, 9], [9, 3], [5, 9], [9, 4], [4, 9], [9, 5], [3, 9], [9, 6], [2, 9], [9, 7], [1, 9], [9, 8], [0, 9]]\n assert candidate(words = ['xyx', 'yxy', 'xyyx', 'yyxy', 'xyxyy', 'yxyxy', 'xyxyxy', 'yxyxyx', 'xyxyxyx', 'yxyxyxy', 'xyxyxyxy']) == [[1, 3], [3, 4], [4, 0], [5, 6], [6, 0], [1, 6], [6, 7], [7, 1], [0, 7], [7, 5], [7, 6], [6, 8], [8, 7], [7, 9], [9, 6], [9, 10], [10, 0], [5, 10], [1, 10], [10, 8]]\n assert candidate(words = ['race', 'ecar', 'car', 'arc', 'racer', 'carrace', '', 'a', 'aa', 'aaa']) == [[0, 2], [0, 1], [1, 0], [4, 1], [7, 6], [6, 7], [8, 6], [8, 7], [7, 8], [6, 8], [9, 6], [9, 7], [8, 9], [9, 8], [7, 9], [6, 9]]\n assert candidate(words = ['racecar', 'carerac', 'level', 'deified', 'civic']) == []\n assert candidate(words = ['noon', 'moon', 'noonmoon', 'moonoon', 'moonnoon', 'noonnoo']) == [[5, 4]]\n assert candidate(words = ['madam', 'racecar', 'level', 'noon', 'civic', 'rotor', 'refer', 'deified', 'reviled', 'deed', 'peep', 'radar', 'repaper', 'kayak', 'reviver', 'redder', 'repel']) == []\n assert candidate(words = ['aabbcc', 'ccbbaa', 'abcabc', 'cbacba', 'xyzzyx', 'yxzzxy', 'mnopqr', 'rqponm', '', 'pqr', 'qpon']) == [[0, 1], [1, 0], [2, 3], [3, 2], [4, 8], [8, 4], [5, 8], [8, 5], [6, 7], [7, 6]]\n assert candidate(words = ['aabbcc', 'ccbbaa', 'bbccaa', 'aabb', 'bbaa', 'ccaa', 'aabbccaa', 'aabbccbb', 'aabbaa', 'bbcc', 'ccbb', 'aabbccc', 'ccbaab', 'bbccaabb', 'ccaabbbc', 'aabbbcc', 'ccbbbaa', 'bbcaabbcc', 'aabcc', 'bbaac', 'ccaab', 'bbaabbcc', 'aabbbccaa', 'aabbbccbb', 'aaabbccaa', 'aaabbccbb', 'aabbbbcc', 'bbccbbbb', 'aabbbbaa', 'bbaaaa', 'ccaabbbaa', 'aabbbcccc', 'cccaabbb', 'bbcccaabb', 'aabbbcccbb', 'bbbaaabbbc', 'ccbbbaabbb', 'bbbaabbbcc', 'aabbbbaabbcc', 'aabbbbaabbbc', 'bbbaabbccbb', 'bbbaabbbccc', 'bbbaaabbbcc', 'aabbbbaaabbb', 'bbbaaabbbb', 'aabbbaaaaabb', 'aabbbbaaaaab', 'aabbbaaaaaaa', 'bbaaaaaaabbb', 'bbaaaaaaaabb', 'bbaaaaaaabba', 'bbaaaaaaaaab', 'bbaaaaaaaaaa']) == [[10, 0], [0, 4], [0, 1], [3, 1], [1, 9], [1, 0], [2, 10], [3, 4], [4, 3], [6, 1], [7, 1], [3, 8], [8, 4], [9, 10], [10, 9], [11, 4], [11, 1], [12, 18], [15, 16], [16, 15], [19, 3], [1, 21], [22, 16], [23, 16], [27, 10], [29, 3], [31, 16], [36, 15], [36, 37], [16, 37], [37, 36], [10, 38], [41, 36], [44, 43], [52, 3]]\n assert candidate(words = ['xyx', 'yxy', 'yxx', 'xxz', 'zxx', 'zzz', 'zzxz', 'xzzx', 'zxzx', 'xzzxz', 'zxzzx', 'zxxxxz', 'xzxxxxz', 'zxzxzxz', 'xzzzzzzx', 'zzzzzzzz', 'zxxzzzxxz', 'zxzzzzzxz', 'xzxxxxzzx', 'zzxxxxzzz', 'zxzzzzzzx']) == [[3, 4], [4, 3], [9, 7], [9, 10], [7, 10], [10, 6], [10, 9], [11, 12], [8, 13], [15, 5], [5, 15], [14, 20]]\n assert candidate(words = ['abacaba', 'bacabab', 'cababac', 'abacabc', 'bacabc', 'cababc', 'abcabc', 'bcabc', 'cabc', 'abc', 'bc', 'c', '', 'a', 'b', 'ba', 'ab', 'ac', 'ca', 'bca', 'cab', 'abcba', 'bcbca', 'cabcb', 'abcabcba', 'bcabcbca', 'cabcbcab']) == [[0, 12], [12, 0], [15, 1], [2, 12], [12, 2], [11, 4], [9, 15], [10, 14], [11, 10], [11, 12], [12, 11], [13, 12], [12, 13], [14, 12], [12, 14], [15, 14], [13, 15], [15, 16], [16, 13], [14, 16], [16, 15], [17, 13], [11, 17], [17, 18], [18, 11], [13, 18], [18, 17], [17, 19], [15, 20], [20, 17], [21, 12], [12, 21], [17, 22], [23, 17]]\n assert candidate(words = ['noon', 'moon', 'noom', 'noon', 'moom', 'omo', 'moo', 'omo', 'm', 'oo', 'om', 'mo', '', 'n', 'nn', 'nno', 'onn', 'no', 'on', 'o', 'oo', 'ooo', 'oooo', 'ooooo', 'oooooo', 'ooooooo', 'oooooooo', 'ooooooooo']) == [[0, 12], [0, 3], [12, 0], [1, 2], [6, 2], [2, 1], [3, 12], [12, 3], [4, 12], [6, 4], [12, 4], [5, 12], [10, 5], [5, 11], [5, 7], [12, 5], [6, 8], [20, 6], [6, 10], [7, 12], [10, 7], [7, 11], [12, 7], [8, 12], [12, 8], [9, 12], [9, 19], [19, 9], [9, 20], [12, 9], [10, 19], [8, 10], [10, 11], [11, 8], [19, 11], [11, 10], [13, 12], [12, 13], [14, 12], [14, 13], [13, 14], [12, 14], [18, 15], [15, 14], [19, 15], [15, 16], [16, 19], [14, 16], [16, 17], [16, 15], [17, 13], [19, 17], [17, 18], [18, 19], [13, 18], [18, 17], [19, 12], [12, 19], [20, 12], [20, 19], [19, 20], [12, 20], [21, 12], [21, 19], [20, 21], [21, 20], [19, 21], [12, 21], [22, 12], [22, 19], [21, 22], [22, 20], [20, 22], [22, 21], [19, 22], [12, 22], [23, 12], [23, 19], [22, 23], [23, 20], [21, 23], [23, 21], [20, 23], [23, 22], [19, 23], [12, 23], [24, 12], [24, 19], [23, 24], [24, 20], [22, 24], [24, 21], [21, 24], [24, 22], [20, 24], [24, 23], [19, 24], [12, 24], [25, 12], [25, 19], [24, 25], [25, 20], [23, 25], [25, 21], [22, 25], [25, 22], [21, 25], [25, 23], [20, 25], [25, 24], [19, 25], [12, 25], [26, 12], [26, 19], [25, 26], [26, 20], [24, 26], [26, 21], [23, 26], [26, 22], [22, 26], [26, 23], [21, 26], [26, 24], [20, 26], [26, 25], [19, 26], [12, 26], [27, 12], [27, 19], [26, 27], [27, 20], [25, 27], [27, 21], [24, 27], [27, 22], [23, 27], [27, 23], [22, 27], [27, 24], [21, 27], [27, 25], [20, 27], [27, 26], [19, 27], [12, 27]]\n assert candidate(words = ['racecar', 'carerac', 'madam', 'level', 'noon', 'civic', 'rotor', 'refer', 'deified', 'redder', 'repaper', 'rotator', 'detartrated', 'reviled', 'repel', 'redivider', 'repaper', 'reviver', 'rotor', 'rotator', 'redder', 'refer', 'civic', 'level', 'rotor', 'repaper', 'rotator', 'deified', 'detartrated', 'refer', 'rotor', 'reviver', 'redder', 'repaper', 'repaper', 'rotor', 'repaper']) == [[3, 23], [5, 22], [6, 35], [7, 29], [8, 27], [9, 32], [10, 36], [11, 26], [12, 28], [16, 36], [17, 31], [18, 35], [19, 26], [20, 32], [21, 29], [24, 35], [25, 36], [30, 35], [33, 36], [34, 36]]\n assert candidate(words = ['aaaa', 'aaab', 'baaa', 'bbbb', 'aaaaa']) == [[1, 2], [2, 1], [0, 4], [4, 0]]\n assert candidate(words = ['racecar', 'madam', 'rotor', 'refer', 'deed', 'level', 'kayak', 'reviled', 'repaid', 'noon', 'civic', 'rotor', 'refer', 'deed', 'level', 'kayak', 'reviled', 'repaid']) == [[2, 11], [3, 12], [4, 13], [5, 14], [6, 15]]\n assert candidate(words = ['aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee', 'aaaa', 'bbbb', 'cccc', 'dddd', 'eeee', 'aaa', 'bbb', 'ccc', 'ddd', 'eee', 'aa', 'bb', 'cc', 'dd', 'ee', 'a', 'b', 'c', 'd', 'e', '', 'ab', 'ba', 'ac', 'ca', 'ad', 'da', 'ae', 'ea', 'bc', 'cb', 'bd', 'db', 'be', 'eb', 'cd', 'dc', 'ce', 'ec', 'de', 'ed', 'abc', 'cba', 'abd', 'dba', 'abe', 'eba', 'acd', 'dca', 'ace', 'eca', 'ade', 'eda', 'bcd', 'dcb', 'bce', 'ecb', 'bde', 'edb', 'cde', 'edc', 'cef', 'fec', 'def', 'fed', 'cef', 'fec', 'gfe', 'efg', 'geh', 'ehg', 'heg', 'geh', 'hic', 'cih', 'ich', 'hic', 'jid', 'dij', 'idj', 'jid', 'kil', 'lik', 'ilk', 'kil', 'lmn', 'nml', 'mln', 'lmn', 'nop', 'pon', 'opn', 'nop', 'qrs', 'srq', 'rsq', 'qrs', 'tuv', 'vtu', 'utv', 'tuv', 'wxy', 'yxw', 'xyw', 'wxy', 'zzz', 'zz', 'z']) == [[0, 25], [0, 20], [5, 0], [0, 15], [10, 0], [0, 10], [15, 0], [0, 5], [20, 0], [25, 0], [1, 25], [1, 21], [6, 1], [1, 16], [11, 1], [1, 11], [16, 1], [1, 6], [21, 1], [25, 1], [2, 25], [2, 22], [7, 2], [2, 17], [12, 2], [2, 12], [17, 2], [2, 7], [22, 2], [25, 2], [3, 25], [3, 23], [8, 3], [3, 18], [13, 3], [3, 13], [18, 3], [3, 8], [23, 3], [25, 3], [4, 25], [4, 24], [9, 4], [4, 19], [14, 4], [4, 14], [19, 4], [4, 9], [24, 4], [25, 4], [5, 25], [5, 20], [10, 5], [5, 15], [15, 5], [5, 10], [20, 5], [25, 5], [6, 25], [6, 21], [11, 6], [6, 16], [16, 6], [6, 11], [21, 6], [25, 6], [7, 25], [7, 22], [12, 7], [7, 17], [17, 7], [7, 12], [22, 7], [25, 7], [8, 25], [8, 23], [13, 8], [8, 18], [18, 8], [8, 13], [23, 8], [25, 8], [9, 25], [9, 24], [14, 9], [9, 19], [19, 9], [9, 14], [24, 9], [25, 9], [10, 25], [10, 20], [15, 10], [10, 15], [20, 10], [25, 10], [11, 25], [11, 21], [16, 11], [11, 16], [21, 11], [25, 11], [12, 25], [12, 22], [17, 12], [12, 17], [22, 12], [25, 12], [13, 25], [13, 23], [18, 13], [13, 18], [23, 13], [25, 13], [14, 25], [14, 24], [19, 14], [14, 19], [24, 14], [25, 14], [15, 25], [15, 20], [20, 15], [25, 15], [16, 25], [16, 21], [21, 16], [25, 16], [17, 25], [17, 22], [22, 17], [25, 17], [18, 25], [18, 23], [23, 18], [25, 18], [19, 25], [19, 24], [24, 19], [25, 19], [20, 25], [25, 20], [21, 25], [25, 21], [22, 25], [25, 22], [23, 25], [25, 23], [24, 25], [25, 24], [26, 20], [21, 26], [26, 27], [27, 21], [20, 27], [27, 26], [28, 20], [22, 28], [28, 29], [29, 22], [20, 29], [29, 28], [30, 20], [23, 30], [30, 31], [31, 23], [20, 31], [31, 30], [32, 20], [24, 32], [32, 33], [33, 24], [20, 33], [33, 32], [34, 21], [22, 34], [34, 35], [35, 22], [21, 35], [35, 34], [36, 21], [23, 36], [36, 37], [37, 23], [21, 37], [37, 36], [38, 21], [24, 38], [38, 39], [39, 24], [21, 39], [39, 38], [40, 22], [23, 40], [40, 41], [41, 23], [22, 41], [41, 40], [42, 22], [24, 42], [42, 43], [43, 24], [22, 43], [43, 42], [44, 23], [24, 44], [44, 45], [45, 24], [23, 45], [45, 44], [35, 46], [46, 27], [46, 47], [26, 47], [47, 34], [47, 46], [37, 48], [48, 27], [48, 49], [26, 49], [49, 36], [49, 48], [39, 50], [50, 27], [50, 51], [26, 51], [51, 38], [51, 50], [41, 52], [52, 29], [52, 53], [28, 53], [53, 40], [53, 52], [43, 54], [54, 29], [54, 55], [28, 55], [55, 42], [55, 54], [45, 56], [56, 31], [56, 57], [30, 57], [57, 44], [57, 56], [41, 58], [58, 35], [58, 59], [34, 59], [59, 40], [59, 58], [43, 60], [60, 35], [60, 61], [34, 61], [61, 42], [61, 60], [45, 62], [62, 37], [62, 63], [36, 63], [63, 44], [63, 62], [45, 64], [64, 41], [64, 65], [40, 65], [65, 44], [65, 64], [66, 43], [66, 71], [42, 67], [67, 70], [68, 45], [68, 69], [44, 69], [69, 68], [70, 43], [70, 71], [42, 71], [71, 70], [72, 73], [73, 72], [74, 76], [76, 77], [77, 76], [78, 79], [79, 81], [81, 79], [82, 83], [83, 85], [85, 83], [86, 87], [87, 89], [89, 87], [90, 91], [91, 93], [93, 91], [94, 95], [95, 97], [97, 95], [98, 99], [99, 101], [101, 99], [103, 104], [104, 103], [106, 107], [107, 109], [109, 107], [110, 25], [110, 112], [111, 110], [110, 111], [112, 110], [25, 110], [111, 25], [111, 112], [112, 111], [25, 111], [112, 25], [25, 112]]\n assert candidate(words = ['', 'a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == [[1, 0], [0, 1], [2, 0], [2, 1], [1, 2], [0, 2], [3, 0], [3, 1], [2, 3], [3, 2], [1, 3], [0, 3], [4, 0], [4, 1], [3, 4], [4, 2], [2, 4], [4, 3], [1, 4], [0, 4], [5, 0], [5, 1], [4, 5], [5, 2], [3, 5], [5, 3], [2, 5], [5, 4], [1, 5], [0, 5], [6, 0], [6, 1], [5, 6], [6, 2], [4, 6], [6, 3], [3, 6], [6, 4], [2, 6], [6, 5], [1, 6], [0, 6], [7, 0], [7, 1], [7, 2], [7, 3], [6, 7], [7, 4], [5, 7], [7, 5], [4, 7], [7, 6], [3, 7], [2, 7], [1, 7], [0, 7], [8, 0], [8, 1], [7, 8], [8, 2], [8, 3], [8, 4], [6, 8], [8, 5], [5, 8], [8, 6], [4, 8], [3, 8], [2, 8], [8, 7], [1, 8], [0, 8]]\n assert candidate(words = ['race', 'car', 'level', '', 'deified', 'civic', 'rotor', '', 'madam', 'refer', 'redder', 'repaper', 'reviled', 'deed', 'noon', 'detartrated', 'redivider', 'rotor']) == [[0, 1], [2, 7], [7, 2], [3, 7], [4, 7], [7, 4], [5, 7], [7, 5], [6, 7], [6, 17], [7, 6], [8, 7], [7, 8], [9, 7], [7, 9], [10, 7], [7, 10], [11, 7], [7, 11], [13, 7], [7, 13], [14, 7], [7, 14], [15, 7], [7, 15], [16, 7], [7, 16], [17, 7], [7, 17]]\n assert candidate(words = ['xabc', 'cba', 'abcx', 'abxcba', 'cabxa', 'bxcba', 'abcabc', 'bcabc', 'cbabc', 'xcba', 'bac', 'cabx', 'bacxab', 'xcbax', 'baxcb', 'cbaabc']) == [[1, 0], [2, 1], [2, 9], [2, 5], [9, 2], [11, 10], [0, 13], [13, 2]]\n assert candidate(words = ['ab', 'ba', 'abc', 'cba', 'abcd', 'dcba', 'abcde', 'edcba', 'abcdef', 'fedcba']) == [[0, 1], [1, 0], [2, 1], [2, 3], [0, 3], [3, 2], [4, 3], [4, 5], [2, 5], [5, 4], [6, 5], [6, 7], [4, 7], [7, 6], [8, 7], [8, 9], [6, 9], [9, 8]]\n assert candidate(words = ['noon', 'level', 'deified', 'civic', 'rotor', 'madam', 'refer', 'deed', 'peep', 'radar', 'reviled', 'repaid', 'detartrated', 'reviver', 'redder', 'repaper', 'pepper', 'repel', 'deterred', 'reworded', 'repeal', 'perpet', 'repressed', 'repellet', 'perpetual', 'repellect']) == []\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']) == []\n assert candidate(words = ['palindrome', 'emordnilap', 'detartrated', 'deified', 'repaid', 'stressed', 'desserts', 'deed', 'civic', 'rotor', 'refer', 'level', 'kayak', 'reviled']) == [[0, 1], [1, 0], [5, 6], [6, 5]]\n assert candidate(words = ['abcde', 'edcba', 'fghij', 'jihgf', 'klmno', 'onmlk', 'pqrstu', 'utsrqp', 'vwxyz', 'zyxwv']) == [[0, 1], [1, 0], [2, 3], [3, 2], [4, 5], [5, 4], [6, 7], [7, 6], [8, 9], [9, 8]]\n assert candidate(words = ['xabcx', 'xbax', 'xcabx', 'xcax', 'xbxc', 'xcabxx', 'xxcabx', 'abcxx', 'xxcba', 'abcdxx', 'xxdcba', 'xxabcd', 'dxxcba', 'xabxx', 'xxbax']) == [[7, 8], [8, 7], [9, 10], [10, 9], [7, 12], [13, 1], [13, 14], [14, 13]]\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa']) == [[1, 0], [0, 1], [2, 0], [1, 2], [2, 1], [0, 2], [3, 0], [2, 3], [3, 1], [1, 3], [3, 2], [0, 3], [4, 0], [3, 4], [4, 1], [2, 4], [4, 2], [1, 4], [4, 3], [0, 4], [5, 0], [4, 5], [5, 1], [3, 5], [5, 2], [2, 5], [5, 3], [1, 5], [5, 4], [0, 5], [6, 0], [5, 6], [6, 1], [4, 6], [6, 2], [3, 6], [6, 3], [2, 6], [6, 4], [1, 6], [6, 5], [0, 6]]\n assert candidate(words = ['', 'a', 'b', 'c', 'aa', 'bb', 'cc', 'aaa', 'bbb', 'ccc', 'aaaa', 'bbbb', 'cccc', 'aaaaa', 'bbbbb', 'ccccc']) == [[1, 0], [0, 1], [2, 0], [0, 2], [3, 0], [0, 3], [4, 0], [4, 1], [1, 4], [0, 4], [5, 0], [5, 2], [2, 5], [0, 5], [6, 0], [6, 3], [3, 6], [0, 6], [7, 0], [7, 1], [4, 7], [7, 4], [1, 7], [0, 7], [8, 0], [8, 2], [5, 8], [8, 5], [2, 8], [0, 8], [9, 0], [9, 3], [6, 9], [9, 6], [3, 9], [0, 9], [10, 0], [10, 1], [7, 10], [10, 4], [4, 10], [10, 7], [1, 10], [0, 10], [11, 0], [11, 2], [8, 11], [11, 5], [5, 11], [11, 8], [2, 11], [0, 11], [12, 0], [12, 3], [9, 12], [12, 6], [6, 12], [12, 9], [3, 12], [0, 12], [13, 0], [13, 1], [10, 13], [13, 4], [7, 13], [13, 7], [4, 13], [13, 10], [1, 13], [0, 13], [14, 0], [14, 2], [11, 14], [14, 5], [8, 14], [14, 8], [5, 14], [14, 11], [2, 14], [0, 14], [15, 0], [15, 3], [12, 15], [15, 6], [9, 15], [15, 9], [6, 15], [15, 12], [3, 15], [0, 15]]\n assert candidate(words = ['ab', 'ba', 'a', 'b', 'aba', 'bab', 'aa', 'bb', 'aaa', 'bbb']) == [[0, 2], [3, 0], [0, 1], [1, 3], [2, 1], [1, 0], [0, 4], [4, 1], [1, 5], [5, 0], [6, 2], [2, 6], [7, 3], [3, 7], [8, 2], [6, 8], [8, 6], [2, 8], [9, 3], [7, 9], [9, 7], [3, 9]]\n assert candidate(words = ['race', 'ecar', 'car', 'arc', 'civic', 'level', 'deified', 'rotor', 'redder', 'repaper']) == [[0, 2], [0, 1], [1, 0]]\n assert candidate(words = ['noon', 'moon', 'noonmoon', 'moonnoon', 'noonno', 'onnoon', 'noonmo', 'onnoom']) == [[4, 5], [5, 4]]\n assert candidate(words = ['aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa', 'aaaaaaaaaaa', 'aaaaaaaaaaaa', 'aaaaaaaaaaaaa', 'aaaaaaaaaaaaaa']) == [[0, 1], [1, 0], [1, 2], [0, 2], [2, 0], [2, 1], [2, 3], [1, 3], [0, 3], [3, 0], [3, 1], [3, 2], [3, 4], [2, 4], [1, 4], [0, 4], [4, 0], [4, 1], [4, 2], [4, 3], [4, 5], [3, 5], [2, 5], [1, 5], [0, 5], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 6], [4, 6], [3, 6], [2, 6], [1, 6], [0, 6], [6, 0], [6, 1], [6, 2], [6, 3], [6, 4], [6, 5]]\n", "comparison": "exact"}, "public_tests": ["[\"abcd\",\"dcba\",\"lls\",\"s\",\"sssll\"]", "[\"bat\",\"tab\",\"cat\"]", "[\"a\",\"\"]"], "hints": ["Checking every two pairs will exceed the time limit. It will be O(n^2 * k). We need a faster way.", "If we hash every string in the array, how can we check if two pairs form a palindrome after the concatenation?", "We can check every string in words and consider it as words[j] (i.e., the suffix of the target palindrome). We can check if there is a hash of string that can be the prefix to make it a palindrome."], "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().palindromePairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:16+00:00", "tests_total": 91, "tests_dropped": 3, "flags": [], "topic_tags": ["array", "hash-table", "string", "trie", "hash-function"]}, "language": "ruby", "interface": {"raw_signature": "def palindrome_pairs(words)", "container": null, "callable": "palindrome_pairs", "parameters": [{"name": "words", "type": "String[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 338, "task_id": "counting-bits", "difficulty": "Easy", "problem_description": "Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i.\n\nDo not solve it with built-in functions (i.e., like __builtin_popcount in C++).\n\nExample 1:\n\nInput: n = 2\nOutput: [0,1,1]\nExplanation:\n0 --> 0\n1 --> 1\n2 --> 10\n\nExample 2:\n\nInput: n = 5\nOutput: [0,1,1,2,1,2]\nExplanation:\n0 --> 0\n1 --> 1\n2 --> 10\n3 --> 11\n4 --> 100\n5 --> 101\n\nConstraints:\n\n- 0 <= n <= 10^5\n\nFollow up:\n\n- It is very easy to come up with a solution with a runtime of O(n log n). Can you do it in linear time O(n) and possibly in a single pass?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == [0]\n assert candidate(n = 10000) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 9, 10, 10, 11, 10, 11, 11, 12, 10, 11, 11, 12, 11, 12, 12, 13, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5]\n assert candidate(n = 31) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5]\n assert candidate(n = 2) == [0, 1, 1]\n assert candidate(n = 100) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3]\n assert candidate(n = 1000) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6]\n assert candidate(n = 1) == [0, 1]\n assert candidate(n = 10) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2]\n assert candidate(n = 5) == [0, 1, 1, 2, 1, 2]\n assert candidate(n = 63) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6]\n assert candidate(n = 4096) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 1]\n assert candidate(n = 511) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9]\n assert candidate(n = 2047) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11]\n assert candidate(n = 300) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4]\n assert candidate(n = 64) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1]\n assert candidate(n = 254) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7]\n assert candidate(n = 1024) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1]\n assert candidate(n = 128) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1]\n assert candidate(n = 4095) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12]\n assert candidate(n = 8192) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 9, 10, 10, 11, 10, 11, 11, 12, 10, 11, 11, 12, 11, 12, 12, 13, 1]\n assert candidate(n = 2048) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1]\n assert candidate(n = 8191) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 9, 10, 10, 11, 10, 11, 11, 12, 10, 11, 11, 12, 11, 12, 12, 13]\n assert candidate(n = 255) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8]\n assert candidate(n = 5000) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 7, 8, 8, 9, 8, 9, 9, 10, 8, 9, 9, 10, 9, 10, 10, 11, 8, 9, 9, 10, 9, 10, 10, 11, 9, 10, 10, 11, 10, 11, 11, 12, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 4, 5, 5, 6, 5, 6, 6, 7, 5]\n assert candidate(n = 768) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2]\n assert candidate(n = 256) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1]\n assert candidate(n = 1023) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10]\n assert candidate(n = 127) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7]\n assert candidate(n = 15) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4]\n assert candidate(n = 200) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3]\n assert candidate(n = 512) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 1]\n assert candidate(n = 500) == [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6]\n assert candidate(n = 7) == [0, 1, 1, 2, 1, 2, 2, 3]\n", "comparison": "exact"}, "public_tests": ["2", "5"], "hints": ["You should make use of what you have produced already.", "Divide the numbers in ranges like [2-3], [4-7], [8-15] and so on. And try to generate new range from previous.", "Or does the odd/even status of the number help you in calculating the number of 1s?"], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countBits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:21+00:00", "tests_total": 33, "tests_dropped": 0, "flags": [], "topic_tags": ["dynamic-programming", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def count_bits(n)", "container": null, "callable": "count_bits", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 342, "task_id": "power-of-four", "difficulty": "Easy", "problem_description": "Given an integer n, return true if it is a power of four. Otherwise, return false.\n\nAn integer n is a power of four, if there exists an integer x such that n == 4^x.\n\nExample 1:\n\nInput: n = 16\nOutput: true\n\nExample 2:\n\nInput: n = 5\nOutput: false\n\nExample 3:\n\nInput: n = 1\nOutput: true\n\nConstraints:\n\n- -2^31 <= n <= 2^31 - 1\n\nFollow up: Could you solve it without loops/recursion?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == False\n assert candidate(n = -16) == False\n assert candidate(n = 2147483647) == False\n assert candidate(n = 536870912) == False\n assert candidate(n = 268435456) == True\n assert candidate(n = 5) == False\n assert candidate(n = 16777216) == True\n assert candidate(n = 4) == True\n assert candidate(n = 64) == True\n assert candidate(n = 16) == True\n assert candidate(n = 2) == False\n assert candidate(n = 1024) == True\n assert candidate(n = 0) == False\n assert candidate(n = 8) == False\n assert candidate(n = -2147483648) == False\n assert candidate(n = 1048576) == True\n assert candidate(n = 2048) == False\n assert candidate(n = 65536) == True\n assert candidate(n = 18) == False\n assert candidate(n = 256) == True\n assert candidate(n = -4) == False\n assert candidate(n = 1) == True\n assert candidate(n = 1000000003) == False\n assert candidate(n = 4096) == True\n assert candidate(n = 1431655765) == False\n assert candidate(n = 1000000002) == False\n assert candidate(n = 16384) == True\n assert candidate(n = -1) == False\n assert candidate(n = 4194304) == True\n assert candidate(n = 1073741823) == False\n assert candidate(n = -65536) == False\n assert candidate(n = 1073741824) == True\n assert candidate(n = 255) == False\n assert candidate(n = 1000000000) == False\n assert candidate(n = 65535) == False\n assert candidate(n = 1000000001) == False\n assert candidate(n = 1000000004) == False\n assert candidate(n = 15) == False\n assert candidate(n = 1073741825) == False\n assert candidate(n = 7) == False\n assert candidate(n = 10) == False\n", "comparison": "exact"}, "public_tests": ["16", "5", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().isPowerOfFour", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:26+00:00", "tests_total": 58, "tests_dropped": 17, "flags": [], "topic_tags": ["math", "bit-manipulation", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def is_power_of_four(n)", "container": null, "callable": "is_power_of_four", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 343, "task_id": "integer-break", "difficulty": "Medium", "problem_description": "Given an integer n, break it into the sum of k positive integers, where k >= 2, and maximize the product of those integers.\n\nReturn the maximum product you can get.\n\nExample 1:\n\nInput: n = 2\nOutput: 1\nExplanation: 2 = 1 + 1, 1 × 1 = 1.\n\nExample 2:\n\nInput: n = 10\nOutput: 36\nExplanation: 10 = 3 + 3 + 4, 3 × 3 × 4 = 36.\n\nConstraints:\n\n- 2 <= n <= 58\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 11) == 54\n assert candidate(n = 30) == 59049\n assert candidate(n = 20) == 1458\n assert candidate(n = 2) == 1\n assert candidate(n = 10) == 36\n assert candidate(n = 58) == 1549681956\n assert candidate(n = 29) == 39366\n assert candidate(n = 45) == 14348907\n assert candidate(n = 49) == 57395628\n assert candidate(n = 12) == 81\n assert candidate(n = 47) == 28697814\n assert candidate(n = 53) == 258280326\n assert candidate(n = 57) == 1162261467\n assert candidate(n = 50) == 86093442\n assert candidate(n = 28) == 26244\n assert candidate(n = 56) == 774840978\n assert candidate(n = 40) == 2125764\n assert candidate(n = 37) == 708588\n assert candidate(n = 42) == 4782969\n assert candidate(n = 35) == 354294\n assert candidate(n = 18) == 729\n assert candidate(n = 32) == 118098\n assert candidate(n = 36) == 531441\n assert candidate(n = 19) == 972\n assert candidate(n = 48) == 43046721\n assert candidate(n = 15) == 243\n assert candidate(n = 6) == 9\n assert candidate(n = 55) == 516560652\n assert candidate(n = 13) == 108\n assert candidate(n = 25) == 8748\n", "comparison": "exact"}, "public_tests": ["2", "10"], "hints": ["There is a simple O(n) solution to this problem.", "You may check the breaking results of n ranging from 7 to 10 to discover the regularities."], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().integerBreak", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:28+00:00", "tests_total": 30, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def integer_break(n)", "container": null, "callable": "integer_break", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 347, "task_id": "top-k-frequent-elements", "difficulty": "Medium", "problem_description": "Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order.\n\nExample 1:\n\nInput: nums = [1,1,1,2,2,3], k = 2\nOutput: [1,2]\n\nExample 2:\n\nInput: nums = [1], k = 1\nOutput: [1]\n\nExample 3:\n\nInput: nums = [1,2,1,2,1,2,3,1,3,2], k = 2\nOutput: [1,2]\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- -10^4 <= nums[i] <= 10^4\n- k is in the range [1, the number of unique elements in the array].\n- It is guaranteed that the answer is unique.\n\nFollow up: Your algorithm's time complexity must be better than O(n log n), where n is the array's size.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[5, 3, 1, 1, 1, 3, 5, 2, 2, 2, 4, 4, 4, 4], k=3), [4, 1, 2])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=5), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], k=10), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums=[5, 3, 1, 1, 1, 3, 73, 1], k=1), [1])\n assert answers_match(candidate(nums=[1], k=1), [1])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 3], k=2), [1, 2])\n assert answers_match(candidate(nums=[-1, -1, -1, 2, 2, 3, 4, 4, 4, 4], k=2), [4, -1])\n assert answers_match(candidate(nums=[1, 2], k=2), [1, 2])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 1, 1], k=3), [5, 4, 3])\n assert answers_match(candidate(nums=[5, 3, 1, 1, 1, 3, 5, 7, 7, 7, 7], k=3), [7, 1, 5])\n assert answers_match(candidate(nums=[4, 1, -1, 2, -1, 2, 3], k=2), [-1, 2])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], k=4), [9, 8, 7, 6])\n assert answers_match(candidate(nums=[-1000, -1000, -999, -999, -999, -998, -998, -998, -997, -997, -997, -997, -996, -996, -995, -994, -993, -992, -991, -990], k=4), [-997, -999, -998, -1000])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8], k=3), [8, 7, 6])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], k=3), [9, 8, 7])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], k=6), [9, 10, 8, 7, 6, 5])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], k=4), [0, 1, 2, 3])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50], k=20), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])\n assert answers_match(candidate(nums=[100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109], k=3), [100, 101, 102])\n assert answers_match(candidate(nums=[7, 10, 11, 5, 2, 5, 5, 7, 11, 11, 5, 2, 10, 10, 10, 10, 10, 10, 10, 10], k=2), [10, 5])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], k=5), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], k=4), [9, 8, 7, 6])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100], k=10), [100, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], k=5), [0, 1, 2, 3, 4])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350, 360, 370, 380, 390, 400, 410, 420, 430, 440, 450, 460, 470, 480, 490, 500, 510, 520, 530, 540, 550, 560, 570, 580, 590, 600, 610, 620, 630, 640, 650, 660, 670, 680, 690, 700, 710, 720, 730, 740, 750, 760, 770, 780, 790, 800, 810, 820, 830, 840, 850, 860, 870, 880, 890, 900, 910, 920, 930, 940, 950, 960, 970, 980, 990, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000], k=5), [1000, 10, 20, 30, 40])\n assert answers_match(candidate(nums=[-5, -5, -5, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], k=2), [5, -5])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5], k=5), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums=[99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90], k=5), [99, 98, 97, 96, 95])\n assert answers_match(candidate(nums=[-100, -200, -300, -400, -500, -600, -700, -800, -900, -1000, -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000, -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000, -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000, -100, -200, -300, -400, -500, -600, -700, -800, -900, -1000], k=4), [-100, -200, -300, -400])\n assert answers_match(candidate(nums=[100, 100, 100, 101, 101, 102, 103, 103, 103, 103, 104, 104, 104, 105, 105, 106, 106, 107, 108, 109, 110], k=5), [103, 100, 104, 101, 105])\n assert answers_match(candidate(nums=[10000, 10000, 9999, 9999, 9999, 9998, 9998, 9997, 9996, 9995], k=3), [9999, 10000, 9998])\n assert answers_match(candidate(nums=[1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8], k=5), [8, 7, 6, 5, 4])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], k=5), [9, 8, 7, 6, 5])\n assert answers_match(candidate(nums=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], k=10), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n", "comparison": "unordered"}, "public_tests": ["[1,1,1,2,2,3]\n2", "[1]\n1", "[1,2,1,2,1,2,3,1,3,2]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().topKFrequent", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:35+00:00", "tests_total": 34, "tests_dropped": 0, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "divide-and-conquer", "sorting", "heap-priority-queue", "bucket-sort", "counting", "quickselect"]}, "language": "ruby", "interface": {"raw_signature": "def top_k_frequent(nums, k)", "container": null, "callable": "top_k_frequent", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 349, "task_id": "intersection-of-two-arrays", "difficulty": "Easy", "problem_description": "Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order.\n\nExample 1:\n\nInput: nums1 = [1,2,2,1], nums2 = [2,2]\nOutput: [2]\n\nExample 2:\n\nInput: nums1 = [4,9,5], nums2 = [9,4,9,8,4]\nOutput: [9,4]\nExplanation: [4,9] is also accepted.\n\nConstraints:\n\n- 1 <= nums1.length, nums2.length <= 1000\n- 0 <= nums1[i], nums2[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums1=[1, 2, 3, 4], nums2=[4, 3, 2, 1]), [1, 2, 3, 4])\n assert answers_match(candidate(nums1=[1, 1, 1, 1], nums2=[1, 1, 1, 1]), [1])\n assert answers_match(candidate(nums1=[1, 3, 5, 7], nums2=[2, 4, 6, 8]), [])\n assert answers_match(candidate(nums1=[0, 0, 0, 0], nums2=[0, 0, 0, 0]), [0])\n assert answers_match(candidate(nums1=[0, 1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1, 0]), [0, 1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[10, 20, 30, 40], nums2=[30, 40, 50, 60]), [40, 30])\n assert answers_match(candidate(nums1=[1000], nums2=[1000]), [1000])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[1, 2, 2, 1], nums2=[2, 2]), [2])\n assert answers_match(candidate(nums1=[1000, 1000, 1000], nums2=[1000, 1000]), [1000])\n assert answers_match(candidate(nums1=[10, 20, 30], nums2=[30, 40, 50]), [30])\n assert answers_match(candidate(nums1=[5, 5, 5, 5], nums2=[5, 5, 5, 5]), [5])\n assert answers_match(candidate(nums1=[4, 9, 5], nums2=[9, 4, 9, 8, 4]), [9, 4])\n assert answers_match(candidate(nums1=[0, 1000], nums2=[500, 1000]), [1000])\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[4, 5, 6]), [])\n assert answers_match(candidate(nums1=[1000, 1000], nums2=[1000, 1000]), [1000])\n assert answers_match(candidate(nums1=[500, 500, 500], nums2=[500]), [500])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[3, 4, 5, 6, 7]), [3, 4, 5])\n assert answers_match(candidate(nums1=[0], nums2=[0]), [0])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[0, 2, 4, 6, 8]), [])\n assert answers_match(candidate(nums1=[0, 0, 0], nums2=[0, 0, 0]), [0])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 10, 20, 30, 40]), [40, 10, 50, 20, 30])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0], nums2=[0, 0, 0, 0, 0]), [0])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[500, 600, 700, 800, 900]), [800, 900, 500, 600, 700])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[50, 51, 52, 53, 54, 55, 56, 57, 58, 59]), [50])\n assert answers_match(candidate(nums1=[999, 998, 997, 996, 995], nums2=[994, 993, 992, 991, 990]), [])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), [1])\n assert answers_match(candidate(nums1=[3, 6, 9, 12, 15, 18, 21, 24, 27, 30], nums2=[9, 18, 27, 36, 45, 54, 63, 72, 81, 90]), [9, 18, 27])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 3, 5, 7, 9])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4], nums2=[2, 2, 4, 4, 6, 6, 8, 8]), [2, 4])\n assert answers_match(candidate(nums1=[1000, 0, 500, 250, 750], nums2=[750, 500, 250, 0, 1000]), [0, 1000, 750, 500, 250])\n assert answers_match(candidate(nums1=[250, 251, 252, 253, 254, 255, 256, 257, 258, 259], nums2=[255, 256, 257, 258, 259, 260, 261, 262, 263, 264]), [256, 257, 258, 259, 255])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1]), [1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[5, 6, 7, 8, 9, 10, 11, 12, 13, 14]), [5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 10, 100, 1000], nums2=[1000, 100, 10, 1]), [1000, 1, 10, 100])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]), [1, 3, 5, 7, 9, 11, 13, 15, 17, 19])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])\n assert answers_match(candidate(nums1=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[300, 301, 302, 303, 304, 305, 306, 307, 308, 309], nums2=[309, 310, 311, 312, 313, 314, 315, 316, 317, 318]), [309])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[999, 998, 997, 996, 995, 994, 993, 992, 991, 990], nums2=[990, 991, 992, 993, 994, 995, 996, 997, 998, 999]), [992, 993, 994, 995, 996, 997, 998, 999, 990, 991])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[90, 100, 110, 120, 130, 140]), [90, 100])\n assert answers_match(candidate(nums1=[1000], nums2=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), [])\n assert answers_match(candidate(nums1=[1, 10, 100, 1000], nums2=[1, 10, 100, 1000]), [1000, 1, 10, 100])\n assert answers_match(candidate(nums1=[5, 5, 5, 5, 5], nums2=[5, 5, 5, 5, 5]), [5])\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[2, 4, 6, 8, 10]), [2, 4, 6, 8, 10])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[100, 200, 300, 400, 500]), [100, 200, 300, 400, 500])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[200, 400, 600, 800, 1000]), [200, 400])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 3, 5, 7, 9]), [1, 3, 5, 7, 9])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 5, 5, 5, 5]), [5])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 2, 3, 4, 5]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]), [10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [])\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 2, 3])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 60, 70, 80, 90]), [50])\n assert answers_match(candidate(nums1=[999, 998, 997, 996, 995], nums2=[995, 996, 997, 998, 999]), [995, 996, 997, 998, 999])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], nums2=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[4, 5, 6, 7, 8]), [4, 5])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), [])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 60, 70, 80, 90, 100]), [50])\n assert answers_match(candidate(nums1=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], nums2=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])\n assert answers_match(candidate(nums1=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], nums2=[10, 11, 12, 13, 14, 15, 16, 17, 18, 19]), [])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[40, 50, 60, 70, 80]), [40, 50])\n assert answers_match(candidate(nums1=[1000, 999, 998, 997, 996, 995, 994, 993, 992, 991], nums2=[996, 997, 998, 999, 1000]), [996, 997, 998, 999, 1000])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 400, 300, 200, 100, 500, 400, 300, 200, 100]), [100, 200, 300, 400, 500])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[1], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1])\n assert answers_match(candidate(nums1=[0, 1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1, 0]), [0, 1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[2, 2, 2, 2, 2, 2, 2, 2, 2, 2]), [])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[3, 3, 4, 4, 5, 5]), [3])\n assert answers_match(candidate(nums1=[500, 501, 502, 503, 504, 505], nums2=[500, 501, 502, 503, 504, 505, 506, 507, 508, 509]), [500, 501, 502, 503, 504, 505])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]), [])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[5, 15, 25, 35, 45, 55, 65, 75, 85, 95]), [])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 60, 70, 80, 90]), [50])\n assert answers_match(candidate(nums1=[5, 10, 15, 20, 25, 30, 35, 40, 45, 50], nums2=[5, 15, 25, 35, 45]), [35, 5, 45, 15, 25])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[3, 3, 3, 2, 2, 1, 1]), [1, 2, 3])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 500, 500, 500, 500]), [500])\n assert answers_match(candidate(nums1=[1, 1, 2, 3, 3], nums2=[2, 2, 3, 3, 4, 4]), [2, 3])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[100, 90, 80, 70, 60, 50, 40, 30, 20, 10]), [100, 70, 40, 10, 80, 50, 20, 90, 60, 30])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[5, 10, 15, 20, 25, 30]), [10, 5, 15])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]), [100, 200, 300, 400, 500])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[21, 22, 23, 24, 25, 26, 27, 28, 29, 30]), [])\n assert answers_match(candidate(nums1=[7, 14, 21, 28, 35], nums2=[35, 42, 49, 56, 63]), [35])\n assert answers_match(candidate(nums1=[5, 10, 15, 20, 25, 30, 35, 40, 45, 50], nums2=[3, 6, 9, 12, 15, 18, 21, 24, 27, 30]), [30, 15])\n assert answers_match(candidate(nums1=[500, 501, 502, 503, 504, 505, 506, 507, 508, 509], nums2=[505, 506, 507, 508, 509, 510, 511, 512, 513, 514]), [505, 506, 507, 508, 509])\n assert answers_match(candidate(nums1=[5, 10, 15, 20, 25], nums2=[5, 25, 10, 15, 20, 5, 25, 10, 15, 20]), [5, 10, 15, 20, 25])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 100], nums2=[100, 200, 300, 400, 500]), [100])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), [2, 4, 6, 8, 10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[5, 10, 15, 20, 25, 30, 35, 40, 45, 50]), [10, 20, 5, 15])\n assert answers_match(candidate(nums1=[500, 501, 502, 503, 504, 505, 506, 507, 508, 509], nums2=[500, 501, 502, 503, 504, 505, 506, 507, 508, 509]), [500, 501, 502, 503, 504, 505, 506, 507, 508, 509])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [10, 11, 12, 13, 14, 15])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1, 1, 2, 3, 4, 5]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[2, 2, 3, 3, 4, 4]), [2, 3])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 400, 300, 200, 100]), [100, 200, 300, 400, 500])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[5, 5, 4, 4, 3, 3, 2, 2, 1, 1]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[4, 5, 6]), [])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[5, 4, 3, 2, 1, 1, 2, 2, 3, 3]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[500, 500, 500, 500, 500], nums2=[500, 500, 500, 500, 500]), [500])\n assert answers_match(candidate(nums1=[5, 10, 15, 20, 25, 30], nums2=[30, 25, 20, 15, 10, 5]), [5, 10, 15, 20, 25, 30])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[1, 100, 200, 300, 400, 500, 600, 700, 800, 900]), [800, 900, 100, 200, 300, 400, 500, 600, 700])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[150, 250, 350, 450, 550]), [])\n assert answers_match(candidate(nums1=[100, 100, 100, 100], nums2=[100, 100, 100]), [100])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 600, 700, 800, 900]), [500])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[5, 6, 7, 8, 9, 10, 11, 12, 13, 14]), [5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[100, 200, 300], nums2=[300, 400, 500, 600, 700]), [300])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[2, 4, 6, 8, 10]), [2, 4])\n assert answers_match(candidate(nums1=[100, 200, 300], nums2=[100, 200, 300, 400, 500]), [200, 100, 300])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 1000], nums2=[1000, 1, 2, 3, 4, 5, 6, 7, 8, 9]), [1, 2, 3, 4, 5, 6, 7, 1000, 8, 9])\n assert answers_match(candidate(nums1=[0, 100, 200, 300, 400], nums2=[400, 300, 200, 100, 0]), [0, 100, 200, 300, 400])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[15, 25, 35, 45, 55]), [])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[100, 300, 500, 700, 900]), [100, 500, 300])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], nums2=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [0])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[15, 20, 25, 30, 35]), [20, 30])\n", "comparison": "unordered"}, "public_tests": ["[1,2,2,1]\n[2,2]", "[4,9,5]\n[9,4,9,8,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().intersection", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:37+00:00", "tests_total": 124, "tests_dropped": 4, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "two-pointers", "binary-search", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def intersection(nums1, nums2)", "container": null, "callable": "intersection", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 350, "task_id": "intersection-of-two-arrays-ii", "difficulty": "Easy", "problem_description": "Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in both arrays and you may return the result in any order.\n\nExample 1:\n\nInput: nums1 = [1,2,2,1], nums2 = [2,2]\nOutput: [2,2]\n\nExample 2:\n\nInput: nums1 = [4,9,5], nums2 = [9,4,9,8,4]\nOutput: [4,9]\nExplanation: [9,4] is also accepted.\n\nConstraints:\n\n- 1 <= nums1.length, nums2.length <= 1000\n- 0 <= nums1[i], nums2[i] <= 1000\n\nFollow up:\n\n- What if the given array is already sorted? How would you optimize your algorithm?\n- What if nums1's size is small compared to nums2's size? Which algorithm is better?\n- What if elements of nums2 are stored on disk, and the memory is limited such that you cannot load all elements into the memory at once?\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 40, 30, 20, 10]), [50, 40, 30, 20, 10])\n assert answers_match(candidate(nums1=[100, 200, 300], nums2=[300, 200, 100]), [300, 200, 100])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[3, 3, 3, 3, 1, 1]), [3, 3, 1, 1])\n assert answers_match(candidate(nums1=[1, 3, 5, 7], nums2=[2, 4, 6, 8]), [])\n assert answers_match(candidate(nums1=[0, 0, 0, 0], nums2=[0, 0, 0, 0]), [0, 0, 0, 0])\n assert answers_match(candidate(nums1=[0, 0, 0], nums2=[0, 0, 0, 0]), [0, 0, 0])\n assert answers_match(candidate(nums1=[1000, 1000, 1000], nums2=[1000, 1000, 1000]), [1000, 1000, 1000])\n assert answers_match(candidate(nums1=[1, 1, 2, 2], nums2=[2, 2, 2, 2]), [2, 2])\n assert answers_match(candidate(nums1=[10, 20, 30, 40], nums2=[30, 40, 50, 60]), [30, 40])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10]), [])\n assert answers_match(candidate(nums1=[1000], nums2=[1000]), [1000])\n assert answers_match(candidate(nums1=[1, 3, 2, 4], nums2=[3, 2, 2, 1]), [3, 2, 1])\n assert answers_match(candidate(nums1=[1000, 1000], nums2=[1000, 1000, 1000]), [1000, 1000])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1]), [5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[1, 2, 2, 1], nums2=[2, 2]), [2, 2])\n assert answers_match(candidate(nums1=[1000, 1000, 1000], nums2=[1000, 1000]), [1000, 1000])\n assert answers_match(candidate(nums1=[5, 5, 5, 5, 5], nums2=[5, 5, 5, 5, 5]), [5, 5, 5, 5, 5])\n assert answers_match(candidate(nums1=[7, 8, 9], nums2=[10, 11, 12]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10]), [])\n assert answers_match(candidate(nums1=[1], nums2=[2]), [])\n assert answers_match(candidate(nums1=[4, 9, 5], nums2=[9, 4, 9, 8, 4]), [9, 4])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1], nums2=[1, 1, 1]), [1, 1, 1])\n assert answers_match(candidate(nums1=[1, 1, 1, 1], nums2=[1, 1]), [1, 1])\n assert answers_match(candidate(nums1=[5, 5, 5, 5, 5], nums2=[5, 5, 5, 5]), [5, 5, 5, 5])\n assert answers_match(candidate(nums1=[1, 2, 3], nums2=[4, 5, 6]), [])\n assert answers_match(candidate(nums1=[1, 1, 1, 1], nums2=[1, 1, 1]), [1, 1, 1])\n assert answers_match(candidate(nums1=[1], nums2=[1]), [1])\n assert answers_match(candidate(nums1=[999, 998, 997, 996, 995, 994, 993, 992, 991, 990], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 999, 998, 997]), [999, 998, 997])\n assert answers_match(candidate(nums1=[999, 998, 997, 996, 995, 994, 993, 992, 991, 990], nums2=[990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990]), [990, 991, 992, 993, 994, 995, 996, 997, 998, 999])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[5, 5, 6, 6, 7, 7, 8, 8]), [5, 6, 7, 8])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), [2, 4, 6, 8, 10])\n assert answers_match(candidate(nums1=[500, 500, 500, 500], nums2=[500, 500, 500, 500, 500, 500, 500]), [500, 500, 500, 500])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4], nums2=[1, 2, 2, 3, 3, 3, 4, 4]), [1, 2, 2, 3, 3, 3, 4, 4])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]), [3, 5, 7, 11, 13, 17, 19])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), [1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 40, 30, 20, 10, 10]), [50, 40, 30, 20, 10])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], nums2=[0, 0, 0, 0, 0]), [0, 0, 0, 0, 0])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[11, 12, 13, 14, 15]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [10, 11, 12, 13, 14, 15])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 2, 3, 3, 4, 4, 5], nums2=[2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]), [2, 2, 2, 3, 3, 4, 4, 5])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1]), [1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[5, 6, 7, 8, 9, 10, 11, 12, 13, 14]), [5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[15, 20, 25, 30, 35, 40, 45, 50]), [20, 30, 40, 50])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[150, 250, 350, 450, 550, 650, 750, 850, 950]), [])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100]), [10, 20, 30, 40, 50, 60, 70, 80, 90, 100])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], nums2=[2, 4, 6, 8, 10, 12, 14]), [2, 4, 6, 8, 10, 12, 14])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]), [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [10, 9, 8, 7, 6, 5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]), [10, 20, 30, 40, 50, 60, 70, 80, 90, 100])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[3, 4, 5, 6, 7]), [3, 4, 5])\n assert answers_match(candidate(nums1=[999, 998, 997, 996, 995, 994, 993, 992, 991, 990], nums2=[990, 991, 992, 993, 994, 995, 996, 997, 998, 999]), [990, 991, 992, 993, 994, 995, 996, 997, 998, 999])\n assert answers_match(candidate(nums1=[3, 4, 4, 5, 6, 7, 8, 8, 9], nums2=[4, 4, 8, 9, 10]), [4, 4, 8, 9])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]), [1, 3, 5, 7, 9, 11, 13, 15, 17, 19])\n assert answers_match(candidate(nums1=[7, 7, 8, 8, 9, 9], nums2=[7, 7, 7, 8, 8, 8, 9, 9, 9]), [7, 7, 8, 8, 9, 9])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[100, 200, 300, 400, 500]), [100, 200, 300, 400, 500])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 3, 5, 7, 9]), [1, 3, 5, 7, 9])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]), [1, 3, 5, 7, 9])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), [1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums1=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], nums2=[5, 5, 5, 5, 5]), [5, 5, 5, 5, 5])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0], nums2=[0, 0, 0]), [0, 0, 0])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4], nums2=[1, 1, 2, 2, 3, 3, 4, 4]), [1, 1, 2, 2, 3, 3, 4, 4])\n assert answers_match(candidate(nums1=[33, 44, 55, 66, 77, 88, 99, 100], nums2=[33, 66, 99, 100, 132, 165, 198, 231]), [33, 66, 99, 100])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], nums2=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]), [])\n assert answers_match(candidate(nums1=[7, 7, 7, 7, 7], nums2=[7, 7, 7, 7, 7, 7, 7]), [7, 7, 7, 7, 7])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9, 11, 13, 15], nums2=[2, 4, 6, 8, 10, 12, 14, 16]), [])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[100, 200, 300, 400, 500]), [100, 200, 300, 400, 500])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 400, 300, 200, 100, 500, 400, 300, 200, 100]), [500, 400, 300, 200, 100])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1], nums2=[1, 2, 3, 4, 5]), [1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1]), [5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[2, 4, 6, 8, 10]), [2, 4])\n assert answers_match(candidate(nums1=[7, 8, 9], nums2=[1, 2, 3]), [])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 4, 5, 5], nums2=[5, 5, 4, 3, 2, 2, 1]), [5, 5, 4, 3, 2, 2, 1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [10, 9, 8, 7, 6, 5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9], nums2=[5, 6, 7, 8, 9, 10, 11, 12, 13]), [5, 6, 7, 8, 9])\n assert answers_match(candidate(nums1=[1], nums2=[2, 3, 4, 5, 6, 7, 8, 9, 10]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10], nums2=[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]), [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[5, 4, 3, 2, 1, 1, 2, 3, 4, 5]), [5, 4, 3, 2, 1])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 400, 300, 200, 100, 100]), [500, 400, 300, 200, 100])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[1, 1, 1, 1, 1]), [1, 1, 1, 1, 1])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1]), [3, 3, 2, 2, 1, 1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[1, 1, 1, 1, 1]), [1])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4], nums2=[2, 2, 2, 2, 3, 3, 3, 3]), [2, 2, 3, 3])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5]), [5])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[2, 2, 4, 4, 6, 6, 8, 8, 10, 10]), [2, 2, 4, 4])\n assert answers_match(candidate(nums1=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], nums2=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5]), [5, 5, 5, 5, 5, 5, 5, 5, 5, 5])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1], nums2=[1, 1, 1]), [1, 1, 1])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[1, 1, 1, 1]), [1, 1, 1, 1])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [1, 2, 3, 4, 5, 6, 7, 8, 9])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[5, 5, 4, 4, 3, 3, 2, 2, 1, 1]), [5, 5, 4, 4, 3, 3, 2, 2, 1, 1])\n assert answers_match(candidate(nums1=[3, 3, 3, 3, 3, 3, 3, 3, 3, 3], nums2=[3, 3, 3, 3, 3]), [3, 3, 3, 3, 3])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[1, 1, 1, 2, 2, 3]), [1, 1, 2, 2, 3])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], nums2=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n assert answers_match(candidate(nums1=[1, 3, 5, 7, 9], nums2=[2, 4, 6, 8, 10]), [])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]), [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000])\n assert answers_match(candidate(nums1=[500, 500, 500, 500, 500], nums2=[500, 500]), [500, 500])\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 4], nums2=[2, 2, 4, 4, 6]), [2, 2, 4])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], nums2=[100, 200, 300, 400, 500]), [])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 400, 300, 200, 100]), [500, 400, 300, 200, 100])\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 7, 8, 9, 10], nums2=[2, 2, 4, 4, 5, 5, 5, 10, 11, 12]), [2, 2, 4, 4, 5, 5, 5, 10])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 2, 2, 3, 3, 4], nums2=[2, 2, 3, 5]), [2, 2, 3])\n assert answers_match(candidate(nums1=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], nums2=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n assert answers_match(candidate(nums1=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20], nums2=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19]), [])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3, 4, 4, 5, 5], nums2=[1, 2, 3, 4, 5]), [1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60], nums2=[15, 25, 35, 45, 55, 65]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[11, 12, 13, 14, 15, 16, 17, 18, 19, 20]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5], nums2=[6, 7, 8, 9, 10]), [])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[5, 6, 7, 8, 9, 10, 11, 12, 13, 14]), [5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[7, 7, 7, 8, 8, 9], nums2=[8, 7, 9, 7, 7, 10]), [8, 7, 9, 7, 7])\n assert answers_match(candidate(nums1=[5, 5, 5, 5, 5], nums2=[5, 5, 5]), [5, 5, 5])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[5, 15, 25, 35, 45, 55]), [])\n assert answers_match(candidate(nums1=[234, 456, 789, 123, 567, 890, 111, 222, 333, 444], nums2=[111, 222, 333, 444, 555, 666, 777, 888, 999, 123]), [111, 222, 333, 444, 123])\n assert answers_match(candidate(nums1=[3, 3, 3, 3, 3], nums2=[3, 3, 3]), [3, 3, 3])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], nums2=[50, 60, 70, 80, 90, 100, 110, 120, 130, 140]), [50, 60, 70, 80, 90, 100])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), [1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], nums2=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums1=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], nums2=[2, 2, 2, 2]), [])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500], nums2=[500, 400, 300, 200, 100]), [500, 400, 300, 200, 100])\n assert answers_match(candidate(nums1=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], nums2=[1, 2, 3, 4, 5, 1, 2, 3, 4, 5]), [1, 2, 3, 4, 5, 1, 2, 3, 4, 5])\n assert answers_match(candidate(nums1=[100, 101, 102, 103, 104, 105, 106, 107, 108, 109], nums2=[100, 101, 102, 103, 104, 105, 106, 107, 108, 109]), [100, 101, 102, 103, 104, 105, 106, 107, 108, 109])\n assert answers_match(candidate(nums1=[10, 20, 30, 40, 50], nums2=[50, 40, 30, 20, 10]), [50, 40, 30, 20, 10])\n assert answers_match(candidate(nums1=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], nums2=[5, 10, 15, 20, 25, 30]), [5, 10, 15, 20, 25, 30])\n assert answers_match(candidate(nums1=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000], nums2=[1000, 900, 800, 700, 600, 500, 400, 300, 200, 100]), [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100])\n assert answers_match(candidate(nums1=[1, 1, 2, 2, 3, 3], nums2=[1, 2, 3, 4, 5, 6]), [1, 2, 3])\n assert answers_match(candidate(nums1=[5, 1, 3, 3, 2, 4], nums2=[3, 2, 2, 5, 1]), [3, 2, 5, 1])\n assert answers_match(candidate(nums1=[500, 500, 500, 500, 500], nums2=[500, 500, 500, 500, 500, 500, 500, 500, 500, 500]), [500, 500, 500, 500, 500])\n", "comparison": "unordered"}, "public_tests": ["[1,2,2,1]\n[2,2]", "[4,9,5]\n[9,4,9,8,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().intersect", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:40+00:00", "tests_total": 137, "tests_dropped": 2, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "two-pointers", "binary-search", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def intersect(nums1, nums2)", "container": null, "callable": "intersect", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 354, "task_id": "russian-doll-envelopes", "difficulty": "Hard", "problem_description": "You are given a 2D array of integers envelopes where envelopes[i] = [w_i, h_i] represents the width and the height of an envelope.\n\nOne envelope can fit into another if and only if both the width and height of one envelope are greater than the other envelope's width and height.\n\nReturn the maximum number of envelopes you can Russian doll (i.e., put one inside the other).\n\nNote: You cannot rotate an envelope.\n\nExample 1:\n\nInput: envelopes = [[5,4],[6,4],[6,7],[2,3]]\nOutput: 3\nExplanation: The maximum number of envelopes you can Russian doll is 3 ([2,3] => [5,4] => [6,7]).\n\nExample 2:\n\nInput: envelopes = [[1,1],[1,1],[1,1]]\nOutput: 1\n\nConstraints:\n\n- 1 <= envelopes.length <= 10^5\n- envelopes[i].length == 2\n- 1 <= w_i, h_i <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(envelopes = [[10, 16], [2, 3], [6, 8], [7, 19]]) == 3\n assert candidate(envelopes = [[1, 3], [3, 5], [6, 7], [8, 4], [9, 5]]) == 3\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3]]) == 3\n assert candidate(envelopes = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1]]) == 1\n assert candidate(envelopes = [[1, 3], [2, 5], [3, 7], [4, 9], [5, 11], [6, 13], [7, 15], [8, 17], [9, 19], [10, 21]]) == 10\n assert candidate(envelopes = [[2, 100], [3, 200], [4, 300], [5, 500], [5, 400], [5, 250], [6, 370], [6, 360], [7, 380]]) == 5\n assert candidate(envelopes = [[10, 16], [2, 3], [6, 8], [7, 12]]) == 4\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == 5\n assert candidate(envelopes = [[30, 50], [12, 2], [3, 4], [12, 15]]) == 3\n assert candidate(envelopes = [[2, 100], [3, 200], [4, 300], [5, 400], [5, 500], [5, 600], [6, 300], [6, 400], [6, 500]]) == 5\n assert candidate(envelopes = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 10\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5]]) == 4\n assert candidate(envelopes = [[4, 5], [4, 6], [6, 7], [2, 3]]) == 3\n assert candidate(envelopes = [[1, 1], [1, 1], [1, 1]]) == 1\n assert candidate(envelopes = [[10, 16], [2, 3], [6, 14], [1, 2], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]) == 7\n assert candidate(envelopes = [[3, 2], [4, 3], [5, 4], [1, 5], [6, 6], [7, 7], [2, 8], [8, 2], [9, 9], [10, 1], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15], [16, 16], [17, 17], [18, 18], [19, 19], [20, 20]]) == 16\n assert candidate(envelopes = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [10, 10], [20, 20], [30, 30], [40, 40], [50, 50], [60, 60], [70, 70], [80, 80], [90, 90]]) == 9\n assert candidate(envelopes = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15]]) == 6\n assert candidate(envelopes = [[2, 1], [1, 2], [3, 3], [2, 2], [3, 2], [4, 3], [4, 4], [5, 4], [5, 5], [6, 6]]) == 5\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [1, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 9\n assert candidate(envelopes = [[10, 10], [9, 9], [8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1], [11, 11], [12, 12], [13, 13]]) == 13\n assert candidate(envelopes = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21], [21, 23], [23, 25], [25, 27], [27, 29]]) == 14\n assert candidate(envelopes = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5], [4, 1], [4, 2], [4, 3], [4, 4], [4, 5], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5]]) == 5\n assert candidate(envelopes = [[2, 100], [3, 200], [4, 300], [5, 400], [5, 500], [5, 600], [6, 300], [6, 400], [6, 500], [7, 350], [7, 450], [7, 550], [8, 300], [8, 400], [8, 500]]) == 6\n assert candidate(envelopes = [[10, 18], [9, 16], [8, 14], [7, 12], [6, 10], [5, 8], [4, 6], [3, 4], [2, 2], [1, 1], [11, 20], [12, 22], [13, 24], [14, 26], [15, 28], [16, 30], [17, 32], [18, 34], [19, 36], [20, 38], [21, 40], [22, 42], [23, 44], [24, 46], [25, 48], [26, 50], [27, 52], [28, 54], [29, 56], [30, 58]]) == 30\n assert candidate(envelopes = [[30, 50], [12, 2], [3, 4], [12, 15], [50, 50], [40, 40], [10, 14], [6, 7], [5, 6], [7, 8], [8, 9], [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [3, 4], [3, 5], [3, 6], [3, 7], [3, 8], [4, 5], [4, 6], [4, 7], [4, 8], [5, 6], [5, 7], [5, 8], [6, 7], [6, 8], [7, 8]]) == 12\n assert candidate(envelopes = [[1, 3], [3, 5], [6, 7], [8, 4], [9, 5], [10, 6], [11, 8], [12, 9], [13, 10]]) == 7\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [5, 5], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13]]) == 9\n assert candidate(envelopes = [[1, 3], [3, 5], [6, 7], [8, 4], [9, 5], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12], [11, 13], [12, 14], [13, 15], [14, 16], [15, 17], [16, 18], [17, 19], [18, 20], [19, 21], [20, 22], [21, 23], [22, 24], [23, 25], [24, 26], [25, 27], [26, 28], [27, 29], [28, 30], [29, 31], [30, 32]]) == 30\n assert candidate(envelopes = [[5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10], [6, 11], [7, 12], [8, 13]]) == 4\n assert candidate(envelopes = [[100000, 1], [99999, 2], [99998, 3], [99997, 4], [99996, 5], [99995, 6], [99994, 7], [99993, 8], [99992, 9], [99991, 10]]) == 1\n assert candidate(envelopes = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == 10\n assert candidate(envelopes = [[2, 3], [3, 5], [4, 7], [5, 11], [6, 13], [8, 17], [10, 19], [11, 23], [13, 29], [14, 31], [17, 37], [19, 41], [23, 43], [29, 47], [31, 53], [37, 59], [41, 61], [43, 67], [47, 71], [53, 73], [59, 79], [61, 83], [67, 89], [71, 97], [73, 101], [79, 103], [83, 107], [89, 109], [97, 113]]) == 29\n assert candidate(envelopes = [[2, 3], [5, 4], [6, 4], [6, 7], [8, 4], [9, 5], [10, 6], [11, 7], [12, 8], [13, 9]]) == 7\n assert candidate(envelopes = [[10, 1], [9, 2], [8, 3], [7, 4], [6, 5], [5, 6], [4, 7], [3, 8], [2, 9], [1, 10]]) == 1\n assert candidate(envelopes = [[4, 5], [4, 6], [6, 7], [2, 3], [1, 1], [5, 5], [7, 8], [8, 9], [9, 10], [1, 2]]) == 7\n assert candidate(envelopes = [[15, 20], [18, 23], [19, 24], [21, 26], [25, 30], [27, 32], [28, 33], [30, 35], [32, 37], [34, 39]]) == 10\n assert candidate(envelopes = [[10, 15], [12, 20], [8, 14], [13, 25], [15, 30], [11, 22], [9, 18], [14, 28]]) == 6\n assert candidate(envelopes = [[10, 15], [8, 12], [5, 7], [2, 4], [11, 16], [13, 18], [6, 9], [4, 6], [7, 10], [9, 11], [14, 17], [3, 5], [1, 3], [12, 14], [15, 19]]) == 12\n assert candidate(envelopes = [[15, 15], [10, 20], [20, 10], [30, 25], [25, 30], [5, 5], [20, 20], [10, 30]]) == 4\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10], [2, 9], [3, 8], [4, 7], [5, 8], [6, 9], [7, 10]]) == 9\n assert candidate(envelopes = [[2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 9\n assert candidate(envelopes = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [5, 15], [10, 25], [15, 30], [20, 35], [25, 40], [30, 45], [5, 25], [10, 30], [15, 35], [20, 40], [25, 45], [30, 50]]) == 6\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16]]) == 15\n assert candidate(envelopes = [[3, 5], [6, 7], [9, 11], [12, 14], [15, 17], [18, 20], [21, 23], [24, 26], [27, 29], [30, 32]]) == 10\n assert candidate(envelopes = [[5, 10], [4, 9], [3, 8], [2, 7], [1, 6], [10, 5], [9, 4], [8, 3], [7, 2], [6, 1]]) == 5\n assert candidate(envelopes = [[100, 1], [200, 2], [300, 3], [400, 4], [500, 5], [600, 6], [700, 7], [800, 8], [900, 9], [1000, 10], [1100, 11], [1200, 12], [1300, 13], [1400, 14], [1500, 15], [1600, 16], [1700, 17], [1800, 18], [1900, 19], [2000, 20]]) == 20\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]) == 10\n assert candidate(envelopes = [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [2, 2], [2, 3], [2, 4], [2, 5], [3, 3], [3, 4], [3, 5], [4, 4], [4, 5], [5, 5]]) == 5\n assert candidate(envelopes = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 110], [110, 120], [120, 130], [130, 140], [140, 150]]) == 14\n assert candidate(envelopes = [[10, 1], [9, 2], [8, 3], [7, 4], [6, 5], [5, 6], [4, 7], [3, 8], [2, 9], [1, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15]]) == 6\n assert candidate(envelopes = [[10, 15], [12, 20], [5, 8], [7, 12], [6, 9], [11, 18], [9, 11]]) == 6\n assert candidate(envelopes = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11]]) == 11\n assert candidate(envelopes = [[30, 50], [25, 45], [20, 40], [15, 35], [10, 30], [5, 25], [45, 60], [40, 55], [35, 50], [30, 45], [25, 40], [20, 35], [15, 30], [10, 25], [5, 20], [55, 70], [50, 65], [45, 60], [40, 55], [35, 50], [30, 45], [25, 40], [20, 35], [15, 30], [10, 25], [5, 20], [60, 75], [55, 70], [50, 65], [45, 60], [40, 55], [35, 50], [30, 45], [25, 40]]) == 12\n assert candidate(envelopes = [[2, 5], [2, 6], [3, 5], [3, 6], [4, 5], [4, 6], [5, 5], [5, 6], [6, 5], [6, 6]]) == 2\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [10, 5], [8, 4], [11, 6], [7, 3], [9, 2], [12, 8], [13, 7], [4, 6], [15, 5], [14, 4], [16, 3], [17, 2], [18, 1], [19, 10], [20, 9]]) == 6\n assert candidate(envelopes = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92], [10, 91], [11, 90], [12, 89], [13, 88], [14, 87], [15, 86], [16, 85], [17, 84], [18, 83], [19, 82], [20, 81]]) == 1\n assert candidate(envelopes = [[100, 100], [101, 101], [102, 102], [103, 103], [104, 104], [105, 105], [106, 106], [107, 107], [108, 108], [109, 109]]) == 10\n assert candidate(envelopes = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 110]]) == 10\n assert candidate(envelopes = [[1, 1], [2, 2], [2, 3], [3, 3], [4, 4], [5, 5], [5, 6], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 10\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [8, 6], [9, 7], [10, 8]]) == 5\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [8, 5], [9, 6], [10, 7], [11, 8]]) == 6\n assert candidate(envelopes = [[30, 50], [12, 2], [3, 4], [12, 15], [50, 50], [45, 20], [37, 6], [23, 47], [5, 8], [10, 12], [34, 25], [12, 35]]) == 6\n assert candidate(envelopes = [[1, 3], [3, 5], [6, 7], [8, 4], [9, 5], [11, 6], [12, 8], [13, 7], [14, 9]]) == 6\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [8, 5], [9, 6], [10, 7], [11, 8], [12, 9]]) == 7\n assert candidate(envelopes = [[1, 3], [2, 6], [3, 9], [4, 12], [5, 15], [6, 18], [7, 21], [8, 24], [9, 27], [10, 30]]) == 10\n assert candidate(envelopes = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13]]) == 13\n assert candidate(envelopes = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1], [1, 11], [2, 12], [3, 13], [4, 14], [5, 15], [6, 16], [7, 17], [8, 18], [9, 19], [10, 20]]) == 10\n assert candidate(envelopes = [[2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14]]) == 12\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [3, 6], [4, 8], [5, 10], [7, 12], [8, 14], [9, 16], [10, 18], [11, 20], [12, 22], [13, 24], [14, 26], [15, 28], [16, 30], [17, 32], [18, 34], [19, 36], [20, 38], [21, 40], [22, 42], [23, 44], [24, 46], [25, 48], [26, 50], [27, 52], [28, 54], [29, 56], [30, 58]]) == 28\n assert candidate(envelopes = [[46, 89], [50, 53], [52, 68], [72, 45], [77, 81], [40, 40], [66, 68], [10, 10], [20, 22], [30, 25], [40, 30], [50, 40], [60, 50], [70, 60], [80, 70], [90, 80], [100, 90]]) == 10\n assert candidate(envelopes = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1]]) == 10\n assert candidate(envelopes = [[1, 3], [1, 2], [2, 3], [2, 2], [3, 4], [3, 3], [4, 5], [4, 4], [5, 6], [5, 5], [6, 7], [6, 6], [7, 8], [7, 7], [8, 9], [8, 8], [9, 10], [9, 9], [10, 11], [10, 10]]) == 10\n assert candidate(envelopes = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]) == 5\n assert candidate(envelopes = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12]]) == 10\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20], [20, 21]]) == 20\n assert candidate(envelopes = [[2, 100], [3, 200], [4, 300], [5, 400], [5, 500], [5, 600], [6, 300], [6, 400], [6, 500], [7, 400], [8, 500], [9, 600]]) == 6\n assert candidate(envelopes = [[5, 10], [10, 5], [15, 10], [20, 5], [25, 10], [30, 5], [35, 10], [40, 5], [45, 10], [50, 5], [55, 10], [60, 5], [65, 10], [70, 5], [75, 10], [80, 5], [85, 10], [90, 5], [95, 10], [100, 5]]) == 2\n assert candidate(envelopes = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1], [11, 10], [12, 9], [13, 8], [14, 7], [15, 6], [16, 5], [17, 4], [18, 3], [19, 2], [20, 1]]) == 2\n assert candidate(envelopes = [[10, 18], [2, 15], [12, 16], [7, 13], [3, 11], [5, 14], [9, 12], [8, 10], [6, 17], [1, 9], [11, 8], [13, 7], [4, 6], [15, 5], [14, 4], [16, 3], [17, 2], [18, 1]]) == 5\n assert candidate(envelopes = [[5, 7], [8, 6], [6, 4], [9, 5], [2, 3], [3, 4], [4, 5], [7, 8], [1, 2], [10, 9]]) == 7\n assert candidate(envelopes = [[50, 50], [51, 51], [52, 52], [53, 53], [54, 54], [55, 55], [56, 56], [57, 57], [58, 58], [59, 59]]) == 10\n assert candidate(envelopes = [[10, 18], [2, 9], [4, 12], [5, 15], [1, 6], [7, 21], [8, 24], [9, 27], [11, 30], [3, 10]]) == 9\n assert candidate(envelopes = [[5, 1], [6, 2], [6, 3], [2, 4], [8, 5], [9, 6], [10, 7], [11, 8], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15]]) == 12\n assert candidate(envelopes = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12], [11, 13], [12, 14], [13, 15]]) == 13\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15]]) == 14\n assert candidate(envelopes = [[1, 3], [1, 4], [1, 5], [1, 6], [2, 4], [2, 5], [2, 6], [3, 5], [3, 6], [4, 6]]) == 4\n assert candidate(envelopes = [[20, 50], [10, 25], [30, 75], [5, 10], [25, 50], [15, 35], [35, 65], [40, 60], [50, 80], [55, 85], [60, 90], [65, 95], [70, 100], [75, 105], [80, 110], [85, 115], [90, 120], [95, 125], [100, 130], [105, 135]]) == 17\n assert candidate(envelopes = [[3, 4], [3, 5], [4, 5], [1, 3], [2, 4], [2, 5], [3, 6], [4, 6], [5, 7], [6, 8]]) == 6\n assert candidate(envelopes = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92], [10, 91], [11, 90], [12, 89], [13, 88], [14, 87], [15, 86]]) == 1\n assert candidate(envelopes = [[4, 7], [5, 8], [6, 9], [7, 10], [8, 11], [9, 12], [10, 13], [11, 14], [12, 15], [13, 16], [14, 17], [15, 18]]) == 12\n assert candidate(envelopes = [[30, 50], [12, 2], [3, 4], [12, 15], [12, 13], [20, 20], [25, 30], [10, 5]]) == 6\n assert candidate(envelopes = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20], [20, 21], [21, 22], [22, 23], [23, 24], [24, 25], [25, 26], [26, 27], [27, 28], [28, 29], [29, 30], [30, 31], [31, 32], [32, 33], [33, 34], [34, 35], [35, 36], [36, 37], [37, 38], [38, 39], [39, 40]]) == 39\n assert candidate(envelopes = [[1, 100000], [2, 99999], [3, 99998], [4, 99997], [5, 99996], [6, 99995], [7, 99994], [8, 99993], [9, 99992], [10, 99991]]) == 1\n assert candidate(envelopes = [[5, 5], [4, 4], [3, 3], [2, 2], [1, 1], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13]]) == 13\n assert candidate(envelopes = [[5, 4], [6, 4], [6, 7], [2, 3], [5, 4], [6, 7], [8, 9], [10, 11], [12, 13], [14, 15], [16, 17], [18, 19], [20, 21], [22, 23], [24, 25]]) == 12\n", "comparison": "exact"}, "public_tests": ["[[5,4],[6,4],[6,7],[2,3]]", "[[1,1],[1,1],[1,1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["envelopes"], "leetcode_dataset_entry_point": "Solution().maxEnvelopes", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:44+00:00", "tests_total": 96, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search", "dynamic-programming", "sorting", "longest-increasing-subsequence"]}, "language": "ruby", "interface": {"raw_signature": "def max_envelopes(envelopes)", "container": null, "callable": "max_envelopes", "parameters": [{"name": "envelopes", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 363, "task_id": "max-sum-of-rectangle-no-larger-than-k", "difficulty": "Hard", "problem_description": "Given an m x n matrix matrix and an integer k, return the max sum of a rectangle in the matrix such that its sum is no larger than k.\n\nIt is guaranteed that there will be a rectangle with a sum no larger than k.\n\nExample 1:\n\nInput: matrix = [[1,0,1],[0,-2,3]], k = 2\nOutput: 2\nExplanation: Because the sum of the blue rectangle [[0, 1], [-2, 3]] is 2, and 2 is the max number no larger than k (k = 2).\n\nExample 2:\n\nInput: matrix = [[2,2,-1]], k = 3\nOutput: 3\n\nConstraints:\n\n- m == matrix.length\n- n == matrix[i].length\n- 1 <= m, n <= 100\n- -100 <= matrix[i][j] <= 100\n- -10^5 <= k <= 10^5\n\nFollow up: What if the number of rows is much larger than the number of columns?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[1, 0, 1], [0, 1, 0], [1, 0, 1]],k = 2) == 2\n assert candidate(matrix = [[5, 12, 4], [3, 9, 1], [11, 1, 3]],k = 17) == 17\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3]],k = 2) == 2\n assert candidate(matrix = [[1, 1, 1], [1, 1, 1], [1, 1, 1]],k = 2) == 2\n assert candidate(matrix = [[-1, -1, -1], [-1, -1, -1], [-1, -1, -1]],k = -3) == -3\n assert candidate(matrix = [[5, 6, 7], [8, 9, 10]],k = 24) == 19\n assert candidate(matrix = [[5, -4, -3, 4], [-3, -4, 4, 5], [5, 1, 5, -4]],k = 10) == 10\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],k = 20) == 18\n assert candidate(matrix = [[-10, -20, -30], [-40, -50, -60], [-70, -80, -90]],k = -200) == -210\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [1, 2, 1]],k = 4) == 4\n assert candidate(matrix = [[2, 2, -1]],k = 3) == 3\n assert candidate(matrix = [[-1, 0, 1, 0, -1], [0, 1, 0, -1, 0], [1, 0, -1, 0, 1]],k = 0) == 0\n assert candidate(matrix = [[10, 20, 30], [40, 50, 60], [70, 80, 90]],k = 200) == 180\n assert candidate(matrix = [[-1, -1, -1], [-1, -2, -3], [-3, -3, -4]],k = -5) == -5\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],k = 15) == 15\n assert candidate(matrix = [[10, 20, 30], [-10, -20, -30], [15, 25, 35]],k = 25) == 25\n assert candidate(matrix = [[5, 5, -5, 0, -5], [5, 5, 0, 0, -5], [5, 5, -5, -5, 0], [0, -5, 0, 0, 5], [0, -5, 5, 5, 5]],k = 15) == 15\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],k = 10) == 10\n assert candidate(matrix = [[-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1], [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1]],k = 0) == 0\n assert candidate(matrix = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [6, 7, 8, 9, 10], [10, 9, 8, 7, 6], [11, 12, 13, 14, 15]],k = 30) == 30\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-6, -7, -8, -9, -10], [-11, -12, -13, -14, -15], [-16, -17, -18, -19, -20], [-21, -22, -23, -24, -25]],k = -100) == -102\n assert candidate(matrix = [[-5, 2, 3, -1, 4], [1, -6, 7, 8, -2], [0, 9, -3, 4, 5], [-1, -2, 3, 4, -6]],k = 5) == 5\n assert candidate(matrix = [[-10, -20, -30, -40, -50], [-40, -50, -60, -70, -80], [-30, -40, -50, -60, -70], [-20, -30, -40, -50, -60], [-10, -20, -30, -40, -50]],k = -100) == -100\n assert candidate(matrix = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[-100, 100, -100, 100], [-100, 100, -100, 100], [-100, 100, -100, 100], [-100, 100, -100, 100]],k = -100) == -100\n assert candidate(matrix = [[100, -100, 100, -100], [100, -100, 100, -100], [100, -100, 100, -100], [100, -100, 100, -100]],k = 99) == 0\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 1], [3, 4, 5, 6, 1, 2], [4, 5, 6, 1, 2, 3], [5, 6, 1, 2, 3, 4], [6, 1, 2, 3, 4, 5]],k = 20) == 20\n assert candidate(matrix = [[-10, -10, -10], [-10, -10, -10], [-10, -10, -10]],k = -29) == -30\n assert candidate(matrix = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[100, -100, 100, -100], [100, -100, 100, -100], [-100, 100, -100, 100], [-100, 100, -100, 100]],k = 0) == 0\n assert candidate(matrix = [[-10, 10, 20, 30], [-20, 5, -15, 10], [15, -25, 20, 5], [0, -5, 10, 15]],k = 25) == 25\n assert candidate(matrix = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],k = 10) == 9\n assert candidate(matrix = [[3, 2, 1, 4], [1, -1, 2, 3], [2, 1, 1, 2], [4, 2, -1, 3]],k = 5) == 5\n assert candidate(matrix = [[-2, -3, -4, 0], [-5, -3, -2, -1], [0, -1, 2, 3], [4, 2, -1, 3]],k = -1) == -1\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],k = 40) == 40\n assert candidate(matrix = [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],k = 50) == 50\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-6, -7, -8, -9, -10], [-11, -12, -13, -14, -15], [-16, -17, -18, -19, -20], [-21, -22, -23, -24, -25]],k = -10) == -10\n assert candidate(matrix = [[5, -4, -3, 4, -2], [2, -3, 4, 5, -1], [-3, 5, 1, 5, -4], [0, 0, 0, 0, 0]],k = 10) == 10\n assert candidate(matrix = [[1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1], [1, 1, 1]],k = 5) == 5\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],k = 200) == 198\n assert candidate(matrix = [[-10, -20, -30, -40, -50], [-50, -40, -30, -20, -10], [0, 10, 20, 30, 40], [50, 40, 30, 20, 10], [60, 50, 40, 30, 20]],k = -25) == -30\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],k = 30) == 30\n assert candidate(matrix = [[-1, -2, -3], [-3, -4, -5], [-5, -6, -7], [-7, -8, -9], [-9, -10, -11]],k = -20) == -20\n assert candidate(matrix = [[5, 10, 15, -5, 20], [10, -20, 25, 30, -15], [5, 15, -25, 10, 0], [0, 5, 10, -15, 20]],k = 40) == 40\n assert candidate(matrix = [[1, -2, 3, -4, 5], [2, -3, 4, -5, 6], [3, -4, 5, -6, 7], [4, -5, 6, -7, 8]],k = 5) == 5\n assert candidate(matrix = [[-5, 4, -10, 5], [-2, -3, 8, -4], [3, 5, -9, 1], [7, -6, 4, 2]],k = -1) == -1\n assert candidate(matrix = [[-5, 3, 4, 1, -2], [-1, 2, -3, 4, 5], [2, -1, -1, 1, -1], [3, -3, 2, -2, 1]],k = 5) == 5\n assert candidate(matrix = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, -2, 3, -4, 5], [1, 2, -1, 3, -2]],k = 3) == 3\n assert candidate(matrix = [[-1, 3, 2, 4, -5, -3], [2, 1, 2, 3, -1, 2], [4, 0, -1, 2, -1, 3], [-2, -2, 3, -3, -2, 2], [3, 3, 0, -2, -3, 1], [3, 0, -2, 3, 1, 3]],k = 5) == 5\n assert candidate(matrix = [[9, 7, -6, -4, 8], [-2, -5, 7, 2, -3], [3, 10, -4, 1, -2], [7, -6, 5, 4, 3]],k = 15) == 15\n assert candidate(matrix = [[-5, 3, 6, 2, -2], [-1, 2, -4, -4, 1], [2, -3, -3, -1, 5], [3, 1, 1, 2, -1], [3, 2, -1, 0, -4]],k = 3) == 3\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-5, -4, -3, -2, -1], [1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [-2, -3, -4, -5, -6]],k = -10) == -10\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-6, -7, -8, -9, -10], [-11, -12, -13, -14, -15], [-16, -17, -18, -19, -20], [-21, -22, -23, -24, -25]],k = -50) == -50\n assert candidate(matrix = [[100, -100, 100], [-100, 100, -100], [100, -100, 100]],k = 150) == 100\n assert candidate(matrix = [[100, -100, 100, -100, 100], [-100, 100, -100, 100, -100], [100, -100, 100, -100, 100], [-100, 100, -100, 100, -100], [100, -100, 100, -100, 100]],k = 0) == 0\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],k = 5) == 5\n assert candidate(matrix = [[1, -1, 1, -1, 1, -1], [-1, 1, -1, 1, -1, 1], [1, -1, 1, -1, 1, -1], [-1, 1, -1, 1, -1, 1], [1, -1, 1, -1, 1, -1], [-1, 1, -1, 1, -1, 1]],k = 1) == 1\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [-4, -3, -2, -1, 0], [-3, -2, -1, 0, 1], [-2, -1, 0, 1, 2], [-1, 0, 1, 2, 3]],k = -1) == -1\n assert candidate(matrix = [[-1, 2, -3, 4, -5], [5, -4, 3, -2, 1], [-1, 2, -3, 4, -5], [5, -4, 3, -2, 1], [-1, 2, -3, 4, -5]],k = 0) == 0\n assert candidate(matrix = [[1, -1, 2, -2, 3, -3], [4, -4, 5, -5, 6, -6], [7, -7, 8, -8, 9, -9]],k = 15) == 15\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11]],k = 50) == 50\n assert candidate(matrix = [[-1, 2, -3, 4, 5, -6], [7, 8, -9, 10, 11, -12], [13, 14, -15, 16, 17, -18]],k = 15) == 15\n assert candidate(matrix = [[1, -1, 1, -1, 1], [-1, 1, -1, 1, -1], [1, -1, 1, -1, 1], [-1, 1, -1, 1, -1], [1, -1, 1, -1, 1]],k = 2) == 1\n assert candidate(matrix = [[100, -100, 100], [-100, 100, -100], [100, -100, 100]],k = 0) == 0\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36]],k = 150) == 150\n assert candidate(matrix = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[100, -100, 100], [-100, 100, -100], [100, -100, 100], [100, -100, 100]],k = 50) == 0\n assert candidate(matrix = [[1, -1, 1, -1, 1, -1], [1, -1, 1, -1, 1, -1], [1, -1, 1, -1, 1, -1], [1, -1, 1, -1, 1, -1], [1, -1, 1, -1, 1, -1]],k = 0) == 0\n assert candidate(matrix = [[100, -100, 100], [-100, 100, -100], [100, -100, 100]],k = 200) == 100\n assert candidate(matrix = [[-1, -2, -3, -4, -5], [-2, -3, -4, -5, -6], [-3, -4, -5, -6, -7], [-4, -5, -6, -7, -8], [-5, -6, -7, -8, -9]],k = -15) == -15\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]],k = 15) == 15\n assert candidate(matrix = [[50, -50, 50, -50, 50], [-50, 50, -50, 50, -50], [50, -50, 50, -50, 50], [-50, 50, -50, 50, -50], [50, -50, 50, -50, 50]],k = 50) == 50\n assert candidate(matrix = [[-1, 0, 0, 0, -1], [-1, 1, 1, 1, -1], [-1, 1, 0, 1, -1], [-1, 0, 1, 0, -1]],k = 2) == 2\n assert candidate(matrix = [[-2, 3, 5, -1], [1, -3, 2, 4], [3, 2, -4, 1], [-1, 5, 2, -6]],k = 5) == 5\n assert candidate(matrix = [[-1, -1, 2, -2, 3, -3], [1, -2, -1, -3, 4, -4], [2, 3, 1, -1, 2, -2], [-1, 2, 0, -3, 3, 2], [3, 3, 3, 3, 3, 3], [0, 0, 0, 0, 0, 0]],k = 10) == 10\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 8]],k = 30) == 30\n assert candidate(matrix = [[-1, -2, -3, -4], [-2, -3, -4, -5], [-3, -4, -5, -6]],k = -5) == -5\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],k = 20) == 20\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30]],k = 150) == 150\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]],k = 18) == 18\n assert candidate(matrix = [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]],k = 1) == 1\n assert candidate(matrix = [[-5, 10, -20, 15, 25], [-1, 2, 3, -4, 5], [20, -25, 30, -35, 40], [-10, 15, 20, -25, 30]],k = 10) == 10\n assert candidate(matrix = [[-1, 0, 1, -1, 0, 1], [-1, 0, 1, -1, 0, 1], [-1, 0, 1, -1, 0, 1]],k = 0) == 0\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],k = 100) == 99\n assert candidate(matrix = [[-5, 0, 4, -1, 1], [-3, -3, 3, 0, -2], [1, -2, 4, 1, -1], [-1, 0, -1, 0, 0], [1, 1, 1, -1, 1]],k = 3) == 3\n assert candidate(matrix = [[-10, -20, -30], [-40, -50, -60], [-70, -80, -90]],k = -150) == -150\n assert candidate(matrix = [[1, 2, 3, 4], [2, 3, 4, 5], [3, 4, 5, 6], [4, 5, 6, 7]],k = 15) == 15\n assert candidate(matrix = [[1, -1, 2, -2], [-1, 1, -2, 2], [2, -2, 1, -1], [-2, 2, -1, 1]],k = 3) == 2\n assert candidate(matrix = [[1, 0, -1, 0, 1], [0, 1, 0, -1, 0], [-1, 0, 1, 0, -1], [0, -1, 0, 1, 0], [1, 0, -1, 0, 1]],k = 2) == 2\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, -2, 3, -2, 3], [1, 0, 1, 0, 1]],k = 2) == 2\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9]],k = 15) == 15\n assert candidate(matrix = [[5, 6, 7, 8], [4, 3, 2, 1], [9, 10, 11, 12]],k = 30) == 30\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [1, -1, 2]],k = 2) == 2\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [3, 2, -1]],k = 4) == 4\n assert candidate(matrix = [[5, 9, 7, 4, 6], [9, 7, 4, 6, 5], [4, 6, 5, 9, 7], [6, 5, 9, 7, 4]],k = 20) == 20\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]],k = 15) == 15\n assert candidate(matrix = [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[-100, -100, -100], [-100, -100, -100], [-100, -100, -100]],k = -300) == -300\n assert candidate(matrix = [[-5, 6, -7, 8], [4, -3, 2, -1], [9, -10, 11, -12]],k = 5) == 5\n assert candidate(matrix = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],k = -5) == -5\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [3, 2, 1], [-1, -1, -1]],k = 2) == 2\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [3, 2, 1]],k = 5) == 5\n assert candidate(matrix = [[1, 1, 1], [1, 1, 1], [1, 1, 1]],k = 5) == 4\n assert candidate(matrix = [[10, 10, 10], [10, 10, 10], [10, 10, 10]],k = 30) == 30\n assert candidate(matrix = [[2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2], [2, 2, 2, 2, 2]],k = 10) == 10\n assert candidate(matrix = [[100, 100, 100], [100, 100, 100], [100, 100, 100]],k = 299) == 200\n assert candidate(matrix = [[-2, -3, -4, -5], [-6, -7, -8, -9], [-10, -11, -12, -13]],k = -15) == -15\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],k = 15) == 15\n assert candidate(matrix = [[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9]],k = 25) == 25\n assert candidate(matrix = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],k = -1) == -1\n assert candidate(matrix = [[-1, 3, 2, -4, 1, 2], [3, 2, -1, 4, -3, -2], [2, 1, -3, 4, 1, -3]],k = 10) == 10\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0]],k = 3) == 3\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],k = 20) == 20\n assert candidate(matrix = [[0, 0, 0], [0, 0, 0], [0, 0, 0]],k = 0) == 0\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [1, -1, 1]],k = 1) == 1\n assert candidate(matrix = [[-5, -4, -3], [-4, -3, -2], [-3, -2, -1]],k = -8) == -8\n assert candidate(matrix = [[100, -100], [100, -100]],k = 0) == 0\n assert candidate(matrix = [[10, 20, 30], [40, 50, 60], [70, 80, 90]],k = 150) == 150\n assert candidate(matrix = [[-1, -1, -1], [-1, -1, -1], [-1, -1, -1]],k = -2) == -2\n assert candidate(matrix = [[10, 11, 12], [9, 10, 11], [8, 9, 10]],k = 29) == 27\n assert candidate(matrix = [[-1, 0, 1], [-2, -1, 2], [-3, -2, 3]],k = -1) == -1\n assert candidate(matrix = [[-5, -4, -3], [-2, -1, 0], [1, 2, 3]],k = -5) == -5\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [4, 5, 6]],k = 10) == 10\n assert candidate(matrix = [[-5, -4, -3, -4], [-3, -4, 4, 5], [5, 1, 5, -4]],k = -10) == -10\n assert candidate(matrix = [[10, 10, 10], [10, -10, 10], [10, 10, -10]],k = 30) == 30\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],k = 30) == 30\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [0, 3, -1]],k = 4) == 4\n assert candidate(matrix = [[-1, 1], [-2, 2], [-3, 3]],k = 1) == 1\n assert candidate(matrix = [[3, 3, 3], [3, 3, 3], [3, 3, 3]],k = 27) == 27\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, -2, 3, -2, 3], [3, 2, 1, 2, 1]],k = 4) == 4\n assert candidate(matrix = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 3, 5, 7, 9], [9, 7, 5, 3, 1]],k = 15) == 15\n assert candidate(matrix = [[-1, -1, -1], [-1, -1, -1], [-1, -1, -1]],k = -1) == -1\n assert candidate(matrix = [[1]],k = 1) == 1\n assert candidate(matrix = [[5, 12, 11, 18, 22], [2, 4, 3, 10, 19], [1, 3, 8, 12, 22], [9, 18, 10, 24, 25], [10, 14, 10, 12, 25]],k = 50) == 50\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6]],k = 15) == 12\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],k = 10) == 9\n assert candidate(matrix = [[3, 2, 1, 4, 7], [2, 1, 3, 2, 5], [1, 4, 2, 2, 3]],k = 13) == 13\n assert candidate(matrix = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],k = 25) == 24\n assert candidate(matrix = [[5, 6, 3, 4, 8], [4, 3, 1, 4, 6], [5, 8, 7, 3, 4], [3, 8, 8, 8, 5], [5, 7, 2, 4, 7]],k = 20) == 20\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [-9, -8, -7, -6, -5], [-4, -3, -2, -1, 0]],k = 10) == 10\n assert candidate(matrix = [[1, 0], [0, 1]],k = 2) == 2\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [4, 1, 0]],k = 5) == 5\n assert candidate(matrix = [[1, 0, 1, 0], [0, -2, 3, 1], [3, 2, -1, 0]],k = 3) == 3\n assert candidate(matrix = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],k = -10) == -11\n assert candidate(matrix = [[5, 10, 15], [20, 25, 30]],k = 45) == 45\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [3, 2, 1]],k = 4) == 4\n assert candidate(matrix = [[-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1], [-1, -1, -1, -1]],k = -4) == -4\n assert candidate(matrix = [[5, 10, 15], [20, 25, 30], [35, 40, 45]],k = 100) == 90\n assert candidate(matrix = [[5, 12, -100, 4, -5], [-3, 1, 4, -3, -4], [2, 3, 4, -3, 4], [1, -2, 3, -2, 1]],k = 7) == 7\n assert candidate(matrix = [[5, 2, 3], [1, 6, 7], [4, 8, 9]],k = 20) == 19\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8]],k = 16) == 16\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [3, 2, -1]],k = 5) == 5\n assert candidate(matrix = [[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8]],k = 20) == 20\n assert candidate(matrix = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]],k = 1) == 1\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [5, 4, 3, 2, 1], [0, 0, 0, 0, 0], [1, 2, 3, 4, 5], [-1, -2, -3, -4, -5]],k = 2) == 2\n assert candidate(matrix = [[-1, -1], [-1, -1]],k = -2) == -2\n assert candidate(matrix = [[2, 2], [2, 2], [2, 2]],k = 6) == 6\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, -2, 3, -2, 3], [-3, -4, 4, 5, -4], [5, 1, 5, -4, 1]],k = 5) == 5\n assert candidate(matrix = [[100, 100, 100], [100, 100, 100], [100, 100, 100]],k = 100) == 100\n assert candidate(matrix = [[1, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 1]],k = 1) == 1\n assert candidate(matrix = [[1, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]],k = 1) == 1\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1]],k = 2) == 2\n assert candidate(matrix = [[5, 5, 5], [5, 5, 5], [5, 5, 5]],k = 15) == 15\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 0, 0, 0], [1, 0, 0, 0, 0], [1, 0, 0, 0, 0], [1, 0, 0, 0, 0]],k = 3) == 3\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [1, 0, 1]],k = 4) == 4\n assert candidate(matrix = [[0, 0], [0, 0]],k = 0) == 0\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],k = 15) == 15\n assert candidate(matrix = [[2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2]],k = 7) == 6\n assert candidate(matrix = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],k = 8) == 8\n assert candidate(matrix = [[100, 100], [100, 100]],k = 200) == 200\n assert candidate(matrix = [[-1, -1], [-2, -2]],k = -2) == -2\n assert candidate(matrix = [[-1, -1], [-1, -1]],k = -3) == -4\n assert candidate(matrix = [[0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]],k = 25) == 24\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],k = 3) == 3\n assert candidate(matrix = [[1, 2], [3, 4], [5, 6], [7, 8]],k = 10) == 10\n assert candidate(matrix = [[1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1]],k = 2) == 2\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [1, 2, -1]],k = 4) == 4\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6]],k = 15) == 15\n assert candidate(matrix = [[1, 1], [1, 1]],k = 3) == 2\n assert candidate(matrix = [[5, 6, 7], [8, 9, 10], [11, 12, 13]],k = 30) == 30\n assert candidate(matrix = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1]],k = -2) == -2\n assert candidate(matrix = [[5, 10, 15], [20, 25, 30]],k = 50) == 45\n assert candidate(matrix = [[-2, -1, -3], [-3, -1, -2], [-1, -3, -2]],k = -4) == -4\n assert candidate(matrix = [[-1, 7, 8], [-9, 4, 5]],k = 14) == 14\n assert candidate(matrix = [[1, 0, 1, 0, 1], [0, -2, 3, -2, 1], [1, 1, 1, 1, 1]],k = 3) == 3\n assert candidate(matrix = [[-1, -1, -1], [-1, -1, -1], [-1, -1, -1]],k = -5) == -6\n assert candidate(matrix = [[1, 0, 1], [0, -2, 3], [-1, -1, -1]],k = -1) == -1\n assert candidate(matrix = [[5, 6, 7, 8], [1, 2, 3, 4], [9, 10, 11, 12], [13, 14, 15, 16]],k = 20) == 19\n assert candidate(matrix = [[1, 2], [3, 4]],k = 10) == 10\n assert candidate(matrix = [[-1, 2], [-3, 4]],k = 1) == 1\n assert candidate(matrix = [[5, 3, 1, 4, 2], [8, 6, 9, 7, 5], [3, 2, 8, 6, 4], [1, 4, 5, 2, 3], [7, 5, 4, 8, 6]],k = 25) == 25\n assert candidate(matrix = [[1, 2], [3, 4]],k = 6) == 6\n assert candidate(matrix = [[10, 10, 10], [10, 10, 10], [10, 10, 10]],k = 50) == 40\n assert candidate(matrix = [[-1, 0, -1], [0, 2, -3], [3, -2, 1], [1, -1, 1]],k = 1) == 1\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],k = 30) == 28\n assert candidate(matrix = [[-100, -100, -100], [-100, -100, -100], [-100, -100, -100]],k = -100) == -100\n", "comparison": "exact"}, "public_tests": ["[[1,0,1],[0,-2,3]]\n2", "[[2,2,-1]]\n3"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix", "k"], "leetcode_dataset_entry_point": "Solution().maxSumSubmatrix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:46:58+00:00", "tests_total": 205, "tests_dropped": 7, "flags": ["has_images"], "topic_tags": ["array", "binary-search", "matrix", "prefix-sum", "ordered-set"]}, "language": "ruby", "interface": {"raw_signature": "def max_sum_submatrix(matrix, k)", "container": null, "callable": "max_sum_submatrix", "parameters": [{"name": "matrix", "type": "Integer[][]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 365, "task_id": "water-and-jug-problem", "difficulty": "Medium", "problem_description": "You are given two jugs with capacities x liters and y liters. You have an infinite water supply. Return whether the total amount of water in both jugs may reach target using the following operations:\n\n- Fill either jug completely with water.\n- Completely empty either jug.\n- Pour water from one jug into another until the receiving jug is full, or the transferring jug is empty.\n\nExample 1:\n\nInput: x = 3, y = 5, target = 4\nOutput: true\nExplanation:\nFollow these steps to reach a total of 4 liters:\n1. Fill the 5-liter jug (0, 5).\n2. Pour from the 5-liter jug into the 3-liter jug, leaving 2 liters (3, 2).\n3. Empty the 3-liter jug (0, 2).\n4. Transfer the 2 liters from the 5-liter jug to the 3-liter jug (2, 0).\n5. Fill the 5-liter jug again (2, 5).\n6. Pour from the 5-liter jug into the 3-liter jug until the 3-liter jug is full. This leaves 4 liters in the 5-liter jug (3, 4).\n7. Empty the 3-liter jug. Now, you have exactly 4 liters in the 5-liter jug (0, 4).\n\nReference: The Die Hard example.\n\nExample 2:\n\nInput: x = 2, y = 6, target = 5\nOutput: false\n\nExample 3:\n\nInput: x = 1, y = 2, target = 3\nOutput: true\nExplanation: Fill both jugs. The total amount of water in both jugs is equal to 3 now.\n\nConstraints:\n\n- 1 <= x, y, target <= 10^3\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(x = 3,y = 7,target = 1) == True\n assert candidate(x = 7,y = 3,target = 1) == True\n assert candidate(x = 8,y = 5,target = 9) == True\n assert candidate(x = 2,y = 6,target = 5) == False\n assert candidate(x = 10,y = 10,target = 15) == False\n assert candidate(x = 5,y = 5,target = 10) == True\n assert candidate(x = 5,y = 3,target = 8) == True\n assert candidate(x = 7,y = 11,target = 6) == True\n assert candidate(x = 7,y = 3,target = 2) == True\n assert candidate(x = 4,y = 9,target = 6) == True\n assert candidate(x = 1,y = 2,target = 3) == True\n assert candidate(x = 1,y = 1,target = 2) == True\n assert candidate(x = 10,y = 10,target = 20) == True\n assert candidate(x = 8,y = 11,target = 15) == True\n assert candidate(x = 34,y = 5,target = 6) == True\n assert candidate(x = 100,y = 333,target = 500) == False\n assert candidate(x = 5,y = 2,target = 3) == True\n assert candidate(x = 4,y = 4,target = 7) == False\n assert candidate(x = 3,y = 5,target = 4) == True\n assert candidate(x = 29,y = 31,target = 30) == True\n assert candidate(x = 23,y = 39,target = 11) == True\n assert candidate(x = 67,y = 79,target = 178) == False\n assert candidate(x = 23,y = 54,target = 77) == True\n assert candidate(x = 17,y = 13,target = 20) == True\n assert candidate(x = 200,y = 300,target = 500) == True\n assert candidate(x = 311,y = 271,target = 582) == True\n assert candidate(x = 53,y = 67,target = 134) == False\n assert candidate(x = 400,y = 500,target = 800) == True\n assert candidate(x = 31,y = 47,target = 78) == True\n assert candidate(x = 47,y = 61,target = 110) == False\n assert candidate(x = 61,y = 41,target = 29) == True\n assert candidate(x = 23,y = 29,target = 42) == True\n assert candidate(x = 103,y = 113,target = 326) == False\n assert candidate(x = 500,y = 300,target = 400) == True\n assert candidate(x = 73,y = 21,target = 50) == True\n assert candidate(x = 100,y = 33,target = 67) == True\n assert candidate(x = 79,y = 97,target = 236) == False\n assert candidate(x = 97,y = 107,target = 294) == False\n assert candidate(x = 33,y = 44,target = 77) == True\n assert candidate(x = 97,y = 101,target = 73) == True\n assert candidate(x = 31,y = 47,target = 20) == True\n assert candidate(x = 13,y = 17,target = 30) == True\n assert candidate(x = 200,y = 125,target = 325) == True\n assert candidate(x = 123,y = 456,target = 579) == True\n assert candidate(x = 41,y = 97,target = 86) == True\n assert candidate(x = 61,y = 79,target = 89) == True\n assert candidate(x = 23,y = 37,target = 60) == True\n assert candidate(x = 29,y = 41,target = 59) == True\n assert candidate(x = 127,y = 139,target = 414) == False\n assert candidate(x = 101,y = 109,target = 310) == False\n assert candidate(x = 29,y = 31,target = 60) == True\n assert candidate(x = 61,y = 122,target = 183) == True\n assert candidate(x = 97,y = 54,target = 43) == True\n assert candidate(x = 149,y = 163,target = 510) == False\n assert candidate(x = 89,y = 103,target = 270) == False\n assert candidate(x = 97,y = 61,target = 73) == True\n assert candidate(x = 100,y = 75,target = 250) == False\n assert candidate(x = 53,y = 19,target = 67) == True\n assert candidate(x = 113,y = 137,target = 390) == False\n assert candidate(x = 81,y = 147,target = 108) == True\n assert candidate(x = 500,y = 600,target = 1000) == True\n assert candidate(x = 157,y = 173,target = 550) == False\n assert candidate(x = 253,y = 103,target = 356) == True\n assert candidate(x = 500,y = 750,target = 1000) == True\n assert candidate(x = 113,y = 131,target = 119) == True\n assert candidate(x = 250,y = 350,target = 600) == True\n assert candidate(x = 71,y = 23,target = 37) == True\n assert candidate(x = 59,y = 17,target = 50) == True\n assert candidate(x = 23,y = 37,target = 29) == True\n assert candidate(x = 221,y = 359,target = 285) == True\n assert candidate(x = 151,y = 167,target = 526) == False\n assert candidate(x = 41,y = 37,target = 78) == True\n assert candidate(x = 13,y = 17,target = 29) == True\n assert candidate(x = 53,y = 47,target = 100) == True\n assert candidate(x = 61,y = 73,target = 164) == False\n assert candidate(x = 17,y = 23,target = 30) == True\n assert candidate(x = 101,y = 37,target = 88) == True\n assert candidate(x = 400,y = 1000,target = 500) == False\n assert candidate(x = 59,y = 61,target = 120) == True\n assert candidate(x = 333,y = 444,target = 777) == True\n assert candidate(x = 61,y = 41,target = 183) == False\n assert candidate(x = 97,y = 59,target = 156) == True\n assert candidate(x = 83,y = 53,target = 109) == True\n assert candidate(x = 101,y = 103,target = 206) == False\n assert candidate(x = 8,y = 13,target = 19) == True\n assert candidate(x = 73,y = 89,target = 210) == False\n assert candidate(x = 17,y = 13,target = 26) == True\n assert candidate(x = 401,y = 199,target = 202) == True\n assert candidate(x = 139,y = 157,target = 482) == False\n assert candidate(x = 601,y = 409,target = 500) == True\n assert candidate(x = 71,y = 83,target = 101) == True\n assert candidate(x = 101,y = 139,target = 240) == True\n assert candidate(x = 100,y = 37,target = 101) == True\n assert candidate(x = 97,y = 101,target = 199) == False\n assert candidate(x = 41,y = 43,target = 84) == True\n assert candidate(x = 101,y = 103,target = 204) == True\n assert candidate(x = 53,y = 89,target = 31) == True\n assert candidate(x = 109,y = 131,target = 366) == False\n assert candidate(x = 71,y = 83,target = 194) == False\n assert candidate(x = 43,y = 59,target = 102) == True\n assert candidate(x = 400,y = 150,target = 250) == True\n assert candidate(x = 19,y = 23,target = 42) == True\n assert candidate(x = 13,y = 29,target = 17) == True\n assert candidate(x = 301,y = 197,target = 498) == True\n assert candidate(x = 111,y = 333,target = 444) == True\n assert candidate(x = 787,y = 359,target = 428) == True\n assert candidate(x = 29,y = 41,target = 58) == True\n assert candidate(x = 137,y = 151,target = 458) == False\n assert candidate(x = 59,y = 71,target = 150) == False\n assert candidate(x = 89,y = 67,target = 52) == True\n assert candidate(x = 333,y = 222,target = 111) == True\n assert candidate(x = 71,y = 73,target = 144) == True\n assert candidate(x = 13,y = 17,target = 24) == True\n assert candidate(x = 45,y = 10,target = 75) == False\n assert candidate(x = 13,y = 17,target = 20) == True\n assert candidate(x = 100,y = 300,target = 200) == True\n assert candidate(x = 37,y = 53,target = 90) == True\n assert candidate(x = 1000,y = 333,target = 667) == True\n assert candidate(x = 13,y = 17,target = 39) == False\n assert candidate(x = 313,y = 509,target = 822) == True\n assert candidate(x = 43,y = 59,target = 37) == True\n assert candidate(x = 131,y = 149,target = 442) == False\n assert candidate(x = 107,y = 127,target = 350) == False\n assert candidate(x = 47,y = 19,target = 28) == True\n assert candidate(x = 97,y = 101,target = 198) == True\n assert candidate(x = 200,y = 123,target = 323) == True\n assert candidate(x = 101,y = 202,target = 303) == True\n assert candidate(x = 55,y = 77,target = 110) == True\n assert candidate(x = 89,y = 71,target = 160) == True\n assert candidate(x = 101,y = 89,target = 190) == True\n assert candidate(x = 53,y = 109,target = 162) == True\n assert candidate(x = 23,y = 17,target = 30) == True\n assert candidate(x = 100,y = 33,target = 66) == True\n assert candidate(x = 23,y = 31,target = 54) == True\n assert candidate(x = 17,y = 37,target = 41) == True\n assert candidate(x = 83,y = 101,target = 254) == False\n assert candidate(x = 5,y = 7,target = 11) == True\n assert candidate(x = 22,y = 33,target = 55) == True\n assert candidate(x = 10,y = 15,target = 25) == True\n assert candidate(x = 5,y = 2,target = 7) == True\n assert candidate(x = 7,y = 13,target = 20) == True\n assert candidate(x = 3,y = 3,target = 1) == False\n assert candidate(x = 7,y = 13,target = 1) == True\n assert candidate(x = 3,y = 9,target = 6) == True\n assert candidate(x = 4,y = 9,target = 8) == True\n assert candidate(x = 10,y = 15,target = 7) == False\n assert candidate(x = 33,y = 55,target = 11) == True\n assert candidate(x = 10,y = 15,target = 5) == True\n assert candidate(x = 333,y = 444,target = 111) == True\n assert candidate(x = 5,y = 11,target = 2) == True\n assert candidate(x = 8,y = 12,target = 16) == True\n assert candidate(x = 10,y = 15,target = 20) == True\n assert candidate(x = 7,y = 11,target = 8) == True\n assert candidate(x = 6,y = 6,target = 6) == True\n assert candidate(x = 3,y = 7,target = 2) == True\n assert candidate(x = 8,y = 17,target = 15) == True\n assert candidate(x = 7,y = 11,target = 1) == True\n assert candidate(x = 500,y = 1000,target = 750) == False\n assert candidate(x = 7,y = 11,target = 2) == True\n assert candidate(x = 13,y = 19,target = 32) == True\n assert candidate(x = 4,y = 9,target = 7) == True\n assert candidate(x = 220,y = 340,target = 560) == True\n assert candidate(x = 4,y = 9,target = 13) == True\n assert candidate(x = 3,y = 1,target = 2) == True\n assert candidate(x = 500,y = 200,target = 400) == True\n assert candidate(x = 6,y = 19,target = 5) == True\n assert candidate(x = 500,y = 500,target = 1000) == True\n assert candidate(x = 8,y = 3,target = 5) == True\n assert candidate(x = 8,y = 11,target = 13) == True\n assert candidate(x = 4,y = 17,target = 20) == True\n assert candidate(x = 5,y = 7,target = 12) == True\n assert candidate(x = 2,y = 3,target = 1) == True\n assert candidate(x = 3,y = 3,target = 6) == True\n assert candidate(x = 5,y = 3,target = 2) == True\n assert candidate(x = 333,y = 666,target = 999) == True\n assert candidate(x = 4,y = 10,target = 8) == True\n assert candidate(x = 5,y = 10,target = 15) == True\n assert candidate(x = 8,y = 3,target = 11) == True\n assert candidate(x = 100,y = 300,target = 500) == False\n assert candidate(x = 8,y = 11,target = 1) == True\n assert candidate(x = 7,y = 13,target = 10) == True\n assert candidate(x = 22,y = 26,target = 16) == True\n assert candidate(x = 7,y = 11,target = 18) == True\n assert candidate(x = 34,y = 51,target = 68) == True\n assert candidate(x = 4,y = 6,target = 8) == True\n", "comparison": "exact"}, "public_tests": ["3\n5\n4"], "hints": [], "metadata": {"canonical_parameter_names": ["x", "y", "target"], "leetcode_dataset_entry_point": "Solution().canMeasureWater", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:00+00:00", "tests_total": 192, "tests_dropped": 7, "flags": [], "topic_tags": ["math", "depth-first-search", "breadth-first-search", "bezouts-lemma", "euclidean-algorithm", "greatest-common-divisor", "extended-euclidean-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def can_measure_water(x, y, target)", "container": null, "callable": "can_measure_water", "parameters": [{"name": "x", "type": "Integer"}, {"name": "y", "type": "Integer"}, {"name": "target", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 367, "task_id": "valid-perfect-square", "difficulty": "Easy", "problem_description": "Given a positive integer num, return true if num is a perfect square or false otherwise.\n\nA perfect square is an integer that is the square of an integer. In other words, it is the product of some integer with itself.\n\nYou must not use any built-in library function, such as sqrt.\n\nExample 1:\n\nInput: num = 16\nOutput: true\nExplanation: We return true because 4 * 4 = 16 and 4 is an integer.\n\nExample 2:\n\nInput: num = 14\nOutput: false\nExplanation: We return false because 3.742 * 3.742 = 14 and 3.742 is not an integer.\n\nConstraints:\n\n- 1 <= num <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 14) == False\n assert candidate(num = 9) == True\n assert candidate(num = 1000000000) == False\n assert candidate(num = 49) == True\n assert candidate(num = 50) == False\n assert candidate(num = 25) == True\n assert candidate(num = 4) == True\n assert candidate(num = 1524157875) == False\n assert candidate(num = 1) == True\n assert candidate(num = 100) == True\n assert candidate(num = 99) == False\n assert candidate(num = 2147483647) == False\n assert candidate(num = 101) == False\n assert candidate(num = 16) == True\n assert candidate(num = 26) == False\n assert candidate(num = 15) == False\n assert candidate(num = 10) == False\n assert candidate(num = 9801) == True\n assert candidate(num = 100000000) == True\n assert candidate(num = 401) == False\n assert candidate(num = 104976) == True\n assert candidate(num = 1025) == False\n assert candidate(num = 123456789) == False\n assert candidate(num = 1000000001) == False\n assert candidate(num = 2500) == True\n assert candidate(num = 100000001) == False\n assert candidate(num = 2304) == True\n assert candidate(num = 207936) == True\n assert candidate(num = 400) == True\n assert candidate(num = 2) == False\n assert candidate(num = 3) == False\n assert candidate(num = 141376) == True\n assert candidate(num = 1024) == True\n assert candidate(num = 16777216) == True\n assert candidate(num = 999999999) == False\n assert candidate(num = 1000000) == True\n assert candidate(num = 1000001) == False\n assert candidate(num = 1073741824) == True\n", "comparison": "exact"}, "public_tests": ["16", "14"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().isPerfectSquare", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:05+00:00", "tests_total": 50, "tests_dropped": 12, "flags": [], "topic_tags": ["math", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def is_perfect_square(num)", "container": null, "callable": "is_perfect_square", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 368, "task_id": "largest-divisible-subset", "difficulty": "Medium", "problem_description": "Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subset satisfies:\n\n- answer[i] % answer[j] == 0, or\n- answer[j] % answer[i] == 0\n\nIf there are multiple solutions, return any of them.\n\nExample 1:\n\nInput: nums = [1,2,3]\nOutput: [1,2]\nExplanation: [1,3] is also accepted.\n\nExample 2:\n\nInput: nums = [1,2,4,8]\nOutput: [1,2,4,8]\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- 1 <= nums[i] <= 2 * 10^9\n- All the integers in nums are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == [9, 3, 1]\n assert candidate(nums = [100, 200, 400, 800, 1600, 3200]) == [3200, 1600, 800, 400, 200, 100]\n assert candidate(nums = [1, 5, 10, 20, 25, 50]) == [20, 10, 5, 1]\n assert candidate(nums = [2, 3, 5, 7, 11, 13]) == [2]\n assert candidate(nums = [2, 3, 5, 7, 11]) == [2]\n assert candidate(nums = [3, 9, 20, 18, 15]) == [18, 9, 3]\n assert candidate(nums = [3, 6, 9, 12, 18]) == [12, 6, 3]\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128]) == [128, 64, 32, 16, 8, 4, 2]\n assert candidate(nums = [18, 3, 6, 2, 9]) == [18, 9, 3]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [8, 4, 2, 1]\n assert candidate(nums = [1, 3, 5, 7, 9]) == [9, 3, 1]\n assert candidate(nums = [7, 14, 28, 56, 112]) == [112, 56, 28, 14, 7]\n assert candidate(nums = [1]) == [1]\n assert candidate(nums = [1, 2, 4, 8]) == [8, 4, 2, 1]\n assert candidate(nums = [5, 10, 15, 20, 25, 30]) == [20, 10, 5]\n assert candidate(nums = [10, 5, 2, 6]) == [6, 2]\n assert candidate(nums = [10, 5, 3, 15, 20]) == [20, 10, 5]\n assert candidate(nums = [100, 200, 400, 800, 1600]) == [1600, 800, 400, 200, 100]\n assert candidate(nums = [3, 6, 9, 12, 18, 24]) == [24, 12, 6, 3]\n assert candidate(nums = [7, 14, 28, 56, 112, 224]) == [224, 112, 56, 28, 14, 7]\n assert candidate(nums = [2, 4, 8, 16, 32, 64]) == [64, 32, 16, 8, 4, 2]\n assert candidate(nums = [7, 14, 28, 35, 56, 112]) == [112, 56, 28, 14, 7]\n assert candidate(nums = [1, 3, 6, 24]) == [24, 6, 3, 1]\n assert candidate(nums = [21, 28, 35, 42, 56, 70, 84, 98, 140, 168, 196, 245, 280, 392, 420, 588, 784, 980, 1372, 1764, 2744, 3528, 5588, 7056, 11176, 14112, 22352, 28224, 44704, 56448, 89408, 178816]) == [56448, 28224, 14112, 7056, 3528, 1764, 588, 84, 42, 21]\n assert candidate(nums = [5, 10, 15, 20, 25]) == [20, 10, 5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 16, 18, 24, 30, 36, 40, 48, 60, 72, 80, 90, 120, 144, 180, 240, 360, 720]) == [720, 360, 180, 90, 30, 10, 5, 1]\n assert candidate(nums = [4, 8, 10, 240]) == [240, 8, 4]\n assert candidate(nums = [18, 9, 3, 6, 2, 12]) == [12, 6, 3]\n assert candidate(nums = [1, 2, 3]) == [2, 1]\n assert candidate(nums = [1, 3, 6, 18, 54]) == [54, 18, 6, 3, 1]\n assert candidate(nums = [3, 9, 27, 81, 243, 729]) == [729, 243, 81, 27, 9, 3]\n assert candidate(nums = [1, 3, 6, 24, 48]) == [48, 24, 6, 3, 1]\n assert candidate(nums = [3, 9, 27, 81]) == [81, 27, 9, 3]\n assert candidate(nums = [18, 54, 9, 27, 3, 81]) == [54, 27, 9, 3]\n assert candidate(nums = [9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969]) == [4782969, 1594323, 531441, 177147, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9]\n assert candidate(nums = [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120]) == [96, 48, 24, 12, 6]\n assert candidate(nums = [1, 3, 5, 15, 25, 75, 125, 375, 625, 1875, 3125, 9375, 15625, 46875, 78125, 234375, 390625, 1171875]) == [1171875, 390625, 78125, 15625, 3125, 625, 125, 25, 5, 1]\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]) == [80, 40, 20, 10, 5]\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 1073741825]) == [1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]\n assert candidate(nums = [21, 42, 84, 168, 336, 672, 1344, 2688, 5376, 10752, 21504, 43008, 86016, 172032, 344064]) == [344064, 172032, 86016, 43008, 21504, 10752, 5376, 2688, 1344, 672, 336, 168, 84, 42, 21]\n assert candidate(nums = [17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, 442, 459, 476, 493, 510, 527, 544, 561, 578, 595, 612, 629, 646, 663, 680, 697, 714, 731, 748, 765, 782, 805, 822, 839, 856, 873, 890, 907, 924, 941, 958, 975, 992]) == [544, 272, 136, 68, 34, 17]\n assert candidate(nums = [7, 14, 28, 49, 98, 196, 392, 784, 1568, 3136, 6272, 12544, 25088, 50176, 100352, 200704, 401408, 802816, 1605632, 3211264]) == [3211264, 1605632, 802816, 401408, 200704, 100352, 50176, 25088, 12544, 6272, 3136, 1568, 784, 392, 196, 98, 49, 7]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == [16, 8, 4, 2, 1]\n assert candidate(nums = [11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 220]) == [176, 88, 44, 22, 11]\n assert candidate(nums = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195, 205, 215, 225, 235, 245, 255, 265, 275, 285, 295, 305]) == [135, 45, 15, 5]\n assert candidate(nums = [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]) == [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]\n assert candidate(nums = [5, 10, 20, 25, 50, 100, 125, 200, 250, 500, 1000]) == [1000, 500, 250, 125, 25, 5]\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300, 305, 310, 315, 320, 325, 330, 335, 340, 345, 350, 355, 360, 365, 370, 375, 380, 385, 390, 395, 400]) == [320, 160, 80, 40, 20, 10, 5]\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000, 3100, 3200, 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000, 4100, 4200, 4300, 4400, 4500, 4600, 4700, 4800, 4900, 5000, 5100, 5200, 5300, 5400, 5500, 5600, 5700, 5800, 5900, 6000, 6100, 6200, 6300, 6400, 6500, 6600, 6700, 6800, 6900, 7000, 7100, 7200, 7300, 7400, 7500, 7600, 7700, 7800, 7900, 8000, 8100, 8200, 8300, 8400, 8500, 8600, 8700, 8800, 8900, 9000, 9100, 9200, 9300, 9400, 9500, 9600, 9700, 9800, 9900, 10000]) == [6400, 3200, 1600, 800, 400, 200, 100]\n assert candidate(nums = [13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, 338, 351, 364, 377, 390]) == [208, 104, 52, 26, 13]\n assert candidate(nums = [1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467]) == [1162261467, 387420489, 129140163, 43046721, 14348907, 4782969, 1594323, 531441, 177147, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3, 1]\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288]) == [524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]\n assert candidate(nums = [256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304]) == [4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256]\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824]) == [1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]\n assert candidate(nums = [19, 38, 57, 76, 95, 114, 133, 152, 171, 190, 209, 228, 247, 266, 285, 304, 323, 342, 361, 380, 399, 418, 437, 456, 475, 494, 513, 532, 551, 570]) == [304, 152, 76, 38, 19]\n assert candidate(nums = [3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467]) == [1162261467, 387420489, 129140163, 43046721, 14348907, 4782969, 1594323, 531441, 177147, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3]\n assert candidate(nums = [100, 200, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400, 204800, 409600, 819200, 1638400]) == [1638400, 819200, 409600, 204800, 102400, 51200, 25600, 12800, 6400, 3200, 1600, 800, 400, 200, 100]\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313]) == [2]\n assert candidate(nums = [7, 14, 28, 56, 112, 224, 448, 896, 1792, 3584, 7168, 14336, 28672, 57344, 114688, 229376, 458752, 917504, 1835008, 3670016]) == [3670016, 1835008, 917504, 458752, 229376, 114688, 57344, 28672, 14336, 7168, 3584, 1792, 896, 448, 224, 112, 56, 28, 14, 7]\n assert candidate(nums = [17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425, 442, 459, 476, 493, 510]) == [272, 136, 68, 34, 17]\n assert candidate(nums = [360, 720, 1080, 1440, 1800, 2160, 2520, 2880, 3240, 3600, 3960, 4320, 4680, 5040, 5400, 5760, 6120, 6480, 6840, 7200]) == [5760, 2880, 1440, 720, 360]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == [64, 32, 16, 8, 4, 2, 1]\n assert candidate(nums = [15, 30, 60, 120, 240, 480, 960, 1920, 3840, 7680, 15360, 30720, 61440, 122880, 245760]) == [245760, 122880, 61440, 30720, 15360, 7680, 3840, 1920, 960, 480, 240, 120, 60, 30, 15]\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824]) == [1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2]\n assert candidate(nums = [11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, 693, 704, 715, 726, 737, 748, 759, 770]) == [704, 352, 176, 88, 44, 22, 11]\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, 448, 455, 462, 469, 476, 483, 490, 497, 504, 511, 518, 525, 532, 539]) == [448, 224, 112, 56, 28, 14, 7]\n assert candidate(nums = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199]) == [2, 1]\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300]) == [160, 80, 40, 20, 10, 5]\n assert candidate(nums = [1, 3, 6, 18, 27, 54, 81, 162, 486, 972, 1458, 2916, 3888, 59049, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646]) == [3188646, 1062882, 354294, 118098, 1458, 486, 162, 54, 18, 6, 3, 1]\n assert candidate(nums = [5, 10, 15, 20, 25, 50, 75, 100, 150, 250, 500, 750, 1000, 1500, 2500, 5000, 7500, 10000]) == [10000, 5000, 2500, 500, 250, 50, 25, 5]\n assert candidate(nums = [3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969, 14348907, 43046721, 129140163, 387420489, 1162261467]) == [1162261467, 387420489, 129140163, 43046721, 14348907, 4782969, 1594323, 531441, 177147, 59049, 19683, 6561, 2187, 729, 243, 81, 27, 9, 3]\n assert candidate(nums = [11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, 297, 308, 319, 330]) == [176, 88, 44, 22, 11]\n assert candidate(nums = [7, 14, 28, 49, 98, 196, 343, 686, 1372, 2401, 4802, 9604, 16807, 33614, 67228, 117649, 235298, 470596]) == [470596, 235298, 117649, 16807, 2401, 343, 49, 7]\n assert candidate(nums = [15, 30, 45, 60, 90, 120, 180, 240, 360, 480, 720, 1440, 2160, 2880, 4320, 8640, 12960, 17280, 25920, 34560, 51840, 103680, 155520, 207360, 311040, 622080, 933120, 1244160, 1866240, 3732480, 5598720, 7465920, 11197440, 22394880]) == [22394880, 11197440, 5598720, 1866240, 933120, 311040, 155520, 51840, 25920, 12960, 4320, 2160, 720, 360, 180, 90, 45, 15]\n assert candidate(nums = [49, 98, 147, 196, 245, 294, 343, 392, 441, 490, 539, 588, 637, 686, 735, 784, 833, 882, 931, 980]) == [784, 392, 196, 98, 49]\n assert candidate(nums = [11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, 297, 308, 319, 330, 341, 352, 363, 374, 385, 396, 407, 418, 429, 440, 451, 462, 473, 484, 495, 506, 517, 528, 539, 550, 561, 572, 583, 594, 605, 616, 627, 638, 649, 660, 671, 682, 693, 704, 715, 726, 737, 748, 759, 770, 781, 792, 803, 814, 825, 836, 847, 858, 869, 880, 891, 902, 913, 924, 935, 946, 957, 968, 979, 990]) == [704, 352, 176, 88, 44, 22, 11]\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, 448, 455, 462, 469, 476, 483, 490, 497, 504]) == [448, 224, 112, 56, 28, 14, 7]\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210]) == [112, 56, 28, 14, 7]\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576]) == [1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2]\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125, 976562, 488281, 244140, 122070, 61035]) == [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125]\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 255, 260, 265, 270, 275, 280, 285, 290, 295, 300]) == [160, 80, 40, 20, 10, 5]\n assert candidate(nums = [23, 46, 69, 92, 115, 138, 161, 184, 207, 230, 253, 276, 299, 322, 345, 368, 391, 414, 437, 460, 483, 506, 529, 552, 575, 598, 621, 644, 667, 690]) == [368, 184, 92, 46, 23]\n assert candidate(nums = [33, 66, 99, 132, 165, 198, 231, 264, 297, 330, 363, 396, 429, 462, 495, 528, 561, 594, 627, 660]) == [528, 264, 132, 66, 33]\n assert candidate(nums = [999983, 1999966, 2999949, 3999932, 4999915, 5999898, 6999881, 7999864, 8999847, 9999830, 10999813, 11999796, 12999779, 13999762, 14999745, 15999728, 16999711, 17999694, 18999677, 19999660]) == [15999728, 7999864, 3999932, 1999966, 999983]\n assert candidate(nums = [10, 20, 40, 5, 80, 160, 320, 400, 800, 1600, 3200, 6400, 12800, 25600, 51200, 102400, 204800, 409600, 819200, 1638400]) == [1638400, 819200, 409600, 204800, 102400, 51200, 25600, 12800, 6400, 3200, 1600, 800, 400, 80, 40, 20, 10, 5]\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150]) == [80, 40, 20, 10, 5]\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113]) == [2]\n assert candidate(nums = [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625]) == [244140625, 48828125, 9765625, 1953125, 390625, 78125, 15625, 3125, 625, 125, 25, 5, 1]\n assert candidate(nums = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]) == [131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8]\n assert candidate(nums = [10, 20, 40, 80, 160, 320, 640, 1280, 2560, 5120, 10240, 20480, 40960, 81920, 163840]) == [163840, 81920, 40960, 20480, 10240, 5120, 2560, 1280, 640, 320, 160, 80, 40, 20, 10]\n assert candidate(nums = [121, 242, 363, 484, 605, 726, 847, 968, 1089, 1210, 1321, 1432, 1543, 1654, 1765, 1876, 1987, 2098, 2209, 2320]) == [968, 484, 242, 121]\n assert candidate(nums = [17, 34, 51, 68, 85, 102, 119, 136, 153, 170, 187, 204, 221, 238, 255, 272, 289, 306, 323, 340, 357, 374, 391, 408, 425]) == [272, 136, 68, 34, 17]\n assert candidate(nums = [13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, 338, 351, 364, 377, 390]) == [208, 104, 52, 26, 13]\n assert candidate(nums = [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824]) == [1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2]\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175, 182, 189, 196, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280, 287, 294, 301, 308, 315, 322, 329, 336, 343, 350, 357, 364, 371, 378, 385, 392, 399, 406, 413, 420, 427, 434, 441, 448, 455, 462, 469, 476, 483, 490, 497, 504, 511, 518, 525, 532, 539, 546, 553, 560, 567, 574, 581, 588, 595, 602, 609, 616, 623, 630]) == [448, 224, 112, 56, 28, 14, 7]\n assert candidate(nums = [1023, 2046, 3069, 4092, 5115, 6138, 7161, 8184, 9207, 10230, 11253, 12276, 13299, 14322, 15345, 16368, 17391, 18414, 19437, 20460, 21483, 22506, 23529, 24552, 25575, 26598, 27621, 28644, 29667, 30690, 31713, 32736, 33759, 34782, 35805, 36828, 37851, 38874, 39897, 40920, 41943, 42966, 43989, 45012, 46035, 47058, 48081, 49104, 50127, 51150, 52173, 53196, 54219, 55242, 56265, 57288, 58311, 59334, 60357, 61380, 62403, 63426, 64449, 65472, 66495, 67518, 68541, 69564, 70587, 71610, 72633, 73656, 74679, 75702, 76725, 77748, 78771, 79794, 80817, 81840, 82863, 83886, 84909, 85932, 86955, 87978, 88901, 89924, 90947, 91970, 92993, 94016, 95039, 96062, 97085, 98108, 99131]) == [65472, 32736, 16368, 8184, 4092, 2046, 1023]\n assert candidate(nums = [11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165, 176, 187, 198, 209, 220, 231, 242, 253, 264, 275, 286, 297, 308, 319, 330]) == [176, 88, 44, 22, 11]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [16, 8, 4, 2, 1]\n assert candidate(nums = [13, 26, 39, 52, 65, 78, 91, 104, 117, 130, 143, 156, 169, 182, 195, 208, 221, 234, 247, 260, 273, 286, 299, 312, 325, 338, 351, 364, 377, 390, 403, 416, 429, 442, 455, 468, 481, 494, 507, 520, 533, 546, 559, 572, 585, 598, 611, 624, 637, 650, 663, 676, 689, 702, 715, 728, 741, 754, 767, 780, 793, 806, 819, 832, 845, 858, 871, 884, 897, 910, 923, 936, 949, 962, 975, 988, 1001]) == [832, 416, 208, 104, 52, 26, 13]\n assert candidate(nums = [6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 180, 186, 192, 198, 204, 210, 216, 222, 228, 234, 240, 246, 252, 258, 264, 270, 276, 282, 288, 294, 300, 306, 312, 318, 324, 330, 336, 342, 348, 354, 360, 366, 372, 378, 384, 390, 396, 402, 408, 414, 420, 426, 432, 438, 444, 450, 456, 462, 468, 474, 480, 486, 492, 498, 504, 510, 516, 522, 528, 534, 540, 546, 552, 558, 564, 570, 576, 582, 588, 594, 600]) == [384, 192, 96, 48, 24, 12, 6]\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == [2]\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147, 154, 161, 168, 175]) == [112, 56, 28, 14, 7]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201]) == [81, 27, 9, 3, 1]\n", "comparison": "exact"}, "public_tests": ["[1,2,3]", "[1,2,4,8]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().largestDivisibleSubset", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:07+00:00", "tests_total": 109, "tests_dropped": 6, "flags": ["multiple_answers"], "topic_tags": ["array", "math", "dynamic-programming", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def largest_divisible_subset(nums)", "container": null, "callable": "largest_divisible_subset", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 371, "task_id": "sum-of-two-integers", "difficulty": "Medium", "problem_description": "Given two integers a and b, return the sum of the two integers without using the operators + and -.\n\nExample 1:\n\nInput: a = 1, b = 2\nOutput: 3\n\nExample 2:\n\nInput: a = 2, b = 3\nOutput: 5\n\nConstraints:\n\n- -1000 <= a, b <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(a = 1000,b = -1000) == 0\n assert candidate(a = -2,b = -3) == -5\n assert candidate(a = 0,b = 5) == 5\n assert candidate(a = 500,b = 500) == 1000\n assert candidate(a = -5,b = -5) == -10\n assert candidate(a = 1,b = 2) == 3\n assert candidate(a = 999,b = 1) == 1000\n assert candidate(a = -5,b = 5) == 0\n assert candidate(a = -1000,b = 1000) == 0\n assert candidate(a = -500,b = 500) == 0\n assert candidate(a = -500,b = -500) == -1000\n assert candidate(a = 0,b = 0) == 0\n assert candidate(a = -1,b = 1) == 0\n assert candidate(a = 2,b = 3) == 5\n assert candidate(a = -999,b = -1) == -1000\n assert candidate(a = -7,b = -13) == -20\n assert candidate(a = -999,b = 1) == -998\n assert candidate(a = -128,b = 256) == 128\n assert candidate(a = -999,b = 999) == 0\n assert candidate(a = 7,b = 13) == 20\n assert candidate(a = 7,b = -7) == 0\n assert candidate(a = 256,b = 255) == 511\n assert candidate(a = 0,b = -1) == -1\n assert candidate(a = -223,b = -777) == -1000\n assert candidate(a = -1000,b = -999) == -1999\n assert candidate(a = -123,b = 456) == 333\n assert candidate(a = 1,b = 0) == 1\n assert candidate(a = 7,b = -3) == 4\n assert candidate(a = 678,b = 322) == 1000\n assert candidate(a = 500,b = 501) == 1001\n assert candidate(a = -789,b = 321) == -468\n assert candidate(a = 1,b = 999) == 1000\n assert candidate(a = 456,b = 123) == 579\n assert candidate(a = 1,b = -1) == 0\n assert candidate(a = 7,b = -13) == -6\n assert candidate(a = 512,b = -512) == 0\n assert candidate(a = -314,b = 157) == -157\n assert candidate(a = 499,b = 500) == 999\n assert candidate(a = 256,b = 256) == 512\n assert candidate(a = 314,b = -157) == 157\n assert candidate(a = 223,b = -777) == -554\n assert candidate(a = -1,b = -999) == -1000\n assert candidate(a = 456,b = -789) == -333\n assert candidate(a = 456,b = -234) == 222\n assert candidate(a = -777,b = -223) == -1000\n assert candidate(a = -678,b = -322) == -1000\n assert candidate(a = 789,b = -321) == 468\n assert candidate(a = -333,b = -667) == -1000\n assert candidate(a = 0,b = -1000) == -1000\n assert candidate(a = -7,b = 3) == -4\n assert candidate(a = -456,b = -123) == -579\n assert candidate(a = -500,b = 250) == -250\n assert candidate(a = 345,b = 678) == 1023\n assert candidate(a = 1000,b = 0) == 1000\n assert candidate(a = -321,b = 654) == 333\n assert candidate(a = 333,b = 667) == 1000\n assert candidate(a = 0,b = 1000) == 1000\n assert candidate(a = -256,b = -256) == -512\n assert candidate(a = -777,b = 223) == -554\n assert candidate(a = -1000,b = 0) == -1000\n assert candidate(a = -123,b = -456) == -579\n assert candidate(a = -456,b = 123) == -333\n assert candidate(a = 777,b = 223) == 1000\n assert candidate(a = -789,b = 456) == -333\n assert candidate(a = 63,b = 127) == 190\n assert candidate(a = -500,b = -499) == -999\n assert candidate(a = 100,b = -100) == 0\n assert candidate(a = -1,b = 0) == -1\n assert candidate(a = 999,b = -999) == 0\n assert candidate(a = 1000,b = -999) == 1\n assert candidate(a = 123,b = 456) == 579\n assert candidate(a = 1000,b = 999) == 1999\n assert candidate(a = 123,b = -456) == -333\n assert candidate(a = -256,b = -255) == -511\n assert candidate(a = 500,b = -250) == 250\n assert candidate(a = -7,b = 13) == 6\n", "comparison": "exact"}, "public_tests": ["1\n2", "2\n3"], "hints": [], "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().getSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:14+00:00", "tests_total": 80, "tests_dropped": 4, "flags": [], "topic_tags": ["math", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def get_sum(a, b)", "container": null, "callable": "get_sum", "parameters": [{"name": "a", "type": "Integer"}, {"name": "b", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 373, "task_id": "find-k-pairs-with-smallest-sums", "difficulty": "Medium", "problem_description": "You are given two integer arrays nums1 and nums2 sorted in non-decreasing order and an integer k.\n\nDefine a pair (u, v) which consists of one element from the first array and one element from the second array.\n\nReturn the k pairs (u_1, v_1), (u_2, v_2), ..., (u_k, v_k) with the smallest sums.\n\nExample 1:\n\nInput: nums1 = [1,7,11], nums2 = [2,4,6], k = 3\nOutput: [[1,2],[1,4],[1,6]]\nExplanation: The first 3 pairs are returned from the sequence: [1,2],[1,4],[1,6],[7,2],[7,4],[11,2],[7,6],[11,4],[11,6]\n\nExample 2:\n\nInput: nums1 = [1,1,2], nums2 = [1,2,3], k = 2\nOutput: [[1,1],[1,1]]\nExplanation: The first 2 pairs are returned from the sequence: [1,1],[1,1],[1,2],[2,1],[1,2],[2,2],[1,3],[1,3],[2,3]\n\nConstraints:\n\n- 1 <= nums1.length, nums2.length <= 10^5\n- -10^9 <= nums1[i], nums2[i] <= 10^9\n- nums1 and nums2 both are sorted in non-decreasing order.\n- 1 <= k <= 10^4\n- k <= nums1.length * nums2.length\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [5, 8, 8, 10],nums2 = [1, 7, 11, 11],k = 10) == [[5, 1], [8, 1], [8, 1], [10, 1], [5, 7], [8, 7], [8, 7], [5, 11], [5, 11], [10, 7]]\n assert candidate(nums1 = [1, 1, 2],nums2 = [1, 2, 3],k = 4) == [[1, 1], [1, 1], [1, 2], [1, 2]]\n assert candidate(nums1 = [1, 7, 11],nums2 = [2, 4, 6],k = 3) == [[1, 2], [1, 4], [1, 6]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [1, 2, 3, 4, 5],k = 10) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2], [3, 1], [1, 4], [2, 3], [3, 2], [4, 1]]\n assert candidate(nums1 = [5, 8, 12],nums2 = [9, 10, 11],k = 4) == [[5, 9], [5, 10], [5, 11], [8, 9]]\n assert candidate(nums1 = [1, 1, 2],nums2 = [1, 2, 3],k = 2) == [[1, 1], [1, 1]]\n assert candidate(nums1 = [5, 8, 8, 9],nums2 = [1, 1, 1, 1],k = 4) == [[5, 1], [5, 1], [5, 1], [5, 1]]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6],k = 5) == [[1, 4], [1, 5], [2, 4], [1, 6], [2, 5]]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6],k = 6) == [[1, 4], [1, 5], [2, 4], [1, 6], [2, 5], [3, 4]]\n assert candidate(nums1 = [-10, -8, 0, 5, 6],nums2 = [1, 3, 4, 7, 8],k = 4) == [[-10, 1], [-10, 3], [-8, 1], [-10, 4]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10],k = 1) == [[1, 6]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],k = 7) == [[1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 5], [2, 4]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1],k = 5) == [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10],k = 8) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 20) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 100) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [1, 12], [3, 10], [5, 8], [7, 6], [9, 4], [11, 2], [1, 14], [3, 12], [5, 10], [7, 8], [9, 6], [11, 4], [13, 2], [1, 16], [3, 14], [5, 12], [7, 10], [9, 8], [11, 6], [13, 4], [15, 2], [1, 18], [3, 16], [5, 14], [7, 12], [9, 10], [11, 8], [13, 6], [15, 4], [17, 2], [1, 20], [3, 18], [5, 16], [7, 14], [9, 12], [11, 10], [13, 8], [15, 6], [17, 4], [19, 2], [3, 20], [5, 18], [7, 16], [9, 14], [11, 12], [13, 10], [15, 8], [17, 6], [19, 4], [5, 20], [7, 18], [9, 16], [11, 14], [13, 12], [15, 10], [17, 8], [19, 6], [7, 20], [9, 18], [11, 16], [13, 14], [15, 12], [17, 10], [19, 8], [9, 20], [11, 18], [13, 16], [15, 14], [17, 12], [19, 10], [11, 20], [13, 18], [15, 16], [17, 14], [19, 12], [13, 20], [15, 18], [17, 16], [19, 14], [15, 20], [17, 18], [19, 16], [17, 20], [19, 18], [19, 20]]\n assert candidate(nums1 = [-1000000000, -500000000, 0, 500000000, 1000000000],nums2 = [-1000000000, -500000000, 0, 500000000, 1000000000],k = 10) == [[-1000000000, -1000000000], [-1000000000, -500000000], [-500000000, -1000000000], [-1000000000, 0], [-500000000, -500000000], [0, -1000000000], [-1000000000, 500000000], [-500000000, 0], [0, -500000000], [500000000, -1000000000]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10],k = 15) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-5, 0, 5],k = 5) == [[-10, -5], [-10, 0], [-5, -5], [-10, 5], [-5, 0]]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [2, 2, 2, 2, 2],k = 25) == [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]\n assert candidate(nums1 = [1, 5, 8, 12, 15],nums2 = [2, 4, 6, 8, 10],k = 5) == [[1, 2], [1, 4], [1, 6], [5, 2], [1, 8]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13],nums2 = [2, 4, 6, 8, 10, 12, 14],k = 20) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [1, 12], [3, 10], [5, 8], [7, 6], [9, 4]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],k = 15) == [[1, -10], [1, -9], [2, -10], [1, -8], [2, -9], [3, -10], [1, -7], [2, -8], [3, -9], [4, -10], [1, -6], [2, -7], [3, -8], [4, -9], [5, -10]]\n assert candidate(nums1 = [1, 5, 9, 13, 17],nums2 = [2, 6, 10, 14, 18],k = 10) == [[1, 2], [1, 6], [5, 2], [1, 10], [5, 6], [9, 2], [1, 14], [5, 10], [9, 6], [13, 2]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 15) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10],k = 10) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2]]\n assert candidate(nums1 = [-10, -5, 0, 10],nums2 = [-15, -10, 5, 15],k = 6) == [[-10, -15], [-10, -10], [-5, -15], [-5, -10], [0, -15], [0, -10]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-20, -10, 0, 10, 20],k = 15) == [[-10, -20], [-5, -20], [-10, -10], [0, -20], [-5, -10], [5, -20], [-10, 0], [0, -10], [10, -20], [-5, 0], [5, -10], [-10, 10], [0, 0], [10, -10], [-5, 10]]\n assert candidate(nums1 = [-10, 0, 10],nums2 = [-10, 0, 10],k = 5) == [[-10, -10], [-10, 0], [0, -10], [-10, 10], [0, 0]]\n assert candidate(nums1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [-9, -8, -7, -6, -5, -4, -3, -2, -1, 0],k = 5) == [[0, -9], [0, -8], [1, -9], [0, -7], [1, -8]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [1, 3, 5, 7, 9],k = 15) == [[1, 1], [1, 3], [3, 1], [1, 5], [3, 3], [5, 1], [1, 7], [3, 5], [5, 3], [7, 1], [1, 9], [3, 7], [5, 5], [7, 3], [9, 1]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-20, -15, -10, -5, 0],k = 15) == [[-10, -20], [-10, -15], [-5, -20], [-10, -10], [-5, -15], [0, -20], [-10, -5], [-5, -10], [0, -15], [5, -20], [-10, 0], [-5, -5], [0, -10], [5, -15], [10, -20]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 15) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2], [3, 1], [1, 4], [2, 3], [3, 2], [4, 1], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 25) == [[1, 10], [1, 9], [1, 8], [1, 7], [1, 6], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 10], [2, 9], [2, 8], [2, 7], [2, 6], [2, 5], [2, 4], [2, 3], [2, 2], [2, 1], [3, 10], [3, 9], [3, 8], [3, 7], [3, 6]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10],k = 25) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [3, 10], [5, 8], [7, 6], [9, 4], [5, 10], [7, 8], [9, 6], [7, 10], [9, 8], [9, 10]]\n assert candidate(nums1 = [1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5]]\n assert candidate(nums1 = [-1000000000, -999999999],nums2 = [-1000000000, -999999999],k = 2) == [[-1000000000, -1000000000], [-1000000000, -999999999]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],k = 5) == [[1, 5], [1, 4], [1, 3], [1, 2], [1, 1]]\n assert candidate(nums1 = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 10, 10],nums2 = [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 8, 9, 10, 10],k = 100) == [[1, 1], [1, 2], [1, 2], [2, 1], [2, 1], [1, 3], [1, 3], [1, 3], [2, 2], [2, 2], [2, 2], [2, 2], [3, 1], [3, 1], [3, 1], [1, 4], [1, 4], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [4, 1], [4, 1], [1, 5], [1, 5], [1, 5], [1, 5], [2, 4], [2, 4], [2, 4], [2, 4], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [3, 3], [4, 2], [4, 2], [4, 2], [4, 2], [5, 1], [5, 1], [5, 1], [5, 1], [1, 6], [1, 6], [1, 6], [2, 5], [2, 5], [2, 5], [2, 5], [2, 5], [2, 5], [2, 5], [2, 5], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [5, 2], [5, 2], [5, 2], [5, 2], [5, 2], [5, 2], [5, 2], [5, 2], [6, 1], [6, 1], [6, 1], [1, 7], [2, 6], [2, 6], [2, 6], [2, 6], [2, 6], [2, 6], [3, 5], [3, 5], [3, 5]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10],k = 5) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4]]\n assert candidate(nums1 = [1000000000],nums2 = [1000000000],k = 1) == [[1000000000, 1000000000]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3],k = 5) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-20, -15, -10, -5, 0],k = 12) == [[-10, -20], [-10, -15], [-5, -20], [-10, -10], [-5, -15], [0, -20], [-10, -5], [-5, -10], [0, -15], [5, -20], [-10, 0], [-5, -5]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 20) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [1, 12], [3, 10], [5, 8], [7, 6], [9, 4]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10],k = 12) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 30) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [1, 12], [3, 10], [5, 8], [7, 6], [9, 4], [11, 2], [1, 14], [3, 12], [5, 10], [7, 8], [9, 6], [11, 4], [13, 2], [1, 16], [3, 14]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [10, 20, 30, 40, 50],k = 1) == [[1, 10]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 10) == [[1, 6], [1, 7], [2, 6], [1, 8], [2, 7], [3, 6], [1, 9], [2, 8], [3, 7], [4, 6]]\n assert candidate(nums1 = [-100, -99, -98, -97, -96],nums2 = [-95, -94, -93, -92, -91],k = 10) == [[-100, -95], [-100, -94], [-99, -95], [-100, -93], [-99, -94], [-98, -95], [-100, -92], [-99, -93], [-98, -94], [-97, -95]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 25) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 50) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [1, 12], [3, 10], [5, 8], [7, 6], [9, 4], [11, 2], [1, 14], [3, 12], [5, 10], [7, 8], [9, 6], [11, 4], [13, 2], [1, 16], [3, 14], [5, 12], [7, 10], [9, 8], [11, 6], [13, 4], [15, 2], [1, 18], [3, 16], [5, 14], [7, 12], [9, 10], [11, 8], [13, 6], [15, 4], [17, 2], [1, 20], [3, 18], [5, 16], [7, 14], [9, 12]]\n assert candidate(nums1 = [-1, -2, -3],nums2 = [-10, -20, -30],k = 5) == [[-3, -10], [-3, -20], [-3, -30], [-2, -10], [-2, -20]]\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [1, 2, 3, 4, 5],k = 12) == [[10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [20, 1], [20, 2], [20, 3], [20, 4], [20, 5], [30, 1], [30, 2]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-20, -10, 0, 10, 20],k = 3) == [[-10, -20], [-5, -20], [-10, -10]]\n assert candidate(nums1 = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],nums2 = [1, 2, 3, 4, 5],k = 10) == [[5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 15) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2], [3, 1], [1, 4], [2, 3], [3, 2], [4, 1], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 5) == [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]\n assert candidate(nums1 = [-10, -8, -6, -4, -2],nums2 = [-9, -7, -5, -3, -1],k = 5) == [[-10, -9], [-10, -7], [-8, -9], [-10, -5], [-8, -7]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 1) == [[1, 10]]\n assert candidate(nums1 = [-1, -2, -3, -4, -5],nums2 = [-10, -9, -8, -7, -6],k = 8) == [[-5, -10], [-4, -10], [-5, -9], [-3, -10], [-4, -9], [-5, -8], [-2, -10], [-3, -9]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 1) == [[1, 1]]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [2, 2, 2, 2, 2],k = 5) == [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [1, 2, 3, 4, 5],k = 1) == [[1, 1]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 10) == [[1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10], [1, 10]]\n assert candidate(nums1 = [100, 200, 300],nums2 = [100, 200, 300],k = 9) == [[100, 100], [100, 200], [200, 100], [100, 300], [200, 200], [300, 100], [200, 300], [300, 200], [300, 300]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 20) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2], [3, 1], [1, 4], [2, 3], [3, 2], [4, 1], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1], [1, 6], [2, 5], [3, 4], [4, 3], [5, 2]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 15) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1],k = 10) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [50, 150, 250, 350, 450],k = 20) == [[100, 50], [100, 150], [200, 50], [100, 250], [200, 150], [300, 50], [100, 350], [200, 250], [300, 150], [400, 50], [100, 450], [200, 350], [300, 250], [400, 150], [500, 50], [200, 450], [300, 350], [400, 250], [500, 150], [300, 450]]\n assert candidate(nums1 = [-1, -1, -1],nums2 = [-1, -1, -1],k = 3) == [[-1, -1], [-1, -1], [-1, -1]]\n assert candidate(nums1 = [1],nums2 = [1],k = 1) == [[1, 1]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 100) == [[1, 1], [1, 2], [2, 1], [1, 3], [2, 2], [3, 1], [1, 4], [2, 3], [3, 2], [4, 1], [1, 5], [2, 4], [3, 3], [4, 2], [5, 1], [1, 6], [2, 5], [3, 4], [4, 3], [5, 2], [6, 1], [1, 7], [2, 6], [3, 5], [4, 4], [5, 3], [6, 2], [7, 1], [1, 8], [2, 7], [3, 6], [4, 5], [5, 4], [6, 3], [7, 2], [8, 1], [1, 9], [2, 8], [3, 7], [4, 6], [5, 5], [6, 4], [7, 3], [8, 2], [9, 1], [1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1], [2, 10], [3, 9], [4, 8], [5, 7], [6, 6], [7, 5], [8, 4], [9, 3], [10, 2], [3, 10], [4, 9], [5, 8], [6, 7], [7, 6], [8, 5], [9, 4], [10, 3], [4, 10], [5, 9], [6, 8], [7, 7], [8, 6], [9, 5], [10, 4], [5, 10], [6, 9], [7, 8], [8, 7], [9, 6], [10, 5], [6, 10], [7, 9], [8, 8], [9, 7], [10, 6], [7, 10], [8, 9], [9, 8], [10, 7], [8, 10], [9, 9], [10, 8], [9, 10], [10, 9], [10, 10]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1],k = 25) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-5, 0, 5, 10, 15],k = 8) == [[-10, -5], [-10, 0], [-5, -5], [-10, 5], [-5, 0], [0, -5], [-10, 10], [-5, 5]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [1, 2, 3, 4, 5],k = 1) == [[1, 1]]\n assert candidate(nums1 = [-1, -1, -1, -1, -1],nums2 = [1, 1, 1, 1, 1],k = 10) == [[-1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, 1], [-1, 1]]\n assert candidate(nums1 = [-1, -2, -3, -4, -5],nums2 = [-10, -9, -8, -7, -6],k = 7) == [[-5, -10], [-4, -10], [-5, -9], [-3, -10], [-4, -9], [-5, -8], [-2, -10]]\n assert candidate(nums1 = [1, 10, 100, 1000, 10000],nums2 = [5, 50, 500, 5000, 50000],k = 9) == [[1, 5], [10, 5], [1, 50], [10, 50], [100, 5], [100, 50], [1, 500], [10, 500], [100, 500]]\n assert candidate(nums1 = [-10, -5, 0, 5, 10],nums2 = [-20, -15, -10, 0, 15, 20],k = 15) == [[-10, -20], [-10, -15], [-5, -20], [-10, -10], [-5, -15], [0, -20], [-5, -10], [0, -15], [5, -20], [-10, 0], [0, -10], [5, -15], [10, -20], [-5, 0], [5, -10]]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15],nums2 = [2, 4, 6, 8, 10, 12, 14, 16],k = 20) == [[1, 2], [1, 4], [3, 2], [1, 6], [3, 4], [5, 2], [1, 8], [3, 6], [5, 4], [7, 2], [1, 10], [3, 8], [5, 6], [7, 4], [9, 2], [1, 12], [3, 10], [5, 8], [7, 6], [9, 4]]\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == [[1, 1], [1, 1], [1, 1], [1, 1], [1, 1]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 30) == [[1, 11], [1, 12], [2, 11], [1, 13], [2, 12], [3, 11], [1, 14], [2, 13], [3, 12], [4, 11], [1, 15], [2, 14], [3, 13], [4, 12], [5, 11], [1, 16], [2, 15], [3, 14], [4, 13], [5, 12], [6, 11], [1, 17], [2, 16], [3, 15], [4, 14], [5, 13], [6, 12], [7, 11], [1, 18], [2, 17]]\n assert candidate(nums1 = [1000000000],nums2 = [-1000000000],k = 1) == [[1000000000, -1000000000]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 15) == [[1, 10], [1, 9], [1, 8], [1, 7], [1, 6], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 10], [2, 9], [2, 8], [2, 7], [2, 6]]\n assert candidate(nums1 = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1],nums2 = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 25) == [[-10, -1], [-10, -2], [-10, -3], [-10, -4], [-10, -5], [-10, -6], [-10, -7], [-10, -8], [-10, -9], [-10, -10], [-9, -1], [-9, -2], [-9, -3], [-9, -4], [-9, -5], [-9, -6], [-9, -7], [-9, -8], [-9, -9], [-9, -10], [-8, -1], [-8, -2], [-8, -3], [-8, -4], [-8, -5]]\n assert candidate(nums1 = [1, 2, 3],nums2 = [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 12) == [[1, 4], [1, 5], [2, 4], [1, 6], [2, 5], [3, 4], [1, 7], [2, 6], [3, 5], [1, 8], [2, 7], [3, 6]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],k = 8) == [[1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 5], [2, 4], [2, 3]]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 20) == [[1, 6], [1, 7], [2, 6], [1, 8], [2, 7], [3, 6], [1, 9], [2, 8], [3, 7], [4, 6], [1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [1, 11], [2, 10], [3, 9], [4, 8], [5, 7]]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],k = 25) == [[1, 10], [1, 9], [1, 8], [1, 7], [1, 6], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 10], [2, 9], [2, 8], [2, 7], [2, 6], [2, 5], [2, 4], [2, 3], [2, 2], [2, 1], [3, 10], [3, 9], [3, 8], [3, 7], [3, 6]]\n", "comparison": "exact"}, "public_tests": ["[1,7,11]\n[2,4,6]\n3", "[1,1,2]\n[1,2,3]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2", "k"], "leetcode_dataset_entry_point": "Solution().kSmallestPairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:17+00:00", "tests_total": 102, "tests_dropped": 10, "flags": [], "topic_tags": ["array", "heap-priority-queue"]}, "language": "ruby", "interface": {"raw_signature": "def k_smallest_pairs(nums1, nums2, k)", "container": null, "callable": "k_smallest_pairs", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 375, "task_id": "guess-number-higher-or-lower-ii", "difficulty": "Medium", "problem_description": "We are playing the Guessing Game. The game will work as follows:\n\n1. I pick a number between 1 and n.\n2. You guess a number.\n3. If you guess the right number, you win the game.\n4. If you guess the wrong number, then I will tell you whether the number I picked is higher or lower, and you will continue guessing.\n5. Every time you guess a wrong number x, you will pay x dollars. If you run out of money, you lose the game.\n\nGiven a particular n, return the minimum amount of money you need to guarantee a win regardless of what number I pick.\n\nExample 1:\n\nInput: n = 10\nOutput: 16\nExplanation: The winning strategy is as follows:\n- The range is [1,10]. Guess 7.\n - If this is my number, your total is $0. Otherwise, you pay $7.\n - If my number is higher, the range is [8,10]. Guess 9.\n - If this is my number, your total is $7. Otherwise, you pay $9.\n - If my number is higher, it must be 10. Guess 10. Your total is $7 + $9 = $16.\n - If my number is lower, it must be 8. Guess 8. Your total is $7 + $9 = $16.\n - If my number is lower, the range is [1,6]. Guess 3.\n - If this is my number, your total is $7. Otherwise, you pay $3.\n - If my number is higher, the range is [4,6]. Guess 5.\n - If this is my number, your total is $7 + $3 = $10. Otherwise, you pay $5.\n - If my number is higher, it must be 6. Guess 6. Your total is $7 + $3 + $5 = $15.\n - If my number is lower, it must be 4. Guess 4. Your total is $7 + $3 + $5 = $15.\n - If my number is lower, the range is [1,2]. Guess 1.\n - If this is my number, your total is $7 + $3 = $10. Otherwise, you pay $1.\n - If my number is higher, it must be 2. Guess 2. Your total is $7 + $3 + $1 = $11.\nThe worst case in all these scenarios is that you pay $16. Hence, you only need $16 to guarantee a win.\n\nExample 2:\n\nInput: n = 1\nOutput: 0\nExplanation: There is only one possible number, so you can guess 1 and not have to pay anything.\n\nExample 3:\n\nInput: n = 2\nOutput: 1\nExplanation: There are two possible numbers, 1 and 2.\n- Guess 1.\n - If this is my number, your total is $0. Otherwise, you pay $1.\n - If my number is higher, it must be 2. Guess 2. Your total is $1.\nThe worst case is that you pay $1.\n\nConstraints:\n\n- 1 <= n <= 200\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 100) == 400\n assert candidate(n = 15) == 30\n assert candidate(n = 200) == 952\n assert candidate(n = 2) == 1\n assert candidate(n = 1) == 0\n assert candidate(n = 10) == 16\n assert candidate(n = 5) == 6\n assert candidate(n = 150) == 692\n assert candidate(n = 3) == 2\n assert candidate(n = 130) == 585\n assert candidate(n = 125) == 560\n assert candidate(n = 12) == 21\n assert candidate(n = 110) == 460\n assert candidate(n = 50) == 172\n assert candidate(n = 60) == 214\n assert candidate(n = 155) == 718\n assert candidate(n = 30) == 79\n assert candidate(n = 40) == 119\n assert candidate(n = 4) == 4\n assert candidate(n = 80) == 295\n assert candidate(n = 75) == 274\n assert candidate(n = 140) == 635\n assert candidate(n = 18) == 42\n assert candidate(n = 120) == 529\n assert candidate(n = 160) == 743\n assert candidate(n = 199) == 946\n assert candidate(n = 180) == 843\n assert candidate(n = 90) == 345\n", "comparison": "exact"}, "public_tests": ["10", "1", "2"], "hints": ["The best strategy to play the game is to minimize the maximum loss you could possibly face. Another strategy is to minimize the expected loss. Here, we are interested in the first scenario.", "Take a small example (n = 3). What do you end up paying in the worst case?", "Check out this article if you're still stuck.", "The purely recursive implementation of minimax would be worthless for even a small n. You MUST use dynamic programming.", "As a follow-up, how would you modify your code to solve the problem of minimizing the expected loss, instead of the worst-case loss?"], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().getMoneyAmount", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:19+00:00", "tests_total": 28, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["math", "dynamic-programming", "minimax-algorithm", "game-theory"]}, "language": "ruby", "interface": {"raw_signature": "def get_money_amount(n)", "container": null, "callable": "get_money_amount", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 376, "task_id": "wiggle-subsequence", "difficulty": "Medium", "problem_description": "A wiggle sequence is a sequence where the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with one element and a sequence with two non-equal elements are trivially wiggle sequences.\n\n- For example, [1, 7, 4, 9, 2, 5] is a wiggle sequence because the differences (6, -3, 5, -7, 3) alternate between positive and negative.\n- In contrast, [1, 4, 7, 2, 5] and [1, 7, 4, 5, 5] are not wiggle sequences. The first is not because its first two differences are positive, and the second is not because its last difference is zero.\n\nA subsequence is obtained by deleting some elements (possibly zero) from the original sequence, leaving the remaining elements in their original order.\n\nGiven an integer array nums, return the length of the longest wiggle subsequence of nums.\n\nExample 1:\n\nInput: nums = [1,7,4,9,2,5]\nOutput: 6\nExplanation: The entire sequence is a wiggle sequence with differences (6, -3, 5, -7, 3).\n\nExample 2:\n\nInput: nums = [1,17,5,10,13,15,10,5,16,8]\nOutput: 7\nExplanation: There are several subsequences that achieve this length.\nOne is [1, 17, 10, 13, 10, 16, 8] with differences (16, -7, 3, -3, 6, -8).\n\nExample 3:\n\nInput: nums = [1,2,3,4,5,6,7,8,9]\nOutput: 2\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- 0 <= nums[i] <= 1000\n\nFollow up: Could you solve this in O(n) time?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 2, 3]) == 2\n assert candidate(nums = [80, 80, 80, 80, 80, 80]) == 1\n assert candidate(nums = [3, 3, 3, 2, 5, 25, 50, 41, 60, 70, 55, 65, 80, 90, 99]) == 7\n assert candidate(nums = [1, 1, 1, 1]) == 1\n assert candidate(nums = [2, 1]) == 2\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [0, 0]) == 1\n assert candidate(nums = [1, 3, 7, 4, 9, 2, 5]) == 6\n assert candidate(nums = [0, 0, 1, 0, 0, 2, 0, 0, 3]) == 6\n assert candidate(nums = [1, 3, 2, 2, 3, 1, 4]) == 6\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 2\n assert candidate(nums = [3, 3, 3, 2, 5]) == 3\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5]) == 2\n assert candidate(nums = [1, 7, 4, 9, 2, 5]) == 6\n assert candidate(nums = [5, 5, 5, 5, 5, 5]) == 1\n assert candidate(nums = [3, 3, 3, 2, 5, 25, 35, 45]) == 3\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [1, 17, 5, 10, 13, 15, 10, 5, 16, 8]) == 7\n assert candidate(nums = [1, 1]) == 1\n assert candidate(nums = [100, 100]) == 1\n assert candidate(nums = [1, 3, 2, 1]) == 3\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5]) == 2\n assert candidate(nums = [3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [1, 3, 2, 2, 3, 1, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 8\n assert candidate(nums = [10, 20, 10, 20, 30, 20, 30, 40, 30, 40, 50, 40, 50, 60]) == 10\n assert candidate(nums = [5, 3, 1, 2, 3, 4, 5, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5]) == 6\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5]) == 3\n assert candidate(nums = [3, 3, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(nums = [1, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4, 2, 3, 4]) == 14\n assert candidate(nums = [3, 3, 3, 2, 2, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3]) == 3\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 20\n assert candidate(nums = [1, 18, 3, 7, 10, 14, 6, 15, 4, 9, 12]) == 8\n assert candidate(nums = [50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100, 50, 100]) == 16\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2]) == 8\n assert candidate(nums = [5, 3, 3, 3, 5, 5, 2, 3, 4, 3, 2, 1]) == 6\n assert candidate(nums = [1, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14]) == 26\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4]) == 6\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7]) == 2\n assert candidate(nums = [1, 3, 2, 4, 5, 3, 6, 7, 8, 6, 9, 10, 11, 10]) == 9\n assert candidate(nums = [1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 16\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 1, 2, 3, 4]) == 8\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 3\n assert candidate(nums = [1, 18, 5, 10, 13, 15, 10, 5, 16, 8, 17, 7, 18]) == 10\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 2\n assert candidate(nums = [100, 4, 200, 1, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 7\n assert candidate(nums = [1, 18, 3, 7, 10, 13, 10, 5, 16, 8, 20, 15]) == 9\n assert candidate(nums = [8, 4, 6, 2, 3, 5, 7, 1, 9, 11, 10, 12, 14, 13, 15]) == 11\n assert candidate(nums = [5, 3, 3, 5, 2, 1, 6, 1, 2, 3, 4]) == 7\n assert candidate(nums = [1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5, 4, 3, 4, 5]) == 14\n assert candidate(nums = [3, 3, 3, 2, 5, 25, 2, 5, 25, 2, 5, 25]) == 7\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 39\n assert candidate(nums = [10, 15, 10, 5, 15, 5, 20, 10, 25, 15, 30, 20]) == 11\n assert candidate(nums = [1, 3, 2, 5, 3, 7, 5, 9, 7, 11, 9, 13, 11, 15, 13, 17, 15, 19, 17, 21]) == 20\n assert candidate(nums = [1, 10, 3, 100, 4, 101, 5, 102, 6, 103, 7, 104, 8, 105, 9, 106]) == 16\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9]) == 2\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 9, 13, 10, 14, 11, 15]) == 26\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4]) == 4\n assert candidate(nums = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == 12\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 3\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 2\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10]) == 19\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14]) == 24\n assert candidate(nums = [3, 3, 3, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2]) == 18\n assert candidate(nums = [10, 20, 30, 25, 20, 15, 25, 30, 20, 10]) == 5\n assert candidate(nums = [8, 3, 5, 1, 4, 2, 10, 9, 12, 6, 14, 7]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 2\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2]) == 7\n assert candidate(nums = [89, 45, 68, 90, 29, 34, 67, 30, 89, 21, 55, 62, 87, 90, 21, 56, 89, 34, 67, 23]) == 14\n assert candidate(nums = [8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6, 8, 6]) == 20\n assert candidate(nums = [1000, 999, 998, 999, 998, 997, 998, 997, 996, 997, 996, 995]) == 8\n assert candidate(nums = [1, 3, 7, 10, 9, 8, 2, 1, 5, 7, 10, 12, 8, 6, 4, 2, 3, 5, 7]) == 6\n assert candidate(nums = [999, 1000, 999, 1000, 999, 1000, 999, 1000, 999, 1000]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 2\n assert candidate(nums = [10, 20, 30, 25, 20, 15, 10, 15, 20, 25, 30]) == 4\n assert candidate(nums = [1, 18, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]) == 4\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5]) == 4\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 3\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5]) == 1\n assert candidate(nums = [1, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14]) == 15\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 11\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 2\n assert candidate(nums = [10, 90, 49, 2, 1, 100, 67, 89, 34, 67, 33, 21, 50, 41, 66, 70]) == 12\n assert candidate(nums = [500, 400, 500, 400, 500, 400, 500, 400, 500, 400, 500, 400, 500, 400]) == 14\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 4, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5]) == 8\n assert candidate(nums = [1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1]) == 7\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8]) == 15\n assert candidate(nums = [1, 2, 3, 4, 3, 4, 5, 4, 5, 6, 5, 6, 7, 6, 7, 8, 7, 8, 9, 8, 9, 10, 9, 10, 11]) == 16\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 1, 2]) == 14\n assert candidate(nums = [3, 3, 3, 2, 5, 5, 4, 8, 8, 9, 10, 10]) == 5\n assert candidate(nums = [1, 18, 9, 14, 7, 11, 3, 8, 16, 5]) == 9\n assert candidate(nums = [5, 10, 5, 10, 5, 10, 5, 10, 5]) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1]) == 3\n assert candidate(nums = [1, 18, 17, 19, 20, 21, 15, 10, 22, 23, 24, 14, 13, 12, 25, 26, 27, 9, 8, 7]) == 9\n assert candidate(nums = [2, 3, 1, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12]) == 20\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4]) == 4\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8]) == 2\n assert candidate(nums = [1, 100, 1, 99, 2, 98, 3, 97, 4, 96, 5, 95, 6, 94, 7, 93, 8, 92]) == 18\n assert candidate(nums = [100, 44, 61, 78, 54, 48, 101, 56, 30, 93, 47, 72, 38]) == 10\n assert candidate(nums = [8, 4, 5, 7, 7, 5, 4, 9, 2, 9, 10, 13, 7, 4, 8, 20]) == 9\n assert candidate(nums = [100, 40, 20, 60, 30, 50, 40, 80, 70, 90]) == 9\n assert candidate(nums = [100, 90, 95, 110, 105, 115, 100, 120, 80]) == 8\n assert candidate(nums = [100, 4, 200, 1, 3, 2, 3, 5, 4]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 2\n assert candidate(nums = [100, 90, 80, 90, 100, 95, 105, 92, 107, 85, 110, 75, 115, 65, 120, 55, 125, 45, 130, 35]) == 18\n assert candidate(nums = [5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5]) == 29\n assert candidate(nums = [1, 3, 2, 3, 1, 4, 2, 5, 3, 6, 4, 7, 5, 8, 6]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 5\n assert candidate(nums = [10, 20, 15, 25, 20, 30, 25, 35, 30, 40, 35, 45, 40, 50]) == 14\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 4]) == 10\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8]) == 2\n assert candidate(nums = [3, 1, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11]) == 17\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 20\n assert candidate(nums = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == 20\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [3, 1, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9]) == 16\n assert candidate(nums = [8, 4, 10, 3, 5, 7, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(nums = [3, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0, 1, 1, 2, 2, 3, 3]) == 3\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4]) == 6\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1]) == 5\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 102\n assert candidate(nums = [9, 8, 8, 5, 3, 5, 3, 4, 5, 0, 0, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0]) == 8\n", "comparison": "exact"}, "public_tests": ["[1,7,4,9,2,5]", "[1,17,5,10,13,15,10,5,16,8]", "[1,2,3,4,5,6,7,8,9]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().wiggleMaxLength", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:22+00:00", "tests_total": 134, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def wiggle_max_length(nums)", "container": null, "callable": "wiggle_max_length", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 377, "task_id": "combination-sum-iv", "difficulty": "Medium", "problem_description": "Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.\n\nThe test cases are generated so that the answer can fit in a 32-bit integer.\n\nExample 1:\n\nInput: nums = [1,2,3], target = 4\nOutput: 7\nExplanation:\nThe possible combination ways are:\n(1, 1, 1, 1)\n(1, 1, 2)\n(1, 2, 1)\n(1, 3)\n(2, 1, 1)\n(2, 2)\n(3, 1)\nNote that different sequences are counted as different combinations.\n\nExample 2:\n\nInput: nums = [9], target = 3\nOutput: 0\n\nConstraints:\n\n- 1 <= nums.length <= 200\n- 1 <= nums[i] <= 1000\n- All the elements of nums are unique.\n- 1 <= target <= 1000\n\nFollow up: What if negative numbers are allowed in the given array? How does it change the problem? What limitation we need to add to the question to allow negative numbers?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [10, 20, 30],target = 100) == 274\n assert candidate(nums = [1, 2, 3],target = 4) == 7\n assert candidate(nums = [5, 50, 75],target = 95) == 16\n assert candidate(nums = [5, 1, 3],target = 8) == 19\n assert candidate(nums = [5, 10, 20],target = 100) == 46754\n assert candidate(nums = [2, 1, 5],target = 10) == 128\n assert candidate(nums = [4, 2, 1],target = 32) == 39882198\n assert candidate(nums = [9],target = 3) == 0\n assert candidate(nums = [1],target = 100) == 1\n assert candidate(nums = [2, 5, 10, 20],target = 25) == 119\n assert candidate(nums = [2, 1, 5],target = 8) == 44\n assert candidate(nums = [15, 25, 5, 50, 100],target = 100) == 4600\n assert candidate(nums = [7, 14],target = 300) == 0\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == 464\n assert candidate(nums = [10, 20, 30],target = 50) == 13\n assert candidate(nums = [1, 2, 5],target = 25) == 382396\n assert candidate(nums = [18, 23, 50, 51],target = 200) == 493\n assert candidate(nums = [7, 14, 21, 28],target = 100) == 0\n assert candidate(nums = [3, 6, 9, 12],target = 100) == 0\n assert candidate(nums = [2, 5, 10, 20],target = 30) == 417\n assert candidate(nums = [5, 10, 25, 50],target = 100) == 27517\n assert candidate(nums = [1, 2, 4, 8, 16],target = 32) == 47350055\n assert candidate(nums = [10, 20, 30, 40],target = 100) == 401\n assert candidate(nums = [1, 10, 25, 50],target = 100) == 37971048\n assert candidate(nums = [4, 8, 15, 16, 23, 42],target = 100) == 878907\n assert candidate(nums = [2, 3, 5],target = 30) == 15778\n assert candidate(nums = [1, 2, 4, 5],target = 15) == 4185\n assert candidate(nums = [3, 7, 15],target = 120) == 92796380\n assert candidate(nums = [7, 14, 21, 28, 35],target = 100) == 0\n assert candidate(nums = [4, 10, 40, 100],target = 150) == 3504031\n assert candidate(nums = [3, 7, 8],target = 11) == 2\n assert candidate(nums = [2, 3, 6, 7, 9],target = 20) == 576\n assert candidate(nums = [50, 25, 75, 20, 10],target = 200) == 197308\n assert candidate(nums = [3, 33, 333],target = 1000) == 0\n assert candidate(nums = [2, 3, 6, 7],target = 12) == 26\n assert candidate(nums = [3, 6, 9, 12],target = 30) == 401\n assert candidate(nums = [1, 5, 10],target = 25) == 915\n assert candidate(nums = [100, 200, 300, 400, 500],target = 1000) == 464\n assert candidate(nums = [10, 20, 30, 40, 50],target = 150) == 13624\n assert candidate(nums = [3, 8, 10],target = 120) == 317567468\n assert candidate(nums = [1, 2, 3, 4, 5],target = 15) == 13624\n assert candidate(nums = [1, 3, 5, 7, 9],target = 25) == 70464\n assert candidate(nums = [33, 39, 45, 51, 60],target = 150) == 29\n assert candidate(nums = [3, 5, 7, 8, 9],target = 50) == 252672\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30],target = 100) == 0\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == 464\n assert candidate(nums = [15, 25, 35, 45],target = 200) == 6259\n assert candidate(nums = [1, 5, 10],target = 50) == 1919938\n assert candidate(nums = [10, 20, 30],target = 100) == 274\n assert candidate(nums = [50, 150, 250, 350, 450],target = 1000) == 6475\n assert candidate(nums = [50, 25, 75, 125],target = 250) == 331\n assert candidate(nums = [5, 10, 15, 20, 25, 30],target = 100) == 463968\n assert candidate(nums = [15, 25, 35],target = 100) == 25\n assert candidate(nums = [2, 4, 6, 8, 10],target = 20) == 464\n assert candidate(nums = [1, 3, 4, 5, 6],target = 20) == 22750\n assert candidate(nums = [1, 3, 4],target = 10) == 64\n assert candidate(nums = [1, 5, 10, 25],target = 50) == 1931845\n assert candidate(nums = [2, 3, 6, 7],target = 15) == 78\n assert candidate(nums = [1, 3, 4, 5],target = 13) == 424\n assert candidate(nums = [13, 17, 19, 23, 29],target = 100) == 256\n assert candidate(nums = [3, 5, 7, 10],target = 20) == 35\n assert candidate(nums = [2, 3, 6, 7],target = 30) == 19096\n assert candidate(nums = [7, 14, 28],target = 1000) == 0\n assert candidate(nums = [7, 14, 21, 28, 35],target = 105) == 13624\n assert candidate(nums = [7, 14, 28, 35, 56],target = 100) == 0\n assert candidate(nums = [4, 7, 9],target = 20) == 7\n assert candidate(nums = [3, 5, 10, 15],target = 50) == 12043\n assert candidate(nums = [3, 5, 7],target = 15) == 8\n assert candidate(nums = [4, 10, 40, 25],target = 100) == 18984\n assert candidate(nums = [1, 2, 4, 8, 16],target = 31) == 26805983\n assert candidate(nums = [10, 20, 30, 40, 50],target = 200) == 400096\n assert candidate(nums = [1, 100, 101, 102],target = 300) == 45158\n", "comparison": "exact"}, "public_tests": ["[1,2,3]\n4", "[9]\n3"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().combinationSum4", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:24+00:00", "tests_total": 116, "tests_dropped": 44, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def combination_sum4(nums, target)", "container": null, "callable": "combination_sum4", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 378, "task_id": "kth-smallest-element-in-a-sorted-matrix", "difficulty": "Medium", "problem_description": "Given an n x n matrix where each of the rows and columns is sorted in ascending order, return the k^th smallest element in the matrix.\n\nNote that it is the k^th smallest element in the sorted order, not the k^th distinct element.\n\nYou must find a solution with a memory complexity better than O(n^2).\n\nExample 1:\n\nInput: matrix = [[1,5,9],[10,11,13],[12,13,15]], k = 8\nOutput: 13\nExplanation: The elements in the matrix are [1,5,9,10,11,12,13,13,15], and the 8^th smallest number is 13\n\nExample 2:\n\nInput: matrix = [[-5]], k = 1\nOutput: -5\n\nConstraints:\n\n- n == matrix.length == matrix[i].length\n- 1 <= n <= 300\n- -10^9 <= matrix[i][j] <= 10^9\n- All the rows and columns of matrix are guaranteed to be sorted in non-decreasing order.\n- 1 <= k <= n^2\n\nFollow up:\n\n- Could you solve the problem with a constant memory (i.e., O(1) memory complexity)?\n- Could you solve the problem in O(n) time complexity? The solution may be too advanced for an interview but you may find reading this paper fun.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matrix = [[1, 2], [1, 3]],k = 1) == 1\n assert candidate(matrix = [[5, 9, 11], [9, 11, 13], [12, 13, 15]],k = 5) == 11\n assert candidate(matrix = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],k = 4) == 4\n assert candidate(matrix = [[1, 3, 5], [6, 7, 12], [11, 14, 14]],k = 4) == 6\n assert candidate(matrix = [[1, 2], [1, 3]],k = 3) == 2\n assert candidate(matrix = [[1, 5, 9], [10, 11, 13], [12, 13, 15]],k = 8) == 13\n assert candidate(matrix = [[-5]],k = 1) == -5\n assert candidate(matrix = [[5, 19, 21, 30, 32], [22, 27, 31, 36, 38], [23, 29, 34, 37, 41], [42, 46, 49, 50, 51], [48, 52, 53, 55, 57]],k = 15) == 41\n assert candidate(matrix = [[5, 9, 11], [9, 11, 13], [10, 12, 15]],k = 5) == 11\n assert candidate(matrix = [[1, 3, 5], [6, 7, 12], [11, 14, 14]],k = 3) == 5\n assert candidate(matrix = [[1, 2], [1, 3]],k = 2) == 1\n assert candidate(matrix = [[1, 3, 5], [6, 7, 12], [11, 14, 14]],k = 6) == 11\n assert candidate(matrix = [[1, 2], [3, 4]],k = 2) == 2\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],k = 15) == 15\n assert candidate(matrix = [[1, 3, 5], [6, 7, 12], [11, 14, 14]],k = 5) == 7\n assert candidate(matrix = [[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9]],k = 24) == 8\n assert candidate(matrix = [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15], [4, 7, 10, 13, 16], [5, 8, 11, 14, 17]],k = 13) == 9\n assert candidate(matrix = [[-1000, -900, -800, -700, -600], [-500, -400, -300, -200, -100], [0, 100, 200, 300, 400], [500, 600, 700, 800, 900], [1000, 1100, 1200, 1300, 1400]],k = 9) == -200\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-9, -4, 1, 6, 11], [-8, -3, 2, 7, 12], [-7, -2, 3, 8, 13], [-6, -1, 4, 9, 14]],k = 12) == 1\n assert candidate(matrix = [[-50, -45, -40, -35, -30], [-25, -20, -15, -10, -5], [0, 5, 10, 15, 20], [25, 30, 35, 40, 45], [50, 55, 60, 65, 70]],k = 12) == 5\n assert candidate(matrix = [[10, 20, 30, 40, 50], [15, 25, 35, 45, 55], [27, 37, 47, 57, 67], [38, 48, 58, 68, 78], [49, 59, 69, 79, 89]],k = 25) == 89\n assert candidate(matrix = [[-100, -90, -80], [-70, -60, -50], [-40, -30, -20]],k = 7) == -40\n assert candidate(matrix = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]],k = 1) == 1\n assert candidate(matrix = [[-1, 3, 4], [2, 6, 9], [3, 6, 9]],k = 6) == 6\n assert candidate(matrix = [[1, 4, 7, 10, 13, 16, 19], [3, 6, 9, 12, 15, 18, 21], [5, 8, 11, 14, 17, 20, 23], [7, 10, 13, 16, 19, 22, 25], [9, 12, 15, 18, 21, 24, 27], [11, 14, 17, 20, 23, 26, 29], [13, 16, 19, 22, 25, 28, 31]],k = 20) == 14\n assert candidate(matrix = [[-100, -90, -80, -70, -60], [-50, -40, -30, -20, -10], [0, 10, 20, 30, 40], [50, 60, 70, 80, 90], [100, 110, 120, 130, 140]],k = 11) == 0\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],k = 16) == 16\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-8, -3, 2, 7, 12], [-6, -1, 4, 9, 14], [-4, 1, 6, 11, 16], [-2, 3, 8, 13, 18]],k = 13) == 4\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]],k = 37) == 37\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]],k = 11) == 1\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]],k = 50) == 50\n assert candidate(matrix = [[-100, -50, 0, 50, 100], [-90, -40, 10, 60, 110], [-80, -30, 20, 70, 120], [-70, -20, 30, 80, 130], [-60, -10, 40, 90, 140]],k = 9) == -20\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11], [13, 15, 17, 19, 21, 23], [25, 27, 29, 31, 33, 35], [37, 39, 41, 43, 45, 47], [49, 51, 53, 55, 57, 59], [61, 63, 65, 67, 69, 71]],k = 18) == 35\n assert candidate(matrix = [[-10, -8, -6, -4, -2], [-9, -7, -5, -3, -1], [0, 2, 4, 6, 8], [9, 11, 13, 15, 17], [18, 20, 22, 24, 26]],k = 13) == 4\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54], [55, 56, 57, 58, 59, 60, 61, 62, 63], [64, 65, 66, 67, 68, 69, 70, 71, 72], [73, 74, 75, 76, 77, 78, 79, 80, 81]],k = 40) == 40\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36]],k = 23) == 23\n assert candidate(matrix = [[-10, -9, -8, -7, -6], [-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]],k = 12) == 1\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],k = 12) == 12\n assert candidate(matrix = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25]],k = 25) == 25\n assert candidate(matrix = [[5, 10, 15, 20], [25, 30, 35, 40], [45, 50, 55, 60], [65, 70, 75, 80]],k = 10) == 50\n assert candidate(matrix = [[5, 11, 13, 20, 24], [9, 17, 22, 25, 30], [10, 18, 23, 26, 31], [12, 19, 24, 27, 32], [15, 20, 25, 29, 33]],k = 13) == 22\n assert candidate(matrix = [[-1000000000, -999999999, -999999998], [-999999997, -999999996, -999999995], [-999999994, -999999993, -999999992]],k = 5) == -999999996\n assert candidate(matrix = [[-10, -5, 0, 5, 10], [-8, -3, 2, 7, 12], [-6, -1, 4, 8, 14], [-4, 1, 6, 9, 16], [-2, 3, 7, 10, 18]],k = 13) == 4\n assert candidate(matrix = [[-10, -5, -3], [-2, 0, 1], [5, 8, 10]],k = 5) == 0\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11], [13, 15, 17, 19, 21, 23], [25, 27, 29, 31, 33, 35], [37, 39, 41, 43, 45, 47], [49, 51, 53, 55, 57, 59], [61, 63, 65, 67, 69, 71]],k = 21) == 41\n assert candidate(matrix = [[-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1], [-1, -1, -1, -1, -1]],k = 10) == -1\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],k = 21) == 15\n assert candidate(matrix = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 2], [1, 1, 1, 2, 2], [1, 1, 2, 2, 3], [1, 2, 2, 3, 4]],k = 12) == 1\n assert candidate(matrix = [[-10, -7, -3, 0, 2], [0, 1, 2, 3, 4], [3, 4, 5, 6, 7], [5, 6, 7, 8, 9], [8, 9, 10, 11, 12]],k = 13) == 5\n assert candidate(matrix = [[-10, -7, -4, -1, 2], [-9, -6, -3, 0, 3], [-8, -5, -2, 1, 4], [-7, -4, -1, 2, 5], [-6, -3, 0, 3, 6]],k = 20) == 2\n assert candidate(matrix = [[1, 5, 9, 13, 17, 21], [2, 6, 10, 14, 18, 22], [3, 7, 11, 15, 19, 23], [4, 8, 12, 16, 20, 24], [5, 9, 13, 17, 21, 25], [6, 10, 14, 18, 22, 26]],k = 20) == 14\n assert candidate(matrix = [[5, 7, 7, 8, 8, 9, 9, 10, 10], [6, 7, 8, 8, 8, 9, 10, 10, 11], [7, 8, 8, 8, 9, 9, 10, 10, 11], [8, 9, 9, 9, 10, 10, 11, 11, 11], [8, 9, 10, 10, 10, 11, 11, 11, 12], [9, 10, 10, 11, 11, 11, 12, 12, 12], [9, 10, 10, 11, 11, 12, 12, 12, 13], [10, 10, 11, 11, 12, 12, 12, 13, 13], [10, 11, 11, 12, 12, 12, 13, 13, 14]],k = 25) == 9\n assert candidate(matrix = [[5, 9, 14, 20], [7, 11, 16, 22], [9, 13, 18, 24], [10, 15, 20, 25]],k = 7) == 13\n assert candidate(matrix = [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35, 36, 37, 38, 39], [40, 41, 42, 43, 44, 45, 46, 47, 48, 49], [50, 51, 52, 53, 54, 55, 56, 57, 58, 59], [60, 61, 62, 63, 64, 65, 66, 67, 68, 69], [70, 71, 72, 73, 74, 75, 76, 77, 78, 79], [80, 81, 82, 83, 84, 85, 86, 87, 88, 89]],k = 51) == 40\n assert candidate(matrix = [[100, 101, 102, 103, 104], [105, 106, 107, 108, 109], [110, 111, 112, 113, 114], [115, 116, 117, 118, 119], [120, 121, 122, 123, 124]],k = 13) == 112\n assert candidate(matrix = [[-10, -8, -6, -4], [-3, -2, 0, 2], [3, 5, 7, 9], [11, 13, 15, 17]],k = 10) == 5\n assert candidate(matrix = [[-10, -5, -3], [0, 2, 5], [8, 10, 20]],k = 5) == 2\n assert candidate(matrix = [[-1000000000, -999999999, -999999998], [-999999997, -999999996, -999999995], [-999999994, -999999993, -999999992]],k = 5) == -999999996\n assert candidate(matrix = [[100, 200, 300], [400, 500, 600], [700, 800, 900]],k = 8) == 800\n assert candidate(matrix = [[-10, -9, -8, -7], [-6, -5, -4, -3], [-2, -1, 0, 1], [2, 3, 4, 5]],k = 8) == -3\n assert candidate(matrix = [[-1000000000, -999999999, -999999998], [-999999997, -999999996, -999999995], [-999999994, -999999993, -999999992]],k = 2) == -999999999\n assert candidate(matrix = [[1, 2, 2, 2, 3], [2, 2, 2, 2, 3], [2, 2, 2, 3, 3], [2, 2, 3, 3, 3], [2, 3, 3, 3, 3]],k = 10) == 2\n assert candidate(matrix = [[-5, -4, -3, -2, -1, 0], [1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30]],k = 35) == 29\n assert candidate(matrix = [[1, 5, 9, 13, 17], [2, 6, 10, 14, 18], [3, 7, 11, 15, 19], [4, 8, 12, 16, 20], [5, 9, 13, 17, 21]],k = 1) == 1\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]],k = 55) == 55\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],k = 17) == 17\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]],k = 65) == 65\n assert candidate(matrix = [[-100, -90, -80, -70, -60], [10, 20, 30, 40, 50], [60, 70, 80, 90, 100], [110, 120, 130, 140, 150], [160, 170, 180, 190, 200]],k = 25) == 200\n assert candidate(matrix = [[1000, 1001, 1002, 1003], [1004, 1005, 1006, 1007], [1008, 1009, 1010, 1011], [1012, 1013, 1014, 1015]],k = 9) == 1008\n assert candidate(matrix = [[-3, -2, -1, 1, 2, 3], [1, 1, 2, 3, 4, 5], [2, 2, 3, 4, 5, 6], [3, 3, 4, 5, 6, 7], [4, 4, 5, 6, 7, 8], [5, 5, 6, 7, 8, 9]],k = 18) == 4\n assert candidate(matrix = [[-1000, -500, -100, -50, -1], [0, 100, 200, 300, 400], [500, 600, 700, 800, 900], [1000, 1100, 1200, 1300, 1400], [1500, 1600, 1700, 1800, 1900]],k = 25) == 1900\n assert candidate(matrix = [[1, 3, 5, 7], [8, 11, 13, 16], [20, 23, 25, 28], [31, 33, 35, 38]],k = 12) == 28\n assert candidate(matrix = [[1, 3, 6, 9], [2, 4, 8, 12], [3, 5, 11, 15], [4, 7, 13, 17]],k = 7) == 5\n assert candidate(matrix = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 2], [1, 2, 3, 3, 3, 3, 3, 3, 3, 3], [1, 2, 3, 4, 4, 4, 4, 4, 4, 4], [1, 2, 3, 4, 5, 5, 5, 5, 5, 5], [1, 2, 3, 4, 5, 6, 6, 6, 6, 6], [1, 2, 3, 4, 5, 6, 7, 7, 7, 7], [1, 2, 3, 4, 5, 6, 7, 8, 8, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9, 9], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],k = 100) == 10\n assert candidate(matrix = [[-1000000000, -1000000000, -1000000000], [0, 0, 0], [1000000000, 1000000000, 1000000000]],k = 5) == 0\n assert candidate(matrix = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28], [29, 30, 31, 32, 33, 34, 35], [36, 37, 38, 39, 40, 41, 42], [43, 44, 45, 46, 47, 48, 49]],k = 30) == 30\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],k = 1) == -5\n assert candidate(matrix = [[-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]],k = 13) == 7\n assert candidate(matrix = [[-10, -5, -1, 0, 1, 5, 10], [0, 0, 1, 1, 2, 6, 12], [1, 2, 2, 3, 4, 7, 14], [2, 3, 3, 4, 5, 8, 16], [3, 4, 4, 5, 6, 9, 18], [5, 6, 6, 7, 8, 11, 20], [10, 12, 14, 16, 18, 20, 25]],k = 25) == 5\n assert candidate(matrix = [[2, 6, 10, 14, 18], [3, 7, 11, 15, 19], [4, 8, 12, 16, 20], [5, 9, 13, 17, 21], [6, 10, 14, 18, 22]],k = 25) == 22\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],k = 15) == 15\n assert candidate(matrix = [[0, 1, 2, 3, 4, 5], [6, 7, 8, 9, 10, 11], [12, 13, 14, 15, 16, 17], [18, 19, 20, 21, 22, 23], [24, 25, 26, 27, 28, 29], [30, 31, 32, 33, 34, 35]],k = 20) == 19\n assert candidate(matrix = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 30]],k = 17) == 17\n assert candidate(matrix = [[-5, -4, -3], [-2, -1, 0], [1, 2, 3]],k = 5) == -1\n assert candidate(matrix = [[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [21, 23, 25, 27, 29, 31, 33, 35, 37, 39], [41, 43, 45, 47, 49, 51, 53, 55, 57, 59], [61, 63, 65, 67, 69, 71, 73, 75, 77, 79], [81, 83, 85, 87, 89, 91, 93, 95, 97, 99], [101, 103, 105, 107, 109, 111, 113, 115, 117, 119], [121, 123, 125, 127, 129, 131, 133, 135, 137, 139], [141, 143, 145, 147, 149, 151, 153, 155, 157, 159], [161, 163, 165, 167, 169, 171, 173, 175, 177, 179], [181, 183, 185, 187, 189, 191, 193, 195, 197, 199]],k = 50) == 99\n assert candidate(matrix = [[-50, -45, -40, -35, -30], [-35, -30, -25, -20, -15], [-30, -25, -20, -15, -10], [-25, -20, -15, -10, -5], [-20, -15, -10, -5, 0]],k = 1) == -50\n", "comparison": "exact"}, "public_tests": ["[[1,5,9],[10,11,13],[12,13,15]]\n8", "[[-5]]\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["matrix", "k"], "leetcode_dataset_entry_point": "Solution().kthSmallest", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:27+00:00", "tests_total": 88, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "binary-search", "sorting", "heap-priority-queue", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def kth_smallest(matrix, k)", "container": null, "callable": "kth_smallest", "parameters": [{"name": "matrix", "type": "Integer[][]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 383, "task_id": "ransom-note", "difficulty": "Easy", "problem_description": "Given two strings ransomNote and magazine, return true if ransomNote can be constructed by using the letters from magazine and false otherwise.\n\nEach letter in magazine can only be used once in ransomNote.\n\nExample 1:\n\nInput: ransomNote = \"a\", magazine = \"b\"\nOutput: false\n\nExample 2:\n\nInput: ransomNote = \"aa\", magazine = \"ab\"\nOutput: false\n\nExample 3:\n\nInput: ransomNote = \"aa\", magazine = \"aab\"\nOutput: true\n\nConstraints:\n\n- 1 <= ransomNote.length, magazine.length <= 10^5\n- ransomNote and magazine consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(ransomNote = \"abc\",magazine = \"def\") == False\n assert candidate(ransomNote = \"hello\",magazine = \"hll\") == False\n assert candidate(ransomNote = \"mississippi\",magazine = \"mspsisgp\") == False\n assert candidate(ransomNote = \"aa\",magazine = \"ab\") == False\n assert candidate(ransomNote = \"aabbcc\",magazine = \"abc\") == False\n assert candidate(ransomNote = \"construct\",magazine = \"nstructco\") == True\n assert candidate(ransomNote = \"abc\",magazine = \"cba\") == True\n assert candidate(ransomNote = \"hello\",magazine = \"ohell\") == True\n assert candidate(ransomNote = \"abc\",magazine = \"aabbcc\") == True\n assert candidate(ransomNote = \"world\",magazine = \"dlrow\") == True\n assert candidate(ransomNote = \"hello\",magazine = \"ehlol\") == True\n assert candidate(ransomNote = \"zzz\",magazine = \"zzzz\") == True\n assert candidate(ransomNote = \"aa\",magazine = \"aab\") == True\n assert candidate(ransomNote = \"a\",magazine = \"a\") == True\n assert candidate(ransomNote = \"abcdef\",magazine = \"fedcba\") == True\n assert candidate(ransomNote = \"python\",magazine = \"ypthon\") == True\n assert candidate(ransomNote = \"world\",magazine = \"word\") == False\n assert candidate(ransomNote = \"hello\",magazine = \"hello\") == True\n assert candidate(ransomNote = \"a\",magazine = \"b\") == False\n assert candidate(ransomNote = \"abc\",magazine = \"aabbc\") == True\n assert candidate(ransomNote = \"algorithm\",magazine = \"logarithm\") == True\n assert candidate(ransomNote = \"test\",magazine = \"ttewst\") == True\n assert candidate(ransomNote = \"xyz\",magazine = \"abcxyz\") == True\n assert candidate(ransomNote = \"datastructures\",magazine = \"structuredatas\") == True\n assert candidate(ransomNote = \"aaabb\",magazine = \"aab\") == False\n assert candidate(ransomNote = \"zzzz\",magazine = \"zzzzzzzz\") == True\n assert candidate(ransomNote = \"elephant\",magazine = \"telephantl\") == True\n assert candidate(ransomNote = \"example\",magazine = \"ampleex\") == True\n assert candidate(ransomNote = \"uniquecharacters\",magazine = \"charactersunique\") == True\n assert candidate(ransomNote = \"abcdefghijklmnopqrstuvwxyz\",magazine = \"zyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(ransomNote = \"xylophone\",magazine = \"phonepolyx\") == True\n assert candidate(ransomNote = \"zzzzz\",magazine = \"zzzzzzzzzz\") == True\n assert candidate(ransomNote = \"aquickbrownfoxjumpsoverthelazydog\",magazine = \"thequickbrownfoxjumpsoverthelazydog\") == False\n assert candidate(ransomNote = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",magazine = \"zzzzzyyyyxxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeeeddccbbaa\") == True\n assert candidate(ransomNote = \"programming\",magazine = \"gimmnoprramg\") == True\n assert candidate(ransomNote = \"abcdabcdabcd\",magazine = \"abcabcabc\") == False\n assert candidate(ransomNote = \"casecasecase\",magazine = \"casecase\") == False\n assert candidate(ransomNote = \"abacabadabacaba\",magazine = \"aaaaaaaaaabbbbbbbbbbcccccccccc\") == False\n assert candidate(ransomNote = \"almost\",magazine = \"almostly\") == True\n assert candidate(ransomNote = \"abracadabra\",magazine = \"acabradabra\") == True\n assert candidate(ransomNote = \"supercalifragilisticexpialidocious\",magazine = \"supercalifragilisticexpialidocious\") == True\n assert candidate(ransomNote = \"characters\",magazine = \"characterscharacters\") == True\n assert candidate(ransomNote = \"unavailable\",magazine = \"availableun\") == True\n assert candidate(ransomNote = \"repeatedletters\",magazine = \"rreeppddeeaatteedllettterss\") == True\n assert candidate(ransomNote = \"thedefaultvalue\",magazine = \"thedefultvalue\") == False\n assert candidate(ransomNote = \"abcdabcd\",magazine = \"dcba\") == False\n assert candidate(ransomNote = \"aabbaabb\",magazine = \"abababab\") == True\n assert candidate(ransomNote = \"xyz\",magazine = \"zyxzyxzyx\") == True\n assert candidate(ransomNote = \"thisisanadditionaltest\",magazine = \"thisisanadditionalteest\") == True\n assert candidate(ransomNote = \"aaaaabbbbcccc\",magazine = \"abcabcabcabcabc\") == True\n assert candidate(ransomNote = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",magazine = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == True\n assert candidate(ransomNote = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",magazine = \"zzzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == True\n assert candidate(ransomNote = \"pythonprogramming\",magazine = \"programmingpython\") == True\n assert candidate(ransomNote = \"algorithm\",magazine = \"logarithmz\") == True\n assert candidate(ransomNote = \"aaaaaaabbbbbbb\",magazine = \"bbbbbbbbaaaaaa\") == False\n assert candidate(ransomNote = \"longerstringwithmorecharacters\",magazine = \"longerstringwithmorecharactersandextraletters\") == True\n assert candidate(ransomNote = \"datastructure\",magazine = \"structureadta\") == True\n assert candidate(ransomNote = \"uniqueletters\",magazine = \"eulinettsqu\") == False\n assert candidate(ransomNote = \"alabama\",magazine = \"aalabmmab\") == True\n assert candidate(ransomNote = \"abcde\",magazine = \"fghij\") == False\n assert candidate(ransomNote = \"programming\",magazine = \"progarmmnig\") == True\n assert candidate(ransomNote = \"racecar\",magazine = \"carrace\") == True\n assert candidate(ransomNote = \"abcdabcd\",magazine = \"dcbaabcd\") == True\n assert candidate(ransomNote = \"x\",magazine = \"y\") == False\n assert candidate(ransomNote = \"noleftovers\",magazine = \"noleftovers\") == True\n assert candidate(ransomNote = \"abracadabra\",magazine = \"acarambadbr\") == False\n assert candidate(ransomNote = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",magazine = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == True\n assert candidate(ransomNote = \"abcabcabcabc\",magazine = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == False\n assert candidate(ransomNote = \"congratulations\",magazine = \"congratulationsareinorder\") == True\n assert candidate(ransomNote = \"longerransomnote\",magazine = \"longerransomnoteandmore\") == True\n assert candidate(ransomNote = \"lowercaseonly\",magazine = \"lowercaseonlylowercaseonly\") == True\n assert candidate(ransomNote = \"thisisaverylongstringthatweneedtocheck\",magazine = \"thisisaverylongstringthatwehave\") == False\n assert candidate(ransomNote = \"abcdefghijk\",magazine = \"kjihgfedcba\") == True\n assert candidate(ransomNote = \"thequickbrownfoxjumpsoverthelazydog\",magazine = \"quickbrownfoxjumpsoverthelazydogthe\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"mmississippi\") == True\n assert candidate(ransomNote = \"longstringwithmanysamecharacterssssssss\",magazine = \"sssssssssssssssssssssssssssssssssss\") == False\n assert candidate(ransomNote = \"unique\",magazine = \"ueinque\") == True\n assert candidate(ransomNote = \"qwertyuiopasdfghjklzxcvbnm\",magazine = \"qwertyuiopasdfghjklzxcvbnm\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"ppissimiss\") == False\n assert candidate(ransomNote = \"sampleinput\",magazine = \"sampleinputandsomeextraletters\") == True\n assert candidate(ransomNote = \"aabbcc\",magazine = \"abcabc\") == True\n assert candidate(ransomNote = \"same\",magazine = \"same\") == True\n assert candidate(ransomNote = \"repeatedcharacters\",magazine = \"repeatedcharacterse\") == True\n assert candidate(ransomNote = \"abacax\",magazine = \"abcax\") == False\n assert candidate(ransomNote = \"unique\",magazine = \"unqeiu\") == True\n assert candidate(ransomNote = \"abracadabra\",magazine = \"aacdrabbra\") == False\n assert candidate(ransomNote = \"aabbccddeeff\",magazine = \"fedcba\") == False\n assert candidate(ransomNote = \"zzzz\",magazine = \"zzzzzzzzzz\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"sssinppimm\") == False\n assert candidate(ransomNote = \"xxyyzz\",magazine = \"xzyyzzxx\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"ssssmissipppii\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"misisapip\") == False\n assert candidate(ransomNote = \"complexity\",magazine = \"txicopmlxity\") == False\n assert candidate(ransomNote = \"onemore\",magazine = \"onemoreexample\") == True\n assert candidate(ransomNote = \"thisisaverylongstringthatshouldpass\",magazine = \"thisisaverylongstringthatshouldpassandmore\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"ppisissimm\") == False\n assert candidate(ransomNote = \"banana\",magazine = \"anbananab\") == True\n assert candidate(ransomNote = \"programming\",magazine = \"rgmepnmoainrg\") == True\n assert candidate(ransomNote = \"construction\",magazine = \"ncostruticion\") == True\n assert candidate(ransomNote = \"banana\",magazine = \"nabnanaa\") == True\n assert candidate(ransomNote = \"short\",magazine = \"shortandlong\") == True\n assert candidate(ransomNote = \"overlap\",magazine = \"overlaplap\") == True\n assert candidate(ransomNote = \"aabbcc\",magazine = \"abcabcabc\") == True\n assert candidate(ransomNote = \"zxy\",magazine = \"zyxzyx\") == True\n assert candidate(ransomNote = \"xylophone\",magazine = \"enphonxylox\") == True\n assert candidate(ransomNote = \"hellohellohello\",magazine = \"hellohellohellobbb\") == True\n assert candidate(ransomNote = \"single\",magazine = \"singles\") == True\n assert candidate(ransomNote = \"thisisaverylongstringthatshouldpass\",magazine = \"thisisaverylongstringthatshouldpass\") == True\n assert candidate(ransomNote = \"zzzzzz\",magazine = \"zzzzzzzzzz\") == True\n assert candidate(ransomNote = \"abcd\",magazine = \"dcba\") == True\n assert candidate(ransomNote = \"mississippi\",magazine = \"ppisimiss\") == False\n assert candidate(ransomNote = \"almostthere\",magazine = \"almostherethere\") == True\n assert candidate(ransomNote = \"thisisatest\",magazine = \"thisisnotatest\") == True\n assert candidate(ransomNote = \"complexity\",magazine = \"xxxxcomplexityyyyy\") == True\n assert candidate(ransomNote = \"python\",magazine = \"nohtyp\") == True\n assert candidate(ransomNote = \"toolong\",magazine = \"too\") == False\n assert candidate(ransomNote = \"a\",magazine = \"abcdefghijklmnopqrstuvwxyz\") == True\n assert candidate(ransomNote = \"abracadabra\",magazine = \"acazabra\") == False\n assert candidate(ransomNote = \"programming\",magazine = \"grammproing\") == True\n assert candidate(ransomNote = \"zapples\",magazine = \"paplezzzas\") == True\n assert candidate(ransomNote = \"python\",magazine = \"typythonn\") == True\n assert candidate(ransomNote = \"programming\",magazine = \"progmminglanguage\") == False\n assert candidate(ransomNote = \"abcdefg\",magazine = \"gfedcba\") == True\n assert candidate(ransomNote = \"thisisaverylongstringthatshouldfail\",magazine = \"thisisaverylongstringthatshoul\") == False\n assert candidate(ransomNote = \"challenge\",magazine = \"lengchalleng\") == True\n assert candidate(ransomNote = \"hellohellohello\",magazine = \"hellohello\") == False\n assert candidate(ransomNote = \"thisisaverylongransomnotethatwillsurelymakethetestcaseinteresting\",magazine = \"thisisaverylongmagazinesamplethatshouldcontainmanyoftheransomletters\") == False\n assert candidate(ransomNote = \"missingchar\",magazine = \"missingcha\") == False\n assert candidate(ransomNote = \"interview\",magazine = \"vwnteriview\") == True\n assert candidate(ransomNote = \"repeatedletters\",magazine = \"repetettadledtresletters\") == True\n assert candidate(ransomNote = \"aabbccddeeffgg\",magazine = \"aabbccddeeffgghh\") == True\n assert candidate(ransomNote = \"repeatedletters\",magazine = \"lettersrepated\") == False\n assert candidate(ransomNote = \"abcdabcdabcd\",magazine = \"abcdabcd\") == False\n assert candidate(ransomNote = \"racecar\",magazine = \"racecar\") == True\n assert candidate(ransomNote = \"programming\",magazine = \"gnimmargorp\") == True\n assert candidate(ransomNote = \"aabbc\",magazine = \"aabbc\") == True\n", "comparison": "exact"}, "public_tests": ["\"a\"\n\"b\"", "\"aa\"\n\"ab\"", "\"aa\"\n\"aab\""], "hints": [], "metadata": {"canonical_parameter_names": ["ransomNote", "magazine"], "leetcode_dataset_entry_point": "Solution().canConstruct", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:29+00:00", "tests_total": 141, "tests_dropped": 5, "flags": [], "topic_tags": ["hash-table", "string", "counting"]}, "language": "ruby", "interface": {"raw_signature": "def can_construct(ransom_note, magazine)", "container": null, "callable": "can_construct", "parameters": [{"name": "ransom_note", "type": "String"}, {"name": "magazine", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 386, "task_id": "lexicographical-numbers", "difficulty": "Medium", "problem_description": "Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order.\n\nYou must write an algorithm that runs in O(n) time and uses O(1) extra space.\n\nExample 1:\n\nInput: n = 13\nOutput: [1,10,11,12,13,2,3,4,5,6,7,8,9]\n\nExample 2:\n\nInput: n = 2\nOutput: [1,2]\n\nConstraints:\n\n- 1 <= n <= 5 * 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 4321) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 334, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 335, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 336, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 337, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 338, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 339, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 34, 340, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 341, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 342, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 343, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 344, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 345, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 346, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 347, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 348, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 349, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 35, 350, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 351, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 352, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 353, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 354, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 355, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 356, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 357, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 358, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 359, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 36, 360, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 361, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 362, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 363, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 364, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 365, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 366, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 367, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 368, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 369, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 37, 370, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 371, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 372, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 373, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 374, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 375, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 376, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 377, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 378, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 379, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 38, 380, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 381, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 382, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 383, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 384, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 385, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 386, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 387, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 388, 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 389, 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 39, 390, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 391, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 392, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 393, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 394, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 395, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 396, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 397, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 398, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 399, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4, 40, 400, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 401, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 402, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 403, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 404, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 405, 4050, 4051, 4052, 4053, 4054, 4055, 4056, 4057, 4058, 4059, 406, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 407, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 408, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 4089, 409, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 41, 410, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 411, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 412, 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 413, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 414, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 415, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, 416, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 417, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 418, 4180, 4181, 4182, 4183, 4184, 4185, 4186, 4187, 4188, 4189, 419, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 42, 420, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 421, 4210, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 4219, 422, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 423, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 424, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 425, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 426, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 427, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 428, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 429, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 43, 430, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 431, 4310, 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 432, 4320, 4321, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 10) == [1, 10, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(n = 999) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 99) == [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 2) == [1, 2]\n assert candidate(n = 100) == [1, 10, 100, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 1) == [1]\n assert candidate(n = 13) == [1, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(n = 5) == [1, 2, 3, 4, 5]\n assert candidate(n = 1010) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 105) == [1, 10, 100, 101, 102, 103, 104, 105, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 1111) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 4000) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 334, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 335, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 336, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 337, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 338, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 339, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 34, 340, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 341, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 342, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 343, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 344, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 345, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 346, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 347, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 348, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 349, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 35, 350, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 351, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 352, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 353, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 354, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 355, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 356, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 357, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 358, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 359, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 36, 360, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 361, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 362, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 363, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 364, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 365, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 366, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 367, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 368, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 369, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 37, 370, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 371, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 372, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 373, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 374, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 375, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 376, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 377, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 378, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 379, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 38, 380, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 381, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 382, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 383, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 384, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 385, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 386, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 387, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 388, 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 389, 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 39, 390, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 391, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 392, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 393, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 394, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 395, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 396, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 397, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 398, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 399, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4, 40, 400, 4000, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 2345) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 324) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 111) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 1000) == [1, 10, 100, 1000, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 3333) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 300) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 3000) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 3456) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 334, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 335, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 336, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 337, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 338, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 339, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 34, 340, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 341, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 342, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 343, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 344, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 345, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 345) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 1001) == [1, 10, 100, 1000, 1001, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 1024) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 101) == [1, 10, 100, 101, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 2020) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 5555) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 334, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 335, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 336, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 337, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 338, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 339, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 34, 340, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 341, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 342, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 343, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 344, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 345, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 346, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 347, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 348, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 349, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 35, 350, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 351, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 352, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 353, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 354, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 355, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 356, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 357, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 358, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 359, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 36, 360, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 361, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 362, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 363, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 364, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 365, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 366, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 367, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 368, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 369, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 37, 370, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 371, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 372, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 373, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 374, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 375, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 376, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 377, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 378, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 379, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 38, 380, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 381, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 382, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 383, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 384, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 385, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 386, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 387, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 388, 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 389, 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 39, 390, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 391, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 392, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 393, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 394, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 395, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 396, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 397, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 398, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 399, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4, 40, 400, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 401, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 402, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 403, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 404, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 405, 4050, 4051, 4052, 4053, 4054, 4055, 4056, 4057, 4058, 4059, 406, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 407, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 408, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 4089, 409, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 41, 410, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 411, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 412, 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 413, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 414, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 415, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, 416, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 417, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 418, 4180, 4181, 4182, 4183, 4184, 4185, 4186, 4187, 4188, 4189, 419, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 42, 420, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 421, 4210, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 4219, 422, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 423, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 424, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 425, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 426, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 427, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 428, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 429, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 43, 430, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 431, 4310, 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 432, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 433, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 434, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 435, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 436, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 437, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 438, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 439, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 44, 440, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 441, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 442, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 4427, 4428, 4429, 443, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 444, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 445, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 446, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 447, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 448, 4480, 4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 4489, 449, 4490, 4491, 4492, 4493, 4494, 4495, 4496, 4497, 4498, 4499, 45, 450, 4500, 4501, 4502, 4503, 4504, 4505, 4506, 4507, 4508, 4509, 451, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 452, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 453, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 454, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 455, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 456, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568, 4569, 457, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 458, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 459, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 46, 460, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 461, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 462, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 463, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 464, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 465, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 466, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 467, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 468, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 469, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 47, 470, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 471, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 472, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 473, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 474, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 475, 4750, 4751, 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 476, 4760, 4761, 4762, 4763, 4764, 4765, 4766, 4767, 4768, 4769, 477, 4770, 4771, 4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 478, 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 479, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797, 4798, 4799, 48, 480, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807, 4808, 4809, 481, 4810, 4811, 4812, 4813, 4814, 4815, 4816, 4817, 4818, 4819, 482, 4820, 4821, 4822, 4823, 4824, 4825, 4826, 4827, 4828, 4829, 483, 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 484, 4840, 4841, 4842, 4843, 4844, 4845, 4846, 4847, 4848, 4849, 485, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 486, 4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, 487, 4870, 4871, 4872, 4873, 4874, 4875, 4876, 4877, 4878, 4879, 488, 4880, 4881, 4882, 4883, 4884, 4885, 4886, 4887, 4888, 4889, 489, 4890, 4891, 4892, 4893, 4894, 4895, 4896, 4897, 4898, 4899, 49, 490, 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 491, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, 4918, 4919, 492, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 493, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 494, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 495, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 496, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 497, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 498, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 499, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5, 50, 500, 5000, 5001, 5002, 5003, 5004, 5005, 5006, 5007, 5008, 5009, 501, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 502, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 503, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 504, 5040, 5041, 5042, 5043, 5044, 5045, 5046, 5047, 5048, 5049, 505, 5050, 5051, 5052, 5053, 5054, 5055, 5056, 5057, 5058, 5059, 506, 5060, 5061, 5062, 5063, 5064, 5065, 5066, 5067, 5068, 5069, 507, 5070, 5071, 5072, 5073, 5074, 5075, 5076, 5077, 5078, 5079, 508, 5080, 5081, 5082, 5083, 5084, 5085, 5086, 5087, 5088, 5089, 509, 5090, 5091, 5092, 5093, 5094, 5095, 5096, 5097, 5098, 5099, 51, 510, 5100, 5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108, 5109, 511, 5110, 5111, 5112, 5113, 5114, 5115, 5116, 5117, 5118, 5119, 512, 5120, 5121, 5122, 5123, 5124, 5125, 5126, 5127, 5128, 5129, 513, 5130, 5131, 5132, 5133, 5134, 5135, 5136, 5137, 5138, 5139, 514, 5140, 5141, 5142, 5143, 5144, 5145, 5146, 5147, 5148, 5149, 515, 5150, 5151, 5152, 5153, 5154, 5155, 5156, 5157, 5158, 5159, 516, 5160, 5161, 5162, 5163, 5164, 5165, 5166, 5167, 5168, 5169, 517, 5170, 5171, 5172, 5173, 5174, 5175, 5176, 5177, 5178, 5179, 518, 5180, 5181, 5182, 5183, 5184, 5185, 5186, 5187, 5188, 5189, 519, 5190, 5191, 5192, 5193, 5194, 5195, 5196, 5197, 5198, 5199, 52, 520, 5200, 5201, 5202, 5203, 5204, 5205, 5206, 5207, 5208, 5209, 521, 5210, 5211, 5212, 5213, 5214, 5215, 5216, 5217, 5218, 5219, 522, 5220, 5221, 5222, 5223, 5224, 5225, 5226, 5227, 5228, 5229, 523, 5230, 5231, 5232, 5233, 5234, 5235, 5236, 5237, 5238, 5239, 524, 5240, 5241, 5242, 5243, 5244, 5245, 5246, 5247, 5248, 5249, 525, 5250, 5251, 5252, 5253, 5254, 5255, 5256, 5257, 5258, 5259, 526, 5260, 5261, 5262, 5263, 5264, 5265, 5266, 5267, 5268, 5269, 527, 5270, 5271, 5272, 5273, 5274, 5275, 5276, 5277, 5278, 5279, 528, 5280, 5281, 5282, 5283, 5284, 5285, 5286, 5287, 5288, 5289, 529, 5290, 5291, 5292, 5293, 5294, 5295, 5296, 5297, 5298, 5299, 53, 530, 5300, 5301, 5302, 5303, 5304, 5305, 5306, 5307, 5308, 5309, 531, 5310, 5311, 5312, 5313, 5314, 5315, 5316, 5317, 5318, 5319, 532, 5320, 5321, 5322, 5323, 5324, 5325, 5326, 5327, 5328, 5329, 533, 5330, 5331, 5332, 5333, 5334, 5335, 5336, 5337, 5338, 5339, 534, 5340, 5341, 5342, 5343, 5344, 5345, 5346, 5347, 5348, 5349, 535, 5350, 5351, 5352, 5353, 5354, 5355, 5356, 5357, 5358, 5359, 536, 5360, 5361, 5362, 5363, 5364, 5365, 5366, 5367, 5368, 5369, 537, 5370, 5371, 5372, 5373, 5374, 5375, 5376, 5377, 5378, 5379, 538, 5380, 5381, 5382, 5383, 5384, 5385, 5386, 5387, 5388, 5389, 539, 5390, 5391, 5392, 5393, 5394, 5395, 5396, 5397, 5398, 5399, 54, 540, 5400, 5401, 5402, 5403, 5404, 5405, 5406, 5407, 5408, 5409, 541, 5410, 5411, 5412, 5413, 5414, 5415, 5416, 5417, 5418, 5419, 542, 5420, 5421, 5422, 5423, 5424, 5425, 5426, 5427, 5428, 5429, 543, 5430, 5431, 5432, 5433, 5434, 5435, 5436, 5437, 5438, 5439, 544, 5440, 5441, 5442, 5443, 5444, 5445, 5446, 5447, 5448, 5449, 545, 5450, 5451, 5452, 5453, 5454, 5455, 5456, 5457, 5458, 5459, 546, 5460, 5461, 5462, 5463, 5464, 5465, 5466, 5467, 5468, 5469, 547, 5470, 5471, 5472, 5473, 5474, 5475, 5476, 5477, 5478, 5479, 548, 5480, 5481, 5482, 5483, 5484, 5485, 5486, 5487, 5488, 5489, 549, 5490, 5491, 5492, 5493, 5494, 5495, 5496, 5497, 5498, 5499, 55, 550, 5500, 5501, 5502, 5503, 5504, 5505, 5506, 5507, 5508, 5509, 551, 5510, 5511, 5512, 5513, 5514, 5515, 5516, 5517, 5518, 5519, 552, 5520, 5521, 5522, 5523, 5524, 5525, 5526, 5527, 5528, 5529, 553, 5530, 5531, 5532, 5533, 5534, 5535, 5536, 5537, 5538, 5539, 554, 5540, 5541, 5542, 5543, 5544, 5545, 5546, 5547, 5548, 5549, 555, 5550, 5551, 5552, 5553, 5554, 5555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 5000) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 334, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 335, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 336, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 337, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 338, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 339, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 34, 340, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 341, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 342, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 343, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 344, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 345, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 346, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 347, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 348, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 349, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 35, 350, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 351, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 352, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 353, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 354, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 355, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 356, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 357, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 358, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 359, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 36, 360, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 361, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 362, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 363, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 364, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 365, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 366, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 367, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 368, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 369, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 37, 370, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 371, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 372, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 373, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 374, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 375, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 376, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 377, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 378, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 379, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 38, 380, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 381, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 382, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 383, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 384, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 385, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 386, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 387, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 388, 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 389, 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 39, 390, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 391, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 392, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 393, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 394, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 395, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 396, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 397, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 398, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 399, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4, 40, 400, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 401, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 402, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 403, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 404, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 405, 4050, 4051, 4052, 4053, 4054, 4055, 4056, 4057, 4058, 4059, 406, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 407, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 408, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 4089, 409, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 41, 410, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 411, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 412, 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 413, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 414, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 415, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, 416, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 417, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 418, 4180, 4181, 4182, 4183, 4184, 4185, 4186, 4187, 4188, 4189, 419, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 42, 420, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 421, 4210, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 4219, 422, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 423, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 424, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 425, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 426, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 427, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 428, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 429, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 43, 430, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 431, 4310, 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 432, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 433, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 434, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 435, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 436, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 437, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 438, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 439, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 44, 440, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 441, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 442, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 4427, 4428, 4429, 443, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 444, 4440, 4441, 4442, 4443, 4444, 4445, 4446, 4447, 4448, 4449, 445, 4450, 4451, 4452, 4453, 4454, 4455, 4456, 4457, 4458, 4459, 446, 4460, 4461, 4462, 4463, 4464, 4465, 4466, 4467, 4468, 4469, 447, 4470, 4471, 4472, 4473, 4474, 4475, 4476, 4477, 4478, 4479, 448, 4480, 4481, 4482, 4483, 4484, 4485, 4486, 4487, 4488, 4489, 449, 4490, 4491, 4492, 4493, 4494, 4495, 4496, 4497, 4498, 4499, 45, 450, 4500, 4501, 4502, 4503, 4504, 4505, 4506, 4507, 4508, 4509, 451, 4510, 4511, 4512, 4513, 4514, 4515, 4516, 4517, 4518, 4519, 452, 4520, 4521, 4522, 4523, 4524, 4525, 4526, 4527, 4528, 4529, 453, 4530, 4531, 4532, 4533, 4534, 4535, 4536, 4537, 4538, 4539, 454, 4540, 4541, 4542, 4543, 4544, 4545, 4546, 4547, 4548, 4549, 455, 4550, 4551, 4552, 4553, 4554, 4555, 4556, 4557, 4558, 4559, 456, 4560, 4561, 4562, 4563, 4564, 4565, 4566, 4567, 4568, 4569, 457, 4570, 4571, 4572, 4573, 4574, 4575, 4576, 4577, 4578, 4579, 458, 4580, 4581, 4582, 4583, 4584, 4585, 4586, 4587, 4588, 4589, 459, 4590, 4591, 4592, 4593, 4594, 4595, 4596, 4597, 4598, 4599, 46, 460, 4600, 4601, 4602, 4603, 4604, 4605, 4606, 4607, 4608, 4609, 461, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 462, 4620, 4621, 4622, 4623, 4624, 4625, 4626, 4627, 4628, 4629, 463, 4630, 4631, 4632, 4633, 4634, 4635, 4636, 4637, 4638, 4639, 464, 4640, 4641, 4642, 4643, 4644, 4645, 4646, 4647, 4648, 4649, 465, 4650, 4651, 4652, 4653, 4654, 4655, 4656, 4657, 4658, 4659, 466, 4660, 4661, 4662, 4663, 4664, 4665, 4666, 4667, 4668, 4669, 467, 4670, 4671, 4672, 4673, 4674, 4675, 4676, 4677, 4678, 4679, 468, 4680, 4681, 4682, 4683, 4684, 4685, 4686, 4687, 4688, 4689, 469, 4690, 4691, 4692, 4693, 4694, 4695, 4696, 4697, 4698, 4699, 47, 470, 4700, 4701, 4702, 4703, 4704, 4705, 4706, 4707, 4708, 4709, 471, 4710, 4711, 4712, 4713, 4714, 4715, 4716, 4717, 4718, 4719, 472, 4720, 4721, 4722, 4723, 4724, 4725, 4726, 4727, 4728, 4729, 473, 4730, 4731, 4732, 4733, 4734, 4735, 4736, 4737, 4738, 4739, 474, 4740, 4741, 4742, 4743, 4744, 4745, 4746, 4747, 4748, 4749, 475, 4750, 4751, 4752, 4753, 4754, 4755, 4756, 4757, 4758, 4759, 476, 4760, 4761, 4762, 4763, 4764, 4765, 4766, 4767, 4768, 4769, 477, 4770, 4771, 4772, 4773, 4774, 4775, 4776, 4777, 4778, 4779, 478, 4780, 4781, 4782, 4783, 4784, 4785, 4786, 4787, 4788, 4789, 479, 4790, 4791, 4792, 4793, 4794, 4795, 4796, 4797, 4798, 4799, 48, 480, 4800, 4801, 4802, 4803, 4804, 4805, 4806, 4807, 4808, 4809, 481, 4810, 4811, 4812, 4813, 4814, 4815, 4816, 4817, 4818, 4819, 482, 4820, 4821, 4822, 4823, 4824, 4825, 4826, 4827, 4828, 4829, 483, 4830, 4831, 4832, 4833, 4834, 4835, 4836, 4837, 4838, 4839, 484, 4840, 4841, 4842, 4843, 4844, 4845, 4846, 4847, 4848, 4849, 485, 4850, 4851, 4852, 4853, 4854, 4855, 4856, 4857, 4858, 4859, 486, 4860, 4861, 4862, 4863, 4864, 4865, 4866, 4867, 4868, 4869, 487, 4870, 4871, 4872, 4873, 4874, 4875, 4876, 4877, 4878, 4879, 488, 4880, 4881, 4882, 4883, 4884, 4885, 4886, 4887, 4888, 4889, 489, 4890, 4891, 4892, 4893, 4894, 4895, 4896, 4897, 4898, 4899, 49, 490, 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 491, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, 4918, 4919, 492, 4920, 4921, 4922, 4923, 4924, 4925, 4926, 4927, 4928, 4929, 493, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 494, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 495, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 496, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 497, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 498, 4980, 4981, 4982, 4983, 4984, 4985, 4986, 4987, 4988, 4989, 499, 4990, 4991, 4992, 4993, 4994, 4995, 4996, 4997, 4998, 4999, 5, 50, 500, 5000, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 256) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 1023) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 4444) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 2501, 2502, 2503, 2504, 2505, 2506, 2507, 2508, 2509, 251, 2510, 2511, 2512, 2513, 2514, 2515, 2516, 2517, 2518, 2519, 252, 2520, 2521, 2522, 2523, 2524, 2525, 2526, 2527, 2528, 2529, 253, 2530, 2531, 2532, 2533, 2534, 2535, 2536, 2537, 2538, 2539, 254, 2540, 2541, 2542, 2543, 2544, 2545, 2546, 2547, 2548, 2549, 255, 2550, 2551, 2552, 2553, 2554, 2555, 2556, 2557, 2558, 2559, 256, 2560, 2561, 2562, 2563, 2564, 2565, 2566, 2567, 2568, 2569, 257, 2570, 2571, 2572, 2573, 2574, 2575, 2576, 2577, 2578, 2579, 258, 2580, 2581, 2582, 2583, 2584, 2585, 2586, 2587, 2588, 2589, 259, 2590, 2591, 2592, 2593, 2594, 2595, 2596, 2597, 2598, 2599, 26, 260, 2600, 2601, 2602, 2603, 2604, 2605, 2606, 2607, 2608, 2609, 261, 2610, 2611, 2612, 2613, 2614, 2615, 2616, 2617, 2618, 2619, 262, 2620, 2621, 2622, 2623, 2624, 2625, 2626, 2627, 2628, 2629, 263, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639, 264, 2640, 2641, 2642, 2643, 2644, 2645, 2646, 2647, 2648, 2649, 265, 2650, 2651, 2652, 2653, 2654, 2655, 2656, 2657, 2658, 2659, 266, 2660, 2661, 2662, 2663, 2664, 2665, 2666, 2667, 2668, 2669, 267, 2670, 2671, 2672, 2673, 2674, 2675, 2676, 2677, 2678, 2679, 268, 2680, 2681, 2682, 2683, 2684, 2685, 2686, 2687, 2688, 2689, 269, 2690, 2691, 2692, 2693, 2694, 2695, 2696, 2697, 2698, 2699, 27, 270, 2700, 2701, 2702, 2703, 2704, 2705, 2706, 2707, 2708, 2709, 271, 2710, 2711, 2712, 2713, 2714, 2715, 2716, 2717, 2718, 2719, 272, 2720, 2721, 2722, 2723, 2724, 2725, 2726, 2727, 2728, 2729, 273, 2730, 2731, 2732, 2733, 2734, 2735, 2736, 2737, 2738, 2739, 274, 2740, 2741, 2742, 2743, 2744, 2745, 2746, 2747, 2748, 2749, 275, 2750, 2751, 2752, 2753, 2754, 2755, 2756, 2757, 2758, 2759, 276, 2760, 2761, 2762, 2763, 2764, 2765, 2766, 2767, 2768, 2769, 277, 2770, 2771, 2772, 2773, 2774, 2775, 2776, 2777, 2778, 2779, 278, 2780, 2781, 2782, 2783, 2784, 2785, 2786, 2787, 2788, 2789, 279, 2790, 2791, 2792, 2793, 2794, 2795, 2796, 2797, 2798, 2799, 28, 280, 2800, 2801, 2802, 2803, 2804, 2805, 2806, 2807, 2808, 2809, 281, 2810, 2811, 2812, 2813, 2814, 2815, 2816, 2817, 2818, 2819, 282, 2820, 2821, 2822, 2823, 2824, 2825, 2826, 2827, 2828, 2829, 283, 2830, 2831, 2832, 2833, 2834, 2835, 2836, 2837, 2838, 2839, 284, 2840, 2841, 2842, 2843, 2844, 2845, 2846, 2847, 2848, 2849, 285, 2850, 2851, 2852, 2853, 2854, 2855, 2856, 2857, 2858, 2859, 286, 2860, 2861, 2862, 2863, 2864, 2865, 2866, 2867, 2868, 2869, 287, 2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 288, 2880, 2881, 2882, 2883, 2884, 2885, 2886, 2887, 2888, 2889, 289, 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, 29, 290, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908, 2909, 291, 2910, 2911, 2912, 2913, 2914, 2915, 2916, 2917, 2918, 2919, 292, 2920, 2921, 2922, 2923, 2924, 2925, 2926, 2927, 2928, 2929, 293, 2930, 2931, 2932, 2933, 2934, 2935, 2936, 2937, 2938, 2939, 294, 2940, 2941, 2942, 2943, 2944, 2945, 2946, 2947, 2948, 2949, 295, 2950, 2951, 2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 296, 2960, 2961, 2962, 2963, 2964, 2965, 2966, 2967, 2968, 2969, 297, 2970, 2971, 2972, 2973, 2974, 2975, 2976, 2977, 2978, 2979, 298, 2980, 2981, 2982, 2983, 2984, 2985, 2986, 2987, 2988, 2989, 299, 2990, 2991, 2992, 2993, 2994, 2995, 2996, 2997, 2998, 2999, 3, 30, 300, 3000, 3001, 3002, 3003, 3004, 3005, 3006, 3007, 3008, 3009, 301, 3010, 3011, 3012, 3013, 3014, 3015, 3016, 3017, 3018, 3019, 302, 3020, 3021, 3022, 3023, 3024, 3025, 3026, 3027, 3028, 3029, 303, 3030, 3031, 3032, 3033, 3034, 3035, 3036, 3037, 3038, 3039, 304, 3040, 3041, 3042, 3043, 3044, 3045, 3046, 3047, 3048, 3049, 305, 3050, 3051, 3052, 3053, 3054, 3055, 3056, 3057, 3058, 3059, 306, 3060, 3061, 3062, 3063, 3064, 3065, 3066, 3067, 3068, 3069, 307, 3070, 3071, 3072, 3073, 3074, 3075, 3076, 3077, 3078, 3079, 308, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087, 3088, 3089, 309, 3090, 3091, 3092, 3093, 3094, 3095, 3096, 3097, 3098, 3099, 31, 310, 3100, 3101, 3102, 3103, 3104, 3105, 3106, 3107, 3108, 3109, 311, 3110, 3111, 3112, 3113, 3114, 3115, 3116, 3117, 3118, 3119, 312, 3120, 3121, 3122, 3123, 3124, 3125, 3126, 3127, 3128, 3129, 313, 3130, 3131, 3132, 3133, 3134, 3135, 3136, 3137, 3138, 3139, 314, 3140, 3141, 3142, 3143, 3144, 3145, 3146, 3147, 3148, 3149, 315, 3150, 3151, 3152, 3153, 3154, 3155, 3156, 3157, 3158, 3159, 316, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3168, 3169, 317, 3170, 3171, 3172, 3173, 3174, 3175, 3176, 3177, 3178, 3179, 318, 3180, 3181, 3182, 3183, 3184, 3185, 3186, 3187, 3188, 3189, 319, 3190, 3191, 3192, 3193, 3194, 3195, 3196, 3197, 3198, 3199, 32, 320, 3200, 3201, 3202, 3203, 3204, 3205, 3206, 3207, 3208, 3209, 321, 3210, 3211, 3212, 3213, 3214, 3215, 3216, 3217, 3218, 3219, 322, 3220, 3221, 3222, 3223, 3224, 3225, 3226, 3227, 3228, 3229, 323, 3230, 3231, 3232, 3233, 3234, 3235, 3236, 3237, 3238, 3239, 324, 3240, 3241, 3242, 3243, 3244, 3245, 3246, 3247, 3248, 3249, 325, 3250, 3251, 3252, 3253, 3254, 3255, 3256, 3257, 3258, 3259, 326, 3260, 3261, 3262, 3263, 3264, 3265, 3266, 3267, 3268, 3269, 327, 3270, 3271, 3272, 3273, 3274, 3275, 3276, 3277, 3278, 3279, 328, 3280, 3281, 3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 329, 3290, 3291, 3292, 3293, 3294, 3295, 3296, 3297, 3298, 3299, 33, 330, 3300, 3301, 3302, 3303, 3304, 3305, 3306, 3307, 3308, 3309, 331, 3310, 3311, 3312, 3313, 3314, 3315, 3316, 3317, 3318, 3319, 332, 3320, 3321, 3322, 3323, 3324, 3325, 3326, 3327, 3328, 3329, 333, 3330, 3331, 3332, 3333, 3334, 3335, 3336, 3337, 3338, 3339, 334, 3340, 3341, 3342, 3343, 3344, 3345, 3346, 3347, 3348, 3349, 335, 3350, 3351, 3352, 3353, 3354, 3355, 3356, 3357, 3358, 3359, 336, 3360, 3361, 3362, 3363, 3364, 3365, 3366, 3367, 3368, 3369, 337, 3370, 3371, 3372, 3373, 3374, 3375, 3376, 3377, 3378, 3379, 338, 3380, 3381, 3382, 3383, 3384, 3385, 3386, 3387, 3388, 3389, 339, 3390, 3391, 3392, 3393, 3394, 3395, 3396, 3397, 3398, 3399, 34, 340, 3400, 3401, 3402, 3403, 3404, 3405, 3406, 3407, 3408, 3409, 341, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419, 342, 3420, 3421, 3422, 3423, 3424, 3425, 3426, 3427, 3428, 3429, 343, 3430, 3431, 3432, 3433, 3434, 3435, 3436, 3437, 3438, 3439, 344, 3440, 3441, 3442, 3443, 3444, 3445, 3446, 3447, 3448, 3449, 345, 3450, 3451, 3452, 3453, 3454, 3455, 3456, 3457, 3458, 3459, 346, 3460, 3461, 3462, 3463, 3464, 3465, 3466, 3467, 3468, 3469, 347, 3470, 3471, 3472, 3473, 3474, 3475, 3476, 3477, 3478, 3479, 348, 3480, 3481, 3482, 3483, 3484, 3485, 3486, 3487, 3488, 3489, 349, 3490, 3491, 3492, 3493, 3494, 3495, 3496, 3497, 3498, 3499, 35, 350, 3500, 3501, 3502, 3503, 3504, 3505, 3506, 3507, 3508, 3509, 351, 3510, 3511, 3512, 3513, 3514, 3515, 3516, 3517, 3518, 3519, 352, 3520, 3521, 3522, 3523, 3524, 3525, 3526, 3527, 3528, 3529, 353, 3530, 3531, 3532, 3533, 3534, 3535, 3536, 3537, 3538, 3539, 354, 3540, 3541, 3542, 3543, 3544, 3545, 3546, 3547, 3548, 3549, 355, 3550, 3551, 3552, 3553, 3554, 3555, 3556, 3557, 3558, 3559, 356, 3560, 3561, 3562, 3563, 3564, 3565, 3566, 3567, 3568, 3569, 357, 3570, 3571, 3572, 3573, 3574, 3575, 3576, 3577, 3578, 3579, 358, 3580, 3581, 3582, 3583, 3584, 3585, 3586, 3587, 3588, 3589, 359, 3590, 3591, 3592, 3593, 3594, 3595, 3596, 3597, 3598, 3599, 36, 360, 3600, 3601, 3602, 3603, 3604, 3605, 3606, 3607, 3608, 3609, 361, 3610, 3611, 3612, 3613, 3614, 3615, 3616, 3617, 3618, 3619, 362, 3620, 3621, 3622, 3623, 3624, 3625, 3626, 3627, 3628, 3629, 363, 3630, 3631, 3632, 3633, 3634, 3635, 3636, 3637, 3638, 3639, 364, 3640, 3641, 3642, 3643, 3644, 3645, 3646, 3647, 3648, 3649, 365, 3650, 3651, 3652, 3653, 3654, 3655, 3656, 3657, 3658, 3659, 366, 3660, 3661, 3662, 3663, 3664, 3665, 3666, 3667, 3668, 3669, 367, 3670, 3671, 3672, 3673, 3674, 3675, 3676, 3677, 3678, 3679, 368, 3680, 3681, 3682, 3683, 3684, 3685, 3686, 3687, 3688, 3689, 369, 3690, 3691, 3692, 3693, 3694, 3695, 3696, 3697, 3698, 3699, 37, 370, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707, 3708, 3709, 371, 3710, 3711, 3712, 3713, 3714, 3715, 3716, 3717, 3718, 3719, 372, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727, 3728, 3729, 373, 3730, 3731, 3732, 3733, 3734, 3735, 3736, 3737, 3738, 3739, 374, 3740, 3741, 3742, 3743, 3744, 3745, 3746, 3747, 3748, 3749, 375, 3750, 3751, 3752, 3753, 3754, 3755, 3756, 3757, 3758, 3759, 376, 3760, 3761, 3762, 3763, 3764, 3765, 3766, 3767, 3768, 3769, 377, 3770, 3771, 3772, 3773, 3774, 3775, 3776, 3777, 3778, 3779, 378, 3780, 3781, 3782, 3783, 3784, 3785, 3786, 3787, 3788, 3789, 379, 3790, 3791, 3792, 3793, 3794, 3795, 3796, 3797, 3798, 3799, 38, 380, 3800, 3801, 3802, 3803, 3804, 3805, 3806, 3807, 3808, 3809, 381, 3810, 3811, 3812, 3813, 3814, 3815, 3816, 3817, 3818, 3819, 382, 3820, 3821, 3822, 3823, 3824, 3825, 3826, 3827, 3828, 3829, 383, 3830, 3831, 3832, 3833, 3834, 3835, 3836, 3837, 3838, 3839, 384, 3840, 3841, 3842, 3843, 3844, 3845, 3846, 3847, 3848, 3849, 385, 3850, 3851, 3852, 3853, 3854, 3855, 3856, 3857, 3858, 3859, 386, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869, 387, 3870, 3871, 3872, 3873, 3874, 3875, 3876, 3877, 3878, 3879, 388, 3880, 3881, 3882, 3883, 3884, 3885, 3886, 3887, 3888, 3889, 389, 3890, 3891, 3892, 3893, 3894, 3895, 3896, 3897, 3898, 3899, 39, 390, 3900, 3901, 3902, 3903, 3904, 3905, 3906, 3907, 3908, 3909, 391, 3910, 3911, 3912, 3913, 3914, 3915, 3916, 3917, 3918, 3919, 392, 3920, 3921, 3922, 3923, 3924, 3925, 3926, 3927, 3928, 3929, 393, 3930, 3931, 3932, 3933, 3934, 3935, 3936, 3937, 3938, 3939, 394, 3940, 3941, 3942, 3943, 3944, 3945, 3946, 3947, 3948, 3949, 395, 3950, 3951, 3952, 3953, 3954, 3955, 3956, 3957, 3958, 3959, 396, 3960, 3961, 3962, 3963, 3964, 3965, 3966, 3967, 3968, 3969, 397, 3970, 3971, 3972, 3973, 3974, 3975, 3976, 3977, 3978, 3979, 398, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989, 399, 3990, 3991, 3992, 3993, 3994, 3995, 3996, 3997, 3998, 3999, 4, 40, 400, 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4009, 401, 4010, 4011, 4012, 4013, 4014, 4015, 4016, 4017, 4018, 4019, 402, 4020, 4021, 4022, 4023, 4024, 4025, 4026, 4027, 4028, 4029, 403, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 404, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048, 4049, 405, 4050, 4051, 4052, 4053, 4054, 4055, 4056, 4057, 4058, 4059, 406, 4060, 4061, 4062, 4063, 4064, 4065, 4066, 4067, 4068, 4069, 407, 4070, 4071, 4072, 4073, 4074, 4075, 4076, 4077, 4078, 4079, 408, 4080, 4081, 4082, 4083, 4084, 4085, 4086, 4087, 4088, 4089, 409, 4090, 4091, 4092, 4093, 4094, 4095, 4096, 4097, 4098, 4099, 41, 410, 4100, 4101, 4102, 4103, 4104, 4105, 4106, 4107, 4108, 4109, 411, 4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 412, 4120, 4121, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 413, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 414, 4140, 4141, 4142, 4143, 4144, 4145, 4146, 4147, 4148, 4149, 415, 4150, 4151, 4152, 4153, 4154, 4155, 4156, 4157, 4158, 4159, 416, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 417, 4170, 4171, 4172, 4173, 4174, 4175, 4176, 4177, 4178, 4179, 418, 4180, 4181, 4182, 4183, 4184, 4185, 4186, 4187, 4188, 4189, 419, 4190, 4191, 4192, 4193, 4194, 4195, 4196, 4197, 4198, 4199, 42, 420, 4200, 4201, 4202, 4203, 4204, 4205, 4206, 4207, 4208, 4209, 421, 4210, 4211, 4212, 4213, 4214, 4215, 4216, 4217, 4218, 4219, 422, 4220, 4221, 4222, 4223, 4224, 4225, 4226, 4227, 4228, 4229, 423, 4230, 4231, 4232, 4233, 4234, 4235, 4236, 4237, 4238, 4239, 424, 4240, 4241, 4242, 4243, 4244, 4245, 4246, 4247, 4248, 4249, 425, 4250, 4251, 4252, 4253, 4254, 4255, 4256, 4257, 4258, 4259, 426, 4260, 4261, 4262, 4263, 4264, 4265, 4266, 4267, 4268, 4269, 427, 4270, 4271, 4272, 4273, 4274, 4275, 4276, 4277, 4278, 4279, 428, 4280, 4281, 4282, 4283, 4284, 4285, 4286, 4287, 4288, 4289, 429, 4290, 4291, 4292, 4293, 4294, 4295, 4296, 4297, 4298, 4299, 43, 430, 4300, 4301, 4302, 4303, 4304, 4305, 4306, 4307, 4308, 4309, 431, 4310, 4311, 4312, 4313, 4314, 4315, 4316, 4317, 4318, 4319, 432, 4320, 4321, 4322, 4323, 4324, 4325, 4326, 4327, 4328, 4329, 433, 4330, 4331, 4332, 4333, 4334, 4335, 4336, 4337, 4338, 4339, 434, 4340, 4341, 4342, 4343, 4344, 4345, 4346, 4347, 4348, 4349, 435, 4350, 4351, 4352, 4353, 4354, 4355, 4356, 4357, 4358, 4359, 436, 4360, 4361, 4362, 4363, 4364, 4365, 4366, 4367, 4368, 4369, 437, 4370, 4371, 4372, 4373, 4374, 4375, 4376, 4377, 4378, 4379, 438, 4380, 4381, 4382, 4383, 4384, 4385, 4386, 4387, 4388, 4389, 439, 4390, 4391, 4392, 4393, 4394, 4395, 4396, 4397, 4398, 4399, 44, 440, 4400, 4401, 4402, 4403, 4404, 4405, 4406, 4407, 4408, 4409, 441, 4410, 4411, 4412, 4413, 4414, 4415, 4416, 4417, 4418, 4419, 442, 4420, 4421, 4422, 4423, 4424, 4425, 4426, 4427, 4428, 4429, 443, 4430, 4431, 4432, 4433, 4434, 4435, 4436, 4437, 4438, 4439, 444, 4440, 4441, 4442, 4443, 4444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 2222) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 2500) == [1, 10, 100, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 101, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 102, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 103, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 104, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 105, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 106, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 107, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 108, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 109, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 11, 110, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 111, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 112, 1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 113, 1130, 1131, 1132, 1133, 1134, 1135, 1136, 1137, 1138, 1139, 114, 1140, 1141, 1142, 1143, 1144, 1145, 1146, 1147, 1148, 1149, 115, 1150, 1151, 1152, 1153, 1154, 1155, 1156, 1157, 1158, 1159, 116, 1160, 1161, 1162, 1163, 1164, 1165, 1166, 1167, 1168, 1169, 117, 1170, 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 118, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188, 1189, 119, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 12, 120, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 121, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 122, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 123, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 124, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 125, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 1259, 126, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 127, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 128, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 129, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 13, 130, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 131, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 132, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 133, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 134, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 135, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 136, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 137, 1370, 1371, 1372, 1373, 1374, 1375, 1376, 1377, 1378, 1379, 138, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 139, 1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 14, 140, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409, 141, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 142, 1420, 1421, 1422, 1423, 1424, 1425, 1426, 1427, 1428, 1429, 143, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 144, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 145, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457, 1458, 1459, 146, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 147, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 148, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488, 1489, 149, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 15, 150, 1500, 1501, 1502, 1503, 1504, 1505, 1506, 1507, 1508, 1509, 151, 1510, 1511, 1512, 1513, 1514, 1515, 1516, 1517, 1518, 1519, 152, 1520, 1521, 1522, 1523, 1524, 1525, 1526, 1527, 1528, 1529, 153, 1530, 1531, 1532, 1533, 1534, 1535, 1536, 1537, 1538, 1539, 154, 1540, 1541, 1542, 1543, 1544, 1545, 1546, 1547, 1548, 1549, 155, 1550, 1551, 1552, 1553, 1554, 1555, 1556, 1557, 1558, 1559, 156, 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569, 157, 1570, 1571, 1572, 1573, 1574, 1575, 1576, 1577, 1578, 1579, 158, 1580, 1581, 1582, 1583, 1584, 1585, 1586, 1587, 1588, 1589, 159, 1590, 1591, 1592, 1593, 1594, 1595, 1596, 1597, 1598, 1599, 16, 160, 1600, 1601, 1602, 1603, 1604, 1605, 1606, 1607, 1608, 1609, 161, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1619, 162, 1620, 1621, 1622, 1623, 1624, 1625, 1626, 1627, 1628, 1629, 163, 1630, 1631, 1632, 1633, 1634, 1635, 1636, 1637, 1638, 1639, 164, 1640, 1641, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1649, 165, 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659, 166, 1660, 1661, 1662, 1663, 1664, 1665, 1666, 1667, 1668, 1669, 167, 1670, 1671, 1672, 1673, 1674, 1675, 1676, 1677, 1678, 1679, 168, 1680, 1681, 1682, 1683, 1684, 1685, 1686, 1687, 1688, 1689, 169, 1690, 1691, 1692, 1693, 1694, 1695, 1696, 1697, 1698, 1699, 17, 170, 1700, 1701, 1702, 1703, 1704, 1705, 1706, 1707, 1708, 1709, 171, 1710, 1711, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 172, 1720, 1721, 1722, 1723, 1724, 1725, 1726, 1727, 1728, 1729, 173, 1730, 1731, 1732, 1733, 1734, 1735, 1736, 1737, 1738, 1739, 174, 1740, 1741, 1742, 1743, 1744, 1745, 1746, 1747, 1748, 1749, 175, 1750, 1751, 1752, 1753, 1754, 1755, 1756, 1757, 1758, 1759, 176, 1760, 1761, 1762, 1763, 1764, 1765, 1766, 1767, 1768, 1769, 177, 1770, 1771, 1772, 1773, 1774, 1775, 1776, 1777, 1778, 1779, 178, 1780, 1781, 1782, 1783, 1784, 1785, 1786, 1787, 1788, 1789, 179, 1790, 1791, 1792, 1793, 1794, 1795, 1796, 1797, 1798, 1799, 18, 180, 1800, 1801, 1802, 1803, 1804, 1805, 1806, 1807, 1808, 1809, 181, 1810, 1811, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1819, 182, 1820, 1821, 1822, 1823, 1824, 1825, 1826, 1827, 1828, 1829, 183, 1830, 1831, 1832, 1833, 1834, 1835, 1836, 1837, 1838, 1839, 184, 1840, 1841, 1842, 1843, 1844, 1845, 1846, 1847, 1848, 1849, 185, 1850, 1851, 1852, 1853, 1854, 1855, 1856, 1857, 1858, 1859, 186, 1860, 1861, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 187, 1870, 1871, 1872, 1873, 1874, 1875, 1876, 1877, 1878, 1879, 188, 1880, 1881, 1882, 1883, 1884, 1885, 1886, 1887, 1888, 1889, 189, 1890, 1891, 1892, 1893, 1894, 1895, 1896, 1897, 1898, 1899, 19, 190, 1900, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 191, 1910, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 192, 1920, 1921, 1922, 1923, 1924, 1925, 1926, 1927, 1928, 1929, 193, 1930, 1931, 1932, 1933, 1934, 1935, 1936, 1937, 1938, 1939, 194, 1940, 1941, 1942, 1943, 1944, 1945, 1946, 1947, 1948, 1949, 195, 1950, 1951, 1952, 1953, 1954, 1955, 1956, 1957, 1958, 1959, 196, 1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969, 197, 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, 198, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 199, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2, 20, 200, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 201, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 202, 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, 203, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 204, 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, 205, 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, 206, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 207, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, 208, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 209, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, 21, 210, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 211, 2110, 2111, 2112, 2113, 2114, 2115, 2116, 2117, 2118, 2119, 212, 2120, 2121, 2122, 2123, 2124, 2125, 2126, 2127, 2128, 2129, 213, 2130, 2131, 2132, 2133, 2134, 2135, 2136, 2137, 2138, 2139, 214, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 215, 2150, 2151, 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2159, 216, 2160, 2161, 2162, 2163, 2164, 2165, 2166, 2167, 2168, 2169, 217, 2170, 2171, 2172, 2173, 2174, 2175, 2176, 2177, 2178, 2179, 218, 2180, 2181, 2182, 2183, 2184, 2185, 2186, 2187, 2188, 2189, 219, 2190, 2191, 2192, 2193, 2194, 2195, 2196, 2197, 2198, 2199, 22, 220, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 221, 2210, 2211, 2212, 2213, 2214, 2215, 2216, 2217, 2218, 2219, 222, 2220, 2221, 2222, 2223, 2224, 2225, 2226, 2227, 2228, 2229, 223, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 224, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 225, 2250, 2251, 2252, 2253, 2254, 2255, 2256, 2257, 2258, 2259, 226, 2260, 2261, 2262, 2263, 2264, 2265, 2266, 2267, 2268, 2269, 227, 2270, 2271, 2272, 2273, 2274, 2275, 2276, 2277, 2278, 2279, 228, 2280, 2281, 2282, 2283, 2284, 2285, 2286, 2287, 2288, 2289, 229, 2290, 2291, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 23, 230, 2300, 2301, 2302, 2303, 2304, 2305, 2306, 2307, 2308, 2309, 231, 2310, 2311, 2312, 2313, 2314, 2315, 2316, 2317, 2318, 2319, 232, 2320, 2321, 2322, 2323, 2324, 2325, 2326, 2327, 2328, 2329, 233, 2330, 2331, 2332, 2333, 2334, 2335, 2336, 2337, 2338, 2339, 234, 2340, 2341, 2342, 2343, 2344, 2345, 2346, 2347, 2348, 2349, 235, 2350, 2351, 2352, 2353, 2354, 2355, 2356, 2357, 2358, 2359, 236, 2360, 2361, 2362, 2363, 2364, 2365, 2366, 2367, 2368, 2369, 237, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, 238, 2380, 2381, 2382, 2383, 2384, 2385, 2386, 2387, 2388, 2389, 239, 2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398, 2399, 24, 240, 2400, 2401, 2402, 2403, 2404, 2405, 2406, 2407, 2408, 2409, 241, 2410, 2411, 2412, 2413, 2414, 2415, 2416, 2417, 2418, 2419, 242, 2420, 2421, 2422, 2423, 2424, 2425, 2426, 2427, 2428, 2429, 243, 2430, 2431, 2432, 2433, 2434, 2435, 2436, 2437, 2438, 2439, 244, 2440, 2441, 2442, 2443, 2444, 2445, 2446, 2447, 2448, 2449, 245, 2450, 2451, 2452, 2453, 2454, 2455, 2456, 2457, 2458, 2459, 246, 2460, 2461, 2462, 2463, 2464, 2465, 2466, 2467, 2468, 2469, 247, 2470, 2471, 2472, 2473, 2474, 2475, 2476, 2477, 2478, 2479, 248, 2480, 2481, 2482, 2483, 2484, 2485, 2486, 2487, 2488, 2489, 249, 2490, 2491, 2492, 2493, 2494, 2495, 2496, 2497, 2498, 2499, 25, 250, 2500, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 51, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 52, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 53, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 54, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 55, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 56, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 57, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 58, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 59, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 6, 60, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 61, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 62, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 63, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 64, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 65, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 66, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 67, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 68, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 69, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 7, 70, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 71, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 72, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 73, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 74, 740, 741, 742, 743, 744, 745, 746, 747, 748, 749, 75, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 76, 760, 761, 762, 763, 764, 765, 766, 767, 768, 769, 77, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 78, 780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 79, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 8, 80, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 81, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 82, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 83, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 84, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 85, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859, 86, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 87, 870, 871, 872, 873, 874, 875, 876, 877, 878, 879, 88, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 89, 890, 891, 892, 893, 894, 895, 896, 897, 898, 899, 9, 90, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 91, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 92, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 93, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 94, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 95, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 96, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 97, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 98, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 99, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999]\n assert candidate(n = 200) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 109) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 199) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n assert candidate(n = 500) == [1, 10, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 11, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 12, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 13, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 14, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 15, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 16, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 17, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 18, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 19, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 2, 20, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 21, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 22, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 23, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 24, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 25, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 26, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 27, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 28, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 29, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 3, 30, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 31, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 32, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 33, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 34, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 35, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 36, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 37, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 38, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 39, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 4, 40, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 41, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 42, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 43, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 44, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 45, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 46, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 47, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 48, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 49, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 5, 50, 500, 51, 52, 53, 54, 55, 56, 57, 58, 59, 6, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 7, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 8, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 9, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99]\n", "comparison": "exact"}, "public_tests": ["13", "2"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().lexicalOrder", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:31+00:00", "tests_total": 37, "tests_dropped": 0, "flags": [], "topic_tags": ["depth-first-search", "trie"]}, "language": "ruby", "interface": {"raw_signature": "def lexical_order(n)", "container": null, "callable": "lexical_order", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 387, "task_id": "first-unique-character-in-a-string", "difficulty": "Easy", "problem_description": "Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.\n\nExample 1:\n\nInput: s = \"leetcode\"\nOutput: 0\nExplanation:\nThe character 'l' at index 0 is the first character that does not occur at any other index.\n\nExample 2:\n\nInput: s = \"loveleetcode\"\nOutput: 2\n\nExample 3:\n\nInput: s = \"aabb\"\nOutput: -1\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s consists of only lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"aabbbccccddeeeeeffffffgggggghhhhhhiiiiiiiijjjjjjjjjkkkkkkkkkkklllllllllllllmmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnooooooooollllllllllllllllmmmmmmmmmmmmmmmmmnnnnnnnnnnnnnnnnnp\") == 165\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == 0\n assert candidate(s = \"abcdef\") == 0\n assert candidate(s = \"aabbccddee\") == -1\n assert candidate(s = \"a\") == 0\n assert candidate(s = \"abacabadabacaba\") == 7\n assert candidate(s = \"abcdabcde\") == 8\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == -1\n assert candidate(s = \"swiss\") == 1\n assert candidate(s = \"abacabadabc\") == 7\n assert candidate(s = \"repetition\") == 0\n assert candidate(s = \"zzz\") == -1\n assert candidate(s = \"aabbccddeeffg\") == 12\n assert candidate(s = \"leetcode\") == 0\n assert candidate(s = \"aabb\") == -1\n assert candidate(s = \"loveleetcode\") == 2\n assert candidate(s = \"abcdabcdf\") == 8\n assert candidate(s = \"xyzxyzxyzxyzxyzxyzxyzxyzxyzxyz\") == -1\n assert candidate(s = \"development\") == 0\n assert candidate(s = \"aabbcceeff\") == -1\n assert candidate(s = \"zzyyxxwwvvuuttrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == -1\n assert candidate(s = \"algorithm\") == 0\n assert candidate(s = \"unique\") == 1\n assert candidate(s = \"z\") == 0\n assert candidate(s = \"abbacd\") == 4\n assert candidate(s = \"aabbcceeffgghhiijjklmnopqrstuvwxyz\") == 18\n assert candidate(s = \"character\") == 1\n assert candidate(s = \"bba\") == 2\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == 0\n assert candidate(s = \"abcdefg\") == 0\n assert candidate(s = \"thisisjustafancysentence\") == 1\n assert candidate(s = \"almostunique\") == 0\n assert candidate(s = \"repetitionsofletters\") == 2\n assert candidate(s = \"abacabadabacabadabacabad\") == -1\n assert candidate(s = \"xyzzyzxyz\") == -1\n assert candidate(s = \"almosteverycharacterisunique\") == 1\n assert candidate(s = \"uniquecharactersarecool\") == 1\n assert candidate(s = \"abcdedcba\") == 4\n assert candidate(s = \"verylongstringwithmanyanonymouscharacterssssssssssssssssssssssss\") == 0\n assert candidate(s = \"uniqueidentifier\") == 3\n assert candidate(s = \"abracadabra\") == 4\n assert candidate(s = \"allcharactersrepeatmorethanonce\") == 12\n assert candidate(s = \"abacabadabacabadabacabadabacabadabacabadabacabadabacabadabacabadabacabadabacabadabacabadabacabadabacabad\") == -1\n assert candidate(s = \"xylophone\") == 0\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == -1\n assert candidate(s = \"unrepeatedcharacterstring\") == 0\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzyxwvutsrqponmlkjihgfedcba\") == -1\n assert candidate(s = \"bbaaccddeeffgghhiijjkkllmmnnoopqrrssttuuvvwwxxyyzz\") == 30\n assert candidate(s = \"zzzzzyyyyxxxxwwvvvttrrssqqppoonnmmlkkjjiihhggffeedcba\") == 34\n assert candidate(s = \"thisisaverylongstringwithnomanynonrepeatingcharacters\") == 7\n assert candidate(s = \"xyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 0\n assert candidate(s = \"firstuniquicharacter\") == 0\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz\") == 50\n assert candidate(s = \"nocharactersrepeat\") == 0\n assert candidate(s = \"wovwovwov\") == -1\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == -1\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == -1\n assert candidate(s = \"abcdefghijabcdefghijabcdefghij\") == -1\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzz\") == -1\n assert candidate(s = \"aabbaaccddeeffaabbccddeeffaabbccddeeff\") == -1\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwooxxyyzz\") == -1\n assert candidate(s = \"banana\") == 0\n assert candidate(s = \"thisisaverylongstringwithseveralcharacters\") == 10\n assert candidate(s = \"aaaaabbbbbcccccdddddeeeeefffffggggghhhhiiiiijjjjkkkkklllllmmmmmnnnnnooooo\") == -1\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwxyzz\") == 44\n assert candidate(s = \"s\") == 0\n assert candidate(s = \"swissknife\") == 1\n assert candidate(s = \"abacaxabacayabacaza\") == 5\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwxyz\") == 44\n assert candidate(s = \"thisproblemhasaveryunusalcharacterdistribution\") == 4\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzzzzzz\") == -1\n assert candidate(s = \"aabbcdeef\") == 4\n assert candidate(s = \"aabbcdeeffgg\") == 4\n assert candidate(s = \"abcdefghijhgfedcba\") == 8\n assert candidate(s = \"single\") == 0\n assert candidate(s = \"uniquecharacter\") == 1\n assert candidate(s = \"mississippi\") == 0\n assert candidate(s = \"hashmapimplementation\") == 2\n assert candidate(s = \"abcdabcdbacd\") == -1\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == -1\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == -1\n assert candidate(s = \"supercalifragilisticexpialidocious\") == 9\n assert candidate(s = \"firstnonrepeatingcharacter\") == 0\n assert candidate(s = \"zzzzyyyyyxxxxxwwwwvvvvuuuuttttssssrrrrqqqqpppooooonnnnmmmmllllkkkkjjjjiiiihhhhggggffffeeeeddddccccbbbbaaaa\") == -1\n assert candidate(s = \"onlyonecharacterrepeats\") == 2\n assert candidate(s = \"ababababababababababababababababababab\") == -1\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwooxxyyzzzz\") == -1\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\") == 3\n assert candidate(s = \"bbaaccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzza\") == -1\n assert candidate(s = \"almostuniquecharacter\") == 1\n", "comparison": "exact"}, "public_tests": ["\"leetcode\"", "\"loveleetcode\"", "\"aabb\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().firstUniqChar", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:33+00:00", "tests_total": 91, "tests_dropped": 1, "flags": [], "topic_tags": ["hash-table", "string", "queue", "counting"]}, "language": "ruby", "interface": {"raw_signature": "def first_uniq_char(s)", "container": null, "callable": "first_uniq_char", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 389, "task_id": "find-the-difference", "difficulty": "Easy", "problem_description": "You are given two strings s and t.\n\nString t is generated by random shuffling string s and then add one more letter at a random position.\n\nReturn the letter that was added to t.\n\nExample 1:\n\nInput: s = \"abcd\", t = \"abcde\"\nOutput: \"e\"\nExplanation: 'e' is the letter that was added.\n\nExample 2:\n\nInput: s = \"\", t = \"y\"\nOutput: \"y\"\n\nConstraints:\n\n- 0 <= s.length <= 1000\n- t.length == s.length + 1\n- s and t consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcd\",t = \"abcde\") == \"e\"\n assert candidate(s = \"aeiou\",t = \"aeiouf\") == \"f\"\n assert candidate(s = \"abcdxyz\",t = \"abcdzyxw\") == \"w\"\n assert candidate(s = \"a\",t = \"ab\") == \"b\"\n assert candidate(s = \"xyz\",t = \"zyxw\") == \"w\"\n assert candidate(s = \"\",t = \"y\") == \"y\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyza\") == \"a\"\n assert candidate(s = \"hello\",t = \"helloa\") == \"a\"\n assert candidate(s = \"hello\",t = \"hleloa\") == \"a\"\n assert candidate(s = \"aeiou\",t = \"aeiozu\") == \"z\"\n assert candidate(s = \"ae\",t = \"aea\") == \"a\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyzp\") == \"p\"\n assert candidate(s = \"thisisaverylongstringfortesting\",t = \"thisisaverylongstringfortestingz\") == \"z\"\n assert candidate(s = \"thisisaverylongstringwithalotofcharacters\",t = \"thisisaverylongstringwithalotofcharactersz\") == \"z\"\n assert candidate(s = \"almostsame\",t = \"almostsamee\") == \"e\"\n assert candidate(s = \"abcdabcdabcdabcdabcdabcd\",t = \"abcdabcdabcdabcdabcdabcde\") == \"e\"\n assert candidate(s = \"sameletters\",t = \"samesletters\") == \"s\"\n assert candidate(s = \"mississippi\",t = \"mississippix\") == \"x\"\n assert candidate(s = \"thisisaverylongstringthatcontainsavarietyofcharacters\",t = \"thisisaverylongstringthatcontainsavarietyofcharactorst\") == \"o\"\n assert candidate(s = \"mississippi\",t = \"mississippiw\") == \"w\"\n assert candidate(s = \"samechar\",t = \"samechars\") == \"s\"\n assert candidate(s = \"quickbrownfoxjumps\",t = \"quickbrownfoxjumpsl\") == \"l\"\n assert candidate(s = \"pythonprogramming\",t = \"pythonprogrammingz\") == \"z\"\n assert candidate(s = \"singlecharacter\",t = \"singlecharacterr\") == \"r\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzj\") == \"j\"\n assert candidate(s = \"abcdabcdabcd\",t = \"abcdabcdabcdd\") == \"d\"\n assert candidate(s = \"uniqueletters\",t = \"uniquelettersx\") == \"x\"\n assert candidate(s = \"xyzzzxyzzz\",t = \"xyzzzxyzzzx\") == \"x\"\n assert candidate(s = \"alibabacloud\",t = \"alibabacloudu\") == \"u\"\n assert candidate(s = \"xyxzyzy\",t = \"xyxzyzyz\") == \"z\"\n assert candidate(s = \"abcdabcdabcd\",t = \"abcdabcdabcdx\") == \"x\"\n assert candidate(s = \"different\",t = \"differenti\") == \"i\"\n assert candidate(s = \"finding\",t = \"findinwg\") == \"w\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"z\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzx\") == \"x\"\n assert candidate(s = \"onemore\",t = \"onemroem\") == \"m\"\n assert candidate(s = \"hellothereeveryone\",t = \"hellothereeveryonex\") == \"x\"\n assert candidate(s = \"mississippi\",t = \"mississippip\") == \"p\"\n assert candidate(s = \"pneumonoultramicroscopicsilicovolcanoconiosis\",t = \"pneumonoultramicroscopicsilicovolcanoconiosisp\") == \"p\"\n assert candidate(s = \"quickbrownfoxjumpsoverthelazydog\",t = \"quickbrownfoxjumpsoverthelazydogg\") == \"g\"\n assert candidate(s = \"hellothisisanexample\",t = \"thisisanexamplehelloo\") == \"o\"\n assert candidate(s = \"abracadabra\",t = \"abracadabrak\") == \"k\"\n assert candidate(s = \"pythonprogramming\",t = \"pythonprogrammings\") == \"s\"\n assert candidate(s = \"mamamamamamama\",t = \"mmamamamamamama\") == \"m\"\n assert candidate(s = \"repeatedcharactershhhhh\",t = \"repeatedcharactershhhhha\") == \"a\"\n assert candidate(s = \"abcdabcdabcd\",t = \"abcdabcdabcde\") == \"e\"\n assert candidate(s = \"abcdabcd\",t = \"abcdabcde\") == \"e\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzaaa\",t = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzaaab\") == \"b\"\n assert candidate(s = \"uniquecharacters\",t = \"uniquecharactersn\") == \"n\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",t = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"z\"\n assert candidate(s = \"qwertypoiuytrewq\",t = \"qwertypoiuytrewqa\") == \"a\"\n assert candidate(s = \"abcdefghijklnmopqrstuvwxyz\",t = \"zyxwvutsrqponmlkjihgfedcbaq\") == \"q\"\n assert candidate(s = \"samecharacters\",t = \"samecharactersc\") == \"c\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzz\") == \"z\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyzq\") == \"q\"\n assert candidate(s = \"short\",t = \"shorrt\") == \"r\"\n assert candidate(s = \"quickbrownfoxjumpsoverthelazydog\",t = \"quickbrownfoxjumpsoverthelazydogq\") == \"q\"\n assert candidate(s = \"onetwothree\",t = \"onetwothreef\") == \"f\"\n assert candidate(s = \"hellothere\",t = \"hellotherex\") == \"x\"\n assert candidate(s = \"uniqueletter\",t = \"uniqueletteru\") == \"u\"\n assert candidate(s = \"uniqueletters\",t = \"enuiqueletters\") == \"e\"\n assert candidate(s = \"thisisalongstring\",t = \"thisisalongstringx\") == \"x\"\n assert candidate(s = \"nogapsbetweenletters\",t = \"nogapsbetweenlettersn\") == \"n\"\n assert candidate(s = \"abcdefg\",t = \"gfedcbaa\") == \"a\"\n assert candidate(s = \"repeated\",t = \"repeatedr\") == \"r\"\n assert candidate(s = \"pythonprogramming\",t = \"pythonprogrammingg\") == \"g\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",t = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzb\") == \"b\"\n assert candidate(s = \"balloon\",t = \"ooblaanl\") == \"a\"\n assert candidate(s = \"randomstring\",t = \"randomstrings\") == \"s\"\n assert candidate(s = \"uniqueletters\",t = \"uniqueletterst\") == \"t\"\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",t = \"thequickbrownfoxjumpsoverthelazydoga\") == \"a\"\n assert candidate(s = \"xyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxz\",t = \"xyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzj\") == \"j\"\n assert candidate(s = \"quickbrownfoxjumpsoverthelazydog\",t = \"quickbrownfoxjumpsoverthelazydogm\") == \"m\"\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",t = \"thequickbrownfoxjumpsoverthelazydogp\") == \"p\"\n assert candidate(s = \"xyzz\",t = \"xyzzz\") == \"z\"\n assert candidate(s = \"repeatedlettersinthisstring\",t = \"repeatedlettersinthisstringi\") == \"i\"\n assert candidate(s = \"aaaabbbbccccddddeee\",t = \"aaaabbbbccccddddeeef\") == \"f\"\n assert candidate(s = \"zzzzzzzzzz\",t = \"zzzzzzzzzzz\") == \"z\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyzz\") == \"z\"\n assert candidate(s = \"thesameletterrepeatedseveraltime\",t = \"thesameletterrepeatedseveraltimee\") == \"e\"\n assert candidate(s = \"duplicatecharacters\",t = \"duplicatecharacterst\") == \"t\"\n assert candidate(s = \"complexinputwithdifferentcharacters\",t = \"complexinputwithdifferentcharactersg\") == \"g\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",t = \"abcdefghijklmnopqrstuvwxyzx\") == \"x\"\n assert candidate(s = \"pythonprogramming\",t = \"pythonprogrammingo\") == \"o\"\n assert candidate(s = \"xyzz\",t = \"xyzzy\") == \"y\"\n", "comparison": "exact"}, "public_tests": ["\"abcd\"\n\"abcde\"", "\"\"\n\"y\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().findTheDifference", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:38+00:00", "tests_total": 96, "tests_dropped": 11, "flags": [], "topic_tags": ["hash-table", "string", "bit-manipulation", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_the_difference(s, t)", "container": null, "callable": "find_the_difference", "parameters": [{"name": "s", "type": "String"}, {"name": "t", "type": "String"}], "return_type": "Character", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 390, "task_id": "elimination-game", "difficulty": "Medium", "problem_description": "You have a list arr of all integers in the range [1, n] sorted in a strictly increasing order. Apply the following algorithm on arr:\n\n- Starting from left to right, remove the first number and every other number afterward until you reach the end of the list.\n- Repeat the previous step again, but this time from right to left, remove the rightmost number and every other number from the remaining numbers.\n- Keep repeating the steps again, alternating left to right and right to left, until a single number remains.\n\nGiven the integer n, return the last number that remains in arr.\n\nExample 1:\n\nInput: n = 9\nOutput: 6\nExplanation:\narr = [1, 2, 3, 4, 5, 6, 7, 8, 9]\narr = [2, 4, 6, 8]\narr = [2, 6]\narr = [6]\n\nExample 2:\n\nInput: n = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= n <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 11) == 8\n assert candidate(n = 100) == 54\n assert candidate(n = 9) == 6\n assert candidate(n = 1000000) == 481110\n assert candidate(n = 2) == 2\n assert candidate(n = 20) == 6\n assert candidate(n = 1) == 1\n assert candidate(n = 1000000000) == 534765398\n assert candidate(n = 1000) == 510\n assert candidate(n = 10) == 8\n assert candidate(n = 25) == 14\n assert candidate(n = 244140) == 130558\n assert candidate(n = 15258) == 8160\n assert candidate(n = 3) == 2\n assert candidate(n = 3814) == 2040\n assert candidate(n = 119) == 56\n assert candidate(n = 29) == 14\n assert candidate(n = 999999999) == 534765056\n assert candidate(n = 12345) == 5502\n assert candidate(n = 4096) == 1366\n assert candidate(n = 976562) == 522232\n assert candidate(n = 1953125) == 908662\n assert candidate(n = 50) == 24\n assert candidate(n = 2047) == 1024\n assert candidate(n = 16383) == 8192\n assert candidate(n = 5) == 2\n assert candidate(n = 10001) == 5974\n assert candidate(n = 16384) == 5462\n assert candidate(n = 59) == 32\n assert candidate(n = 250000000) == 133691350\n assert candidate(n = 238) == 128\n assert candidate(n = 4) == 2\n assert candidate(n = 125000000) == 58154326\n assert candidate(n = 10000) == 5974\n assert candidate(n = 1001) == 510\n assert candidate(n = 15625000) == 8355710\n assert candidate(n = 7812500) == 3634646\n assert candidate(n = 62500000) == 33422838\n assert candidate(n = 122070) == 56792\n assert candidate(n = 50000000) == 33551830\n assert candidate(n = 128) == 86\n assert candidate(n = 1024) == 342\n assert candidate(n = 101) == 54\n assert candidate(n = 10000000) == 6150102\n assert candidate(n = 61035) == 32640\n assert candidate(n = 100000) == 55286\n assert candidate(n = 2048) == 1366\n assert candidate(n = 1048576) == 349526\n assert candidate(n = 999) == 504\n assert candidate(n = 953) == 510\n assert candidate(n = 3906250) == 2088928\n assert candidate(n = 8192) == 5462\n assert candidate(n = 30517) == 14198\n assert candidate(n = 65536) == 21846\n assert candidate(n = 5000) == 2014\n assert candidate(n = 7629) == 3550\n assert candidate(n = 256) == 86\n assert candidate(n = 1023) == 512\n assert candidate(n = 9999) == 5984\n assert candidate(n = 31250000) == 14538582\n assert candidate(n = 476) == 222\n assert candidate(n = 127) == 64\n assert candidate(n = 987654321) == 534740470\n assert candidate(n = 5000000) == 1924950\n assert candidate(n = 500000) == 259446\n assert candidate(n = 488281) == 227166\n assert candidate(n = 98765) == 54750\n assert candidate(n = 500000000) == 232617302\n assert candidate(n = 31) == 16\n assert candidate(n = 1000001) == 481110\n assert candidate(n = 14) == 8\n assert candidate(n = 512) == 342\n assert candidate(n = 999999) == 481152\n assert candidate(n = 123456) == 63318\n assert candidate(n = 500) == 246\n assert candidate(n = 1907) == 888\n assert candidate(n = 7) == 4\n", "comparison": "exact"}, "public_tests": ["9", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().lastRemaining", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:41+00:00", "tests_total": 78, "tests_dropped": 1, "flags": [], "topic_tags": ["math", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def last_remaining(n)", "container": null, "callable": "last_remaining", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 391, "task_id": "perfect-rectangle", "difficulty": "Hard", "problem_description": "Given an array rectangles where rectangles[i] = [x_i, y_i, a_i, b_i] represents an axis-aligned rectangle. The bottom-left point of the rectangle is (x_i, y_i) and the top-right point of it is (a_i, b_i).\n\nReturn true if all the rectangles together form an exact cover of a rectangular region.\n\nExample 1:\n\nInput: rectangles = [[1,1,3,3],[3,1,4,2],[3,2,4,4],[1,3,2,4],[2,3,3,4]]\nOutput: true\nExplanation: All 5 rectangles together form an exact cover of a rectangular region.\n\nExample 2:\n\nInput: rectangles = [[1,1,2,3],[1,3,2,4],[3,1,4,2],[3,2,4,4]]\nOutput: false\nExplanation: Because there is a gap between the two rectangular regions.\n\nExample 3:\n\nInput: rectangles = [[1,1,3,3],[3,1,4,2],[1,3,2,4],[2,2,4,4]]\nOutput: false\nExplanation: Because two of the rectangles overlap with each other.\n\nConstraints:\n\n- 1 <= rectangles.length <= 2 * 10^4\n- rectangles[i].length == 4\n- -10^5 <= x_i < a_i <= 10^5\n- -10^5 <= y_i < b_i <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(rectangles = [[0, 0, 2, 2], [0, 2, 2, 4], [2, 0, 4, 2], [2, 2, 4, 4]]) == True\n assert candidate(rectangles = [[0, 0, 1, 1], [0, 1, 3, 2], [1, 0, 2, 2]]) == False\n assert candidate(rectangles = [[1, 1, 3, 3], [3, 1, 4, 2], [3, 2, 4, 4], [1, 3, 2, 4], [2, 3, 3, 4]]) == True\n assert candidate(rectangles = [[0, 0, 2, 2], [2, 2, 4, 4], [2, 0, 4, 2]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [2, 2, 4, 4]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [2, 0, 4, 2], [0, 2, 2, 4], [2, 2, 4, 4]]) == True\n assert candidate(rectangles = [[1, 1, 2, 3], [1, 3, 2, 4], [3, 1, 4, 2], [3, 2, 4, 4]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]]) == True\n assert candidate(rectangles = [[1, 1, 3, 3], [3, 1, 4, 2], [1, 3, 2, 4], [2, 2, 4, 4]]) == False\n assert candidate(rectangles = [[1, 1, 3, 3], [2, 2, 4, 4], [3, 3, 5, 5], [4, 4, 6, 6], [5, 5, 7, 7], [6, 6, 8, 8], [7, 7, 9, 9], [8, 8, 10, 10]]) == False\n assert candidate(rectangles = [[-1, -1, 0, 0], [0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4]]) == False\n assert candidate(rectangles = [[0, 0, 5, 5], [5, 0, 10, 5], [0, 5, 5, 10], [5, 5, 10, 10], [2, 2, 3, 3]]) == False\n assert candidate(rectangles = [[1, 1, 5, 5], [2, 2, 3, 3], [3, 2, 4, 3], [2, 3, 3, 4], [3, 3, 4, 4]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3], [0, 3, 1, 4], [1, 0, 2, 1], [1, 1, 2, 2], [1, 2, 2, 3], [1, 3, 2, 4], [2, 0, 3, 1], [2, 1, 3, 2], [2, 2, 3, 3], [2, 3, 3, 4], [0, 4, 3, 5]]) == True\n assert candidate(rectangles = [[0, 0, 3, 3], [1, 1, 4, 4], [2, 2, 5, 5], [3, 3, 6, 6], [4, 4, 7, 7], [5, 5, 8, 8], [6, 6, 9, 9], [7, 7, 10, 10]]) == False\n assert candidate(rectangles = [[1, 1, 11, 11], [2, 2, 10, 10], [3, 3, 9, 9], [4, 4, 8, 8], [5, 5, 7, 7], [6, 6, 7, 7], [6, 6, 7, 7], [7, 7, 8, 8]]) == False\n assert candidate(rectangles = [[-1, -1, 0, 0], [0, 0, 1, 1], [1, 1, 2, 2], [0, -1, 1, 0]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [0, 1, 1, 2], [1, 0, 2, 1], [1, 1, 2, 2], [1, 2, 2, 3], [2, 1, 3, 2]]) == False\n assert candidate(rectangles = [[-10, -10, 10, 10], [0, 0, 5, 5], [5, 5, 10, 10], [-10, 0, -5, 5], [-5, 0, 0, 5]]) == False\n assert candidate(rectangles = [[1, 1, 10, 10], [2, 2, 8, 8], [3, 3, 7, 7], [4, 4, 6, 6], [1, 5, 5, 10], [5, 1, 10, 5]]) == False\n assert candidate(rectangles = [[0, 0, 1, 2], [1, 0, 2, 1], [1, 1, 2, 2], [2, 0, 3, 2], [3, 0, 4, 2], [0, 2, 4, 3]]) == True\n assert candidate(rectangles = [[1, 1, 4, 4], [2, 2, 3, 3], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4], [2, 2, 4, 4]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2], [0, 2, 1, 3], [1, 2, 2, 3], [2, 2, 3, 3]]) == True\n assert candidate(rectangles = [[0, 0, 10, 10], [1, 1, 3, 3], [3, 1, 5, 3], [5, 1, 7, 3], [7, 1, 9, 3], [1, 3, 3, 5], [3, 3, 5, 5], [5, 3, 7, 5], [7, 3, 9, 5], [1, 5, 3, 7], [3, 5, 5, 7], [5, 5, 7, 7], [7, 5, 9, 7], [1, 7, 3, 9], [3, 7, 5, 9], [5, 7, 7, 9], [7, 7, 9, 9]]) == False\n assert candidate(rectangles = [[-10, -10, -5, -5], [-5, -5, 0, 0], [0, 0, 5, 5], [5, 5, 10, 10], [-10, 0, -5, 5], [-5, 0, 0, 5], [0, 0, 5, 10], [5, 0, 10, 10], [-10, 5, -5, 10], [-5, 5, 0, 10], [0, 5, 5, 15], [5, 5, 10, 15]]) == False\n assert candidate(rectangles = [[0, 0, 6, 6], [1, 1, 5, 5], [2, 2, 4, 4], [3, 3, 5, 5], [1, 2, 5, 3], [2, 1, 4, 5], [2, 3, 5, 4]]) == False\n assert candidate(rectangles = [[1, 1, 3, 3], [3, 1, 5, 3], [1, 3, 5, 5], [3, 3, 5, 5]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [0, 2, 2, 4], [0, 4, 2, 6], [2, 0, 4, 2], [2, 2, 4, 4], [2, 4, 4, 6]]) == True\n assert candidate(rectangles = [[-2, -2, 0, 0], [0, 0, 2, 2], [2, 2, 4, 4], [-2, 2, 0, 4], [0, -2, 2, 0], [2, -2, 4, 0]]) == False\n assert candidate(rectangles = [[-100000, -100000, 100000, 100000]]) == True\n assert candidate(rectangles = [[0, 0, 3, 3], [1, 1, 2, 2], [0, 0, 4, 4], [3, 3, 5, 5]]) == False\n assert candidate(rectangles = [[1, 1, 3, 3], [1, 3, 3, 5], [3, 1, 5, 3], [3, 3, 5, 5], [2, 2, 4, 4]]) == False\n assert candidate(rectangles = [[-2, -2, 3, 3], [1, 1, 4, 4], [0, 0, 1, 1], [3, 3, 4, 4], [2, 2, 3, 3]]) == False\n assert candidate(rectangles = [[1, 1, 3, 3], [3, 1, 5, 3], [1, 3, 3, 5], [3, 3, 5, 5], [1, 1, 5, 5]]) == False\n assert candidate(rectangles = [[1, 1, 4, 4], [2, 2, 3, 3], [5, 5, 8, 8], [6, 6, 7, 7], [1, 5, 4, 8], [5, 1, 8, 4], [2, 6, 3, 7], [6, 2, 7, 3]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 2, 2], [0, 0, 2, 2]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [0, 2, 2, 4], [2, 0, 4, 2], [2, 2, 4, 4], [0, 4, 2, 6], [2, 4, 4, 6], [0, 6, 4, 8]]) == True\n assert candidate(rectangles = [[-100000, -100000, 100000, 100000], [0, 0, 1, 1]]) == False\n assert candidate(rectangles = [[-1, -1, 1, 1], [-1, 1, 1, 3], [1, -1, 3, 1], [1, 1, 3, 3]]) == True\n assert candidate(rectangles = [[0, 0, 5, 5], [1, 1, 2, 2], [3, 3, 4, 4], [2, 2, 3, 3], [0, 4, 5, 5], [4, 0, 5, 4]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [0, 1, 1, 2], [1, 1, 2, 2], [2, 1, 3, 2], [0, 2, 1, 3], [1, 2, 2, 3], [2, 2, 3, 3], [0, 0, 3, 3]]) == False\n assert candidate(rectangles = [[0, 0, 5, 5], [1, 1, 4, 4], [2, 2, 3, 3], [0, 5, 5, 6], [5, 0, 6, 5]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2], [0, 2, 1, 3], [1, 2, 2, 3], [0, 3, 1, 4], [1, 3, 2, 4], [2, 0, 3, 1], [2, 1, 3, 2], [2, 2, 3, 3], [2, 3, 3, 4]]) == True\n assert candidate(rectangles = [[-1, -1, 0, 0], [0, 0, 1, 1], [1, 1, 2, 2], [-1, -1, 2, 2]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [1, 1, 3, 3], [2, 2, 4, 4], [3, 3, 5, 5], [4, 4, 6, 6], [5, 5, 7, 7], [6, 6, 8, 8], [7, 7, 9, 9]]) == False\n assert candidate(rectangles = [[0, 0, 1, 2], [1, 0, 2, 2], [0, 2, 2, 3], [1, 2, 2, 3], [0, 3, 1, 4], [1, 3, 2, 4]]) == False\n assert candidate(rectangles = [[0, 0, 2, 1], [2, 0, 4, 1], [0, 1, 1, 2], [1, 1, 3, 2], [3, 1, 4, 2], [0, 2, 1, 3], [1, 2, 3, 3], [3, 2, 4, 3]]) == True\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2], [0, 0, 2, 2]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [2, 0, 4, 2], [0, 2, 2, 4], [2, 2, 4, 4], [1, 1, 3, 3], [1, 3, 3, 4], [3, 1, 4, 2]]) == False\n assert candidate(rectangles = [[0, 0, 1000, 1000], [250, 250, 750, 750], [500, 500, 501, 501], [501, 501, 502, 502], [502, 502, 503, 503]]) == False\n assert candidate(rectangles = [[1, 1, 2, 2], [2, 2, 3, 3], [1, 2, 2, 3], [2, 1, 3, 2], [1, 3, 2, 4], [3, 1, 4, 2]]) == False\n assert candidate(rectangles = [[0, 0, 6, 6], [1, 1, 5, 5], [2, 2, 4, 4], [1, 2, 2, 3], [2, 1, 3, 2], [3, 3, 4, 4], [4, 4, 5, 5]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4], [4, 4, 5, 5], [0, 0, 5, 5]]) == False\n assert candidate(rectangles = [[-2, -2, 2, 2], [-2, 2, 2, 4], [2, -2, 4, 2], [2, 2, 4, 4]]) == True\n assert candidate(rectangles = [[0, 0, 3, 3], [1, 1, 2, 2], [2, 2, 3, 3], [1, 2, 2, 3], [2, 1, 3, 2]]) == False\n assert candidate(rectangles = [[0, 0, 1, 3], [1, 0, 2, 3], [2, 0, 3, 3], [0, 3, 1, 6], [1, 3, 2, 6], [2, 3, 3, 6], [0, 6, 1, 9], [1, 6, 2, 9], [2, 6, 3, 9]]) == True\n assert candidate(rectangles = [[1, 1, 2, 2], [1, 2, 2, 3], [1, 3, 2, 4], [1, 4, 2, 5], [1, 5, 2, 6], [2, 1, 3, 2], [2, 2, 3, 3], [2, 3, 3, 4], [2, 4, 3, 5], [2, 5, 3, 6]]) == True\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2], [0, 2, 1, 3], [1, 2, 2, 3], [0, 0, 2, 3]]) == False\n assert candidate(rectangles = [[0, 0, 3, 3], [3, 0, 6, 3], [6, 0, 9, 3], [0, 3, 3, 6], [3, 3, 6, 6], [6, 3, 9, 6]]) == True\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4], [4, 4, 5, 5], [0, 5, 5, 6]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2], [0, 2, 1, 3], [1, 2, 2, 3]]) == True\n assert candidate(rectangles = [[1, 1, 5, 5], [5, 5, 9, 9], [1, 5, 5, 9], [5, 1, 9, 5], [3, 3, 4, 4]]) == False\n assert candidate(rectangles = [[1, 1, 5, 5], [1, 5, 3, 7], [3, 5, 5, 7], [1, 7, 3, 9], [3, 7, 5, 9]]) == True\n assert candidate(rectangles = [[0, 0, 10, 5], [0, 5, 10, 10], [0, 0, 5, 10], [5, 0, 10, 5], [5, 5, 10, 10]]) == False\n assert candidate(rectangles = [[-2, -2, 0, 0], [0, 0, 2, 2], [2, 2, 4, 4], [-2, 2, 0, 4], [-2, 4, 0, 6]]) == False\n assert candidate(rectangles = [[1, 1, 2, 3], [1, 3, 2, 5], [2, 1, 3, 3], [2, 3, 3, 5], [3, 1, 4, 3], [3, 3, 4, 5], [4, 1, 5, 3], [4, 3, 5, 5]]) == True\n assert candidate(rectangles = [[0, 0, 4, 4], [1, 1, 3, 3], [2, 2, 4, 4], [0, 1, 1, 2], [1, 0, 2, 1]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [0, 1, 3, 2], [0, 2, 3, 3], [0, 3, 3, 4]]) == True\n assert candidate(rectangles = [[0, 0, 1, 1], [0, 1, 1, 2], [1, 0, 2, 1], [1, 1, 2, 2], [0, 2, 1, 3], [1, 2, 2, 3], [0, 3, 1, 4], [1, 3, 2, 4]]) == True\n assert candidate(rectangles = [[0, 0, 1, 1], [0, 1, 1, 2], [0, 2, 1, 3], [0, 3, 1, 4], [0, 4, 1, 5], [1, 0, 2, 1], [1, 1, 2, 2], [1, 2, 2, 3], [1, 3, 2, 4], [1, 4, 2, 5], [2, 0, 3, 1], [2, 1, 3, 2], [2, 2, 3, 3], [2, 3, 3, 4], [2, 4, 3, 5]]) == True\n assert candidate(rectangles = [[1, 1, 2, 2], [1, 2, 2, 3], [2, 1, 3, 2], [2, 2, 3, 3], [1.5, 1.5, 2.5, 2.5]]) == False\n assert candidate(rectangles = [[0, 0, 1, 2], [1, 0, 2, 1], [2, 0, 3, 2], [0, 2, 3, 3], [0, 1, 3, 2]]) == False\n assert candidate(rectangles = [[0, 0, 10, 10], [0, 0, 5, 5], [5, 0, 10, 5], [0, 5, 5, 10], [5, 5, 10, 10], [1, 1, 4, 4]]) == False\n assert candidate(rectangles = [[-100, -100, 100, 100], [0, 0, 200, 200], [50, 50, 150, 150], [100, 100, 200, 200]]) == False\n assert candidate(rectangles = [[0, 0, 10, 10], [1, 1, 5, 5], [5, 5, 9, 9], [0, 5, 5, 10], [5, 0, 10, 5]]) == False\n assert candidate(rectangles = [[-2, -2, 2, 2], [-1, -1, 1, 1], [0, 0, 2, 2], [1, 1, 3, 3], [2, 2, 4, 4]]) == False\n assert candidate(rectangles = [[-5, -5, 5, 5], [0, 0, 3, 3], [3, 3, 6, 6], [-6, -6, -3, -3], [-3, -3, 0, 0]]) == False\n assert candidate(rectangles = [[-1, -1, 0, 0], [0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4], [4, 4, 5, 5], [5, 5, 6, 6]]) == False\n assert candidate(rectangles = [[0, 0, 2, 1], [0, 1, 2, 2], [0, 2, 2, 3], [0, 3, 2, 4], [1, 0, 3, 1], [1, 1, 3, 2], [1, 2, 3, 3], [1, 3, 3, 4]]) == False\n assert candidate(rectangles = [[-5, -5, -3, -3], [-3, -3, 0, 0], [0, 0, 3, 3], [3, 3, 5, 5], [1, 1, 2, 2], [2, 2, 3, 3]]) == False\n assert candidate(rectangles = [[0, 0, 2, 2], [0, 2, 2, 4], [2, 0, 4, 2], [2, 2, 4, 4], [1, 1, 3, 3], [3, 1, 5, 3], [3, 3, 5, 5]]) == False\n assert candidate(rectangles = [[-10000, -10000, 10000, 10000], [-10000, -10000, 0, 0], [0, 0, 10000, 10000]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3], [3, 3, 4, 4], [4, 4, 5, 5], [5, 5, 6, 6], [6, 6, 7, 7], [7, 7, 8, 8], [8, 8, 9, 9], [9, 9, 10, 10]]) == False\n assert candidate(rectangles = [[1, 1, 2, 3], [1, 3, 2, 4], [1, 4, 2, 5], [1, 5, 2, 6], [1, 6, 2, 7], [1, 7, 2, 8], [1, 8, 2, 9]]) == True\n assert candidate(rectangles = [[0, 0, 100000, 1], [0, 1, 100000, 2], [0, 2, 100000, 3], [0, 3, 100000, 4], [0, 4, 100000, 5]]) == True\n assert candidate(rectangles = [[0, 0, 5, 5], [0, 5, 5, 10], [5, 0, 10, 5], [5, 5, 10, 10], [2, 2, 3, 3], [7, 7, 8, 8]]) == False\n assert candidate(rectangles = [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1], [0, 1, 1, 2], [1, 1, 2, 2], [0, 2, 1, 3], [1, 2, 2, 3]]) == False\n assert candidate(rectangles = [[0, 0, 4, 4], [1, 1, 3, 3], [2, 2, 4, 4], [0, 1, 2, 3], [1, 0, 3, 2], [1, 2, 3, 4], [2, 1, 4, 3]]) == False\n assert candidate(rectangles = [[-1, -1, 0, 0], [0, 0, 1, 1], [1, 1, 2, 2], [2, 2, 3, 3]]) == False\n", "comparison": "exact"}, "public_tests": ["[[1,1,3,3],[3,1,4,2],[3,2,4,4],[1,3,2,4],[2,3,3,4]]", "[[1,1,2,3],[1,3,2,4],[3,1,4,2],[3,2,4,4]]", "[[1,1,3,3],[3,1,4,2],[1,3,2,4],[2,2,4,4]]"], "hints": [], "metadata": {"canonical_parameter_names": ["rectangles"], "leetcode_dataset_entry_point": "Solution().isRectangleCover", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:43+00:00", "tests_total": 98, "tests_dropped": 9, "flags": ["has_images"], "topic_tags": ["array", "hash-table", "math", "geometry", "sweep-line"]}, "language": "ruby", "interface": {"raw_signature": "def is_rectangle_cover(rectangles)", "container": null, "callable": "is_rectangle_cover", "parameters": [{"name": "rectangles", "type": "Integer[][]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 392, "task_id": "is-subsequence", "difficulty": "Easy", "problem_description": "Given two strings s and t, return true if s is a subsequence of t, or false otherwise.\n\nA subsequence of a string is a new string that is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (i.e., \"ace\" is a subsequence of \"abcde\" while \"aec\" is not).\n\nExample 1:\n\nInput: s = \"abc\", t = \"ahbgdc\"\nOutput: true\n\nExample 2:\n\nInput: s = \"axc\", t = \"ahbgdc\"\nOutput: false\n\nConstraints:\n\n- 0 <= s.length <= 100\n- 0 <= t.length <= 10^4\n- s and t consist only of lowercase English letters.\n\nFollow up: Suppose there are lots of incoming s, say s_1, s_2, ..., s_k where k >= 10^9, and you want to check one by one to see if t has its subsequence. In this scenario, how would you change your code?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abc\",t = \"abdc\") == True\n assert candidate(s = \"xyz\",t = \"abcdefghijklmnopqrstuvwxyz\") == True\n assert candidate(s = \"aec\",t = \"abcde\") == False\n assert candidate(s = \"\",t = \"ahbgdc\") == True\n assert candidate(s = \"\",t = \"\") == True\n assert candidate(s = \"zyx\",t = \"abcdefghijklmnopqrstuvwxyz\") == False\n assert candidate(s = \"abcd\",t = \"abcde\") == True\n assert candidate(s = \"abc\",t = \"abcbc\") == True\n assert candidate(s = \"bb\",t = \"aabbb\") == True\n assert candidate(s = \"aaaaaa\",t = \"bbaaaa\") == False\n assert candidate(s = \"abc\",t = \"bahbgdca\") == True\n assert candidate(s = \"ab\",t = \"baab\") == True\n assert candidate(s = \"bd\",t = \"abcde\") == True\n assert candidate(s = \"bd\",t = \"abcd\") == True\n assert candidate(s = \"axc\",t = \"ahbgdc\") == False\n assert candidate(s = \"a\",t = \"ahbgdc\") == True\n assert candidate(s = \"a\",t = \"a\") == True\n assert candidate(s = \"abc\",t = \"ahbgdc\") == True\n assert candidate(s = \"acb\",t = \"ahbgdc\") == False\n assert candidate(s = \"bcd\",t = \"ahbgdc\") == False\n assert candidate(s = \"abc\",t = \"\") == False\n assert candidate(s = \"ahbgdc\",t = \"ahbgdc\") == True\n assert candidate(s = \"abcd\",t = \"abbbcd\") == True\n assert candidate(s = \"b\",t = \"abcde\") == True\n assert candidate(s = \"abc\",t = \"abc\") == True\n assert candidate(s = \"abc\",t = \"abcde\") == True\n assert candidate(s = \"test\",t = \"ttttteeeesstttt\") == True\n assert candidate(s = \"challenge\",t = \"chllenge\") == False\n assert candidate(s = \"leetcode\",t = \"lleettccooddee\") == True\n assert candidate(s = \"consecutive\",t = \"consecutivve\") == True\n assert candidate(s = \"example\",t = \"exxample\") == True\n assert candidate(s = \"interview\",t = \"intrvw\") == False\n assert candidate(s = \"substring\",t = \"subtrring\") == False\n assert candidate(s = \"hello\",t = \"ohellomyworld\") == True\n assert candidate(s = \"characters\",t = \"characttrrs\") == False\n assert candidate(s = \"python\",t = \"pyyyynntthhoonn\") == True\n assert candidate(s = \"challenge\",t = \"cchhaalllleennnggggeee\") == True\n assert candidate(s = \"algorithm\",t = \"aggglllllllllooooooorrrrrriiiiiiiiiimmmmmm\") == False\n assert candidate(s = \"a\",t = \"\") == False\n assert candidate(s = \"complexity\",t = \"ccllllcooooooommmppppppllllleeeeeexxxxxxyyyyyyytttttttt\") == False\n assert candidate(s = \"\",t = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == True\n assert candidate(s = \"word\",t = \"wwwooorrrrdddd\") == True\n assert candidate(s = \"algorithm\",t = \"algotihm\") == False\n assert candidate(s = \"repeated\",t = \"reppeted\") == False\n assert candidate(s = \"dynamic\",t = \"dyyyyynnaaaaaammmmcccciiiiiiiiinnnnnnnnggggggg\") == False\n assert candidate(s = \"abcd\",t = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == True\n assert candidate(s = \"abcdabcd\",t = \"abxycdxeyzabcd\") == True\n assert candidate(s = \"complex\",t = \"complxc\") == False\n assert candidate(s = \"interview\",t = \"iiiiinnnnnttttttterrrrrrrrreevvvvvvvvvw\") == False\n assert candidate(s = \"mississippi\",t = \"mmissiissippiissippississippi\") == True\n assert candidate(s = \"substrings\",t = \"sssssuuuuubbstrrrrrriiiiinnnggggggsss\") == True\n assert candidate(s = \"substring\",t = \"ssssuusssubbssssttrrrriiiinnngggggg\") == True\n assert candidate(s = \"sequence\",t = \"seqqqqquuuuueeeennnnccceeeeee\") == True\n assert candidate(s = \"programming\",t = \"ppppprrogggggggrrrrrroooooogggggggaaaaammmmiiiiinnnnnggggggg\") == True\n assert candidate(s = \"repeated\",t = \"reeeepppeeeaaaatteeedd\") == True\n assert candidate(s = \"abcabcabc\",t = \"aabbccabcabcabc\") == True\n assert candidate(s = \"z\",t = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s = \"consecutive\",t = \"ccoonnnsseecccccoooooonnnsssccceeeeeevvvvvvvveeeennnnnnncccccccceeeeeee\") == False\n assert candidate(s = \"\",t = \"a\") == True\n assert candidate(s = \"hello\",t = \"hhelllllooooworld\") == True\n assert candidate(s = \"example\",t = \"eeeexxaample\") == True\n assert candidate(s = \"subsequence\",t = \"ssubsuuubbbbsssseeeeeqqqqqqqqqqccceeeennnnneeeeee\") == False\n assert candidate(s = \"characters\",t = \"ccccchhhhaaaaaarrrrrrrtttteeeeeeccchhhhaaaaaarrrrrrrtttteeeeee\") == False\n assert candidate(s = \"abcdef\",t = \"fedcbazyxwvutsrqponmlkjihgfedcba\") == False\n assert candidate(s = \"subsequence\",t = \"substringsequence\") == True\n assert candidate(s = \"abcdefg\",t = \"axbxcxdxexfxgx\") == True\n assert candidate(s = \"abcdefg\",t = \"azbycxdwevfug\") == True\n assert candidate(s = \"sequence\",t = \"sqeuences\") == False\n", "comparison": "exact"}, "public_tests": ["\"abc\"\n\"ahbgdc\"", "\"axc\"\n\"ahbgdc\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "t"], "leetcode_dataset_entry_point": "Solution().isSubsequence", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:45+00:00", "tests_total": 69, "tests_dropped": 1, "flags": [], "topic_tags": ["two-pointers", "string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def is_subsequence(s, t)", "container": null, "callable": "is_subsequence", "parameters": [{"name": "s", "type": "String"}, {"name": "t", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 393, "task_id": "utf-8-validation", "difficulty": "Medium", "problem_description": "Given an integer array data representing the data, return whether it is a valid UTF-8 encoding (i.e. it translates to a sequence of valid UTF-8 encoded characters).\n\nA character in UTF8 can be from 1 to 4 bytes long, subjected to the following rules:\n\n1. For a 1-byte character, the first bit is a 0, followed by its Unicode code.\n2. For an n-bytes character, the first n bits are all one's, the n + 1 bit is 0, followed by n - 1 bytes with the most significant 2 bits being 10.\n\nThis is how the UTF-8 encoding would work:\n\n Number of Bytes | UTF-8 Octet Sequence\n | (binary)\n --------------------+-----------------------------------------\n 1 | 0xxxxxxx\n 2 | 110xxxxx 10xxxxxx\n 3 | 1110xxxx 10xxxxxx 10xxxxxx\n 4 | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n\nx denotes a bit in the binary form of a byte that may be either 0 or 1.\n\nNote: The input is an array of integers. Only the least significant 8 bits of each integer is used to store the data. This means each integer represents only 1 byte of data.\n\nExample 1:\n\nInput: data = [197,130,1]\nOutput: true\nExplanation: data represents the octet sequence: 11000101 10000010 00000001.\nIt is a valid utf-8 encoding for a 2-bytes character followed by a 1-byte character.\n\nExample 2:\n\nInput: data = [235,140,4]\nOutput: false\nExplanation: data represented the octet sequence: 11101011 10001100 00000100.\nThe first 3 bits are all one's and the 4th bit is 0 means it is a 3-bytes character.\nThe next byte is a continuation byte which starts with 10 and that's correct.\nBut the second continuation byte does not start with 10, so it is invalid.\n\nConstraints:\n\n- 1 <= data.length <= 2 * 10^4\n- 0 <= data[i] <= 255\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(data = [237, 130, 130, 130]) == False\n assert candidate(data = [237, 128, 128, 130, 128, 128]) == False\n assert candidate(data = [238, 130, 130]) == True\n assert candidate(data = [31, 130, 130, 130]) == False\n assert candidate(data = [237, 130, 130, 130, 130]) == False\n assert candidate(data = [228, 189, 160]) == True\n assert candidate(data = [235, 140, 4]) == False\n assert candidate(data = [240, 162, 134, 142]) == True\n assert candidate(data = [237, 130, 130, 130, 130, 130, 130]) == False\n assert candidate(data = [251, 117, 104, 101, 108, 108, 111]) == False\n assert candidate(data = [240, 162, 134, 161]) == True\n assert candidate(data = [145]) == False\n assert candidate(data = [238, 130, 69]) == False\n assert candidate(data = [228, 189, 160, 229, 165, 189]) == True\n assert candidate(data = [197, 130, 1]) == True\n assert candidate(data = [235, 140, 4]) == False\n assert candidate(data = [197, 130, 1]) == True\n assert candidate(data = [192, 128, 191, 127]) == False\n assert candidate(data = [250, 145, 145, 145]) == False\n assert candidate(data = [0]) == True\n assert candidate(data = [240, 162, 134, 140]) == True\n assert candidate(data = [255]) == False\n assert candidate(data = [65, 66, 67, 68]) == True\n assert candidate(data = [224, 184, 148, 163]) == False\n assert candidate(data = [248, 128, 128, 128, 128, 128]) == False\n assert candidate(data = [192, 128]) == True\n assert candidate(data = [240, 162, 138, 147, 145]) == False\n assert candidate(data = [237, 130, 130, 130]) == False\n assert candidate(data = [240, 162, 134, 142, 240, 162, 134, 142, 240, 162, 134, 142]) == True\n assert candidate(data = [252, 128, 128, 128, 128, 128, 128, 128]) == False\n assert candidate(data = [128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139]) == False\n assert candidate(data = [110, 188, 142, 224, 160, 128]) == False\n assert candidate(data = [192, 128, 192, 128, 192, 128, 192, 192]) == False\n assert candidate(data = [225, 184, 165, 225, 184, 170, 225, 184, 185, 225, 184, 190]) == True\n assert candidate(data = [224, 160, 128, 224, 160, 128, 224, 160, 128]) == True\n assert candidate(data = [240, 159, 146, 150, 240, 159, 146, 150, 240, 159, 146, 150]) == True\n assert candidate(data = [240, 184, 152, 168, 224, 164, 174, 240, 157, 151, 166]) == True\n assert candidate(data = [248, 130, 130, 130, 130]) == False\n assert candidate(data = [248, 144, 144, 144, 144, 144]) == False\n assert candidate(data = [192, 128, 192, 128, 192, 128]) == True\n assert candidate(data = [240, 144, 144, 144, 144, 144, 144, 144]) == False\n assert candidate(data = [192, 128, 224, 162, 128, 240, 144, 128]) == False\n assert candidate(data = [248, 130, 129, 128, 128, 128, 128]) == False\n assert candidate(data = [235, 140, 141, 236, 140, 141, 237, 140, 141]) == True\n assert candidate(data = [224, 168, 128, 225, 184, 141, 225, 184, 172, 225, 184, 170, 225, 185, 172, 225, 184, 162]) == True\n assert candidate(data = [192, 128, 224, 160, 128, 225, 184, 160]) == True\n assert candidate(data = [244, 160, 128, 128, 244, 160, 128, 128]) == True\n assert candidate(data = [255, 255, 255, 255]) == False\n assert candidate(data = [225, 184, 160, 225, 184, 161, 225, 184, 162]) == True\n assert candidate(data = [192, 128, 192, 128, 192, 128, 192, 128]) == True\n assert candidate(data = [248, 128, 128, 128, 128, 128, 128]) == False\n assert candidate(data = [250, 145, 145, 145, 145]) == False\n assert candidate(data = [225, 184, 168, 225, 184, 169, 225, 184, 170]) == True\n assert candidate(data = [240, 159, 191, 191, 240, 159, 191, 191]) == True\n assert candidate(data = [224, 162, 130, 192, 128]) == True\n assert candidate(data = [192, 128, 192, 129, 192, 130, 192, 131, 192, 132, 192, 133, 192, 134, 192, 135, 192, 136, 192, 137, 192, 138, 192, 139, 192, 140, 192, 141, 192, 142, 192, 143]) == True\n assert candidate(data = [225, 184, 150, 225, 184, 185, 225, 184, 186, 225, 184, 187, 225, 184, 188]) == True\n assert candidate(data = [250, 145, 145, 145, 145, 145]) == False\n assert candidate(data = [230, 138, 142, 230, 138, 143, 230, 138, 144]) == True\n assert candidate(data = [65, 66, 67, 68, 69, 70, 71, 72]) == True\n assert candidate(data = [240, 144, 144, 144, 240, 144, 144, 144, 240, 144, 144, 144, 240, 144, 144, 144]) == True\n assert candidate(data = [239, 188, 140, 239, 188, 141, 239, 188, 142, 239, 188, 143]) == True\n assert candidate(data = [225, 186, 130, 225, 186, 130, 225, 186, 130, 225, 186, 130, 225, 186, 130, 225, 186, 130]) == True\n assert candidate(data = [224, 160, 128, 224, 160, 129, 224, 160, 130]) == True\n assert candidate(data = [240, 159, 146, 140, 224, 164, 162, 194, 161]) == True\n assert candidate(data = [240, 128, 128, 128, 224, 160, 128, 192, 128]) == True\n assert candidate(data = [253, 160, 160, 160, 160, 160, 160, 160]) == False\n assert candidate(data = [244, 141, 132, 132, 244, 141, 132, 132]) == True\n assert candidate(data = [250, 145, 130, 147, 128, 130, 147, 128]) == False\n assert candidate(data = [240, 184, 144, 144, 240, 184, 144, 144]) == True\n assert candidate(data = [239, 187, 191, 239, 187, 191, 239, 187, 191]) == True\n assert candidate(data = [128, 129, 130, 131, 132, 133, 134, 135]) == False\n assert candidate(data = [192, 128, 224, 162, 130, 240, 159, 146, 150]) == True\n assert candidate(data = [255, 192, 128, 145]) == False\n assert candidate(data = [250, 154, 141, 154, 141, 154, 141, 154]) == False\n assert candidate(data = [252, 128, 128, 128, 128, 128, 128]) == False\n assert candidate(data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(data = [6, 239, 191, 191, 224, 160, 128, 239, 191, 191]) == True\n assert candidate(data = [224, 160, 128, 225, 184, 160, 239, 189, 191]) == True\n assert candidate(data = [225, 186, 185, 225, 186, 185, 225, 186, 185]) == True\n assert candidate(data = [224, 160, 128, 225, 184, 128, 237, 128, 128, 240, 144, 128, 128]) == True\n assert candidate(data = [250, 145, 145, 145, 145, 145, 145, 145]) == False\n assert candidate(data = [250, 145, 130, 128, 10]) == False\n assert candidate(data = [239, 187, 191, 239, 187, 191, 239, 187, 191, 239, 187, 191]) == True\n assert candidate(data = [240, 128, 128, 128, 240, 129, 129, 129]) == True\n assert candidate(data = [191, 128, 191, 128, 191, 128]) == False\n assert candidate(data = [255, 140, 140, 140]) == False\n assert candidate(data = [192, 128, 224, 162, 138, 240, 159, 146, 150]) == True\n assert candidate(data = [128, 191, 223, 239, 255, 0, 127, 192]) == False\n assert candidate(data = [240, 144, 144, 128, 240, 144, 144, 144]) == True\n assert candidate(data = [240, 159, 146, 150, 240, 159, 146, 150]) == True\n assert candidate(data = [240, 145, 129, 128, 128]) == False\n assert candidate(data = [240, 145, 145, 145, 240, 145, 145, 145]) == True\n assert candidate(data = [234, 162, 134, 235, 140, 4, 236, 128, 132]) == False\n assert candidate(data = [240, 184, 152, 149, 240, 184, 152, 150]) == True\n assert candidate(data = [192, 128, 224, 160, 128, 240, 144, 128, 128]) == True\n assert candidate(data = [192, 128, 192, 128, 192, 128, 192, 128]) == True\n assert candidate(data = [240, 145, 128, 147, 128, 130, 147, 128, 237, 128, 128, 237, 128, 128]) == False\n assert candidate(data = [240, 145, 128, 128, 240, 145, 128, 128, 240, 145, 128, 128]) == True\n assert candidate(data = [224, 160, 128, 128, 224, 160, 128, 128, 224, 160, 128, 128]) == False\n assert candidate(data = [225, 184, 165, 225, 184, 170, 225, 184, 185]) == True\n assert candidate(data = [192, 128, 192, 128, 192, 128, 128, 192]) == False\n assert candidate(data = [224, 160, 128, 224, 160, 128, 192, 128, 128]) == False\n assert candidate(data = [239, 189, 191, 239, 189, 191]) == True\n assert candidate(data = [194, 128, 224, 160, 128, 240, 176, 128, 248, 192, 128, 128]) == False\n assert candidate(data = [192, 128, 224, 162, 138, 147, 240, 144, 144, 144, 0]) == False\n assert candidate(data = [239, 188, 140, 239, 188, 141, 239, 188, 142]) == True\n assert candidate(data = [10, 192, 128, 11, 194, 191, 14, 224, 160, 128, 15, 225, 184, 160]) == True\n assert candidate(data = [194, 128, 224, 160, 128, 240, 144, 128, 128, 250, 144, 128, 128]) == False\n assert candidate(data = [0, 0, 0, 0, 0, 0, 0, 0]) == True\n assert candidate(data = [224, 160, 128, 237, 130, 176, 240, 144, 144, 128]) == True\n assert candidate(data = [255, 160, 130, 145]) == False\n assert candidate(data = [225, 186, 130, 225, 186, 130, 225, 186, 130]) == True\n assert candidate(data = [128, 129, 130, 131, 132, 133, 134, 135, 136, 137]) == False\n assert candidate(data = [240, 145, 129, 128, 240, 145, 129, 128, 240, 145, 129, 128]) == True\n assert candidate(data = [228, 189, 160, 229, 165, 189, 228, 184, 173]) == True\n assert candidate(data = [224, 162, 138, 224, 162, 138]) == True\n assert candidate(data = [194, 128, 226, 128, 128, 239, 184, 141]) == True\n assert candidate(data = [248, 130, 130, 130, 130, 130, 130, 130]) == False\n assert candidate(data = [240, 159, 146, 150, 192, 128, 224, 162, 130]) == True\n assert candidate(data = [250, 145, 145, 145, 145, 145, 145]) == False\n assert candidate(data = [240, 144, 144, 144, 144]) == False\n assert candidate(data = [10, 192, 130, 224, 162, 138, 240, 144, 144, 144, 192, 130]) == True\n assert candidate(data = [248, 130, 130, 130, 130, 130, 130]) == False\n assert candidate(data = [240, 145, 130, 128, 225, 186, 130, 192, 128]) == True\n assert candidate(data = [255, 255, 255, 255]) == False\n assert candidate(data = [192, 129, 192, 130, 192, 131, 192, 132]) == True\n assert candidate(data = [240, 144, 144, 144, 240, 144, 144, 144]) == True\n assert candidate(data = [255, 128, 128, 128, 128, 128, 128, 128]) == False\n assert candidate(data = [240, 162, 138, 147, 240, 162, 138, 147]) == True\n assert candidate(data = [250, 145, 145, 145, 145, 145, 145, 145, 145]) == False\n assert candidate(data = [248, 128, 128, 128, 128, 128]) == False\n assert candidate(data = [192, 128, 224, 162, 138, 240, 144, 144, 144]) == True\n assert candidate(data = [237, 140, 141, 142, 143, 144, 145]) == False\n", "comparison": "exact"}, "public_tests": ["[197,130,1]", "[235,140,4]"], "hints": ["Read the data integer by integer. When you read it, process the least significant 8 bits of it.", "Assume the next encoding is 1-byte data. If it is not 1-byte data, read the next integer and assume it is 2-bytes data.", "Similarly, if it is not 2-bytes data, try 3-bytes then 4-bytes. If you read four integers and it still does not match any pattern, return false."], "metadata": {"canonical_parameter_names": ["data"], "leetcode_dataset_entry_point": "Solution().validUtf8", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:48+00:00", "tests_total": 135, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def valid_utf8(data)", "container": null, "callable": "valid_utf8", "parameters": [{"name": "data", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 394, "task_id": "decode-string", "difficulty": "Medium", "problem_description": "Given an encoded string, return its decoded string.\n\nThe encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a positive integer.\n\nYou may assume that the input string is always valid; there are no extra white spaces, square brackets are well-formed, etc. Furthermore, you may assume that the original data does not contain any digits and that digits are only for those repeat numbers, k. For example, there will not be input like 3a or 2[4].\n\nThe test cases are generated so that the length of the output will never exceed 10^5.\n\nExample 1:\n\nInput: s = \"3[a]2[bc]\"\nOutput: \"aaabcbc\"\n\nExample 2:\n\nInput: s = \"3[a2[c]]\"\nOutput: \"accaccacc\"\n\nExample 3:\n\nInput: s = \"2[abc]3[cd]ef\"\nOutput: \"abcabccdcdcdef\"\n\nConstraints:\n\n- 1 <= s.length <= 30\n- s consists of lowercase English letters, digits, and square brackets '[]'.\n- s is guaranteed to be a valid input.\n- All the integers in s are in the range [1, 300].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"2[ab3[cd]]\") == \"abcdcdcdabcdcdcd\"\n assert candidate(s = \"2[ab3[c]]\") == \"abcccabccc\"\n assert candidate(s = \"1[a1[b1[c]]]\") == \"abc\"\n assert candidate(s = \"2[3[a]]\") == \"aaaaaa\"\n assert candidate(s = \"a1[b]\") == \"ab\"\n assert candidate(s = \"3[a3[b]1[c]]\") == \"abbbcabbbcabbbc\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"10[abc]\") == \"abcabcabcabcabcabcabcabcabcabc\"\n assert candidate(s = \"1[2[3[4[a]]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"2[3[a]b]\") == \"aaabaaab\"\n assert candidate(s = \"4[ab]\") == \"abababab\"\n assert candidate(s = \"1[a2[b3[c]]]\") == \"abcccbccc\"\n assert candidate(s = \"10[a]\") == \"aaaaaaaaaa\"\n assert candidate(s = \"a2[b]c\") == \"abbc\"\n assert candidate(s = \"2[abc]3[cd]ef\") == \"abcabccdcdcdef\"\n assert candidate(s = \"1[a]\") == \"a\"\n assert candidate(s = \"3[a2[c]]\") == \"accaccacc\"\n assert candidate(s = \"3[a]2[bc]\") == \"aaabcbc\"\n assert candidate(s = \"abc\") == \"abc\"\n assert candidate(s = \"3[a3[b2[c]]]\") == \"abccbccbccabccbccbccabccbccbcc\"\n assert candidate(s = \"100[ab]\") == \"abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\"\n assert candidate(s = \"a[b]\") == \"a\"\n assert candidate(s = \"2[b3[c]]\") == \"bcccbccc\"\n assert candidate(s = \"1[xyz]2[uvw]\") == \"xyzuvwuvw\"\n assert candidate(s = \"a2[b3[c]]\") == \"abcccbccc\"\n assert candidate(s = \"1[a1[b]]\") == \"ab\"\n assert candidate(s = \"4[3[z]2[y]]\") == \"zzzyyzzzyyzzzyyzzzyy\"\n assert candidate(s = \"5[ab3[c2[d]]]\") == \"abcddcddcddabcddcddcddabcddcddcddabcddcddcddabcddcddcdd\"\n assert candidate(s = \"5[a1[b2[c3[d4[e]]]]]\") == \"abcdeeeedeeeedeeeecdeeeedeeeedeeeeabcdeeeedeeeedeeeecdeeeedeeeedeeeeabcdeeeedeeeedeeeecdeeeedeeeedeeeeabcdeeeedeeeedeeeecdeeeedeeeedeeeeabcdeeeedeeeedeeeecdeeeedeeeedeeee\"\n assert candidate(s = \"a2[b3[c4[d5[e6[f7[g]]]]]]\") == \"abcdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggcdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggcdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggbcdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggcdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggcdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggdefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfgggggggefgggggggfgggggggfgggggggfgggggggfgggggggfggggggg\"\n assert candidate(s = \"abc3[d2[e1[f]]]\") == \"abcdefefdefefdefef\"\n assert candidate(s = \"5[a2[b3[c4[d]]]]\") == \"abcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcdddd\"\n assert candidate(s = \"3[2[mn]1[op]2[qr]]\") == \"mnmnopqrqrmnmnopqrqrmnmnopqrqr\"\n assert candidate(s = \"5[c2[d]]\") == \"cddcddcddcddcdd\"\n assert candidate(s = \"a1[b2[c3[d]]]\") == \"abcdddcddd\"\n assert candidate(s = \"7[2[x]3[y]]\") == \"xxyyyxxyyyxxyyyxxyyyxxyyyxxyyyxxyyy\"\n assert candidate(s = \"2[ab3[cd]]4[ef5[gh]]\") == \"abcdcdcdabcdcdcdefghghghghghefghghghghghefghghghghghefghghghghgh\"\n assert candidate(s = \"3[ab2[c]]4[de]\") == \"abccabccabccdededede\"\n assert candidate(s = \"4[ab3[c2[d]]]\") == \"abcddcddcddabcddcddcddabcddcddcddabcddcddcdd\"\n assert candidate(s = \"3[a2[b1[c0[d]]]]\") == \"abcbcabcbcabcbc\"\n assert candidate(s = \"3[a4[b5[c6[d7[e8[f]]]]]]\") == \"abcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffabcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffabcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffbcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffcdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffdeffffffffeffffffffeffffffffeffffffffeffffffffeffffffffeffffffff\"\n assert candidate(s = \"3[2[a]1[b]]2[3[c]4[d]]\") == \"aabaabaabcccddddcccdddd\"\n assert candidate(s = \"2[3[a]2[b3[c]2[d]]]\") == \"aaabcccddbcccddaaabcccddbcccdd\"\n assert candidate(s = \"6[ab2[cd3[ef]]]\") == \"abcdefefefcdefefefabcdefefefcdefefefabcdefefefcdefefefabcdefefefcdefefefabcdefefefcdefefefabcdefefefcdefefef\"\n assert candidate(s = \"7[fg]2[h3[i]]\") == \"fgfgfgfgfgfgfghiiihiii\"\n assert candidate(s = \"7[x2[y3[z4[w]]]]\") == \"xyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwwwxyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwwwxyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwwwxyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwwwxyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwwwxyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwwwxyzwwwwzwwwwzwwwwyzwwwwzwwwwzwwww\"\n assert candidate(s = \"5[2[x3[y]]4[z]]\") == \"xyyyxyyyzzzzxyyyxyyyzzzzxyyyxyyyzzzzxyyyxyyyzzzzxyyyxyyyzzzz\"\n assert candidate(s = \"6[ab2[cd3[ef4[gh]]]]\") == \"abcdefghghghghefghghghghefghghghghcdefghghghghefghghghghefghghghghabcdefghghghghefghghghghefghghghghcdefghghghghefghghghghefghghghghabcdefghghghghefghghghghefghghghghcdefghghghghefghghghghefghghghghabcdefghghghghefghghghghefghghghghcdefghghghghefghghghghefghghghghabcdefghghghghefghghghghefghghghghcdefghghghghefghghghghefghghghghabcdefghghghghefghghghghefghghghghcdefghghghghefghghghghefghghghgh\"\n assert candidate(s = \"2[x2[y3[z]]]1[a]\") == \"xyzzzyzzzxyzzzyzzza\"\n assert candidate(s = \"7[z]6[y5[x4[w3[v2[u1[t]]]]]]\") == \"zzzzzzzyxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututyxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututyxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututyxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututyxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututyxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvututxwvututvututvututwvututvututvututwvututvututvututwvututvututvutut\"\n assert candidate(s = \"2[a3[b4[c]]]\") == \"abccccbccccbccccabccccbccccbcccc\"\n assert candidate(s = \"10[a9[bc3[de]]]\") == \"abcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededeabcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdededebcdedede\"\n assert candidate(s = \"3[ab]4[cd]5[ef]\") == \"abababcdcdcdcdefefefefef\"\n assert candidate(s = \"10[ab]\") == \"abababababababababab\"\n assert candidate(s = \"5[4[3[2[1[x]]]]]\") == \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n assert candidate(s = \"2[ab3[cd4[ef]]]\") == \"abcdefefefefcdefefefefcdefefefefabcdefefefefcdefefefefcdefefefef\"\n assert candidate(s = \"5[ab]3[cd]2[ef1[gh]]\") == \"abababababcdcdcdefghefgh\"\n assert candidate(s = \"7[2[pq]3[rs]]\") == \"pqpqrsrsrspqpqrsrsrspqpqrsrsrspqpqrsrsrspqpqrsrsrspqpqrsrsrspqpqrsrsrs\"\n assert candidate(s = \"2[3[a]b]4[c5[d]]\") == \"aaabaaabcdddddcdddddcdddddcddddd\"\n assert candidate(s = \"3[2[3[4[a]]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"6[2[a]3[b]]\") == \"aabbbaabbbaabbbaabbbaabbbaabbb\"\n assert candidate(s = \"2[abc3[def4[ghi5[jkl]]]]\") == \"abcdefghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljkldefghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljkldefghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklabcdefghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljkldefghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljkldefghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljklghijkljkljkljkljkl\"\n assert candidate(s = \"2[a3[b4[c5[d6[e]]]]]\") == \"abcdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeebcdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeebcdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeeabcdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeebcdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeebcdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeeecdeeeeeedeeeeeedeeeeeedeeeeeedeeeeee\"\n assert candidate(s = \"3[2[1[0[]]]]\") == \"\"\n assert candidate(s = \"10[f9[g]]\") == \"fgggggggggfgggggggggfgggggggggfgggggggggfgggggggggfgggggggggfgggggggggfgggggggggfgggggggggfggggggggg\"\n assert candidate(s = \"15[abc10[de]]\") == \"abcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdedededededededededeabcdededededededededede\"\n assert candidate(s = \"5[k9[l10[m]]]\") == \"klmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmklmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmklmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmklmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmklmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmmlmmmmmmmmmm\"\n assert candidate(s = \"5[xy2[z3[w4[v]]]]\") == \"xyzwvvvvwvvvvwvvvvzwvvvvwvvvvwvvvvxyzwvvvvwvvvvwvvvvzwvvvvwvvvvwvvvvxyzwvvvvwvvvvwvvvvzwvvvvwvvvvwvvvvxyzwvvvvwvvvvwvvvvzwvvvvwvvvvwvvvvxyzwvvvvwvvvvwvvvvzwvvvvwvvvvwvvvv\"\n assert candidate(s = \"1[1[1[1[ab]]]]\") == \"ab\"\n assert candidate(s = \"5[1[2[3[4[5[a]]]]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"4[ab2[c]]\") == \"abccabccabccabcc\"\n assert candidate(s = \"4[a2[b3[c]]]\") == \"abcccbcccabcccbcccabcccbcccabcccbccc\"\n assert candidate(s = \"2[x3[y4[z]]]\") == \"xyzzzzyzzzzyzzzzxyzzzzyzzzzyzzzz\"\n assert candidate(s = \"3[2[3[4[a]]]5[b]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaabbbbbaaaaaaaaaaaaaaaaaaaaaaaabbbbbaaaaaaaaaaaaaaaaaaaaaaaabbbbb\"\n assert candidate(s = \"10[ab2[cd]ef3[gh]]\") == \"abcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghghabcdcdefghghgh\"\n assert candidate(s = \"5[abc2[def]]\") == \"abcdefdefabcdefdefabcdefdefabcdefdefabcdefdef\"\n assert candidate(s = \"3[2[3[a2[b]]]]\") == \"abbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabbabb\"\n assert candidate(s = \"2[3[ab]]\") == \"abababababab\"\n assert candidate(s = \"3[xy2[z]]2[ab]\") == \"xyzzxyzzxyzzabab\"\n assert candidate(s = \"10[1[a]2[b]3[c]4[d]5[e]]\") == \"abbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeeeabbcccddddeeeee\"\n assert candidate(s = \"3[2[3[4[x]]]]\") == \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n assert candidate(s = \"2[3[a]b4[c]]\") == \"aaabccccaaabcccc\"\n assert candidate(s = \"10[x]\") == \"xxxxxxxxxx\"\n assert candidate(s = \"4[2[xy]z]\") == \"xyxyzxyxyzxyxyzxyxyz\"\n assert candidate(s = \"6[a5[b4[c3[d2[e1[f]]]]]]\") == \"abcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefabcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefabcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefabcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefabcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefabcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefbcdefefdefefdefefcdefefdefefdefefcdefefdefefdefefcdefefdefefdefef\"\n assert candidate(s = \"4[x5[yz]w]\") == \"xyzyzyzyzyzwxyzyzyzyzyzwxyzyzyzyzyzwxyzyzyzyzyzw\"\n assert candidate(s = \"4[3[2[b1[c]]]]\") == \"bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc\"\n assert candidate(s = \"2[x3[xy4[z]]]\") == \"xxyzzzzxyzzzzxyzzzzxxyzzzzxyzzzzxyzzzz\"\n assert candidate(s = \"2[3[a2[b]]c]\") == \"abbabbabbcabbabbabbc\"\n assert candidate(s = \"9[abc]8[def]7[ghi]\") == \"abcabcabcabcabcabcabcabcabcdefdefdefdefdefdefdefdefghighighighighighighi\"\n assert candidate(s = \"4[ab]5[cd]\") == \"ababababcdcdcdcdcd\"\n assert candidate(s = \"2[3[xy]z]\") == \"xyxyxyzxyxyxyz\"\n assert candidate(s = \"4[x3[y2[z]]]\") == \"xyzzyzzyzzxyzzyzzyzzxyzzyzzyzzxyzzyzzyzz\"\n assert candidate(s = \"3[2[a]b]\") == \"aabaabaab\"\n assert candidate(s = \"abc2[3[de]fg]\") == \"abcdededefgdededefg\"\n assert candidate(s = \"1[abc2[def3[ghi]]]\") == \"abcdefghighighidefghighighi\"\n assert candidate(s = \"2[abc2[def3[ghi]]]\") == \"abcdefghighighidefghighighiabcdefghighighidefghighighi\"\n assert candidate(s = \"1[2[3[4[5[a]]]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"5[ab3[cd]]\") == \"abcdcdcdabcdcdcdabcdcdcdabcdcdcdabcdcdcd\"\n assert candidate(s = \"2[x3[y4[z]]]1[w]\") == \"xyzzzzyzzzzyzzzzxyzzzzyzzzzyzzzzw\"\n assert candidate(s = \"7[2[a]3[b]]\") == \"aabbbaabbbaabbbaabbbaabbbaabbbaabbb\"\n assert candidate(s = \"4[x5[y]]\") == \"xyyyyyxyyyyyxyyyyyxyyyyy\"\n assert candidate(s = \"2[abc3[def4[ghi]]]\") == \"abcdefghighighighidefghighighighidefghighighighiabcdefghighighighidefghighighighidefghighighighi\"\n assert candidate(s = \"5[ab2[c]]3[xy]2[de]\") == \"abccabccabccabccabccxyxyxydede\"\n assert candidate(s = \"5[abc2[de]]\") == \"abcdedeabcdedeabcdedeabcdedeabcdede\"\n assert candidate(s = \"7[k2[3[xyz]]]\") == \"kxyzxyzxyzxyzxyzxyzkxyzxyzxyzxyzxyzxyzkxyzxyzxyzxyzxyzxyzkxyzxyzxyzxyzxyzxyzkxyzxyzxyzxyzxyzxyzkxyzxyzxyzxyzxyzxyzkxyzxyzxyzxyzxyzxyz\"\n assert candidate(s = \"1[abc2[def]]\") == \"abcdefdef\"\n assert candidate(s = \"3[2[1[x]]]\") == \"xxxxxx\"\n assert candidate(s = \"5[ab2[cd]]\") == \"abcdcdabcdcdabcdcdabcdcdabcdcd\"\n assert candidate(s = \"6[5[4[3[2[1[a]]]]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"7[xyz]3[abc2[def1[ghi]]]\") == \"xyzxyzxyzxyzxyzxyzxyzabcdefghidefghiabcdefghidefghiabcdefghidefghi\"\n assert candidate(s = \"x1[y2[z3[a4[b5[c]]]]]\") == \"xyzabcccccbcccccbcccccbcccccabcccccbcccccbcccccbcccccabcccccbcccccbcccccbccccczabcccccbcccccbcccccbcccccabcccccbcccccbcccccbcccccabcccccbcccccbcccccbccccc\"\n assert candidate(s = \"3[ab2[c3[d]]]\") == \"abcdddcdddabcdddcdddabcdddcddd\"\n assert candidate(s = \"6[a2[b3[c4[d]]]]\") == \"abcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcddddabcddddcddddcddddbcddddcddddcdddd\"\n assert candidate(s = \"15[a]\") == \"aaaaaaaaaaaaaaa\"\n assert candidate(s = \"5[2[3[a]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"2[xy3[z]]4[ab]\") == \"xyzzzxyzzzabababab\"\n assert candidate(s = \"1[a2[b3[c4[d5[e]]]]]\") == \"abcdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeeebcdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeee\"\n assert candidate(s = \"4[a3[b]]\") == \"abbbabbbabbbabbb\"\n assert candidate(s = \"2[ab]3[cd]4[ef]\") == \"ababcdcdcdefefefef\"\n assert candidate(s = \"1[2[3[4[5[6[x]]]]]]\") == \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n assert candidate(s = \"2[a3[b4[c5[d6[e7[f]]]]]]\") == \"abcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffbcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffbcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffabcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffbcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffbcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffcdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffffdefffffffefffffffefffffffefffffffefffffffefffffff\"\n assert candidate(s = \"4[a3[b2[c1[d]]]]\") == \"abcdcdbcdcdbcdcdabcdcdbcdcdbcdcdabcdcdbcdcdbcdcdabcdcdbcdcdbcdcd\"\n assert candidate(s = \"3[2[3[4[5[a]]]]]\") == \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"\n assert candidate(s = \"3[xyz2[abc]4[def]]5[ghi]\") == \"xyzabcabcdefdefdefdefxyzabcabcdefdefdefdefxyzabcabcdefdefdefdefghighighighighi\"\n assert candidate(s = \"2[2[2[2[2[abc]]]]]\") == \"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\"\n assert candidate(s = \"3[b2[c]1[d]]4[e]\") == \"bccdbccdbccdeeee\"\n assert candidate(s = \"a2[b3[c4[d5[e]]]]\") == \"abcdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeeebcdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeeecdeeeeedeeeeedeeeeedeeeee\"\n", "comparison": "exact"}, "public_tests": ["\"3[a]2[bc]\"", "\"3[a2[c]]\"", "\"2[abc]3[cd]ef\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().decodeString", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:50+00:00", "tests_total": 133, "tests_dropped": 5, "flags": [], "topic_tags": ["string", "stack", "recursion"]}, "language": "ruby", "interface": {"raw_signature": "def decode_string(s)", "container": null, "callable": "decode_string", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 395, "task_id": "longest-substring-with-at-least-k-repeating-characters", "difficulty": "Medium", "problem_description": "Given a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this substring is greater than or equal to k.\n\nif no such substring exists, return 0.\n\nExample 1:\n\nInput: s = \"aaabb\", k = 3\nOutput: 3\nExplanation: The longest substring is \"aaa\", as 'a' is repeated 3 times.\n\nExample 2:\n\nInput: s = \"ababbc\", k = 2\nOutput: 5\nExplanation: The longest substring is \"ababb\", as 'a' is repeated 2 times and 'b' is repeated 3 times.\n\nConstraints:\n\n- 1 <= s.length <= 10^4\n- s consists of only lowercase English letters.\n- 1 <= k <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcabcabc\",k = 3) == 9\n assert candidate(s = \"abcdefg\",k = 1) == 7\n assert candidate(s = \"bbaaacccddddeee\",k = 4) == 4\n assert candidate(s = \"aabcabb\",k = 2) == 2\n assert candidate(s = \"aaa\",k = 4) == 0\n assert candidate(s = \"a\",k = 1) == 1\n assert candidate(s = \"aaaabbbbcccc\",k = 5) == 0\n assert candidate(s = \"a\",k = 2) == 0\n assert candidate(s = \"aabbcc\",k = 1) == 6\n assert candidate(s = \"abcde\",k = 2) == 0\n assert candidate(s = \"aabbbccc\",k = 3) == 6\n assert candidate(s = \"aabbbcccc\",k = 3) == 7\n assert candidate(s = \"aaabb\",k = 3) == 3\n assert candidate(s = \"zzzzzzzz\",k = 5) == 8\n assert candidate(s = \"abcd\",k = 1) == 4\n assert candidate(s = \"ababbc\",k = 2) == 5\n assert candidate(s = \"aabcccddddeee\",k = 2) == 10\n assert candidate(s = \"aaabbbcccddd\",k = 4) == 0\n assert candidate(s = \"abcabcabcabc\",k = 3) == 12\n assert candidate(s = \"zzzzzzzzzz\",k = 1) == 10\n assert candidate(s = \"aabbccddeeff\",k = 1) == 12\n assert candidate(s = \"abcdefabcdefabcdef\",k = 3) == 18\n assert candidate(s = \"xyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxyxy\",k = 2) == 36\n assert candidate(s = \"aabbccddeeffgghhii\",k = 2) == 18\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\",k = 1) == 26\n assert candidate(s = \"aabbccddeeffgghhiijjkk\",k = 2) == 22\n assert candidate(s = \"aabccceeddd\",k = 3) == 3\n assert candidate(s = \"abacabadabacabadabacabad\",k = 2) == 24\n assert candidate(s = \"qqwweerrttyyuuiiooppaassddffgg\",k = 3) == 0\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzz\",k = 5) == 20\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 1) == 52\n assert candidate(s = \"aabbccddeeeefff\",k = 3) == 7\n assert candidate(s = \"aabaaaabbbaaaabb\",k = 3) == 16\n assert candidate(s = \"aabbccddeeff\",k = 2) == 12\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 1) == 56\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 1) == 34\n assert candidate(s = \"xyzzzzzzzzzzxy\",k = 10) == 10\n assert candidate(s = \"xyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyz\",k = 3) == 60\n assert candidate(s = \"abcdabcabcabcd\",k = 2) == 14\n assert candidate(s = \"abcdabcdbcdabcd\",k = 2) == 15\n assert candidate(s = \"aabaaaabbbaabbccbbbaaacccaa\",k = 3) == 27\n assert candidate(s = \"abccbaabccba\",k = 2) == 12\n assert candidate(s = \"mississippi\",k = 2) == 10\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 5) == 0\n assert candidate(s = \"abcabcabcabcabc\",k = 2) == 15\n assert candidate(s = \"bbaaacccddddeee\",k = 3) == 13\n assert candidate(s = \"abcdabcdabcdabcdabcd\",k = 5) == 20\n assert candidate(s = \"aaaaaaaaaabbbbbbbbbbcccccccccc\",k = 10) == 30\n assert candidate(s = \"abababababab\",k = 3) == 12\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 26) == 0\n assert candidate(s = \"ababababababababababababababababababababababababababababababab\",k = 2) == 62\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 50) == 60\n assert candidate(s = \"aabbaaaccbbccaaaaccccbbbbaaaaa\",k = 6) == 30\n assert candidate(s = \"abacabadabacaba\",k = 2) == 0\n assert candidate(s = \"abcbacbabcbabc\",k = 3) == 14\n assert candidate(s = \"bbaaacccddddeeeeffffgggghhhh\",k = 4) == 20\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\",k = 1) == 30\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 25) == 60\n assert candidate(s = \"aaabbbcccddd\",k = 3) == 12\n assert candidate(s = \"abcdabcdabcdabcdabcdabcd\",k = 2) == 24\n assert candidate(s = \"abcabcabcabc\",k = 2) == 12\n assert candidate(s = \"bbaaacccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnooooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz\",k = 4) == 92\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\",k = 10) == 30\n assert candidate(s = \"xyzzzzzyx\",k = 3) == 5\n assert candidate(s = \"zzzzzyyyyxxxxwwwwvvvv\",k = 5) == 5\n assert candidate(s = \"aabbccddeeffgg\",k = 2) == 14\n assert candidate(s = \"aabbccddeeffgg\",k = 3) == 0\n assert candidate(s = \"aabbaaabbbaaaabb\",k = 3) == 16\n assert candidate(s = \"ababababababababababababababab\",k = 3) == 30\n assert candidate(s = \"mnopqrstuv\",k = 1) == 10\n assert candidate(s = \"abcabcabcabc\",k = 1) == 12\n assert candidate(s = \"xyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 30) == 58\n assert candidate(s = \"abcdefghigklmnopqrstuvwxyz\",k = 1) == 26\n assert candidate(s = \"aabbccddeeffgghhiijjkk\",k = 3) == 0\n assert candidate(s = \"zzzzzzzzzzzzzz\",k = 12) == 14\n assert candidate(s = \"xyzzazaxxzyzyzyzyzxzyzyzyzxzyzyzyz\",k = 2) == 34\n assert candidate(s = \"aabbaaaccbbccaaaaccccbbbbaaaaa\",k = 3) == 30\n assert candidate(s = \"aabaaaadaaabaaaadaaabaaaa\",k = 3) == 4\n assert candidate(s = \"aabbccddeeffgg\",k = 4) == 0\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzz\",k = 10) == 20\n assert candidate(s = \"abccbaabccccddddeeeee\",k = 2) == 21\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\",k = 2) == 30\n assert candidate(s = \"thisisjustaverylongteststring\",k = 3) == 0\n assert candidate(s = \"abababababababababababababababab\",k = 5) == 32\n assert candidate(s = \"zzzzzyyyyyxxxx\",k = 4) == 14\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 15) == 60\n assert candidate(s = \"abcbcbcbcbcbcbcbcbcbcbcbcbcb\",k = 2) == 27\n assert candidate(s = \"xyzzxyzzxyzz\",k = 3) == 12\n assert candidate(s = \"aabbbccccdddd\",k = 4) == 8\n assert candidate(s = \"mississippi\",k = 3) == 7\n assert candidate(s = \"aabacbebebe\",k = 3) == 6\n assert candidate(s = \"zzzzzyyyyyxxxxwwwwvvvvuuuuttttssssrrrrqqqqpppplllloooonnnnmmmkkkjjjiiihhhhggggffffeeeeddddccccbbbbaaaaa\",k = 5) == 10\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",k = 1) == 26\n assert candidate(s = \"abacabadabacaba\",k = 3) == 0\n assert candidate(s = \"xyzzzzzzzzzyx\",k = 2) == 13\n assert candidate(s = \"aabbcdefgghijklmno\",k = 2) == 4\n assert candidate(s = \"ppppppqqqqrrrssstttuuuvvvvwwwwwxxxxxyyyyyzzzz\",k = 5) == 15\n assert candidate(s = \"abcabcabcabcabcabc\",k = 2) == 18\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",k = 1) == 60\n assert candidate(s = \"zzzzzaaazzzzzzzzzz\",k = 5) == 10\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 3) == 0\n assert candidate(s = \"zzzzzzzzzzzzzzzzzz\",k = 5) == 18\n assert candidate(s = \"abababababababababababababababababababab\",k = 5) == 40\n assert candidate(s = \"xyzzzxyzzzxyzzz\",k = 3) == 15\n assert candidate(s = \"aabababababababababababababababa\",k = 5) == 32\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 2) == 52\n assert candidate(s = \"aabbccddeeffgghhiijjkk\",k = 4) == 0\n assert candidate(s = \"abcdefgh\",k = 2) == 0\n", "comparison": "exact"}, "public_tests": ["\"aaabb\"\n3", "\"ababbc\"\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().longestSubstring", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:52+00:00", "tests_total": 109, "tests_dropped": 1, "flags": [], "topic_tags": ["hash-table", "string", "divide-and-conquer", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def longest_substring(s, k)", "container": null, "callable": "longest_substring", "parameters": [{"name": "s", "type": "String"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 396, "task_id": "rotate-function", "difficulty": "Medium", "problem_description": "You are given an integer array nums of length n.\n\nAssume arr_k to be an array obtained by rotating nums by k positions clock-wise. We define the rotation function F on nums as follow:\n\n- F(k) = 0 * arr_k[0] + 1 * arr_k[1] + ... + (n - 1) * arr_k[n - 1].\n\nReturn the maximum value of F(0), F(1), ..., F(n-1).\n\nThe test cases are generated so that the answer fits in a 32-bit integer.\n\nExample 1:\n\nInput: nums = [4,3,2,6]\nOutput: 26\nExplanation:\nF(0) = (0 * 4) + (1 * 3) + (2 * 2) + (3 * 6) = 0 + 3 + 4 + 18 = 25\nF(1) = (0 * 6) + (1 * 4) + (2 * 3) + (3 * 2) = 0 + 4 + 6 + 6 = 16\nF(2) = (0 * 2) + (1 * 6) + (2 * 4) + (3 * 3) = 0 + 6 + 8 + 9 = 23\nF(3) = (0 * 3) + (1 * 2) + (2 * 6) + (3 * 4) = 0 + 2 + 12 + 12 = 26\nSo the maximum value of F(0), F(1), F(2), F(3) is F(3) = 26.\n\nExample 2:\n\nInput: nums = [100]\nOutput: 0\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 10^5\n- -100 <= nums[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, -1, 1, -1, 1]) == 6\n assert candidate(nums = [1, 0, 0, 0, 1]) == 7\n assert candidate(nums = [10, -10, 20, -20]) == 50\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 330\n assert candidate(nums = [1, 0, 0, 0]) == 3\n assert candidate(nums = [100]) == 0\n assert candidate(nums = [1, -1, 1, -1]) == 2\n assert candidate(nums = [10, 20, 30, 40, 50]) == 400\n assert candidate(nums = [4, 3, 2, 6]) == 26\n assert candidate(nums = [-1, -2, -3, -4, -5]) == -25\n assert candidate(nums = [5, 5, 5, 5, 5]) == 50\n assert candidate(nums = [0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [5, 5, 5, 5]) == 30\n assert candidate(nums = [1, 2, 3, 4, 5]) == 40\n assert candidate(nums = [100, -100, 100, -100, 100]) == 600\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [-1, -2, -3, -4]) == -12\n assert candidate(nums = [1, 0, 0, 0, 0]) == 4\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [5, 3, 1, 2, 4]) == 37\n assert candidate(nums = [-1, 0, 1]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 41650\n assert candidate(nums = [-10, -20, -30, -40, -50, -60]) == -430\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 56\n assert candidate(nums = [-100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90]) == -5115\n assert candidate(nums = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == 4295\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 0, 0, 0, 0]) == 9\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 21750\n assert candidate(nums = [-99, -98, -97, -96, -95, -94, -93, -92, -91, -90]) == -4170\n assert candidate(nums = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == 4500\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70]) == 1120\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 29\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == 285\n assert candidate(nums = [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == 7\n assert candidate(nums = [10, 20, 30, 40, 50, 60]) == 700\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == 5280\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15]) == -700\n assert candidate(nums = [-10, 20, -30, 40, -50, 60]) == 180\n assert candidate(nums = [-10, 1, -20, 2, -30, 3, -40, 4]) == -206\n assert candidate(nums = [0, 1, -1, 2, -2, 3, -3]) == 15\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40]) == 210\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]) == 9\n assert candidate(nums = [-10, 0, 10, -20, 20, -30, 30, -40, 40, -50]) == 110\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 435\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50]) == 350\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 2]) == 17\n assert candidate(nums = [-50, -50, -50, -50, -50]) == -500\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 1050\n assert candidate(nums = [5, 1, 4, 2, 8, 3, 7, 6, 9, 0]) == 263\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == 210\n assert candidate(nums = [-50, -50, -50, -50, -50, -50, -50, -50, -50, -50]) == -2250\n assert candidate(nums = [-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10, -11, 11, -12, 12, -13, 13, -14, 14, -15, 15]) == 120\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1]) == 21\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 1120\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 330\n assert candidate(nums = [50, 50, 50, 50, 50]) == 500\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == 35\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 715\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 3300\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [50, -50, 40, -40, 30, -30, 20, -20, 10, -10]) == 350\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 190\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == 5\n assert candidate(nums = [-10, 0, 10, -20, 0, 20, -30, 0, 30, -40]) == 120\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 5200\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 110\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 1900\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [100, 0, -100, 50, 0, -50, 25, 0, -25, 12]) == 746\n assert candidate(nums = [0, 1, -1, 2, -2, 3, -3, 4, -4, 5]) == 35\n assert candidate(nums = [100, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 1140\n assert candidate(nums = [99, -99, 98, -98, 97, -97, 96, -96, 95, -95]) == 505\n assert candidate(nums = [50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]) == 550\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 2660\n assert candidate(nums = [90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]) == 3500\n assert candidate(nums = [7, 1, 3, 4, 6, 5]) == 84\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 2250\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20]) == 190\n", "comparison": "exact"}, "public_tests": ["[4,3,2,6]", "[100]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().maxRotateFunction", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:54+00:00", "tests_total": 89, "tests_dropped": 9, "flags": [], "topic_tags": ["array", "math", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def max_rotate_function(nums)", "container": null, "callable": "max_rotate_function", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 397, "task_id": "integer-replacement", "difficulty": "Medium", "problem_description": "Given a positive integer n, you can apply one of the following operations:\n\n1. If n is even, replace n with n / 2.\n2. If n is odd, replace n with either n + 1 or n - 1.\n\nReturn the minimum number of operations needed for n to become 1.\n\nExample 1:\n\nInput: n = 8\nOutput: 3\nExplanation: 8 -> 4 -> 2 -> 1\n\nExample 2:\n\nInput: n = 7\nOutput: 4\nExplanation: 7 -> 8 -> 4 -> 2 -> 1\nor 7 -> 6 -> 3 -> 2 -> 1\n\nExample 3:\n\nInput: n = 4\nOutput: 2\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == 3\n assert candidate(n = 15) == 5\n assert candidate(n = 4) == 2\n assert candidate(n = 2147483647) == 32\n assert candidate(n = 1) == 0\n assert candidate(n = 1000000000) == 38\n assert candidate(n = 7) == 4\n assert candidate(n = 317) == 11\n assert candidate(n = 63) == 7\n assert candidate(n = 21) == 6\n assert candidate(n = 32767) == 16\n assert candidate(n = 50000) == 20\n assert candidate(n = 2047) == 12\n assert candidate(n = 16383) == 15\n assert candidate(n = 5) == 3\n assert candidate(n = 123) == 9\n assert candidate(n = 134217727) == 28\n assert candidate(n = 64) == 6\n assert candidate(n = 99) == 9\n assert candidate(n = 1073741823) == 31\n assert candidate(n = 23) == 6\n assert candidate(n = 51) == 8\n assert candidate(n = 16777215) == 25\n assert candidate(n = 101) == 9\n assert candidate(n = 99999999) == 32\n assert candidate(n = 2048) == 11\n assert candidate(n = 999) == 13\n assert candidate(n = 27) == 7\n assert candidate(n = 8191) == 14\n assert candidate(n = 1023) == 11\n assert candidate(n = 19) == 6\n assert candidate(n = 65535) == 17\n assert candidate(n = 513) == 10\n assert candidate(n = 127) == 8\n assert candidate(n = 1048575) == 21\n assert candidate(n = 31) == 6\n assert candidate(n = 1000000) == 24\n", "comparison": "exact"}, "public_tests": ["8", "7", "4"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().integerReplacement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:57+00:00", "tests_total": 37, "tests_dropped": 0, "flags": [], "topic_tags": ["dynamic-programming", "greedy", "bit-manipulation", "memoization"]}, "language": "ruby", "interface": {"raw_signature": "def integer_replacement(n)", "container": null, "callable": "integer_replacement", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 399, "task_id": "evaluate-division", "difficulty": "Medium", "problem_description": "You are given an array of variable pairs equations and an array of real numbers values, where equations[i] = [A_i, B_i] and values[i] represent the equation A_i / B_i = values[i]. Each A_i or B_i is a string that represents a single variable.\n\nYou are also given some queries, where queries[j] = [C_j, D_j] represents the j^th query where you must find the answer for C_j / D_j = ?.\n\nReturn the answers to all queries. If a single answer cannot be determined, return -1.0.\n\nNote: The input is always valid. You may assume that evaluating the queries will not result in division by zero and that there is no contradiction.\n\nNote: The variables that do not occur in the list of equations are undefined, so the answer cannot be determined for them.\n\nExample 1:\n\nInput: equations = [[\"a\",\"b\"],[\"b\",\"c\"]], values = [2.0,3.0], queries = [[\"a\",\"c\"],[\"b\",\"a\"],[\"a\",\"e\"],[\"a\",\"a\"],[\"x\",\"x\"]]\nOutput: [6.00000,0.50000,-1.00000,1.00000,-1.00000]\nExplanation:\nGiven: a / b = 2.0, b / c = 3.0\nqueries are: a / c = ?, b / a = ?, a / e = ?, a / a = ?, x / x = ?\nreturn: [6.0, 0.5, -1.0, 1.0, -1.0 ]\nnote: x is undefined => -1.0\n\nExample 2:\n\nInput: equations = [[\"a\",\"b\"],[\"b\",\"c\"],[\"bc\",\"cd\"]], values = [1.5,2.5,5.0], queries = [[\"a\",\"c\"],[\"c\",\"b\"],[\"bc\",\"cd\"],[\"cd\",\"bc\"]]\nOutput: [3.75000,0.40000,5.00000,0.20000]\n\nExample 3:\n\nInput: equations = [[\"a\",\"b\"]], values = [0.5], queries = [[\"a\",\"b\"],[\"b\",\"a\"],[\"a\",\"c\"],[\"x\",\"y\"]]\nOutput: [0.50000,2.00000,-1.00000,-1.00000]\n\nConstraints:\n\n- 1 <= equations.length <= 20\n- equations[i].length == 2\n- 1 <= A_i.length, B_i.length <= 5\n- values.length == equations.length\n- 0.0 < values[i] <= 20.0\n- 1 <= queries.length <= 20\n- queries[i].length == 2\n- 1 <= C_j.length, D_j.length <= 5\n- A_i, B_i, C_j, D_j consist of lower case English letters and digits.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"Decimal answers are accepted within 1e-5 (absolute or relative), as on LeetCode.\"\"\"\n import math\n if isinstance(result, list) and isinstance(expected, list):\n return len(result) == len(expected) and all(answers_match(r, e) for r, e in zip(result, expected))\n numbers = (int, float)\n if isinstance(result, numbers) and isinstance(expected, numbers) and not isinstance(result, bool):\n return math.isclose(result, expected, rel_tol=1e-5, abs_tol=1e-5)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(equations=[['a1', 'b1'], ['a2', 'b2'], ['a3', 'b3']], values=[1.1, 2.2, 3.3], queries=[['a1', 'b1'], ['a2', 'b2'], ['a3', 'b3'], ['b1', 'a1']]), [1.1, 2.2, 3.3, 0.9090909090909091])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c']], values=[2.0, 3.0], queries=[['a', 'c'], ['b', 'a'], ['a', 'e'], ['a', 'a'], ['x', 'x']]), [6.0, 0.5, -1, 1.0, -1])\n assert answers_match(candidate(equations=[['a', 'b']], values=[0.5], queries=[['a', 'b'], ['b', 'a'], ['a', 'c'], ['x', 'y']]), [0.5, 2.0, -1, -1])\n assert answers_match(candidate(equations=[['x1', 'x2'], ['x3', 'x4']], values=[2.0, 3.0], queries=[['x1', 'x2'], ['x3', 'x4'], ['x1', 'x3']]), [2.0, 3.0, -1])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['bc', 'cd']], values=[1.5, 2.5, 5.0], queries=[['a', 'c'], ['c', 'b'], ['bc', 'cd'], ['cd', 'bc']]), [3.75, 0.4, 5.0, 0.2])\n assert answers_match(candidate(equations=[['x1', 'x2'], ['x2', 'x3'], ['x3', 'x4']], values=[2.0, 3.0, 4.0], queries=[['x1', 'x4'], ['x4', 'x1'], ['x1', 'x5']]), [24.0, 0.041666666666666664, -1])\n assert answers_match(candidate(equations=[['m1', 'm2'], ['m2', 'm3'], ['m3', 'm4'], ['m4', 'm1'], ['m1', 'm5']], values=[1.2, 2.3, 3.4, 4.5, 5.6], queries=[['m1', 'm3'], ['m3', 'm1'], ['m2', 'm4'], ['m4', 'm2'], ['m1', 'm6']]), [2.76, 0.3623188405797102, 7.8199999999999985, 0.1278772378516624, -1])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'a']], values=[2.0, 3.0, 0.5, 0.333], queries=[['a', 'c'], ['c', 'a'], ['b', 'd'], ['d', 'b'], ['a', 'a'], ['e', 'e']]), [6.0, 0.16666666666666666, 1.5, 0.6666666666666666, 1.0, -1])\n assert answers_match(candidate(equations=[['nodeA', 'nodeB'], ['nodeB', 'nodeC'], ['nodeC', 'nodeD'], ['nodeD', 'nodeE'], ['nodeE', 'nodeF'], ['nodeF', 'nodeG'], ['nodeG', 'nodeH'], ['nodeH', 'nodeI'], ['nodeI', 'nodeJ'], ['nodeJ', 'nodeA']], values=[1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0, 2.1], queries=[['nodeA', 'nodeJ'], ['nodeJ', 'nodeA'], ['nodeB', 'nodeD'], ['nodeD', 'nodeB'], ['nodeE', 'nodeH'], ['nodeH', 'nodeE'], ['nodeF', 'nodeG'], ['nodeG', 'nodeF'], ['nodeA', 'nodeK']]), [60.9493248, 0.016407072650622703, 1.8199999999999998, 0.5494505494505495, 4.896000000000001, 0.20424836601307186, 1.7, 0.5882352941176471, -1])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e'], ['e', 'f'], ['f', 'g']], values=[2.0, 3.0, 4.0, 5.0, 6.0, 7.0], queries=[['a', 'g'], ['g', 'a'], ['b', 'f'], ['f', 'b'], ['c', 'e'], ['e', 'c'], ['a', 'h'], ['h', 'a']]), [5040.0, 0.0001984126984126984, 360.0, 0.002777777777777778, 20.0, 0.05, -1, -1])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['a', 'd'], ['d', 'e'], ['e', 'f']], values=[2.0, 3.0, 4.0, 5.0, 6.0], queries=[['a', 'f'], ['f', 'a'], ['b', 'e'], ['c', 'd'], ['x', 'y']]), [120.0, 0.008333333333333333, 10.0, 0.6666666666666666, -1])\n assert answers_match(candidate(equations=[['var1', 'var2'], ['var2', 'var3'], ['var3', 'var4'], ['var4', 'var5'], ['var5', 'var6'], ['var6', 'var7']], values=[2.0, 2.0, 2.0, 2.0, 2.0, 2.0], queries=[['var1', 'var7'], ['var7', 'var1'], ['var2', 'var6'], ['var3', 'var5'], ['x', 'y']]), [64.0, 0.015625, 16.0, 4.0, -1])\n assert answers_match(candidate(equations=[['node1', 'node2'], ['node2', 'node3'], ['node3', 'node4'], ['node4', 'node1'], ['node1', 'node5']], values=[3.0, 4.0, 5.0, 6.0, 7.0], queries=[['node1', 'node5'], ['node5', 'node1'], ['node2', 'node4'], ['node3', 'node2'], ['node4', 'node3'], ['node1', 'node6']]), [7.0, 0.14285714285714285, 20.0, 0.25, 0.19999999999999998, -1])\n assert answers_match(candidate(equations=[['v1', 'v2'], ['v2', 'v3'], ['v3', 'v4'], ['v4', 'v1']], values=[3.0, 4.0, 5.0, 6.0], queries=[['v1', 'v4'], ['v4', 'v1'], ['v2', 'v3'], ['v3', 'v2'], ['v5', 'v5']]), [60.0, 0.016666666666666666, 4.0, 0.25, -1])\n assert answers_match(candidate(equations=[['var1', 'var2'], ['var2', 'var3'], ['var3', 'var4'], ['var4', 'var5'], ['var5', 'var6'], ['var6', 'var7'], ['var7', 'var8'], ['var8', 'var9'], ['var9', 'var10']], values=[2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], queries=[['var1', 'var10'], ['var10', 'var1'], ['var2', 'var9'], ['var9', 'var2'], ['var3', 'var8'], ['var8', 'var3'], ['var4', 'var7'], ['var7', 'var4'], ['var5', 'var6'], ['var6', 'var5']]), [3628800.0, 2.755731922398589e-07, 181440.0, 5.5114638447971785e-06, 6720.0, 0.00014880952380952382, 210.0, 0.004761904761904762, 6.0, 0.16666666666666666])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e'], ['e', 'f']], values=[1.0, 2.0, 3.0, 4.0, 5.0], queries=[['a', 'f'], ['f', 'a'], ['b', 'd'], ['d', 'b'], ['c', 'e'], ['e', 'c']]), [120.0, 0.008333333333333333, 6.0, 0.16666666666666666, 12.0, 0.08333333333333333])\n assert answers_match(candidate(equations=[['u1', 'u2'], ['u2', 'u3'], ['u3', 'u4'], ['u4', 'u5'], ['u5', 'u6'], ['u6', 'u1'], ['u1', 'u7'], ['u7', 'u8']], values=[1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8], queries=[['u1', 'u8'], ['u8', 'u1'], ['u2', 'u7'], ['u7', 'u2'], ['u3', 'u6'], ['u6', 'u3']]), [67.76, 0.014757969303423848, 7.0, 0.14285714285714288, 79.86, 0.01252191334835963])\n assert answers_match(candidate(equations=[['var1', 'var2'], ['var2', 'var3'], ['var3', 'var4'], ['var4', 'var5']], values=[2.0, 3.0, 4.0, 5.0], queries=[['var1', 'var5'], ['var5', 'var1'], ['var2', 'var4'], ['var3', 'var2'], ['var1', 'var6']]), [120.0, 0.008333333333333333, 12.0, 0.3333333333333333, -1])\n assert answers_match(candidate(equations=[['q1', 'q2'], ['q2', 'q3'], ['q3', 'q4'], ['q4', 'q5'], ['q5', 'q6'], ['q6', 'q1'], ['q1', 'q7'], ['q7', 'q8'], ['q8', 'q9']], values=[0.5, 1.2, 1.8, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0], queries=[['q1', 'q9'], ['q9', 'q1'], ['q2', 'q8'], ['q8', 'q2'], ['q3', 'q7'], ['q7', 'q3']]), [90.00000000000001, 0.01111111111111111, 36.00000000000001, 0.027777777777777773, 6.666666666666668, 0.14999999999999997])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e']], values=[2.0, 0.5, 3.0, 0.25], queries=[['a', 'e'], ['e', 'a'], ['a', 'd'], ['d', 'a'], ['b', 'c'], ['c', 'b'], ['a', 'x']]), [0.75, 1.3333333333333333, 3.0, 0.3333333333333333, 0.5, 2.0, -1])\n assert answers_match(candidate(equations=[['v1', 'v2'], ['v2', 'v3'], ['v3', 'v4'], ['v4', 'v5'], ['v5', 'v6'], ['v6', 'v7'], ['v7', 'v8'], ['v8', 'v9'], ['v9', 'v10'], ['v10', 'v11'], ['v11', 'v12'], ['v12', 'v13'], ['v13', 'v14'], ['v14', 'v15']], values=[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0], queries=[['v1', 'v15'], ['v15', 'v14'], ['v14', 'v13'], ['v13', 'v12'], ['v12', 'v11'], ['v11', 'v10'], ['v10', 'v9'], ['v9', 'v8'], ['v8', 'v7'], ['v7', 'v6'], ['v6', 'v5'], ['v5', 'v4'], ['v4', 'v3'], ['v3', 'v2'], ['v2', 'v1'], ['v1', 'v16']]), [87178291200.0, 0.07142857142857142, 0.07692307692307693, 0.08333333333333333, 0.09090909090909091, 0.1, 0.1111111111111111, 0.125, 0.14285714285714285, 0.16666666666666666, 0.2, 0.25, 0.3333333333333333, 0.5, 1.0, -1])\n assert answers_match(candidate(equations=[['m1', 'm2'], ['m2', 'm3'], ['m3', 'm4'], ['m4', 'm5'], ['m5', 'm6']], values=[1.1, 1.2, 1.3, 1.4, 1.5], queries=[['m1', 'm6'], ['m6', 'm1'], ['m2', 'm4'], ['m3', 'm5'], ['m1', 'm7']]), [3.6035999999999997, 0.2775002775002775, 1.56, 1.8199999999999996, -1])\n assert answers_match(candidate(equations=[['x1', 'y1'], ['y1', 'z1'], ['x2', 'y2'], ['y2', 'z2'], ['x3', 'y3'], ['y3', 'z3'], ['x4', 'y4'], ['y4', 'z4']], values=[0.5, 2.0, 1.5, 3.0, 2.5, 4.0, 3.5, 5.0], queries=[['x1', 'z4'], ['z4', 'x1'], ['y2', 'z2'], ['x3', 'y3'], ['a', 'b']]), [-1, -1, 3.0, 2.5, -1])\n assert answers_match(candidate(equations=[['a1', 'b1'], ['b1', 'c1'], ['c1', 'd1'], ['d1', 'e1'], ['e1', 'f1'], ['f1', 'g1'], ['g1', 'h1']], values=[1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8], queries=[['a1', 'h1'], ['h1', 'a1'], ['b1', 'g1'], ['g1', 'b1'], ['c1', 'f1'], ['f1', 'c1']]), [12358.277567999996, 8.09174251425909e-05, 1320.3287999999995, 0.0007573870993346508, 85.67999999999999, 0.011671335200746967])\n assert answers_match(candidate(equations=[['m1', 'n1'], ['n1', 'o1'], ['o1', 'p1'], ['p1', 'q1']], values=[2.5, 3.5, 4.5, 5.5], queries=[['m1', 'q1'], ['q1', 'm1'], ['n1', 'p1'], ['p1', 'n1'], ['m1', 'x1'], ['x1', 'm1']]), [216.5625, 0.004617604617604618, 15.75, 0.06349206349206349, -1, -1])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['a', 'd'], ['d', 'e']], values=[2.0, 3.0, 4.0, 5.0], queries=[['a', 'c'], ['c', 'a'], ['a', 'e'], ['e', 'a'], ['x', 'x']]), [6.000000000000001, 0.16666666666666666, 20.0, 0.05, -1])\n assert answers_match(candidate(equations=[['x1', 'x2'], ['x2', 'x3'], ['x3', 'x4'], ['x4', 'x5'], ['x5', 'x6']], values=[1.1, 1.2, 1.3, 1.4, 1.5], queries=[['x1', 'x6'], ['x6', 'x1'], ['x1', 'x5'], ['x5', 'x1'], ['x1', 'x4'], ['x4', 'x1'], ['x1', 'x3'], ['x3', 'x1'], ['x1', 'x2'], ['x2', 'x1'], ['x6', 'x2'], ['x2', 'x6'], ['x6', 'x3'], ['x3', 'x6'], ['x6', 'x4'], ['x4', 'x6'], ['x6', 'x5'], ['x5', 'x6']]), [3.6035999999999997, 0.2775002775002775, 2.4023999999999996, 0.4162504162504163, 1.7160000000000002, 0.5827505827505827, 1.32, 0.7575757575757575, 1.1, 0.909090909090909, 0.30525030525030533, 3.2759999999999994, 0.3663003663003664, 2.7299999999999995, 0.4761904761904763, 2.0999999999999996, 0.6666666666666666, 1.5])\n assert answers_match(candidate(equations=[['p1', 'q1'], ['p2', 'q2'], ['q1', 'q2'], ['q2', 'p1'], ['p1', 'p2']], values=[1.1, 2.2, 3.3, 4.4, 5.5], queries=[['p1', 'p2'], ['p2', 'p1'], ['q1', 'q2'], ['q2', 'q1'], ['p1', 'q3']]), [1.65, 0.6060606060606061, 3.3, 0.30303030303030304, -1])\n assert answers_match(candidate(equations=[['p1', 'p2'], ['p2', 'p3'], ['p3', 'p4'], ['p4', 'p5']], values=[0.5, 1.5, 2.5, 3.5], queries=[['p1', 'p5'], ['p5', 'p1'], ['p2', 'p4'], ['p4', 'p2'], ['p1', 'p6']]), [6.5625, 0.1523809523809524, 3.75, 0.26666666666666666, -1])\n assert answers_match(candidate(equations=[['n1', 'n2'], ['n2', 'n3'], ['n3', 'n4'], ['n4', 'n1'], ['n1', 'n5'], ['n5', 'n6']], values=[0.7, 1.1, 1.3, 1.7, 2.1, 2.3], queries=[['n1', 'n4'], ['n4', 'n1'], ['n2', 'n5'], ['n5', 'n2'], ['n3', 'n6'], ['n6', 'n3']]), [1.0010000000000001, 0.9990009990009989, 3.0000000000000004, 0.3333333333333333, 6.2727272727272725, 0.15942028985507248])\n assert answers_match(candidate(equations=[['p', 'q'], ['q', 'r'], ['r', 's'], ['s', 't'], ['t', 'u']], values=[1.1, 1.2, 1.3, 1.4, 1.5], queries=[['p', 'u'], ['u', 'p'], ['q', 't'], ['r', 's'], ['z', 'z']]), [3.6035999999999997, 0.2775002775002775, 2.1839999999999997, 1.3, -1])\n assert answers_match(candidate(equations=[['m1', 'n1'], ['n1', 'o1'], ['o1', 'p1'], ['p1', 'q1']], values=[1.5, 2.5, 3.5, 4.5], queries=[['m1', 'o1'], ['o1', 'm1'], ['n1', 'q1'], ['q1', 'n1'], ['p1', 'p1']]), [3.75, 0.26666666666666666, 39.375, 0.025396825396825397, 1.0])\n assert answers_match(candidate(equations=[['p', 'q'], ['q', 'r'], ['r', 's'], ['s', 't']], values=[0.5, 2.0, 3.0, 4.0], queries=[['p', 't'], ['t', 'p'], ['q', 's'], ['s', 'q'], ['r', 'p'], ['x', 'y']]), [12.0, 0.08333333333333333, 6.0, 0.16666666666666666, 1.0, -1])\n assert answers_match(candidate(equations=[['u1', 'v1'], ['v1', 'w1'], ['u2', 'v2'], ['v2', 'w2'], ['u3', 'v3'], ['v3', 'w3'], ['u4', 'v4'], ['v4', 'w4']], values=[2.1, 2.2, 3.1, 3.2, 4.1, 4.2, 5.1, 5.2], queries=[['u1', 'w4'], ['w4', 'u1'], ['v2', 'w2'], ['u3', 'v3'], ['a', 'b']]), [-1, -1, 3.2, 4.1, -1])\n assert answers_match(candidate(equations=[['x0', 'y0'], ['y0', 'z0'], ['z0', 'x1'], ['x1', 'y1'], ['y1', 'z1'], ['z1', 'w1'], ['w1', 'x2']], values=[1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7], queries=[['x0', 'x2'], ['x2', 'x0'], ['y0', 'w1'], ['w1', 'y0'], ['z0', 'z1'], ['z1', 'z0'], ['x1', 'y1']]), [9821.534184000002, 0.00010181708695053704, 1159.5672000000002, 0.0008623907264710488, 79.86, 0.012521913348359628, 4.4])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e'], ['e', 'f'], ['f', 'g'], ['g', 'h'], ['h', 'i'], ['i', 'j']], values=[2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0], queries=[['a', 'j'], ['j', 'a'], ['b', 'd'], ['d', 'b'], ['e', 'h'], ['h', 'e'], ['f', 'g'], ['g', 'f'], ['a', 'k']]), [3628800.0, 2.755731922398589e-07, 12.0, 0.08333333333333333, 336.0, 0.002976190476190476, 7.0, 0.14285714285714285, -1])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'a'], ['d', 'e'], ['e', 'f'], ['f', 'd']], values=[2.0, 3.0, 0.5, 4.0, 5.0, 0.25], queries=[['a', 'f'], ['f', 'a'], ['b', 'e'], ['c', 'd'], ['x', 'y']]), [-1, -1, -1, -1, -1])\n assert answers_match(candidate(equations=[['m1', 'n1'], ['n1', 'o1'], ['m2', 'n2'], ['n2', 'o2'], ['m3', 'n3'], ['n3', 'o3']], values=[1.5, 2.5, 3.5, 4.5, 5.5, 6.5], queries=[['m1', 'o3'], ['o3', 'm1'], ['n2', 'o2'], ['m3', 'n3'], ['a', 'b']]), [-1, -1, 4.5, 5.5, -1])\n assert answers_match(candidate(equations=[['x1', 'x2'], ['x2', 'x3'], ['x3', 'x4'], ['x4', 'x5']], values=[2.0, 3.0, 4.0, 5.0], queries=[['x1', 'x5'], ['x5', 'x1'], ['x2', 'x4'], ['x3', 'x2'], ['x1', 'x6']]), [120.0, 0.008333333333333333, 12.0, 0.3333333333333333, -1])\n assert answers_match(candidate(equations=[['x1', 'y1'], ['x2', 'y2'], ['x3', 'y3'], ['y1', 'y2'], ['y2', 'y3'], ['y3', 'x1']], values=[1.1, 2.2, 3.3, 4.4, 5.5, 6.6], queries=[['x1', 'y3'], ['y3', 'x1'], ['x2', 'y1'], ['y1', 'x2'], ['x3', 'y2'], ['y2', 'x3'], ['x1', 'x4']]), [26.620000000000005, 0.03756574004507888, 0.5, 2.0, 0.6, 1.6666666666666667, -1])\n assert answers_match(candidate(equations=[['var1', 'var2'], ['var2', 'var3'], ['var3', 'var4'], ['var4', 'var5'], ['var5', 'var6'], ['var6', 'var7'], ['var7', 'var8'], ['var8', 'var9']], values=[1.11, 2.22, 3.33, 4.44, 5.55, 6.66, 7.77, 8.88], queries=[['var1', 'var9'], ['var9', 'var1'], ['var2', 'var8'], ['var8', 'var2'], ['var3', 'var7'], ['var7', 'var3']]), [92918.9628750124, 1.0762065880407262e-05, 9426.889342891443, 0.00010607953096999833, 546.5053476000002, 0.0018298082615138891])\n assert answers_match(candidate(equations=[['var1', 'var2'], ['var2', 'var3'], ['var3', 'var4'], ['var4', 'var5'], ['var5', 'var1']], values=[1.1, 2.2, 3.3, 4.4, 5.5], queries=[['var1', 'var3'], ['var3', 'var1'], ['var2', 'var4'], ['var4', 'var2'], ['var1', 'var5'], ['var5', 'var1'], ['var1', 'var6']]), [2.4200000000000004, 0.4132231404958677, 7.26, 0.13774104683195593, 35.138400000000004, 0.02845889397354461, -1])\n assert answers_match(candidate(equations=[['v1', 'v2'], ['v2', 'v3'], ['v3', 'v4'], ['v4', 'v5'], ['v5', 'v6']], values=[1.2, 1.5, 1.7, 1.9, 2.1], queries=[['v1', 'v6'], ['v6', 'v1'], ['v2', 'v5'], ['v5', 'v2'], ['v3', 'v4']]), [12.209399999999997, 0.08190410667190855, 4.844999999999999, 0.20639834881320954, 1.7])\n assert answers_match(candidate(equations=[['p1', 'p2'], ['p2', 'p3'], ['p3', 'p4'], ['p4', 'p5'], ['p5', 'p1']], values=[2.0, 3.0, 0.5, 0.25, 4.0], queries=[['p1', 'p3'], ['p3', 'p1'], ['p2', 'p5'], ['p4', 'p2'], ['p1', 'p6']]), [6.0, 0.16666666666666666, 0.375, 0.6666666666666666, -1])\n assert answers_match(candidate(equations=[['m', 'n'], ['n', 'o'], ['o', 'p'], ['p', 'q'], ['q', 'r']], values=[2.0, 3.0, 4.0, 5.0, 6.0], queries=[['m', 'r'], ['r', 'q'], ['q', 'p'], ['p', 'o'], ['o', 'n'], ['n', 'm']]), [720.0, 0.16666666666666666, 0.2, 0.25, 0.3333333333333333, 0.5])\n assert answers_match(candidate(equations=[['x', 'y'], ['y', 'z'], ['z', 'w'], ['w', 'v'], ['v', 'u'], ['u', 't']], values=[2.0, 3.0, 4.0, 5.0, 6.0, 7.0], queries=[['x', 't'], ['t', 'x'], ['y', 'u'], ['u', 'y'], ['z', 'v'], ['v', 'z']]), [5040.0, 0.0001984126984126984, 360.0, 0.002777777777777778, 20.0, 0.05])\n assert answers_match(candidate(equations=[['m', 'n'], ['n', 'o'], ['o', 'p'], ['p', 'q'], ['q', 'r'], ['r', 's']], values=[1.5, 2.5, 3.5, 4.5, 5.5, 6.5], queries=[['m', 's'], ['s', 'm'], ['m', 'r'], ['r', 'm'], ['m', 'q'], ['q', 'm'], ['m', 'p'], ['p', 'm'], ['m', 'o'], ['o', 'm'], ['m', 'n'], ['n', 'm'], ['t', 't']]), [2111.484375, 0.0004736004736004736, 324.84375, 0.0030784030784030783, 59.0625, 0.016931216931216932, 13.125, 0.0761904761904762, 3.75, 0.26666666666666666, 1.5, 0.6666666666666666, -1])\n assert answers_match(candidate(equations=[['s1', 's2'], ['s2', 's3'], ['s3', 's4'], ['s4', 's5'], ['s5', 's1'], ['s1', 's6'], ['s6', 's2']], values=[1.1, 1.2, 1.3, 1.4, 1.5, 2.0, 0.5], queries=[['s1', 's5'], ['s5', 's1'], ['s2', 's4'], ['s3', 's2'], ['s1', 's7']]), [2.4024, 0.41625041625041626, 1.56, 0.8333333333333335, -1])\n assert answers_match(candidate(equations=[['x1', 'x2'], ['x2', 'x3'], ['x3', 'x4'], ['x4', 'x5'], ['x5', 'x6'], ['x6', 'x7'], ['x7', 'x1']], values=[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0], queries=[['x1', 'x7'], ['x7', 'x1'], ['x2', 'x5'], ['x5', 'x2'], ['x3', 'x6'], ['x6', 'x3']]), [720.0, 0.001388888888888889, 24.0, 0.041666666666666664, 60.0, 0.016666666666666666])\n assert answers_match(candidate(equations=[['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e']], values=[2.0, 3.0, 4.0, 5.0], queries=[['a', 'e'], ['e', 'a'], ['a', 'd'], ['d', 'a'], ['x', 'y']]), [120.0, 0.008333333333333333, 24.0, 0.041666666666666664, -1])\n assert answers_match(candidate(equations=[['node1', 'node2'], ['node2', 'node3'], ['node3', 'node4'], ['node4', 'node5'], ['node5', 'node6'], ['node6', 'node7'], ['node7', 'node8'], ['node8', 'node9']], values=[1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8], queries=[['node1', 'node9'], ['node9', 'node1'], ['node2', 'node8'], ['node8', 'node2'], ['node3', 'node7'], ['node7', 'node3'], ['node4', 'node6'], ['node6', 'node4'], ['node1', 'node10']]), [17.6432256, 0.0566789782476057, 8.91072, 0.11222437693025929, 4.368, 0.2289377289377289, 2.0999999999999996, 0.4761904761904762, -1])\n", "comparison": "float"}, "public_tests": ["[[\"a\",\"b\"],[\"b\",\"c\"]]\n[2.0,3.0]\n[[\"a\",\"c\"],[\"b\",\"a\"],[\"a\",\"e\"],[\"a\",\"a\"],[\"x\",\"x\"]]", "[[\"a\",\"b\"],[\"b\",\"c\"],[\"bc\",\"cd\"]]\n[1.5,2.5,5.0]\n[[\"a\",\"c\"],[\"c\",\"b\"],[\"bc\",\"cd\"],[\"cd\",\"bc\"]]", "[[\"a\",\"b\"]]\n[0.5]\n[[\"a\",\"b\"],[\"b\",\"a\"],[\"a\",\"c\"],[\"x\",\"y\"]]"], "hints": ["Do you recognize this as a graph problem?"], "metadata": {"canonical_parameter_names": ["equations", "values", "queries"], "leetcode_dataset_entry_point": "Solution().calcEquation", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:47:59+00:00", "tests_total": 57, "tests_dropped": 6, "flags": ["decimal_answer"], "topic_tags": ["array", "string", "depth-first-search", "breadth-first-search", "union-find", "graph", "shortest-path", "bellman-ford-algorithm", "floyd-warshall-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def calc_equation(equations, values, queries)", "container": null, "callable": "calc_equation", "parameters": [{"name": "equations", "type": "String[][]"}, {"name": "values", "type": "Float[]"}, {"name": "queries", "type": "String[][]"}], "return_type": "Float[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 400, "task_id": "nth-digit", "difficulty": "Medium", "problem_description": "Given an integer n, return the n^th digit of the infinite integer sequence [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ...].\n\nExample 1:\n\nInput: n = 3\nOutput: 3\n\nExample 2:\n\nInput: n = 11\nOutput: 0\nExplanation: The 11^th digit of the sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ... is a 0, which is part of the number 10.\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == 3\n assert candidate(n = 11) == 0\n assert candidate(n = 231) == 3\n assert candidate(n = 15) == 2\n assert candidate(n = 2147483647) == 2\n assert candidate(n = 1000000) == 1\n assert candidate(n = 123456789) == 2\n assert candidate(n = 100) == 5\n assert candidate(n = 1000) == 3\n assert candidate(n = 99999) == 1\n assert candidate(n = 999999999) == 9\n assert candidate(n = 2147483646) == 2\n assert candidate(n = 12345) == 3\n assert candidate(n = 2000000000) == 3\n assert candidate(n = 50000) == 1\n assert candidate(n = 50) == 3\n assert candidate(n = 190) == 1\n assert candidate(n = 987654) == 3\n assert candidate(n = 123) == 6\n assert candidate(n = 300) == 6\n assert candidate(n = 99) == 4\n assert candidate(n = 10000) == 7\n assert candidate(n = 1001) == 7\n assert candidate(n = 8976543) == 4\n assert candidate(n = 2100000000) == 5\n assert candidate(n = 360) == 6\n assert candidate(n = 2147483645) == 7\n assert candidate(n = 777777777) == 0\n assert candidate(n = 100000) == 2\n assert candidate(n = 20000) == 7\n assert candidate(n = 999) == 9\n assert candidate(n = 1000000010) == 2\n assert candidate(n = 5000) == 2\n assert candidate(n = 256) == 1\n assert candidate(n = 1000000000) == 1\n assert candidate(n = 1000000001) == 2\n assert candidate(n = 111111111) == 7\n assert candidate(n = 987654321) == 7\n assert candidate(n = 888888888) == 0\n assert candidate(n = 2500) == 8\n assert candidate(n = 500000) == 5\n assert candidate(n = 189) == 9\n assert candidate(n = 150000000) == 8\n assert candidate(n = 500000000) == 8\n assert candidate(n = 9) == 9\n assert candidate(n = 1234567) == 2\n assert candidate(n = 19999) == 2\n assert candidate(n = 999999) == 4\n assert candidate(n = 123456) == 6\n assert candidate(n = 10) == 1\n", "comparison": "exact"}, "public_tests": ["3", "11"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().findNthDigit", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:01+00:00", "tests_total": 50, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def find_nth_digit(n)", "container": null, "callable": "find_nth_digit", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 401, "task_id": "binary-watch", "difficulty": "Easy", "problem_description": "A binary watch has 4 LEDs on the top to represent the hours (0-11), and 6 LEDs on the bottom to represent the minutes (0-59). Each LED represents a zero or one, with the least significant bit on the right.\n\n- For example, the below binary watch reads \"4:51\".\n\nGiven an integer turnedOn which represents the number of LEDs that are currently on (ignoring the PM), return all possible times the watch could represent. You may return the answer in any order.\n\nThe hour must not contain a leading zero.\n\n- For example, \"01:00\" is not valid. It should be \"1:00\".\n\nThe minute must consist of two digits and may contain a leading zero.\n\n- For example, \"10:2\" is not valid. It should be \"10:02\".\n\nExample 1:\n\nInput: turnedOn = 1\nOutput: [\"0:01\",\"0:02\",\"0:04\",\"0:08\",\"0:16\",\"0:32\",\"1:00\",\"2:00\",\"4:00\",\"8:00\"]\n\nExample 2:\n\nInput: turnedOn = 9\nOutput: []\n\nConstraints:\n\n- 0 <= turnedOn <= 10\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(turnedOn=5), ['0:31', '0:47', '0:55', '0:59', '1:15', '1:23', '1:27', '1:29', '1:30', '1:39', '1:43', '1:45', '1:46', '1:51', '1:53', '1:54', '1:57', '1:58', '2:15', '2:23', '2:27', '2:29', '2:30', '2:39', '2:43', '2:45', '2:46', '2:51', '2:53', '2:54', '2:57', '2:58', '3:07', '3:11', '3:13', '3:14', '3:19', '3:21', '3:22', '3:25', '3:26', '3:28', '3:35', '3:37', '3:38', '3:41', '3:42', '3:44', '3:49', '3:50', '3:52', '3:56', '4:15', '4:23', '4:27', '4:29', '4:30', '4:39', '4:43', '4:45', '4:46', '4:51', '4:53', '4:54', '4:57', '4:58', '5:07', '5:11', '5:13', '5:14', '5:19', '5:21', '5:22', '5:25', '5:26', '5:28', '5:35', '5:37', '5:38', '5:41', '5:42', '5:44', '5:49', '5:50', '5:52', '5:56', '6:07', '6:11', '6:13', '6:14', '6:19', '6:21', '6:22', '6:25', '6:26', '6:28', '6:35', '6:37', '6:38', '6:41', '6:42', '6:44', '6:49', '6:50', '6:52', '6:56', '7:03', '7:05', '7:06', '7:09', '7:10', '7:12', '7:17', '7:18', '7:20', '7:24', '7:33', '7:34', '7:36', '7:40', '7:48', '8:15', '8:23', '8:27', '8:29', '8:30', '8:39', '8:43', '8:45', '8:46', '8:51', '8:53', '8:54', '8:57', '8:58', '9:07', '9:11', '9:13', '9:14', '9:19', '9:21', '9:22', '9:25', '9:26', '9:28', '9:35', '9:37', '9:38', '9:41', '9:42', '9:44', '9:49', '9:50', '9:52', '9:56', '10:07', '10:11', '10:13', '10:14', '10:19', '10:21', '10:22', '10:25', '10:26', '10:28', '10:35', '10:37', '10:38', '10:41', '10:42', '10:44', '10:49', '10:50', '10:52', '10:56', '11:03', '11:05', '11:06', '11:09', '11:10', '11:12', '11:17', '11:18', '11:20', '11:24', '11:33', '11:34', '11:36', '11:40', '11:48'])\n assert answers_match(candidate(turnedOn=8), ['7:31', '7:47', '7:55', '7:59', '11:31', '11:47', '11:55', '11:59'])\n assert answers_match(candidate(turnedOn=0), ['0:00'])\n assert answers_match(candidate(turnedOn=9), [])\n assert answers_match(candidate(turnedOn=3), ['0:07', '0:11', '0:13', '0:14', '0:19', '0:21', '0:22', '0:25', '0:26', '0:28', '0:35', '0:37', '0:38', '0:41', '0:42', '0:44', '0:49', '0:50', '0:52', '0:56', '1:03', '1:05', '1:06', '1:09', '1:10', '1:12', '1:17', '1:18', '1:20', '1:24', '1:33', '1:34', '1:36', '1:40', '1:48', '2:03', '2:05', '2:06', '2:09', '2:10', '2:12', '2:17', '2:18', '2:20', '2:24', '2:33', '2:34', '2:36', '2:40', '2:48', '3:01', '3:02', '3:04', '3:08', '3:16', '3:32', '4:03', '4:05', '4:06', '4:09', '4:10', '4:12', '4:17', '4:18', '4:20', '4:24', '4:33', '4:34', '4:36', '4:40', '4:48', '5:01', '5:02', '5:04', '5:08', '5:16', '5:32', '6:01', '6:02', '6:04', '6:08', '6:16', '6:32', '7:00', '8:03', '8:05', '8:06', '8:09', '8:10', '8:12', '8:17', '8:18', '8:20', '8:24', '8:33', '8:34', '8:36', '8:40', '8:48', '9:01', '9:02', '9:04', '9:08', '9:16', '9:32', '10:01', '10:02', '10:04', '10:08', '10:16', '10:32', '11:00'])\n assert answers_match(candidate(turnedOn=10), [])\n assert answers_match(candidate(turnedOn=4), ['0:15', '0:23', '0:27', '0:29', '0:30', '0:39', '0:43', '0:45', '0:46', '0:51', '0:53', '0:54', '0:57', '0:58', '1:07', '1:11', '1:13', '1:14', '1:19', '1:21', '1:22', '1:25', '1:26', '1:28', '1:35', '1:37', '1:38', '1:41', '1:42', '1:44', '1:49', '1:50', '1:52', '1:56', '2:07', '2:11', '2:13', '2:14', '2:19', '2:21', '2:22', '2:25', '2:26', '2:28', '2:35', '2:37', '2:38', '2:41', '2:42', '2:44', '2:49', '2:50', '2:52', '2:56', '3:03', '3:05', '3:06', '3:09', '3:10', '3:12', '3:17', '3:18', '3:20', '3:24', '3:33', '3:34', '3:36', '3:40', '3:48', '4:07', '4:11', '4:13', '4:14', '4:19', '4:21', '4:22', '4:25', '4:26', '4:28', '4:35', '4:37', '4:38', '4:41', '4:42', '4:44', '4:49', '4:50', '4:52', '4:56', '5:03', '5:05', '5:06', '5:09', '5:10', '5:12', '5:17', '5:18', '5:20', '5:24', '5:33', '5:34', '5:36', '5:40', '5:48', '6:03', '6:05', '6:06', '6:09', '6:10', '6:12', '6:17', '6:18', '6:20', '6:24', '6:33', '6:34', '6:36', '6:40', '6:48', '7:01', '7:02', '7:04', '7:08', '7:16', '7:32', '8:07', '8:11', '8:13', '8:14', '8:19', '8:21', '8:22', '8:25', '8:26', '8:28', '8:35', '8:37', '8:38', '8:41', '8:42', '8:44', '8:49', '8:50', '8:52', '8:56', '9:03', '9:05', '9:06', '9:09', '9:10', '9:12', '9:17', '9:18', '9:20', '9:24', '9:33', '9:34', '9:36', '9:40', '9:48', '10:03', '10:05', '10:06', '10:09', '10:10', '10:12', '10:17', '10:18', '10:20', '10:24', '10:33', '10:34', '10:36', '10:40', '10:48', '11:01', '11:02', '11:04', '11:08', '11:16', '11:32'])\n assert answers_match(candidate(turnedOn=2), ['0:03', '0:05', '0:06', '0:09', '0:10', '0:12', '0:17', '0:18', '0:20', '0:24', '0:33', '0:34', '0:36', '0:40', '0:48', '1:01', '1:02', '1:04', '1:08', '1:16', '1:32', '2:01', '2:02', '2:04', '2:08', '2:16', '2:32', '3:00', '4:01', '4:02', '4:04', '4:08', '4:16', '4:32', '5:00', '6:00', '8:01', '8:02', '8:04', '8:08', '8:16', '8:32', '9:00', '10:00'])\n assert answers_match(candidate(turnedOn=6), ['1:31', '1:47', '1:55', '1:59', '2:31', '2:47', '2:55', '2:59', '3:15', '3:23', '3:27', '3:29', '3:30', '3:39', '3:43', '3:45', '3:46', '3:51', '3:53', '3:54', '3:57', '3:58', '4:31', '4:47', '4:55', '4:59', '5:15', '5:23', '5:27', '5:29', '5:30', '5:39', '5:43', '5:45', '5:46', '5:51', '5:53', '5:54', '5:57', '5:58', '6:15', '6:23', '6:27', '6:29', '6:30', '6:39', '6:43', '6:45', '6:46', '6:51', '6:53', '6:54', '6:57', '6:58', '7:07', '7:11', '7:13', '7:14', '7:19', '7:21', '7:22', '7:25', '7:26', '7:28', '7:35', '7:37', '7:38', '7:41', '7:42', '7:44', '7:49', '7:50', '7:52', '7:56', '8:31', '8:47', '8:55', '8:59', '9:15', '9:23', '9:27', '9:29', '9:30', '9:39', '9:43', '9:45', '9:46', '9:51', '9:53', '9:54', '9:57', '9:58', '10:15', '10:23', '10:27', '10:29', '10:30', '10:39', '10:43', '10:45', '10:46', '10:51', '10:53', '10:54', '10:57', '10:58', '11:07', '11:11', '11:13', '11:14', '11:19', '11:21', '11:22', '11:25', '11:26', '11:28', '11:35', '11:37', '11:38', '11:41', '11:42', '11:44', '11:49', '11:50', '11:52', '11:56'])\n assert answers_match(candidate(turnedOn=1), ['0:01', '0:02', '0:04', '0:08', '0:16', '0:32', '1:00', '2:00', '4:00', '8:00'])\n assert answers_match(candidate(turnedOn=7), ['3:31', '3:47', '3:55', '3:59', '5:31', '5:47', '5:55', '5:59', '6:31', '6:47', '6:55', '6:59', '7:15', '7:23', '7:27', '7:29', '7:30', '7:39', '7:43', '7:45', '7:46', '7:51', '7:53', '7:54', '7:57', '7:58', '9:31', '9:47', '9:55', '9:59', '10:31', '10:47', '10:55', '10:59', '11:15', '11:23', '11:27', '11:29', '11:30', '11:39', '11:43', '11:45', '11:46', '11:51', '11:53', '11:54', '11:57', '11:58'])\n", "comparison": "unordered"}, "public_tests": ["1", "9"], "hints": ["Simplify by seeking for solutions that involve comparing set bit counts.", "Consider precomputing all possible times for comparison."], "metadata": {"canonical_parameter_names": ["turnedOn"], "leetcode_dataset_entry_point": "Solution().readBinaryWatch", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:03+00:00", "tests_total": 12, "tests_dropped": 1, "flags": ["any_order", "has_images"], "topic_tags": ["backtracking", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def read_binary_watch(turned_on)", "container": null, "callable": "read_binary_watch", "parameters": [{"name": "turned_on", "type": "Integer"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 402, "task_id": "remove-k-digits", "difficulty": "Medium", "problem_description": "Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num.\n\nExample 1:\n\nInput: num = \"1432219\", k = 3\nOutput: \"1219\"\nExplanation: Remove the three digits 4, 3, and 2 to form the new number 1219 which is the smallest.\n\nExample 2:\n\nInput: num = \"10200\", k = 1\nOutput: \"200\"\nExplanation: Remove the leading 1 and the number is 200. Note that the output must not contain leading zeroes.\n\nExample 3:\n\nInput: num = \"10\", k = 2\nOutput: \"0\"\nExplanation: Remove all the digits from the number and it is left with nothing which is 0.\n\nConstraints:\n\n- 1 <= k <= num.length <= 10^5\n- num consists of only digits.\n- num does not have any leading zeros except for the zero itself.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = \"100\",k = 1) == \"0\"\n assert candidate(num = \"999\",k = 2) == \"9\"\n assert candidate(num = \"1234567890\",k = 9) == \"0\"\n assert candidate(num = \"111111\",k = 2) == \"1111\"\n assert candidate(num = \"987654321\",k = 5) == \"4321\"\n assert candidate(num = \"11111\",k = 2) == \"111\"\n assert candidate(num = \"12345\",k = 2) == \"123\"\n assert candidate(num = \"1111\",k = 2) == \"11\"\n assert candidate(num = \"10001\",k = 1) == \"1\"\n assert candidate(num = \"123456789\",k = 5) == \"1234\"\n assert candidate(num = \"112\",k = 1) == \"11\"\n assert candidate(num = \"99991\",k = 1) == \"9991\"\n assert candidate(num = \"123123\",k = 3) == \"112\"\n assert candidate(num = \"10200\",k = 1) == \"200\"\n assert candidate(num = \"1234567890\",k = 5) == \"12340\"\n assert candidate(num = \"1432219\",k = 3) == \"1219\"\n assert candidate(num = \"9999\",k = 2) == \"99\"\n assert candidate(num = \"10\",k = 1) == \"0\"\n assert candidate(num = \"10\",k = 2) == \"0\"\n assert candidate(num = \"100100\",k = 3) == \"0\"\n assert candidate(num = \"333222111\",k = 5) == \"2111\"\n assert candidate(num = \"9999999999\",k = 5) == \"99999\"\n assert candidate(num = \"12345678900000000000\",k = 10) == \"0\"\n assert candidate(num = \"110011001100\",k = 6) == \"0\"\n assert candidate(num = \"123123123123\",k = 6) == \"111123\"\n assert candidate(num = \"123454321\",k = 4) == \"12321\"\n assert candidate(num = \"111999111999\",k = 6) == \"111111\"\n assert candidate(num = \"2020202020\",k = 5) == \"0\"\n assert candidate(num = \"100100100100100\",k = 5) == \"0\"\n assert candidate(num = \"532354235\",k = 4) == \"23235\"\n assert candidate(num = \"1000000000\",k = 9) == \"0\"\n assert candidate(num = \"3847283948574859234895742389475\",k = 20) == \"22342389475\"\n assert candidate(num = \"999888777666\",k = 6) == \"777666\"\n assert candidate(num = \"100010001\",k = 3) == \"0\"\n assert candidate(num = \"111000111000\",k = 6) == \"0\"\n assert candidate(num = \"5432100000\",k = 2) == \"32100000\"\n assert candidate(num = \"123456789987654321\",k = 10) == \"12344321\"\n assert candidate(num = \"1221221221\",k = 5) == \"11121\"\n assert candidate(num = \"00000000000000000000\",k = 10) == \"0\"\n assert candidate(num = \"111222333444\",k = 6) == \"111222\"\n assert candidate(num = \"12345678901234567890\",k = 10) == \"123456780\"\n assert candidate(num = \"1000000000\",k = 8) == \"0\"\n assert candidate(num = \"100010001000\",k = 6) == \"0\"\n assert candidate(num = \"10000000000000000000\",k = 15) == \"0\"\n assert candidate(num = \"59112346758\",k = 4) == \"1123458\"\n assert candidate(num = \"1122334455\",k = 5) == \"11223\"\n assert candidate(num = \"100100100100\",k = 5) == \"0\"\n assert candidate(num = \"100100100100\",k = 6) == \"0\"\n assert candidate(num = \"5959595959\",k = 5) == \"55555\"\n assert candidate(num = \"111222333\",k = 5) == \"1112\"\n assert candidate(num = \"12345678900000000000\",k = 15) == \"0\"\n assert candidate(num = \"1000100010001000\",k = 8) == \"0\"\n assert candidate(num = \"11111111111111111111\",k = 15) == \"11111\"\n assert candidate(num = \"1098765432\",k = 5) == \"5432\"\n assert candidate(num = \"12341234\",k = 4) == \"1123\"\n assert candidate(num = \"987654321098765432109876543210\",k = 20) == \"76543210\"\n assert candidate(num = \"100010001000\",k = 5) == \"0\"\n assert candidate(num = \"999111999111\",k = 4) == \"11199111\"\n assert candidate(num = \"98765432101234567890\",k = 10) == \"123456780\"\n assert candidate(num = \"1234512345\",k = 5) == \"11234\"\n assert candidate(num = \"100010001\",k = 4) == \"0\"\n assert candidate(num = \"12345678909876543210\",k = 15) == \"3210\"\n assert candidate(num = \"98765432100000\",k = 10) == \"0\"\n assert candidate(num = \"99887766554433221100\",k = 10) == \"4433221100\"\n assert candidate(num = \"100020003000\",k = 3) == \"0\"\n assert candidate(num = \"123412341234\",k = 6) == \"111234\"\n assert candidate(num = \"98765432100000000000\",k = 10) == \"0\"\n assert candidate(num = \"98765432100123456789\",k = 10) == \"12345678\"\n assert candidate(num = \"9876543210\",k = 5) == \"43210\"\n assert candidate(num = \"98765432109876543210\",k = 10) == \"876543210\"\n assert candidate(num = \"101010101010\",k = 5) == \"10\"\n assert candidate(num = \"123456789\",k = 4) == \"12345\"\n assert candidate(num = \"5432154321\",k = 5) == \"14321\"\n assert candidate(num = \"533729941590110\",k = 5) == \"2941590110\"\n assert candidate(num = \"100100100100100100100100100100100100100\",k = 20) == \"0\"\n assert candidate(num = \"123321123321\",k = 5) == \"1112321\"\n assert candidate(num = \"1000100010\",k = 5) == \"0\"\n assert candidate(num = \"55555555555555555555\",k = 15) == \"55555\"\n assert candidate(num = \"111222333\",k = 4) == \"11122\"\n assert candidate(num = \"1234567890\",k = 1) == \"123456780\"\n assert candidate(num = \"59595959\",k = 4) == \"5555\"\n assert candidate(num = \"999887766554433221100\",k = 10) == \"54433221100\"\n assert candidate(num = \"10000000000000000000\",k = 10) == \"0\"\n assert candidate(num = \"533721121233121212\",k = 7) == \"11123121212\"\n assert candidate(num = \"11111111111111111111\",k = 10) == \"1111111111\"\n assert candidate(num = \"5432109876543210\",k = 10) == \"43210\"\n assert candidate(num = \"543210123456789\",k = 5) == \"123456789\"\n assert candidate(num = \"9999999999\",k = 9) == \"9\"\n assert candidate(num = \"1010101010\",k = 5) == \"0\"\n assert candidate(num = \"123456789012345678901234567890\",k = 20) == \"12345670\"\n assert candidate(num = \"111222333444555666777888999000111222\",k = 20) == \"1112223000111222\"\n assert candidate(num = \"100100100\",k = 3) == \"0\"\n assert candidate(num = \"999888777666555444333222111000\",k = 15) == \"444333222111000\"\n assert candidate(num = \"12003004005\",k = 3) == \"4005\"\n assert candidate(num = \"5959595959\",k = 4) == \"555559\"\n assert candidate(num = \"129384756\",k = 3) == \"123456\"\n assert candidate(num = \"0000000000\",k = 5) == \"0\"\n assert candidate(num = \"3332211\",k = 3) == \"2211\"\n assert candidate(num = \"1223344556677889900\",k = 10) == \"122334400\"\n assert candidate(num = \"111222333444555\",k = 10) == \"11122\"\n assert candidate(num = \"54321\",k = 2) == \"321\"\n assert candidate(num = \"999999999999\",k = 11) == \"9\"\n assert candidate(num = \"999999999\",k = 5) == \"9999\"\n assert candidate(num = \"120012001200\",k = 6) == \"0\"\n assert candidate(num = \"11223344556677889900\",k = 15) == \"11200\"\n assert candidate(num = \"999999999999\",k = 6) == \"999999\"\n assert candidate(num = \"100000000000000000000\",k = 19) == \"0\"\n assert candidate(num = \"100010001\",k = 6) == \"0\"\n assert candidate(num = \"123045607890\",k = 5) == \"407890\"\n", "comparison": "exact"}, "public_tests": ["\"1432219\"\n3", "\"10200\"\n1", "\"10\"\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["num", "k"], "leetcode_dataset_entry_point": "Solution().removeKdigits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:06+00:00", "tests_total": 111, "tests_dropped": 2, "flags": [], "topic_tags": ["string", "stack", "greedy", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def remove_kdigits(num, k)", "container": null, "callable": "remove_kdigits", "parameters": [{"name": "num", "type": "String"}, {"name": "k", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 403, "task_id": "frog-jump", "difficulty": "Hard", "problem_description": "A frog is crossing a river. The river is divided into some number of units, and at each unit, there may or may not exist a stone. The frog can jump on a stone, but it must not jump into the water.\n\nGiven a list of stones positions (in units) in sorted ascending order, determine if the frog can cross the river by landing on the last stone. Initially, the frog is on the first stone and assumes the first jump must be 1 unit.\n\nIf the frog's last jump was k units, its next jump must be either k - 1, k, or k + 1 units. The frog can only jump in the forward direction.\n\nExample 1:\n\nInput: stones = [0,1,3,5,6,8,12,17]\nOutput: true\nExplanation: The frog can jump to the last stone by jumping 1 unit to the 2nd stone, then 2 units to the 3rd stone, then 2 units to the 4th stone, then 3 units to the 6th stone, 4 units to the 7th stone, and 5 units to the 8th stone.\n\nExample 2:\n\nInput: stones = [0,1,2,3,4,8,9,11]\nOutput: false\nExplanation: There is no way to jump to the last stone as the gap between the 5th and 6th stone is too large.\n\nConstraints:\n\n- 2 <= stones.length <= 2000\n- 0 <= stones[i] <= 2^31 - 1\n- stones[0] == 0\n- stones is sorted in a strictly increasing order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(stones = [0, 1, 3, 8, 14, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == False\n assert candidate(stones = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21]) == True\n assert candidate(stones = [0, 1, 4, 8, 16]) == False\n assert candidate(stones = [0, 2, 5, 6, 8, 10, 11, 13, 15, 17, 18, 19, 20]) == False\n assert candidate(stones = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(stones = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == True\n assert candidate(stones = [0, 1, 4, 8, 10, 12, 15, 17, 20]) == False\n assert candidate(stones = [0, 1, 2]) == True\n assert candidate(stones = [0, 1, 4, 8, 9, 11]) == False\n assert candidate(stones = [0, 2]) == False\n assert candidate(stones = [0, 1, 2, 3, 4, 8, 9, 11]) == False\n assert candidate(stones = [0, 1, 4, 5, 6, 8, 9, 11, 17, 20, 21]) == False\n assert candidate(stones = [0, 1, 2, 5, 7, 9, 11, 12, 14, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 30]) == False\n assert candidate(stones = [0, 1, 4, 5, 6, 8, 9, 12]) == False\n assert candidate(stones = [0, 1, 3, 5, 6, 8, 12, 17]) == True\n assert candidate(stones = [0, 1, 4, 5, 6, 8, 12, 13, 14, 17, 19]) == False\n assert candidate(stones = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(stones = [0, 1, 3, 5, 7, 10, 14, 19, 25, 32, 40, 49, 59, 70, 82, 95, 109, 124, 140, 157, 175, 194, 214]) == True\n assert candidate(stones = [0, 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172]) == True\n assert candidate(stones = [0, 1, 5, 8, 13, 21, 26, 35, 45, 56, 68, 81, 95, 110, 126]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153]) == True\n assert candidate(stones = [0, 1, 3, 7, 14, 23, 34, 47, 62, 79, 98, 119, 142, 167, 194, 223, 254, 287, 322, 359, 398, 439, 482, 527, 574, 623, 674, 727, 782, 839, 898, 959, 1022, 1087, 1154, 1223, 1294, 1367, 1442, 1519, 1598, 1679, 1762, 1847, 1934, 2023, 2114, 2207, 2302, 2400]) == False\n assert candidate(stones = [0, 1, 6, 15, 26, 39, 54, 71, 90, 111]) == False\n assert candidate(stones = [0, 1, 4, 9, 15, 22, 30, 39, 49, 60, 72, 85]) == False\n assert candidate(stones = [0, 1, 5, 9, 14, 20, 27, 35, 44]) == False\n assert candidate(stones = [0, 1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172, 191, 211, 232, 254, 277, 301, 326, 352, 379, 407, 436, 466, 497]) == True\n assert candidate(stones = [0, 1, 12, 26, 42, 60, 80, 102, 126, 152, 180, 210, 242, 276, 312]) == False\n assert candidate(stones = [0, 1, 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, 133, 157]) == False\n assert candidate(stones = [0, 1, 4, 10, 19, 31, 46, 64, 85, 109, 136, 166, 199, 235, 274, 316, 361, 409, 460, 514, 571, 631, 694, 760, 829, 899, 972, 1048, 1127, 1209, 1294, 1382, 1473, 1567, 1664, 1764, 1867, 1973, 2082, 2194, 2309, 2427, 2548, 2672, 2800, 2931, 3065, 3202, 3342, 3485, 3631, 3779, 3929, 4082, 4238, 4397, 4559, 4724, 4892, 5063, 5237, 5414, 5594, 5777, 5963, 6152, 6344, 6539, 6737, 6938, 7142, 7349, 7559, 7772, 7988, 8207, 8429, 8654, 8882, 9113, 9347, 9584, 9824]) == False\n assert candidate(stones = [0, 1, 3, 7, 15, 31, 63, 127]) == False\n assert candidate(stones = [0, 1, 4, 8, 13, 21, 31, 44, 60, 79, 101, 126, 154]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253]) == True\n assert candidate(stones = [0, 1, 4, 8, 14, 22, 32, 44, 58, 74, 92, 112, 134, 158, 184, 212, 242, 274, 308, 344, 382, 422, 464, 508, 554, 602, 652, 704, 758, 814, 872, 932, 994, 1058, 1124, 1192, 1262, 1334, 1408, 1484, 1562, 1642, 1724, 1808, 1894, 1982, 2072, 2164, 2258, 2354, 2452, 2552, 2654, 2758, 2864, 2972, 3082, 3194, 3308, 3424, 3542, 3662, 3784, 3908, 4034, 4162, 4292, 4424, 4558, 4694, 4832, 4972, 5114, 5258, 5404, 5552, 5702, 5854, 6008, 6164, 6322, 6482, 6644, 6808, 6974, 7142, 7312, 7484, 7658, 7834, 8012, 8192, 8374, 8558, 8744, 8932, 9122, 9314, 9508, 9704, 9902, 10102]) == False\n assert candidate(stones = [0, 1, 3, 5, 9, 15, 23, 33, 45, 59, 75, 93, 113, 135, 159, 185, 213, 243, 275, 309, 345, 383, 423]) == False\n assert candidate(stones = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]) == True\n assert candidate(stones = [0, 1, 2, 5, 7, 10, 14, 19]) == False\n assert candidate(stones = [0, 1, 3, 7, 11, 17, 23, 31, 41, 53]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 299, 323, 348, 374, 401, 429]) == True\n assert candidate(stones = [0, 1, 5, 11, 18, 27, 37, 48, 60, 74, 89, 105, 122, 140, 159]) == False\n assert candidate(stones = [0, 1, 3, 7, 9, 11, 14, 17, 19, 21, 24, 28, 31, 35, 39]) == False\n assert candidate(stones = [0, 1, 5, 14, 26, 40, 55, 71, 88, 106, 125, 145, 166, 188, 211, 235, 260, 286, 313]) == False\n assert candidate(stones = [0, 1, 3, 8, 15, 24, 35, 48, 63, 80, 99, 120, 143, 168, 195, 224, 255, 288, 323, 360, 400]) == False\n assert candidate(stones = [0, 1, 10, 22, 36, 52, 70, 90, 112, 136, 162, 190, 220]) == False\n assert candidate(stones = [0, 1, 4, 9, 15, 22, 30, 40, 51, 63, 76, 90, 105]) == False\n assert candidate(stones = [0, 1, 2, 5, 7, 9, 10, 11, 12, 13, 14, 17, 19, 20, 23, 26, 29, 31]) == False\n assert candidate(stones = [0, 1, 5, 9, 15, 22, 30, 39, 50, 62]) == False\n assert candidate(stones = [0, 1, 11, 24, 39, 56, 75, 96, 119, 144, 171, 199, 229, 261]) == False\n assert candidate(stones = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121]) == False\n assert candidate(stones = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916, 3025, 3136, 3249, 3364, 3481, 3600, 3721, 3844, 3969, 4096, 4225, 4356, 4489, 4624, 4761, 4900, 5041, 5184, 5329, 5476, 5625, 5776, 5929, 6084, 6241, 6400, 6561, 6724, 6889, 7056, 7225, 7396, 7569, 7744, 7921, 8100, 8281, 8464, 8649, 8836, 9025, 9216, 9409, 9604, 9801, 10000]) == False\n assert candidate(stones = [0, 1, 7, 16, 28, 42, 58, 77, 98, 121]) == False\n assert candidate(stones = [0, 1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 26]) == False\n assert candidate(stones = [0, 1, 5, 11, 21, 34, 50, 69, 91, 116, 145, 178, 215, 256, 301, 350, 403, 460, 521, 586, 655, 728, 805, 886, 972]) == False\n assert candidate(stones = [0, 1, 3, 7, 12, 18, 25, 33, 42, 52, 63, 75, 88]) == False\n assert candidate(stones = [0, 1, 9, 20, 33, 48, 65, 84, 105, 128, 153, 180]) == False\n assert candidate(stones = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]) == False\n assert candidate(stones = [0, 1, 2, 4, 6, 7, 9, 10, 12, 14, 15, 17, 18, 20, 21, 23, 24, 26, 27, 29, 30]) == True\n assert candidate(stones = [0, 1, 4, 10, 19, 30, 43, 58, 75, 94, 115, 138, 163, 190, 219]) == False\n assert candidate(stones = [0, 1, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79, 92, 106, 121, 137, 154, 172, 191, 211, 232, 254, 277, 301]) == False\n assert candidate(stones = [0, 1, 2, 4, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200, 208, 216, 224, 232, 240, 248, 256]) == False\n assert candidate(stones = [0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 15, 17, 19, 21, 23]) == True\n assert candidate(stones = [0, 1, 3, 5, 9, 13, 15, 19, 22, 26, 30, 34, 38, 42, 46]) == False\n assert candidate(stones = [0, 1, 2, 3, 7, 12, 16, 24, 28, 35]) == False\n assert candidate(stones = [0, 1, 3, 7, 11, 13, 15, 17, 19, 23, 27]) == False\n assert candidate(stones = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(stones = [0, 1, 2, 6, 10, 18, 22, 26, 32, 38, 44, 48, 52, 58, 64, 70]) == False\n assert candidate(stones = [0, 1, 3, 5, 11, 21, 33, 47, 63, 81, 101, 123, 147, 173, 201, 231, 263, 297, 333, 371, 411, 453, 497, 543, 591, 641, 693, 747, 803, 861, 921, 983]) == False\n assert candidate(stones = [0, 1, 3, 7, 14, 23, 34, 46, 60, 75, 91, 108, 127, 147, 169]) == False\n assert candidate(stones = [0, 1, 2, 5, 8, 10, 14, 17, 21, 25, 30]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55]) == True\n assert candidate(stones = [0, 1, 2, 4, 8, 16, 25, 35, 46, 58, 71, 85, 100, 116, 133, 151, 170, 190, 211, 233, 256, 280, 305, 331, 358, 386, 415, 445, 476, 508, 541, 575, 610, 646, 683, 721, 760, 800, 841, 883, 926, 970, 1015, 1061, 1108, 1156, 1205, 1255, 1306, 1358, 1411, 1465, 1520, 1576, 1633, 1691, 1750, 1810, 1871, 1933, 1996, 2060, 2125, 2191, 2258, 2326, 2395, 2465, 2536, 2608, 2681, 2755, 2830, 2906, 2983, 3061, 3140, 3220, 3301, 3383, 3466, 3550, 3635, 3721, 3808, 3896, 3985, 4075, 4166, 4258, 4351, 4445, 4540, 4636, 4733, 4831, 4930, 5030]) == False\n assert candidate(stones = [0, 1, 2, 3, 7, 11, 13, 15, 18, 20]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91]) == True\n assert candidate(stones = [0, 1, 8, 19, 32, 47, 64, 83, 104, 127, 152]) == False\n assert candidate(stones = [0, 1, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144]) == False\n assert candidate(stones = [0, 1, 5, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990]) == False\n assert candidate(stones = [0, 1, 6, 10, 14, 19, 24, 30, 37, 45, 54, 64, 75, 87, 100]) == False\n assert candidate(stones = [0, 1, 3, 5, 7, 9, 11, 13, 15, 18, 20, 23]) == True\n assert candidate(stones = [0, 1, 2, 4, 5, 6, 8, 9, 11, 13, 16, 18, 21, 24, 27, 31, 35, 39, 44, 49, 54, 59, 65, 71, 78, 85, 92, 100, 108, 116, 125, 134, 144, 154, 165, 176, 188, 201, 214, 228, 243, 259, 275, 292, 310, 329, 348, 368, 388, 409, 430, 452, 475, 498, 522, 547, 573, 600, 628, 657, 687, 718, 750, 783, 817, 852, 888, 925, 963, 1002, 1042, 1083, 1125, 1168, 1212, 1257, 1303, 1350, 1400, 1451]) == False\n assert candidate(stones = [0, 1, 4, 7, 11, 16, 22, 29, 37, 46]) == False\n assert candidate(stones = [0, 1, 2, 5, 9, 14, 20, 27, 35, 44, 54, 65]) == False\n assert candidate(stones = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275, 1326, 1378, 1431, 1485, 1540, 1596, 1653, 1711, 1770, 1830, 1891, 1953]) == True\n", "comparison": "exact"}, "public_tests": ["[0,1,3,5,6,8,12,17]", "[0,1,2,3,4,8,9,11]"], "hints": [], "metadata": {"canonical_parameter_names": ["stones"], "leetcode_dataset_entry_point": "Solution().canCross", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:08+00:00", "tests_total": 82, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def can_cross(stones)", "container": null, "callable": "can_cross", "parameters": [{"name": "stones", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 405, "task_id": "convert-a-number-to-hexadecimal", "difficulty": "Easy", "problem_description": "Given a 32-bit integer num, return a string representing its hexadecimal representation. For negative integers, two’s complement method is used.\n\nAll the letters in the answer string should be lowercase characters, and there should not be any leading zeros in the answer except for the zero itself.\n\nNote: You are not allowed to use any built-in library method to directly solve this problem.\n\nExample 1:\n\nInput: num = 26\nOutput: \"1a\"\n\nExample 2:\n\nInput: num = -1\nOutput: \"ffffffff\"\n\nConstraints:\n\n- -2^31 <= num <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 31) == \"1f\"\n assert candidate(num = 10) == \"a\"\n assert candidate(num = 16777215) == \"ffffff\"\n assert candidate(num = -16777215) == \"ff000001\"\n assert candidate(num = -1) == \"ffffffff\"\n assert candidate(num = 0) == \"0\"\n assert candidate(num = -2147483648) == \"80000000\"\n assert candidate(num = -255) == \"ffffff01\"\n assert candidate(num = 255) == \"ff\"\n assert candidate(num = 1) == \"1\"\n assert candidate(num = -10) == \"fffffff6\"\n assert candidate(num = -4095) == \"fffff001\"\n assert candidate(num = 4095) == \"fff\"\n assert candidate(num = 2147483647) == \"7fffffff\"\n assert candidate(num = 16) == \"10\"\n assert candidate(num = 26) == \"1a\"\n assert candidate(num = 2097152) == \"200000\"\n assert candidate(num = -4096) == \"fffff000\"\n assert candidate(num = -1048575) == \"fff00001\"\n assert candidate(num = -16777216) == \"ff000000\"\n assert candidate(num = -2147483647) == \"80000001\"\n assert candidate(num = 1048575) == \"fffff\"\n assert candidate(num = -1024) == \"fffffc00\"\n assert candidate(num = -134217728) == \"f8000000\"\n assert candidate(num = -31) == \"ffffffe1\"\n assert candidate(num = 123456789) == \"75bcd15\"\n assert candidate(num = 65535) == \"ffff\"\n assert candidate(num = -15) == \"fffffff1\"\n assert candidate(num = 32768) == \"8000\"\n assert candidate(num = -131072) == \"fffe0000\"\n assert candidate(num = -89478485) == \"faaaaaab\"\n assert candidate(num = -65535) == \"ffff0001\"\n assert candidate(num = 2147483646) == \"7ffffffe\"\n assert candidate(num = 134217728) == \"8000000\"\n assert candidate(num = -987654321) == \"c521974f\"\n assert candidate(num = 268435456) == \"10000000\"\n assert candidate(num = 4096) == \"1000\"\n assert candidate(num = -268435456) == \"f0000000\"\n assert candidate(num = 1048576) == \"100000\"\n assert candidate(num = -1073741825) == \"bfffffff\"\n assert candidate(num = -123456789) == \"f8a432eb\"\n assert candidate(num = 1024) == \"400\"\n assert candidate(num = -256) == \"ffffff00\"\n assert candidate(num = 16777216) == \"1000000\"\n assert candidate(num = -1000000) == \"fff0bdc0\"\n assert candidate(num = -1048576) == \"fff00000\"\n assert candidate(num = -16) == \"fffffff0\"\n assert candidate(num = 1000000) == \"f4240\"\n assert candidate(num = 89478485) == \"5555555\"\n assert candidate(num = 65536) == \"10000\"\n assert candidate(num = -2) == \"fffffffe\"\n assert candidate(num = 15) == \"f\"\n", "comparison": "exact"}, "public_tests": ["26", "-1"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().toHex", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:12+00:00", "tests_total": 60, "tests_dropped": 8, "flags": [], "topic_tags": ["math", "string", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def to_hex(num)", "container": null, "callable": "to_hex", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 406, "task_id": "queue-reconstruction-by-height", "difficulty": "Medium", "problem_description": "You are given an array of people, people, which are the attributes of some people in a queue (not necessarily in order). Each people[i] = [h_i, k_i] represents the i^th person of height h_i with exactly k_i other people in front who have a height greater than or equal to h_i.\n\nReconstruct and return the queue that is represented by the input array people. The returned queue should be formatted as an array queue, where queue[j] = [h_j, k_j] is the attributes of the j^th person in the queue (queue[0] is the person at the front of the queue).\n\nExample 1:\n\nInput: people = [[7,0],[4,4],[7,1],[5,0],[6,1],[5,2]]\nOutput: [[5,0],[7,0],[5,2],[6,1],[4,4],[7,1]]\nExplanation:\nPerson 0 has height 5 with no other people taller or the same height in front.\nPerson 1 has height 7 with no other people taller or the same height in front.\nPerson 2 has height 5 with two persons taller or the same height in front, which is person 0 and 1.\nPerson 3 has height 6 with one person taller or the same height in front, which is person 1.\nPerson 4 has height 4 with four people taller or the same height in front, which are people 0, 1, 2, and 3.\nPerson 5 has height 7 with one person taller or the same height in front, which is person 1.\nHence [[5,0],[7,0],[5,2],[6,1],[4,4],[7,1]] is the reconstructed queue.\n\nExample 2:\n\nInput: people = [[6,0],[5,0],[4,0],[3,2],[2,2],[1,4]]\nOutput: [[4,0],[5,0],[2,2],[3,2],[1,4],[6,0]]\n\nConstraints:\n\n- 1 <= people.length <= 2000\n- 0 <= h_i <= 10^6\n- 0 <= k_i < people.length\n- It is guaranteed that the queue can be reconstructed.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(people = [[9, 0], [7, 0], [5, 0], [6, 1], [3, 2], [2, 2], [1, 4], [8, 1]]) == [[5, 0], [7, 0], [2, 2], [3, 2], [1, 4], [6, 1], [9, 0], [8, 1]]\n assert candidate(people = [[5, 5], [5, 4], [5, 3], [5, 2], [5, 1], [5, 0]]) == [[5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5]]\n assert candidate(people = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]) == [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]\n assert candidate(people = [[5, 2], [7, 0], [5, 0], [6, 1], [3, 2], [2, 2], [1, 4], [8, 1]]) == [[5, 0], [7, 0], [2, 2], [3, 2], [1, 4], [5, 2], [6, 1], [8, 1]]\n assert candidate(people = [[6, 0], [5, 0], [4, 0], [3, 2], [2, 2], [1, 4]]) == [[4, 0], [5, 0], [2, 2], [3, 2], [1, 4], [6, 0]]\n assert candidate(people = [[2, 4], [3, 4], [9, 0], [0, 6], [7, 1], [3, 1], [8, 5], [1, 5], [4, 2], [5, 0]]) == [[5, 0], [3, 1], [9, 0], [4, 2], [2, 4], [1, 5], [0, 6], [3, 4], [7, 1], [8, 5]]\n assert candidate(people = [[9, 0], [7, 0], [5, 2], [6, 1], [3, 3], [8, 2], [4, 4]]) == [[7, 0], [6, 1], [5, 2], [3, 3], [9, 0], [4, 4], [8, 2]]\n assert candidate(people = [[7, 0], [4, 4], [7, 1], [5, 0], [6, 1], [5, 2]]) == [[5, 0], [7, 0], [5, 2], [6, 1], [4, 4], [7, 1]]\n assert candidate(people = [[9, 0], [7, 0], [5, 2], [6, 1], [3, 3], [8, 2], [5, 1], [6, 0]]) == [[6, 0], [5, 1], [5, 2], [3, 3], [6, 1], [7, 0], [9, 0], [8, 2]]\n assert candidate(people = [[9, 0], [7, 0], [5, 2], [6, 1], [3, 4], [8, 2], [4, 3]]) == [[7, 0], [6, 1], [5, 2], [4, 3], [3, 4], [9, 0], [8, 2]]\n assert candidate(people = [[10, 0], [8, 0], [6, 0], [7, 0], [5, 0], [9, 0]]) == [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0]]\n assert candidate(people = [[1, 9], [3, 4], [7, 0], [2, 5], [1, 0], [2, 3], [6, 0], [8, 6], [9, 7], [3, 8]]) == [[1, 0], [6, 0], [7, 0], [9, 7], [2, 3], [8, 6], [2, 5], [3, 4], [3, 8], [1, 9]]\n assert candidate(people = [[9, 0], [7, 0], [5, 2], [6, 1], [3, 3], [8, 2], [4, 4], [2, 6]]) == [[7, 0], [6, 1], [5, 2], [3, 3], [9, 0], [4, 4], [2, 6], [8, 2]]\n assert candidate(people = [[7, 0], [4, 4], [7, 1], [5, 0], [6, 1], [5, 2], [8, 2], [8, 1]]) == [[5, 0], [7, 0], [5, 2], [6, 1], [4, 4], [7, 1], [8, 1], [8, 2]]\n assert candidate(people = [[70, 4], [55, 3], [65, 2], [75, 1], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0]]) == [[85, 0], [75, 1], [65, 2], [55, 3], [95, 0], [105, 0], [70, 4], [115, 0], [125, 0], [135, 0]]\n assert candidate(people = [[70, 5], [55, 0], [65, 3], [75, 1], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [145, 1], [155, 2], [165, 3]]) == [[55, 0], [85, 0], [75, 1], [95, 0], [65, 3], [105, 0], [115, 0], [70, 5], [125, 0], [135, 0], [165, 3], [145, 1], [155, 2]]\n assert candidate(people = [[9, 0], [7, 0], [5, 2], [6, 1], [3, 3], [8, 2], [4, 4], [7, 1], [5, 0], [6, 0], [5, 1], [4, 0], [4, 1], [3, 0], [3, 1]]) == [[3, 0], [3, 1], [4, 0], [3, 3], [4, 1], [5, 0], [5, 1], [4, 4], [5, 2], [6, 0], [6, 1], [7, 0], [7, 1], [9, 0], [8, 2]]\n assert candidate(people = [[1, 4], [2, 3], [3, 2], [4, 1], [5, 0], [6, 1], [7, 2], [8, 3], [9, 4], [10, 5]]) == [[5, 0], [4, 1], [3, 2], [2, 3], [1, 4], [10, 5], [6, 1], [9, 4], [7, 2], [8, 3]]\n assert candidate(people = [[5, 5], [5, 4], [5, 3], [5, 2], [5, 1], [5, 0], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5]]) == [[5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 5], [5, 4], [5, 3], [5, 2], [5, 1], [5, 0]]\n assert candidate(people = [[150, 0], [140, 1], [130, 2], [120, 3], [110, 4], [100, 5], [90, 6], [80, 7], [70, 8], [60, 9]]) == [[150, 0], [140, 1], [130, 2], [120, 3], [110, 4], [100, 5], [90, 6], [80, 7], [70, 8], [60, 9]]\n assert candidate(people = [[10, 0], [8, 1], [9, 0], [8, 2], [9, 1], [7, 3], [6, 2], [5, 4], [4, 5]]) == [[9, 0], [8, 1], [6, 2], [8, 2], [5, 4], [4, 5], [7, 3], [9, 1], [10, 0]]\n assert candidate(people = [[100, 10], [99, 9], [98, 8], [97, 7], [96, 6], [95, 5], [94, 4], [93, 3], [92, 2], [91, 1], [90, 0]]) == [[90, 0], [100, 10], [91, 1], [99, 9], [92, 2], [98, 8], [93, 3], [97, 7], [94, 4], [96, 6], [95, 5]]\n assert candidate(people = [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [5, 1], [6, 1], [7, 1], [8, 1]]) == [[5, 0], [5, 1], [6, 0], [6, 1], [7, 0], [7, 1], [8, 0], [8, 1], [9, 0], [10, 0]]\n assert candidate(people = [[7, 0], [4, 4], [7, 1], [5, 0], [6, 1], [5, 2], [5, 3], [6, 2], [5, 1], [7, 2]]) == [[5, 0], [5, 1], [5, 2], [5, 3], [4, 4], [7, 0], [6, 1], [6, 2], [7, 1], [7, 2]]\n assert candidate(people = [[15, 0], [15, 1], [15, 2], [15, 3], [15, 4], [15, 5], [15, 6], [15, 7], [15, 8], [15, 9], [15, 10]]) == [[15, 0], [15, 1], [15, 2], [15, 3], [15, 4], [15, 5], [15, 6], [15, 7], [15, 8], [15, 9], [15, 10]]\n assert candidate(people = [[7, 0], [7, 1], [7, 2], [7, 3], [7, 4], [6, 0], [6, 1], [6, 2], [6, 3], [6, 4], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4]]) == [[5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [6, 0], [6, 1], [6, 2], [6, 3], [6, 4], [7, 0], [7, 1], [7, 2], [7, 3], [7, 4]]\n assert candidate(people = [[12, 0], [10, 0], [10, 1], [10, 2], [11, 0], [11, 1], [11, 2], [9, 0], [9, 1], [9, 2], [9, 3]]) == [[9, 0], [9, 1], [9, 2], [9, 3], [10, 0], [10, 1], [10, 2], [11, 0], [11, 1], [11, 2], [12, 0]]\n assert candidate(people = [[7, 0], [4, 4], [7, 1], [5, 0], [6, 1], [5, 2], [8, 2], [8, 1], [9, 3], [10, 4]]) == [[5, 0], [7, 0], [5, 2], [6, 1], [4, 4], [7, 1], [10, 4], [8, 1], [8, 2], [9, 3]]\n assert candidate(people = [[20, 0], [19, 1], [18, 2], [17, 3], [16, 4], [15, 5], [14, 6], [13, 7], [12, 8], [11, 9], [10, 10], [9, 11], [8, 12]]) == [[20, 0], [19, 1], [18, 2], [17, 3], [16, 4], [15, 5], [14, 6], [13, 7], [12, 8], [11, 9], [10, 10], [9, 11], [8, 12]]\n assert candidate(people = [[200, 0], [190, 1], [180, 2], [170, 3], [160, 4], [150, 5], [140, 6], [130, 7], [120, 8], [110, 9], [100, 10]]) == [[200, 0], [190, 1], [180, 2], [170, 3], [160, 4], [150, 5], [140, 6], [130, 7], [120, 8], [110, 9], [100, 10]]\n assert candidate(people = [[5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5]]) == [[5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5], [5, 5]]\n assert candidate(people = [[70, 0], [100, 0], [90, 0], [80, 0], [75, 0], [72, 0], [69, 0], [66, 0], [63, 0], [60, 0], [57, 0], [54, 0], [51, 0], [48, 0], [45, 0], [42, 0], [39, 0], [36, 0], [33, 0], [30, 0]]) == [[30, 0], [33, 0], [36, 0], [39, 0], [42, 0], [45, 0], [48, 0], [51, 0], [54, 0], [57, 0], [60, 0], [63, 0], [66, 0], [69, 0], [70, 0], [72, 0], [75, 0], [80, 0], [90, 0], [100, 0]]\n assert candidate(people = [[10, 0], [8, 1], [9, 0], [10, 1], [11, 0], [8, 2], [9, 2], [10, 2], [11, 1], [12, 0]]) == [[9, 0], [8, 1], [8, 2], [10, 0], [9, 2], [10, 1], [10, 2], [11, 0], [11, 1], [12, 0]]\n assert candidate(people = [[70, 2], [55, 3], [65, 0], [75, 1], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [145, 1], [155, 2], [165, 3], [175, 4], [185, 5]]) == [[65, 0], [85, 0], [75, 1], [55, 3], [70, 2], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [185, 5], [145, 1], [175, 4], [155, 2], [165, 3]]\n assert candidate(people = [[10, 0], [8, 0], [9, 0], [7, 0], [6, 0], [5, 0], [4, 0], [3, 0], [2, 0], [1, 0]]) == [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0]]\n assert candidate(people = [[1, 0], [2, 1], [2, 0], [3, 0], [3, 1], [3, 2], [4, 0], [4, 1], [4, 2], [4, 3]]) == [[1, 0], [2, 0], [2, 1], [3, 0], [3, 1], [3, 2], [4, 0], [4, 1], [4, 2], [4, 3]]\n assert candidate(people = [[70, 2], [55, 3], [65, 0], [75, 1], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [145, 1], [155, 2]]) == [[65, 0], [85, 0], [75, 1], [55, 3], [70, 2], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [155, 2], [145, 1]]\n assert candidate(people = [[5, 0], [4, 1], [3, 2], [2, 3], [1, 4], [6, 0], [7, 1], [8, 2], [9, 3], [10, 4]]) == [[5, 0], [4, 1], [3, 2], [2, 3], [1, 4], [6, 0], [10, 4], [7, 1], [9, 3], [8, 2]]\n assert candidate(people = [[5, 5], [6, 3], [7, 1], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0]]) == [[8, 0], [7, 1], [9, 0], [6, 3], [10, 0], [5, 5], [11, 0], [12, 0], [13, 0], [14, 0]]\n assert candidate(people = [[8, 0], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13], [8, 14]]) == [[8, 0], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9], [8, 10], [8, 11], [8, 12], [8, 13], [8, 14]]\n assert candidate(people = [[20, 0], [15, 0], [10, 0], [5, 0], [4, 1], [3, 2], [2, 3], [1, 4], [0, 5], [25, 0]]) == [[5, 0], [4, 1], [3, 2], [2, 3], [1, 4], [0, 5], [10, 0], [15, 0], [20, 0], [25, 0]]\n assert candidate(people = [[100, 0], [90, 1], [80, 2], [70, 3], [60, 4], [50, 5], [40, 4], [30, 3], [20, 2], [10, 1]]) == [[100, 0], [10, 1], [90, 1], [20, 2], [80, 2], [30, 3], [70, 3], [40, 4], [60, 4], [50, 5]]\n assert candidate(people = [[3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0]]) == [[3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0], [3, 0]]\n assert candidate(people = [[210, 4], [200, 2], [190, 2], [180, 3], [170, 4], [160, 1], [150, 1], [140, 2], [130, 3], [120, 0]]) == [[120, 0], [210, 4], [150, 1], [140, 2], [130, 3], [160, 1], [200, 2], [190, 2], [180, 3], [170, 4]]\n assert candidate(people = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10], [12, 11], [13, 12], [14, 13], [15, 14], [16, 15], [17, 16], [18, 17], [19, 18], [20, 19], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == [[1, 0], [1, 1], [20, 19], [2, 1], [2, 2], [19, 18], [3, 2], [3, 3], [18, 17], [4, 3], [4, 4], [17, 16], [5, 4], [5, 5], [16, 15], [6, 5], [6, 6], [15, 14], [7, 6], [7, 7], [14, 13], [8, 7], [8, 8], [13, 12], [9, 8], [9, 9], [12, 11], [10, 9], [10, 10], [11, 10]]\n assert candidate(people = [[1, 9], [2, 8], [3, 7], [4, 6], [5, 5], [6, 4], [7, 3], [8, 2], [9, 1], [10, 0]]) == [[10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9]]\n assert candidate(people = [[10, 2], [9, 1], [8, 0], [7, 0], [6, 0], [5, 0], [4, 0], [3, 0], [2, 0], [1, 0]]) == [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [10, 2], [9, 1]]\n assert candidate(people = [[10, 10], [9, 9], [8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1], [0, 0]]) == [[0, 0], [10, 10], [1, 1], [9, 9], [2, 2], [8, 8], [3, 3], [7, 7], [4, 4], [6, 6], [5, 5]]\n assert candidate(people = [[70, 0], [55, 0], [65, 1], [75, 0], [85, 1], [95, 1], [105, 2], [115, 3], [125, 4], [135, 5]]) == [[55, 0], [70, 0], [65, 1], [75, 0], [135, 5], [85, 1], [95, 1], [125, 4], [105, 2], [115, 3]]\n assert candidate(people = [[80, 0], [90, 0], [100, 0], [110, 0], [120, 0], [130, 0], [140, 0], [150, 0], [160, 0], [170, 0], [180, 0], [190, 0], [200, 0]]) == [[80, 0], [90, 0], [100, 0], [110, 0], [120, 0], [130, 0], [140, 0], [150, 0], [160, 0], [170, 0], [180, 0], [190, 0], [200, 0]]\n assert candidate(people = [[70, 5], [55, 0], [65, 2], [75, 0], [85, 1], [95, 3], [105, 1], [115, 2], [125, 0], [135, 4]]) == [[55, 0], [75, 0], [125, 0], [65, 2], [85, 1], [105, 1], [135, 4], [70, 5], [95, 3], [115, 2]]\n assert candidate(people = [[10, 0], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [10, 10], [10, 11], [10, 12], [10, 13], [10, 14], [10, 15], [10, 16], [10, 17], [10, 18], [10, 19], [10, 20], [10, 21], [10, 22], [10, 23], [10, 24], [10, 25], [10, 26], [10, 27], [10, 28], [10, 29], [10, 30], [10, 31], [10, 32], [10, 33], [10, 34], [10, 35], [10, 36], [10, 37], [10, 38], [10, 39], [10, 40], [10, 41], [10, 42], [10, 43], [10, 44], [10, 45], [10, 46], [10, 47], [10, 48], [10, 49]]) == [[10, 0], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [10, 10], [10, 11], [10, 12], [10, 13], [10, 14], [10, 15], [10, 16], [10, 17], [10, 18], [10, 19], [10, 20], [10, 21], [10, 22], [10, 23], [10, 24], [10, 25], [10, 26], [10, 27], [10, 28], [10, 29], [10, 30], [10, 31], [10, 32], [10, 33], [10, 34], [10, 35], [10, 36], [10, 37], [10, 38], [10, 39], [10, 40], [10, 41], [10, 42], [10, 43], [10, 44], [10, 45], [10, 46], [10, 47], [10, 48], [10, 49]]\n assert candidate(people = [[1000, 0], [900, 1], [800, 2], [700, 3], [600, 4], [500, 5], [400, 6], [300, 7], [200, 8], [100, 9], [50, 10], [49, 10], [48, 10], [47, 10], [46, 10], [45, 10], [44, 10], [43, 10], [42, 10], [41, 10], [40, 10], [39, 10], [38, 10], [37, 10], [36, 10], [35, 10], [34, 10], [33, 10], [32, 10], [31, 10], [30, 10], [29, 10], [28, 10], [27, 10], [26, 10], [25, 10], [24, 10], [23, 10], [22, 10], [21, 10], [20, 10], [19, 10], [18, 10], [17, 10], [16, 10], [15, 10], [14, 10], [13, 10], [12, 10], [11, 10], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [3, 10], [2, 10], [1, 10]]) == [[1000, 0], [900, 1], [800, 2], [700, 3], [600, 4], [500, 5], [400, 6], [300, 7], [200, 8], [100, 9], [1, 10], [2, 10], [3, 10], [4, 10], [5, 10], [6, 10], [7, 10], [8, 10], [9, 10], [10, 10], [11, 10], [12, 10], [13, 10], [14, 10], [15, 10], [16, 10], [17, 10], [18, 10], [19, 10], [20, 10], [21, 10], [22, 10], [23, 10], [24, 10], [25, 10], [26, 10], [27, 10], [28, 10], [29, 10], [30, 10], [31, 10], [32, 10], [33, 10], [34, 10], [35, 10], [36, 10], [37, 10], [38, 10], [39, 10], [40, 10], [41, 10], [42, 10], [43, 10], [44, 10], [45, 10], [46, 10], [47, 10], [48, 10], [49, 10], [50, 10]]\n assert candidate(people = [[5, 0], [3, 4], [5, 2], [5, 1], [4, 1], [4, 0], [3, 1], [2, 2], [1, 3], [0, 4]]) == [[4, 0], [3, 1], [2, 2], [1, 3], [0, 4], [4, 1], [5, 0], [3, 4], [5, 1], [5, 2]]\n assert candidate(people = [[20, 0], [19, 1], [18, 2], [17, 3], [16, 4], [15, 5], [14, 6], [13, 7], [12, 8], [11, 9], [10, 10], [9, 11], [8, 12], [7, 13], [6, 14], [5, 15], [4, 16], [3, 17], [2, 18], [1, 19]]) == [[20, 0], [19, 1], [18, 2], [17, 3], [16, 4], [15, 5], [14, 6], [13, 7], [12, 8], [11, 9], [10, 10], [9, 11], [8, 12], [7, 13], [6, 14], [5, 15], [4, 16], [3, 17], [2, 18], [1, 19]]\n assert candidate(people = [[7, 0], [7, 1], [7, 2], [7, 3], [7, 4], [7, 5], [6, 0], [6, 1], [6, 2], [6, 3], [6, 4], [6, 5], [6, 6], [6, 7]]) == [[6, 0], [6, 1], [6, 2], [6, 3], [6, 4], [6, 5], [6, 6], [6, 7], [7, 0], [7, 1], [7, 2], [7, 3], [7, 4], [7, 5]]\n assert candidate(people = [[100, 0], [99, 1], [98, 2], [97, 3], [96, 4], [95, 5], [94, 6], [93, 7], [92, 8], [91, 9], [90, 10]]) == [[100, 0], [99, 1], [98, 2], [97, 3], [96, 4], [95, 5], [94, 6], [93, 7], [92, 8], [91, 9], [90, 10]]\n assert candidate(people = [[10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9], [0, 10], [11, 0], [12, 1]]) == [[10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9], [0, 10], [11, 0], [12, 1]]\n assert candidate(people = [[70, 5], [55, 0], [65, 3], [75, 1], [85, 4], [95, 2], [105, 0], [115, 2], [125, 1], [135, 0]]) == [[55, 0], [105, 0], [75, 1], [135, 0], [65, 3], [95, 2], [125, 1], [70, 5], [85, 4], [115, 2]]\n assert candidate(people = [[100, 0], [99, 1], [98, 2], [97, 3], [96, 4], [95, 5], [94, 6], [93, 7], [92, 8], [91, 9], [90, 10], [89, 11]]) == [[100, 0], [99, 1], [98, 2], [97, 3], [96, 4], [95, 5], [94, 6], [93, 7], [92, 8], [91, 9], [90, 10], [89, 11]]\n assert candidate(people = [[3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2]]) == [[3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2], [3, 2]]\n assert candidate(people = [[20, 0], [18, 1], [16, 2], [14, 3], [12, 4], [10, 5], [8, 6], [6, 7], [4, 8], [2, 9]]) == [[20, 0], [18, 1], [16, 2], [14, 3], [12, 4], [10, 5], [8, 6], [6, 7], [4, 8], [2, 9]]\n assert candidate(people = [[100, 0], [95, 0], [90, 0], [85, 0], [80, 0], [75, 0], [70, 0], [65, 0], [60, 0], [55, 0], [50, 0], [45, 0], [40, 0], [35, 0], [30, 0], [25, 0], [20, 0], [15, 0], [10, 0], [5, 0], [98, 1], [93, 1], [88, 1], [83, 1], [78, 1], [73, 1], [68, 1], [63, 1], [58, 1], [53, 1], [48, 1], [43, 1], [38, 1], [33, 1], [28, 1], [23, 1], [18, 1], [13, 1], [8, 1], [3, 1], [96, 2], [91, 2], [86, 2], [81, 2], [76, 2], [71, 2], [66, 2], [61, 2], [56, 2], [51, 2], [46, 2], [41, 2], [36, 2], [31, 2], [26, 2], [21, 2], [16, 2], [11, 2], [6, 2], [1, 2], [94, 3], [89, 3], [84, 3], [79, 3], [74, 3], [69, 3], [64, 3], [59, 3], [54, 3], [49, 3], [44, 3], [39, 3], [34, 3], [29, 3], [24, 3], [19, 3], [14, 3], [9, 3], [4, 3], [92, 4], [87, 4], [82, 4], [77, 4], [72, 4], [67, 4], [62, 4], [57, 4], [52, 4], [47, 4], [42, 4], [37, 4], [32, 4], [27, 4], [22, 4], [17, 4], [12, 4], [7, 4], [2, 4], [85, 5], [80, 5], [75, 5], [70, 5], [65, 5], [60, 5], [55, 5], [50, 5], [45, 5], [40, 5], [35, 5], [30, 5], [25, 5], [20, 5], [15, 5], [10, 5], [5, 5], [0, 5]]) == [[5, 0], [3, 1], [1, 2], [10, 0], [8, 1], [0, 5], [2, 4], [4, 3], [6, 2], [15, 0], [5, 5], [13, 1], [7, 4], [9, 3], [11, 2], [20, 0], [10, 5], [18, 1], [12, 4], [14, 3], [16, 2], [25, 0], [15, 5], [23, 1], [17, 4], [19, 3], [21, 2], [30, 0], [20, 5], [28, 1], [22, 4], [24, 3], [26, 2], [35, 0], [25, 5], [33, 1], [27, 4], [29, 3], [31, 2], [40, 0], [30, 5], [38, 1], [32, 4], [34, 3], [36, 2], [45, 0], [35, 5], [43, 1], [37, 4], [39, 3], [41, 2], [50, 0], [40, 5], [48, 1], [42, 4], [44, 3], [46, 2], [55, 0], [45, 5], [53, 1], [47, 4], [49, 3], [51, 2], [60, 0], [50, 5], [58, 1], [52, 4], [54, 3], [56, 2], [65, 0], [55, 5], [63, 1], [57, 4], [59, 3], [61, 2], [70, 0], [60, 5], [68, 1], [62, 4], [64, 3], [66, 2], [75, 0], [65, 5], [73, 1], [67, 4], [69, 3], [71, 2], [80, 0], [70, 5], [78, 1], [72, 4], [74, 3], [76, 2], [85, 0], [75, 5], [83, 1], [77, 4], [79, 3], [81, 2], [90, 0], [80, 5], [88, 1], [82, 4], [84, 3], [86, 2], [95, 0], [85, 5], [93, 1], [87, 4], [89, 3], [91, 2], [100, 0], [98, 1], [92, 4], [94, 3], [96, 2]]\n assert candidate(people = [[200, 0], [190, 0], [190, 1], [180, 0], [180, 1], [180, 2], [170, 0], [170, 1], [170, 2], [170, 3], [160, 0], [160, 1], [160, 2], [160, 3], [150, 0], [150, 1], [150, 2], [150, 3], [140, 0], [140, 1], [140, 2], [140, 3]]) == [[140, 0], [140, 1], [140, 2], [140, 3], [150, 0], [150, 1], [150, 2], [150, 3], [160, 0], [160, 1], [160, 2], [160, 3], [170, 0], [170, 1], [170, 2], [170, 3], [180, 0], [180, 1], [180, 2], [190, 0], [190, 1], [200, 0]]\n assert candidate(people = [[150, 0], [150, 1], [150, 2], [150, 3], [150, 4], [150, 5], [150, 6], [150, 7], [150, 8], [150, 9], [150, 10], [150, 11], [150, 12], [150, 13], [150, 14], [150, 15], [150, 16], [150, 17], [150, 18], [150, 19], [150, 20], [150, 21], [150, 22], [150, 23], [150, 24], [150, 25], [150, 26], [150, 27], [150, 28], [150, 29]]) == [[150, 0], [150, 1], [150, 2], [150, 3], [150, 4], [150, 5], [150, 6], [150, 7], [150, 8], [150, 9], [150, 10], [150, 11], [150, 12], [150, 13], [150, 14], [150, 15], [150, 16], [150, 17], [150, 18], [150, 19], [150, 20], [150, 21], [150, 22], [150, 23], [150, 24], [150, 25], [150, 26], [150, 27], [150, 28], [150, 29]]\n assert candidate(people = [[7, 0], [4, 4], [7, 1], [5, 0], [6, 1], [5, 2], [3, 2], [2, 3], [1, 4], [0, 5]]) == [[5, 0], [7, 0], [3, 2], [2, 3], [1, 4], [0, 5], [5, 2], [6, 1], [4, 4], [7, 1]]\n assert candidate(people = [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0], [17, 0], [18, 0], [19, 0]]) == [[5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0], [17, 0], [18, 0], [19, 0]]\n assert candidate(people = [[15, 0], [14, 0], [14, 1], [13, 0], [12, 0], [12, 1], [11, 0], [11, 2], [10, 0], [10, 3], [9, 0], [9, 4]]) == [[9, 0], [10, 0], [11, 0], [12, 0], [9, 4], [10, 3], [11, 2], [12, 1], [13, 0], [14, 0], [14, 1], [15, 0]]\n assert candidate(people = [[70, 2], [55, 3], [65, 0], [75, 1], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [145, 1], [155, 2], [165, 3], [175, 4]]) == [[65, 0], [85, 0], [75, 1], [55, 3], [70, 2], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0], [175, 4], [145, 1], [165, 3], [155, 2]]\n assert candidate(people = [[150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0]]) == [[150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0], [150, 0]]\n assert candidate(people = [[120, 2], [110, 2], [100, 1], [90, 1], [80, 1], [70, 0], [60, 0], [50, 0]]) == [[50, 0], [60, 0], [70, 0], [120, 2], [80, 1], [90, 1], [100, 1], [110, 2]]\n assert candidate(people = [[8, 0], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9]]) == [[8, 0], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5], [8, 6], [8, 7], [8, 8], [8, 9]]\n assert candidate(people = [[15, 0], [15, 1], [15, 2], [15, 3], [14, 0], [14, 1], [14, 2], [13, 0], [13, 1], [13, 2], [13, 3], [12, 0], [12, 1], [12, 2], [12, 3], [11, 0], [11, 1], [11, 2], [11, 3]]) == [[11, 0], [11, 1], [11, 2], [11, 3], [12, 0], [12, 1], [12, 2], [12, 3], [13, 0], [13, 1], [13, 2], [13, 3], [14, 0], [14, 1], [14, 2], [15, 0], [15, 1], [15, 2], [15, 3]]\n assert candidate(people = [[100, 0], [90, 0], [90, 1], [80, 0], [80, 1], [80, 2], [70, 0], [70, 1], [70, 2], [70, 3]]) == [[70, 0], [70, 1], [70, 2], [70, 3], [80, 0], [80, 1], [80, 2], [90, 0], [90, 1], [100, 0]]\n assert candidate(people = [[10, 0], [8, 0], [9, 0], [7, 1], [7, 0], [6, 2], [5, 3], [4, 4]]) == [[7, 0], [7, 1], [6, 2], [5, 3], [4, 4], [8, 0], [9, 0], [10, 0]]\n assert candidate(people = [[100, 0], [90, 0], [80, 0], [70, 0], [60, 0], [50, 0], [40, 0], [30, 0], [20, 0], [10, 0]]) == [[10, 0], [20, 0], [30, 0], [40, 0], [50, 0], [60, 0], [70, 0], [80, 0], [90, 0], [100, 0]]\n assert candidate(people = [[150, 3], [150, 2], [150, 1], [150, 0], [149, 0], [149, 1], [148, 0], [148, 1], [147, 0], [147, 1]]) == [[147, 0], [147, 1], [148, 0], [148, 1], [149, 0], [149, 1], [150, 0], [150, 1], [150, 2], [150, 3]]\n assert candidate(people = [[5, 2], [5, 1], [5, 0], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10]]) == [[5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10]]\n assert candidate(people = [[15, 0], [14, 1], [13, 2], [12, 3], [11, 4], [10, 5], [9, 6], [8, 7]]) == [[15, 0], [14, 1], [13, 2], [12, 3], [11, 4], [10, 5], [9, 6], [8, 7]]\n assert candidate(people = [[120, 5], [110, 3], [100, 0], [90, 2], [80, 4], [70, 1], [60, 6], [50, 7], [40, 5], [30, 3], [20, 2], [10, 1]]) == [[100, 0], [10, 1], [70, 1], [20, 2], [120, 5], [30, 3], [90, 2], [110, 3], [40, 5], [80, 4], [60, 6], [50, 7]]\n assert candidate(people = [[10, 3], [9, 0], [8, 1], [7, 2], [6, 3], [5, 4], [4, 5], [3, 6], [2, 7], [1, 8]]) == [[9, 0], [8, 1], [7, 2], [6, 3], [5, 4], [4, 5], [3, 6], [2, 7], [1, 8], [10, 3]]\n assert candidate(people = [[1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [11, 10]]) == [[1, 0], [11, 10], [2, 1], [10, 9], [3, 2], [9, 8], [4, 3], [8, 7], [5, 4], [7, 6], [6, 5]]\n assert candidate(people = [[500, 0], [400, 1], [300, 2], [200, 3], [100, 4], [50, 5], [49, 5], [48, 5], [47, 5], [46, 5], [45, 5], [44, 5], [43, 5], [42, 5], [41, 5], [40, 5], [39, 5], [38, 5], [37, 5], [36, 5], [35, 5], [34, 5], [33, 5], [32, 5], [31, 5], [30, 5], [29, 5], [28, 5], [27, 5], [26, 5], [25, 5], [24, 5], [23, 5], [22, 5], [21, 5], [20, 5], [19, 5], [18, 5], [17, 5], [16, 5], [15, 5], [14, 5], [13, 5], [12, 5], [11, 5], [10, 5], [9, 5], [8, 5], [7, 5], [6, 5], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5]]) == [[500, 0], [400, 1], [300, 2], [200, 3], [100, 4], [1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [6, 5], [7, 5], [8, 5], [9, 5], [10, 5], [11, 5], [12, 5], [13, 5], [14, 5], [15, 5], [16, 5], [17, 5], [18, 5], [19, 5], [20, 5], [21, 5], [22, 5], [23, 5], [24, 5], [25, 5], [26, 5], [27, 5], [28, 5], [29, 5], [30, 5], [31, 5], [32, 5], [33, 5], [34, 5], [35, 5], [36, 5], [37, 5], [38, 5], [39, 5], [40, 5], [41, 5], [42, 5], [43, 5], [44, 5], [45, 5], [46, 5], [47, 5], [48, 5], [49, 5], [50, 5]]\n assert candidate(people = [[2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11], [2, 12], [2, 13], [2, 14], [2, 15], [2, 16], [2, 17], [2, 18], [2, 19]]) == [[2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [2, 6], [2, 7], [2, 8], [2, 9], [2, 10], [2, 11], [2, 12], [2, 13], [2, 14], [2, 15], [2, 16], [2, 17], [2, 18], [2, 19]]\n assert candidate(people = [[10, 0], [9, 1], [10, 1], [8, 2], [9, 2], [10, 2], [7, 3], [8, 3], [9, 3], [10, 3], [6, 4], [7, 4], [8, 4], [9, 4], [10, 4]]) == [[10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [7, 4], [8, 3], [8, 4], [9, 2], [9, 3], [9, 4], [10, 1], [10, 2], [10, 3], [10, 4]]\n assert candidate(people = [[70, 0], [55, 0], [65, 0], [75, 0], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0]]) == [[55, 0], [65, 0], [70, 0], [75, 0], [85, 0], [95, 0], [105, 0], [115, 0], [125, 0], [135, 0]]\n assert candidate(people = [[5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0]]) == [[5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0], [5, 0]]\n assert candidate(people = [[10, 0], [9, 0], [8, 0], [7, 0], [6, 0], [5, 0], [4, 0], [3, 0], [2, 0], [1, 0]]) == [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0]]\n assert candidate(people = [[100, 0], [90, 1], [80, 2], [70, 3], [60, 4], [50, 5], [40, 6], [30, 7], [20, 8], [10, 9], [0, 10], [110, 0], [120, 1]]) == [[100, 0], [90, 1], [80, 2], [70, 3], [60, 4], [50, 5], [40, 6], [30, 7], [20, 8], [10, 9], [0, 10], [110, 0], [120, 1]]\n assert candidate(people = [[100, 0], [90, 1], [80, 2], [70, 3], [60, 4], [50, 5], [40, 6], [30, 7], [20, 8], [10, 9]]) == [[100, 0], [90, 1], [80, 2], [70, 3], [60, 4], [50, 5], [40, 6], [30, 7], [20, 8], [10, 9]]\n assert candidate(people = [[5, 0], [7, 0], [5, 2], [6, 1], [5, 4], [5, 1], [5, 3], [6, 0], [7, 1], [5, 5]]) == [[5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [6, 0], [6, 1], [7, 0], [7, 1]]\n assert candidate(people = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0], [17, 0], [18, 0], [19, 0], [20, 0]]) == [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0], [17, 0], [18, 0], [19, 0], [20, 0]]\n assert candidate(people = [[10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9], [0, 10]]) == [[10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9], [0, 10]]\n assert candidate(people = [[20, 0], [18, 2], [17, 4], [19, 1], [18, 1], [17, 3], [20, 1], [19, 0], [18, 0], [17, 2], [16, 5], [15, 6]]) == [[18, 0], [18, 1], [17, 2], [17, 3], [17, 4], [16, 5], [15, 6], [18, 2], [19, 0], [19, 1], [20, 0], [20, 1]]\n assert candidate(people = [[10, 0], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [10, 10], [10, 11], [10, 12], [10, 13], [10, 14], [10, 15]]) == [[10, 0], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [10, 10], [10, 11], [10, 12], [10, 13], [10, 14], [10, 15]]\n assert candidate(people = [[70, 0], [55, 1], [65, 0], [75, 0], [85, 2], [95, 1], [105, 0], [115, 2], [125, 3], [135, 2]]) == [[65, 0], [55, 1], [70, 0], [75, 0], [105, 0], [95, 1], [85, 2], [135, 2], [125, 3], [115, 2]]\n assert candidate(people = [[10, 0], [8, 0], [9, 0], [9, 1], [8, 1], [7, 0], [6, 0], [6, 1], [5, 2], [4, 3]]) == [[6, 0], [6, 1], [5, 2], [4, 3], [7, 0], [8, 0], [8, 1], [9, 0], [9, 1], [10, 0]]\n assert candidate(people = [[5, 0], [4, 0], [3, 0], [2, 0], [1, 0], [5, 1], [4, 1], [3, 1], [2, 1], [1, 1], [5, 2], [4, 2], [3, 2], [2, 2], [1, 2], [5, 3], [4, 3], [3, 3], [2, 3], [1, 3], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4]]) == [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 0], [4, 1], [4, 2], [4, 3], [4, 4], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4]]\n assert candidate(people = [[60, 0], [60, 1], [60, 2], [60, 3], [60, 4], [60, 5], [60, 6], [60, 7], [60, 8], [60, 9], [60, 10]]) == [[60, 0], [60, 1], [60, 2], [60, 3], [60, 4], [60, 5], [60, 6], [60, 7], [60, 8], [60, 9], [60, 10]]\n assert candidate(people = [[120, 0], [120, 1], [120, 2], [120, 3], [120, 4], [120, 5], [120, 6], [120, 7], [120, 8], [120, 9], [120, 10], [120, 11], [120, 12], [120, 13], [120, 14], [120, 15], [120, 16], [120, 17], [120, 18], [120, 19]]) == [[120, 0], [120, 1], [120, 2], [120, 3], [120, 4], [120, 5], [120, 6], [120, 7], [120, 8], [120, 9], [120, 10], [120, 11], [120, 12], [120, 13], [120, 14], [120, 15], [120, 16], [120, 17], [120, 18], [120, 19]]\n", "comparison": "exact"}, "public_tests": ["[[7,0],[4,4],[7,1],[5,0],[6,1],[5,2]]", "[[6,0],[5,0],[4,0],[3,2],[2,2],[1,4]]"], "hints": ["What can you say about the position of the shortest person? If the position of the shortest person is i, how many people would be in front of the shortest person?", "Once you fix the position of the shortest person, what can you say about the position of the second shortest person?"], "metadata": {"canonical_parameter_names": ["people"], "leetcode_dataset_entry_point": "Solution().reconstructQueue", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:15+00:00", "tests_total": 101, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-indexed-tree", "segment-tree", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def reconstruct_queue(people)", "container": null, "callable": "reconstruct_queue", "parameters": [{"name": "people", "type": "Integer[][]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 407, "task_id": "trapping-rain-water-ii", "difficulty": "Hard", "problem_description": "Given an m x n integer matrix heightMap representing the height of each unit cell in a 2D elevation map, return the volume of water it can trap after raining.\n\nExample 1:\n\nInput: heightMap = [[1,4,3,1,3,2],[3,2,1,3,2,4],[2,3,3,2,3,1]]\nOutput: 4\nExplanation: After the rain, water is trapped between the blocks.\nWe have two small ponds 1 and 3 units trapped.\nThe total volume of water trapped is 4.\n\nExample 2:\n\nInput: heightMap = [[3,3,3,3,3],[3,2,2,2,3],[3,2,1,2,3],[3,2,2,2,3],[3,3,3,3,3]]\nOutput: 10\n\nConstraints:\n\n- m == heightMap.length\n- n == heightMap[i].length\n- 1 <= m, n <= 200\n- 0 <= heightMap[i][j] <= 2 * 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(heightMap = [[5, 5, 5, 5, 5], [5, 1, 2, 1, 5], [5, 2, 3, 2, 5], [5, 1, 2, 1, 5], [5, 5, 5, 5, 5]]) == 30\n assert candidate(heightMap = [[1, 2], [2, 1]]) == 0\n assert candidate(heightMap = [[1, 2, 3], [0, 1, 0], [1, 2, 1]]) == 0\n assert candidate(heightMap = [[1]]) == 0\n assert candidate(heightMap = [[12, 13, 1, 12], [13, 4, 13, 12], [13, 8, 10, 12], [12, 13, 12, 12], [13, 13, 13, 13]]) == 14\n assert candidate(heightMap = [[7, 8, 9, 10, 9], [8, 9, 10, 11, 10], [9, 10, 11, 12, 11], [10, 11, 12, 13, 12], [11, 12, 13, 14, 13]]) == 0\n assert candidate(heightMap = [[1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 4, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1]]) == 8\n assert candidate(heightMap = [[10, 20, 10], [20, 5, 20], [10, 20, 10]]) == 15\n assert candidate(heightMap = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 2, 3, 4, 5], [5, 4, 3, 2, 1]]) == 0\n assert candidate(heightMap = [[3, 3, 3, 3, 3], [3, 2, 2, 2, 3], [3, 2, 1, 2, 3], [3, 2, 2, 2, 3], [3, 3, 3, 3, 3]]) == 10\n assert candidate(heightMap = [[2, 2, 2], [2, 1, 2], [2, 2, 2]]) == 1\n assert candidate(heightMap = [[10, 9, 8, 7, 6], [9, 8, 7, 6, 5], [8, 7, 6, 5, 4], [7, 6, 5, 4, 3], [6, 5, 4, 3, 2]]) == 0\n assert candidate(heightMap = [[3, 3, 3], [3, 1, 3], [3, 3, 3]]) == 2\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2], [3, 2, 1, 3, 2, 4], [2, 3, 3, 2, 3, 1]]) == 4\n assert candidate(heightMap = [[5, 8, 7, 7, 5], [5, 2, 1, 2, 5], [5, 3, 0, 3, 5], [5, 4, 4, 4, 5], [5, 5, 5, 5, 5]]) == 22\n assert candidate(heightMap = [[5, 15, 25, 35, 45], [5, 10, 10, 10, 10], [15, 10, 10, 10, 15], [25, 10, 10, 10, 25], [35, 10, 10, 10, 35], [45, 40, 30, 20, 15]]) == 0\n assert candidate(heightMap = [[1, 5, 3, 2, 4, 1, 2], [2, 3, 4, 2, 1, 4, 2], [3, 4, 2, 1, 5, 3, 4], [1, 3, 2, 4, 3, 2, 1], [2, 4, 5, 3, 2, 1, 2], [1, 3, 4, 2, 1, 3, 4]]) == 3\n assert candidate(heightMap = [[1, 3, 5, 7, 5, 3, 1], [3, 5, 7, 9, 7, 5, 3], [5, 7, 9, 11, 9, 7, 5], [7, 9, 11, 13, 11, 9, 7], [5, 7, 9, 11, 9, 7, 5], [3, 5, 7, 9, 7, 5, 3], [1, 3, 5, 7, 5, 3, 1]]) == 0\n assert candidate(heightMap = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9]]) == 0\n assert candidate(heightMap = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1]]) == 0\n assert candidate(heightMap = [[10, 14, 13, 15, 14, 13, 12], [15, 9, 8, 13, 12, 11, 10], [14, 10, 9, 12, 11, 10, 9], [13, 11, 10, 11, 10, 9, 8], [12, 12, 11, 10, 9, 8, 7], [11, 13, 12, 11, 10, 9, 8], [10, 14, 13, 12, 11, 10, 9]]) == 9\n assert candidate(heightMap = [[9, 1, 9, 1, 9, 1, 9, 1, 9], [1, 9, 1, 9, 1, 9, 1, 9, 1], [9, 1, 9, 1, 9, 1, 9, 1, 9], [1, 9, 1, 9, 1, 9, 1, 9, 1], [9, 1, 9, 1, 1, 1, 9, 1, 9], [1, 9, 1, 9, 1, 9, 1, 9, 1], [9, 1, 9, 1, 9, 1, 9, 1, 9]]) == 144\n assert candidate(heightMap = [[8, 8, 8, 8, 8, 8, 8, 8, 8], [8, 2, 2, 2, 2, 2, 2, 2, 8], [8, 2, 6, 6, 6, 6, 6, 2, 8], [8, 2, 6, 3, 3, 3, 6, 2, 8], [8, 2, 6, 3, 1, 3, 6, 2, 8], [8, 2, 6, 3, 3, 3, 6, 2, 8], [8, 2, 6, 6, 6, 6, 6, 2, 8], [8, 2, 2, 2, 2, 2, 2, 2, 8], [8, 8, 8, 8, 8, 8, 8, 8, 8]]) == 223\n assert candidate(heightMap = [[10, 20, 30, 40, 50], [40, 30, 20, 10, 40], [50, 40, 30, 20, 50], [40, 10, 20, 30, 40], [50, 50, 50, 50, 50]]) == 70\n assert candidate(heightMap = [[5, 8, 7, 7], [5, 2, 1, 5], [6, 1, 1, 4], [6, 3, 3, 8]]) == 7\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2, 4, 5, 1], [3, 2, 1, 3, 2, 4, 2, 3, 4], [2, 3, 3, 2, 3, 1, 4, 2, 1]]) == 5\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2, 5, 6, 3, 1], [3, 2, 1, 3, 2, 4, 1, 5, 3, 2], [2, 3, 3, 2, 3, 1, 3, 4, 1, 1], [3, 2, 1, 3, 2, 4, 1, 5, 3, 2], [2, 3, 3, 2, 3, 1, 3, 4, 1, 1], [3, 2, 1, 3, 2, 4, 1, 5, 3, 2], [2, 3, 3, 2, 3, 1, 3, 4, 1, 1]]) == 24\n assert candidate(heightMap = [[1, 2, 3, 4, 5], [2, 1, 2, 1, 2], [3, 2, 1, 2, 3], [4, 3, 2, 3, 4], [5, 4, 3, 4, 5]]) == 3\n assert candidate(heightMap = [[5, 8, 7, 7], [5, 2, 1, 5], [6, 1, 5, 4], [2, 1, 4, 3], [6, 3, 1, 2]]) == 3\n assert candidate(heightMap = [[8, 12, 9, 10, 11, 10], [13, 7, 6, 9, 8, 12], [14, 8, 7, 8, 7, 11], [15, 9, 8, 9, 8, 10], [16, 10, 9, 10, 9, 11], [17, 11, 10, 11, 10, 12]]) == 14\n assert candidate(heightMap = [[5, 5, 5, 1], [5, 1, 1, 5], [5, 1, 1, 5], [5, 5, 5, 1]]) == 16\n assert candidate(heightMap = [[3, 3, 3, 3, 3, 3], [3, 1, 1, 1, 1, 3], [3, 1, 2, 2, 1, 3], [3, 1, 2, 2, 1, 3], [3, 1, 1, 1, 1, 3], [3, 3, 3, 3, 3, 3]]) == 28\n assert candidate(heightMap = [[1, 1, 1, 1, 1, 1], [1, 100, 100, 100, 100, 1], [1, 100, 1, 1, 100, 1], [1, 100, 1, 1, 100, 1], [1, 100, 100, 100, 100, 1], [1, 1, 1, 1, 1, 1]]) == 396\n assert candidate(heightMap = [[1, 2, 3, 4, 5], [16, 17, 18, 19, 6], [15, 24, 25, 20, 7], [14, 23, 22, 21, 8], [13, 12, 11, 10, 9]]) == 0\n assert candidate(heightMap = [[12, 13, 12, 15, 14, 13], [16, 10, 9, 14, 13, 17], [15, 11, 10, 13, 12, 16], [14, 12, 11, 12, 11, 15], [13, 14, 13, 14, 13, 14]]) == 10\n assert candidate(heightMap = [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 1, 1, 1, 1, 1, 1, 1, 1, 10], [10, 1, 8, 8, 8, 8, 8, 8, 1, 10], [10, 1, 8, 5, 5, 5, 5, 5, 1, 10], [10, 1, 8, 5, 3, 3, 3, 5, 1, 10], [10, 1, 8, 5, 3, 1, 3, 5, 1, 10], [10, 1, 8, 5, 3, 3, 3, 5, 1, 10], [10, 1, 8, 5, 5, 5, 5, 5, 1, 10], [10, 1, 1, 1, 1, 1, 1, 1, 1, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]]) == 419\n assert candidate(heightMap = [[12, 13, 12, 11, 12, 13, 12], [13, 12, 11, 10, 11, 12, 13], [12, 11, 10, 9, 10, 11, 12], [11, 10, 9, 8, 9, 10, 11], [12, 11, 10, 9, 10, 11, 12], [13, 12, 11, 10, 11, 12, 13], [12, 13, 12, 11, 12, 13, 12]]) == 19\n assert candidate(heightMap = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]]) == 0\n assert candidate(heightMap = [[10, 20, 30, 40, 30, 20, 10], [20, 10, 10, 10, 10, 10, 20], [30, 10, 20, 30, 20, 10, 30], [40, 10, 30, 40, 30, 10, 40], [30, 10, 20, 30, 20, 10, 30], [20, 10, 10, 10, 10, 10, 20], [10, 20, 30, 40, 30, 20, 10]]) == 160\n assert candidate(heightMap = [[12, 13, 14, 15, 16, 17, 18, 19, 20], [11, 10, 9, 8, 7, 6, 5, 4, 3], [12, 13, 14, 15, 16, 17, 18, 19, 20], [11, 10, 9, 8, 7, 6, 5, 4, 3], [12, 13, 14, 15, 16, 17, 18, 19, 20], [11, 10, 9, 8, 7, 6, 5, 4, 3], [12, 13, 14, 15, 16, 17, 18, 19, 20], [11, 10, 9, 8, 7, 6, 5, 4, 3], [12, 13, 14, 15, 16, 17, 18, 19, 20]]) == 0\n assert candidate(heightMap = [[10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 1, 2, 3, 4, 5, 4, 3, 10], [10, 2, 1, 2, 3, 4, 3, 2, 10], [10, 3, 2, 1, 2, 3, 2, 1, 10], [10, 4, 3, 2, 1, 2, 1, 2, 10], [10, 5, 4, 3, 2, 1, 2, 3, 10], [10, 4, 5, 4, 3, 2, 3, 4, 10], [10, 3, 4, 5, 4, 3, 2, 1, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10]]) == 355\n assert candidate(heightMap = [[3, 3, 3, 3, 3, 3, 3], [3, 2, 2, 2, 1, 2, 3], [3, 2, 1, 1, 0, 1, 3], [3, 2, 2, 2, 1, 2, 3], [3, 3, 3, 3, 3, 3, 3]]) == 22\n assert candidate(heightMap = [[1, 1, 1, 1, 1, 1], [1, 2, 3, 3, 2, 1], [1, 2, 4, 4, 2, 1], [1, 2, 3, 3, 2, 1], [1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(heightMap = [[6, 8, 6, 8, 6, 8, 6, 8, 6], [8, 6, 8, 6, 8, 6, 8, 6, 8], [6, 8, 6, 8, 6, 8, 6, 8, 6], [8, 6, 8, 6, 8, 6, 8, 6, 8], [6, 8, 6, 8, 6, 8, 6, 8, 6]]) == 22\n assert candidate(heightMap = [[3, 3, 3, 3, 3, 3, 3], [3, 2, 2, 2, 2, 2, 3], [3, 2, 1, 1, 1, 2, 3], [3, 2, 1, 0, 1, 2, 3], [3, 2, 1, 1, 1, 2, 3], [3, 2, 2, 2, 2, 2, 3], [3, 3, 3, 3, 3, 3, 3]]) == 35\n assert candidate(heightMap = [[9, 9, 9, 9, 9, 9, 9], [9, 0, 0, 0, 0, 0, 9], [9, 0, 9, 9, 9, 0, 9], [9, 0, 9, 0, 9, 0, 9], [9, 0, 9, 9, 9, 0, 9], [9, 0, 0, 0, 0, 0, 9], [9, 9, 9, 9, 9, 9, 9]]) == 153\n assert candidate(heightMap = [[3, 2, 1, 2, 3, 4, 3, 2, 1], [3, 2, 1, 2, 3, 4, 3, 2, 1], [3, 2, 1, 2, 3, 4, 3, 2, 1], [3, 2, 1, 2, 3, 4, 3, 2, 1]]) == 0\n assert candidate(heightMap = [[5, 1, 5, 1, 5, 1, 5], [1, 5, 1, 5, 1, 5, 1], [5, 1, 5, 1, 5, 1, 5], [1, 5, 1, 5, 1, 5, 1], [5, 1, 5, 1, 5, 1, 5]]) == 28\n assert candidate(heightMap = [[3, 3, 3, 3, 3, 3], [3, 1, 2, 1, 2, 3], [3, 2, 1, 2, 1, 3], [3, 1, 2, 1, 2, 3], [3, 3, 3, 3, 3, 3]]) == 18\n assert candidate(heightMap = [[7, 5, 7, 9, 9, 4, 7, 8], [7, 5, 7, 6, 6, 4, 7, 8], [7, 5, 7, 5, 5, 4, 7, 8], [9, 9, 9, 9, 5, 9, 9, 9], [9, 5, 9, 9, 5, 9, 9, 9], [9, 5, 5, 5, 5, 9, 9, 9], [9, 5, 9, 9, 5, 9, 9, 9], [9, 5, 9, 9, 9, 9, 9, 9]]) == 0\n assert candidate(heightMap = [[20, 15, 10, 15, 20], [15, 10, 5, 10, 15], [10, 5, 0, 5, 10], [15, 10, 5, 10, 15], [20, 15, 10, 15, 20]]) == 30\n assert candidate(heightMap = [[8, 7, 9, 6, 8, 7, 9], [7, 6, 8, 5, 7, 6, 8], [9, 8, 7, 6, 9, 8, 7], [6, 5, 6, 5, 6, 5, 6], [8, 7, 8, 7, 8, 7, 8], [7, 6, 7, 6, 7, 6, 7], [9, 8, 9, 8, 9, 8, 9]]) == 9\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2, 5, 1, 3, 2], [3, 2, 1, 3, 2, 4, 1, 5, 1, 4], [2, 3, 3, 2, 3, 1, 3, 1, 3, 3], [1, 2, 1, 2, 1, 3, 2, 1, 2, 1], [3, 4, 3, 4, 3, 2, 1, 2, 1, 2]]) == 14\n assert candidate(heightMap = [[9, 1, 9, 1, 9, 1], [1, 2, 1, 2, 1, 2], [9, 1, 9, 1, 9, 1], [1, 2, 1, 2, 1, 2], [9, 1, 9, 1, 9, 1], [1, 2, 1, 2, 1, 2]]) == 8\n assert candidate(heightMap = [[2, 1, 2, 1, 2], [1, 2, 1, 2, 1], [2, 1, 2, 1, 2], [1, 2, 1, 2, 1], [2, 1, 2, 1, 2]]) == 4\n assert candidate(heightMap = [[10, 20, 30, 20, 10], [20, 15, 10, 15, 20], [30, 10, 5, 10, 30], [20, 15, 10, 15, 20], [10, 20, 30, 20, 10]]) == 75\n assert candidate(heightMap = [[6, 8, 6, 8, 6, 8, 6], [8, 6, 8, 6, 8, 6, 8], [6, 8, 6, 8, 6, 8, 6], [8, 6, 8, 6, 8, 6, 8], [6, 8, 6, 8, 6, 8, 6], [8, 6, 8, 6, 8, 6, 8], [6, 8, 6, 8, 6, 8, 6]]) == 26\n assert candidate(heightMap = [[0, 0, 0, 0, 0], [0, 1, 2, 1, 0], [0, 2, 3, 2, 0], [0, 1, 2, 1, 0], [0, 0, 0, 0, 0]]) == 0\n assert candidate(heightMap = [[12, 13, 12, 13, 12], [13, 11, 10, 11, 13], [12, 10, 9, 10, 12], [13, 11, 10, 11, 13], [12, 13, 12, 13, 12]]) == 15\n assert candidate(heightMap = [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3], [3, 1, 5, 5, 5, 5, 5, 5, 5, 1, 3], [3, 1, 5, 3, 3, 3, 3, 3, 5, 1, 3], [3, 1, 5, 3, 1, 1, 1, 3, 5, 1, 3], [3, 1, 5, 3, 1, 0, 1, 3, 5, 1, 3], [3, 1, 5, 3, 1, 1, 1, 3, 5, 1, 3], [3, 1, 5, 3, 3, 3, 3, 3, 5, 1, 3], [3, 1, 5, 5, 5, 5, 5, 5, 5, 1, 3], [3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]]) == 133\n assert candidate(heightMap = [[7, 7, 7, 7, 7, 7, 7], [7, 2, 2, 2, 2, 2, 7], [7, 2, 5, 5, 5, 2, 7], [7, 2, 5, 1, 5, 2, 7], [7, 2, 5, 5, 5, 2, 7], [7, 2, 2, 2, 2, 2, 7], [7, 7, 7, 7, 7, 7, 7]]) == 102\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2, 5, 6, 7, 8, 9, 10], [3, 2, 1, 3, 2, 4, 9, 8, 7, 6, 5, 4], [2, 3, 3, 2, 3, 1, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1], [1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8], [8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3], [7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4], [6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5]]) == 12\n assert candidate(heightMap = [[1, 2, 3, 4, 5, 4, 3, 2, 1], [2, 3, 4, 5, 6, 5, 4, 3, 2], [3, 4, 5, 6, 7, 6, 5, 4, 3], [4, 5, 6, 7, 8, 7, 6, 5, 4], [5, 6, 7, 8, 9, 8, 7, 6, 5], [4, 5, 6, 7, 8, 7, 6, 5, 4], [3, 4, 5, 6, 7, 6, 5, 4, 3], [2, 3, 4, 5, 6, 5, 4, 3, 2], [1, 2, 3, 4, 5, 4, 3, 2, 1]]) == 0\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2, 5], [3, 2, 1, 3, 2, 4, 5], [2, 3, 3, 2, 3, 1, 5], [6, 6, 6, 6, 6, 6, 6]]) == 7\n assert candidate(heightMap = [[12, 13, 14, 15, 16], [11, 10, 9, 8, 17], [18, 19, 20, 7, 6], [5, 4, 3, 2, 1], [21, 22, 23, 24, 25]]) == 0\n assert candidate(heightMap = [[5, 5, 5, 5, 5, 5], [5, 1, 2, 3, 4, 5], [5, 2, 3, 4, 5, 5], [5, 3, 4, 5, 5, 5], [5, 4, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5]]) == 20\n assert candidate(heightMap = [[10, 10, 10, 10, 10], [10, 9, 9, 9, 10], [10, 9, 8, 9, 10], [10, 9, 9, 9, 10], [10, 10, 10, 10, 10]]) == 10\n assert candidate(heightMap = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 183\n assert candidate(heightMap = [[12, 13, 14, 15, 16], [11, 10, 9, 8, 7], [6, 5, 4, 3, 2], [1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]) == 0\n assert candidate(heightMap = [[5, 5, 5, 5, 5, 5], [5, 4, 4, 4, 4, 5], [5, 4, 3, 3, 4, 5], [5, 4, 3, 3, 4, 5], [5, 4, 4, 4, 4, 5], [5, 5, 5, 5, 5, 5]]) == 20\n assert candidate(heightMap = [[5, 5, 5, 5, 5], [5, 1, 1, 1, 5], [5, 1, 4, 1, 5], [5, 1, 1, 1, 5], [5, 5, 5, 5, 5]]) == 33\n assert candidate(heightMap = [[7, 8, 9, 10, 9, 8, 7], [6, 5, 4, 3, 4, 5, 6], [7, 8, 9, 10, 9, 8, 7], [6, 5, 4, 3, 4, 5, 6]]) == 9\n assert candidate(heightMap = [[5, 5, 5, 5, 5], [5, 4, 4, 4, 5], [5, 4, 3, 4, 5], [5, 4, 4, 4, 5], [5, 5, 5, 5, 5]]) == 10\n assert candidate(heightMap = [[5, 8, 7, 7, 5], [5, 2, 1, 2, 5], [5, 1, 3, 1, 5], [5, 2, 1, 2, 5], [5, 5, 5, 5, 5]]) == 30\n assert candidate(heightMap = [[12, 13, 14, 15, 16], [11, 10, 9, 8, 7], [10, 9, 8, 7, 6], [9, 8, 7, 6, 5], [8, 7, 6, 5, 4]]) == 0\n assert candidate(heightMap = [[10, 20, 10, 20, 10, 20, 10], [20, 10, 20, 10, 20, 10, 20], [10, 20, 10, 20, 10, 20, 10], [20, 10, 20, 10, 20, 10, 20], [10, 20, 10, 20, 10, 20, 10]]) == 80\n assert candidate(heightMap = [[1, 4, 3, 1, 3, 2], [3, 2, 1, 3, 2, 4], [2, 3, 3, 2, 3, 1], [4, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 4]]) == 4\n assert candidate(heightMap = [[7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 1, 1, 1, 1, 1, 1, 1, 1, 7], [7, 1, 6, 6, 6, 6, 6, 6, 1, 7], [7, 1, 6, 5, 5, 5, 5, 6, 1, 7], [7, 1, 6, 5, 4, 4, 5, 6, 1, 7], [7, 1, 6, 5, 4, 4, 5, 6, 1, 7], [7, 1, 6, 5, 5, 5, 5, 6, 1, 7], [7, 1, 6, 6, 6, 6, 6, 6, 1, 7], [7, 1, 1, 1, 1, 1, 1, 1, 1, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7]]) == 224\n", "comparison": "exact"}, "public_tests": ["[[1,4,3,1,3,2],[3,2,1,3,2,4],[2,3,3,2,3,1]]", "[[3,3,3,3,3],[3,2,2,2,3],[3,2,1,2,3],[3,2,2,2,3],[3,3,3,3,3]]"], "hints": [], "metadata": {"canonical_parameter_names": ["heightMap"], "leetcode_dataset_entry_point": "Solution().trapRainWater", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:17+00:00", "tests_total": 78, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "breadth-first-search", "heap-priority-queue", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def trap_rain_water(height_map)", "container": null, "callable": "trap_rain_water", "parameters": [{"name": "height_map", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 409, "task_id": "longest-palindrome", "difficulty": "Easy", "problem_description": "Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those letters.\n\nLetters are case sensitive, for example, \"Aa\" is not considered a palindrome.\n\nExample 1:\n\nInput: s = \"abccccdd\"\nOutput: 7\nExplanation: One longest palindrome that can be built is \"dccaccd\", whose length is 7.\n\nExample 2:\n\nInput: s = \"a\"\nOutput: 1\nExplanation: The longest palindrome that can be built is \"a\", whose length is 1.\n\nConstraints:\n\n- 1 <= s.length <= 2000\n- s consists of lowercase and/or uppercase English letters only.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"aabbccc\") == 7\n assert candidate(s = \"abccccdd\") == 7\n assert candidate(s = \"zyyzzzzz\") == 8\n assert candidate(s = \"abcdedcba\") == 9\n assert candidate(s = \"aabbbb\") == 6\n assert candidate(s = \"aaaaa\") == 5\n assert candidate(s = \"aabbccddee\") == 10\n assert candidate(s = \"a\") == 1\n assert candidate(s = \"aaabbbaa\") == 7\n assert candidate(s = \"aabbbccc\") == 7\n assert candidate(s = \"aabbbbccc\") == 9\n assert candidate(s = \"zzzz\") == 4\n assert candidate(s = \"aabbc\") == 5\n assert candidate(s = \"aabbb\") == 5\n assert candidate(s = \"abcde\") == 1\n assert candidate(s = \"Aa\") == 1\n assert candidate(s = \"racecar\") == 7\n assert candidate(s = \"aabb\") == 4\n assert candidate(s = \"abbccc\") == 5\n assert candidate(s = \"abcadcb\") == 7\n assert candidate(s = \"abcABC\") == 1\n assert candidate(s = \"abba\") == 4\n assert candidate(s = \"abc\") == 1\n assert candidate(s = \"aabbccddeeffgghhii\") == 18\n assert candidate(s = \"aabbccddeeff\") == 12\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == 52\n assert candidate(s = \"aabbbbcccc\") == 10\n assert candidate(s = \"zzzzzzzz\") == 8\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == 1\n assert candidate(s = \"abcdefg\") == 1\n assert candidate(s = \"aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\") == 1\n assert candidate(s = \"abAB\") == 1\n assert candidate(s = \"aaAAbbBBccCCddDDeeEEffFFggGGhhHHiiJJkkLLmmNNooPPqqRRssSStttUuuVvvWwwXxxYyyZzz\") == 71\n assert candidate(s = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 49\n assert candidate(s = \"deified\") == 7\n assert candidate(s = \"AaBbCcDdEeFfGg\") == 1\n assert candidate(s = \"abcABCabcABCabcABC\") == 13\n assert candidate(s = \"abcdeABCDEabcdeABCDEabcdeABCDEabcdeABCDE\") == 40\n assert candidate(s = \"abcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcabcdabcdabcabcdabcabcdabc\") == 71\n assert candidate(s = \"Aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 51\n assert candidate(s = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz\") == 1\n assert candidate(s = \"abacabadabacaba\") == 15\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzAAAaaaBBBbbbCCCcccDDDdddEEEeeeFFFfffGGGgggHHHhhhIIIiiiJJJjjjKKKkkkLLLlllMMMmmmNNNnnnOOOoooPPPpppQQQqqqRRRrrrSSSsssTTTtttUUUuuuVVVvvvWWWwwwXXXxxxYYYyyyZZZzzz\") == 157\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") == 1\n assert candidate(s = \"abacabadabacabadabacabadabacabad\") == 32\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbaABCDEFGHIJKLMNOPQRSTUVWXYZ\") == 1\n assert candidate(s = \"bAabA\") == 5\n assert candidate(s = \"rotor\") == 5\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyz\") == 51\n assert candidate(s = \"noon\") == 4\n assert candidate(s = \"banana\") == 5\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg\") == 56\n assert candidate(s = \"abbcccdddd\") == 9\n assert candidate(s = \"aabbccddeeeffffffgggg\") == 21\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 52\n assert candidate(s = \"bbaaaacccddeeefffggghhhiiijjjkkklllmmmnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz\") == 55\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == 71\n assert candidate(s = \"abbacdfee\") == 7\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzzzzzzz\") == 58\n assert candidate(s = \"AxA\") == 3\n assert candidate(s = \"aaabbbbcccc\") == 11\n assert candidate(s = \"thisisatest\") == 7\n assert candidate(s = \"mississippi\") == 11\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 52\n assert candidate(s = \"zyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyxzyx\") == 49\n assert candidate(s = \"level\") == 5\n assert candidate(s = \"Aaaaaaaa\") == 7\n", "comparison": "exact"}, "public_tests": ["\"abccccdd\"", "\"a\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestPalindrome", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:21+00:00", "tests_total": 68, "tests_dropped": 1, "flags": [], "topic_tags": ["hash-table", "string", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def longest_palindrome(s)", "container": null, "callable": "longest_palindrome", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 410, "task_id": "split-array-largest-sum", "difficulty": "Hard", "problem_description": "Given an integer array nums and an integer k, split nums into k non-empty subarrays such that the largest sum of any subarray is minimized.\n\nReturn the minimized largest sum of the split.\n\nA subarray is a contiguous part of the array.\n\nExample 1:\n\nInput: nums = [7,2,5,10,8], k = 2\nOutput: 18\nExplanation: There are four ways to split nums into two subarrays.\nThe best way is to split it into [7,2,5] and [10,8], where the largest sum among the two subarrays is only 18.\n\nExample 2:\n\nInput: nums = [1,2,3,4,5], k = 2\nOutput: 9\nExplanation: There are four ways to split nums into two subarrays.\nThe best way is to split it into [1,2,3] and [4,5], where the largest sum among the two subarrays is only 9.\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- 0 <= nums[i] <= 10^6\n- 1 <= k <= min(50, nums.length)\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [7, 2, 5, 10, 8],k = 2) == 18\n assert candidate(nums = [5, 5, 5, 5, 5],k = 5) == 5\n assert candidate(nums = [10, 10, 10, 10],k = 2) == 20\n assert candidate(nums = [10, 5, 13, 4, 8, 4, 5, 11, 14, 9, 15],k = 6) == 23\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == 15\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 10) == 5\n assert candidate(nums = [10, 10, 10, 10, 10],k = 5) == 10\n assert candidate(nums = [1, 2, 3, 4, 5],k = 2) == 9\n assert candidate(nums = [1, 1000000, 1],k = 2) == 1000001\n assert candidate(nums = [1, 4, 4],k = 3) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 3) == 17\n assert candidate(nums = [10, 5, 13, 4, 8, 4, 5, 11, 14, 9, 15],k = 8) == 15\n assert candidate(nums = [4, 2, 5, 1, 7],k = 3) == 7\n assert candidate(nums = [10, 5, 13, 4, 8, 4, 5, 11, 14, 9, 15],k = 3) == 38\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == 1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 5) == 0\n assert candidate(nums = [1000000],k = 1) == 1000000\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == 4\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 5) == 150\n assert candidate(nums = [3, 2, 5, 7, 1, 10, 4, 2, 8, 6, 3],k = 4) == 17\n assert candidate(nums = [100, 400, 500, 300, 200],k = 3) == 500\n assert candidate(nums = [1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000, 1],k = 5) == 1001\n assert candidate(nums = [4, 2, 5, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 7) == 37\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096],k = 7) == 4096\n assert candidate(nums = [20, 30, 10, 40, 50, 60, 70, 80],k = 3) == 150\n assert candidate(nums = [100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000],k = 5) == 200000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 6) == 87\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5],k = 3) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == 21\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000],k = 5) == 15000\n assert candidate(nums = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100],k = 2) == 2800\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == 4\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000],k = 3) == 1000000\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000],k = 10) == 1000\n assert candidate(nums = [5, 1, 4, 2, 3, 6, 7, 8, 9, 10],k = 4) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == 21\n assert candidate(nums = [50, 30, 20, 10, 40, 60, 70, 80, 90, 100],k = 4) == 170\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10) == 28\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 5) == 8\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 7) == 30\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 6) == 250\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 4) == 17\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 5) == 1500\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 10) == 63\n assert candidate(nums = [1000000, 1, 1000000, 1, 1000000],k = 2) == 2000001\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000],k = 2) == 5000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 3) == 74\n assert candidate(nums = [9, 18, 27, 36, 45, 54, 63, 72, 81, 90],k = 9) == 90\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10) == 28\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 3) == 2100\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 7) == 230\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 7) == 230\n assert candidate(nums = [7, 3, 8, 7, 10, 1, 12, 6, 7, 6, 8, 9],k = 5) == 18\n assert candidate(nums = [3, 5, 8, 10, 15, 18, 20],k = 3) == 33\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],k = 5) == 2800\n assert candidate(nums = [100, 200, 300, 400, 500],k = 2) == 900\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 3) == 7\n assert candidate(nums = [100, 50, 20, 30, 10, 80, 90, 40, 60, 70],k = 3) == 200\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 4) == 1700\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],k = 10) == 280\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],k = 15) == 28\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120],k = 5) == 210\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1],k = 3) == 17\n assert candidate(nums = [100, 400, 300, 100, 500, 300, 200],k = 4) == 500\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 5) == 46\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 15) == 42\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15],k = 20) == 15\n assert candidate(nums = [1, 1000, 1, 1000, 1, 1000, 1, 1000, 1, 1000],k = 2) == 3002\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 5) == 150\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],k = 8) == 210\n assert candidate(nums = [3, 2, 4, 1, 5, 9, 7, 6, 8, 10],k = 4) == 16\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 15) == 11\n assert candidate(nums = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1],k = 5) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 5) == 46\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == 15\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 4) == 170\n assert candidate(nums = [1000000, 999999, 888888, 777777, 666666, 555555, 444444, 333333, 222222, 111111],k = 5) == 1666665\n assert candidate(nums = [9, 7, 6, 5, 4, 3, 2, 1],k = 4) == 11\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0],k = 6) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],k = 15) == 28\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 1) == 210\n", "comparison": "exact"}, "public_tests": ["[7,2,5,10,8]\n2", "[1,2,3,4,5]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().splitArray", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:24+00:00", "tests_total": 83, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-search", "dynamic-programming", "greedy", "prefix-sum"]}, "language": "ruby", "interface": {"raw_signature": "def split_array(nums, k)", "container": null, "callable": "split_array", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 412, "task_id": "fizz-buzz", "difficulty": "Easy", "problem_description": "Given an integer n, return a string array answer (1-indexed) where:\n\n- answer[i] == \"FizzBuzz\" if i is divisible by 3 and 5.\n- answer[i] == \"Fizz\" if i is divisible by 3.\n- answer[i] == \"Buzz\" if i is divisible by 5.\n- answer[i] == i (as a string) if none of the above conditions are true.\n\nExample 1:\n\nInput: n = 3\nOutput: [\"1\",\"2\",\"Fizz\"]\n\nExample 2:\n\nInput: n = 5\nOutput: [\"1\",\"2\",\"Fizz\",\"4\",\"Buzz\"]\n\nExample 3:\n\nInput: n = 15\nOutput: [\"1\",\"2\",\"Fizz\",\"4\",\"Buzz\",\"Fizz\",\"7\",\"8\",\"Fizz\",\"Buzz\",\"11\",\"Fizz\",\"13\",\"14\",\"FizzBuzz\"]\n\nConstraints:\n\n- 1 <= n <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == ['1', '2', 'Fizz']\n assert candidate(n = 100) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz']\n assert candidate(n = 15) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz']\n assert candidate(n = 1) == ['1']\n assert candidate(n = 50) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz']\n assert candidate(n = 5) == ['1', '2', 'Fizz', '4', 'Buzz']\n assert candidate(n = 4000) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024', 'Buzz', 'Fizz', '1027', '1028', 'Fizz', 'Buzz', '1031', 'Fizz', '1033', '1034', 'FizzBuzz', '1036', '1037', 'Fizz', '1039', 'Buzz', 'Fizz', '1042', '1043', 'Fizz', 'Buzz', '1046', 'Fizz', '1048', '1049', 'FizzBuzz', '1051', '1052', 'Fizz', '1054', 'Buzz', 'Fizz', '1057', '1058', 'Fizz', 'Buzz', '1061', 'Fizz', '1063', '1064', 'FizzBuzz', '1066', '1067', 'Fizz', '1069', 'Buzz', 'Fizz', '1072', '1073', 'Fizz', 'Buzz', '1076', 'Fizz', '1078', '1079', 'FizzBuzz', '1081', '1082', 'Fizz', '1084', 'Buzz', 'Fizz', '1087', '1088', 'Fizz', 'Buzz', '1091', 'Fizz', '1093', '1094', 'FizzBuzz', '1096', '1097', 'Fizz', '1099', 'Buzz', 'Fizz', '1102', '1103', 'Fizz', 'Buzz', '1106', 'Fizz', '1108', '1109', 'FizzBuzz', '1111', '1112', 'Fizz', '1114', 'Buzz', 'Fizz', '1117', '1118', 'Fizz', 'Buzz', '1121', 'Fizz', '1123', '1124', 'FizzBuzz', '1126', '1127', 'Fizz', '1129', 'Buzz', 'Fizz', '1132', '1133', 'Fizz', 'Buzz', '1136', 'Fizz', '1138', '1139', 'FizzBuzz', '1141', '1142', 'Fizz', '1144', 'Buzz', 'Fizz', '1147', '1148', 'Fizz', 'Buzz', '1151', 'Fizz', '1153', '1154', 'FizzBuzz', '1156', '1157', 'Fizz', '1159', 'Buzz', 'Fizz', '1162', '1163', 'Fizz', 'Buzz', '1166', 'Fizz', '1168', '1169', 'FizzBuzz', '1171', '1172', 'Fizz', '1174', 'Buzz', 'Fizz', '1177', '1178', 'Fizz', 'Buzz', '1181', 'Fizz', '1183', '1184', 'FizzBuzz', '1186', '1187', 'Fizz', '1189', 'Buzz', 'Fizz', '1192', '1193', 'Fizz', 'Buzz', '1196', 'Fizz', '1198', '1199', 'FizzBuzz', '1201', '1202', 'Fizz', '1204', 'Buzz', 'Fizz', '1207', '1208', 'Fizz', 'Buzz', '1211', 'Fizz', '1213', '1214', 'FizzBuzz', '1216', '1217', 'Fizz', '1219', 'Buzz', 'Fizz', '1222', '1223', 'Fizz', 'Buzz', '1226', 'Fizz', '1228', '1229', 'FizzBuzz', '1231', '1232', 'Fizz', '1234', 'Buzz', 'Fizz', '1237', '1238', 'Fizz', 'Buzz', '1241', 'Fizz', '1243', '1244', 'FizzBuzz', '1246', '1247', 'Fizz', '1249', 'Buzz', 'Fizz', '1252', '1253', 'Fizz', 'Buzz', '1256', 'Fizz', '1258', '1259', 'FizzBuzz', '1261', '1262', 'Fizz', '1264', 'Buzz', 'Fizz', '1267', '1268', 'Fizz', 'Buzz', '1271', 'Fizz', '1273', '1274', 'FizzBuzz', '1276', '1277', 'Fizz', '1279', 'Buzz', 'Fizz', '1282', '1283', 'Fizz', 'Buzz', '1286', 'Fizz', '1288', '1289', 'FizzBuzz', '1291', '1292', 'Fizz', '1294', 'Buzz', 'Fizz', '1297', '1298', 'Fizz', 'Buzz', '1301', 'Fizz', '1303', '1304', 'FizzBuzz', '1306', '1307', 'Fizz', '1309', 'Buzz', 'Fizz', '1312', '1313', 'Fizz', 'Buzz', '1316', 'Fizz', '1318', '1319', 'FizzBuzz', '1321', '1322', 'Fizz', '1324', 'Buzz', 'Fizz', '1327', '1328', 'Fizz', 'Buzz', '1331', 'Fizz', '1333', '1334', 'FizzBuzz', '1336', '1337', 'Fizz', '1339', 'Buzz', 'Fizz', '1342', '1343', 'Fizz', 'Buzz', '1346', 'Fizz', '1348', '1349', 'FizzBuzz', '1351', '1352', 'Fizz', '1354', 'Buzz', 'Fizz', '1357', '1358', 'Fizz', 'Buzz', '1361', 'Fizz', '1363', '1364', 'FizzBuzz', '1366', '1367', 'Fizz', '1369', 'Buzz', 'Fizz', '1372', '1373', 'Fizz', 'Buzz', '1376', 'Fizz', '1378', '1379', 'FizzBuzz', '1381', '1382', 'Fizz', '1384', 'Buzz', 'Fizz', '1387', '1388', 'Fizz', 'Buzz', '1391', 'Fizz', '1393', '1394', 'FizzBuzz', '1396', '1397', 'Fizz', '1399', 'Buzz', 'Fizz', '1402', '1403', 'Fizz', 'Buzz', '1406', 'Fizz', '1408', '1409', 'FizzBuzz', '1411', '1412', 'Fizz', '1414', 'Buzz', 'Fizz', '1417', '1418', 'Fizz', 'Buzz', '1421', 'Fizz', '1423', '1424', 'FizzBuzz', '1426', '1427', 'Fizz', '1429', 'Buzz', 'Fizz', '1432', '1433', 'Fizz', 'Buzz', '1436', 'Fizz', '1438', '1439', 'FizzBuzz', '1441', '1442', 'Fizz', '1444', 'Buzz', 'Fizz', '1447', '1448', 'Fizz', 'Buzz', '1451', 'Fizz', '1453', '1454', 'FizzBuzz', '1456', '1457', 'Fizz', '1459', 'Buzz', 'Fizz', '1462', '1463', 'Fizz', 'Buzz', '1466', 'Fizz', '1468', '1469', 'FizzBuzz', '1471', '1472', 'Fizz', '1474', 'Buzz', 'Fizz', '1477', '1478', 'Fizz', 'Buzz', '1481', 'Fizz', '1483', '1484', 'FizzBuzz', '1486', '1487', 'Fizz', '1489', 'Buzz', 'Fizz', '1492', '1493', 'Fizz', 'Buzz', '1496', 'Fizz', '1498', '1499', 'FizzBuzz', '1501', '1502', 'Fizz', '1504', 'Buzz', 'Fizz', '1507', '1508', 'Fizz', 'Buzz', '1511', 'Fizz', '1513', '1514', 'FizzBuzz', '1516', '1517', 'Fizz', '1519', 'Buzz', 'Fizz', '1522', '1523', 'Fizz', 'Buzz', '1526', 'Fizz', '1528', '1529', 'FizzBuzz', '1531', '1532', 'Fizz', '1534', 'Buzz', 'Fizz', '1537', '1538', 'Fizz', 'Buzz', '1541', 'Fizz', '1543', '1544', 'FizzBuzz', '1546', '1547', 'Fizz', '1549', 'Buzz', 'Fizz', '1552', '1553', 'Fizz', 'Buzz', '1556', 'Fizz', '1558', '1559', 'FizzBuzz', '1561', '1562', 'Fizz', '1564', 'Buzz', 'Fizz', '1567', '1568', 'Fizz', 'Buzz', '1571', 'Fizz', '1573', '1574', 'FizzBuzz', '1576', '1577', 'Fizz', '1579', 'Buzz', 'Fizz', '1582', '1583', 'Fizz', 'Buzz', '1586', 'Fizz', '1588', '1589', 'FizzBuzz', '1591', '1592', 'Fizz', '1594', 'Buzz', 'Fizz', '1597', '1598', 'Fizz', 'Buzz', '1601', 'Fizz', '1603', '1604', 'FizzBuzz', '1606', '1607', 'Fizz', '1609', 'Buzz', 'Fizz', '1612', '1613', 'Fizz', 'Buzz', '1616', 'Fizz', '1618', '1619', 'FizzBuzz', '1621', '1622', 'Fizz', '1624', 'Buzz', 'Fizz', '1627', '1628', 'Fizz', 'Buzz', '1631', 'Fizz', '1633', '1634', 'FizzBuzz', '1636', '1637', 'Fizz', '1639', 'Buzz', 'Fizz', '1642', '1643', 'Fizz', 'Buzz', '1646', 'Fizz', '1648', '1649', 'FizzBuzz', '1651', '1652', 'Fizz', '1654', 'Buzz', 'Fizz', '1657', '1658', 'Fizz', 'Buzz', '1661', 'Fizz', '1663', '1664', 'FizzBuzz', '1666', '1667', 'Fizz', '1669', 'Buzz', 'Fizz', '1672', '1673', 'Fizz', 'Buzz', '1676', 'Fizz', '1678', '1679', 'FizzBuzz', '1681', '1682', 'Fizz', '1684', 'Buzz', 'Fizz', '1687', '1688', 'Fizz', 'Buzz', '1691', 'Fizz', '1693', '1694', 'FizzBuzz', '1696', '1697', 'Fizz', '1699', 'Buzz', 'Fizz', '1702', '1703', 'Fizz', 'Buzz', '1706', 'Fizz', '1708', '1709', 'FizzBuzz', '1711', '1712', 'Fizz', '1714', 'Buzz', 'Fizz', '1717', '1718', 'Fizz', 'Buzz', '1721', 'Fizz', '1723', '1724', 'FizzBuzz', '1726', '1727', 'Fizz', '1729', 'Buzz', 'Fizz', '1732', '1733', 'Fizz', 'Buzz', '1736', 'Fizz', '1738', '1739', 'FizzBuzz', '1741', '1742', 'Fizz', '1744', 'Buzz', 'Fizz', '1747', '1748', 'Fizz', 'Buzz', '1751', 'Fizz', '1753', '1754', 'FizzBuzz', '1756', '1757', 'Fizz', '1759', 'Buzz', 'Fizz', '1762', '1763', 'Fizz', 'Buzz', '1766', 'Fizz', '1768', '1769', 'FizzBuzz', '1771', '1772', 'Fizz', '1774', 'Buzz', 'Fizz', '1777', '1778', 'Fizz', 'Buzz', '1781', 'Fizz', '1783', '1784', 'FizzBuzz', '1786', '1787', 'Fizz', '1789', 'Buzz', 'Fizz', '1792', '1793', 'Fizz', 'Buzz', '1796', 'Fizz', '1798', '1799', 'FizzBuzz', '1801', '1802', 'Fizz', '1804', 'Buzz', 'Fizz', '1807', '1808', 'Fizz', 'Buzz', '1811', 'Fizz', '1813', '1814', 'FizzBuzz', '1816', '1817', 'Fizz', '1819', 'Buzz', 'Fizz', '1822', '1823', 'Fizz', 'Buzz', '1826', 'Fizz', '1828', '1829', 'FizzBuzz', '1831', '1832', 'Fizz', '1834', 'Buzz', 'Fizz', '1837', '1838', 'Fizz', 'Buzz', '1841', 'Fizz', '1843', '1844', 'FizzBuzz', '1846', '1847', 'Fizz', '1849', 'Buzz', 'Fizz', '1852', '1853', 'Fizz', 'Buzz', '1856', 'Fizz', '1858', '1859', 'FizzBuzz', '1861', '1862', 'Fizz', '1864', 'Buzz', 'Fizz', '1867', '1868', 'Fizz', 'Buzz', '1871', 'Fizz', '1873', '1874', 'FizzBuzz', '1876', '1877', 'Fizz', '1879', 'Buzz', 'Fizz', '1882', '1883', 'Fizz', 'Buzz', '1886', 'Fizz', '1888', '1889', 'FizzBuzz', '1891', '1892', 'Fizz', '1894', 'Buzz', 'Fizz', '1897', '1898', 'Fizz', 'Buzz', '1901', 'Fizz', '1903', '1904', 'FizzBuzz', '1906', '1907', 'Fizz', '1909', 'Buzz', 'Fizz', '1912', '1913', 'Fizz', 'Buzz', '1916', 'Fizz', '1918', '1919', 'FizzBuzz', '1921', '1922', 'Fizz', '1924', 'Buzz', 'Fizz', '1927', '1928', 'Fizz', 'Buzz', '1931', 'Fizz', '1933', '1934', 'FizzBuzz', '1936', '1937', 'Fizz', '1939', 'Buzz', 'Fizz', '1942', '1943', 'Fizz', 'Buzz', '1946', 'Fizz', '1948', '1949', 'FizzBuzz', '1951', '1952', 'Fizz', '1954', 'Buzz', 'Fizz', '1957', '1958', 'Fizz', 'Buzz', '1961', 'Fizz', '1963', '1964', 'FizzBuzz', '1966', '1967', 'Fizz', '1969', 'Buzz', 'Fizz', '1972', '1973', 'Fizz', 'Buzz', '1976', 'Fizz', '1978', '1979', 'FizzBuzz', '1981', '1982', 'Fizz', '1984', 'Buzz', 'Fizz', '1987', '1988', 'Fizz', 'Buzz', '1991', 'Fizz', '1993', '1994', 'FizzBuzz', '1996', '1997', 'Fizz', '1999', 'Buzz', 'Fizz', '2002', '2003', 'Fizz', 'Buzz', '2006', 'Fizz', '2008', '2009', 'FizzBuzz', '2011', '2012', 'Fizz', '2014', 'Buzz', 'Fizz', '2017', '2018', 'Fizz', 'Buzz', '2021', 'Fizz', '2023', '2024', 'FizzBuzz', '2026', '2027', 'Fizz', '2029', 'Buzz', 'Fizz', '2032', '2033', 'Fizz', 'Buzz', '2036', 'Fizz', '2038', '2039', 'FizzBuzz', '2041', '2042', 'Fizz', '2044', 'Buzz', 'Fizz', '2047', '2048', 'Fizz', 'Buzz', '2051', 'Fizz', '2053', '2054', 'FizzBuzz', '2056', '2057', 'Fizz', '2059', 'Buzz', 'Fizz', '2062', '2063', 'Fizz', 'Buzz', '2066', 'Fizz', '2068', '2069', 'FizzBuzz', '2071', '2072', 'Fizz', '2074', 'Buzz', 'Fizz', '2077', '2078', 'Fizz', 'Buzz', '2081', 'Fizz', '2083', '2084', 'FizzBuzz', '2086', '2087', 'Fizz', '2089', 'Buzz', 'Fizz', '2092', '2093', 'Fizz', 'Buzz', '2096', 'Fizz', '2098', '2099', 'FizzBuzz', '2101', '2102', 'Fizz', '2104', 'Buzz', 'Fizz', '2107', '2108', 'Fizz', 'Buzz', '2111', 'Fizz', '2113', '2114', 'FizzBuzz', '2116', '2117', 'Fizz', '2119', 'Buzz', 'Fizz', '2122', '2123', 'Fizz', 'Buzz', '2126', 'Fizz', '2128', '2129', 'FizzBuzz', '2131', '2132', 'Fizz', '2134', 'Buzz', 'Fizz', '2137', '2138', 'Fizz', 'Buzz', '2141', 'Fizz', '2143', '2144', 'FizzBuzz', '2146', '2147', 'Fizz', '2149', 'Buzz', 'Fizz', '2152', '2153', 'Fizz', 'Buzz', '2156', 'Fizz', '2158', '2159', 'FizzBuzz', '2161', '2162', 'Fizz', '2164', 'Buzz', 'Fizz', '2167', '2168', 'Fizz', 'Buzz', '2171', 'Fizz', '2173', '2174', 'FizzBuzz', '2176', '2177', 'Fizz', '2179', 'Buzz', 'Fizz', '2182', '2183', 'Fizz', 'Buzz', '2186', 'Fizz', '2188', '2189', 'FizzBuzz', '2191', '2192', 'Fizz', '2194', 'Buzz', 'Fizz', '2197', '2198', 'Fizz', 'Buzz', '2201', 'Fizz', '2203', '2204', 'FizzBuzz', '2206', '2207', 'Fizz', '2209', 'Buzz', 'Fizz', '2212', '2213', 'Fizz', 'Buzz', '2216', 'Fizz', '2218', '2219', 'FizzBuzz', '2221', '2222', 'Fizz', '2224', 'Buzz', 'Fizz', '2227', '2228', 'Fizz', 'Buzz', '2231', 'Fizz', '2233', '2234', 'FizzBuzz', '2236', '2237', 'Fizz', '2239', 'Buzz', 'Fizz', '2242', '2243', 'Fizz', 'Buzz', '2246', 'Fizz', '2248', '2249', 'FizzBuzz', '2251', '2252', 'Fizz', '2254', 'Buzz', 'Fizz', '2257', '2258', 'Fizz', 'Buzz', '2261', 'Fizz', '2263', '2264', 'FizzBuzz', '2266', '2267', 'Fizz', '2269', 'Buzz', 'Fizz', '2272', '2273', 'Fizz', 'Buzz', '2276', 'Fizz', '2278', '2279', 'FizzBuzz', '2281', '2282', 'Fizz', '2284', 'Buzz', 'Fizz', '2287', '2288', 'Fizz', 'Buzz', '2291', 'Fizz', '2293', '2294', 'FizzBuzz', '2296', '2297', 'Fizz', '2299', 'Buzz', 'Fizz', '2302', '2303', 'Fizz', 'Buzz', '2306', 'Fizz', '2308', '2309', 'FizzBuzz', '2311', '2312', 'Fizz', '2314', 'Buzz', 'Fizz', '2317', '2318', 'Fizz', 'Buzz', '2321', 'Fizz', '2323', '2324', 'FizzBuzz', '2326', '2327', 'Fizz', '2329', 'Buzz', 'Fizz', '2332', '2333', 'Fizz', 'Buzz', '2336', 'Fizz', '2338', '2339', 'FizzBuzz', '2341', '2342', 'Fizz', '2344', 'Buzz', 'Fizz', '2347', '2348', 'Fizz', 'Buzz', '2351', 'Fizz', '2353', '2354', 'FizzBuzz', '2356', '2357', 'Fizz', '2359', 'Buzz', 'Fizz', '2362', '2363', 'Fizz', 'Buzz', '2366', 'Fizz', '2368', '2369', 'FizzBuzz', '2371', '2372', 'Fizz', '2374', 'Buzz', 'Fizz', '2377', '2378', 'Fizz', 'Buzz', '2381', 'Fizz', '2383', '2384', 'FizzBuzz', '2386', '2387', 'Fizz', '2389', 'Buzz', 'Fizz', '2392', '2393', 'Fizz', 'Buzz', '2396', 'Fizz', '2398', '2399', 'FizzBuzz', '2401', '2402', 'Fizz', '2404', 'Buzz', 'Fizz', '2407', '2408', 'Fizz', 'Buzz', '2411', 'Fizz', '2413', '2414', 'FizzBuzz', '2416', '2417', 'Fizz', '2419', 'Buzz', 'Fizz', '2422', '2423', 'Fizz', 'Buzz', '2426', 'Fizz', '2428', '2429', 'FizzBuzz', '2431', '2432', 'Fizz', '2434', 'Buzz', 'Fizz', '2437', '2438', 'Fizz', 'Buzz', '2441', 'Fizz', '2443', '2444', 'FizzBuzz', '2446', '2447', 'Fizz', '2449', 'Buzz', 'Fizz', '2452', '2453', 'Fizz', 'Buzz', '2456', 'Fizz', '2458', '2459', 'FizzBuzz', '2461', '2462', 'Fizz', '2464', 'Buzz', 'Fizz', '2467', '2468', 'Fizz', 'Buzz', '2471', 'Fizz', '2473', '2474', 'FizzBuzz', '2476', '2477', 'Fizz', '2479', 'Buzz', 'Fizz', '2482', '2483', 'Fizz', 'Buzz', '2486', 'Fizz', '2488', '2489', 'FizzBuzz', '2491', '2492', 'Fizz', '2494', 'Buzz', 'Fizz', '2497', '2498', 'Fizz', 'Buzz', '2501', 'Fizz', '2503', '2504', 'FizzBuzz', '2506', '2507', 'Fizz', '2509', 'Buzz', 'Fizz', '2512', '2513', 'Fizz', 'Buzz', '2516', 'Fizz', '2518', '2519', 'FizzBuzz', '2521', '2522', 'Fizz', '2524', 'Buzz', 'Fizz', '2527', '2528', 'Fizz', 'Buzz', '2531', 'Fizz', '2533', '2534', 'FizzBuzz', '2536', '2537', 'Fizz', '2539', 'Buzz', 'Fizz', '2542', '2543', 'Fizz', 'Buzz', '2546', 'Fizz', '2548', '2549', 'FizzBuzz', '2551', '2552', 'Fizz', '2554', 'Buzz', 'Fizz', '2557', '2558', 'Fizz', 'Buzz', '2561', 'Fizz', '2563', '2564', 'FizzBuzz', '2566', '2567', 'Fizz', '2569', 'Buzz', 'Fizz', '2572', '2573', 'Fizz', 'Buzz', '2576', 'Fizz', '2578', '2579', 'FizzBuzz', '2581', '2582', 'Fizz', '2584', 'Buzz', 'Fizz', '2587', '2588', 'Fizz', 'Buzz', '2591', 'Fizz', '2593', '2594', 'FizzBuzz', '2596', '2597', 'Fizz', '2599', 'Buzz', 'Fizz', '2602', '2603', 'Fizz', 'Buzz', '2606', 'Fizz', '2608', '2609', 'FizzBuzz', '2611', '2612', 'Fizz', '2614', 'Buzz', 'Fizz', '2617', '2618', 'Fizz', 'Buzz', '2621', 'Fizz', '2623', '2624', 'FizzBuzz', '2626', '2627', 'Fizz', '2629', 'Buzz', 'Fizz', '2632', '2633', 'Fizz', 'Buzz', '2636', 'Fizz', '2638', '2639', 'FizzBuzz', '2641', '2642', 'Fizz', '2644', 'Buzz', 'Fizz', '2647', '2648', 'Fizz', 'Buzz', '2651', 'Fizz', '2653', '2654', 'FizzBuzz', '2656', '2657', 'Fizz', '2659', 'Buzz', 'Fizz', '2662', '2663', 'Fizz', 'Buzz', '2666', 'Fizz', '2668', '2669', 'FizzBuzz', '2671', '2672', 'Fizz', '2674', 'Buzz', 'Fizz', '2677', '2678', 'Fizz', 'Buzz', '2681', 'Fizz', '2683', '2684', 'FizzBuzz', '2686', '2687', 'Fizz', '2689', 'Buzz', 'Fizz', '2692', '2693', 'Fizz', 'Buzz', '2696', 'Fizz', '2698', '2699', 'FizzBuzz', '2701', '2702', 'Fizz', '2704', 'Buzz', 'Fizz', '2707', '2708', 'Fizz', 'Buzz', '2711', 'Fizz', '2713', '2714', 'FizzBuzz', '2716', '2717', 'Fizz', '2719', 'Buzz', 'Fizz', '2722', '2723', 'Fizz', 'Buzz', '2726', 'Fizz', '2728', '2729', 'FizzBuzz', '2731', '2732', 'Fizz', '2734', 'Buzz', 'Fizz', '2737', '2738', 'Fizz', 'Buzz', '2741', 'Fizz', '2743', '2744', 'FizzBuzz', '2746', '2747', 'Fizz', '2749', 'Buzz', 'Fizz', '2752', '2753', 'Fizz', 'Buzz', '2756', 'Fizz', '2758', '2759', 'FizzBuzz', '2761', '2762', 'Fizz', '2764', 'Buzz', 'Fizz', '2767', '2768', 'Fizz', 'Buzz', '2771', 'Fizz', '2773', '2774', 'FizzBuzz', '2776', '2777', 'Fizz', '2779', 'Buzz', 'Fizz', '2782', '2783', 'Fizz', 'Buzz', '2786', 'Fizz', '2788', '2789', 'FizzBuzz', '2791', '2792', 'Fizz', '2794', 'Buzz', 'Fizz', '2797', '2798', 'Fizz', 'Buzz', '2801', 'Fizz', '2803', '2804', 'FizzBuzz', '2806', '2807', 'Fizz', '2809', 'Buzz', 'Fizz', '2812', '2813', 'Fizz', 'Buzz', '2816', 'Fizz', '2818', '2819', 'FizzBuzz', '2821', '2822', 'Fizz', '2824', 'Buzz', 'Fizz', '2827', '2828', 'Fizz', 'Buzz', '2831', 'Fizz', '2833', '2834', 'FizzBuzz', '2836', '2837', 'Fizz', '2839', 'Buzz', 'Fizz', '2842', '2843', 'Fizz', 'Buzz', '2846', 'Fizz', '2848', '2849', 'FizzBuzz', '2851', '2852', 'Fizz', '2854', 'Buzz', 'Fizz', '2857', '2858', 'Fizz', 'Buzz', '2861', 'Fizz', '2863', '2864', 'FizzBuzz', '2866', '2867', 'Fizz', '2869', 'Buzz', 'Fizz', '2872', '2873', 'Fizz', 'Buzz', '2876', 'Fizz', '2878', '2879', 'FizzBuzz', '2881', '2882', 'Fizz', '2884', 'Buzz', 'Fizz', '2887', '2888', 'Fizz', 'Buzz', '2891', 'Fizz', '2893', '2894', 'FizzBuzz', '2896', '2897', 'Fizz', '2899', 'Buzz', 'Fizz', '2902', '2903', 'Fizz', 'Buzz', '2906', 'Fizz', '2908', '2909', 'FizzBuzz', '2911', '2912', 'Fizz', '2914', 'Buzz', 'Fizz', '2917', '2918', 'Fizz', 'Buzz', '2921', 'Fizz', '2923', '2924', 'FizzBuzz', '2926', '2927', 'Fizz', '2929', 'Buzz', 'Fizz', '2932', '2933', 'Fizz', 'Buzz', '2936', 'Fizz', '2938', '2939', 'FizzBuzz', '2941', '2942', 'Fizz', '2944', 'Buzz', 'Fizz', '2947', '2948', 'Fizz', 'Buzz', '2951', 'Fizz', '2953', '2954', 'FizzBuzz', '2956', '2957', 'Fizz', '2959', 'Buzz', 'Fizz', '2962', '2963', 'Fizz', 'Buzz', '2966', 'Fizz', '2968', '2969', 'FizzBuzz', '2971', '2972', 'Fizz', '2974', 'Buzz', 'Fizz', '2977', '2978', 'Fizz', 'Buzz', '2981', 'Fizz', '2983', '2984', 'FizzBuzz', '2986', '2987', 'Fizz', '2989', 'Buzz', 'Fizz', '2992', '2993', 'Fizz', 'Buzz', '2996', 'Fizz', '2998', '2999', 'FizzBuzz', '3001', '3002', 'Fizz', '3004', 'Buzz', 'Fizz', '3007', '3008', 'Fizz', 'Buzz', '3011', 'Fizz', '3013', '3014', 'FizzBuzz', '3016', '3017', 'Fizz', '3019', 'Buzz', 'Fizz', '3022', '3023', 'Fizz', 'Buzz', '3026', 'Fizz', '3028', '3029', 'FizzBuzz', '3031', '3032', 'Fizz', '3034', 'Buzz', 'Fizz', '3037', '3038', 'Fizz', 'Buzz', '3041', 'Fizz', '3043', '3044', 'FizzBuzz', '3046', '3047', 'Fizz', '3049', 'Buzz', 'Fizz', '3052', '3053', 'Fizz', 'Buzz', '3056', 'Fizz', '3058', '3059', 'FizzBuzz', '3061', '3062', 'Fizz', '3064', 'Buzz', 'Fizz', '3067', '3068', 'Fizz', 'Buzz', '3071', 'Fizz', '3073', '3074', 'FizzBuzz', '3076', '3077', 'Fizz', '3079', 'Buzz', 'Fizz', '3082', '3083', 'Fizz', 'Buzz', '3086', 'Fizz', '3088', '3089', 'FizzBuzz', '3091', '3092', 'Fizz', '3094', 'Buzz', 'Fizz', '3097', '3098', 'Fizz', 'Buzz', '3101', 'Fizz', '3103', '3104', 'FizzBuzz', '3106', '3107', 'Fizz', '3109', 'Buzz', 'Fizz', '3112', '3113', 'Fizz', 'Buzz', '3116', 'Fizz', '3118', '3119', 'FizzBuzz', '3121', '3122', 'Fizz', '3124', 'Buzz', 'Fizz', '3127', '3128', 'Fizz', 'Buzz', '3131', 'Fizz', '3133', '3134', 'FizzBuzz', '3136', '3137', 'Fizz', '3139', 'Buzz', 'Fizz', '3142', '3143', 'Fizz', 'Buzz', '3146', 'Fizz', '3148', '3149', 'FizzBuzz', '3151', '3152', 'Fizz', '3154', 'Buzz', 'Fizz', '3157', '3158', 'Fizz', 'Buzz', '3161', 'Fizz', '3163', '3164', 'FizzBuzz', '3166', '3167', 'Fizz', '3169', 'Buzz', 'Fizz', '3172', '3173', 'Fizz', 'Buzz', '3176', 'Fizz', '3178', '3179', 'FizzBuzz', '3181', '3182', 'Fizz', '3184', 'Buzz', 'Fizz', '3187', '3188', 'Fizz', 'Buzz', '3191', 'Fizz', '3193', '3194', 'FizzBuzz', '3196', '3197', 'Fizz', '3199', 'Buzz', 'Fizz', '3202', '3203', 'Fizz', 'Buzz', '3206', 'Fizz', '3208', '3209', 'FizzBuzz', '3211', '3212', 'Fizz', '3214', 'Buzz', 'Fizz', '3217', '3218', 'Fizz', 'Buzz', '3221', 'Fizz', '3223', '3224', 'FizzBuzz', '3226', '3227', 'Fizz', '3229', 'Buzz', 'Fizz', '3232', '3233', 'Fizz', 'Buzz', '3236', 'Fizz', '3238', '3239', 'FizzBuzz', '3241', '3242', 'Fizz', '3244', 'Buzz', 'Fizz', '3247', '3248', 'Fizz', 'Buzz', '3251', 'Fizz', '3253', '3254', 'FizzBuzz', '3256', '3257', 'Fizz', '3259', 'Buzz', 'Fizz', '3262', '3263', 'Fizz', 'Buzz', '3266', 'Fizz', '3268', '3269', 'FizzBuzz', '3271', '3272', 'Fizz', '3274', 'Buzz', 'Fizz', '3277', '3278', 'Fizz', 'Buzz', '3281', 'Fizz', '3283', '3284', 'FizzBuzz', '3286', '3287', 'Fizz', '3289', 'Buzz', 'Fizz', '3292', '3293', 'Fizz', 'Buzz', '3296', 'Fizz', '3298', '3299', 'FizzBuzz', '3301', '3302', 'Fizz', '3304', 'Buzz', 'Fizz', '3307', '3308', 'Fizz', 'Buzz', '3311', 'Fizz', '3313', '3314', 'FizzBuzz', '3316', '3317', 'Fizz', '3319', 'Buzz', 'Fizz', '3322', '3323', 'Fizz', 'Buzz', '3326', 'Fizz', '3328', '3329', 'FizzBuzz', '3331', '3332', 'Fizz', '3334', 'Buzz', 'Fizz', '3337', '3338', 'Fizz', 'Buzz', '3341', 'Fizz', '3343', '3344', 'FizzBuzz', '3346', '3347', 'Fizz', '3349', 'Buzz', 'Fizz', '3352', '3353', 'Fizz', 'Buzz', '3356', 'Fizz', '3358', '3359', 'FizzBuzz', '3361', '3362', 'Fizz', '3364', 'Buzz', 'Fizz', '3367', '3368', 'Fizz', 'Buzz', '3371', 'Fizz', '3373', '3374', 'FizzBuzz', '3376', '3377', 'Fizz', '3379', 'Buzz', 'Fizz', '3382', '3383', 'Fizz', 'Buzz', '3386', 'Fizz', '3388', '3389', 'FizzBuzz', '3391', '3392', 'Fizz', '3394', 'Buzz', 'Fizz', '3397', '3398', 'Fizz', 'Buzz', '3401', 'Fizz', '3403', '3404', 'FizzBuzz', '3406', '3407', 'Fizz', '3409', 'Buzz', 'Fizz', '3412', '3413', 'Fizz', 'Buzz', '3416', 'Fizz', '3418', '3419', 'FizzBuzz', '3421', '3422', 'Fizz', '3424', 'Buzz', 'Fizz', '3427', '3428', 'Fizz', 'Buzz', '3431', 'Fizz', '3433', '3434', 'FizzBuzz', '3436', '3437', 'Fizz', '3439', 'Buzz', 'Fizz', '3442', '3443', 'Fizz', 'Buzz', '3446', 'Fizz', '3448', '3449', 'FizzBuzz', '3451', '3452', 'Fizz', '3454', 'Buzz', 'Fizz', '3457', '3458', 'Fizz', 'Buzz', '3461', 'Fizz', '3463', '3464', 'FizzBuzz', '3466', '3467', 'Fizz', '3469', 'Buzz', 'Fizz', '3472', '3473', 'Fizz', 'Buzz', '3476', 'Fizz', '3478', '3479', 'FizzBuzz', '3481', '3482', 'Fizz', '3484', 'Buzz', 'Fizz', '3487', '3488', 'Fizz', 'Buzz', '3491', 'Fizz', '3493', '3494', 'FizzBuzz', '3496', '3497', 'Fizz', '3499', 'Buzz', 'Fizz', '3502', '3503', 'Fizz', 'Buzz', '3506', 'Fizz', '3508', '3509', 'FizzBuzz', '3511', '3512', 'Fizz', '3514', 'Buzz', 'Fizz', '3517', '3518', 'Fizz', 'Buzz', '3521', 'Fizz', '3523', '3524', 'FizzBuzz', '3526', '3527', 'Fizz', '3529', 'Buzz', 'Fizz', '3532', '3533', 'Fizz', 'Buzz', '3536', 'Fizz', '3538', '3539', 'FizzBuzz', '3541', '3542', 'Fizz', '3544', 'Buzz', 'Fizz', '3547', '3548', 'Fizz', 'Buzz', '3551', 'Fizz', '3553', '3554', 'FizzBuzz', '3556', '3557', 'Fizz', '3559', 'Buzz', 'Fizz', '3562', '3563', 'Fizz', 'Buzz', '3566', 'Fizz', '3568', '3569', 'FizzBuzz', '3571', '3572', 'Fizz', '3574', 'Buzz', 'Fizz', '3577', '3578', 'Fizz', 'Buzz', '3581', 'Fizz', '3583', '3584', 'FizzBuzz', '3586', '3587', 'Fizz', '3589', 'Buzz', 'Fizz', '3592', '3593', 'Fizz', 'Buzz', '3596', 'Fizz', '3598', '3599', 'FizzBuzz', '3601', '3602', 'Fizz', '3604', 'Buzz', 'Fizz', '3607', '3608', 'Fizz', 'Buzz', '3611', 'Fizz', '3613', '3614', 'FizzBuzz', '3616', '3617', 'Fizz', '3619', 'Buzz', 'Fizz', '3622', '3623', 'Fizz', 'Buzz', '3626', 'Fizz', '3628', '3629', 'FizzBuzz', '3631', '3632', 'Fizz', '3634', 'Buzz', 'Fizz', '3637', '3638', 'Fizz', 'Buzz', '3641', 'Fizz', '3643', '3644', 'FizzBuzz', '3646', '3647', 'Fizz', '3649', 'Buzz', 'Fizz', '3652', '3653', 'Fizz', 'Buzz', '3656', 'Fizz', '3658', '3659', 'FizzBuzz', '3661', '3662', 'Fizz', '3664', 'Buzz', 'Fizz', '3667', '3668', 'Fizz', 'Buzz', '3671', 'Fizz', '3673', '3674', 'FizzBuzz', '3676', '3677', 'Fizz', '3679', 'Buzz', 'Fizz', '3682', '3683', 'Fizz', 'Buzz', '3686', 'Fizz', '3688', '3689', 'FizzBuzz', '3691', '3692', 'Fizz', '3694', 'Buzz', 'Fizz', '3697', '3698', 'Fizz', 'Buzz', '3701', 'Fizz', '3703', '3704', 'FizzBuzz', '3706', '3707', 'Fizz', '3709', 'Buzz', 'Fizz', '3712', '3713', 'Fizz', 'Buzz', '3716', 'Fizz', '3718', '3719', 'FizzBuzz', '3721', '3722', 'Fizz', '3724', 'Buzz', 'Fizz', '3727', '3728', 'Fizz', 'Buzz', '3731', 'Fizz', '3733', '3734', 'FizzBuzz', '3736', '3737', 'Fizz', '3739', 'Buzz', 'Fizz', '3742', '3743', 'Fizz', 'Buzz', '3746', 'Fizz', '3748', '3749', 'FizzBuzz', '3751', '3752', 'Fizz', '3754', 'Buzz', 'Fizz', '3757', '3758', 'Fizz', 'Buzz', '3761', 'Fizz', '3763', '3764', 'FizzBuzz', '3766', '3767', 'Fizz', '3769', 'Buzz', 'Fizz', '3772', '3773', 'Fizz', 'Buzz', '3776', 'Fizz', '3778', '3779', 'FizzBuzz', '3781', '3782', 'Fizz', '3784', 'Buzz', 'Fizz', '3787', '3788', 'Fizz', 'Buzz', '3791', 'Fizz', '3793', '3794', 'FizzBuzz', '3796', '3797', 'Fizz', '3799', 'Buzz', 'Fizz', '3802', '3803', 'Fizz', 'Buzz', '3806', 'Fizz', '3808', '3809', 'FizzBuzz', '3811', '3812', 'Fizz', '3814', 'Buzz', 'Fizz', '3817', '3818', 'Fizz', 'Buzz', '3821', 'Fizz', '3823', '3824', 'FizzBuzz', '3826', '3827', 'Fizz', '3829', 'Buzz', 'Fizz', '3832', '3833', 'Fizz', 'Buzz', '3836', 'Fizz', '3838', '3839', 'FizzBuzz', '3841', '3842', 'Fizz', '3844', 'Buzz', 'Fizz', '3847', '3848', 'Fizz', 'Buzz', '3851', 'Fizz', '3853', '3854', 'FizzBuzz', '3856', '3857', 'Fizz', '3859', 'Buzz', 'Fizz', '3862', '3863', 'Fizz', 'Buzz', '3866', 'Fizz', '3868', '3869', 'FizzBuzz', '3871', '3872', 'Fizz', '3874', 'Buzz', 'Fizz', '3877', '3878', 'Fizz', 'Buzz', '3881', 'Fizz', '3883', '3884', 'FizzBuzz', '3886', '3887', 'Fizz', '3889', 'Buzz', 'Fizz', '3892', '3893', 'Fizz', 'Buzz', '3896', 'Fizz', '3898', '3899', 'FizzBuzz', '3901', '3902', 'Fizz', '3904', 'Buzz', 'Fizz', '3907', '3908', 'Fizz', 'Buzz', '3911', 'Fizz', '3913', '3914', 'FizzBuzz', '3916', '3917', 'Fizz', '3919', 'Buzz', 'Fizz', '3922', '3923', 'Fizz', 'Buzz', '3926', 'Fizz', '3928', '3929', 'FizzBuzz', '3931', '3932', 'Fizz', '3934', 'Buzz', 'Fizz', '3937', '3938', 'Fizz', 'Buzz', '3941', 'Fizz', '3943', '3944', 'FizzBuzz', '3946', '3947', 'Fizz', '3949', 'Buzz', 'Fizz', '3952', '3953', 'Fizz', 'Buzz', '3956', 'Fizz', '3958', '3959', 'FizzBuzz', '3961', '3962', 'Fizz', '3964', 'Buzz', 'Fizz', '3967', '3968', 'Fizz', 'Buzz', '3971', 'Fizz', '3973', '3974', 'FizzBuzz', '3976', '3977', 'Fizz', '3979', 'Buzz', 'Fizz', '3982', '3983', 'Fizz', 'Buzz', '3986', 'Fizz', '3988', '3989', 'FizzBuzz', '3991', '3992', 'Fizz', '3994', 'Buzz', 'Fizz', '3997', '3998', 'Fizz', 'Buzz']\n assert candidate(n = 210) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz']\n assert candidate(n = 45) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz']\n assert candidate(n = 1010) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz']\n assert candidate(n = 53) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53']\n assert candidate(n = 2000) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024', 'Buzz', 'Fizz', '1027', '1028', 'Fizz', 'Buzz', '1031', 'Fizz', '1033', '1034', 'FizzBuzz', '1036', '1037', 'Fizz', '1039', 'Buzz', 'Fizz', '1042', '1043', 'Fizz', 'Buzz', '1046', 'Fizz', '1048', '1049', 'FizzBuzz', '1051', '1052', 'Fizz', '1054', 'Buzz', 'Fizz', '1057', '1058', 'Fizz', 'Buzz', '1061', 'Fizz', '1063', '1064', 'FizzBuzz', '1066', '1067', 'Fizz', '1069', 'Buzz', 'Fizz', '1072', '1073', 'Fizz', 'Buzz', '1076', 'Fizz', '1078', '1079', 'FizzBuzz', '1081', '1082', 'Fizz', '1084', 'Buzz', 'Fizz', '1087', '1088', 'Fizz', 'Buzz', '1091', 'Fizz', '1093', '1094', 'FizzBuzz', '1096', '1097', 'Fizz', '1099', 'Buzz', 'Fizz', '1102', '1103', 'Fizz', 'Buzz', '1106', 'Fizz', '1108', '1109', 'FizzBuzz', '1111', '1112', 'Fizz', '1114', 'Buzz', 'Fizz', '1117', '1118', 'Fizz', 'Buzz', '1121', 'Fizz', '1123', '1124', 'FizzBuzz', '1126', '1127', 'Fizz', '1129', 'Buzz', 'Fizz', '1132', '1133', 'Fizz', 'Buzz', '1136', 'Fizz', '1138', '1139', 'FizzBuzz', '1141', '1142', 'Fizz', '1144', 'Buzz', 'Fizz', '1147', '1148', 'Fizz', 'Buzz', '1151', 'Fizz', '1153', '1154', 'FizzBuzz', '1156', '1157', 'Fizz', '1159', 'Buzz', 'Fizz', '1162', '1163', 'Fizz', 'Buzz', '1166', 'Fizz', '1168', '1169', 'FizzBuzz', '1171', '1172', 'Fizz', '1174', 'Buzz', 'Fizz', '1177', '1178', 'Fizz', 'Buzz', '1181', 'Fizz', '1183', '1184', 'FizzBuzz', '1186', '1187', 'Fizz', '1189', 'Buzz', 'Fizz', '1192', '1193', 'Fizz', 'Buzz', '1196', 'Fizz', '1198', '1199', 'FizzBuzz', '1201', '1202', 'Fizz', '1204', 'Buzz', 'Fizz', '1207', '1208', 'Fizz', 'Buzz', '1211', 'Fizz', '1213', '1214', 'FizzBuzz', '1216', '1217', 'Fizz', '1219', 'Buzz', 'Fizz', '1222', '1223', 'Fizz', 'Buzz', '1226', 'Fizz', '1228', '1229', 'FizzBuzz', '1231', '1232', 'Fizz', '1234', 'Buzz', 'Fizz', '1237', '1238', 'Fizz', 'Buzz', '1241', 'Fizz', '1243', '1244', 'FizzBuzz', '1246', '1247', 'Fizz', '1249', 'Buzz', 'Fizz', '1252', '1253', 'Fizz', 'Buzz', '1256', 'Fizz', '1258', '1259', 'FizzBuzz', '1261', '1262', 'Fizz', '1264', 'Buzz', 'Fizz', '1267', '1268', 'Fizz', 'Buzz', '1271', 'Fizz', '1273', '1274', 'FizzBuzz', '1276', '1277', 'Fizz', '1279', 'Buzz', 'Fizz', '1282', '1283', 'Fizz', 'Buzz', '1286', 'Fizz', '1288', '1289', 'FizzBuzz', '1291', '1292', 'Fizz', '1294', 'Buzz', 'Fizz', '1297', '1298', 'Fizz', 'Buzz', '1301', 'Fizz', '1303', '1304', 'FizzBuzz', '1306', '1307', 'Fizz', '1309', 'Buzz', 'Fizz', '1312', '1313', 'Fizz', 'Buzz', '1316', 'Fizz', '1318', '1319', 'FizzBuzz', '1321', '1322', 'Fizz', '1324', 'Buzz', 'Fizz', '1327', '1328', 'Fizz', 'Buzz', '1331', 'Fizz', '1333', '1334', 'FizzBuzz', '1336', '1337', 'Fizz', '1339', 'Buzz', 'Fizz', '1342', '1343', 'Fizz', 'Buzz', '1346', 'Fizz', '1348', '1349', 'FizzBuzz', '1351', '1352', 'Fizz', '1354', 'Buzz', 'Fizz', '1357', '1358', 'Fizz', 'Buzz', '1361', 'Fizz', '1363', '1364', 'FizzBuzz', '1366', '1367', 'Fizz', '1369', 'Buzz', 'Fizz', '1372', '1373', 'Fizz', 'Buzz', '1376', 'Fizz', '1378', '1379', 'FizzBuzz', '1381', '1382', 'Fizz', '1384', 'Buzz', 'Fizz', '1387', '1388', 'Fizz', 'Buzz', '1391', 'Fizz', '1393', '1394', 'FizzBuzz', '1396', '1397', 'Fizz', '1399', 'Buzz', 'Fizz', '1402', '1403', 'Fizz', 'Buzz', '1406', 'Fizz', '1408', '1409', 'FizzBuzz', '1411', '1412', 'Fizz', '1414', 'Buzz', 'Fizz', '1417', '1418', 'Fizz', 'Buzz', '1421', 'Fizz', '1423', '1424', 'FizzBuzz', '1426', '1427', 'Fizz', '1429', 'Buzz', 'Fizz', '1432', '1433', 'Fizz', 'Buzz', '1436', 'Fizz', '1438', '1439', 'FizzBuzz', '1441', '1442', 'Fizz', '1444', 'Buzz', 'Fizz', '1447', '1448', 'Fizz', 'Buzz', '1451', 'Fizz', '1453', '1454', 'FizzBuzz', '1456', '1457', 'Fizz', '1459', 'Buzz', 'Fizz', '1462', '1463', 'Fizz', 'Buzz', '1466', 'Fizz', '1468', '1469', 'FizzBuzz', '1471', '1472', 'Fizz', '1474', 'Buzz', 'Fizz', '1477', '1478', 'Fizz', 'Buzz', '1481', 'Fizz', '1483', '1484', 'FizzBuzz', '1486', '1487', 'Fizz', '1489', 'Buzz', 'Fizz', '1492', '1493', 'Fizz', 'Buzz', '1496', 'Fizz', '1498', '1499', 'FizzBuzz', '1501', '1502', 'Fizz', '1504', 'Buzz', 'Fizz', '1507', '1508', 'Fizz', 'Buzz', '1511', 'Fizz', '1513', '1514', 'FizzBuzz', '1516', '1517', 'Fizz', '1519', 'Buzz', 'Fizz', '1522', '1523', 'Fizz', 'Buzz', '1526', 'Fizz', '1528', '1529', 'FizzBuzz', '1531', '1532', 'Fizz', '1534', 'Buzz', 'Fizz', '1537', '1538', 'Fizz', 'Buzz', '1541', 'Fizz', '1543', '1544', 'FizzBuzz', '1546', '1547', 'Fizz', '1549', 'Buzz', 'Fizz', '1552', '1553', 'Fizz', 'Buzz', '1556', 'Fizz', '1558', '1559', 'FizzBuzz', '1561', '1562', 'Fizz', '1564', 'Buzz', 'Fizz', '1567', '1568', 'Fizz', 'Buzz', '1571', 'Fizz', '1573', '1574', 'FizzBuzz', '1576', '1577', 'Fizz', '1579', 'Buzz', 'Fizz', '1582', '1583', 'Fizz', 'Buzz', '1586', 'Fizz', '1588', '1589', 'FizzBuzz', '1591', '1592', 'Fizz', '1594', 'Buzz', 'Fizz', '1597', '1598', 'Fizz', 'Buzz', '1601', 'Fizz', '1603', '1604', 'FizzBuzz', '1606', '1607', 'Fizz', '1609', 'Buzz', 'Fizz', '1612', '1613', 'Fizz', 'Buzz', '1616', 'Fizz', '1618', '1619', 'FizzBuzz', '1621', '1622', 'Fizz', '1624', 'Buzz', 'Fizz', '1627', '1628', 'Fizz', 'Buzz', '1631', 'Fizz', '1633', '1634', 'FizzBuzz', '1636', '1637', 'Fizz', '1639', 'Buzz', 'Fizz', '1642', '1643', 'Fizz', 'Buzz', '1646', 'Fizz', '1648', '1649', 'FizzBuzz', '1651', '1652', 'Fizz', '1654', 'Buzz', 'Fizz', '1657', '1658', 'Fizz', 'Buzz', '1661', 'Fizz', '1663', '1664', 'FizzBuzz', '1666', '1667', 'Fizz', '1669', 'Buzz', 'Fizz', '1672', '1673', 'Fizz', 'Buzz', '1676', 'Fizz', '1678', '1679', 'FizzBuzz', '1681', '1682', 'Fizz', '1684', 'Buzz', 'Fizz', '1687', '1688', 'Fizz', 'Buzz', '1691', 'Fizz', '1693', '1694', 'FizzBuzz', '1696', '1697', 'Fizz', '1699', 'Buzz', 'Fizz', '1702', '1703', 'Fizz', 'Buzz', '1706', 'Fizz', '1708', '1709', 'FizzBuzz', '1711', '1712', 'Fizz', '1714', 'Buzz', 'Fizz', '1717', '1718', 'Fizz', 'Buzz', '1721', 'Fizz', '1723', '1724', 'FizzBuzz', '1726', '1727', 'Fizz', '1729', 'Buzz', 'Fizz', '1732', '1733', 'Fizz', 'Buzz', '1736', 'Fizz', '1738', '1739', 'FizzBuzz', '1741', '1742', 'Fizz', '1744', 'Buzz', 'Fizz', '1747', '1748', 'Fizz', 'Buzz', '1751', 'Fizz', '1753', '1754', 'FizzBuzz', '1756', '1757', 'Fizz', '1759', 'Buzz', 'Fizz', '1762', '1763', 'Fizz', 'Buzz', '1766', 'Fizz', '1768', '1769', 'FizzBuzz', '1771', '1772', 'Fizz', '1774', 'Buzz', 'Fizz', '1777', '1778', 'Fizz', 'Buzz', '1781', 'Fizz', '1783', '1784', 'FizzBuzz', '1786', '1787', 'Fizz', '1789', 'Buzz', 'Fizz', '1792', '1793', 'Fizz', 'Buzz', '1796', 'Fizz', '1798', '1799', 'FizzBuzz', '1801', '1802', 'Fizz', '1804', 'Buzz', 'Fizz', '1807', '1808', 'Fizz', 'Buzz', '1811', 'Fizz', '1813', '1814', 'FizzBuzz', '1816', '1817', 'Fizz', '1819', 'Buzz', 'Fizz', '1822', '1823', 'Fizz', 'Buzz', '1826', 'Fizz', '1828', '1829', 'FizzBuzz', '1831', '1832', 'Fizz', '1834', 'Buzz', 'Fizz', '1837', '1838', 'Fizz', 'Buzz', '1841', 'Fizz', '1843', '1844', 'FizzBuzz', '1846', '1847', 'Fizz', '1849', 'Buzz', 'Fizz', '1852', '1853', 'Fizz', 'Buzz', '1856', 'Fizz', '1858', '1859', 'FizzBuzz', '1861', '1862', 'Fizz', '1864', 'Buzz', 'Fizz', '1867', '1868', 'Fizz', 'Buzz', '1871', 'Fizz', '1873', '1874', 'FizzBuzz', '1876', '1877', 'Fizz', '1879', 'Buzz', 'Fizz', '1882', '1883', 'Fizz', 'Buzz', '1886', 'Fizz', '1888', '1889', 'FizzBuzz', '1891', '1892', 'Fizz', '1894', 'Buzz', 'Fizz', '1897', '1898', 'Fizz', 'Buzz', '1901', 'Fizz', '1903', '1904', 'FizzBuzz', '1906', '1907', 'Fizz', '1909', 'Buzz', 'Fizz', '1912', '1913', 'Fizz', 'Buzz', '1916', 'Fizz', '1918', '1919', 'FizzBuzz', '1921', '1922', 'Fizz', '1924', 'Buzz', 'Fizz', '1927', '1928', 'Fizz', 'Buzz', '1931', 'Fizz', '1933', '1934', 'FizzBuzz', '1936', '1937', 'Fizz', '1939', 'Buzz', 'Fizz', '1942', '1943', 'Fizz', 'Buzz', '1946', 'Fizz', '1948', '1949', 'FizzBuzz', '1951', '1952', 'Fizz', '1954', 'Buzz', 'Fizz', '1957', '1958', 'Fizz', 'Buzz', '1961', 'Fizz', '1963', '1964', 'FizzBuzz', '1966', '1967', 'Fizz', '1969', 'Buzz', 'Fizz', '1972', '1973', 'Fizz', 'Buzz', '1976', 'Fizz', '1978', '1979', 'FizzBuzz', '1981', '1982', 'Fizz', '1984', 'Buzz', 'Fizz', '1987', '1988', 'Fizz', 'Buzz', '1991', 'Fizz', '1993', '1994', 'FizzBuzz', '1996', '1997', 'Fizz', '1999', 'Buzz']\n assert candidate(n = 1000) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz']\n assert candidate(n = 3333) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024', 'Buzz', 'Fizz', '1027', '1028', 'Fizz', 'Buzz', '1031', 'Fizz', '1033', '1034', 'FizzBuzz', '1036', '1037', 'Fizz', '1039', 'Buzz', 'Fizz', '1042', '1043', 'Fizz', 'Buzz', '1046', 'Fizz', '1048', '1049', 'FizzBuzz', '1051', '1052', 'Fizz', '1054', 'Buzz', 'Fizz', '1057', '1058', 'Fizz', 'Buzz', '1061', 'Fizz', '1063', '1064', 'FizzBuzz', '1066', '1067', 'Fizz', '1069', 'Buzz', 'Fizz', '1072', '1073', 'Fizz', 'Buzz', '1076', 'Fizz', '1078', '1079', 'FizzBuzz', '1081', '1082', 'Fizz', '1084', 'Buzz', 'Fizz', '1087', '1088', 'Fizz', 'Buzz', '1091', 'Fizz', '1093', '1094', 'FizzBuzz', '1096', '1097', 'Fizz', '1099', 'Buzz', 'Fizz', '1102', '1103', 'Fizz', 'Buzz', '1106', 'Fizz', '1108', '1109', 'FizzBuzz', '1111', '1112', 'Fizz', '1114', 'Buzz', 'Fizz', '1117', '1118', 'Fizz', 'Buzz', '1121', 'Fizz', '1123', '1124', 'FizzBuzz', '1126', '1127', 'Fizz', '1129', 'Buzz', 'Fizz', '1132', '1133', 'Fizz', 'Buzz', '1136', 'Fizz', '1138', '1139', 'FizzBuzz', '1141', '1142', 'Fizz', '1144', 'Buzz', 'Fizz', '1147', '1148', 'Fizz', 'Buzz', '1151', 'Fizz', '1153', '1154', 'FizzBuzz', '1156', '1157', 'Fizz', '1159', 'Buzz', 'Fizz', '1162', '1163', 'Fizz', 'Buzz', '1166', 'Fizz', '1168', '1169', 'FizzBuzz', '1171', '1172', 'Fizz', '1174', 'Buzz', 'Fizz', '1177', '1178', 'Fizz', 'Buzz', '1181', 'Fizz', '1183', '1184', 'FizzBuzz', '1186', '1187', 'Fizz', '1189', 'Buzz', 'Fizz', '1192', '1193', 'Fizz', 'Buzz', '1196', 'Fizz', '1198', '1199', 'FizzBuzz', '1201', '1202', 'Fizz', '1204', 'Buzz', 'Fizz', '1207', '1208', 'Fizz', 'Buzz', '1211', 'Fizz', '1213', '1214', 'FizzBuzz', '1216', '1217', 'Fizz', '1219', 'Buzz', 'Fizz', '1222', '1223', 'Fizz', 'Buzz', '1226', 'Fizz', '1228', '1229', 'FizzBuzz', '1231', '1232', 'Fizz', '1234', 'Buzz', 'Fizz', '1237', '1238', 'Fizz', 'Buzz', '1241', 'Fizz', '1243', '1244', 'FizzBuzz', '1246', '1247', 'Fizz', '1249', 'Buzz', 'Fizz', '1252', '1253', 'Fizz', 'Buzz', '1256', 'Fizz', '1258', '1259', 'FizzBuzz', '1261', '1262', 'Fizz', '1264', 'Buzz', 'Fizz', '1267', '1268', 'Fizz', 'Buzz', '1271', 'Fizz', '1273', '1274', 'FizzBuzz', '1276', '1277', 'Fizz', '1279', 'Buzz', 'Fizz', '1282', '1283', 'Fizz', 'Buzz', '1286', 'Fizz', '1288', '1289', 'FizzBuzz', '1291', '1292', 'Fizz', '1294', 'Buzz', 'Fizz', '1297', '1298', 'Fizz', 'Buzz', '1301', 'Fizz', '1303', '1304', 'FizzBuzz', '1306', '1307', 'Fizz', '1309', 'Buzz', 'Fizz', '1312', '1313', 'Fizz', 'Buzz', '1316', 'Fizz', '1318', '1319', 'FizzBuzz', '1321', '1322', 'Fizz', '1324', 'Buzz', 'Fizz', '1327', '1328', 'Fizz', 'Buzz', '1331', 'Fizz', '1333', '1334', 'FizzBuzz', '1336', '1337', 'Fizz', '1339', 'Buzz', 'Fizz', '1342', '1343', 'Fizz', 'Buzz', '1346', 'Fizz', '1348', '1349', 'FizzBuzz', '1351', '1352', 'Fizz', '1354', 'Buzz', 'Fizz', '1357', '1358', 'Fizz', 'Buzz', '1361', 'Fizz', '1363', '1364', 'FizzBuzz', '1366', '1367', 'Fizz', '1369', 'Buzz', 'Fizz', '1372', '1373', 'Fizz', 'Buzz', '1376', 'Fizz', '1378', '1379', 'FizzBuzz', '1381', '1382', 'Fizz', '1384', 'Buzz', 'Fizz', '1387', '1388', 'Fizz', 'Buzz', '1391', 'Fizz', '1393', '1394', 'FizzBuzz', '1396', '1397', 'Fizz', '1399', 'Buzz', 'Fizz', '1402', '1403', 'Fizz', 'Buzz', '1406', 'Fizz', '1408', '1409', 'FizzBuzz', '1411', '1412', 'Fizz', '1414', 'Buzz', 'Fizz', '1417', '1418', 'Fizz', 'Buzz', '1421', 'Fizz', '1423', '1424', 'FizzBuzz', '1426', '1427', 'Fizz', '1429', 'Buzz', 'Fizz', '1432', '1433', 'Fizz', 'Buzz', '1436', 'Fizz', '1438', '1439', 'FizzBuzz', '1441', '1442', 'Fizz', '1444', 'Buzz', 'Fizz', '1447', '1448', 'Fizz', 'Buzz', '1451', 'Fizz', '1453', '1454', 'FizzBuzz', '1456', '1457', 'Fizz', '1459', 'Buzz', 'Fizz', '1462', '1463', 'Fizz', 'Buzz', '1466', 'Fizz', '1468', '1469', 'FizzBuzz', '1471', '1472', 'Fizz', '1474', 'Buzz', 'Fizz', '1477', '1478', 'Fizz', 'Buzz', '1481', 'Fizz', '1483', '1484', 'FizzBuzz', '1486', '1487', 'Fizz', '1489', 'Buzz', 'Fizz', '1492', '1493', 'Fizz', 'Buzz', '1496', 'Fizz', '1498', '1499', 'FizzBuzz', '1501', '1502', 'Fizz', '1504', 'Buzz', 'Fizz', '1507', '1508', 'Fizz', 'Buzz', '1511', 'Fizz', '1513', '1514', 'FizzBuzz', '1516', '1517', 'Fizz', '1519', 'Buzz', 'Fizz', '1522', '1523', 'Fizz', 'Buzz', '1526', 'Fizz', '1528', '1529', 'FizzBuzz', '1531', '1532', 'Fizz', '1534', 'Buzz', 'Fizz', '1537', '1538', 'Fizz', 'Buzz', '1541', 'Fizz', '1543', '1544', 'FizzBuzz', '1546', '1547', 'Fizz', '1549', 'Buzz', 'Fizz', '1552', '1553', 'Fizz', 'Buzz', '1556', 'Fizz', '1558', '1559', 'FizzBuzz', '1561', '1562', 'Fizz', '1564', 'Buzz', 'Fizz', '1567', '1568', 'Fizz', 'Buzz', '1571', 'Fizz', '1573', '1574', 'FizzBuzz', '1576', '1577', 'Fizz', '1579', 'Buzz', 'Fizz', '1582', '1583', 'Fizz', 'Buzz', '1586', 'Fizz', '1588', '1589', 'FizzBuzz', '1591', '1592', 'Fizz', '1594', 'Buzz', 'Fizz', '1597', '1598', 'Fizz', 'Buzz', '1601', 'Fizz', '1603', '1604', 'FizzBuzz', '1606', '1607', 'Fizz', '1609', 'Buzz', 'Fizz', '1612', '1613', 'Fizz', 'Buzz', '1616', 'Fizz', '1618', '1619', 'FizzBuzz', '1621', '1622', 'Fizz', '1624', 'Buzz', 'Fizz', '1627', '1628', 'Fizz', 'Buzz', '1631', 'Fizz', '1633', '1634', 'FizzBuzz', '1636', '1637', 'Fizz', '1639', 'Buzz', 'Fizz', '1642', '1643', 'Fizz', 'Buzz', '1646', 'Fizz', '1648', '1649', 'FizzBuzz', '1651', '1652', 'Fizz', '1654', 'Buzz', 'Fizz', '1657', '1658', 'Fizz', 'Buzz', '1661', 'Fizz', '1663', '1664', 'FizzBuzz', '1666', '1667', 'Fizz', '1669', 'Buzz', 'Fizz', '1672', '1673', 'Fizz', 'Buzz', '1676', 'Fizz', '1678', '1679', 'FizzBuzz', '1681', '1682', 'Fizz', '1684', 'Buzz', 'Fizz', '1687', '1688', 'Fizz', 'Buzz', '1691', 'Fizz', '1693', '1694', 'FizzBuzz', '1696', '1697', 'Fizz', '1699', 'Buzz', 'Fizz', '1702', '1703', 'Fizz', 'Buzz', '1706', 'Fizz', '1708', '1709', 'FizzBuzz', '1711', '1712', 'Fizz', '1714', 'Buzz', 'Fizz', '1717', '1718', 'Fizz', 'Buzz', '1721', 'Fizz', '1723', '1724', 'FizzBuzz', '1726', '1727', 'Fizz', '1729', 'Buzz', 'Fizz', '1732', '1733', 'Fizz', 'Buzz', '1736', 'Fizz', '1738', '1739', 'FizzBuzz', '1741', '1742', 'Fizz', '1744', 'Buzz', 'Fizz', '1747', '1748', 'Fizz', 'Buzz', '1751', 'Fizz', '1753', '1754', 'FizzBuzz', '1756', '1757', 'Fizz', '1759', 'Buzz', 'Fizz', '1762', '1763', 'Fizz', 'Buzz', '1766', 'Fizz', '1768', '1769', 'FizzBuzz', '1771', '1772', 'Fizz', '1774', 'Buzz', 'Fizz', '1777', '1778', 'Fizz', 'Buzz', '1781', 'Fizz', '1783', '1784', 'FizzBuzz', '1786', '1787', 'Fizz', '1789', 'Buzz', 'Fizz', '1792', '1793', 'Fizz', 'Buzz', '1796', 'Fizz', '1798', '1799', 'FizzBuzz', '1801', '1802', 'Fizz', '1804', 'Buzz', 'Fizz', '1807', '1808', 'Fizz', 'Buzz', '1811', 'Fizz', '1813', '1814', 'FizzBuzz', '1816', '1817', 'Fizz', '1819', 'Buzz', 'Fizz', '1822', '1823', 'Fizz', 'Buzz', '1826', 'Fizz', '1828', '1829', 'FizzBuzz', '1831', '1832', 'Fizz', '1834', 'Buzz', 'Fizz', '1837', '1838', 'Fizz', 'Buzz', '1841', 'Fizz', '1843', '1844', 'FizzBuzz', '1846', '1847', 'Fizz', '1849', 'Buzz', 'Fizz', '1852', '1853', 'Fizz', 'Buzz', '1856', 'Fizz', '1858', '1859', 'FizzBuzz', '1861', '1862', 'Fizz', '1864', 'Buzz', 'Fizz', '1867', '1868', 'Fizz', 'Buzz', '1871', 'Fizz', '1873', '1874', 'FizzBuzz', '1876', '1877', 'Fizz', '1879', 'Buzz', 'Fizz', '1882', '1883', 'Fizz', 'Buzz', '1886', 'Fizz', '1888', '1889', 'FizzBuzz', '1891', '1892', 'Fizz', '1894', 'Buzz', 'Fizz', '1897', '1898', 'Fizz', 'Buzz', '1901', 'Fizz', '1903', '1904', 'FizzBuzz', '1906', '1907', 'Fizz', '1909', 'Buzz', 'Fizz', '1912', '1913', 'Fizz', 'Buzz', '1916', 'Fizz', '1918', '1919', 'FizzBuzz', '1921', '1922', 'Fizz', '1924', 'Buzz', 'Fizz', '1927', '1928', 'Fizz', 'Buzz', '1931', 'Fizz', '1933', '1934', 'FizzBuzz', '1936', '1937', 'Fizz', '1939', 'Buzz', 'Fizz', '1942', '1943', 'Fizz', 'Buzz', '1946', 'Fizz', '1948', '1949', 'FizzBuzz', '1951', '1952', 'Fizz', '1954', 'Buzz', 'Fizz', '1957', '1958', 'Fizz', 'Buzz', '1961', 'Fizz', '1963', '1964', 'FizzBuzz', '1966', '1967', 'Fizz', '1969', 'Buzz', 'Fizz', '1972', '1973', 'Fizz', 'Buzz', '1976', 'Fizz', '1978', '1979', 'FizzBuzz', '1981', '1982', 'Fizz', '1984', 'Buzz', 'Fizz', '1987', '1988', 'Fizz', 'Buzz', '1991', 'Fizz', '1993', '1994', 'FizzBuzz', '1996', '1997', 'Fizz', '1999', 'Buzz', 'Fizz', '2002', '2003', 'Fizz', 'Buzz', '2006', 'Fizz', '2008', '2009', 'FizzBuzz', '2011', '2012', 'Fizz', '2014', 'Buzz', 'Fizz', '2017', '2018', 'Fizz', 'Buzz', '2021', 'Fizz', '2023', '2024', 'FizzBuzz', '2026', '2027', 'Fizz', '2029', 'Buzz', 'Fizz', '2032', '2033', 'Fizz', 'Buzz', '2036', 'Fizz', '2038', '2039', 'FizzBuzz', '2041', '2042', 'Fizz', '2044', 'Buzz', 'Fizz', '2047', '2048', 'Fizz', 'Buzz', '2051', 'Fizz', '2053', '2054', 'FizzBuzz', '2056', '2057', 'Fizz', '2059', 'Buzz', 'Fizz', '2062', '2063', 'Fizz', 'Buzz', '2066', 'Fizz', '2068', '2069', 'FizzBuzz', '2071', '2072', 'Fizz', '2074', 'Buzz', 'Fizz', '2077', '2078', 'Fizz', 'Buzz', '2081', 'Fizz', '2083', '2084', 'FizzBuzz', '2086', '2087', 'Fizz', '2089', 'Buzz', 'Fizz', '2092', '2093', 'Fizz', 'Buzz', '2096', 'Fizz', '2098', '2099', 'FizzBuzz', '2101', '2102', 'Fizz', '2104', 'Buzz', 'Fizz', '2107', '2108', 'Fizz', 'Buzz', '2111', 'Fizz', '2113', '2114', 'FizzBuzz', '2116', '2117', 'Fizz', '2119', 'Buzz', 'Fizz', '2122', '2123', 'Fizz', 'Buzz', '2126', 'Fizz', '2128', '2129', 'FizzBuzz', '2131', '2132', 'Fizz', '2134', 'Buzz', 'Fizz', '2137', '2138', 'Fizz', 'Buzz', '2141', 'Fizz', '2143', '2144', 'FizzBuzz', '2146', '2147', 'Fizz', '2149', 'Buzz', 'Fizz', '2152', '2153', 'Fizz', 'Buzz', '2156', 'Fizz', '2158', '2159', 'FizzBuzz', '2161', '2162', 'Fizz', '2164', 'Buzz', 'Fizz', '2167', '2168', 'Fizz', 'Buzz', '2171', 'Fizz', '2173', '2174', 'FizzBuzz', '2176', '2177', 'Fizz', '2179', 'Buzz', 'Fizz', '2182', '2183', 'Fizz', 'Buzz', '2186', 'Fizz', '2188', '2189', 'FizzBuzz', '2191', '2192', 'Fizz', '2194', 'Buzz', 'Fizz', '2197', '2198', 'Fizz', 'Buzz', '2201', 'Fizz', '2203', '2204', 'FizzBuzz', '2206', '2207', 'Fizz', '2209', 'Buzz', 'Fizz', '2212', '2213', 'Fizz', 'Buzz', '2216', 'Fizz', '2218', '2219', 'FizzBuzz', '2221', '2222', 'Fizz', '2224', 'Buzz', 'Fizz', '2227', '2228', 'Fizz', 'Buzz', '2231', 'Fizz', '2233', '2234', 'FizzBuzz', '2236', '2237', 'Fizz', '2239', 'Buzz', 'Fizz', '2242', '2243', 'Fizz', 'Buzz', '2246', 'Fizz', '2248', '2249', 'FizzBuzz', '2251', '2252', 'Fizz', '2254', 'Buzz', 'Fizz', '2257', '2258', 'Fizz', 'Buzz', '2261', 'Fizz', '2263', '2264', 'FizzBuzz', '2266', '2267', 'Fizz', '2269', 'Buzz', 'Fizz', '2272', '2273', 'Fizz', 'Buzz', '2276', 'Fizz', '2278', '2279', 'FizzBuzz', '2281', '2282', 'Fizz', '2284', 'Buzz', 'Fizz', '2287', '2288', 'Fizz', 'Buzz', '2291', 'Fizz', '2293', '2294', 'FizzBuzz', '2296', '2297', 'Fizz', '2299', 'Buzz', 'Fizz', '2302', '2303', 'Fizz', 'Buzz', '2306', 'Fizz', '2308', '2309', 'FizzBuzz', '2311', '2312', 'Fizz', '2314', 'Buzz', 'Fizz', '2317', '2318', 'Fizz', 'Buzz', '2321', 'Fizz', '2323', '2324', 'FizzBuzz', '2326', '2327', 'Fizz', '2329', 'Buzz', 'Fizz', '2332', '2333', 'Fizz', 'Buzz', '2336', 'Fizz', '2338', '2339', 'FizzBuzz', '2341', '2342', 'Fizz', '2344', 'Buzz', 'Fizz', '2347', '2348', 'Fizz', 'Buzz', '2351', 'Fizz', '2353', '2354', 'FizzBuzz', '2356', '2357', 'Fizz', '2359', 'Buzz', 'Fizz', '2362', '2363', 'Fizz', 'Buzz', '2366', 'Fizz', '2368', '2369', 'FizzBuzz', '2371', '2372', 'Fizz', '2374', 'Buzz', 'Fizz', '2377', '2378', 'Fizz', 'Buzz', '2381', 'Fizz', '2383', '2384', 'FizzBuzz', '2386', '2387', 'Fizz', '2389', 'Buzz', 'Fizz', '2392', '2393', 'Fizz', 'Buzz', '2396', 'Fizz', '2398', '2399', 'FizzBuzz', '2401', '2402', 'Fizz', '2404', 'Buzz', 'Fizz', '2407', '2408', 'Fizz', 'Buzz', '2411', 'Fizz', '2413', '2414', 'FizzBuzz', '2416', '2417', 'Fizz', '2419', 'Buzz', 'Fizz', '2422', '2423', 'Fizz', 'Buzz', '2426', 'Fizz', '2428', '2429', 'FizzBuzz', '2431', '2432', 'Fizz', '2434', 'Buzz', 'Fizz', '2437', '2438', 'Fizz', 'Buzz', '2441', 'Fizz', '2443', '2444', 'FizzBuzz', '2446', '2447', 'Fizz', '2449', 'Buzz', 'Fizz', '2452', '2453', 'Fizz', 'Buzz', '2456', 'Fizz', '2458', '2459', 'FizzBuzz', '2461', '2462', 'Fizz', '2464', 'Buzz', 'Fizz', '2467', '2468', 'Fizz', 'Buzz', '2471', 'Fizz', '2473', '2474', 'FizzBuzz', '2476', '2477', 'Fizz', '2479', 'Buzz', 'Fizz', '2482', '2483', 'Fizz', 'Buzz', '2486', 'Fizz', '2488', '2489', 'FizzBuzz', '2491', '2492', 'Fizz', '2494', 'Buzz', 'Fizz', '2497', '2498', 'Fizz', 'Buzz', '2501', 'Fizz', '2503', '2504', 'FizzBuzz', '2506', '2507', 'Fizz', '2509', 'Buzz', 'Fizz', '2512', '2513', 'Fizz', 'Buzz', '2516', 'Fizz', '2518', '2519', 'FizzBuzz', '2521', '2522', 'Fizz', '2524', 'Buzz', 'Fizz', '2527', '2528', 'Fizz', 'Buzz', '2531', 'Fizz', '2533', '2534', 'FizzBuzz', '2536', '2537', 'Fizz', '2539', 'Buzz', 'Fizz', '2542', '2543', 'Fizz', 'Buzz', '2546', 'Fizz', '2548', '2549', 'FizzBuzz', '2551', '2552', 'Fizz', '2554', 'Buzz', 'Fizz', '2557', '2558', 'Fizz', 'Buzz', '2561', 'Fizz', '2563', '2564', 'FizzBuzz', '2566', '2567', 'Fizz', '2569', 'Buzz', 'Fizz', '2572', '2573', 'Fizz', 'Buzz', '2576', 'Fizz', '2578', '2579', 'FizzBuzz', '2581', '2582', 'Fizz', '2584', 'Buzz', 'Fizz', '2587', '2588', 'Fizz', 'Buzz', '2591', 'Fizz', '2593', '2594', 'FizzBuzz', '2596', '2597', 'Fizz', '2599', 'Buzz', 'Fizz', '2602', '2603', 'Fizz', 'Buzz', '2606', 'Fizz', '2608', '2609', 'FizzBuzz', '2611', '2612', 'Fizz', '2614', 'Buzz', 'Fizz', '2617', '2618', 'Fizz', 'Buzz', '2621', 'Fizz', '2623', '2624', 'FizzBuzz', '2626', '2627', 'Fizz', '2629', 'Buzz', 'Fizz', '2632', '2633', 'Fizz', 'Buzz', '2636', 'Fizz', '2638', '2639', 'FizzBuzz', '2641', '2642', 'Fizz', '2644', 'Buzz', 'Fizz', '2647', '2648', 'Fizz', 'Buzz', '2651', 'Fizz', '2653', '2654', 'FizzBuzz', '2656', '2657', 'Fizz', '2659', 'Buzz', 'Fizz', '2662', '2663', 'Fizz', 'Buzz', '2666', 'Fizz', '2668', '2669', 'FizzBuzz', '2671', '2672', 'Fizz', '2674', 'Buzz', 'Fizz', '2677', '2678', 'Fizz', 'Buzz', '2681', 'Fizz', '2683', '2684', 'FizzBuzz', '2686', '2687', 'Fizz', '2689', 'Buzz', 'Fizz', '2692', '2693', 'Fizz', 'Buzz', '2696', 'Fizz', '2698', '2699', 'FizzBuzz', '2701', '2702', 'Fizz', '2704', 'Buzz', 'Fizz', '2707', '2708', 'Fizz', 'Buzz', '2711', 'Fizz', '2713', '2714', 'FizzBuzz', '2716', '2717', 'Fizz', '2719', 'Buzz', 'Fizz', '2722', '2723', 'Fizz', 'Buzz', '2726', 'Fizz', '2728', '2729', 'FizzBuzz', '2731', '2732', 'Fizz', '2734', 'Buzz', 'Fizz', '2737', '2738', 'Fizz', 'Buzz', '2741', 'Fizz', '2743', '2744', 'FizzBuzz', '2746', '2747', 'Fizz', '2749', 'Buzz', 'Fizz', '2752', '2753', 'Fizz', 'Buzz', '2756', 'Fizz', '2758', '2759', 'FizzBuzz', '2761', '2762', 'Fizz', '2764', 'Buzz', 'Fizz', '2767', '2768', 'Fizz', 'Buzz', '2771', 'Fizz', '2773', '2774', 'FizzBuzz', '2776', '2777', 'Fizz', '2779', 'Buzz', 'Fizz', '2782', '2783', 'Fizz', 'Buzz', '2786', 'Fizz', '2788', '2789', 'FizzBuzz', '2791', '2792', 'Fizz', '2794', 'Buzz', 'Fizz', '2797', '2798', 'Fizz', 'Buzz', '2801', 'Fizz', '2803', '2804', 'FizzBuzz', '2806', '2807', 'Fizz', '2809', 'Buzz', 'Fizz', '2812', '2813', 'Fizz', 'Buzz', '2816', 'Fizz', '2818', '2819', 'FizzBuzz', '2821', '2822', 'Fizz', '2824', 'Buzz', 'Fizz', '2827', '2828', 'Fizz', 'Buzz', '2831', 'Fizz', '2833', '2834', 'FizzBuzz', '2836', '2837', 'Fizz', '2839', 'Buzz', 'Fizz', '2842', '2843', 'Fizz', 'Buzz', '2846', 'Fizz', '2848', '2849', 'FizzBuzz', '2851', '2852', 'Fizz', '2854', 'Buzz', 'Fizz', '2857', '2858', 'Fizz', 'Buzz', '2861', 'Fizz', '2863', '2864', 'FizzBuzz', '2866', '2867', 'Fizz', '2869', 'Buzz', 'Fizz', '2872', '2873', 'Fizz', 'Buzz', '2876', 'Fizz', '2878', '2879', 'FizzBuzz', '2881', '2882', 'Fizz', '2884', 'Buzz', 'Fizz', '2887', '2888', 'Fizz', 'Buzz', '2891', 'Fizz', '2893', '2894', 'FizzBuzz', '2896', '2897', 'Fizz', '2899', 'Buzz', 'Fizz', '2902', '2903', 'Fizz', 'Buzz', '2906', 'Fizz', '2908', '2909', 'FizzBuzz', '2911', '2912', 'Fizz', '2914', 'Buzz', 'Fizz', '2917', '2918', 'Fizz', 'Buzz', '2921', 'Fizz', '2923', '2924', 'FizzBuzz', '2926', '2927', 'Fizz', '2929', 'Buzz', 'Fizz', '2932', '2933', 'Fizz', 'Buzz', '2936', 'Fizz', '2938', '2939', 'FizzBuzz', '2941', '2942', 'Fizz', '2944', 'Buzz', 'Fizz', '2947', '2948', 'Fizz', 'Buzz', '2951', 'Fizz', '2953', '2954', 'FizzBuzz', '2956', '2957', 'Fizz', '2959', 'Buzz', 'Fizz', '2962', '2963', 'Fizz', 'Buzz', '2966', 'Fizz', '2968', '2969', 'FizzBuzz', '2971', '2972', 'Fizz', '2974', 'Buzz', 'Fizz', '2977', '2978', 'Fizz', 'Buzz', '2981', 'Fizz', '2983', '2984', 'FizzBuzz', '2986', '2987', 'Fizz', '2989', 'Buzz', 'Fizz', '2992', '2993', 'Fizz', 'Buzz', '2996', 'Fizz', '2998', '2999', 'FizzBuzz', '3001', '3002', 'Fizz', '3004', 'Buzz', 'Fizz', '3007', '3008', 'Fizz', 'Buzz', '3011', 'Fizz', '3013', '3014', 'FizzBuzz', '3016', '3017', 'Fizz', '3019', 'Buzz', 'Fizz', '3022', '3023', 'Fizz', 'Buzz', '3026', 'Fizz', '3028', '3029', 'FizzBuzz', '3031', '3032', 'Fizz', '3034', 'Buzz', 'Fizz', '3037', '3038', 'Fizz', 'Buzz', '3041', 'Fizz', '3043', '3044', 'FizzBuzz', '3046', '3047', 'Fizz', '3049', 'Buzz', 'Fizz', '3052', '3053', 'Fizz', 'Buzz', '3056', 'Fizz', '3058', '3059', 'FizzBuzz', '3061', '3062', 'Fizz', '3064', 'Buzz', 'Fizz', '3067', '3068', 'Fizz', 'Buzz', '3071', 'Fizz', '3073', '3074', 'FizzBuzz', '3076', '3077', 'Fizz', '3079', 'Buzz', 'Fizz', '3082', '3083', 'Fizz', 'Buzz', '3086', 'Fizz', '3088', '3089', 'FizzBuzz', '3091', '3092', 'Fizz', '3094', 'Buzz', 'Fizz', '3097', '3098', 'Fizz', 'Buzz', '3101', 'Fizz', '3103', '3104', 'FizzBuzz', '3106', '3107', 'Fizz', '3109', 'Buzz', 'Fizz', '3112', '3113', 'Fizz', 'Buzz', '3116', 'Fizz', '3118', '3119', 'FizzBuzz', '3121', '3122', 'Fizz', '3124', 'Buzz', 'Fizz', '3127', '3128', 'Fizz', 'Buzz', '3131', 'Fizz', '3133', '3134', 'FizzBuzz', '3136', '3137', 'Fizz', '3139', 'Buzz', 'Fizz', '3142', '3143', 'Fizz', 'Buzz', '3146', 'Fizz', '3148', '3149', 'FizzBuzz', '3151', '3152', 'Fizz', '3154', 'Buzz', 'Fizz', '3157', '3158', 'Fizz', 'Buzz', '3161', 'Fizz', '3163', '3164', 'FizzBuzz', '3166', '3167', 'Fizz', '3169', 'Buzz', 'Fizz', '3172', '3173', 'Fizz', 'Buzz', '3176', 'Fizz', '3178', '3179', 'FizzBuzz', '3181', '3182', 'Fizz', '3184', 'Buzz', 'Fizz', '3187', '3188', 'Fizz', 'Buzz', '3191', 'Fizz', '3193', '3194', 'FizzBuzz', '3196', '3197', 'Fizz', '3199', 'Buzz', 'Fizz', '3202', '3203', 'Fizz', 'Buzz', '3206', 'Fizz', '3208', '3209', 'FizzBuzz', '3211', '3212', 'Fizz', '3214', 'Buzz', 'Fizz', '3217', '3218', 'Fizz', 'Buzz', '3221', 'Fizz', '3223', '3224', 'FizzBuzz', '3226', '3227', 'Fizz', '3229', 'Buzz', 'Fizz', '3232', '3233', 'Fizz', 'Buzz', '3236', 'Fizz', '3238', '3239', 'FizzBuzz', '3241', '3242', 'Fizz', '3244', 'Buzz', 'Fizz', '3247', '3248', 'Fizz', 'Buzz', '3251', 'Fizz', '3253', '3254', 'FizzBuzz', '3256', '3257', 'Fizz', '3259', 'Buzz', 'Fizz', '3262', '3263', 'Fizz', 'Buzz', '3266', 'Fizz', '3268', '3269', 'FizzBuzz', '3271', '3272', 'Fizz', '3274', 'Buzz', 'Fizz', '3277', '3278', 'Fizz', 'Buzz', '3281', 'Fizz', '3283', '3284', 'FizzBuzz', '3286', '3287', 'Fizz', '3289', 'Buzz', 'Fizz', '3292', '3293', 'Fizz', 'Buzz', '3296', 'Fizz', '3298', '3299', 'FizzBuzz', '3301', '3302', 'Fizz', '3304', 'Buzz', 'Fizz', '3307', '3308', 'Fizz', 'Buzz', '3311', 'Fizz', '3313', '3314', 'FizzBuzz', '3316', '3317', 'Fizz', '3319', 'Buzz', 'Fizz', '3322', '3323', 'Fizz', 'Buzz', '3326', 'Fizz', '3328', '3329', 'FizzBuzz', '3331', '3332', 'Fizz']\n assert candidate(n = 300) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz']\n assert candidate(n = 60) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz']\n assert candidate(n = 3000) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024', 'Buzz', 'Fizz', '1027', '1028', 'Fizz', 'Buzz', '1031', 'Fizz', '1033', '1034', 'FizzBuzz', '1036', '1037', 'Fizz', '1039', 'Buzz', 'Fizz', '1042', '1043', 'Fizz', 'Buzz', '1046', 'Fizz', '1048', '1049', 'FizzBuzz', '1051', '1052', 'Fizz', '1054', 'Buzz', 'Fizz', '1057', '1058', 'Fizz', 'Buzz', '1061', 'Fizz', '1063', '1064', 'FizzBuzz', '1066', '1067', 'Fizz', '1069', 'Buzz', 'Fizz', '1072', '1073', 'Fizz', 'Buzz', '1076', 'Fizz', '1078', '1079', 'FizzBuzz', '1081', '1082', 'Fizz', '1084', 'Buzz', 'Fizz', '1087', '1088', 'Fizz', 'Buzz', '1091', 'Fizz', '1093', '1094', 'FizzBuzz', '1096', '1097', 'Fizz', '1099', 'Buzz', 'Fizz', '1102', '1103', 'Fizz', 'Buzz', '1106', 'Fizz', '1108', '1109', 'FizzBuzz', '1111', '1112', 'Fizz', '1114', 'Buzz', 'Fizz', '1117', '1118', 'Fizz', 'Buzz', '1121', 'Fizz', '1123', '1124', 'FizzBuzz', '1126', '1127', 'Fizz', '1129', 'Buzz', 'Fizz', '1132', '1133', 'Fizz', 'Buzz', '1136', 'Fizz', '1138', '1139', 'FizzBuzz', '1141', '1142', 'Fizz', '1144', 'Buzz', 'Fizz', '1147', '1148', 'Fizz', 'Buzz', '1151', 'Fizz', '1153', '1154', 'FizzBuzz', '1156', '1157', 'Fizz', '1159', 'Buzz', 'Fizz', '1162', '1163', 'Fizz', 'Buzz', '1166', 'Fizz', '1168', '1169', 'FizzBuzz', '1171', '1172', 'Fizz', '1174', 'Buzz', 'Fizz', '1177', '1178', 'Fizz', 'Buzz', '1181', 'Fizz', '1183', '1184', 'FizzBuzz', '1186', '1187', 'Fizz', '1189', 'Buzz', 'Fizz', '1192', '1193', 'Fizz', 'Buzz', '1196', 'Fizz', '1198', '1199', 'FizzBuzz', '1201', '1202', 'Fizz', '1204', 'Buzz', 'Fizz', '1207', '1208', 'Fizz', 'Buzz', '1211', 'Fizz', '1213', '1214', 'FizzBuzz', '1216', '1217', 'Fizz', '1219', 'Buzz', 'Fizz', '1222', '1223', 'Fizz', 'Buzz', '1226', 'Fizz', '1228', '1229', 'FizzBuzz', '1231', '1232', 'Fizz', '1234', 'Buzz', 'Fizz', '1237', '1238', 'Fizz', 'Buzz', '1241', 'Fizz', '1243', '1244', 'FizzBuzz', '1246', '1247', 'Fizz', '1249', 'Buzz', 'Fizz', '1252', '1253', 'Fizz', 'Buzz', '1256', 'Fizz', '1258', '1259', 'FizzBuzz', '1261', '1262', 'Fizz', '1264', 'Buzz', 'Fizz', '1267', '1268', 'Fizz', 'Buzz', '1271', 'Fizz', '1273', '1274', 'FizzBuzz', '1276', '1277', 'Fizz', '1279', 'Buzz', 'Fizz', '1282', '1283', 'Fizz', 'Buzz', '1286', 'Fizz', '1288', '1289', 'FizzBuzz', '1291', '1292', 'Fizz', '1294', 'Buzz', 'Fizz', '1297', '1298', 'Fizz', 'Buzz', '1301', 'Fizz', '1303', '1304', 'FizzBuzz', '1306', '1307', 'Fizz', '1309', 'Buzz', 'Fizz', '1312', '1313', 'Fizz', 'Buzz', '1316', 'Fizz', '1318', '1319', 'FizzBuzz', '1321', '1322', 'Fizz', '1324', 'Buzz', 'Fizz', '1327', '1328', 'Fizz', 'Buzz', '1331', 'Fizz', '1333', '1334', 'FizzBuzz', '1336', '1337', 'Fizz', '1339', 'Buzz', 'Fizz', '1342', '1343', 'Fizz', 'Buzz', '1346', 'Fizz', '1348', '1349', 'FizzBuzz', '1351', '1352', 'Fizz', '1354', 'Buzz', 'Fizz', '1357', '1358', 'Fizz', 'Buzz', '1361', 'Fizz', '1363', '1364', 'FizzBuzz', '1366', '1367', 'Fizz', '1369', 'Buzz', 'Fizz', '1372', '1373', 'Fizz', 'Buzz', '1376', 'Fizz', '1378', '1379', 'FizzBuzz', '1381', '1382', 'Fizz', '1384', 'Buzz', 'Fizz', '1387', '1388', 'Fizz', 'Buzz', '1391', 'Fizz', '1393', '1394', 'FizzBuzz', '1396', '1397', 'Fizz', '1399', 'Buzz', 'Fizz', '1402', '1403', 'Fizz', 'Buzz', '1406', 'Fizz', '1408', '1409', 'FizzBuzz', '1411', '1412', 'Fizz', '1414', 'Buzz', 'Fizz', '1417', '1418', 'Fizz', 'Buzz', '1421', 'Fizz', '1423', '1424', 'FizzBuzz', '1426', '1427', 'Fizz', '1429', 'Buzz', 'Fizz', '1432', '1433', 'Fizz', 'Buzz', '1436', 'Fizz', '1438', '1439', 'FizzBuzz', '1441', '1442', 'Fizz', '1444', 'Buzz', 'Fizz', '1447', '1448', 'Fizz', 'Buzz', '1451', 'Fizz', '1453', '1454', 'FizzBuzz', '1456', '1457', 'Fizz', '1459', 'Buzz', 'Fizz', '1462', '1463', 'Fizz', 'Buzz', '1466', 'Fizz', '1468', '1469', 'FizzBuzz', '1471', '1472', 'Fizz', '1474', 'Buzz', 'Fizz', '1477', '1478', 'Fizz', 'Buzz', '1481', 'Fizz', '1483', '1484', 'FizzBuzz', '1486', '1487', 'Fizz', '1489', 'Buzz', 'Fizz', '1492', '1493', 'Fizz', 'Buzz', '1496', 'Fizz', '1498', '1499', 'FizzBuzz', '1501', '1502', 'Fizz', '1504', 'Buzz', 'Fizz', '1507', '1508', 'Fizz', 'Buzz', '1511', 'Fizz', '1513', '1514', 'FizzBuzz', '1516', '1517', 'Fizz', '1519', 'Buzz', 'Fizz', '1522', '1523', 'Fizz', 'Buzz', '1526', 'Fizz', '1528', '1529', 'FizzBuzz', '1531', '1532', 'Fizz', '1534', 'Buzz', 'Fizz', '1537', '1538', 'Fizz', 'Buzz', '1541', 'Fizz', '1543', '1544', 'FizzBuzz', '1546', '1547', 'Fizz', '1549', 'Buzz', 'Fizz', '1552', '1553', 'Fizz', 'Buzz', '1556', 'Fizz', '1558', '1559', 'FizzBuzz', '1561', '1562', 'Fizz', '1564', 'Buzz', 'Fizz', '1567', '1568', 'Fizz', 'Buzz', '1571', 'Fizz', '1573', '1574', 'FizzBuzz', '1576', '1577', 'Fizz', '1579', 'Buzz', 'Fizz', '1582', '1583', 'Fizz', 'Buzz', '1586', 'Fizz', '1588', '1589', 'FizzBuzz', '1591', '1592', 'Fizz', '1594', 'Buzz', 'Fizz', '1597', '1598', 'Fizz', 'Buzz', '1601', 'Fizz', '1603', '1604', 'FizzBuzz', '1606', '1607', 'Fizz', '1609', 'Buzz', 'Fizz', '1612', '1613', 'Fizz', 'Buzz', '1616', 'Fizz', '1618', '1619', 'FizzBuzz', '1621', '1622', 'Fizz', '1624', 'Buzz', 'Fizz', '1627', '1628', 'Fizz', 'Buzz', '1631', 'Fizz', '1633', '1634', 'FizzBuzz', '1636', '1637', 'Fizz', '1639', 'Buzz', 'Fizz', '1642', '1643', 'Fizz', 'Buzz', '1646', 'Fizz', '1648', '1649', 'FizzBuzz', '1651', '1652', 'Fizz', '1654', 'Buzz', 'Fizz', '1657', '1658', 'Fizz', 'Buzz', '1661', 'Fizz', '1663', '1664', 'FizzBuzz', '1666', '1667', 'Fizz', '1669', 'Buzz', 'Fizz', '1672', '1673', 'Fizz', 'Buzz', '1676', 'Fizz', '1678', '1679', 'FizzBuzz', '1681', '1682', 'Fizz', '1684', 'Buzz', 'Fizz', '1687', '1688', 'Fizz', 'Buzz', '1691', 'Fizz', '1693', '1694', 'FizzBuzz', '1696', '1697', 'Fizz', '1699', 'Buzz', 'Fizz', '1702', '1703', 'Fizz', 'Buzz', '1706', 'Fizz', '1708', '1709', 'FizzBuzz', '1711', '1712', 'Fizz', '1714', 'Buzz', 'Fizz', '1717', '1718', 'Fizz', 'Buzz', '1721', 'Fizz', '1723', '1724', 'FizzBuzz', '1726', '1727', 'Fizz', '1729', 'Buzz', 'Fizz', '1732', '1733', 'Fizz', 'Buzz', '1736', 'Fizz', '1738', '1739', 'FizzBuzz', '1741', '1742', 'Fizz', '1744', 'Buzz', 'Fizz', '1747', '1748', 'Fizz', 'Buzz', '1751', 'Fizz', '1753', '1754', 'FizzBuzz', '1756', '1757', 'Fizz', '1759', 'Buzz', 'Fizz', '1762', '1763', 'Fizz', 'Buzz', '1766', 'Fizz', '1768', '1769', 'FizzBuzz', '1771', '1772', 'Fizz', '1774', 'Buzz', 'Fizz', '1777', '1778', 'Fizz', 'Buzz', '1781', 'Fizz', '1783', '1784', 'FizzBuzz', '1786', '1787', 'Fizz', '1789', 'Buzz', 'Fizz', '1792', '1793', 'Fizz', 'Buzz', '1796', 'Fizz', '1798', '1799', 'FizzBuzz', '1801', '1802', 'Fizz', '1804', 'Buzz', 'Fizz', '1807', '1808', 'Fizz', 'Buzz', '1811', 'Fizz', '1813', '1814', 'FizzBuzz', '1816', '1817', 'Fizz', '1819', 'Buzz', 'Fizz', '1822', '1823', 'Fizz', 'Buzz', '1826', 'Fizz', '1828', '1829', 'FizzBuzz', '1831', '1832', 'Fizz', '1834', 'Buzz', 'Fizz', '1837', '1838', 'Fizz', 'Buzz', '1841', 'Fizz', '1843', '1844', 'FizzBuzz', '1846', '1847', 'Fizz', '1849', 'Buzz', 'Fizz', '1852', '1853', 'Fizz', 'Buzz', '1856', 'Fizz', '1858', '1859', 'FizzBuzz', '1861', '1862', 'Fizz', '1864', 'Buzz', 'Fizz', '1867', '1868', 'Fizz', 'Buzz', '1871', 'Fizz', '1873', '1874', 'FizzBuzz', '1876', '1877', 'Fizz', '1879', 'Buzz', 'Fizz', '1882', '1883', 'Fizz', 'Buzz', '1886', 'Fizz', '1888', '1889', 'FizzBuzz', '1891', '1892', 'Fizz', '1894', 'Buzz', 'Fizz', '1897', '1898', 'Fizz', 'Buzz', '1901', 'Fizz', '1903', '1904', 'FizzBuzz', '1906', '1907', 'Fizz', '1909', 'Buzz', 'Fizz', '1912', '1913', 'Fizz', 'Buzz', '1916', 'Fizz', '1918', '1919', 'FizzBuzz', '1921', '1922', 'Fizz', '1924', 'Buzz', 'Fizz', '1927', '1928', 'Fizz', 'Buzz', '1931', 'Fizz', '1933', '1934', 'FizzBuzz', '1936', '1937', 'Fizz', '1939', 'Buzz', 'Fizz', '1942', '1943', 'Fizz', 'Buzz', '1946', 'Fizz', '1948', '1949', 'FizzBuzz', '1951', '1952', 'Fizz', '1954', 'Buzz', 'Fizz', '1957', '1958', 'Fizz', 'Buzz', '1961', 'Fizz', '1963', '1964', 'FizzBuzz', '1966', '1967', 'Fizz', '1969', 'Buzz', 'Fizz', '1972', '1973', 'Fizz', 'Buzz', '1976', 'Fizz', '1978', '1979', 'FizzBuzz', '1981', '1982', 'Fizz', '1984', 'Buzz', 'Fizz', '1987', '1988', 'Fizz', 'Buzz', '1991', 'Fizz', '1993', '1994', 'FizzBuzz', '1996', '1997', 'Fizz', '1999', 'Buzz', 'Fizz', '2002', '2003', 'Fizz', 'Buzz', '2006', 'Fizz', '2008', '2009', 'FizzBuzz', '2011', '2012', 'Fizz', '2014', 'Buzz', 'Fizz', '2017', '2018', 'Fizz', 'Buzz', '2021', 'Fizz', '2023', '2024', 'FizzBuzz', '2026', '2027', 'Fizz', '2029', 'Buzz', 'Fizz', '2032', '2033', 'Fizz', 'Buzz', '2036', 'Fizz', '2038', '2039', 'FizzBuzz', '2041', '2042', 'Fizz', '2044', 'Buzz', 'Fizz', '2047', '2048', 'Fizz', 'Buzz', '2051', 'Fizz', '2053', '2054', 'FizzBuzz', '2056', '2057', 'Fizz', '2059', 'Buzz', 'Fizz', '2062', '2063', 'Fizz', 'Buzz', '2066', 'Fizz', '2068', '2069', 'FizzBuzz', '2071', '2072', 'Fizz', '2074', 'Buzz', 'Fizz', '2077', '2078', 'Fizz', 'Buzz', '2081', 'Fizz', '2083', '2084', 'FizzBuzz', '2086', '2087', 'Fizz', '2089', 'Buzz', 'Fizz', '2092', '2093', 'Fizz', 'Buzz', '2096', 'Fizz', '2098', '2099', 'FizzBuzz', '2101', '2102', 'Fizz', '2104', 'Buzz', 'Fizz', '2107', '2108', 'Fizz', 'Buzz', '2111', 'Fizz', '2113', '2114', 'FizzBuzz', '2116', '2117', 'Fizz', '2119', 'Buzz', 'Fizz', '2122', '2123', 'Fizz', 'Buzz', '2126', 'Fizz', '2128', '2129', 'FizzBuzz', '2131', '2132', 'Fizz', '2134', 'Buzz', 'Fizz', '2137', '2138', 'Fizz', 'Buzz', '2141', 'Fizz', '2143', '2144', 'FizzBuzz', '2146', '2147', 'Fizz', '2149', 'Buzz', 'Fizz', '2152', '2153', 'Fizz', 'Buzz', '2156', 'Fizz', '2158', '2159', 'FizzBuzz', '2161', '2162', 'Fizz', '2164', 'Buzz', 'Fizz', '2167', '2168', 'Fizz', 'Buzz', '2171', 'Fizz', '2173', '2174', 'FizzBuzz', '2176', '2177', 'Fizz', '2179', 'Buzz', 'Fizz', '2182', '2183', 'Fizz', 'Buzz', '2186', 'Fizz', '2188', '2189', 'FizzBuzz', '2191', '2192', 'Fizz', '2194', 'Buzz', 'Fizz', '2197', '2198', 'Fizz', 'Buzz', '2201', 'Fizz', '2203', '2204', 'FizzBuzz', '2206', '2207', 'Fizz', '2209', 'Buzz', 'Fizz', '2212', '2213', 'Fizz', 'Buzz', '2216', 'Fizz', '2218', '2219', 'FizzBuzz', '2221', '2222', 'Fizz', '2224', 'Buzz', 'Fizz', '2227', '2228', 'Fizz', 'Buzz', '2231', 'Fizz', '2233', '2234', 'FizzBuzz', '2236', '2237', 'Fizz', '2239', 'Buzz', 'Fizz', '2242', '2243', 'Fizz', 'Buzz', '2246', 'Fizz', '2248', '2249', 'FizzBuzz', '2251', '2252', 'Fizz', '2254', 'Buzz', 'Fizz', '2257', '2258', 'Fizz', 'Buzz', '2261', 'Fizz', '2263', '2264', 'FizzBuzz', '2266', '2267', 'Fizz', '2269', 'Buzz', 'Fizz', '2272', '2273', 'Fizz', 'Buzz', '2276', 'Fizz', '2278', '2279', 'FizzBuzz', '2281', '2282', 'Fizz', '2284', 'Buzz', 'Fizz', '2287', '2288', 'Fizz', 'Buzz', '2291', 'Fizz', '2293', '2294', 'FizzBuzz', '2296', '2297', 'Fizz', '2299', 'Buzz', 'Fizz', '2302', '2303', 'Fizz', 'Buzz', '2306', 'Fizz', '2308', '2309', 'FizzBuzz', '2311', '2312', 'Fizz', '2314', 'Buzz', 'Fizz', '2317', '2318', 'Fizz', 'Buzz', '2321', 'Fizz', '2323', '2324', 'FizzBuzz', '2326', '2327', 'Fizz', '2329', 'Buzz', 'Fizz', '2332', '2333', 'Fizz', 'Buzz', '2336', 'Fizz', '2338', '2339', 'FizzBuzz', '2341', '2342', 'Fizz', '2344', 'Buzz', 'Fizz', '2347', '2348', 'Fizz', 'Buzz', '2351', 'Fizz', '2353', '2354', 'FizzBuzz', '2356', '2357', 'Fizz', '2359', 'Buzz', 'Fizz', '2362', '2363', 'Fizz', 'Buzz', '2366', 'Fizz', '2368', '2369', 'FizzBuzz', '2371', '2372', 'Fizz', '2374', 'Buzz', 'Fizz', '2377', '2378', 'Fizz', 'Buzz', '2381', 'Fizz', '2383', '2384', 'FizzBuzz', '2386', '2387', 'Fizz', '2389', 'Buzz', 'Fizz', '2392', '2393', 'Fizz', 'Buzz', '2396', 'Fizz', '2398', '2399', 'FizzBuzz', '2401', '2402', 'Fizz', '2404', 'Buzz', 'Fizz', '2407', '2408', 'Fizz', 'Buzz', '2411', 'Fizz', '2413', '2414', 'FizzBuzz', '2416', '2417', 'Fizz', '2419', 'Buzz', 'Fizz', '2422', '2423', 'Fizz', 'Buzz', '2426', 'Fizz', '2428', '2429', 'FizzBuzz', '2431', '2432', 'Fizz', '2434', 'Buzz', 'Fizz', '2437', '2438', 'Fizz', 'Buzz', '2441', 'Fizz', '2443', '2444', 'FizzBuzz', '2446', '2447', 'Fizz', '2449', 'Buzz', 'Fizz', '2452', '2453', 'Fizz', 'Buzz', '2456', 'Fizz', '2458', '2459', 'FizzBuzz', '2461', '2462', 'Fizz', '2464', 'Buzz', 'Fizz', '2467', '2468', 'Fizz', 'Buzz', '2471', 'Fizz', '2473', '2474', 'FizzBuzz', '2476', '2477', 'Fizz', '2479', 'Buzz', 'Fizz', '2482', '2483', 'Fizz', 'Buzz', '2486', 'Fizz', '2488', '2489', 'FizzBuzz', '2491', '2492', 'Fizz', '2494', 'Buzz', 'Fizz', '2497', '2498', 'Fizz', 'Buzz', '2501', 'Fizz', '2503', '2504', 'FizzBuzz', '2506', '2507', 'Fizz', '2509', 'Buzz', 'Fizz', '2512', '2513', 'Fizz', 'Buzz', '2516', 'Fizz', '2518', '2519', 'FizzBuzz', '2521', '2522', 'Fizz', '2524', 'Buzz', 'Fizz', '2527', '2528', 'Fizz', 'Buzz', '2531', 'Fizz', '2533', '2534', 'FizzBuzz', '2536', '2537', 'Fizz', '2539', 'Buzz', 'Fizz', '2542', '2543', 'Fizz', 'Buzz', '2546', 'Fizz', '2548', '2549', 'FizzBuzz', '2551', '2552', 'Fizz', '2554', 'Buzz', 'Fizz', '2557', '2558', 'Fizz', 'Buzz', '2561', 'Fizz', '2563', '2564', 'FizzBuzz', '2566', '2567', 'Fizz', '2569', 'Buzz', 'Fizz', '2572', '2573', 'Fizz', 'Buzz', '2576', 'Fizz', '2578', '2579', 'FizzBuzz', '2581', '2582', 'Fizz', '2584', 'Buzz', 'Fizz', '2587', '2588', 'Fizz', 'Buzz', '2591', 'Fizz', '2593', '2594', 'FizzBuzz', '2596', '2597', 'Fizz', '2599', 'Buzz', 'Fizz', '2602', '2603', 'Fizz', 'Buzz', '2606', 'Fizz', '2608', '2609', 'FizzBuzz', '2611', '2612', 'Fizz', '2614', 'Buzz', 'Fizz', '2617', '2618', 'Fizz', 'Buzz', '2621', 'Fizz', '2623', '2624', 'FizzBuzz', '2626', '2627', 'Fizz', '2629', 'Buzz', 'Fizz', '2632', '2633', 'Fizz', 'Buzz', '2636', 'Fizz', '2638', '2639', 'FizzBuzz', '2641', '2642', 'Fizz', '2644', 'Buzz', 'Fizz', '2647', '2648', 'Fizz', 'Buzz', '2651', 'Fizz', '2653', '2654', 'FizzBuzz', '2656', '2657', 'Fizz', '2659', 'Buzz', 'Fizz', '2662', '2663', 'Fizz', 'Buzz', '2666', 'Fizz', '2668', '2669', 'FizzBuzz', '2671', '2672', 'Fizz', '2674', 'Buzz', 'Fizz', '2677', '2678', 'Fizz', 'Buzz', '2681', 'Fizz', '2683', '2684', 'FizzBuzz', '2686', '2687', 'Fizz', '2689', 'Buzz', 'Fizz', '2692', '2693', 'Fizz', 'Buzz', '2696', 'Fizz', '2698', '2699', 'FizzBuzz', '2701', '2702', 'Fizz', '2704', 'Buzz', 'Fizz', '2707', '2708', 'Fizz', 'Buzz', '2711', 'Fizz', '2713', '2714', 'FizzBuzz', '2716', '2717', 'Fizz', '2719', 'Buzz', 'Fizz', '2722', '2723', 'Fizz', 'Buzz', '2726', 'Fizz', '2728', '2729', 'FizzBuzz', '2731', '2732', 'Fizz', '2734', 'Buzz', 'Fizz', '2737', '2738', 'Fizz', 'Buzz', '2741', 'Fizz', '2743', '2744', 'FizzBuzz', '2746', '2747', 'Fizz', '2749', 'Buzz', 'Fizz', '2752', '2753', 'Fizz', 'Buzz', '2756', 'Fizz', '2758', '2759', 'FizzBuzz', '2761', '2762', 'Fizz', '2764', 'Buzz', 'Fizz', '2767', '2768', 'Fizz', 'Buzz', '2771', 'Fizz', '2773', '2774', 'FizzBuzz', '2776', '2777', 'Fizz', '2779', 'Buzz', 'Fizz', '2782', '2783', 'Fizz', 'Buzz', '2786', 'Fizz', '2788', '2789', 'FizzBuzz', '2791', '2792', 'Fizz', '2794', 'Buzz', 'Fizz', '2797', '2798', 'Fizz', 'Buzz', '2801', 'Fizz', '2803', '2804', 'FizzBuzz', '2806', '2807', 'Fizz', '2809', 'Buzz', 'Fizz', '2812', '2813', 'Fizz', 'Buzz', '2816', 'Fizz', '2818', '2819', 'FizzBuzz', '2821', '2822', 'Fizz', '2824', 'Buzz', 'Fizz', '2827', '2828', 'Fizz', 'Buzz', '2831', 'Fizz', '2833', '2834', 'FizzBuzz', '2836', '2837', 'Fizz', '2839', 'Buzz', 'Fizz', '2842', '2843', 'Fizz', 'Buzz', '2846', 'Fizz', '2848', '2849', 'FizzBuzz', '2851', '2852', 'Fizz', '2854', 'Buzz', 'Fizz', '2857', '2858', 'Fizz', 'Buzz', '2861', 'Fizz', '2863', '2864', 'FizzBuzz', '2866', '2867', 'Fizz', '2869', 'Buzz', 'Fizz', '2872', '2873', 'Fizz', 'Buzz', '2876', 'Fizz', '2878', '2879', 'FizzBuzz', '2881', '2882', 'Fizz', '2884', 'Buzz', 'Fizz', '2887', '2888', 'Fizz', 'Buzz', '2891', 'Fizz', '2893', '2894', 'FizzBuzz', '2896', '2897', 'Fizz', '2899', 'Buzz', 'Fizz', '2902', '2903', 'Fizz', 'Buzz', '2906', 'Fizz', '2908', '2909', 'FizzBuzz', '2911', '2912', 'Fizz', '2914', 'Buzz', 'Fizz', '2917', '2918', 'Fizz', 'Buzz', '2921', 'Fizz', '2923', '2924', 'FizzBuzz', '2926', '2927', 'Fizz', '2929', 'Buzz', 'Fizz', '2932', '2933', 'Fizz', 'Buzz', '2936', 'Fizz', '2938', '2939', 'FizzBuzz', '2941', '2942', 'Fizz', '2944', 'Buzz', 'Fizz', '2947', '2948', 'Fizz', 'Buzz', '2951', 'Fizz', '2953', '2954', 'FizzBuzz', '2956', '2957', 'Fizz', '2959', 'Buzz', 'Fizz', '2962', '2963', 'Fizz', 'Buzz', '2966', 'Fizz', '2968', '2969', 'FizzBuzz', '2971', '2972', 'Fizz', '2974', 'Buzz', 'Fizz', '2977', '2978', 'Fizz', 'Buzz', '2981', 'Fizz', '2983', '2984', 'FizzBuzz', '2986', '2987', 'Fizz', '2989', 'Buzz', 'Fizz', '2992', '2993', 'Fizz', 'Buzz', '2996', 'Fizz', '2998', '2999', 'FizzBuzz']\n assert candidate(n = 30) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz']\n assert candidate(n = 99) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz']\n assert candidate(n = 2) == ['1', '2']\n assert candidate(n = 23) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23']\n assert candidate(n = 42) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz']\n assert candidate(n = 1024) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024']\n assert candidate(n = 101) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101']\n assert candidate(n = 250) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz']\n assert candidate(n = 2048) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024', 'Buzz', 'Fizz', '1027', '1028', 'Fizz', 'Buzz', '1031', 'Fizz', '1033', '1034', 'FizzBuzz', '1036', '1037', 'Fizz', '1039', 'Buzz', 'Fizz', '1042', '1043', 'Fizz', 'Buzz', '1046', 'Fizz', '1048', '1049', 'FizzBuzz', '1051', '1052', 'Fizz', '1054', 'Buzz', 'Fizz', '1057', '1058', 'Fizz', 'Buzz', '1061', 'Fizz', '1063', '1064', 'FizzBuzz', '1066', '1067', 'Fizz', '1069', 'Buzz', 'Fizz', '1072', '1073', 'Fizz', 'Buzz', '1076', 'Fizz', '1078', '1079', 'FizzBuzz', '1081', '1082', 'Fizz', '1084', 'Buzz', 'Fizz', '1087', '1088', 'Fizz', 'Buzz', '1091', 'Fizz', '1093', '1094', 'FizzBuzz', '1096', '1097', 'Fizz', '1099', 'Buzz', 'Fizz', '1102', '1103', 'Fizz', 'Buzz', '1106', 'Fizz', '1108', '1109', 'FizzBuzz', '1111', '1112', 'Fizz', '1114', 'Buzz', 'Fizz', '1117', '1118', 'Fizz', 'Buzz', '1121', 'Fizz', '1123', '1124', 'FizzBuzz', '1126', '1127', 'Fizz', '1129', 'Buzz', 'Fizz', '1132', '1133', 'Fizz', 'Buzz', '1136', 'Fizz', '1138', '1139', 'FizzBuzz', '1141', '1142', 'Fizz', '1144', 'Buzz', 'Fizz', '1147', '1148', 'Fizz', 'Buzz', '1151', 'Fizz', '1153', '1154', 'FizzBuzz', '1156', '1157', 'Fizz', '1159', 'Buzz', 'Fizz', '1162', '1163', 'Fizz', 'Buzz', '1166', 'Fizz', '1168', '1169', 'FizzBuzz', '1171', '1172', 'Fizz', '1174', 'Buzz', 'Fizz', '1177', '1178', 'Fizz', 'Buzz', '1181', 'Fizz', '1183', '1184', 'FizzBuzz', '1186', '1187', 'Fizz', '1189', 'Buzz', 'Fizz', '1192', '1193', 'Fizz', 'Buzz', '1196', 'Fizz', '1198', '1199', 'FizzBuzz', '1201', '1202', 'Fizz', '1204', 'Buzz', 'Fizz', '1207', '1208', 'Fizz', 'Buzz', '1211', 'Fizz', '1213', '1214', 'FizzBuzz', '1216', '1217', 'Fizz', '1219', 'Buzz', 'Fizz', '1222', '1223', 'Fizz', 'Buzz', '1226', 'Fizz', '1228', '1229', 'FizzBuzz', '1231', '1232', 'Fizz', '1234', 'Buzz', 'Fizz', '1237', '1238', 'Fizz', 'Buzz', '1241', 'Fizz', '1243', '1244', 'FizzBuzz', '1246', '1247', 'Fizz', '1249', 'Buzz', 'Fizz', '1252', '1253', 'Fizz', 'Buzz', '1256', 'Fizz', '1258', '1259', 'FizzBuzz', '1261', '1262', 'Fizz', '1264', 'Buzz', 'Fizz', '1267', '1268', 'Fizz', 'Buzz', '1271', 'Fizz', '1273', '1274', 'FizzBuzz', '1276', '1277', 'Fizz', '1279', 'Buzz', 'Fizz', '1282', '1283', 'Fizz', 'Buzz', '1286', 'Fizz', '1288', '1289', 'FizzBuzz', '1291', '1292', 'Fizz', '1294', 'Buzz', 'Fizz', '1297', '1298', 'Fizz', 'Buzz', '1301', 'Fizz', '1303', '1304', 'FizzBuzz', '1306', '1307', 'Fizz', '1309', 'Buzz', 'Fizz', '1312', '1313', 'Fizz', 'Buzz', '1316', 'Fizz', '1318', '1319', 'FizzBuzz', '1321', '1322', 'Fizz', '1324', 'Buzz', 'Fizz', '1327', '1328', 'Fizz', 'Buzz', '1331', 'Fizz', '1333', '1334', 'FizzBuzz', '1336', '1337', 'Fizz', '1339', 'Buzz', 'Fizz', '1342', '1343', 'Fizz', 'Buzz', '1346', 'Fizz', '1348', '1349', 'FizzBuzz', '1351', '1352', 'Fizz', '1354', 'Buzz', 'Fizz', '1357', '1358', 'Fizz', 'Buzz', '1361', 'Fizz', '1363', '1364', 'FizzBuzz', '1366', '1367', 'Fizz', '1369', 'Buzz', 'Fizz', '1372', '1373', 'Fizz', 'Buzz', '1376', 'Fizz', '1378', '1379', 'FizzBuzz', '1381', '1382', 'Fizz', '1384', 'Buzz', 'Fizz', '1387', '1388', 'Fizz', 'Buzz', '1391', 'Fizz', '1393', '1394', 'FizzBuzz', '1396', '1397', 'Fizz', '1399', 'Buzz', 'Fizz', '1402', '1403', 'Fizz', 'Buzz', '1406', 'Fizz', '1408', '1409', 'FizzBuzz', '1411', '1412', 'Fizz', '1414', 'Buzz', 'Fizz', '1417', '1418', 'Fizz', 'Buzz', '1421', 'Fizz', '1423', '1424', 'FizzBuzz', '1426', '1427', 'Fizz', '1429', 'Buzz', 'Fizz', '1432', '1433', 'Fizz', 'Buzz', '1436', 'Fizz', '1438', '1439', 'FizzBuzz', '1441', '1442', 'Fizz', '1444', 'Buzz', 'Fizz', '1447', '1448', 'Fizz', 'Buzz', '1451', 'Fizz', '1453', '1454', 'FizzBuzz', '1456', '1457', 'Fizz', '1459', 'Buzz', 'Fizz', '1462', '1463', 'Fizz', 'Buzz', '1466', 'Fizz', '1468', '1469', 'FizzBuzz', '1471', '1472', 'Fizz', '1474', 'Buzz', 'Fizz', '1477', '1478', 'Fizz', 'Buzz', '1481', 'Fizz', '1483', '1484', 'FizzBuzz', '1486', '1487', 'Fizz', '1489', 'Buzz', 'Fizz', '1492', '1493', 'Fizz', 'Buzz', '1496', 'Fizz', '1498', '1499', 'FizzBuzz', '1501', '1502', 'Fizz', '1504', 'Buzz', 'Fizz', '1507', '1508', 'Fizz', 'Buzz', '1511', 'Fizz', '1513', '1514', 'FizzBuzz', '1516', '1517', 'Fizz', '1519', 'Buzz', 'Fizz', '1522', '1523', 'Fizz', 'Buzz', '1526', 'Fizz', '1528', '1529', 'FizzBuzz', '1531', '1532', 'Fizz', '1534', 'Buzz', 'Fizz', '1537', '1538', 'Fizz', 'Buzz', '1541', 'Fizz', '1543', '1544', 'FizzBuzz', '1546', '1547', 'Fizz', '1549', 'Buzz', 'Fizz', '1552', '1553', 'Fizz', 'Buzz', '1556', 'Fizz', '1558', '1559', 'FizzBuzz', '1561', '1562', 'Fizz', '1564', 'Buzz', 'Fizz', '1567', '1568', 'Fizz', 'Buzz', '1571', 'Fizz', '1573', '1574', 'FizzBuzz', '1576', '1577', 'Fizz', '1579', 'Buzz', 'Fizz', '1582', '1583', 'Fizz', 'Buzz', '1586', 'Fizz', '1588', '1589', 'FizzBuzz', '1591', '1592', 'Fizz', '1594', 'Buzz', 'Fizz', '1597', '1598', 'Fizz', 'Buzz', '1601', 'Fizz', '1603', '1604', 'FizzBuzz', '1606', '1607', 'Fizz', '1609', 'Buzz', 'Fizz', '1612', '1613', 'Fizz', 'Buzz', '1616', 'Fizz', '1618', '1619', 'FizzBuzz', '1621', '1622', 'Fizz', '1624', 'Buzz', 'Fizz', '1627', '1628', 'Fizz', 'Buzz', '1631', 'Fizz', '1633', '1634', 'FizzBuzz', '1636', '1637', 'Fizz', '1639', 'Buzz', 'Fizz', '1642', '1643', 'Fizz', 'Buzz', '1646', 'Fizz', '1648', '1649', 'FizzBuzz', '1651', '1652', 'Fizz', '1654', 'Buzz', 'Fizz', '1657', '1658', 'Fizz', 'Buzz', '1661', 'Fizz', '1663', '1664', 'FizzBuzz', '1666', '1667', 'Fizz', '1669', 'Buzz', 'Fizz', '1672', '1673', 'Fizz', 'Buzz', '1676', 'Fizz', '1678', '1679', 'FizzBuzz', '1681', '1682', 'Fizz', '1684', 'Buzz', 'Fizz', '1687', '1688', 'Fizz', 'Buzz', '1691', 'Fizz', '1693', '1694', 'FizzBuzz', '1696', '1697', 'Fizz', '1699', 'Buzz', 'Fizz', '1702', '1703', 'Fizz', 'Buzz', '1706', 'Fizz', '1708', '1709', 'FizzBuzz', '1711', '1712', 'Fizz', '1714', 'Buzz', 'Fizz', '1717', '1718', 'Fizz', 'Buzz', '1721', 'Fizz', '1723', '1724', 'FizzBuzz', '1726', '1727', 'Fizz', '1729', 'Buzz', 'Fizz', '1732', '1733', 'Fizz', 'Buzz', '1736', 'Fizz', '1738', '1739', 'FizzBuzz', '1741', '1742', 'Fizz', '1744', 'Buzz', 'Fizz', '1747', '1748', 'Fizz', 'Buzz', '1751', 'Fizz', '1753', '1754', 'FizzBuzz', '1756', '1757', 'Fizz', '1759', 'Buzz', 'Fizz', '1762', '1763', 'Fizz', 'Buzz', '1766', 'Fizz', '1768', '1769', 'FizzBuzz', '1771', '1772', 'Fizz', '1774', 'Buzz', 'Fizz', '1777', '1778', 'Fizz', 'Buzz', '1781', 'Fizz', '1783', '1784', 'FizzBuzz', '1786', '1787', 'Fizz', '1789', 'Buzz', 'Fizz', '1792', '1793', 'Fizz', 'Buzz', '1796', 'Fizz', '1798', '1799', 'FizzBuzz', '1801', '1802', 'Fizz', '1804', 'Buzz', 'Fizz', '1807', '1808', 'Fizz', 'Buzz', '1811', 'Fizz', '1813', '1814', 'FizzBuzz', '1816', '1817', 'Fizz', '1819', 'Buzz', 'Fizz', '1822', '1823', 'Fizz', 'Buzz', '1826', 'Fizz', '1828', '1829', 'FizzBuzz', '1831', '1832', 'Fizz', '1834', 'Buzz', 'Fizz', '1837', '1838', 'Fizz', 'Buzz', '1841', 'Fizz', '1843', '1844', 'FizzBuzz', '1846', '1847', 'Fizz', '1849', 'Buzz', 'Fizz', '1852', '1853', 'Fizz', 'Buzz', '1856', 'Fizz', '1858', '1859', 'FizzBuzz', '1861', '1862', 'Fizz', '1864', 'Buzz', 'Fizz', '1867', '1868', 'Fizz', 'Buzz', '1871', 'Fizz', '1873', '1874', 'FizzBuzz', '1876', '1877', 'Fizz', '1879', 'Buzz', 'Fizz', '1882', '1883', 'Fizz', 'Buzz', '1886', 'Fizz', '1888', '1889', 'FizzBuzz', '1891', '1892', 'Fizz', '1894', 'Buzz', 'Fizz', '1897', '1898', 'Fizz', 'Buzz', '1901', 'Fizz', '1903', '1904', 'FizzBuzz', '1906', '1907', 'Fizz', '1909', 'Buzz', 'Fizz', '1912', '1913', 'Fizz', 'Buzz', '1916', 'Fizz', '1918', '1919', 'FizzBuzz', '1921', '1922', 'Fizz', '1924', 'Buzz', 'Fizz', '1927', '1928', 'Fizz', 'Buzz', '1931', 'Fizz', '1933', '1934', 'FizzBuzz', '1936', '1937', 'Fizz', '1939', 'Buzz', 'Fizz', '1942', '1943', 'Fizz', 'Buzz', '1946', 'Fizz', '1948', '1949', 'FizzBuzz', '1951', '1952', 'Fizz', '1954', 'Buzz', 'Fizz', '1957', '1958', 'Fizz', 'Buzz', '1961', 'Fizz', '1963', '1964', 'FizzBuzz', '1966', '1967', 'Fizz', '1969', 'Buzz', 'Fizz', '1972', '1973', 'Fizz', 'Buzz', '1976', 'Fizz', '1978', '1979', 'FizzBuzz', '1981', '1982', 'Fizz', '1984', 'Buzz', 'Fizz', '1987', '1988', 'Fizz', 'Buzz', '1991', 'Fizz', '1993', '1994', 'FizzBuzz', '1996', '1997', 'Fizz', '1999', 'Buzz', 'Fizz', '2002', '2003', 'Fizz', 'Buzz', '2006', 'Fizz', '2008', '2009', 'FizzBuzz', '2011', '2012', 'Fizz', '2014', 'Buzz', 'Fizz', '2017', '2018', 'Fizz', 'Buzz', '2021', 'Fizz', '2023', '2024', 'FizzBuzz', '2026', '2027', 'Fizz', '2029', 'Buzz', 'Fizz', '2032', '2033', 'Fizz', 'Buzz', '2036', 'Fizz', '2038', '2039', 'FizzBuzz', '2041', '2042', 'Fizz', '2044', 'Buzz', 'Fizz', '2047', '2048']\n assert candidate(n = 999) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz']\n assert candidate(n = 35) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz']\n assert candidate(n = 347) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347']\n assert candidate(n = 75) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz']\n assert candidate(n = 256) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256']\n assert candidate(n = 20) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz']\n assert candidate(n = 81) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz']\n assert candidate(n = 150) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz']\n assert candidate(n = 2500) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz', '751', '752', 'Fizz', '754', 'Buzz', 'Fizz', '757', '758', 'Fizz', 'Buzz', '761', 'Fizz', '763', '764', 'FizzBuzz', '766', '767', 'Fizz', '769', 'Buzz', 'Fizz', '772', '773', 'Fizz', 'Buzz', '776', 'Fizz', '778', '779', 'FizzBuzz', '781', '782', 'Fizz', '784', 'Buzz', 'Fizz', '787', '788', 'Fizz', 'Buzz', '791', 'Fizz', '793', '794', 'FizzBuzz', '796', '797', 'Fizz', '799', 'Buzz', 'Fizz', '802', '803', 'Fizz', 'Buzz', '806', 'Fizz', '808', '809', 'FizzBuzz', '811', '812', 'Fizz', '814', 'Buzz', 'Fizz', '817', '818', 'Fizz', 'Buzz', '821', 'Fizz', '823', '824', 'FizzBuzz', '826', '827', 'Fizz', '829', 'Buzz', 'Fizz', '832', '833', 'Fizz', 'Buzz', '836', 'Fizz', '838', '839', 'FizzBuzz', '841', '842', 'Fizz', '844', 'Buzz', 'Fizz', '847', '848', 'Fizz', 'Buzz', '851', 'Fizz', '853', '854', 'FizzBuzz', '856', '857', 'Fizz', '859', 'Buzz', 'Fizz', '862', '863', 'Fizz', 'Buzz', '866', 'Fizz', '868', '869', 'FizzBuzz', '871', '872', 'Fizz', '874', 'Buzz', 'Fizz', '877', '878', 'Fizz', 'Buzz', '881', 'Fizz', '883', '884', 'FizzBuzz', '886', '887', 'Fizz', '889', 'Buzz', 'Fizz', '892', '893', 'Fizz', 'Buzz', '896', 'Fizz', '898', '899', 'FizzBuzz', '901', '902', 'Fizz', '904', 'Buzz', 'Fizz', '907', '908', 'Fizz', 'Buzz', '911', 'Fizz', '913', '914', 'FizzBuzz', '916', '917', 'Fizz', '919', 'Buzz', 'Fizz', '922', '923', 'Fizz', 'Buzz', '926', 'Fizz', '928', '929', 'FizzBuzz', '931', '932', 'Fizz', '934', 'Buzz', 'Fizz', '937', '938', 'Fizz', 'Buzz', '941', 'Fizz', '943', '944', 'FizzBuzz', '946', '947', 'Fizz', '949', 'Buzz', 'Fizz', '952', '953', 'Fizz', 'Buzz', '956', 'Fizz', '958', '959', 'FizzBuzz', '961', '962', 'Fizz', '964', 'Buzz', 'Fizz', '967', '968', 'Fizz', 'Buzz', '971', 'Fizz', '973', '974', 'FizzBuzz', '976', '977', 'Fizz', '979', 'Buzz', 'Fizz', '982', '983', 'Fizz', 'Buzz', '986', 'Fizz', '988', '989', 'FizzBuzz', '991', '992', 'Fizz', '994', 'Buzz', 'Fizz', '997', '998', 'Fizz', 'Buzz', '1001', 'Fizz', '1003', '1004', 'FizzBuzz', '1006', '1007', 'Fizz', '1009', 'Buzz', 'Fizz', '1012', '1013', 'Fizz', 'Buzz', '1016', 'Fizz', '1018', '1019', 'FizzBuzz', '1021', '1022', 'Fizz', '1024', 'Buzz', 'Fizz', '1027', '1028', 'Fizz', 'Buzz', '1031', 'Fizz', '1033', '1034', 'FizzBuzz', '1036', '1037', 'Fizz', '1039', 'Buzz', 'Fizz', '1042', '1043', 'Fizz', 'Buzz', '1046', 'Fizz', '1048', '1049', 'FizzBuzz', '1051', '1052', 'Fizz', '1054', 'Buzz', 'Fizz', '1057', '1058', 'Fizz', 'Buzz', '1061', 'Fizz', '1063', '1064', 'FizzBuzz', '1066', '1067', 'Fizz', '1069', 'Buzz', 'Fizz', '1072', '1073', 'Fizz', 'Buzz', '1076', 'Fizz', '1078', '1079', 'FizzBuzz', '1081', '1082', 'Fizz', '1084', 'Buzz', 'Fizz', '1087', '1088', 'Fizz', 'Buzz', '1091', 'Fizz', '1093', '1094', 'FizzBuzz', '1096', '1097', 'Fizz', '1099', 'Buzz', 'Fizz', '1102', '1103', 'Fizz', 'Buzz', '1106', 'Fizz', '1108', '1109', 'FizzBuzz', '1111', '1112', 'Fizz', '1114', 'Buzz', 'Fizz', '1117', '1118', 'Fizz', 'Buzz', '1121', 'Fizz', '1123', '1124', 'FizzBuzz', '1126', '1127', 'Fizz', '1129', 'Buzz', 'Fizz', '1132', '1133', 'Fizz', 'Buzz', '1136', 'Fizz', '1138', '1139', 'FizzBuzz', '1141', '1142', 'Fizz', '1144', 'Buzz', 'Fizz', '1147', '1148', 'Fizz', 'Buzz', '1151', 'Fizz', '1153', '1154', 'FizzBuzz', '1156', '1157', 'Fizz', '1159', 'Buzz', 'Fizz', '1162', '1163', 'Fizz', 'Buzz', '1166', 'Fizz', '1168', '1169', 'FizzBuzz', '1171', '1172', 'Fizz', '1174', 'Buzz', 'Fizz', '1177', '1178', 'Fizz', 'Buzz', '1181', 'Fizz', '1183', '1184', 'FizzBuzz', '1186', '1187', 'Fizz', '1189', 'Buzz', 'Fizz', '1192', '1193', 'Fizz', 'Buzz', '1196', 'Fizz', '1198', '1199', 'FizzBuzz', '1201', '1202', 'Fizz', '1204', 'Buzz', 'Fizz', '1207', '1208', 'Fizz', 'Buzz', '1211', 'Fizz', '1213', '1214', 'FizzBuzz', '1216', '1217', 'Fizz', '1219', 'Buzz', 'Fizz', '1222', '1223', 'Fizz', 'Buzz', '1226', 'Fizz', '1228', '1229', 'FizzBuzz', '1231', '1232', 'Fizz', '1234', 'Buzz', 'Fizz', '1237', '1238', 'Fizz', 'Buzz', '1241', 'Fizz', '1243', '1244', 'FizzBuzz', '1246', '1247', 'Fizz', '1249', 'Buzz', 'Fizz', '1252', '1253', 'Fizz', 'Buzz', '1256', 'Fizz', '1258', '1259', 'FizzBuzz', '1261', '1262', 'Fizz', '1264', 'Buzz', 'Fizz', '1267', '1268', 'Fizz', 'Buzz', '1271', 'Fizz', '1273', '1274', 'FizzBuzz', '1276', '1277', 'Fizz', '1279', 'Buzz', 'Fizz', '1282', '1283', 'Fizz', 'Buzz', '1286', 'Fizz', '1288', '1289', 'FizzBuzz', '1291', '1292', 'Fizz', '1294', 'Buzz', 'Fizz', '1297', '1298', 'Fizz', 'Buzz', '1301', 'Fizz', '1303', '1304', 'FizzBuzz', '1306', '1307', 'Fizz', '1309', 'Buzz', 'Fizz', '1312', '1313', 'Fizz', 'Buzz', '1316', 'Fizz', '1318', '1319', 'FizzBuzz', '1321', '1322', 'Fizz', '1324', 'Buzz', 'Fizz', '1327', '1328', 'Fizz', 'Buzz', '1331', 'Fizz', '1333', '1334', 'FizzBuzz', '1336', '1337', 'Fizz', '1339', 'Buzz', 'Fizz', '1342', '1343', 'Fizz', 'Buzz', '1346', 'Fizz', '1348', '1349', 'FizzBuzz', '1351', '1352', 'Fizz', '1354', 'Buzz', 'Fizz', '1357', '1358', 'Fizz', 'Buzz', '1361', 'Fizz', '1363', '1364', 'FizzBuzz', '1366', '1367', 'Fizz', '1369', 'Buzz', 'Fizz', '1372', '1373', 'Fizz', 'Buzz', '1376', 'Fizz', '1378', '1379', 'FizzBuzz', '1381', '1382', 'Fizz', '1384', 'Buzz', 'Fizz', '1387', '1388', 'Fizz', 'Buzz', '1391', 'Fizz', '1393', '1394', 'FizzBuzz', '1396', '1397', 'Fizz', '1399', 'Buzz', 'Fizz', '1402', '1403', 'Fizz', 'Buzz', '1406', 'Fizz', '1408', '1409', 'FizzBuzz', '1411', '1412', 'Fizz', '1414', 'Buzz', 'Fizz', '1417', '1418', 'Fizz', 'Buzz', '1421', 'Fizz', '1423', '1424', 'FizzBuzz', '1426', '1427', 'Fizz', '1429', 'Buzz', 'Fizz', '1432', '1433', 'Fizz', 'Buzz', '1436', 'Fizz', '1438', '1439', 'FizzBuzz', '1441', '1442', 'Fizz', '1444', 'Buzz', 'Fizz', '1447', '1448', 'Fizz', 'Buzz', '1451', 'Fizz', '1453', '1454', 'FizzBuzz', '1456', '1457', 'Fizz', '1459', 'Buzz', 'Fizz', '1462', '1463', 'Fizz', 'Buzz', '1466', 'Fizz', '1468', '1469', 'FizzBuzz', '1471', '1472', 'Fizz', '1474', 'Buzz', 'Fizz', '1477', '1478', 'Fizz', 'Buzz', '1481', 'Fizz', '1483', '1484', 'FizzBuzz', '1486', '1487', 'Fizz', '1489', 'Buzz', 'Fizz', '1492', '1493', 'Fizz', 'Buzz', '1496', 'Fizz', '1498', '1499', 'FizzBuzz', '1501', '1502', 'Fizz', '1504', 'Buzz', 'Fizz', '1507', '1508', 'Fizz', 'Buzz', '1511', 'Fizz', '1513', '1514', 'FizzBuzz', '1516', '1517', 'Fizz', '1519', 'Buzz', 'Fizz', '1522', '1523', 'Fizz', 'Buzz', '1526', 'Fizz', '1528', '1529', 'FizzBuzz', '1531', '1532', 'Fizz', '1534', 'Buzz', 'Fizz', '1537', '1538', 'Fizz', 'Buzz', '1541', 'Fizz', '1543', '1544', 'FizzBuzz', '1546', '1547', 'Fizz', '1549', 'Buzz', 'Fizz', '1552', '1553', 'Fizz', 'Buzz', '1556', 'Fizz', '1558', '1559', 'FizzBuzz', '1561', '1562', 'Fizz', '1564', 'Buzz', 'Fizz', '1567', '1568', 'Fizz', 'Buzz', '1571', 'Fizz', '1573', '1574', 'FizzBuzz', '1576', '1577', 'Fizz', '1579', 'Buzz', 'Fizz', '1582', '1583', 'Fizz', 'Buzz', '1586', 'Fizz', '1588', '1589', 'FizzBuzz', '1591', '1592', 'Fizz', '1594', 'Buzz', 'Fizz', '1597', '1598', 'Fizz', 'Buzz', '1601', 'Fizz', '1603', '1604', 'FizzBuzz', '1606', '1607', 'Fizz', '1609', 'Buzz', 'Fizz', '1612', '1613', 'Fizz', 'Buzz', '1616', 'Fizz', '1618', '1619', 'FizzBuzz', '1621', '1622', 'Fizz', '1624', 'Buzz', 'Fizz', '1627', '1628', 'Fizz', 'Buzz', '1631', 'Fizz', '1633', '1634', 'FizzBuzz', '1636', '1637', 'Fizz', '1639', 'Buzz', 'Fizz', '1642', '1643', 'Fizz', 'Buzz', '1646', 'Fizz', '1648', '1649', 'FizzBuzz', '1651', '1652', 'Fizz', '1654', 'Buzz', 'Fizz', '1657', '1658', 'Fizz', 'Buzz', '1661', 'Fizz', '1663', '1664', 'FizzBuzz', '1666', '1667', 'Fizz', '1669', 'Buzz', 'Fizz', '1672', '1673', 'Fizz', 'Buzz', '1676', 'Fizz', '1678', '1679', 'FizzBuzz', '1681', '1682', 'Fizz', '1684', 'Buzz', 'Fizz', '1687', '1688', 'Fizz', 'Buzz', '1691', 'Fizz', '1693', '1694', 'FizzBuzz', '1696', '1697', 'Fizz', '1699', 'Buzz', 'Fizz', '1702', '1703', 'Fizz', 'Buzz', '1706', 'Fizz', '1708', '1709', 'FizzBuzz', '1711', '1712', 'Fizz', '1714', 'Buzz', 'Fizz', '1717', '1718', 'Fizz', 'Buzz', '1721', 'Fizz', '1723', '1724', 'FizzBuzz', '1726', '1727', 'Fizz', '1729', 'Buzz', 'Fizz', '1732', '1733', 'Fizz', 'Buzz', '1736', 'Fizz', '1738', '1739', 'FizzBuzz', '1741', '1742', 'Fizz', '1744', 'Buzz', 'Fizz', '1747', '1748', 'Fizz', 'Buzz', '1751', 'Fizz', '1753', '1754', 'FizzBuzz', '1756', '1757', 'Fizz', '1759', 'Buzz', 'Fizz', '1762', '1763', 'Fizz', 'Buzz', '1766', 'Fizz', '1768', '1769', 'FizzBuzz', '1771', '1772', 'Fizz', '1774', 'Buzz', 'Fizz', '1777', '1778', 'Fizz', 'Buzz', '1781', 'Fizz', '1783', '1784', 'FizzBuzz', '1786', '1787', 'Fizz', '1789', 'Buzz', 'Fizz', '1792', '1793', 'Fizz', 'Buzz', '1796', 'Fizz', '1798', '1799', 'FizzBuzz', '1801', '1802', 'Fizz', '1804', 'Buzz', 'Fizz', '1807', '1808', 'Fizz', 'Buzz', '1811', 'Fizz', '1813', '1814', 'FizzBuzz', '1816', '1817', 'Fizz', '1819', 'Buzz', 'Fizz', '1822', '1823', 'Fizz', 'Buzz', '1826', 'Fizz', '1828', '1829', 'FizzBuzz', '1831', '1832', 'Fizz', '1834', 'Buzz', 'Fizz', '1837', '1838', 'Fizz', 'Buzz', '1841', 'Fizz', '1843', '1844', 'FizzBuzz', '1846', '1847', 'Fizz', '1849', 'Buzz', 'Fizz', '1852', '1853', 'Fizz', 'Buzz', '1856', 'Fizz', '1858', '1859', 'FizzBuzz', '1861', '1862', 'Fizz', '1864', 'Buzz', 'Fizz', '1867', '1868', 'Fizz', 'Buzz', '1871', 'Fizz', '1873', '1874', 'FizzBuzz', '1876', '1877', 'Fizz', '1879', 'Buzz', 'Fizz', '1882', '1883', 'Fizz', 'Buzz', '1886', 'Fizz', '1888', '1889', 'FizzBuzz', '1891', '1892', 'Fizz', '1894', 'Buzz', 'Fizz', '1897', '1898', 'Fizz', 'Buzz', '1901', 'Fizz', '1903', '1904', 'FizzBuzz', '1906', '1907', 'Fizz', '1909', 'Buzz', 'Fizz', '1912', '1913', 'Fizz', 'Buzz', '1916', 'Fizz', '1918', '1919', 'FizzBuzz', '1921', '1922', 'Fizz', '1924', 'Buzz', 'Fizz', '1927', '1928', 'Fizz', 'Buzz', '1931', 'Fizz', '1933', '1934', 'FizzBuzz', '1936', '1937', 'Fizz', '1939', 'Buzz', 'Fizz', '1942', '1943', 'Fizz', 'Buzz', '1946', 'Fizz', '1948', '1949', 'FizzBuzz', '1951', '1952', 'Fizz', '1954', 'Buzz', 'Fizz', '1957', '1958', 'Fizz', 'Buzz', '1961', 'Fizz', '1963', '1964', 'FizzBuzz', '1966', '1967', 'Fizz', '1969', 'Buzz', 'Fizz', '1972', '1973', 'Fizz', 'Buzz', '1976', 'Fizz', '1978', '1979', 'FizzBuzz', '1981', '1982', 'Fizz', '1984', 'Buzz', 'Fizz', '1987', '1988', 'Fizz', 'Buzz', '1991', 'Fizz', '1993', '1994', 'FizzBuzz', '1996', '1997', 'Fizz', '1999', 'Buzz', 'Fizz', '2002', '2003', 'Fizz', 'Buzz', '2006', 'Fizz', '2008', '2009', 'FizzBuzz', '2011', '2012', 'Fizz', '2014', 'Buzz', 'Fizz', '2017', '2018', 'Fizz', 'Buzz', '2021', 'Fizz', '2023', '2024', 'FizzBuzz', '2026', '2027', 'Fizz', '2029', 'Buzz', 'Fizz', '2032', '2033', 'Fizz', 'Buzz', '2036', 'Fizz', '2038', '2039', 'FizzBuzz', '2041', '2042', 'Fizz', '2044', 'Buzz', 'Fizz', '2047', '2048', 'Fizz', 'Buzz', '2051', 'Fizz', '2053', '2054', 'FizzBuzz', '2056', '2057', 'Fizz', '2059', 'Buzz', 'Fizz', '2062', '2063', 'Fizz', 'Buzz', '2066', 'Fizz', '2068', '2069', 'FizzBuzz', '2071', '2072', 'Fizz', '2074', 'Buzz', 'Fizz', '2077', '2078', 'Fizz', 'Buzz', '2081', 'Fizz', '2083', '2084', 'FizzBuzz', '2086', '2087', 'Fizz', '2089', 'Buzz', 'Fizz', '2092', '2093', 'Fizz', 'Buzz', '2096', 'Fizz', '2098', '2099', 'FizzBuzz', '2101', '2102', 'Fizz', '2104', 'Buzz', 'Fizz', '2107', '2108', 'Fizz', 'Buzz', '2111', 'Fizz', '2113', '2114', 'FizzBuzz', '2116', '2117', 'Fizz', '2119', 'Buzz', 'Fizz', '2122', '2123', 'Fizz', 'Buzz', '2126', 'Fizz', '2128', '2129', 'FizzBuzz', '2131', '2132', 'Fizz', '2134', 'Buzz', 'Fizz', '2137', '2138', 'Fizz', 'Buzz', '2141', 'Fizz', '2143', '2144', 'FizzBuzz', '2146', '2147', 'Fizz', '2149', 'Buzz', 'Fizz', '2152', '2153', 'Fizz', 'Buzz', '2156', 'Fizz', '2158', '2159', 'FizzBuzz', '2161', '2162', 'Fizz', '2164', 'Buzz', 'Fizz', '2167', '2168', 'Fizz', 'Buzz', '2171', 'Fizz', '2173', '2174', 'FizzBuzz', '2176', '2177', 'Fizz', '2179', 'Buzz', 'Fizz', '2182', '2183', 'Fizz', 'Buzz', '2186', 'Fizz', '2188', '2189', 'FizzBuzz', '2191', '2192', 'Fizz', '2194', 'Buzz', 'Fizz', '2197', '2198', 'Fizz', 'Buzz', '2201', 'Fizz', '2203', '2204', 'FizzBuzz', '2206', '2207', 'Fizz', '2209', 'Buzz', 'Fizz', '2212', '2213', 'Fizz', 'Buzz', '2216', 'Fizz', '2218', '2219', 'FizzBuzz', '2221', '2222', 'Fizz', '2224', 'Buzz', 'Fizz', '2227', '2228', 'Fizz', 'Buzz', '2231', 'Fizz', '2233', '2234', 'FizzBuzz', '2236', '2237', 'Fizz', '2239', 'Buzz', 'Fizz', '2242', '2243', 'Fizz', 'Buzz', '2246', 'Fizz', '2248', '2249', 'FizzBuzz', '2251', '2252', 'Fizz', '2254', 'Buzz', 'Fizz', '2257', '2258', 'Fizz', 'Buzz', '2261', 'Fizz', '2263', '2264', 'FizzBuzz', '2266', '2267', 'Fizz', '2269', 'Buzz', 'Fizz', '2272', '2273', 'Fizz', 'Buzz', '2276', 'Fizz', '2278', '2279', 'FizzBuzz', '2281', '2282', 'Fizz', '2284', 'Buzz', 'Fizz', '2287', '2288', 'Fizz', 'Buzz', '2291', 'Fizz', '2293', '2294', 'FizzBuzz', '2296', '2297', 'Fizz', '2299', 'Buzz', 'Fizz', '2302', '2303', 'Fizz', 'Buzz', '2306', 'Fizz', '2308', '2309', 'FizzBuzz', '2311', '2312', 'Fizz', '2314', 'Buzz', 'Fizz', '2317', '2318', 'Fizz', 'Buzz', '2321', 'Fizz', '2323', '2324', 'FizzBuzz', '2326', '2327', 'Fizz', '2329', 'Buzz', 'Fizz', '2332', '2333', 'Fizz', 'Buzz', '2336', 'Fizz', '2338', '2339', 'FizzBuzz', '2341', '2342', 'Fizz', '2344', 'Buzz', 'Fizz', '2347', '2348', 'Fizz', 'Buzz', '2351', 'Fizz', '2353', '2354', 'FizzBuzz', '2356', '2357', 'Fizz', '2359', 'Buzz', 'Fizz', '2362', '2363', 'Fizz', 'Buzz', '2366', 'Fizz', '2368', '2369', 'FizzBuzz', '2371', '2372', 'Fizz', '2374', 'Buzz', 'Fizz', '2377', '2378', 'Fizz', 'Buzz', '2381', 'Fizz', '2383', '2384', 'FizzBuzz', '2386', '2387', 'Fizz', '2389', 'Buzz', 'Fizz', '2392', '2393', 'Fizz', 'Buzz', '2396', 'Fizz', '2398', '2399', 'FizzBuzz', '2401', '2402', 'Fizz', '2404', 'Buzz', 'Fizz', '2407', '2408', 'Fizz', 'Buzz', '2411', 'Fizz', '2413', '2414', 'FizzBuzz', '2416', '2417', 'Fizz', '2419', 'Buzz', 'Fizz', '2422', '2423', 'Fizz', 'Buzz', '2426', 'Fizz', '2428', '2429', 'FizzBuzz', '2431', '2432', 'Fizz', '2434', 'Buzz', 'Fizz', '2437', '2438', 'Fizz', 'Buzz', '2441', 'Fizz', '2443', '2444', 'FizzBuzz', '2446', '2447', 'Fizz', '2449', 'Buzz', 'Fizz', '2452', '2453', 'Fizz', 'Buzz', '2456', 'Fizz', '2458', '2459', 'FizzBuzz', '2461', '2462', 'Fizz', '2464', 'Buzz', 'Fizz', '2467', '2468', 'Fizz', 'Buzz', '2471', 'Fizz', '2473', '2474', 'FizzBuzz', '2476', '2477', 'Fizz', '2479', 'Buzz', 'Fizz', '2482', '2483', 'Fizz', 'Buzz', '2486', 'Fizz', '2488', '2489', 'FizzBuzz', '2491', '2492', 'Fizz', '2494', 'Buzz', 'Fizz', '2497', '2498', 'Fizz', 'Buzz']\n assert candidate(n = 200) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz']\n assert candidate(n = 83) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83']\n assert candidate(n = 6) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz']\n assert candidate(n = 120) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz']\n assert candidate(n = 750) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz', '106', '107', 'Fizz', '109', 'Buzz', 'Fizz', '112', '113', 'Fizz', 'Buzz', '116', 'Fizz', '118', '119', 'FizzBuzz', '121', '122', 'Fizz', '124', 'Buzz', 'Fizz', '127', '128', 'Fizz', 'Buzz', '131', 'Fizz', '133', '134', 'FizzBuzz', '136', '137', 'Fizz', '139', 'Buzz', 'Fizz', '142', '143', 'Fizz', 'Buzz', '146', 'Fizz', '148', '149', 'FizzBuzz', '151', '152', 'Fizz', '154', 'Buzz', 'Fizz', '157', '158', 'Fizz', 'Buzz', '161', 'Fizz', '163', '164', 'FizzBuzz', '166', '167', 'Fizz', '169', 'Buzz', 'Fizz', '172', '173', 'Fizz', 'Buzz', '176', 'Fizz', '178', '179', 'FizzBuzz', '181', '182', 'Fizz', '184', 'Buzz', 'Fizz', '187', '188', 'Fizz', 'Buzz', '191', 'Fizz', '193', '194', 'FizzBuzz', '196', '197', 'Fizz', '199', 'Buzz', 'Fizz', '202', '203', 'Fizz', 'Buzz', '206', 'Fizz', '208', '209', 'FizzBuzz', '211', '212', 'Fizz', '214', 'Buzz', 'Fizz', '217', '218', 'Fizz', 'Buzz', '221', 'Fizz', '223', '224', 'FizzBuzz', '226', '227', 'Fizz', '229', 'Buzz', 'Fizz', '232', '233', 'Fizz', 'Buzz', '236', 'Fizz', '238', '239', 'FizzBuzz', '241', '242', 'Fizz', '244', 'Buzz', 'Fizz', '247', '248', 'Fizz', 'Buzz', '251', 'Fizz', '253', '254', 'FizzBuzz', '256', '257', 'Fizz', '259', 'Buzz', 'Fizz', '262', '263', 'Fizz', 'Buzz', '266', 'Fizz', '268', '269', 'FizzBuzz', '271', '272', 'Fizz', '274', 'Buzz', 'Fizz', '277', '278', 'Fizz', 'Buzz', '281', 'Fizz', '283', '284', 'FizzBuzz', '286', '287', 'Fizz', '289', 'Buzz', 'Fizz', '292', '293', 'Fizz', 'Buzz', '296', 'Fizz', '298', '299', 'FizzBuzz', '301', '302', 'Fizz', '304', 'Buzz', 'Fizz', '307', '308', 'Fizz', 'Buzz', '311', 'Fizz', '313', '314', 'FizzBuzz', '316', '317', 'Fizz', '319', 'Buzz', 'Fizz', '322', '323', 'Fizz', 'Buzz', '326', 'Fizz', '328', '329', 'FizzBuzz', '331', '332', 'Fizz', '334', 'Buzz', 'Fizz', '337', '338', 'Fizz', 'Buzz', '341', 'Fizz', '343', '344', 'FizzBuzz', '346', '347', 'Fizz', '349', 'Buzz', 'Fizz', '352', '353', 'Fizz', 'Buzz', '356', 'Fizz', '358', '359', 'FizzBuzz', '361', '362', 'Fizz', '364', 'Buzz', 'Fizz', '367', '368', 'Fizz', 'Buzz', '371', 'Fizz', '373', '374', 'FizzBuzz', '376', '377', 'Fizz', '379', 'Buzz', 'Fizz', '382', '383', 'Fizz', 'Buzz', '386', 'Fizz', '388', '389', 'FizzBuzz', '391', '392', 'Fizz', '394', 'Buzz', 'Fizz', '397', '398', 'Fizz', 'Buzz', '401', 'Fizz', '403', '404', 'FizzBuzz', '406', '407', 'Fizz', '409', 'Buzz', 'Fizz', '412', '413', 'Fizz', 'Buzz', '416', 'Fizz', '418', '419', 'FizzBuzz', '421', '422', 'Fizz', '424', 'Buzz', 'Fizz', '427', '428', 'Fizz', 'Buzz', '431', 'Fizz', '433', '434', 'FizzBuzz', '436', '437', 'Fizz', '439', 'Buzz', 'Fizz', '442', '443', 'Fizz', 'Buzz', '446', 'Fizz', '448', '449', 'FizzBuzz', '451', '452', 'Fizz', '454', 'Buzz', 'Fizz', '457', '458', 'Fizz', 'Buzz', '461', 'Fizz', '463', '464', 'FizzBuzz', '466', '467', 'Fizz', '469', 'Buzz', 'Fizz', '472', '473', 'Fizz', 'Buzz', '476', 'Fizz', '478', '479', 'FizzBuzz', '481', '482', 'Fizz', '484', 'Buzz', 'Fizz', '487', '488', 'Fizz', 'Buzz', '491', 'Fizz', '493', '494', 'FizzBuzz', '496', '497', 'Fizz', '499', 'Buzz', 'Fizz', '502', '503', 'Fizz', 'Buzz', '506', 'Fizz', '508', '509', 'FizzBuzz', '511', '512', 'Fizz', '514', 'Buzz', 'Fizz', '517', '518', 'Fizz', 'Buzz', '521', 'Fizz', '523', '524', 'FizzBuzz', '526', '527', 'Fizz', '529', 'Buzz', 'Fizz', '532', '533', 'Fizz', 'Buzz', '536', 'Fizz', '538', '539', 'FizzBuzz', '541', '542', 'Fizz', '544', 'Buzz', 'Fizz', '547', '548', 'Fizz', 'Buzz', '551', 'Fizz', '553', '554', 'FizzBuzz', '556', '557', 'Fizz', '559', 'Buzz', 'Fizz', '562', '563', 'Fizz', 'Buzz', '566', 'Fizz', '568', '569', 'FizzBuzz', '571', '572', 'Fizz', '574', 'Buzz', 'Fizz', '577', '578', 'Fizz', 'Buzz', '581', 'Fizz', '583', '584', 'FizzBuzz', '586', '587', 'Fizz', '589', 'Buzz', 'Fizz', '592', '593', 'Fizz', 'Buzz', '596', 'Fizz', '598', '599', 'FizzBuzz', '601', '602', 'Fizz', '604', 'Buzz', 'Fizz', '607', '608', 'Fizz', 'Buzz', '611', 'Fizz', '613', '614', 'FizzBuzz', '616', '617', 'Fizz', '619', 'Buzz', 'Fizz', '622', '623', 'Fizz', 'Buzz', '626', 'Fizz', '628', '629', 'FizzBuzz', '631', '632', 'Fizz', '634', 'Buzz', 'Fizz', '637', '638', 'Fizz', 'Buzz', '641', 'Fizz', '643', '644', 'FizzBuzz', '646', '647', 'Fizz', '649', 'Buzz', 'Fizz', '652', '653', 'Fizz', 'Buzz', '656', 'Fizz', '658', '659', 'FizzBuzz', '661', '662', 'Fizz', '664', 'Buzz', 'Fizz', '667', '668', 'Fizz', 'Buzz', '671', 'Fizz', '673', '674', 'FizzBuzz', '676', '677', 'Fizz', '679', 'Buzz', 'Fizz', '682', '683', 'Fizz', 'Buzz', '686', 'Fizz', '688', '689', 'FizzBuzz', '691', '692', 'Fizz', '694', 'Buzz', 'Fizz', '697', '698', 'Fizz', 'Buzz', '701', 'Fizz', '703', '704', 'FizzBuzz', '706', '707', 'Fizz', '709', 'Buzz', 'Fizz', '712', '713', 'Fizz', 'Buzz', '716', 'Fizz', '718', '719', 'FizzBuzz', '721', '722', 'Fizz', '724', 'Buzz', 'Fizz', '727', '728', 'Fizz', 'Buzz', '731', 'Fizz', '733', '734', 'FizzBuzz', '736', '737', 'Fizz', '739', 'Buzz', 'Fizz', '742', '743', 'Fizz', 'Buzz', '746', 'Fizz', '748', '749', 'FizzBuzz']\n assert candidate(n = 105) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz', '56', 'Fizz', '58', '59', 'FizzBuzz', '61', '62', 'Fizz', '64', 'Buzz', 'Fizz', '67', '68', 'Fizz', 'Buzz', '71', 'Fizz', '73', '74', 'FizzBuzz', '76', '77', 'Fizz', '79', 'Buzz', 'Fizz', '82', '83', 'Fizz', 'Buzz', '86', 'Fizz', '88', '89', 'FizzBuzz', '91', '92', 'Fizz', '94', 'Buzz', 'Fizz', '97', '98', 'Fizz', 'Buzz', '101', 'Fizz', '103', '104', 'FizzBuzz']\n assert candidate(n = 55) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz', '26', 'Fizz', '28', '29', 'FizzBuzz', '31', '32', 'Fizz', '34', 'Buzz', 'Fizz', '37', '38', 'Fizz', 'Buzz', '41', 'Fizz', '43', '44', 'FizzBuzz', '46', '47', 'Fizz', '49', 'Buzz', 'Fizz', '52', '53', 'Fizz', 'Buzz']\n assert candidate(n = 10) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz']\n assert candidate(n = 25) == ['1', '2', 'Fizz', '4', 'Buzz', 'Fizz', '7', '8', 'Fizz', 'Buzz', '11', 'Fizz', '13', '14', 'FizzBuzz', '16', '17', 'Fizz', '19', 'Buzz', 'Fizz', '22', '23', 'Fizz', 'Buzz']\n", "comparison": "exact"}, "public_tests": ["3", "5", "15"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().fizzBuzz", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:28+00:00", "tests_total": 44, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def fizz_buzz(n)", "container": null, "callable": "fizz_buzz", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 413, "task_id": "arithmetic-slices", "difficulty": "Medium", "problem_description": "An integer array is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.\n\n- For example, [1,3,5,7,9], [7,7,7,7], and [3,-1,-5,-9] are arithmetic sequences.\n\nGiven an integer array nums, return the number of arithmetic subarrays of nums.\n\nA subarray is a contiguous subsequence of the array.\n\nExample 1:\n\nInput: nums = [1,2,3,4]\nOutput: 3\nExplanation: We have 3 arithmetic slices in nums: [1, 2, 3], [2, 3, 4] and [1,2,3,4] itself.\n\nExample 2:\n\nInput: nums = [1]\nOutput: 0\n\nConstraints:\n\n- 1 <= nums.length <= 5000\n- -1000 <= nums[i] <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 36\n assert candidate(nums = [1, 2, 4, 5, 6, 7]) == 3\n assert candidate(nums = [3, -1, -5, -9]) == 3\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 36\n assert candidate(nums = [1, 3, 5, 7, 9]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 36\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [10, 7, 4, 3, 2, 1]) == 4\n assert candidate(nums = [1, 2, 3, 4]) == 3\n assert candidate(nums = [7, 7, 7, 7]) == 3\n assert candidate(nums = [10, 7, 7, 7, 7, 7, 10]) == 6\n assert candidate(nums = [3, -1, -5, -9]) == 3\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 36\n assert candidate(nums = [2]) == 0\n assert candidate(nums = [5, 5, 5, 5, 5]) == 6\n assert candidate(nums = [1, 3, 5, 7, 9]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5]) == 6\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 28\n assert candidate(nums = [1, 2, 2, 3]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6]) == 6\n assert candidate(nums = [1, 2, 3, 5, 7, 9]) == 4\n assert candidate(nums = [1, 2]) == 0\n assert candidate(nums = [1, 2, 4, 5, 6, 7, 8]) == 6\n assert candidate(nums = [7, 7, 7, 7]) == 3\n assert candidate(nums = [1, 2, 3, 8, 9, 10]) == 2\n assert candidate(nums = [0, 1, 2, 3, 6, 9, 12, 15, 18, 21]) == 18\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 29\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == 21\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144]) == 1\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15]) == 16\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, -1]) == 25\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35]) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 7, 9, 11, 13, 15]) == 16\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 36\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 36\n assert candidate(nums = [1, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 45\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 0\n assert candidate(nums = [10, 5, 0, -5, -10, -15, -20]) == 15\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70]) == 78\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 171\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 29\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 72\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21]) == 28\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33]) == 45\n assert candidate(nums = [10, 5, 0, -5, -10, -15, -20, -25]) == 21\n assert candidate(nums = [10, 11, 12, 10, 11, 12, 14, 16, 18, 20]) == 8\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]) == 18\n assert candidate(nums = [1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 91\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 171\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5]) == 28\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 36\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 406\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50]) == 28\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]) == 406\n assert candidate(nums = [1, 2, 3, 4, 2, 4, 6, 8, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -8, -6, -4, -2]) == 60\n assert candidate(nums = [1, 3, 5, 7, 9, 12, 15, 18, 21, 24]) == 16\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23]) == 36\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 3, 2, 1, 2, 3, 4, 5, 6]) == 17\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 72\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 10\n assert candidate(nums = [10, 20, 30, 20, 10, 20, 30, 20, 10]) == 4\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 15\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 8]) == 16\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]) == 276\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17]) == 22\n assert candidate(nums = [1, 2, 3, 4, 2, 3, 4, 5, 3, 4, 5, 6]) == 9\n assert candidate(nums = [2, 4, 6, 8, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 42\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 91\n assert candidate(nums = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) == 1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 36\n assert candidate(nums = [100, 200, 300, 200, 100, 200, 300, 400]) == 5\n assert candidate(nums = [10, 20, 30, 40, 50, 40, 30, 20, 10, 0, -10]) == 21\n assert candidate(nums = [1, 2, 3, 4, 2, 4, 6, 8, 10, 12]) == 13\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 0\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 92\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 36\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 91\n assert candidate(nums = [1, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20]) == 1\n assert candidate(nums = [10, 20, 30, 40, 50, 40, 30, 20, 10, 0, -10, -20, -30]) == 34\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45]) == 0\n assert candidate(nums = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991]) == 36\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900]) == 28\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 91\n assert candidate(nums = [7, 7, 7, 7, 7, 8, 9, 10, 11, 12]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 141\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 36\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 0, -1, -2, -3]) == 21\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7]) == 46\n assert candidate(nums = [1, 2, 3, 4, 3, 3, 3, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 43\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 171\n assert candidate(nums = [1, 3, 5, 6, 8, 10, 12, 14, 16, 18]) == 16\n assert candidate(nums = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991]) == 36\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 812\n assert candidate(nums = [3, -1, -5, -9, -13, -17, -21, -25, -29, -33]) == 36\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 406\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 45\n assert candidate(nums = [-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 78\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22]) == 45\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 36\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 91\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 2, 3, 4, 5]) == 13\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 36\n assert candidate(nums = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 45\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 276\n assert candidate(nums = [10, 5, 0, -5, -10, -15, -20, -25]) == 21\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 36\n assert candidate(nums = [5, 5, 5, 4, 4, 4, 5, 5, 5, 6, 6, 6]) == 4\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80]) == 105\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6]) == 120\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17]) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 91\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 36\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 28\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == 21\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 171\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75]) == 91\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 91\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 36\n assert candidate(nums = [10, 20, 30, 40, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40]) == 42\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 91\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130]) == 66\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 171\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 5, 6, 7, 8, 9]) == 18\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]) == 55\n assert candidate(nums = [1, 2, 3, 4, 3, 4, 5, 6, 5, 6, 7, 8, 7, 8, 9, 10]) == 12\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28]) == 78\n assert candidate(nums = [1, 3, 5, 7, 9, 12, 15, 18, 21, 24]) == 16\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 78\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]) == 4\n assert candidate(nums = [1, 2, 3, 2, 1, 0, -1, -2, -3, -2, -1]) == 17\n assert candidate(nums = [-10, -5, 0, 5, 10, 15, 20, 25, 30, 35, 40]) == 45\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 9, 7, 5, 3, 1, -1, -3, -5, -7, -9]) == 55\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]) == 171\n assert candidate(nums = [5, 7, 9, 11, 13, 10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10]) == 51\n assert candidate(nums = [1, 2, 4, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 45\n assert candidate(nums = [1, 1, 1, 1, 2, 3, 4, 5, 5, 5, 5, 6, 7, 8, 9]) == 18\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 1770\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 171\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 4, 3, 2, 1, 0, -1, -2, -1, 0, 1, 2, 3]) == 30\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28]) == 36\n assert candidate(nums = [2, 5, 8, 11, 14, 17, 20, 23, 26, 29]) == 36\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 36\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18]) == 28\n assert candidate(nums = [3, 1, -1, -3, -5, -7, -9, -11]) == 21\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 36\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 36\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 36\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27]) == 55\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12]) == 17\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 45\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4]) == 75\n assert candidate(nums = [7, 7, 7, 8, 9, 10, 11, 12, 13, 14]) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 35\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4]) == 15\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8]) == 0\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 5]) == 12\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 153\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 7\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 903\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 36\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55]) == 1\n assert candidate(nums = [3, -3, -9, -15, -21, -27, -33, -39, -45, -51, -57, -63, -69, -75, -81]) == 91\n", "comparison": "exact"}, "public_tests": ["[1,2,3,4]", "[1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().numberOfArithmeticSlices", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:31+00:00", "tests_total": 171, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "dynamic-programming", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def number_of_arithmetic_slices(nums)", "container": null, "callable": "number_of_arithmetic_slices", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 414, "task_id": "third-maximum-number", "difficulty": "Easy", "problem_description": "You are given an integer array nums.\n\nReturn the third distinct maximum number in this array. If the third maximum does not exist, return the maximum number.\n\nExample 1:\n\nInput: nums = [3,2,1]\nOutput: 1\nExplanation:\nThe first distinct maximum is 3.\nThe second distinct maximum is 2.\nThe third distinct maximum is 1.\n\nExample 2:\n\nInput: nums = [1,2]\nOutput: 2\nExplanation:\nThe first distinct maximum is 2.\nThe second distinct maximum is 1.\nThe third distinct maximum does not exist, so the maximum (2) is returned instead.\n\nExample 3:\n\nInput: nums = [2,2,3,1]\nOutput: 1\nExplanation:\nThe first distinct maximum is 3.\nThe second distinct maximum is 2 (both 2's are counted together since they have the same value).\nThe third distinct maximum is 1.\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -2^31 <= nums[i] <= 2^31 - 1\n\nFollow up: Can you find an O(n) solution?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [10, 10, 10, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 3\n assert candidate(nums = [1, 2, -2147483648]) == -2147483648\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(nums = [1, 2, 2, 3, 3, 4]) == 2\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [2, 2, 3, 1]) == 1\n assert candidate(nums = [1000000000, 1000000000, 1000000000]) == 1000000000\n assert candidate(nums = [5, 5, 5, 5]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [-2147483648, 1, 2]) == -2147483648\n assert candidate(nums = [1, 2, 2, 5, 3, 5]) == 2\n assert candidate(nums = [5, 2, 4, 1, 3]) == 3\n assert candidate(nums = [2, 2, 3, 1, 4]) == 2\n assert candidate(nums = [3, 3, 3, 3, 2, 2, 1]) == 1\n assert candidate(nums = [3, 2, 1]) == 1\n assert candidate(nums = [2, 2, 3, 3, 3, 1, 1]) == 1\n assert candidate(nums = [5, 2, 2]) == 5\n assert candidate(nums = [1, 2, 2, 3, 4]) == 2\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1]) == 1000000000\n assert candidate(nums = [1, 2]) == 2\n assert candidate(nums = [2, 3, 1, 4, 5]) == 3\n assert candidate(nums = [5, 2, 4, 1, 3, 3, 2, 4, 5]) == 3\n assert candidate(nums = [1000000, 999999, 999998]) == 999998\n assert candidate(nums = [-1, -2, -3]) == -3\n assert candidate(nums = [2147483647, -2147483648, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 9\n assert candidate(nums = [3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, -1, -1, -1, -2, -2, -2]) == 1\n assert candidate(nums = [-2147483648, 2147483647, 0]) == -2147483648\n assert candidate(nums = [-2147483648, 2147483647, 0, -1, 1]) == 0\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]) == 8\n assert candidate(nums = [-2147483648, 2147483647, 0, 1, -1]) == 0\n assert candidate(nums = [5, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1, 4, 3, 2, 1]) == 3\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3]) == 1\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 13\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995]) == 999999998\n assert candidate(nums = [-2147483648, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(nums = [3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2, -3, -3]) == 1\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 1000000000\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 8\n assert candidate(nums = [5, 1, 5, 2, 5, 3, 5, 4]) == 3\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 3\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [1000000000, 1000000001, 1000000002]) == 1000000000\n assert candidate(nums = [-1000000000, -999999999, -999999998, -999999997, -999999996, -999999995, -999999994, -999999993, -999999992, -999999991]) == -999999993\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 999999999, 999999999, 999999998]) == 999999998\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 13\n assert candidate(nums = [5, 1, 5, 2, 5, 3, 5, 4, 5, 5]) == 3\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [7, 7, 7, 8, 8, 9]) == 7\n assert candidate(nums = [-2147483648, 0, 2147483647]) == -2147483648\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == 7\n assert candidate(nums = [-2147483648, 2147483647, -2147483648, 2147483647, 0]) == -2147483648\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2]) == 3\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 3\n assert candidate(nums = [1, 2, 2]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 8\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9]) == 7\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 8\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 3\n assert candidate(nums = [5, 2, 2, 3, 1, 4, 4, 4, 4, 4]) == 3\n assert candidate(nums = [10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, -1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9, -9, -10, -10]) == 8\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 9\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 7\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6]) == 4\n assert candidate(nums = [1, 1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 250000000\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1, 2]) == 1\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991]) == 999999998\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 23\n assert candidate(nums = [10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 38\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 18\n assert candidate(nums = [10, 20, 30, 20, 10, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30]) == 80\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 28\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [100, 100, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50]) == 98\n assert candidate(nums = [10, 10, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 8\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 2\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 3\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 13\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 7\n assert candidate(nums = [1, 2, 3, 1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005, 1000000006]) == 1000000004\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 2\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == 8\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8]) == 6\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 18\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]) == 2\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000, 0]) == 250000000\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 48\n assert candidate(nums = [1, 1000000000, 2, 999999999, 3, 999999998, 4, 999999997, 5, 999999996]) == 999999998\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 8\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50, -60, -70, -80, -90]) == 80\n assert candidate(nums = [10, 10, 10, 9, 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, -1, -1, -1]) == 8\n assert candidate(nums = [-1000000000, -1000000001, -1000000002, -1000000003]) == -1000000002\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003]) == 1000000001\n assert candidate(nums = [1000000000, 999999999, 999999998, 1, 2, 3]) == 999999998\n assert candidate(nums = [100, 90, 90, 80, 80, 70, 70, 60, 60, 50]) == 80\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 2\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50]) == 80\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 80\n assert candidate(nums = [5, 3, 5, 2, 5, 3, 3, 9, 0, 123, 123, 123, 456]) == 9\n assert candidate(nums = [1000000000, -1000000000, 0]) == -1000000000\n assert candidate(nums = [100, 90, 90, 80, 80, 80, 70, 60, 50, 40]) == 80\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 5\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == -30\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30]) == 30\n assert candidate(nums = [2, 3, 1, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996]) == 999999998\n", "comparison": "exact"}, "public_tests": ["[3,2,1]", "[1,2]", "[2,2,3,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().thirdMax", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:33+00:00", "tests_total": 127, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def third_max(nums)", "container": null, "callable": "third_max", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 415, "task_id": "add-strings", "difficulty": "Easy", "problem_description": "Given two non-negative integers, num1 and num2 represented as string, return the sum of num1 and num2 as a string.\n\nYou must solve the problem without using any built-in library for handling large integers (such as BigInteger). You must also not convert the inputs to integers directly.\n\nExample 1:\n\nInput: num1 = \"11\", num2 = \"123\"\nOutput: \"134\"\n\nExample 2:\n\nInput: num1 = \"456\", num2 = \"77\"\nOutput: \"533\"\n\nExample 3:\n\nInput: num1 = \"0\", num2 = \"0\"\nOutput: \"0\"\n\nConstraints:\n\n- 1 <= num1.length, num2.length <= 10^4\n- num1 and num2 consist of only digits.\n- num1 and num2 don't have any leading zeros except for the zero itself.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num1 = \"500\",num2 = \"500\") == \"1000\"\n assert candidate(num1 = \"11\",num2 = \"123\") == \"134\"\n assert candidate(num1 = \"1000\",num2 = \"2000\") == \"3000\"\n assert candidate(num1 = \"10000\",num2 = \"20000\") == \"30000\"\n assert candidate(num1 = \"123456789\",num2 = \"987654321\") == \"1111111110\"\n assert candidate(num1 = \"10\",num2 = \"10\") == \"20\"\n assert candidate(num1 = \"1\",num2 = \"1\") == \"2\"\n assert candidate(num1 = \"111111\",num2 = \"111111\") == \"222222\"\n assert candidate(num1 = \"9999\",num2 = \"1\") == \"10000\"\n assert candidate(num1 = \"456\",num2 = \"77\") == \"533\"\n assert candidate(num1 = \"0\",num2 = \"0\") == \"0\"\n assert candidate(num1 = \"999999999\",num2 = \"1\") == \"1000000000\"\n assert candidate(num1 = \"1111\",num2 = \"1111\") == \"2222\"\n assert candidate(num1 = \"1\",num2 = \"99999\") == \"100000\"\n assert candidate(num1 = \"9876543210\",num2 = \"9876543210\") == \"19753086420\"\n assert candidate(num1 = \"999\",num2 = \"1\") == \"1000\"\n assert candidate(num1 = \"123456789012345678901234567890\",num2 = \"987654321098765432109876543210\") == \"1111111110111111111011111111100\"\n assert candidate(num1 = \"100000000000000000000000000000000000000000000000000\",num2 = \"1\") == \"100000000000000000000000000000000000000000000000001\"\n assert candidate(num1 = \"999999999999999999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"1000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"500000000000000000000000000000\",num2 = \"500000000000000000000000000000\") == \"1000000000000000000000000000000\"\n assert candidate(num1 = \"55555555555555555555\",num2 = \"44444444444444444444\") == \"99999999999999999999\"\n assert candidate(num1 = \"1000000000000000000000000000000\",num2 = \"999999999999999999999999999999\") == \"1999999999999999999999999999999\"\n assert candidate(num1 = \"00000000000000000000000000000000000000000000000000\",num2 = \"00000000000000000000000000000000000000000000000000\") == \"00000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"1000000000\",num2 = \"999999999\") == \"1999999999\"\n assert candidate(num1 = \"0000000000000000000000000000000000000000000000000000000000000000\",num2 = \"0\") == \"0000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"9999999999999999999999999999999\",num2 = \"9999999999999999999999999999999\") == \"19999999999999999999999999999998\"\n assert candidate(num1 = \"100000000000000000000000000000\",num2 = \"200000000000000000000000000000\") == \"300000000000000000000000000000\"\n assert candidate(num1 = \"222222222222222222222222222222222222222222222222222\",num2 = \"777777777777777777777777777777777777777777777777777\") == \"999999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"12345678901234567890\",num2 = \"98765432109876543210\") == \"111111111011111111100\"\n assert candidate(num1 = \"9999999999999999999999999\",num2 = \"1\") == \"10000000000000000000000000\"\n assert candidate(num1 = \"1111111111111111111111111111111111111111111111111111111111111111\",num2 = \"2222222222222222222222222222222222222222222222222222222222222222\") == \"3333333333333333333333333333333333333333333333333333333333333333\"\n assert candidate(num1 = \"11111111111111111111111111111111111111111111111111111111111111111111111111111\",num2 = \"8888888888888888888888888888888888888888888888888888888888888888888888888888\") == \"19999999999999999999999999999999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"999999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"1000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"1\",num2 = \"99999999999999999999999999999999999999999999999999\") == \"100000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"987654321\",num2 = \"123456789\") == \"1111111110\"\n assert candidate(num1 = \"11111111111111111111\",num2 = \"22222222222222222222\") == \"33333333333333333333\"\n assert candidate(num1 = \"50000000000000000000000000000000000000000000000000\",num2 = \"50000000000000000000000000000000000000000000000000\") == \"100000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"10\",num2 = \"999999999999999999999999999999\") == \"1000000000000000000000000000009\"\n assert candidate(num1 = \"100000000000000000000000000000000000000000000000000000000000000000000000000000\",num2 = \"100000000000000000000000000000000000000000000000000000000000000000000000000000\") == \"200000000000000000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"50000000000000000000000000000000000000000000000000000000000000000000000000000\",num2 = \"50000000000000000000000000000000000000000000000000000000000000000000000000000\") == \"100000000000000000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"9999999999999999999999999999999\",num2 = \"1\") == \"10000000000000000000000000000000\"\n assert candidate(num1 = \"5678901234567890\",num2 = \"9876543210987654\") == \"15555444445555544\"\n assert candidate(num1 = \"999999999999999999999999999999999999\",num2 = \"1\") == \"1000000000000000000000000000000000000\"\n assert candidate(num1 = \"1000000000000000000000000000000000000000000000000000000000000000\",num2 = \"1000000000000000000000000000000000000000000000000000000000000000\") == \"2000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"111111111111111111111111111111111111\",num2 = \"222222222222222222222222222222222222\") == \"333333333333333333333333333333333333\"\n assert candidate(num1 = \"111111111111111111111111111111\",num2 = \"222222222222222222222222222222\") == \"333333333333333333333333333333\"\n assert candidate(num1 = \"1234567890\",num2 = \"9876543210\") == \"11111111100\"\n assert candidate(num1 = \"5555555555555555555555555555555555555555555555555555555555555555555555555555\",num2 = \"44444444444444444444444444444444444444444444444444444444444444444444444444444\") == \"49999999999999999999999999999999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"987654321098765432109876543210\",num2 = \"123456789012345678901234567890\") == \"1111111110111111111011111111100\"\n assert candidate(num1 = \"0\",num2 = \"9999999999999999999999999\") == \"9999999999999999999999999\"\n assert candidate(num1 = \"9999999999999999999999999999999999999999999999999\",num2 = \"9999999999999999999999999999999999999999999999999\") == \"19999999999999999999999999999999999999999999999998\"\n assert candidate(num1 = \"2222222222222222222222222222222\",num2 = \"7777777777777777777777777777777\") == \"9999999999999999999999999999999\"\n assert candidate(num1 = \"5\",num2 = \"5\") == \"10\"\n assert candidate(num1 = \"1111111111111111111111111111111\",num2 = \"8888888888888888888888888888888\") == \"9999999999999999999999999999999\"\n assert candidate(num1 = \"10000000000000000000000000000000\",num2 = \"1\") == \"10000000000000000000000000000001\"\n assert candidate(num1 = \"1\",num2 = \"999999999999999999999999999999\") == \"1000000000000000000000000000000\"\n assert candidate(num1 = \"555555555555555555\",num2 = \"444444444444444444\") == \"999999999999999999\"\n assert candidate(num1 = \"10000000000000000000\",num2 = \"1\") == \"10000000000000000001\"\n assert candidate(num1 = \"999999999999999999999999999999999999999999999999999999999999999999999999999\",num2 = \"999999999999999999999999999999999999999999999999999999999999999999999999999\") == \"1999999999999999999999999999999999999999999999999999999999999999999999999998\"\n assert candidate(num1 = \"56789123456789123456789\",num2 = \"432109876543210987654321\") == \"488899000000000111111110\"\n assert candidate(num1 = \"10000000000000000000\",num2 = \"10000000000000000000\") == \"20000000000000000000\"\n assert candidate(num1 = \"1\",num2 = \"0\") == \"1\"\n assert candidate(num1 = \"999999999999999999999999999998\",num2 = \"2\") == \"1000000000000000000000000000000\"\n assert candidate(num1 = \"99999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"100000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"99999999999999999999\",num2 = \"1\") == \"100000000000000000000\"\n assert candidate(num1 = \"0\",num2 = \"999999999999999999\") == \"999999999999999999\"\n assert candidate(num1 = \"111111111111111111111111111111\",num2 = \"111111111111111111111111111111\") == \"222222222222222222222222222222\"\n assert candidate(num1 = \"9999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"10000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"999999999999999999999999999999999999999999999999999999999999999999999999999\",num2 = \"1\") == \"1000000000000000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"4294967295\",num2 = \"1\") == \"4294967296\"\n assert candidate(num1 = \"10000000000000000000000000\",num2 = \"20000000000000000000000000\") == \"30000000000000000000000000\"\n assert candidate(num1 = \"1\",num2 = \"9999999999999999999999999\") == \"10000000000000000000000000\"\n assert candidate(num1 = \"9\",num2 = \"999999999999999999\") == \"1000000000000000008\"\n assert candidate(num1 = \"0\",num2 = \"99999999999999999999999999999999999999999999999999\") == \"99999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"111111111111111111111111111111111111111111111111111\",num2 = \"88888888888888888888888888888888888888888888888888\") == \"199999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"99999999999999999999999999999999999999999999999999\",num2 = \"99999999999999999999999999999999999999999999999999\") == \"199999999999999999999999999999999999999999999999998\"\n assert candidate(num1 = \"1010101010101010101010101010101010101010101010101010101010101010\",num2 = \"1\") == \"1010101010101010101010101010101010101010101010101010101010101011\"\n assert candidate(num1 = \"54321\",num2 = \"678901234567890\") == \"678901234622211\"\n assert candidate(num1 = \"999999999999999999999999999999\",num2 = \"1\") == \"1000000000000000000000000000000\"\n assert candidate(num1 = \"0\",num2 = \"10000000000000000000000000000000\") == \"10000000000000000000000000000000\"\n assert candidate(num1 = \"1\",num2 = \"999999999999999999999999999999999999999999999999999999999999999999999999999\") == \"1000000000000000000000000000000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"999999999999999999\",num2 = \"1\") == \"1000000000000000000\"\n assert candidate(num1 = \"111111111111111111111111111111111111111111111111111111111111111\",num2 = \"222222222222222222222222222222222222222222222222222222222222222\") == \"333333333333333333333333333333333333333333333333333333333333333\"\n assert candidate(num1 = \"1\",num2 = \"9999999999999999999999999999999999999999999999999\") == \"10000000000000000000000000000000000000000000000000\"\n assert candidate(num1 = \"999999999999999999999999999999\",num2 = \"999999999999999999999999999999\") == \"1999999999999999999999999999998\"\n assert candidate(num1 = \"1\",num2 = \"2\") == \"3\"\n assert candidate(num1 = \"11111111111111111111111111111111111111111111111111\",num2 = \"8888888888888888888888888888888888888888888888888\") == \"19999999999999999999999999999999999999999999999999\"\n assert candidate(num1 = \"12345678901234567890123456789012345678901234567890\",num2 = \"98765432109876543210987654321098765432109876543210\") == \"111111111011111111101111111110111111111011111111100\"\n assert candidate(num1 = \"555555555555555555555555555555\",num2 = \"444444444444444444444444444444\") == \"999999999999999999999999999999\"\n assert candidate(num1 = \"55555555555555555555555555555555555555555555555555\",num2 = \"55555555555555555555555555555555555555555555555555\") == \"111111111111111111111111111111111111111111111111110\"\n assert candidate(num1 = \"123456789123456789123456789123456789123456789123456789\",num2 = \"987654321987654321987654321987654321987654321987654321\") == \"1111111111111111111111111111111111111111111111111111110\"\n assert candidate(num1 = \"246802468024680246802468024680\",num2 = \"135791357913579135791357913579\") == \"382593825938259382593825938259\"\n", "comparison": "exact"}, "public_tests": ["\"11\"\n\"123\"", "\"456\"\n\"77\"", "\"0\"\n\"0\""], "hints": [], "metadata": {"canonical_parameter_names": ["num1", "num2"], "leetcode_dataset_entry_point": "Solution().addStrings", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:35+00:00", "tests_total": 92, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def add_strings(num1, num2)", "container": null, "callable": "add_strings", "parameters": [{"name": "num1", "type": "String"}, {"name": "num2", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 416, "task_id": "partition-equal-subset-sum", "difficulty": "Medium", "problem_description": "Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal or false otherwise.\n\nExample 1:\n\nInput: nums = [1,5,11,5]\nOutput: true\nExplanation: The array can be partitioned as [1, 5, 5] and [11].\n\nExample 2:\n\nInput: nums = [1,2,3,5]\nOutput: false\nExplanation: The array cannot be partitioned into equal sum subsets.\n\nConstraints:\n\n- 1 <= nums.length <= 200\n- 1 <= nums[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5]) == False\n assert candidate(nums = [1, 5, 11, 5]) == True\n assert candidate(nums = [1, 2, 2, 3]) == True\n assert candidate(nums = [1, 2, 3, 4]) == True\n assert candidate(nums = [2, 2, 3, 3]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7]) == True\n assert candidate(nums = [2, 2, 3, 5]) == False\n assert candidate(nums = [2, 2, 3, 6]) == False\n assert candidate(nums = [1, 2, 3, 5]) == False\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == True\n assert candidate(nums = [99, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == True\n assert candidate(nums = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1, 2, 5, 6, 8, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54]) == False\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [7, 14, 3, 9, 1, 4, 13, 2, 3, 10, 5, 3, 5, 8, 6, 9, 6, 5, 14, 4, 5, 8, 6, 4, 10, 1, 4, 9, 1, 3, 1, 5, 4, 3, 9, 1, 5, 9, 1, 2, 9, 1, 8, 1, 14, 5, 8, 3, 13, 14, 1, 10, 1, 1, 1, 5, 14, 1, 14, 5, 14, 1, 8, 10, 9, 5, 14, 10, 13]) == False\n assert candidate(nums = [5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == False\n assert candidate(nums = [10, 20, 15, 5, 5]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == True\n assert candidate(nums = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == False\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40]) == False\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]) == True\n assert candidate(nums = [10, 20, 15, 5, 5]) == False\n assert candidate(nums = [15, 10, 20, 30, 50, 50]) == False\n assert candidate(nums = [8, 15, 3, 7, 15, 16, 9, 16, 8, 15, 7, 13, 16, 3, 14, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == True\n assert candidate(nums = [3, 3, 3, 3, 10, 5, 5, 5]) == False\n assert candidate(nums = [23, 13, 2, 16, 21, 5, 14, 11, 7, 9, 4, 18, 3, 6, 8, 10, 12, 15, 17, 20]) == True\n assert candidate(nums = [15, 20, 25, 30, 35, 40, 45, 50, 55, 60]) == False\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == True\n assert candidate(nums = [33, 14, 60, 22, 5, 9, 38, 35, 7, 3, 19, 25, 36, 29, 28, 17, 41, 21, 18, 19]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == False\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 16]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == False\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [10, 2, 30, 12, 3, 1]) == False\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == True\n assert candidate(nums = [99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99]) == True\n assert candidate(nums = [7, 15, 6, 5, 9, 8, 3, 5, 4, 4, 5, 7, 9, 6, 5, 4, 5, 9, 10, 5]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == True\n assert candidate(nums = [15, 20, 25, 30, 35, 40, 45, 50]) == True\n assert candidate(nums = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70]) == True\n assert candidate(nums = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == True\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 55]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10]) == False\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == False\n assert candidate(nums = [42, 39, 27, 27, 38, 29, 37, 29, 43, 42, 27, 26, 28, 38, 37, 29, 30, 29, 39, 26]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == True\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == True\n", "comparison": "exact"}, "public_tests": ["[1,5,11,5]", "[1,2,3,5]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().canPartition", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:38+00:00", "tests_total": 86, "tests_dropped": 20, "flags": [], "topic_tags": ["array", "dynamic-programming", "knapsack-problem", "0-1-knapsack"]}, "language": "ruby", "interface": {"raw_signature": "def can_partition(nums)", "container": null, "callable": "can_partition", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 417, "task_id": "pacific-atlantic-water-flow", "difficulty": "Medium", "problem_description": "There is an m x n rectangular island that borders both the Pacific Ocean and Atlantic Ocean. The Pacific Ocean touches the island's left and top edges, and the Atlantic Ocean touches the island's right and bottom edges.\n\nThe island is partitioned into a grid of square cells. You are given an m x n integer matrix heights where heights[r][c] represents the height above sea level of the cell at coordinate (r, c).\n\nThe island receives a lot of rain, and the rain water can flow to neighboring cells directly north, south, east, and west if the neighboring cell's height is less than or equal to the current cell's height. Water can flow from any cell adjacent to an ocean into the ocean.\n\nReturn a 2D list of grid coordinates result where result[i] = [r_i, c_i] denotes that rain water can flow from cell (r_i, c_i) to both the Pacific and Atlantic oceans.\n\nExample 1:\n\nInput: heights = [[1,2,2,3,5],[3,2,3,4,4],[2,4,5,3,1],[6,7,1,4,5],[5,1,1,2,4]]\nOutput: [[0,4],[1,3],[1,4],[2,2],[3,0],[3,1],[4,0]]\nExplanation: The following cells can flow to the Pacific and Atlantic oceans, as shown below:\n[0,4]: [0,4] -> Pacific Ocean\n [0,4] -> Atlantic Ocean\n[1,3]: [1,3] -> [0,3] -> Pacific Ocean\n [1,3] -> [1,4] -> Atlantic Ocean\n[1,4]: [1,4] -> [1,3] -> [0,3] -> Pacific Ocean\n [1,4] -> Atlantic Ocean\n[2,2]: [2,2] -> [1,2] -> [0,2] -> Pacific Ocean\n [2,2] -> [2,3] -> [2,4] -> Atlantic Ocean\n[3,0]: [3,0] -> Pacific Ocean\n [3,0] -> [4,0] -> Atlantic Ocean\n[3,1]: [3,1] -> [3,0] -> Pacific Ocean\n [3,1] -> [4,1] -> Atlantic Ocean\n[4,0]: [4,0] -> Pacific Ocean\n [4,0] -> Atlantic Ocean\nNote that there are other possible paths for these cells to flow to the Pacific and Atlantic oceans.\n\nExample 2:\n\nInput: heights = [[1]]\nOutput: [[0,0]]\nExplanation: The water can flow from the only cell to the Pacific and Atlantic oceans.\n\nConstraints:\n\n- m == heights.length\n- n == heights[r].length\n- 1 <= m, n <= 200\n- 0 <= heights[r][c] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(heights = [[1, 2, 3, 4, 5], [2, 2, 2, 2, 2], [1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 2, 3, 4, 5]]) == [(0, 1), (0, 2), (0, 3), (0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2, 2, 3, 5], [3, 2, 3, 4, 4], [2, 4, 5, 3, 1], [6, 7, 1, 4, 5], [5, 1, 1, 2, 4]]) == [(0, 4), (1, 3), (1, 4), (2, 2), (3, 0), (3, 1), (4, 0)]\n assert candidate(heights = [[10, 10, 10], [10, 1, 10], [10, 10, 10]]) == [(0, 0), (0, 1), (0, 2), (1, 0), (1, 2), (2, 0), (2, 1), (2, 2)]\n assert candidate(heights = [[1]]) == [(0, 0)]\n assert candidate(heights = [[3, 3, 3, 3, 3], [3, 2, 2, 2, 3], [3, 2, 1, 2, 3], [3, 2, 2, 2, 3], [3, 3, 3, 3, 3]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 0), (1, 4), (2, 0), (2, 4), (3, 0), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2], [2, 3]]) == [(0, 1), (1, 0), (1, 1)]\n assert candidate(heights = [[1, 2, 3, 4, 5], [16, 17, 18, 19, 6], [15, 24, 25, 20, 7], [14, 23, 22, 21, 8], [13, 12, 11, 10, 9]]) == [(0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2, 3], [8, 9, 4], [7, 6, 5]]) == [(0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 3, 4, 3, 2, 1], [1, 2, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9, 10, 11], [5, 6, 7, 8, 9, 10, 11, 12]]) == [(0, 7), (1, 7), (2, 7), (3, 7), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7)]\n assert candidate(heights = [[1, 2, 3], [6, 5, 4], [7, 8, 9]]) == [(0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]\n assert candidate(heights = [[10, 10, 10, 10, 10, 10], [10, 20, 20, 20, 20, 10], [10, 20, 30, 30, 20, 10], [10, 20, 30, 30, 20, 10], [10, 20, 20, 20, 20, 10], [10, 10, 10, 10, 10, 10]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[5, 4, 5, 4, 5], [4, 3, 4, 3, 4], [5, 4, 5, 4, 5], [4, 3, 4, 3, 4], [5, 4, 5, 4, 5]]) == [(0, 4), (4, 0)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11]]) == [(0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6)]\n assert candidate(heights = [[1, 2, 3, 4, 5], [2, 3, 4, 5, 6], [3, 4, 5, 6, 7], [4, 5, 6, 7, 8], [5, 6, 7, 8, 9], [4, 5, 6, 7, 8], [3, 4, 5, 6, 7], [2, 3, 4, 5, 6], [1, 2, 3, 4, 5]]) == [(0, 4), (1, 4), (2, 4), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (7, 0), (7, 1), (7, 2), (7, 3), (7, 4), (8, 0), (8, 1), (8, 2), (8, 3), (8, 4)]\n assert candidate(heights = [[10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [11, 10, 9, 8, 7, 6, 5, 4, 3, 2], [12, 11, 10, 9, 8, 7, 6, 5, 4, 3], [13, 12, 11, 10, 9, 8, 7, 6, 5, 4], [14, 13, 12, 11, 10, 9, 8, 7, 6, 5], [15, 14, 13, 12, 11, 10, 9, 8, 7, 6], [16, 15, 14, 13, 12, 11, 10, 9, 8, 7], [17, 16, 15, 14, 13, 12, 11, 10, 9, 8], [18, 17, 16, 15, 14, 13, 12, 11, 10, 9], [19, 18, 17, 16, 15, 14, 13, 12, 11, 10]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (5, 7), (5, 8), (5, 9), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), (6, 7), (6, 8), (6, 9), (7, 0), (7, 1), (7, 2), (7, 3), (7, 4), (7, 5), (7, 6), (7, 7), (7, 8), (7, 9), (8, 0), (8, 1), (8, 2), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (9, 0), (9, 1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]) == [(0, 10), (0, 11), (0, 12), (0, 13), (0, 14), (0, 15), (0, 16), (0, 17), (0, 18), (0, 19), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 10), (2, 11), (2, 12), (2, 13), (2, 14), (2, 15), (2, 16), (2, 17), (2, 18), (2, 19), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9), (4, 10), (4, 11), (4, 12), (4, 13), (4, 14), (4, 15), (4, 16), (4, 17), (4, 18), (4, 19)]\n assert candidate(heights = [[10, 10, 10, 10], [10, 9, 8, 7], [10, 8, 7, 6], [10, 7, 6, 5], [10, 6, 5, 4], [10, 5, 4, 3], [10, 4, 3, 2], [10, 3, 2, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (2, 0), (3, 0), (4, 0), (5, 0), (6, 0), (7, 0)]\n assert candidate(heights = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [4, 5, 6, 7, 8], [3, 4, 5, 6, 7], [2, 3, 4, 5, 6], [1, 2, 3, 4, 5]]) == [(0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4)]\n assert candidate(heights = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == [(0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9)]\n assert candidate(heights = [[1, 2, 2, 3, 5, 6], [3, 2, 3, 4, 4, 5], [2, 4, 5, 3, 1, 6], [6, 7, 1, 4, 5, 7], [5, 1, 1, 2, 4, 8], [9, 8, 7, 6, 5, 4]]) == [(0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 0)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [6, 5, 4], [3, 2, 1]]) == [(0, 2), (1, 2), (2, 0), (2, 1), (2, 2), (3, 0), (4, 0)]\n assert candidate(heights = [[5, 5, 5, 5, 5], [5, 1, 2, 3, 5], [5, 4, 3, 2, 5], [5, 3, 3, 3, 5], [5, 5, 5, 5, 5]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 0), (1, 4), (2, 0), (2, 4), (3, 0), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60], [61, 62, 63, 64, 65, 66, 67, 68, 69, 70], [71, 72, 73, 74, 75, 76, 77, 78, 79, 80], [81, 82, 83, 84, 85, 86, 87, 88, 89, 90], [91, 92, 93, 94, 95, 96, 97, 98, 99, 100]]) == [(0, 9), (1, 9), (2, 9), (3, 9), (4, 9), (5, 9), (6, 9), (7, 9), (8, 9), (9, 0), (9, 1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9)]\n assert candidate(heights = [[5, 4, 5], [1, 2, 6], [7, 4, 6]]) == [(0, 2), (1, 2), (2, 0), (2, 1), (2, 2)]\n assert candidate(heights = [[3, 3, 3, 3, 3, 3], [3, 0, 0, 0, 0, 3], [3, 0, 9, 8, 0, 3], [3, 0, 7, 6, 0, 3], [3, 0, 0, 0, 0, 3], [3, 3, 3, 3, 3, 3]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 5), (2, 0), (2, 5), (3, 0), (3, 5), (4, 0), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[1, 2, 2, 3, 5, 6, 7], [3, 2, 3, 4, 4, 5, 6], [2, 4, 5, 3, 1, 4, 5], [6, 7, 1, 4, 5, 6, 7], [5, 1, 1, 2, 4, 5, 6], [5, 1, 1, 2, 4, 5, 6]]) == [(0, 6), (1, 6), (2, 2), (3, 0), (3, 1), (4, 0), (5, 0)]\n assert candidate(heights = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [2, 3, 4, 5, 6], [6, 5, 4, 3, 2], [3, 4, 5, 6, 7]]) == [(0, 2), (0, 3), (0, 4), (1, 0), (1, 1), (1, 2), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[3, 3, 3, 3, 3, 3], [3, 2, 2, 2, 2, 3], [3, 2, 1, 1, 2, 3], [3, 2, 1, 1, 2, 3], [3, 2, 2, 2, 2, 3], [3, 3, 3, 3, 3, 3]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 5), (2, 0), (2, 5), (3, 0), (3, 5), (4, 0), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[10, 10, 10, 10, 10, 10], [10, 1, 1, 1, 1, 10], [10, 1, 2, 2, 1, 10], [10, 1, 2, 2, 1, 10], [10, 1, 1, 1, 1, 10], [10, 10, 10, 10, 10, 10]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 5), (2, 0), (2, 5), (3, 0), (3, 5), (4, 0), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [19, 17, 15, 13, 11, 9, 7, 5, 3, 1], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]]) == [(0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9)]\n assert candidate(heights = [[10, 20, 10, 20, 10], [20, 30, 20, 30, 20], [10, 20, 10, 20, 10], [20, 30, 20, 30, 20], [10, 20, 10, 20, 10]]) == [(0, 3), (0, 4), (1, 3), (1, 4), (3, 0), (3, 1), (4, 0), (4, 1)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [2, 4, 6, 8, 10, 12, 14, 16, 18, 20], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == [(0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[1, 2, 2, 1, 2], [2, 2, 2, 2, 2], [2, 2, 1, 2, 2], [1, 2, 2, 1, 2], [2, 2, 2, 2, 2]]) == [(0, 1), (0, 2), (0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[5, 4, 5], [1, 2, 6], [7, 4, 8], [9, 1, 2], [3, 6, 7], [4, 6, 8]]) == [(0, 2), (1, 2), (2, 2), (4, 1), (4, 2), (5, 0), (5, 1), (5, 2)]\n assert candidate(heights = [[10, 11, 16, 21, 17], [14, 17, 24, 25, 22], [13, 18, 23, 24, 21], [12, 19, 22, 23, 20], [11, 16, 19, 20, 19]]) == [(0, 3), (0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (3, 0), (3, 1), (3, 2), (3, 3), (4, 0), (4, 1), (4, 2), (4, 3)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 3, 3, 2, 1], [1, 2, 3, 4, 4, 4, 4, 3, 2, 1], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 5, 4, 3, 1], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [1, 2, 3, 4, 4, 4, 4, 3, 2, 1], [1, 2, 3, 3, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (5, 7), (5, 8), (5, 9), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), (6, 7), (6, 8), (6, 9), (7, 0), (7, 1), (7, 2), (7, 3), (7, 4), (7, 5), (7, 6), (7, 7), (7, 8), (7, 9), (8, 0), (8, 1), (8, 2), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (9, 0), (9, 1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9), (10, 0), (10, 1), (10, 2), (10, 3), (10, 4), (10, 5), (10, 6), (10, 7), (10, 8), (10, 9)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6], [6, 5, 4, 3, 2, 1], [2, 3, 4, 5, 6, 7], [7, 6, 5, 4, 3, 2], [3, 4, 5, 6, 7, 8], [8, 7, 6, 5, 4, 3]]) == [(0, 3), (0, 4), (0, 5), (1, 0), (1, 1), (1, 2), (2, 2), (2, 3), (2, 4), (2, 5), (3, 0), (3, 1), (3, 2), (4, 2), (4, 3), (4, 4), (4, 5), (5, 0), (5, 1), (5, 2)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 3, 3, 2, 1], [1, 2, 3, 4, 4, 4, 4, 3, 2, 1], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [1, 2, 3, 4, 4, 4, 4, 3, 2, 1], [1, 2, 3, 3, 3, 3, 3, 3, 2, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (5, 7), (5, 8), (5, 9), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), (6, 7), (6, 8), (6, 9), (7, 0), (7, 1), (7, 2), (7, 3), (7, 4), (7, 5), (7, 6), (7, 7), (7, 8), (7, 9), (8, 0), (8, 1), (8, 2), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (9, 0), (9, 1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9)]\n assert candidate(heights = [[1, 5, 5, 5, 5, 5, 5, 5, 5, 5], [2, 3, 4, 5, 5, 5, 5, 5, 5, 5], [2, 2, 3, 4, 5, 5, 5, 5, 5, 5], [2, 2, 2, 3, 4, 5, 5, 5, 5, 5], [2, 2, 2, 2, 3, 4, 5, 5, 5, 5], [2, 2, 2, 2, 2, 3, 4, 5, 5, 5], [2, 2, 2, 2, 2, 2, 3, 4, 5, 5], [2, 2, 2, 2, 2, 2, 2, 3, 4, 5], [2, 2, 2, 2, 2, 2, 2, 2, 3, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 3]]) == [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (5, 7), (5, 8), (5, 9), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), (6, 7), (6, 8), (6, 9), (7, 0), (7, 1), (7, 2), (7, 3), (7, 4), (7, 5), (7, 6), (7, 7), (7, 8), (7, 9), (8, 0), (8, 1), (8, 2), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (9, 0), (9, 1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9)]\n assert candidate(heights = [[1, 2, 2, 3, 5, 6], [3, 2, 3, 4, 4, 5], [2, 4, 5, 3, 1, 4], [6, 7, 1, 4, 5, 6], [5, 1, 1, 2, 4, 5], [5, 1, 1, 2, 4, 1]]) == [(0, 5), (1, 5), (2, 2), (3, 0), (3, 1), (4, 0), (5, 0)]\n assert candidate(heights = [[1, 2, 2, 3, 4, 5], [2, 3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 8], [4, 5, 6, 7, 8, 9], [5, 6, 7, 8, 9, 10], [6, 7, 8, 9, 10, 11]]) == [(0, 5), (1, 5), (2, 5), (3, 5), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[1, 2, 3, 4, 5], [10, 9, 8, 7, 6], [11, 12, 13, 14, 15], [20, 19, 18, 17, 16], [21, 22, 23, 24, 25]]) == [(0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 11, 13, 15, 17, 19], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == [(0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9)]\n assert candidate(heights = [[1, 2, 3, 2, 1], [4, 5, 6, 5, 4], [7, 8, 9, 8, 7], [4, 5, 6, 5, 4], [1, 2, 3, 2, 1]]) == [(0, 2), (0, 3), (0, 4), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2)]\n assert candidate(heights = [[5, 5, 5, 5, 5, 5, 5], [5, 1, 1, 1, 1, 1, 5], [5, 1, 2, 2, 2, 1, 5], [5, 1, 2, 3, 2, 1, 5], [5, 1, 2, 2, 2, 1, 5], [5, 1, 1, 1, 1, 1, 5], [5, 5, 5, 5, 5, 5, 5]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (1, 0), (1, 6), (2, 0), (2, 6), (3, 0), (3, 6), (4, 0), (4, 6), (5, 0), (5, 6), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)]\n assert candidate(heights = [[1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [1, 3, 5, 7, 9], [2, 4, 6, 8, 10], [1, 3, 5, 7, 9]]) == [(0, 4), (1, 4), (2, 4), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 2, 2, 3, 5, 6], [3, 2, 3, 4, 4, 5], [2, 4, 5, 3, 1, 2], [6, 7, 1, 4, 5, 3], [5, 1, 1, 2, 4, 1], [4, 3, 2, 1, 1, 1]]) == [(0, 5), (1, 5), (3, 0), (3, 1), (4, 0), (5, 0)]\n assert candidate(heights = [[1, 1, 1, 1, 1], [1, 2, 2, 2, 1], [1, 2, 3, 2, 1], [1, 2, 2, 2, 1], [1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 1], [1, 2, 3, 3, 2, 1], [1, 2, 2, 2, 2, 1], [1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5)]\n assert candidate(heights = [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 1, 1, 1, 1, 1, 1, 1, 1, 5], [5, 1, 2, 2, 2, 2, 2, 2, 1, 5], [5, 1, 2, 3, 3, 3, 3, 2, 1, 5], [5, 1, 2, 3, 4, 4, 3, 2, 1, 5], [5, 1, 2, 3, 4, 5, 4, 3, 2, 5], [5, 1, 2, 3, 4, 4, 3, 2, 1, 5], [5, 1, 2, 3, 3, 3, 3, 2, 1, 5], [5, 1, 2, 2, 2, 2, 2, 2, 1, 5], [5, 1, 1, 1, 1, 1, 1, 1, 1, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 9), (2, 0), (2, 9), (3, 0), (3, 9), (4, 0), (4, 9), (5, 0), (5, 9), (6, 0), (6, 9), (7, 0), (7, 9), (8, 0), (8, 9), (9, 0), (9, 9), (10, 0), (10, 1), (10, 2), (10, 3), (10, 4), (10, 5), (10, 6), (10, 7), (10, 8), (10, 9)]\n assert candidate(heights = [[1, 2, 3], [6, 5, 4], [7, 8, 9], [12, 15, 14], [13, 16, 17]]) == [(0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2), (3, 0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2)]\n assert candidate(heights = [[1, 2, 2, 3, 5], [3, 2, 3, 4, 4], [2, 4, 8, 3, 1], [6, 7, 1, 4, 5], [5, 1, 1, 2, 4], [4, 3, 2, 1, 0]]) == [(0, 4), (1, 3), (1, 4), (2, 2), (3, 0), (3, 1), (4, 0), (5, 0)]\n assert candidate(heights = [[10, 10, 10, 10], [10, 20, 20, 10], [10, 20, 10, 10], [10, 10, 10, 10]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 1), (1, 2), (1, 3), (2, 0), (2, 1), (2, 2), (2, 3), (3, 0), (3, 1), (3, 2), (3, 3)]\n assert candidate(heights = [[3, 3, 3, 3], [3, 0, 0, 3], [3, 0, 0, 3], [3, 3, 3, 3]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (1, 0), (1, 3), (2, 0), (2, 3), (3, 0), (3, 1), (3, 2), (3, 3)]\n assert candidate(heights = [[5, 1, 3, 4, 5], [6, 2, 3, 4, 6], [1, 2, 3, 4, 7], [2, 3, 4, 5, 8], [3, 4, 5, 6, 9]]) == [(0, 4), (1, 4), (2, 4), (3, 4), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n assert candidate(heights = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2, 2, 1], [1, 2, 3, 3, 3, 3, 3, 3, 2, 1], [1, 2, 3, 4, 4, 4, 4, 3, 2, 1], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 4, 3, 2, 2, 1], [1, 2, 3, 4, 4, 3, 2, 2, 1, 1], [1, 2, 3, 3, 3, 2, 2, 1, 1, 1], [1, 2, 2, 2, 2, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == [(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (0, 7), (0, 8), (0, 9), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (3, 7), (3, 8), (3, 9), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (4, 7), (4, 8), (4, 9), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (5, 7), (5, 8), (5, 9), (6, 0), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6), (6, 7), (6, 8), (6, 9), (7, 0), (7, 1), (7, 2), (7, 3), (7, 4), (7, 5), (7, 6), (7, 7), (7, 8), (7, 9), (8, 0), (8, 1), (8, 2), (8, 3), (8, 4), (8, 5), (8, 6), (8, 7), (8, 8), (8, 9), (9, 0), (9, 1), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6), (9, 7), (9, 8), (9, 9)]\n assert candidate(heights = [[1, 4, 3, 4, 5, 6], [2, 4, 3, 4, 5, 6], [3, 4, 3, 4, 5, 6], [4, 4, 3, 4, 5, 6], [5, 4, 3, 4, 5, 6], [6, 4, 3, 4, 5, 6]]) == [(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (3, 0), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (5, 0), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5)]\n assert candidate(heights = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 2, 3, 4, 5]]) == [(0, 2), (0, 3), (0, 4), (1, 0), (1, 1), (1, 2), (2, 2), (2, 3), (2, 4), (3, 0), (3, 1), (3, 2), (4, 0), (4, 1), (4, 2), (4, 3), (4, 4)]\n", "comparison": "exact"}, "public_tests": ["[[1,2,2,3,5],[3,2,3,4,4],[2,4,5,3,1],[6,7,1,4,5],[5,1,1,2,4]]", "[[1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["heights"], "leetcode_dataset_entry_point": "Solution().pacificAtlantic", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:40+00:00", "tests_total": 62, "tests_dropped": 0, "flags": ["figure_reference", "has_images"], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def pacific_atlantic(heights)", "container": null, "callable": "pacific_atlantic", "parameters": [{"name": "heights", "type": "Integer[][]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 419, "task_id": "battleships-in-a-board", "difficulty": "Medium", "problem_description": "You are given an m x n matrix board where each cell is part of a battleship 'X' or empty '.', return the number of the battleships on board.\n\nBattleships can only be placed horizontally or vertically on board. In other words, they can only be made of the shape 1 x k (1 row, k columns) or k x 1 (k rows, 1 column), where k can be of any size. At least one horizontal or vertical cell separates between two battleships (i.e., there are no adjacent battleships).\n\nExample 1:\n\nInput: board = [[\"X\",\".\",\".\",\"X\"],[\".\",\".\",\".\",\"X\"],[\".\",\".\",\".\",\"X\"]]\nOutput: 2\n\nExample 2:\n\nInput: board = [[\".\"]]\nOutput: 0\n\nConstraints:\n\n- m == board.length\n- n == board[i].length\n- 1 <= m, n <= 200\n- board[i][j] is either '.' or 'X'.\n\nFollow up: Could you do it in one-pass, using only O(1) extra memory and without modifying the values board?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [['X', '.', '.', 'X'], ['.', '.', '.', 'X'], ['.', '.', '.', 'X']]) == 2\n assert candidate(board = [['X', 'X', 'X'], ['.', '.', '.'], ['X', 'X', 'X']]) == 2\n assert candidate(board = [['.']]) == 0\n assert candidate(board = [['X', '.', '.'], ['.', 'X', '.'], ['.', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', '.'], ['X', 'X', '.'], ['.', '.', 'X']]) == 2\n assert candidate(board = [['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X']]) == 3\n assert candidate(board = [['.', '.', '.', '.'], ['.', 'X', 'X', 'X'], ['.', 'X', '.', '.'], ['.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['.', '.', '.', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 5\n assert candidate(board = [['.', '.', '.', '.', '.', '.', '.'], ['.', '.', 'X', 'X', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', 'X', 'X', '.']]) == 2\n assert candidate(board = [['X', 'X', 'X', 'X', '.'], ['X', '.', '.', '.', '.'], ['.', '.', '.', 'X', 'X'], ['.', '.', '.', 'X', 'X']]) == 2\n assert candidate(board = [['X', '.', '.', 'X', 'X'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', 'X', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', 'X', '.', 'X'], ['.', '.', '.', 'X', '.', '.'], ['X', 'X', '.', 'X', 'X', 'X'], ['.', 'X', '.', '.', '.', '.'], ['X', 'X', '.', 'X', '.', 'X']]) == 7\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['.', '.', '.', '.', '.']]) == 3\n assert candidate(board = [['X', '.', '.', '.', '.'], ['.', 'X', '.', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', '.', 'X', '.'], ['.', '.', '.', '.', 'X']]) == 5\n assert candidate(board = [['.', '.', '.', '.'], ['X', 'X', 'X', '.'], ['.', 'X', '.', '.'], ['.', 'X', '.', '.']]) == 1\n assert candidate(board = [['X', '.', '.', '.'], ['.', '.', '.', '.'], ['.', '.', 'X', '.'], ['.', '.', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', '.', 'X'], ['.', '.', 'X', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', 'X', '.', '.'], ['X', '.', '.', '.', 'X']]) == 6\n assert candidate(board = [['X', 'X', 'X', '.', '.'], ['X', '.', '.', '.', '.'], ['X', 'X', '.', 'X', '.'], ['.', '.', '.', 'X', '.'], ['.', '.', '.', 'X', 'X']]) == 2\n assert candidate(board = [['X', 'X', 'X', '.', '.'], ['X', 'X', 'X', '.', '.'], ['X', 'X', 'X', '.', '.'], ['.', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', '.', '.', '.'], ['.', '.', 'X', '.'], ['.', '.', '.', '.'], ['X', '.', '.', '.']]) == 3\n assert candidate(board = [['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X']]) == 2\n assert candidate(board = [['X', '.', '.', 'X', '.'], ['X', '.', '.', 'X', '.'], ['X', '.', '.', 'X', '.'], ['X', '.', '.', 'X', '.'], ['X', '.', '.', 'X', '.']]) == 2\n assert candidate(board = [['X', 'X', 'X', 'X', 'X'], ['.', 'X', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.']]) == 2\n assert candidate(board = [['X', '.', '.', '.', 'X'], ['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', '.'], ['X', '.', '.', '.', 'X']]) == 5\n assert candidate(board = [['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.']]) == 2\n assert candidate(board = [['X', '.', '.', 'X'], ['X', '.', '.', 'X'], ['X', '.', '.', 'X']]) == 2\n assert candidate(board = [['X', 'X', 'X', '.'], ['.', '.', '.', 'X'], ['X', 'X', 'X', 'X'], ['.', 'X', '.', '.']]) == 3\n assert candidate(board = [['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', '.']]) == 1\n assert candidate(board = [['.', '.', '.', '.'], ['X', 'X', 'X', 'X'], ['.', '.', '.', '.'], ['X', '.', 'X', '.']]) == 3\n assert candidate(board = [['X', 'X', '.', '.', '.'], ['X', 'X', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['.', '.', '.', '.', 'X'], ['.', '.', 'X', '.', '.'], ['.', '.', 'X', '.', 'X']]) == 5\n assert candidate(board = [['X', '.', '.', 'X', '.', 'X', '.', 'X'], ['X', '.', '.', 'X', '.', 'X', '.', 'X'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X', '.', 'X', '.']]) == 8\n assert candidate(board = [['X', '.', '.', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', '.', 'X', '.'], ['.', '.', '.', '.', 'X']]) == 4\n assert candidate(board = [['X', '.', '.', 'X'], ['X', '.', '.', 'X'], ['X', '.', '.', 'X'], ['X', '.', '.', 'X']]) == 2\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['.', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['.', '.', '.', '.', '.']]) == 5\n assert candidate(board = [['X', '.', 'X', '.'], ['X', '.', '.', 'X'], ['X', '.', '.', 'X'], ['X', '.', '.', 'X']]) == 3\n assert candidate(board = [['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.'], ['X', 'X', 'X', '.', '.', '.'], ['.', '.', '.', 'X', 'X', 'X'], ['.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.']]) == 2\n assert candidate(board = [['X', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 4\n assert candidate(board = [['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', 'X', '.', 'X'], ['.', '.', 'X', 'X'], ['X', '.', 'X', '.'], ['.', 'X', 'X', 'X']]) == 5\n assert candidate(board = [['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', '.', 'X', '.', '.', '.', 'X'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', 'X', 'X', '.', '.', 'X', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', 'X', '.', '.', '.', 'X']]) == 8\n assert candidate(board = [['X', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', '.', 'X', '.'], ['X', '.', 'X', '.'], ['X', '.', '.', '.']]) == 2\n assert candidate(board = [['X', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.'], ['X', 'X', 'X', '.', '.'], ['.', '.', '.', 'X', 'X'], ['.', '.', '.', 'X', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', 'X', '.'], ['.', '.', '.', 'X', '.'], ['X', '.', '.', 'X', '.'], ['.', '.', '.', 'X', '.'], ['X', '.', '.', 'X', '.']]) == 4\n assert candidate(board = [['X', '.', 'X', '.', 'X', '.', 'X', '.', 'X'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', 'X', '.', 'X', '.', 'X', '.', 'X'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X', '.', 'X', '.', 'X']]) == 14\n assert candidate(board = [['.', '.', '.', 'X', 'X'], ['.', '.', '.', '.', '.'], ['.', '.', 'X', '.', '.'], ['X', 'X', 'X', '.', '.'], ['.', '.', 'X', '.', '.']]) == 3\n assert candidate(board = [['X', 'X', 'X', '.', '.', '.', '.', '.', '.'], ['.', 'X', '.', '.', '.', '.', '.', '.', '.'], ['X', 'X', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', 'X', 'X', 'X'], ['.', '.', '.', '.', '.', '.', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', 'X', 'X', 'X']]) == 4\n assert candidate(board = [['X', '.', 'X', '.'], ['.', '.', '.', '.'], ['X', '.', 'X', '.'], ['.', '.', '.', '.']]) == 4\n assert candidate(board = [['X', '.', '.', '.'], ['X', '.', 'X', 'X'], ['.', 'X', '.', '.'], ['X', '.', 'X', '.']]) == 5\n assert candidate(board = [['.', 'X', '.', 'X', '.'], ['X', '.', 'X', '.', 'X'], ['.', 'X', '.', 'X', '.'], ['X', '.', 'X', '.', 'X'], ['.', 'X', '.', 'X', '.']]) == 12\n assert candidate(board = [['X', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X', '.', 'X', '.']]) == 13\n assert candidate(board = [['.', 'X', '.', 'X', '.'], ['X', 'X', '.', 'X', 'X'], ['.', 'X', '.', 'X', '.'], ['X', 'X', '.', 'X', 'X'], ['.', 'X', '.', 'X', '.']]) == 4\n assert candidate(board = [['X', 'X', '.', '.'], ['X', '.', 'X', '.'], ['.', '.', '.', '.'], ['.', 'X', '.', 'X']]) == 4\n assert candidate(board = [['X', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['X', '.', '.', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['X', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', '.', 'X', '.'], ['X', '.', 'X', '.'], ['X', '.', 'X', '.']]) == 2\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 5\n assert candidate(board = [['X', 'X', '.', 'X'], ['X', '.', 'X', '.'], ['.', '.', 'X', 'X'], ['.', '.', 'X', '.']]) == 3\n assert candidate(board = [['.', 'X', '.', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', '.', 'X', '.'], ['.', '.', '.', '.', 'X'], ['.', '.', '.', '.', '.']]) == 4\n assert candidate(board = [['X', 'X', '.', '.', '.', '.', '.', 'X'], ['.', '.', 'X', 'X', '.', '.', '.', 'X'], ['X', '.', 'X', '.', 'X', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.'], ['X', 'X', '.', '.', '.', '.', '.', 'X']]) == 8\n assert candidate(board = [['X', 'X', '.', 'X', 'X'], ['.', '.', '.', '.', '.'], ['X', 'X', '.', 'X', 'X'], ['.', '.', '.', '.', '.'], ['X', 'X', '.', 'X', 'X']]) == 6\n assert candidate(board = [['X', 'X', 'X', '.', '.'], ['.', '.', '.', 'X', 'X'], ['.', '.', '.', '.', 'X'], ['X', 'X', 'X', '.', '.'], ['X', '.', '.', '.', '.']]) == 3\n assert candidate(board = [['X', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X']]) == 3\n assert candidate(board = [['X', 'X', 'X', '.', 'X'], ['X', '.', 'X', 'X', '.'], ['.', '.', '.', 'X', 'X'], ['X', 'X', '.', 'X', '.']]) == 3\n assert candidate(board = [['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.']]) == 0\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['.', '.', 'X', '.', '.'], ['X', '.', 'X', '.', 'X'], ['.', '.', 'X', '.', '.'], ['X', '.', 'X', '.', 'X']]) == 7\n assert candidate(board = [['X', 'X', 'X', '.', 'X'], ['X', 'X', 'X', '.', 'X'], ['X', 'X', 'X', '.', 'X'], ['X', 'X', 'X', '.', 'X']]) == 2\n assert candidate(board = [['.', '.', '.', '.', '.'], ['.', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.'], ['.', 'X', '.', '.', '.'], ['.', 'X', '.', '.', '.']]) == 2\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', '.'], ['.', '.', 'X', '.'], ['.', '.', 'X', 'X'], ['X', '.', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', '.'], ['.', 'X', '.', '.'], ['.', '.', 'X', '.'], ['.', '.', '.', 'X']]) == 4\n assert candidate(board = [['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', 'X', '.', 'X', '.', 'X', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X', '.', 'X', '.', 'X'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', 'X', '.', 'X', '.', 'X', '.', 'X', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.']]) == 13\n assert candidate(board = [['X', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.']]) == 1\n assert candidate(board = [['X', '.', '.', '.', '.'], ['X', '.', 'X', '.', '.'], ['X', '.', '.', 'X', '.'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X']]) == 4\n assert candidate(board = [['X', '.', '.', '.', '.'], ['X', '.', 'X', 'X', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', 'X', '.', '.'], ['X', '.', '.', '.', 'X']]) == 4\n assert candidate(board = [['.', '.', '.', '.', '.'], ['X', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.'], ['X', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.']]) == 2\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 3\n assert candidate(board = [['X', '.', 'X', 'X', 'X'], ['X', '.', '.', '.', '.'], ['X', '.', '.', '.', '.'], ['X', 'X', 'X', 'X', 'X']]) == 2\n assert candidate(board = [['.', 'X', '.', 'X', '.'], ['X', '.', 'X', '.', 'X'], ['.', 'X', '.', 'X', '.'], ['X', '.', 'X', '.', 'X']]) == 10\n assert candidate(board = [['X', 'X', '.', 'X'], ['.', 'X', '.', 'X'], ['.', 'X', '.', 'X']]) == 2\n assert candidate(board = [['X', 'X', 'X', 'X', 'X'], ['.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 4\n assert candidate(board = [['X', 'X', 'X', 'X', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', '.', '.', '.', 'X'], ['X', 'X', 'X', 'X', 'X']]) == 1\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['X', 'X', 'X', 'X', '.'], ['.', '.', 'X', 'X', 'X'], ['X', '.', 'X', '.', 'X'], ['X', '.', 'X', '.', 'X']]) == 4\n assert candidate(board = [['.', 'X', '.', 'X', '.'], ['.', 'X', '.', 'X', '.'], ['.', 'X', '.', 'X', '.'], ['.', 'X', '.', 'X', '.'], ['.', 'X', '.', 'X', '.']]) == 2\n assert candidate(board = [['X', '.', '.', '.', '.'], ['.', '.', 'X', '.', '.'], ['.', '.', '.', 'X', '.'], ['.', '.', '.', '.', 'X'], ['.', '.', '.', '.', '.']]) == 4\n assert candidate(board = [['X', 'X', 'X', 'X', 'X'], ['X', 'X', 'X', 'X', 'X'], ['X', 'X', 'X', 'X', 'X'], ['X', 'X', 'X', 'X', 'X'], ['X', 'X', 'X', 'X', 'X']]) == 1\n assert candidate(board = [['.', '.', '.', '.', 'X', '.', '.', '.', '.'], ['.', '.', 'X', '.', '.', '.', 'X', '.', '.'], ['.', '.', '.', '.', 'X', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.']]) == 4\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['.', 'X', '.', 'X', '.'], ['X', '.', 'X', '.', 'X'], ['.', 'X', '.', 'X', '.'], ['X', '.', 'X', '.', 'X']]) == 13\n assert candidate(board = [['X', 'X', '.', 'X'], ['X', 'X', '.', 'X'], ['.', '.', '.', 'X'], ['X', 'X', 'X', 'X']]) == 3\n assert candidate(board = [['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['X', 'X', 'X', 'X', 'X']]) == 1\n assert candidate(board = [['X', 'X', 'X', '.', '.'], ['X', '.', '.', '.', '.'], ['X', '.', 'X', 'X', 'X'], ['.', '.', '.', 'X', '.'], ['.', '.', '.', 'X', '.']]) == 2\n assert candidate(board = [['X', '.', 'X', '.', 'X'], ['.', '.', 'X', '.', 'X'], ['X', 'X', 'X', 'X', '.'], ['.', '.', '.', '.', '.'], ['X', '.', 'X', '.', 'X']]) == 7\n assert candidate(board = [['X', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', 'X', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', 'X', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', 'X', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', 'X', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', 'X', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', 'X', '.', '.']]) == 7\n assert candidate(board = [['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.']]) == 0\n assert candidate(board = [['X', 'X', '.', 'X', 'X', '.', 'X', 'X', '.', 'X'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['X', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['.', '.', '.', '.', '.', '.', '.', '.', '.', '.'], ['X', 'X', '.', 'X', 'X', '.', 'X', 'X', '.', 'X']]) == 9\n assert candidate(board = [['X', 'X', 'X', 'X'], ['.', '.', '.', '.'], ['X', 'X', 'X', 'X'], ['.', '.', '.', '.']]) == 2\n assert candidate(board = [['X', 'X', '.', '.'], ['.', '.', '.', 'X'], ['.', '.', '.', 'X'], ['.', '.', 'X', 'X']]) == 3\n assert candidate(board = [['X', '.', '.', '.'], ['X', 'X', '.', '.'], ['.', '.', '.', 'X'], ['.', '.', 'X', 'X']]) == 3\n", "comparison": "exact"}, "public_tests": ["[[\"X\",\".\",\".\",\"X\"],[\".\",\".\",\".\",\"X\"],[\".\",\".\",\".\",\"X\"]]", "[[\".\"]]"], "hints": [], "metadata": {"canonical_parameter_names": ["board"], "leetcode_dataset_entry_point": "Solution().countBattleships", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:44+00:00", "tests_total": 101, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "depth-first-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def count_battleships(board)", "container": null, "callable": "count_battleships", "parameters": [{"name": "board", "type": "Character[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 420, "task_id": "strong-password-checker", "difficulty": "Hard", "problem_description": "A password is considered strong if the below conditions are all met:\n\n- It has at least 6 characters and at most 20 characters.\n- It contains at least one lowercase letter, at least one uppercase letter, and at least one digit.\n- It does not contain three repeating characters in a row (i.e., \"Baaabb0\" is weak, but \"Baaba0\" is strong).\n\nGiven a string password, return the minimum number of steps required to make password strong. if password is already strong, return 0.\n\nIn one step, you can:\n\n- Insert one character to password,\n- Delete one character from password, or\n- Replace one character of password with another character.\n\nExample 1:\n\nInput: password = \"a\"\nOutput: 5\n\nExample 2:\n\nInput: password = \"aA1\"\nOutput: 3\n\nExample 3:\n\nInput: password = \"1337C0d3\"\nOutput: 0\n\nConstraints:\n\n- 1 <= password.length <= 50\n- password consists of letters, digits, dot '.' or exclamation mark '!'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(password = \"AAAbbb\") == 2\n assert candidate(password = \"aA1\") == 3\n assert candidate(password = \"Aa1234567890\") == 0\n assert candidate(password = \"Aaaaaa1A\") == 1\n assert candidate(password = \"Passwo0rd!!\") == 0\n assert candidate(password = \"A1b2C3\") == 0\n assert candidate(password = \"...!!!\") == 3\n assert candidate(password = \"A1b2C3d4E5f6G7\") == 0\n assert candidate(password = \"111111111111111111\") == 6\n assert candidate(password = \"A1B2C3D4E5F6G7H8I9J0\") == 1\n assert candidate(password = \"Aa1!Aa1!Aa1!Aa1!\") == 0\n assert candidate(password = \"Aa1111111111111111\") == 5\n assert candidate(password = \"A1A1A1A1\") == 1\n assert candidate(password = \"password\") == 2\n assert candidate(password = \"Aaaaaa\") == 1\n assert candidate(password = \"AAAAAaaaaaaa\") == 3\n assert candidate(password = \"Aa1234567890Aa1\") == 0\n assert candidate(password = \"Aa111\") == 1\n assert candidate(password = \"AaAaAaAaAaAaAaAaAaAa\") == 1\n assert candidate(password = \"aaa111\") == 2\n assert candidate(password = \"A1B2C3D4E5F6G7H8I9J0K\") == 2\n assert candidate(password = \"Aa1234567890123456\") == 0\n assert candidate(password = \"A1b2C3d4\") == 0\n assert candidate(password = \"12345678901234567890\") == 2\n assert candidate(password = \"aaaaaaa\") == 2\n assert candidate(password = \"Aa1234567890123\") == 0\n assert candidate(password = \"Aaa111\") == 1\n assert candidate(password = \"a\") == 5\n assert candidate(password = \"Aa1234567890Aa1234567890\") == 4\n assert candidate(password = \"AaAaAaAaAaAaAaAaAaA1\") == 0\n assert candidate(password = \"Aaaaaa1\") == 1\n assert candidate(password = \"............aaa\") == 5\n assert candidate(password = \"Aa1234567890Aa123456\") == 0\n assert candidate(password = \"11111111111111111111\") == 6\n assert candidate(password = \"1337C0d3\") == 0\n assert candidate(password = \"Password123\") == 0\n assert candidate(password = \"aaaaaaaaaaaaaaaaaaaaa\") == 7\n assert candidate(password = \"Aa123456\") == 0\n assert candidate(password = \"ABABABABABABABABAB\") == 2\n assert candidate(password = \"ABABABABABABABABABAB1\") == 2\n assert candidate(password = \"Aa1234567890Aa123\") == 0\n assert candidate(password = \"aaaaaaaaaaaaaa1A\") == 4\n assert candidate(password = \"A1b2C3D4E5F6G7H8I9J0\") == 0\n assert candidate(password = \"AAAbbbccc111111111111111111\") == 11\n assert candidate(password = \"AAAbbbCCCddd1111111111111111111\") == 15\n assert candidate(password = \"aaaabbbbccccddddeee\") == 5\n assert candidate(password = \"111222333444555666777888999000\") == 12\n assert candidate(password = \"abcABC123!!!123!!!123!!!123!!!\") == 10\n assert candidate(password = \"AaBbCc1234567890123456789012345678901234567890\") == 26\n assert candidate(password = \"AAAbbbCCCddd11111111111111111111\") == 16\n assert candidate(password = \"Aa1Aa1Aa1Aa1Aa1Aa1Aa1\") == 1\n assert candidate(password = \"A1A1A1A1A1A1A1A1A1A1\") == 1\n assert candidate(password = \"A1A1A1A1A1A1A1A1A1A1A1A1A\") == 6\n assert candidate(password = \"Aaaaaaaaaa1111111111!!!!!!!!!\") == 14\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 15\n assert candidate(password = \"abcdefgH1!\") == 0\n assert candidate(password = \"123456789012345678901234567890\") == 12\n assert candidate(password = \"aaaaaaaAAAAAA1111111\") == 6\n assert candidate(password = \"Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!\") == 28\n assert candidate(password = \"Password123Password123\") == 2\n assert candidate(password = \"aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1\") == 28\n assert candidate(password = \"AAAbbbCCCddd1111111111111111111111\") == 18\n assert candidate(password = \"abcdefghijklmnopqrstuvwxyz\") == 8\n assert candidate(password = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\") == 19\n assert candidate(password = \"xX1234567890Xx1234567890Xx1234567890\") == 16\n assert candidate(password = \"aA1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1\") == 23\n assert candidate(password = \"aabababababababababa\") == 2\n assert candidate(password = \"Aa123456789012345\") == 0\n assert candidate(password = \"Password!Password!Pass\") == 3\n assert candidate(password = \"A1!aA1!aA1!aA1!aA1!aA1!aA1!a\") == 8\n assert candidate(password = \"A1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!\") == 11\n assert candidate(password = \"aaaaaaaaaaaaaaaaaaaa\") == 6\n assert candidate(password = \"A1A1A1A1A1A1A1A1A1A1A1A1A1\") == 7\n assert candidate(password = \"bbbbbbbbbbbbbbbbb\") == 5\n assert candidate(password = \"Aa1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!\") == 20\n assert candidate(password = \"A1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!a\") == 12\n assert candidate(password = \"!aA1!aA1!aA1!aA1!aA1\") == 0\n assert candidate(password = \"AaaBBB111\") == 2\n assert candidate(password = \"A1A1A1A1A1A1A1A1A1A1A1\") == 3\n assert candidate(password = \"AAAbbbCCCddd11111111111111111111111\") == 19\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaA\") == 7\n assert candidate(password = \"aaAAaaAAaaAAaaAAaa\") == 1\n assert candidate(password = \"A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1\") == 23\n assert candidate(password = \"Aa1!Aa1!Aa1!\") == 0\n assert candidate(password = \"Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1Aa1A\") == 23\n assert candidate(password = \"aA1!aA1!aA1!aA1!aA1!\") == 0\n assert candidate(password = \"abAB1111111111111111\") == 5\n assert candidate(password = \"aaaaaaaAAAAAA666666\") == 6\n assert candidate(password = \"aaaAAA111!!!\") == 4\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaA\") == 5\n assert candidate(password = \"Aa111111111111111111\") == 6\n assert candidate(password = \"aaAA111111111111111\") == 5\n assert candidate(password = \"A1!aA1!aA1!aA1!aA1!aA1!aA1!aA1\") == 10\n assert candidate(password = \"abcABC123abcABC123\") == 0\n assert candidate(password = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 28\n assert candidate(password = \"Aa1Bb2Ccc3Ddd\") == 0\n assert candidate(password = \"AAAbbbCCCccc111111111\") == 7\n assert candidate(password = \"Abcde!23456789\") == 0\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 9\n assert candidate(password = \"AAAbbbCCCddd111111111111111111111111\") == 20\n assert candidate(password = \"aaabbbccc111222333\") == 6\n assert candidate(password = \"aA1bB2cC3dD4eE5fF6\") == 0\n assert candidate(password = \"aaaaaaaAAAAAA6666666\") == 6\n assert candidate(password = \"abcABC123abcABC123abcABC123\") == 7\n assert candidate(password = \"Aa1234567890123456789\") == 1\n assert candidate(password = \"aA1!aA1!aA1!aA1!\") == 0\n assert candidate(password = \"aA1aA1aA1aA1aA1aA1\") == 0\n assert candidate(password = \"111222333444555666777888999000111222333\") == 21\n assert candidate(password = \"aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1aA1\") == 22\n assert candidate(password = \"Aa1Aa1Aa1Aa1Aa1Aa1\") == 0\n assert candidate(password = \"Abc!1\") == 1\n assert candidate(password = \"aaaAAAbBBB11111111111111\") == 8\n assert candidate(password = \"AaaBBBcccDDD123\") == 3\n assert candidate(password = \"AAAbbccccdddEEF1234567890\") == 5\n assert candidate(password = \"aA111aA111aA111aA111\") == 4\n assert candidate(password = \"aaaaaaaAAAAAA66666666666666666666\") == 18\n assert candidate(password = \"0123456789012345678901234567890\") == 13\n assert candidate(password = \"aA1!aA1!aA1!aA1!aA1!aA1!\") == 4\n assert candidate(password = \"A1b2C3d4E5f6G7H8I9J0KLMN\") == 4\n assert candidate(password = \"aA1234567890Aa1234567890aA1234567890\") == 16\n assert candidate(password = \"abcdefghijABCD1234567890\") == 4\n assert candidate(password = \"AaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAa\") == 15\n assert candidate(password = \"Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!Aa1!\") == 12\n assert candidate(password = \"AAAbbbCCCddd111111111111111111\") == 14\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 13\n assert candidate(password = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") == 8\n assert candidate(password = \"AAAbbbCCCddd111111111111111111111\") == 17\n assert candidate(password = \"A1!aA1!aA1!aA1!aA1!aA1!aA1!aA\") == 9\n assert candidate(password = \"Password1Password1\") == 0\n assert candidate(password = \"Aa1aA1aA1aA1aA1aA1aA1\") == 1\n assert candidate(password = \"Aa12345678901234567890\") == 2\n assert candidate(password = \"aaAaaaAaaaAaaaAaaaAaaaA\") == 5\n assert candidate(password = \"00000000000000000000000000000000\") == 18\n assert candidate(password = \"aaaaaaaaaAAA9\") == 4\n assert candidate(password = \"Aaaaabbbb1\") == 2\n assert candidate(password = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == 11\n assert candidate(password = \"Aa1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!aA1!\") == 16\n", "comparison": "exact"}, "public_tests": ["\"a\"", "\"aA1\"", "\"1337C0d3\""], "hints": [], "metadata": {"canonical_parameter_names": ["password"], "leetcode_dataset_entry_point": "Solution().strongPasswordChecker", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:47+00:00", "tests_total": 174, "tests_dropped": 37, "flags": [], "topic_tags": ["string", "greedy", "heap-priority-queue"]}, "language": "ruby", "interface": {"raw_signature": "def strong_password_checker(password)", "container": null, "callable": "strong_password_checker", "parameters": [{"name": "password", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 421, "task_id": "maximum-xor-of-two-numbers-in-an-array", "difficulty": "Medium", "problem_description": "Given an integer array nums, return the maximum result of nums[i] XOR nums[j], where 0 <= i <= j < n.\n\nExample 1:\n\nInput: nums = [3,10,5,25,2,8]\nOutput: 28\nExplanation: The maximum result is 5 XOR 25 = 28.\n\nExample 2:\n\nInput: nums = [14,70,53,83,49,91,36,80,92,51,66,70]\nOutput: 127\n\nConstraints:\n\n- 1 <= nums.length <= 2 * 10^5\n- 0 <= nums[i] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [3, 10, 5, 25, 2, 8]) == 28\n assert candidate(nums = [14, 70, 53, 83, 49, 91, 36, 80, 92, 51, 66, 70]) == 127\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == 15\n assert candidate(nums = [1000000000, 2147483647, 0, 1]) == 2147483647\n assert candidate(nums = [4, 6, 7, 2, 1]) == 7\n assert candidate(nums = [0, 1]) == 1\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [8, 10, 2]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5]) == 7\n assert candidate(nums = [999999999, 888888888, 777777777, 666666666, 555555555, 444444444, 333333333, 222222222, 111111111, 1]) == 1036069302\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]) == 31\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 30\n assert candidate(nums = [16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 255]) == 240\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]) == 125\n assert candidate(nums = [8, 17, 24, 32, 41, 50, 58, 67, 75, 82, 91, 99]) == 123\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576]) == 1572864\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288]) == 786432\n assert candidate(nums = [16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192]) == 12288\n assert candidate(nums = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643, 2147483642, 2147483641, 2147483640, 2147483639, 2147483638]) == 15\n assert candidate(nums = [1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575]) == 1048574\n assert candidate(nums = [2147483647, 0, 1, 2147483646, 2]) == 2147483647\n assert candidate(nums = [8, 1, 2, 12, 7, 6]) == 15\n assert candidate(nums = [999999999, 888888888, 777777777, 666666666, 555555555, 444444444, 333333333, 222222222, 111111111]) == 1036069302\n assert candidate(nums = [8, 10, 1, 3, 127, 255, 2, 5, 7, 15, 31, 63]) == 254\n assert candidate(nums = [8388607, 16777214, 33554431, 67108862, 134217727, 268435454, 536870911, 1073741822]) == 1065353217\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000, 600000000, 700000000, 800000000, 900000000]) == 1047438080\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]) == 62\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005, 1000000006]) == 7\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576]) == 1572864\n assert candidate(nums = [8, 10, 2, 14, 7, 3, 9, 1, 13, 5, 11, 6, 4, 12, 0, 15]) == 15\n assert candidate(nums = [123456789, 987654321, 111111111, 222222222, 333333333, 444444444, 555555555]) == 1032168868\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, 201, 203, 205, 207]) == 254\n assert candidate(nums = [2147483647, 0, 1073741823, 1, 536870911, 2, 268435455, 3, 134217727, 4, 67108863, 5, 33554431, 6, 16777215, 7, 8388607, 8, 4194303, 9, 2097151, 10, 1048575, 11, 524287, 12, 262143, 13, 131071, 14, 65535, 15, 32767, 16]) == 2147483647\n assert candidate(nums = [1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575]) == 1047552\n assert candidate(nums = [15, 30, 45, 60, 75, 90, 105, 120, 135, 150]) == 255\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004]) == 7\n assert candidate(nums = [123456789, 234567890, 345678901, 456789012, 567890123, 678901234, 789012345, 890123456, 901234567]) == 1022202311\n assert candidate(nums = [1, 3, 7, 15, 31, 63, 127, 255, 511, 1023]) == 1022\n assert candidate(nums = [2147483647, 0]) == 2147483647\n assert candidate(nums = [65535, 65534, 65533, 65532, 65531, 65530, 65529, 65528, 65527, 65526, 65525, 65524, 65523, 65522, 65521, 65520]) == 15\n assert candidate(nums = [255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240]) == 15\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]) == 196608\n assert candidate(nums = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) == 6144\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000]) == 100311872\n assert candidate(nums = [3, 10, 5, 25, 2, 8, 12, 17, 20, 23, 28, 31]) == 31\n assert candidate(nums = [1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575]) == 1048574\n assert candidate(nums = [123456789, 987654321, 111111111, 222222222, 333333333, 444444444, 555555555, 666666666, 777777777]) == 1036069302\n assert candidate(nums = [999999999, 888888888, 777777777, 666666666, 555555555, 444444444, 333333333, 222222222, 111111111, 0]) == 1036069302\n assert candidate(nums = [134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144]) == 201326592\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == 15\n assert candidate(nums = [13, 1, 7, 3, 9, 2, 8, 4, 6, 10, 5, 11, 12, 14, 15]) == 15\n assert candidate(nums = [13, 26, 52, 104, 208, 416, 832, 1664, 3328, 6656, 13312]) == 14592\n assert candidate(nums = [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63]) == 62\n assert candidate(nums = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643, 2147483642, 2147483641, 2147483640]) == 7\n assert candidate(nums = [1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071]) == 130048\n assert candidate(nums = [2147483647, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 2147483647\n assert candidate(nums = [16777215, 8388607, 4194303, 2097151, 1048575, 524287, 262143, 131071, 65535, 32767, 16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1]) == 16777214\n assert candidate(nums = [1073741824, 536870912, 268435456, 134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152]) == 1610612736\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200]) == 1992\n assert candidate(nums = [2000000000, 1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250]) == 2043881088\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000]) == 1021940544\n assert candidate(nums = [6, 10, 1, 8, 3, 4, 9, 7, 2, 5]) == 15\n assert candidate(nums = [987654321, 123456789, 999999999, 111111111, 888888888, 222222222, 777777777, 333333333]) == 1032171812\n assert candidate(nums = [123456789, 987654321, 456789123, 321987654, 789123456, 654321987, 891234567, 219876543]) == 1032168868\n assert candidate(nums = [4, 6, 7, 2, 1]) == 7\n assert candidate(nums = [1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483647, 0]) == 2147483647\n assert candidate(nums = [16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256, 272, 288, 304, 320]) == 496\n assert candidate(nums = [1023, 511, 255, 127, 63, 31, 15, 7, 3, 1]) == 1022\n assert candidate(nums = [13, 29, 31, 45, 66, 78, 90, 103, 114, 129, 143, 155]) == 253\n assert candidate(nums = [8, 10, 15, 17, 3, 5, 18, 12]) == 30\n assert candidate(nums = [234, 567, 890, 1234, 5678, 9012, 3456, 7890, 12345, 67890]) == 80139\n assert candidate(nums = [2147483647, 0, 1, 2147483646, 1073741823, 1073741824, 536870911, 536870912]) == 2147483647\n assert candidate(nums = [100000000, 200000000, 300000000, 400000000, 500000000, 600000000, 700000000, 800000000, 900000000, 1000000000]) == 1047472896\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536]) == 98304\n assert candidate(nums = [1073741823, 536870911, 268435455, 134217727, 67108863, 33554431, 16777215, 8388607, 4194303, 2097151]) == 1071644672\n assert candidate(nums = [5, 3, 9, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191]) == 8188\n assert candidate(nums = [123, 456, 789, 101112, 131415, 161718, 192021, 222324, 252627]) == 261454\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]) == 31\n assert candidate(nums = [255, 127, 63, 31, 15, 7, 3, 1]) == 254\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 62\n assert candidate(nums = [16, 8, 4, 2, 1, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]) == 24576\n assert candidate(nums = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643]) == 7\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003]) == 3\n assert candidate(nums = [9, 5, 2, 7, 6, 8, 4, 1, 3, 10, 15, 20]) == 30\n assert candidate(nums = [13, 29, 18, 23, 56, 78, 99, 101, 112, 134, 156, 178]) == 255\n assert candidate(nums = [123456789, 987654321, 111111111, 222222222, 333333333, 444444444, 555555555, 666666666]) == 1036069302\n assert candidate(nums = [13, 1, 24, 31, 29, 2, 7, 0, 30, 19]) == 31\n assert candidate(nums = [111111111, 222222222, 333333333, 444444444, 555555555, 666666666, 777777777, 888888888, 999999999]) == 1036069302\n assert candidate(nums = [2147483647, 0, 1, 2147483646]) == 2147483647\n assert candidate(nums = [1073741823, 1073741822, 1073741821, 1073741820, 1073741819, 1073741818, 1073741817, 1073741816]) == 7\n assert candidate(nums = [123456789, 987654321, 111222333, 444555666, 777888999, 101010101, 202020202, 303030303, 404040404, 505050505]) == 1032168868\n assert candidate(nums = [1, 1073741823, 2147483647, 1073741824, 1073741825, 1073741826, 1073741827, 1073741828, 1073741829, 1073741830]) == 2147483647\n assert candidate(nums = [32, 16, 8, 4, 2, 1]) == 48\n assert candidate(nums = [134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]) == 201326592\n assert candidate(nums = [128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152]) == 3145728\n assert candidate(nums = [1073741823, 1073741824, 1073741822, 1073741825]) == 2147483647\n", "comparison": "exact"}, "public_tests": ["[3,10,5,25,2,8]", "[14,70,53,83,49,91,36,80,92,51,66,70]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMaximumXOR", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:49+00:00", "tests_total": 102, "tests_dropped": 6, "flags": [], "topic_tags": ["array", "hash-table", "bit-manipulation", "trie"]}, "language": "ruby", "interface": {"raw_signature": "def find_maximum_xor(nums)", "container": null, "callable": "find_maximum_xor", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 423, "task_id": "reconstruct-original-digits-from-english", "difficulty": "Medium", "problem_description": "Given a string s containing an out-of-order English representation of digits 0-9, return the digits in ascending order.\n\nExample 1:\n\nInput: s = \"owoztneoer\"\nOutput: \"012\"\n\nExample 2:\n\nInput: s = \"fviefuro\"\nOutput: \"45\"\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s[i] is one of the characters [\"e\",\"g\",\"f\",\"i\",\"h\",\"o\",\"n\",\"s\",\"r\",\"u\",\"t\",\"w\",\"v\",\"x\",\"z\"].\n- s is guaranteed to be valid.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"sevensixfivefourthree\") == \"34567\"\n assert candidate(s = \"fivefivethree\") == \"355\"\n assert candidate(s = \"oneonetwothreefourfivesixseveneightnine\") == \"1123456789\"\n assert candidate(s = \"fivefivesixsix\") == \"5566\"\n assert candidate(s = \"sixseveneightnine\") == \"6789\"\n assert candidate(s = \"nieseve\") == \"79\"\n assert candidate(s = \"onetwothree\") == \"123\"\n assert candidate(s = \"neon\") == \"1\"\n assert candidate(s = \"zerozerozerozerozero\") == \"00000\"\n assert candidate(s = \"zerofourzerooneeight\") == \"00148\"\n assert candidate(s = \"zerozerozero\") == \"000\"\n assert candidate(s = \"oneonezero\") == \"011\"\n assert candidate(s = \"eightonefivefourtwozerosixseventhree\") == \"012345678\"\n assert candidate(s = \"owoztneoer\") == \"012\"\n assert candidate(s = \"giosx\") == \"168\"\n assert candidate(s = \"oneoneeightoneeightone\") == \"111188\"\n assert candidate(s = \"fviefuro\") == \"45\"\n assert candidate(s = \"fourfoursixsixzero\") == \"04466\"\n assert candidate(s = \"twotwothreeelevensixsixzerozerozerozerozerozeronine\") == \"000000223669\"\n assert candidate(s = \"ennnoowewe\") == \"22\"\n assert candidate(s = \"eighteighteighthree\") == \"3888\"\n assert candidate(s = \"zerotwofour\") == \"024\"\n assert candidate(s = \"sixsixsix\") == \"666\"\n assert candidate(s = \"ninezeroonetwothreefourfivesixseveneightnine\") == \"01234567899\"\n assert candidate(s = \"nine\") == \"9\"\n assert candidate(s = \"oneeighttwothree\") == \"1238\"\n assert candidate(s = \"fivefourthreeoneeighttwosixsevenzerozerozero\") == \"00012345678\"\n assert candidate(s = \"twothree\") == \"23\"\n assert candidate(s = \"ninennine\") == \"99\"\n assert candidate(s = \"seven\") == \"7\"\n assert candidate(s = \"eight\") == \"8\"\n assert candidate(s = \"fivefivesevensevenseven\") == \"55777\"\n assert candidate(s = \"six\") == \"6\"\n assert candidate(s = \"fourfoursixsix\") == \"4466\"\n assert candidate(s = \"zeroonetwothreefourfivesixseveneightnine\") == \"0123456789\"\n assert candidate(s = \"twozeroonetwothreefourfivesixseveneightnine\") == \"01223456789\"\n assert candidate(s = \"uqpie\") == \"499\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnine\") == \"123456789\"\n assert candidate(s = \"nineeightsevenfoursixthreeonetwozero\") == \"012346789\"\n assert candidate(s = \"threethreethreethreethreethreethreethreethreethree\") == \"3333333333\"\n assert candidate(s = \"fiveseveneightfourzerotwothree\") == \"0234578\"\n assert candidate(s = \"fourzeroeighteightsixtwotwo\") == \"0224688\"\n assert candidate(s = \"fivefivesixsixsevensevenzerozero\") == \"00556677\"\n assert candidate(s = \"fivefourseveneightonesixninezero\") == \"01456789\"\n assert candidate(s = \"nineeightsevenzerosixfivethreezeroonetwo\") == \"0012356789\"\n assert candidate(s = \"sixseveneightsixsixsixsixtwosix\") == \"266666678\"\n assert candidate(s = \"fourfourfourfourfourfourfourfourfourfour\") == \"4444444444\"\n assert candidate(s = \"fourfoursixsixzerozerotwoeighttwoeighttwoeight\") == \"002224466888\"\n assert candidate(s = \"twotwotwothreeeighthree\") == \"222338\"\n assert candidate(s = \"fivesixseveneightninezeroonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefour\") == \"0111111111122222222223333333333333333333444444444456789\"\n assert candidate(s = \"eightfiveeightfiveeight\") == \"55888\"\n assert candidate(s = \"threeseveneightzeronineseven\") == \"037789\"\n assert candidate(s = \"onetwoonetwoonetwoonetwoone\") == \"111112222\"\n assert candidate(s = \"fourtwoeightzerosixsixsixsixtwoeight\") == \"0224666688\"\n assert candidate(s = \"twotwothreefourfoursix\") == \"223446\"\n assert candidate(s = \"zerowzerowzerowzerowzero\") == \"000002222\"\n assert candidate(s = \"sixtwoneightwozerotwozero\") == \"0022268\"\n assert candidate(s = \"fivetwofivesixfivesevenfivethree\") == \"23555567\"\n assert candidate(s = \"onefourthreezeroonetwoeightthreezero\") == \"001123348\"\n assert candidate(s = \"zerozerotwoonetwoonetwothreefour\") == \"001122234\"\n assert candidate(s = \"nineeightsevensixfivetwothreeonezero\") == \"012356789\"\n assert candidate(s = \"sevensevensevensevenseven\") == \"77777\"\n assert candidate(s = \"onetwothreefourfivesixseveneightninezeroonetwothree\") == \"0112233456789\"\n assert candidate(s = \"twotwoeighteightzerosixsixthree\") == \"02236688\"\n assert candidate(s = \"twothreefourfivesixseveneightnineseveneightsixfivethreeonezeroonetwothree\") == \"011223334556677889\"\n assert candidate(s = \"twoeightfourzerosixonetwoeight\") == \"01224688\"\n assert candidate(s = \"fourfourfoursixsixsix\") == \"444666\"\n assert candidate(s = \"twoseveneightzerozeroeightone\") == \"0012788\"\n assert candidate(s = \"zeroonetwothreefourfivesixseveneightninenineeight\") == \"012345678899\"\n assert candidate(s = \"fourzerotwoonetwoonetwothreefour\") == \"011222344\"\n assert candidate(s = \"eighteightsevensevensevensixsixsixsixsixtwo\") == \"26666677788\"\n assert candidate(s = \"nineninethreeeight\") == \"3899\"\n assert candidate(s = \"fiveeighttwofourzero\") == \"02458\"\n assert candidate(s = \"sevenonethreesevenzero\") == \"01377\"\n assert candidate(s = \"sixsixsixsixsixsixsixsix\") == \"66666666\"\n assert candidate(s = \"oneoneoneoneoneone\") == \"111111\"\n assert candidate(s = \"fiveseveneightsevensevenfoursixsixsix\") == \"456667778\"\n assert candidate(s = \"nineeightsevensixfivenineeightseven\") == \"56778899\"\n assert candidate(s = \"threeeightfivesixtwonine\") == \"235689\"\n assert candidate(s = \"sixfivesixfivesixfive\") == \"555666\"\n assert candidate(s = \"onezerotwothreefourfivesixseveneightnine\") == \"0123456789\"\n assert candidate(s = \"fiveeighteighteighteighteightsixsixsixsixsixtwo\") == \"256666688888\"\n assert candidate(s = \"seveneightzeroonetwothreefourfivesixnine\") == \"0123456789\"\n assert candidate(s = \"oneeighttwosixthreesevenfourfiveoneeight\") == \"1123456788\"\n assert candidate(s = \"fivefivefivefive\") == \"5555\"\n assert candidate(s = \"eighteenteeneighteeneighteen\") == \"888\"\n assert candidate(s = \"nineeightsevensixfivofoureightseven\") == \"145677889\"\n assert candidate(s = \"sixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsixsix\") == \"66666666666666666666666666\"\n assert candidate(s = \"twoeightfiveonesixsixeightthreezeroonetwo\") == \"01122356688\"\n assert candidate(s = \"sixsixsixsixsixsixsixsixsixsixtwoeightzero\") == \"0266666666668\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnineeightsevenzerozero\") == \"0012345677889\"\n assert candidate(s = \"fivefivesixsixsevensevensevenseven\") == \"55667777\"\n assert candidate(s = \"seveneightnineeightseven\") == \"77889\"\n assert candidate(s = \"threeeighthreesixtwozeroonetwo\") == \"01223368\"\n assert candidate(s = \"twoseveneightzerozeroeightoneonetwothreefour\") == \"00112234788\"\n assert candidate(s = \"threeeighttwotwoeightzerozerozero\") == \"00022388\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnineseveneight\") == \"12345677889\"\n assert candidate(s = \"sevenfoursixsixthreeeight\") == \"346678\"\n assert candidate(s = \"zeroseveneightfivefourthreeonetwoeighttwozeroonetwothreefour\") == \"001122233445788\"\n assert candidate(s = \"threeonetwozeroeightfivesixsevennine\") == \"012356789\"\n assert candidate(s = \"zerotwofoursixeightzerofoursixeight\") == \"002446688\"\n assert candidate(s = \"sevensixsixsixseven\") == \"66677\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnineeightfoursixthreeonetwozero\") == \"0112233445667889\"\n assert candidate(s = \"sixsixfivefivethreeeightthreezerotwo\") == \"023355668\"\n assert candidate(s = \"twotwosixsixsixthreeeight\") == \"2236668\"\n assert candidate(s = \"threeeightzeroseveneighttwoeightthree\") == \"02337888\"\n assert candidate(s = \"sixsixsixsixsixsixsixsixsixsixsixsixsixsix\") == \"66666666666666\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnineseven\") == \"1234567789\"\n assert candidate(s = \"nineteennineteennineeighteighteight\") == \"888999\"\n assert candidate(s = \"threeseveneightzeroninesevenonefour\") == \"01347789\"\n assert candidate(s = \"zerotwozeroonetwozeroonetwozeroone\") == \"0000111222\"\n assert candidate(s = \"sixsixsixfivefivetwoonetwoonetwo\") == \"1122255666\"\n assert candidate(s = \"fiveeightfiveonezeroeighttwoseven\") == \"01255788\"\n assert candidate(s = \"oneeighteighteightsixsixtwoonetwo\") == \"112266888\"\n assert candidate(s = \"eightsixthreezerosixtwozero\") == \"0023668\"\n assert candidate(s = \"sixsixsixsixsixsixsix\") == \"6666666\"\n assert candidate(s = \"sixseveneightninezerotwoonetwoonetwothreefour\") == \"011222346789\"\n assert candidate(s = \"zerotwozeroonetwozeroonetwozerooneonetwothreefourfivesixseveneightnine\") == \"0000111122223456789\"\n assert candidate(s = \"zerofivefivesixsixsixsixzeroseveneight\") == \"0055666678\"\n assert candidate(s = \"sixsevensixsevensixsevensix\") == \"6666777\"\n assert candidate(s = \"nineeightsevenfoursixthreeonetwo\") == \"12346789\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnineninenine\") == \"12345678999\"\n assert candidate(s = \"fourninesixfourthreezeroonetwoeightfour\") == \"0123444689\"\n assert candidate(s = \"zerotwozerozerozerozero\") == \"000002\"\n assert candidate(s = \"twothreefourfivesixseveneightnineeightseven\") == \"2345677889\"\n assert candidate(s = \"eighteennineteensixthreezerozero\") == \"003689\"\n assert candidate(s = \"onetwothreefourfivesixseveneightoneninezero\") == \"01123456789\"\n assert candidate(s = \"oneonetwothreefourfivesixseveneightninezeroonetwothreefourfivesixseveneightninezero\") == \"001112233445566778899\"\n assert candidate(s = \"fivefivefivefivefivefivefivefivefivefiveonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefourthreeonetwothreefour\") == \"1111122222333333333444445555555555\"\n assert candidate(s = \"sixsixsixsixsixfivefivefive\") == \"55566666\"\n assert candidate(s = \"threeonetwoeightsevenzero\") == \"012378\"\n assert candidate(s = \"sixsixsixsixsixsixsixsixsixsix\") == \"6666666666\"\n assert candidate(s = \"zerotwoonetwoonetwothreefourfivesixseveneightnine\") == \"0112223456789\"\n assert candidate(s = \"fivefourthreeonetwozeroeighteighttwo\") == \"012234588\"\n assert candidate(s = \"twosevensixsixeighttwosix\") == \"2266678\"\n assert candidate(s = \"zerofourfourfourfourfourfourfour\") == \"04444444\"\n assert candidate(s = \"threethreeeighttwofivefour\") == \"233458\"\n assert candidate(s = \"sixeighteighteensixeighteighteen\") == \"668888\"\n assert candidate(s = \"zeronineeightsevensixfivetwoonezero\") == \"001256789\"\n assert candidate(s = \"nineeightsevenfoursixzeronineeightsevenfoursix\") == \"04466778899\"\n assert candidate(s = \"eighteighteightsevensevensevenfoursixsixsix\") == \"4666777888\"\n assert candidate(s = \"zerotwothreefourfivesixseveneightnineonezero\") == \"00123456789\"\n assert candidate(s = \"fivethreefournineeighttwoseven\") == \"2345789\"\n assert candidate(s = \"threeeightthreeeightthreeeight\") == \"333888\"\n assert candidate(s = \"twotwotwofourfourfourfoursixsixsixsix\") == \"22244446666\"\n assert candidate(s = \"zerotwoonetwoonetwo\") == \"011222\"\n assert candidate(s = \"twotwoonetwoonetwoonezerozero\") == \"001112222\"\n assert candidate(s = \"ninenineninenineninenineninenineninenine\") == \"9999999999\"\n assert candidate(s = \"sixsixsixsevensevensevenfivefifivefive\") == \"5555666777\"\n assert candidate(s = \"threeeightsevenfourfivesixtwothree\") == \"23345678\"\n assert candidate(s = \"sixsixsixsixsixtwoonetwoonetwo\") == \"1122266666\"\n assert candidate(s = \"eightonetwozerofourfivesixnine\") == \"01245689\"\n assert candidate(s = \"eightsevenfoursixthreeonetwoeightseventhree\") == \"1233467788\"\n assert candidate(s = \"eightsevenfoursixthreeonetwoeightseven\") == \"123467788\"\n assert candidate(s = \"zerofourzerofourzerofour\") == \"000444\"\n assert candidate(s = \"onetwothreefourfivesixseveneightninenineeightsevenfoursixthreeonetwoeightseventhree\") == \"11223334456677788899\"\n assert candidate(s = \"sixsixsixsixsixsixsixsixsixsixtwoeightzeroonetwothreefourthreeonetwothreefour\") == \"0112223334466666666668\"\n assert candidate(s = \"nineeightsevenzerosixfoursixtwoonezero\") == \"0012466789\"\n assert candidate(s = \"fivezeroonetwothreefourfivesixseveneightninezero\") == \"001234556789\"\n assert candidate(s = \"threeeighttwozerofoureightonezeronine\") == \"001234889\"\n assert candidate(s = \"sevenzerothreeeightonetwozerozero\") == \"00012378\"\n assert candidate(s = \"fourzerosixfourzerosixfourzerosix\") == \"000444666\"\n assert candidate(s = \"fivefivefivefivefivefivefivefivefivefive\") == \"5555555555\"\n assert candidate(s = \"eighteighttwotwozerofourfour\") == \"0224488\"\n assert candidate(s = \"zeroonetwothreefourfivesixseveneightnineseveneightsixfivethreeonezeroonetwothreeonetwothreefour\") == \"001111222333344556677889\"\n assert candidate(s = \"zeroninetwoeighttwofiveeight\") == \"0225889\"\n assert candidate(s = \"onetwothreefourfivesixseveneightninenineninenine\") == \"123456789999\"\n assert candidate(s = \"sevenonesevenoneseven\") == \"11777\"\n assert candidate(s = \"onezerozeroonetwothreefourfivesixseveneightnine\") == \"001123456789\"\n assert candidate(s = \"zerotwoonetwoonetwothreefourfivesixseven\") == \"01122234567\"\n assert candidate(s = \"onetwothreefourfivesixseveneightninezeroonetwothreefourfivesixseveneightnine\") == \"0112233445566778899\"\n assert candidate(s = \"zeroseveneightfourzeroseveneightfour\") == \"00447788\"\n assert candidate(s = \"twofourfivesixeighteight\") == \"245688\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnineonetwothreefourfivesixseveneightnineonetwothreefourfivesixseveneightnine\") == \"111222333444555666777888999\"\n assert candidate(s = \"ninethreetwoeightsevenfivesixonefour\") == \"123456789\"\n assert candidate(s = \"twoseventhreesixthreeeight\") == \"233678\"\n assert candidate(s = \"zerofourzerofivefivefourfour\") == \"0044455\"\n assert candidate(s = \"onetwothreefourfivesixseveneightninezero\") == \"0123456789\"\n assert candidate(s = \"zerotwothreefourfivesixseveneightnineonezerotwothreefourfivesixseveneightninenine\") == \"00122334455667788999\"\n assert candidate(s = \"nineeightsevensixfivethreetwoonezero\") == \"012356789\"\n assert candidate(s = \"nineeightsixfoureeightfoureeighttwo\") == \"24468889\"\n assert candidate(s = \"nineeighteensixeightsixsixsix\") == \"6666889\"\n assert candidate(s = \"onetwothreefourfivesixseveneightninenine\") == \"1234567899\"\n assert candidate(s = \"threeeightonethreeeightthree\") == \"133388\"\n assert candidate(s = \"zerotwothreefourfivesixseveneightnine\") == \"023456789\"\n", "comparison": "exact"}, "public_tests": ["\"owoztneoer\"", "\"fviefuro\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().originalDigits", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:54+00:00", "tests_total": 185, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def original_digits(s)", "container": null, "callable": "original_digits", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 424, "task_id": "longest-repeating-character-replacement", "difficulty": "Medium", "problem_description": "You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times.\n\nReturn the length of the longest substring containing the same letter you can get after performing the above operations.\n\nExample 1:\n\nInput: s = \"ABAB\", k = 2\nOutput: 4\nExplanation: Replace the two 'A's with two 'B's or vice versa.\n\nExample 2:\n\nInput: s = \"AABABBA\", k = 1\nOutput: 4\nExplanation: Replace the one 'A' in the middle with 'B' and form \"AABBBBA\".\nThe substring \"BBBB\" has the longest repeating letters, which is 4.\nThere may exists other ways to achieve this answer too.\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s consists of only uppercase English letters.\n- 0 <= k <= s.length\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"ABABABAB\",k = 3) == 7\n assert candidate(s = \"AAAAAAAAAAAAABBBAABBCCDDEE\",k = 5) == 20\n assert candidate(s = \"AABBCCDD\",k = 2) == 4\n assert candidate(s = \"A\",k = 1) == 1\n assert candidate(s = \"AABAABBBCCCC\",k = 3) == 7\n assert candidate(s = \"ABBBB\",k = 0) == 4\n assert candidate(s = \"ABCCDEEEEE\",k = 3) == 8\n assert candidate(s = \"ABAB\",k = 2) == 4\n assert candidate(s = \"AABBB\",k = 2) == 5\n assert candidate(s = \"ZYXWVUTSRQPONMLKJIHGFEDCBA\",k = 25) == 26\n assert candidate(s = \"ABACBCAB\",k = 2) == 4\n assert candidate(s = \"ABBB\",k = 0) == 3\n assert candidate(s = \"ABBB\",k = 1) == 4\n assert candidate(s = \"ABCDE\",k = 1) == 2\n assert candidate(s = \"AABABBA\",k = 1) == 4\n assert candidate(s = \"AAABBBCCC\",k = 3) == 6\n assert candidate(s = \"AAAA\",k = 2) == 4\n assert candidate(s = \"ABCDE\",k = 3) == 4\n assert candidate(s = \"ABCDE\",k = 2) == 3\n assert candidate(s = \"AABBBBCCDDDDD\",k = 2) == 7\n assert candidate(s = \"ACBACBACBACBACBACBACBACBACBACBAC\",k = 5) == 8\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",k = 0) == 40\n assert candidate(s = \"AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDD\",k = 15) == 26\n assert candidate(s = \"AAAAAAAAAA\",k = 5) == 10\n assert candidate(s = \"ABCABCABCABCABCABCABCABCABCABC\",k = 10) == 16\n assert candidate(s = \"AAAAAAAAAAAABBBBCCCC\",k = 10) == 20\n assert candidate(s = \"ABABABAB\",k = 1) == 3\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ\",k = 25) == 27\n assert candidate(s = \"AAABBBCCCDDDAAABBBCCCDDD\",k = 7) == 10\n assert candidate(s = \"QWERTYUIOPASDFGHJKLZXCVBNM\",k = 24) == 25\n assert candidate(s = \"AAAAAAAAAAAABBBCCCCCCAAAAAAAAAAA\",k = 6) == 18\n assert candidate(s = \"AAABBBAABBCCDDDDDDDEEFFGGHHIIJJJKKKLLLMMMNNN\",k = 25) == 32\n assert candidate(s = \"AAAAAAAAAABBBBBBBBBBBCCCCCCDDDDDDDDDDD\",k = 25) == 36\n assert candidate(s = \"MMMMNNNNOOOO\",k = 5) == 9\n assert candidate(s = \"AAAAAAAAABBB\",k = 2) == 11\n assert candidate(s = \"AABABABABAB\",k = 5) == 11\n assert candidate(s = \"ABABABABABABABABABABABABABABABABAB\",k = 15) == 31\n assert candidate(s = \"ABACABAACBACABCABACBACABCABACBACABCABACBACABCABACBACAB\",k = 20) == 36\n assert candidate(s = \"AAAAAAAAAABBBBBBBBCCCCCCCCCC\",k = 10) == 20\n assert candidate(s = \"ABCDEABCDEABCDEABCDEABCDE\",k = 10) == 13\n assert candidate(s = \"ABBCCCDDDDEEEEEFFFFFF\",k = 6) == 12\n assert candidate(s = \"ABABABABABABABABAB\",k = 10) == 18\n assert candidate(s = \"ABACABACABACABACABACABACABACABACABACABAC\",k = 15) == 31\n assert candidate(s = \"ABABABABABABABABABABABABABABABABABABABAB\",k = 15) == 31\n assert candidate(s = \"ABABABABABABABABABABABABABABABAB\",k = 0) == 1\n assert candidate(s = \"AABABABABABABABABABABABABABABABAB\",k = 5) == 12\n assert candidate(s = \"AABCABCABCABCABCABC\",k = 4) == 8\n assert candidate(s = \"BAAAAAAAAAABAAAAAAAAAAB\",k = 5) == 23\n assert candidate(s = \"AABBCCDDEEFFGG\",k = 3) == 5\n assert candidate(s = \"ACACACACACACAC\",k = 2) == 5\n assert candidate(s = \"AAABBBCCCDDDAAABBBCCCDDDAAABBBCCCDDD\",k = 20) == 29\n assert candidate(s = \"ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB\",k = 10) == 21\n assert candidate(s = \"ABACABACABACABACABACABACABACABAC\",k = 5) == 11\n assert candidate(s = \"AAABBBCCCDDD\",k = 4) == 7\n assert candidate(s = \"XYZXYZXYZXYZXYZXYZXYZXYZ\",k = 15) == 23\n assert candidate(s = \"ABCDEABCDEABCDEABCDEABCDEABCDE\",k = 6) == 8\n assert candidate(s = \"ABBBABAABBBBBBBBAAABBB\",k = 5) == 17\n assert candidate(s = \"AAAAAAAAAAABBBBBBBBBBB\",k = 10) == 21\n assert candidate(s = \"ABABABABAB\",k = 5) == 10\n assert candidate(s = \"AAABBCCDDEEFFF\",k = 4) == 7\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAB\",k = 1) == 24\n assert candidate(s = \"XYZXYZXYZXYZ\",k = 3) == 5\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",k = 26) == 26\n assert candidate(s = \"ABABABABABABABAB\",k = 8) == 16\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAA\",k = 0) == 20\n assert candidate(s = \"AABBBCCCDDDDDEEEEFFFFFFGGGGGGHHHHHIIIJJJKKKLLLLMMMMNNNNOOOOPPPP\",k = 30) == 36\n assert candidate(s = \"BBBBBBBBBBBBBBBBBBBBBAAAAAAAAAAAAA\",k = 5) == 26\n assert candidate(s = \"AABABBAACCCDDDEEE\",k = 3) == 8\n assert candidate(s = \"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\",k = 0) == 106\n assert candidate(s = \"AAAAAAAABBBBBBBB\",k = 0) == 8\n assert candidate(s = \"ABABABABABABAB\",k = 7) == 14\n assert candidate(s = \"AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXXYYYYZZZZ\",k = 50) == 54\n assert candidate(s = \"ABCABCABCABCABCABCABCABC\",k = 15) == 23\n assert candidate(s = \"AABBBCCDDEE\",k = 2) == 5\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\",k = 100) == 108\n assert candidate(s = \"AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ\",k = 20) == 22\n assert candidate(s = \"AAABBBCCCDDD\",k = 3) == 6\n assert candidate(s = \"AAAAA\",k = 0) == 5\n assert candidate(s = \"AABBBCCCDDDD\",k = 3) == 7\n assert candidate(s = \"AAABBBCCCDDDEEEFFF\",k = 6) == 9\n assert candidate(s = \"AAAAAAAAABBBBBBBBCCCCCCCCCC\",k = 10) == 20\n assert candidate(s = \"BBBAAAABBBAAAABBBAAAABBB\",k = 5) == 13\n assert candidate(s = \"ABABABABABABABABABAB\",k = 5) == 11\n assert candidate(s = \"ACACACACACACACACACACACAC\",k = 5) == 11\n assert candidate(s = \"ABACABACABAC\",k = 4) == 9\n assert candidate(s = \"ABABABABABABABABABAB\",k = 10) == 20\n assert candidate(s = \"AAAAAAABBBCCCDDDDDD\",k = 5) == 12\n assert candidate(s = \"BBBBAAAACCCD\",k = 4) == 8\n assert candidate(s = \"QWERTYUIOPASDFGHJKLZXCVBNM\",k = 26) == 26\n assert candidate(s = \"XYZXYZXYZXYZXYZXYZ\",k = 6) == 10\n assert candidate(s = \"AAAAAAAAAAABBBBCCCCCDDDD\",k = 10) == 21\n assert candidate(s = \"BBBBAAAACCCCDDDD\",k = 5) == 9\n assert candidate(s = \"XYZXYZXYZXYZXYZXYZXYZXYZ\",k = 20) == 24\n assert candidate(s = \"AAAAAAAABBBBBBBB\",k = 3) == 11\n assert candidate(s = \"AAAAAAAAAAAAAAAABBB\",k = 2) == 18\n assert candidate(s = \"XYZXYZXYZ\",k = 3) == 5\n assert candidate(s = \"AABBCDEEFGHIJKLLMNOPQRSTUVWXYZ\",k = 25) == 27\n assert candidate(s = \"AABABBAABBCCDDEEFFGG\",k = 4) == 9\n assert candidate(s = \"AABBCCDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ\",k = 25) == 27\n assert candidate(s = \"AAABBBCCCDDD\",k = 6) == 9\n", "comparison": "exact"}, "public_tests": ["\"ABAB\"\n2", "\"AABABBA\"\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().characterReplacement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:48:56+00:00", "tests_total": 105, "tests_dropped": 5, "flags": [], "topic_tags": ["hash-table", "string", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def character_replacement(s, k)", "container": null, "callable": "character_replacement", "parameters": [{"name": "s", "type": "String"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 433, "task_id": "minimum-genetic-mutation", "difficulty": "Medium", "problem_description": "A gene string can be represented by an 8-character long string, with choices from 'A', 'C', 'G', and 'T'.\n\nSuppose we need to investigate a mutation from a gene string startGene to a gene string endGene where one mutation is defined as one single character changed in the gene string.\n\n- For example, \"AACCGGTT\" --> \"AACCGGTA\" is one mutation.\n\nThere is also a gene bank bank that records all the valid gene mutations. A gene must be in bank to make it a valid gene string.\n\nGiven the two gene strings startGene and endGene and the gene bank bank, return the minimum number of mutations needed to mutate from startGene to endGene. If there is no such a mutation, return -1.\n\nNote that the starting point is assumed to be valid, so it might not be included in the bank.\n\nExample 1:\n\nInput: startGene = \"AACCGGTT\", endGene = \"AACCGGTA\", bank = [\"AACCGGTA\"]\nOutput: 1\n\nExample 2:\n\nInput: startGene = \"AACCGGTT\", endGene = \"AAACGGTA\", bank = [\"AACCGGTA\",\"AACCGCTA\",\"AAACGGTA\"]\nOutput: 2\n\nConstraints:\n\n- 0 <= bank.length <= 10\n- startGene.length == endGene.length == bank[i].length == 8\n- startGene, endGene, and bank[i] consist of only the characters ['A', 'C', 'G', 'T'].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAACGGTA\",bank = ['AACCGGTA', 'AACCGCTA', 'AAACGGTA']) == 2\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = ['AACCGGTA']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = []) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = ['TACCGGTA']) == -1\n assert candidate(startGene = \"AAAAAAAA\",endGene = \"CCCCCCCC\",bank = ['AAAAAAAA', 'AAAAAAAC', 'AAAAAACC', 'AAAAACCC', 'AAAACCCC', 'AAACCCCC', 'AACCCCCC', 'ACCCCCCC', 'CCCCCCCC']) == 8\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCAAAA\",bank = ['AACCAAAA', 'AACCAAAT', 'AACCAATA', 'AACCGAAA', 'AACCAATA', 'AACCAATT', 'AACAAATT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT']) == 4\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCTGCTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'ACCGGCTA', 'ACCTGCTA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTTTCCCC\",bank = ['AAACGGCT', 'AACCGGCA', 'AAACGGTA', 'AAACGGCC', 'TTTTCCCC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGCGCG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'ACCGCGTA', 'ACCGCGCG', 'ACCGCGCT', 'ACCGCGTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGCCGACT\",bank = ['AACCGGCA', 'AACCGGAA', 'AACCGGGA', 'GGCCGGTA', 'GGCCGGCA', 'GGCCGGAA', 'GGCCGGGA', 'GGCCGACT']) == -1\n assert candidate(startGene = \"ACAGACGG\",endGene = \"AACCGGGA\",bank = ['AACGACGG', 'AACGACGT', 'AACGGCGT', 'AACGGCGA', 'AACGGGGA', 'AACCGGGA']) == -1\n assert candidate(startGene = \"ACGTACGT\",endGene = \"TTACGTAC\",bank = ['ACGTACGA', 'TTACGTAA', 'TTACGTAC', 'TTACGTCG', 'ACGTACGG']) == -1\n assert candidate(startGene = \"AAAAAAAA\",endGene = \"CCCCCCCC\",bank = ['AAAAAACC', 'AAAAACCC', 'AAAACCCC', 'AAACCCCC', 'AACCACCC', 'AACCCCAC', 'AACCACCC', 'ACCAACCC', 'ACCCACCC', 'CCCCCCCC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GACCGGTA\",bank = ['AACCGGCA', 'GACCGGTA', 'AACCGGCT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT', 'GACCGGTT', 'GACCGGTC', 'GACCGGTA', 'GACCGGAC']) == 2\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGTAA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGTC', 'AACCGTCA', 'AACCGTAA']) == 4\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGCT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTTTTTTT\",bank = ['AAACGGTA', 'AACCGCTA', 'AAACGGTT', 'TTTTGGTT', 'TTTTTGGT', 'TTTTTTGT', 'TTTTTTTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGGGGGGG\",bank = ['AACCGGTA', 'AACCGGTC', 'TACCGGTT', 'GGACGGTT', 'GGGGGGTA', 'GGGGGGTT', 'GGGGGGGT', 'GGGGGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"CGCGCGCG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'CGCGGGTA', 'CGCGCGCG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGAACTTT\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'GAACGGTA', 'GGAACTTA', 'GGAACTTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGCT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT', 'AACCGGTC', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGCT\",bank = ['AACCGGCA', 'AACCGGCG', 'AACCGGCT', 'AACCGGCT', 'AACCGGCT']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTCGCGCG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'TTCGCGTA', 'TTCGCGCG']) == -1\n assert candidate(startGene = \"AAAAACCC\",endGene = \"GGGGCCCC\",bank = ['AAAACCCC', 'AAAGCCCC', 'AAGGCCCC', 'GGGGCCCC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'AAACGGCA', 'AACCGGCA', 'AAACGGTA', 'AAACGGCA', 'AACCGGCA', 'AAACGGTA', 'AAACGGCA']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGGGGGGA\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'GGGGGGTT', 'GGGGGGTA', 'GGGGGGGA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTA\",bank = ['AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA', 'AACCGGTA']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAAAAAAA\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'AAAAAGTA', 'AAAAAAAA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTTTTTTT\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'TTTTTTTA', 'TTTTTTTT']) == -1\n assert candidate(startGene = \"AAAAACCC\",endGene = \"CCCCGGGG\",bank = ['AACCCCCC', 'ACCCCCCG', 'ACCACCCC', 'ACCACCCC', 'ACCCCACG', 'CCCCGGGA', 'CCCCGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGTGTA\",bank = ['AACCGGTA', 'AACCGCTA', 'AAACGGTA', 'ACCGTGTA', 'ACCGTGGT', 'ACCGTGTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGCGCG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'ACCGCGTA', 'ACCGCGCG', 'ACCGCGCT', 'ACCGCGTT', 'ACCGCGGA', 'ACCGCGGC', 'ACCGCGCC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGGTTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGCT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT', 'ACCGGTTA', 'ACCGGGTA', 'ACCGGATA', 'ACCGGTTT']) == -1\n assert candidate(startGene = \"GACCGGTA\",endGene = \"AACCGGTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGCT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT', 'GACCGGTT', 'GACCGGTC', 'GACCGGTA', 'GACCGGAC']) == 1\n assert candidate(startGene = \"AAACGGTA\",endGene = \"AACCGGTA\",bank = ['AAACGGTT', 'AACCGGTT', 'AACCGGTA']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGGA\",bank = ['AACCGGTA', 'AACCGGCA', 'AACCGGGA', 'AACCGGGA', 'AACCGGGA']) == 2\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGGGGGGG\",bank = ['AACCGGTA', 'AAACGGTA', 'GGAAAAAA', 'GGGGGGGA', 'GGGGGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGGCTA\",bank = ['AACCGGTA', 'AACCGCTA', 'ACCGGCTA', 'ACCGGCTC', 'ACCGGCCC', 'ACCGGTTA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAACGGGA\",bank = ['AACCGGTA', 'AAACGGTA', 'AAACGGCA', 'AAACGGAA', 'AAACGGGA', 'AAACGGGA']) == 3\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACGGTACC\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'ACGGTACC']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGTC\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'AACCGGTC']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGGGGGGG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'GGGGGGTA', 'GGGGGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAACGGCC\",bank = ['AAACGGTA', 'AAACGGCA', 'AAACGGCC', 'AACCGGCA', 'AACCGGTA', 'AACCGGTC']) == 4\n assert candidate(startGene = \"AGCTATAG\",endGene = \"GACTGTAG\",bank = ['AGCTATAC', 'AGCTGTAG', 'AGCTTTAG', 'GACTATAG', 'GACTGTAG', 'GACTTTAG', 'GAATATAG', 'GGCTATAG', 'AGGTATAG']) == 3\n assert candidate(startGene = \"AAGAACGG\",endGene = \"GGAACGGT\",bank = ['AAGAACGA', 'AAGAACGG', 'AAGAACGT', 'AAGACGGT', 'AAGGACGT', 'AGGAACGT', 'GGAACGGT', 'GGAACGGC', 'GGAACGGA', 'GGGAACGA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAACGGGA\",bank = ['AACCGGTA', 'AACCGCTA', 'AAACGGTA', 'AAACGGGA', 'AAACGGGC', 'AACCGGGT', 'AACCGGGG']) == 3\n assert candidate(startGene = \"ACGTACGT\",endGene = \"TGCATGCA\",bank = ['ACGTACGA', 'ACGTACGC', 'ACGTCAGT', 'TACGACGT', 'TGCATGCA', 'TGCATGCG', 'TGCATGTA', 'TGCAACGT', 'TGCGACGT', 'TGCAACGG']) == -1\n assert candidate(startGene = \"AAAAAAAA\",endGene = \"AAAAAAAA\",bank = ['AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA', 'AAAAAAAA']) == 0\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AACCGGCT\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'AACCGGCA', 'AACCGGCT']) == 1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGGTTA\",bank = ['AACCGGTA', 'AACCGGCT', 'AACCGGCA', 'ACCGGTTA', 'ACCGGGTA', 'ACCGGTCG', 'ACCGGCTA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAGCGGTA\",bank = ['AACCGGTA', 'AAGCGGTA', 'AACCGCTA', 'AAACGGTA']) == 2\n assert candidate(startGene = \"AACCGGTT\",endGene = \"CGTACGTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AAACGGTA', 'AACCGGAC', 'CGTACGTA', 'CGTACGTT', 'CGTACGCA']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TTTTTTTT\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'TTTTGGTA', 'TTTTTTTA', 'TTTTTTTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"AAGCGGTA\",bank = ['AACCGGCA', 'AACCGGTA', 'AACCGGTA', 'AAGCGGTA']) == 2\n assert candidate(startGene = \"AACCGGTT\",endGene = \"TACCGGTA\",bank = ['AACCGGTC', 'TACCGGTA', 'AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'TACCGGTA', 'TACCGGTT', 'TACCGGTC']) == 2\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GGGGGGGG\",bank = ['AACCGGTA', 'AACCGGCA', 'AACCGGGA', 'AAGCGGGA', 'AAGCGGTA', 'AAGCGGGA', 'GGGGGGGA', 'GGGGGGGG']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"GACCGGTA\",bank = ['AACCGGCA', 'GACCGGTA', 'AACCGGCT', 'AACCGGAA', 'AACCGGAT', 'AACCGGTT']) == -1\n assert candidate(startGene = \"AACCGGTT\",endGene = \"ACCGCGCG\",bank = ['AACCGGTA', 'AACCGGCA', 'AAACGGTA', 'ACCGCGTA', 'ACCGCGCG', 'ACCGCGCT', 'ACCGCGTT', 'ACCGCGGA']) == -1\n", "comparison": "exact"}, "public_tests": ["\"AACCGGTT\"\n\"AACCGGTA\"\n[\"AACCGGTA\"]", "\"AACCGGTT\"\n\"AAACGGTA\"\n[\"AACCGGTA\",\"AACCGCTA\",\"AAACGGTA\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["startGene", "endGene", "bank"], "leetcode_dataset_entry_point": "Solution().minMutation", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:01+00:00", "tests_total": 81, "tests_dropped": 23, "flags": [], "topic_tags": ["hash-table", "string", "breadth-first-search", "bidirectional-search"]}, "language": "ruby", "interface": {"raw_signature": "def min_mutation(start_gene, end_gene, bank)", "container": null, "callable": "min_mutation", "parameters": [{"name": "start_gene", "type": "String"}, {"name": "end_gene", "type": "String"}, {"name": "bank", "type": "String[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 435, "task_id": "non-overlapping-intervals", "difficulty": "Medium", "problem_description": "Given an array of intervals intervals where intervals[i] = [start_i, end_i], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.\n\nNote that intervals which only touch at a point are non-overlapping. For example, [1, 2] and [2, 3] are non-overlapping.\n\nExample 1:\n\nInput: intervals = [[1,2],[2,3],[3,4],[1,3]]\nOutput: 1\nExplanation: [1,3] can be removed and the rest of the intervals are non-overlapping.\n\nExample 2:\n\nInput: intervals = [[1,2],[1,2],[1,2]]\nOutput: 2\nExplanation: You need to remove two [1,2] to make the rest of the intervals non-overlapping.\n\nExample 3:\n\nInput: intervals = [[1,2],[2,3]]\nOutput: 0\nExplanation: You don't need to remove any of the intervals since they're already non-overlapping.\n\nConstraints:\n\n- 1 <= intervals.length <= 10^5\n- intervals[i].length == 2\n- -5 * 10^4 <= start_i < end_i <= 5 * 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [1, 3]]) == 1\n assert candidate(intervals = [[-2, -1], [1, 2], [-1, 1], [2, 3]]) == 0\n assert candidate(intervals = [[1, 5], [2, 3], [4, 6], [7, 8]]) == 1\n assert candidate(intervals = [[1, 2], [2, 3]]) == 0\n assert candidate(intervals = [[0, 2], [1, 3], [2, 4], [3, 5]]) == 2\n assert candidate(intervals = [[-5, -4], [-4, -3], [-3, -2], [-2, -1]]) == 0\n assert candidate(intervals = [[-2, -1], [0, 1], [1, 2], [2, 3]]) == 0\n assert candidate(intervals = [[1, 10], [2, 3], [4, 5], [6, 7], [8, 9]]) == 1\n assert candidate(intervals = [[1, 100], [11, 22], [1, 11], [2, 12]]) == 2\n assert candidate(intervals = [[1, 10], [2, 6], [3, 5], [7, 9]]) == 2\n assert candidate(intervals = [[-5, 5], [0, 1], [1, 2], [2, 3], [3, 4]]) == 1\n assert candidate(intervals = [[1, 3], [2, 4], [3, 5], [4, 6]]) == 2\n assert candidate(intervals = [[1, 2], [1, 2], [1, 2]]) == 2\n assert candidate(intervals = [[-1, 1], [1, 2], [2, 3], [3, 4]]) == 0\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21]]) == 0\n assert candidate(intervals = [[-1, 1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9]]) == 4\n assert candidate(intervals = [[1, 4], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == 1\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7]]) == 0\n assert candidate(intervals = [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]) == 6\n assert candidate(intervals = [[-10, 0], [-5, -2], [0, 5], [5, 10]]) == 1\n assert candidate(intervals = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92], [10, 91]]) == 9\n assert candidate(intervals = [[-5, 0], [0, 5], [5, 10], [10, 15], [-4, 1], [2, 8]]) == 2\n assert candidate(intervals = [[5, 10], [6, 8], [8, 10], [9, 12], [10, 14]]) == 2\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 0\n assert candidate(intervals = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9]]) == 3\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]) == 0\n assert candidate(intervals = [[-1, 1], [0, 2], [-2, 0], [1, 3]]) == 2\n assert candidate(intervals = [[1, 10], [5, 15], [10, 20], [15, 25]]) == 2\n assert candidate(intervals = [[1, 10000], [5000, 15000], [10000, 20000], [15000, 25000]]) == 2\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14]]) == 0\n assert candidate(intervals = [[-1, 1], [0, 2], [2, 3], [-3, -2]]) == 1\n assert candidate(intervals = [[-50000, 50000], [-49999, 49999], [0, 1], [1, 2], [2, 3]]) == 2\n assert candidate(intervals = [[1, 10], [2, 3], [4, 5], [6, 7], [8, 9], [9, 10]]) == 1\n assert candidate(intervals = [[0, 10], [10, 20], [20, 30], [30, 40], [0, 40]]) == 1\n assert candidate(intervals = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6]]) == 4\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21]]) == 0\n assert candidate(intervals = [[-1, 1], [-2, -1], [1, 2], [0, 1], [2, 3], [3, 4], [4, 5]]) == 1\n assert candidate(intervals = [[1, 5], [2, 3], [4, 6], [7, 8], [9, 10], [11, 12]]) == 1\n assert candidate(intervals = [[-50000, 50000], [0, 1], [1, 2], [2, 3], [3, 4]]) == 1\n assert candidate(intervals = [[1, 20], [3, 5], [2, 4], [6, 7], [8, 10], [11, 12]]) == 2\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [1, 11], [11, 21], [21, 31], [31, 41], [41, 51]]) == 2\n assert candidate(intervals = [[-1, 1], [0, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == 1\n assert candidate(intervals = [[1, 10], [2, 3], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9]]) == 3\n assert candidate(intervals = [[1, 3], [1, 2], [2, 3], [2, 4], [3, 5], [4, 6], [5, 7]]) == 3\n assert candidate(intervals = [[1, 5], [3, 7], [6, 10], [10, 15], [14, 20]]) == 2\n assert candidate(intervals = [[5, 10], [15, 20], [5, 15], [10, 25], [25, 30]]) == 2\n assert candidate(intervals = [[1, 20], [5, 10], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50], [45, 55], [50, 60]]) == 5\n assert candidate(intervals = [[1, 4], [2, 5], [3, 6], [4, 7], [5, 8]]) == 3\n assert candidate(intervals = [[-5, 5], [0, 10], [5, 15], [10, 20]]) == 2\n assert candidate(intervals = [[1, 4], [2, 5], [3, 6], [4, 7]]) == 2\n assert candidate(intervals = [[-1, 1], [-2, -1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9]]) == 4\n assert candidate(intervals = [[-5, -3], [-4, -2], [-3, -1], [-2, 0], [-1, 1], [0, 2], [2, 4], [4, 6]]) == 3\n assert candidate(intervals = [[0, 5], [1, 6], [2, 7], [3, 8], [4, 9], [5, 10], [6, 11], [7, 12], [8, 13], [9, 14]]) == 8\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45]]) == 3\n assert candidate(intervals = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96]]) == 4\n assert candidate(intervals = [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]) == 9\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 0\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 0\n assert candidate(intervals = [[1, 3], [1, 4], [1, 5], [2, 4], [2, 5], [3, 5], [3, 6], [4, 6], [4, 7], [5, 7]]) == 7\n assert candidate(intervals = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94]]) == 6\n assert candidate(intervals = [[1, 10], [2, 5], [3, 7], [4, 8], [5, 9], [6, 11]]) == 4\n assert candidate(intervals = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11]]) == 9\n assert candidate(intervals = [[1, 10], [5, 15], [10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50], [45, 55], [50, 60], [55, 65], [60, 70], [65, 75], [70, 80]]) == 7\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16]]) == 0\n assert candidate(intervals = [[-10000, -9000], [-8000, -7000], [-6000, -5000], [-4000, -3000], [-2000, -1000], [0, 1000], [1000, 2000], [2000, 3000], [3000, 4000]]) == 0\n assert candidate(intervals = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7]]) == 5\n assert candidate(intervals = [[-1, 1], [1, 3], [2, 4], [3, 5]]) == 1\n assert candidate(intervals = [[1, 3], [2, 5], [3, 7], [4, 9], [5, 11], [6, 13], [7, 15], [8, 17], [9, 19], [10, 21]]) == 7\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14], [11, 15], [12, 16], [13, 17], [14, 18], [15, 19]]) == 11\n assert candidate(intervals = [[1, 2], [3, 4], [2, 3], [4, 5], [3, 4], [5, 6]]) == 1\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [1, 10], [11, 20]]) == 1\n assert candidate(intervals = [[1, 4], [2, 5], [3, 6], [4, 7], [5, 8], [6, 9]]) == 4\n assert candidate(intervals = [[1, 10], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11]]) == 1\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21], [1, 21]]) == 1\n assert candidate(intervals = [[1, 4], [2, 8], [3, 9], [4, 10], [5, 11], [6, 12]]) == 4\n assert candidate(intervals = [[10, 20], [20, 30], [30, 40], [15, 25], [25, 35], [35, 45]]) == 3\n assert candidate(intervals = [[1, 5], [2, 3], [3, 4], [4, 5], [5, 6]]) == 1\n assert candidate(intervals = [[-1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 0\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50]]) == 0\n assert candidate(intervals = [[-5, -3], [-4, -2], [-3, -1], [-2, 0], [-1, 1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6]]) == 5\n assert candidate(intervals = [[1, 10], [2, 3], [4, 5], [6, 7], [8, 9], [1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]) == 1\n assert candidate(intervals = [[1, 3], [1, 3], [1, 3], [1, 3]]) == 3\n assert candidate(intervals = [[-1, 1], [0, 2], [-2, -1], [1, 3], [2, 4], [-3, -2], [4, 5]]) == 2\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [1, 11]]) == 1\n assert candidate(intervals = [[-10, -5], [-5, 0], [0, 5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30]]) == 0\n assert candidate(intervals = [[1, 3], [2, 4], [2, 5], [3, 6], [3, 7], [4, 8], [5, 9]]) == 5\n assert candidate(intervals = [[1, 3], [2, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]) == 3\n assert candidate(intervals = [[1, 2], [1, 2], [1, 2], [2, 3], [2, 3], [2, 3], [3, 4], [3, 4], [3, 4]]) == 6\n assert candidate(intervals = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7]]) == 2\n assert candidate(intervals = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [5, 15], [25, 35]]) == 4\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [1, 4], [2, 5], [3, 6], [4, 7], [5, 8], [6, 9], [7, 10]]) == 5\n assert candidate(intervals = [[-10, 0], [0, 10], [10, 20], [-20, -10], [-10, -5], [-5, 0], [0, 5], [5, 10], [10, 15]]) == 3\n assert candidate(intervals = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 0\n assert candidate(intervals = [[1, 5], [2, 3], [4, 6], [7, 8], [8, 9], [9, 10]]) == 1\n assert candidate(intervals = [[1, 1000], [2, 999], [3, 998], [4, 997], [5, 996], [6, 995], [7, 994], [8, 993]]) == 7\n assert candidate(intervals = [[1, 4], [2, 6], [8, 10], [15, 18]]) == 1\n assert candidate(intervals = [[-1, 1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6]]) == 3\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 0\n assert candidate(intervals = [[1, 5], [5, 10], [10, 15], [15, 20]]) == 0\n assert candidate(intervals = [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]) == 5\n assert candidate(intervals = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25], [1, 25]]) == 1\n assert candidate(intervals = [[1, 5], [3, 7], [4, 10], [6, 12]]) == 2\n", "comparison": "exact"}, "public_tests": ["[[1,2],[2,3],[3,4],[1,3]]", "[[1,2],[1,2],[1,2]]", "[[1,2],[2,3]]"], "hints": [], "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().eraseOverlapIntervals", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:05+00:00", "tests_total": 107, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "dynamic-programming", "greedy", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def erase_overlap_intervals(intervals)", "container": null, "callable": "erase_overlap_intervals", "parameters": [{"name": "intervals", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 436, "task_id": "find-right-interval", "difficulty": "Medium", "problem_description": "You are given an array of intervals, where intervals[i] = [start_i, end_i] and each start_i is unique.\n\nThe right interval for an interval i is an interval j such that start_j >= end_i and start_j is minimized. Note that i may equal j.\n\nReturn an array of right interval indices for each interval i. If no right interval exists for interval i, then put -1 at index i.\n\nExample 1:\n\nInput: intervals = [[1,2]]\nOutput: [-1]\nExplanation: There is only one interval in the collection, so it outputs -1.\n\nExample 2:\n\nInput: intervals = [[3,4],[2,3],[1,2]]\nOutput: [-1,0,1]\nExplanation: There is no right interval for [3,4].\nThe right interval for [2,3] is [3,4] since start_0 = 3 is the smallest start that is >= end_1 = 3.\nThe right interval for [1,2] is [2,3] since start_1 = 2 is the smallest start that is >= end_2 = 2.\n\nExample 3:\n\nInput: intervals = [[1,4],[2,3],[3,4]]\nOutput: [-1,2,-1]\nExplanation: There is no right interval for [1,4] and [3,4].\nThe right interval for [2,3] is [3,4] since start_2 = 3 is the smallest start that is >= end_1 = 3.\n\nConstraints:\n\n- 1 <= intervals.length <= 2 * 10^4\n- intervals[i].length == 2\n- -10^6 <= start_i <= end_i <= 10^6\n- The start point of each interval is unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(intervals = [[-1, 1], [0, 2], [1, 3], [2, 4], [3, 5]]) == [2, 3, 4, -1, -1]\n assert candidate(intervals = [[5, 10], [2, 3], [1, 5], [8, 12]]) == [-1, 0, 0, -1]\n assert candidate(intervals = [[10, 20], [20, 30], [5, 15], [30, 40]]) == [1, 3, 1, -1]\n assert candidate(intervals = [[1, 3], [4, 7], [8, 10], [9, 12]]) == [1, 2, -1, -1]\n assert candidate(intervals = [[-10, -5], [-5, 0], [0, 5], [5, 10]]) == [1, 2, 3, -1]\n assert candidate(intervals = [[5, 5], [6, 6], [7, 7], [8, 8]]) == [0, 1, 2, 3]\n assert candidate(intervals = [[3, 4], [2, 3], [1, 2]]) == [-1, 0, 1]\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8]]) == [-1, -1, -1, -1]\n assert candidate(intervals = [[1, 5], [6, 8], [9, 10]]) == [1, 2, -1]\n assert candidate(intervals = [[-1, 0], [0, 1], [1, 2], [2, 3]]) == [1, 2, 3, -1]\n assert candidate(intervals = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6]]) == [-1, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[-10, -5], [-5, 0], [0, 5], [5, 10], [10, 15]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[100, 200], [150, 250], [200, 300], [250, 350], [300, 400]]) == [2, 3, 4, -1, -1]\n assert candidate(intervals = [[1, 4], [2, 3], [3, 4]]) == [-1, 2, -1]\n assert candidate(intervals = [[1, 2]]) == [-1]\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[5, 10], [15, 20], [25, 30], [10, 15], [20, 25], [30, 35]]) == [3, 4, 5, 1, 2, -1]\n assert candidate(intervals = [[1, 10], [11, 20], [21, 30], [31, 40], [41, 50], [51, 60], [61, 70], [71, 80], [81, 90], [91, 100], [101, 110], [111, 120], [121, 130], [131, 140], [141, 150], [151, 160], [161, 170], [171, 180], [181, 190], [191, 200]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1]\n assert candidate(intervals = [[100000, 100001], [99999, 100000], [99998, 99999], [99997, 99998]]) == [-1, 0, 1, 2]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]) == [1, 2, 3, 4, 5, 6, 7, -1]\n assert candidate(intervals = [[-10, 0], [-5, -2], [0, 5], [5, 10]]) == [2, 2, 3, -1]\n assert candidate(intervals = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == [1, 2, 3, 4, 5, 6, 7, 8, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, -1]\n assert candidate(intervals = [[5, 6], [4, 7], [1, 10], [2, 8], [3, 9], [6, 11]]) == [5, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18], [18, 19], [19, 20]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [21, 22], [23, 24], [25, 26], [27, 28], [29, 30], [31, 32], [33, 34], [35, 36], [37, 38], [39, 40]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1]\n assert candidate(intervals = [[-1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16], [16, 17], [17, 18]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14], [16, 17], [19, 20], [22, 23], [25, 26], [28, 29]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[1, 100], [50, 150], [100, 200], [150, 250], [200, 300], [250, 350], [300, 400]]) == [2, 3, 4, 5, 6, -1, -1]\n assert candidate(intervals = [[-1, 0], [-3, -2], [-5, -4], [-7, -6], [-9, -8], [0, 1], [1, 2], [2, 3], [3, 4]]) == [5, 0, 1, 2, 3, 6, 7, 8, -1]\n assert candidate(intervals = [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12], [7, 14], [8, 16], [9, 18], [10, 20]]) == [1, 3, 5, 7, 9, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14], [16, 17], [19, 20], [22, 23], [25, 26], [28, 29], [31, 32], [34, 35], [37, 38], [40, 41], [43, 44], [46, 47], [49, 50]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, -1]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13], [14, 14], [15, 15]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]\n assert candidate(intervals = [[1, 2000], [2, 1999], [3, 1998], [4, 1997], [5, 1996], [6, 1995], [7, 1994], [8, 1993], [9, 1992]]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 100], [2, 98], [3, 96], [4, 94], [5, 92], [6, 90], [7, 88], [8, 86], [9, 84], [10, 82]]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[-10, -5], [-9, -4], [-8, -3], [-7, -2], [-6, -1], [0, 5], [6, 10]]) == [5, 5, 5, 5, 5, 6, -1]\n assert candidate(intervals = [[-1000000, -999999], [-999998, -999997], [-999996, -999995], [-999994, -999993], [-999992, -999991]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[-1000000, -500000], [-500000, 0], [0, 500000], [500000, 1000000]]) == [1, 2, 3, -1]\n assert candidate(intervals = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]) == [4, 5, 6, 7, 8, 9, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(intervals = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(intervals = [[-5, -1], [-4, 0], [-3, 1], [-2, 2], [-1, 3], [0, 4]]) == [4, 5, -1, -1, -1, -1]\n assert candidate(intervals = [[1, 1000000], [2, 999999], [3, 999998], [4, 999997], [5, 999996], [6, 999995], [7, 999994], [8, 999993], [9, 999992], [10, 999991]]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[-1000, -900], [-901, -800], [-801, -700], [-701, -600], [-601, -500], [-501, -400], [-401, -300]]) == [2, 3, 4, 5, 6, -1, -1]\n assert candidate(intervals = [[-1000, 1000], [-500, 500], [-100, 100], [-50, 50], [-10, 10], [-5, 5], [-2, 2], [-1, 1], [0, 0]]) == [-1, -1, -1, -1, -1, -1, -1, -1, 8]\n assert candidate(intervals = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[-5, 0], [-4, 1], [-3, 2], [-2, 3], [-1, 4], [0, 5], [1, 6], [2, 7], [3, 8], [4, 9], [5, 10], [6, 11], [7, 12], [8, 13], [9, 14]]) == [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[-5, 0], [0, 5], [-10, -5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35]]) == [1, 3, 0, 4, 5, 6, 7, 8, -1]\n assert candidate(intervals = [[-10, -5], [-8, -2], [-6, 0], [-3, 3], [1, 7], [4, 10], [5, 9], [8, 12]]) == [3, 4, 4, 5, 7, -1, -1, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1]\n assert candidate(intervals = [[-1000000, -900000], [-900000, -800000], [-800000, -700000], [-700000, -600000], [-600000, -500000]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[100000, 100001], [99999, 100000], [99998, 99999], [99997, 99998], [99996, 99997]]) == [-1, 0, 1, 2, 3]\n assert candidate(intervals = [[100, 200], [201, 300], [301, 400], [401, 500], [501, 600], [601, 700]]) == [1, 2, 3, 4, 5, -1]\n assert candidate(intervals = [[-10, -5], [-8, -3], [-6, -1], [0, 5], [2, 7]]) == [3, 3, 3, -1, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, -1]\n assert candidate(intervals = [[-10, -5], [-7, -2], [-3, -1], [0, 4], [5, 10]]) == [2, 3, 3, 4, -1]\n assert candidate(intervals = [[-10, -5], [-5, -1], [-1, 0], [0, 5], [5, 10]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50], [50, 55], [55, 60]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1]\n assert candidate(intervals = [[-5, -4], [-4, -3], [-3, -2], [-2, -1], [-1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1]\n assert candidate(intervals = [[100, 200], [150, 250], [200, 300], [250, 350], [300, 400], [350, 450], [400, 500]]) == [2, 3, 4, 5, 6, -1, -1]\n assert candidate(intervals = [[100, 200], [150, 250], [200, 300], [250, 350], [300, 400], [350, 450], [400, 500]]) == [2, 3, 4, 5, 6, -1, -1]\n assert candidate(intervals = [[1, 3], [4, 6], [7, 9], [10, 12], [13, 15], [16, 18], [19, 21]]) == [1, 2, 3, 4, 5, 6, -1]\n assert candidate(intervals = [[1, 20], [21, 30], [31, 40], [41, 50], [51, 60]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[1, 20], [2, 19], [3, 18], [4, 17], [5, 16], [6, 15], [7, 14], [8, 13], [9, 12], [10, 11]]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[-10, -5], [-8, -4], [-7, -3], [-3, -1]]) == [3, 3, 3, -1]\n assert candidate(intervals = [[10, 15], [5, 10], [2, 5], [-3, 2], [-10, -3], [-20, -10], [-30, -20]]) == [-1, 0, 1, 2, 3, 4, 5]\n assert candidate(intervals = [[-1000000, -900000], [-800000, -700000], [-600000, -500000], [-400000, -300000], [-200000, -100000]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[-1000, -999], [-999, -998], [-998, -997], [-997, -996], [-996, -995], [-995, -994], [-994, -993], [-993, -992]]) == [1, 2, 3, 4, 5, 6, 7, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1]\n assert candidate(intervals = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[1, 5], [5, 9], [9, 13], [13, 17], [17, 21], [21, 25]]) == [1, 2, 3, 4, 5, -1]\n assert candidate(intervals = [[-5, -3], [-3, -1], [-1, 1], [1, 3], [3, 5]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[1, 3], [4, 7], [8, 11], [12, 15], [16, 19], [20, 23]]) == [1, 2, 3, 4, 5, -1]\n assert candidate(intervals = [[-50, -20], [-30, -10], [-25, -15], [-40, -35], [-1, 5], [6, 10]]) == [4, 4, 4, 1, 5, -1]\n assert candidate(intervals = [[1, 100], [2, 99], [3, 98], [4, 97], [5, 96], [6, 95], [7, 94], [8, 93], [9, 92]]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(intervals = [[-1, 0], [0, 1], [1, 2], [2, 3], [3, 4]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[1, 2], [10, 11], [20, 21], [30, 31], [40, 41], [50, 51], [60, 61], [70, 71], [80, 81], [90, 91]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[1, 2], [4, 5], [7, 8], [10, 11], [13, 14], [16, 17], [19, 20], [22, 23], [25, 26], [28, 29], [31, 32], [34, 35], [37, 38], [40, 41], [43, 44], [46, 47], [49, 50], [52, 53], [55, 56], [58, 59]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, -1]\n assert candidate(intervals = [[1000, 1001], [1002, 1003], [1004, 1005], [1006, 1007], [1008, 1009], [1010, 1011], [1012, 1013], [1014, 1015], [1016, 1017], [1018, 1019]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[1, 4], [4, 5], [6, 7], [8, 10], [10, 15], [15, 20], [20, 30], [30, 40], [40, 50]]) == [1, 2, 3, 4, 5, 6, 7, 8, -1]\n assert candidate(intervals = [[100, 150], [200, 250], [50, 100], [0, 50], [250, 300], [150, 200], [300, 350]]) == [5, 4, 0, 2, 6, 1, -1]\n assert candidate(intervals = [[-5, 0], [-4, -2], [-3, -1], [-2, 0], [-1, 1], [0, 2], [1, 3], [2, 4], [3, 5], [4, 6]]) == [5, 3, 4, 5, 6, 7, 8, 9, -1, -1]\n assert candidate(intervals = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 110]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[-10, 0], [-5, -1], [0, 5], [5, 10], [10, 15]]) == [2, 2, 3, 4, -1]\n assert candidate(intervals = [[1, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [1, 2, 3, 4, 5, 6, -1]\n assert candidate(intervals = [[-1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1]\n assert candidate(intervals = [[5, 10], [20, 25], [10, 15], [15, 20], [0, 5], [25, 30], [30, 35], [35, 40], [40, 45], [45, 50]]) == [2, 5, 3, 1, 0, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[-5, -2], [-2, -1], [-1, 0], [0, 1], [1, 2], [2, 5], [5, 8], [8, 10]]) == [1, 2, 3, 4, 5, 6, 7, -1]\n assert candidate(intervals = [[10, 15], [20, 25], [12, 18], [16, 20], [21, 23], [19, 24], [25, 30], [28, 35]]) == [3, 6, 5, 1, 6, 6, -1, -1]\n assert candidate(intervals = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12], [11, 13], [12, 14]]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -1, -1]\n assert candidate(intervals = [[5, 10], [10, 15], [15, 20], [20, 25], [25, 30]]) == [1, 2, 3, 4, -1]\n assert candidate(intervals = [[-1000000, -999999], [-999998, -999997], [-999996, -999995], [-999994, -999993], [-999992, -999991], [-999990, -999989], [-999988, -999987], [-999986, -999985], [-999984, -999983]]) == [1, 2, 3, 4, 5, 6, 7, 8, -1]\n assert candidate(intervals = [[1, 1000000], [-1000000, -1], [0, 0], [500000, 600000], [-600000, -500000]]) == [-1, 2, 2, -1, 2]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == [1, 2, 3, 4, 5, 6, 7, -1]\n assert candidate(intervals = [[1, 10], [2, 11], [3, 12], [4, 13], [5, 14]]) == [-1, -1, -1, -1, -1]\n assert candidate(intervals = [[-100, -50], [-51, -1], [-101, -60], [0, 10], [-1, 0], [50, 100], [101, 150], [151, 200]]) == [4, 4, 1, 5, 3, 6, 7, -1]\n assert candidate(intervals = [[-1000000, -500000], [-500000, 0], [0, 500000], [500000, 1000000], [-750000, -250000], [-250000, 250000], [250000, 750000]]) == [1, 2, 3, -1, 5, 6, -1]\n assert candidate(intervals = [[-10, 0], [0, 10], [10, 20], [20, 30]]) == [1, 2, 3, -1]\n assert candidate(intervals = [[-1, 2], [0, 3], [2, 4], [4, 6], [6, 8], [8, 10], [10, 12], [12, 14], [14, 16], [16, 18]]) == [2, 3, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(intervals = [[-1, 2], [0, 3], [1, 4], [2, 5], [3, 6], [4, 7], [5, 8], [6, 9], [7, 10], [8, 11], [9, 12]]) == [3, 4, 5, 6, 7, 8, 9, 10, -1, -1, -1]\n assert candidate(intervals = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1]\n assert candidate(intervals = [[5, 15], [10, 20], [15, 25], [20, 30], [25, 35]]) == [2, 3, 4, -1, -1]\n assert candidate(intervals = [[-100, 0], [-50, 50], [0, 100], [50, 150], [100, 200], [150, 250]]) == [2, 3, 4, 5, -1, -1]\n", "comparison": "exact"}, "public_tests": ["[[1,2]]", "[[3,4],[2,3],[1,2]]", "[[1,4],[2,3],[3,4]]"], "hints": [], "metadata": {"canonical_parameter_names": ["intervals"], "leetcode_dataset_entry_point": "Solution().findRightInterval", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:08+00:00", "tests_total": 113, "tests_dropped": 8, "flags": [], "topic_tags": ["array", "binary-search", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_right_interval(intervals)", "container": null, "callable": "find_right_interval", "parameters": [{"name": "intervals", "type": "Integer[][]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 438, "task_id": "find-all-anagrams-in-a-string", "difficulty": "Medium", "problem_description": "Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may return the answer in any order.\n\nExample 1:\n\nInput: s = \"cbaebabacd\", p = \"abc\"\nOutput: [0,6]\nExplanation:\nThe substring with start index = 0 is \"cba\", which is an anagram of \"abc\".\nThe substring with start index = 6 is \"bac\", which is an anagram of \"abc\".\n\nExample 2:\n\nInput: s = \"abab\", p = \"ab\"\nOutput: [0,1,2]\nExplanation:\nThe substring with start index = 0 is \"ab\", which is an anagram of \"ab\".\nThe substring with start index = 1 is \"ba\", which is an anagram of \"ab\".\nThe substring with start index = 2 is \"ab\", which is an anagram of \"ab\".\n\nConstraints:\n\n- 1 <= s.length, p.length <= 3 * 10^4\n- s and p consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(s='hello', p='billion'), [])\n assert answers_match(candidate(s='aaaaa', p='a'), [0, 1, 2, 3, 4])\n assert answers_match(candidate(s='bbaa', p='ab'), [1])\n assert answers_match(candidate(s='abab', p='ab'), [0, 1, 2])\n assert answers_match(candidate(s='abacbabc', p='abc'), [1, 2, 3, 5])\n assert answers_match(candidate(s='a', p='a'), [0])\n assert answers_match(candidate(s='aaaaaa', p='aa'), [0, 1, 2, 3, 4])\n assert answers_match(candidate(s='cbaebabacd', p='abc'), [0, 6])\n assert answers_match(candidate(s='xyz', p='zyx'), [0])\n assert answers_match(candidate(s='aaaaaaaaaa', p='aaa'), [0, 1, 2, 3, 4, 5, 6, 7])\n assert answers_match(candidate(s='mississippi', p='issi'), [1, 4])\n assert answers_match(candidate(s='abcabcabc', p='abc'), [0, 1, 2, 3, 4, 5, 6])\n assert answers_match(candidate(s='aabbcc', p='abc'), [])\n assert answers_match(candidate(s='mississippi', p='issip'), [4])\n assert answers_match(candidate(s='abcd', p='efgh'), [])\n assert answers_match(candidate(s='abcde', p='fgh'), [])\n assert answers_match(candidate(s='abcdefg', p='gfedcba'), [0])\n assert answers_match(candidate(s='aabbccdd', p='abcd'), [])\n assert answers_match(candidate(s='hello', p='oll'), [2])\n assert answers_match(candidate(s='p', p='p'), [0])\n assert answers_match(candidate(s='zdhfkahfewrfsad', p='fes'), [])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz', p='zzzz'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46])\n assert answers_match(candidate(s='ananananan', p='nana'), [0, 1, 2, 3, 4, 5, 6])\n assert answers_match(candidate(s='ababababababababababababababababababababababababababababababababab', p='baba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzz', p='zzzz'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\n assert answers_match(candidate(s='anagramanagramanagram', p='anagramanagram'), [0, 1, 2, 3, 4, 5, 6, 7])\n assert answers_match(candidate(s='xxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzzxxyyzz', p='xxyyzz'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66])\n assert answers_match(candidate(s='aquickbrownfoxjumpsoverthelazydog', p='quick'), [1])\n assert answers_match(candidate(s='xyzzxyzz', p='xyz'), [0, 3, 4])\n assert answers_match(candidate(s='almostanagram', p='anagram'), [6])\n assert answers_match(candidate(s='abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', p='abcdefghijklmnop'), [0, 26])\n assert answers_match(candidate(s='abcdabcdeabcdabcdeabcdabcde', p='abcde'), [4, 5, 6, 7, 8, 13, 14, 15, 16, 17, 22])\n assert answers_match(candidate(s='aabbccddeeffgghhii', p='abcdefghi'), [])\n assert answers_match(candidate(s='aquickbrownfoxjumpsoverlazydog', p='lazy'), [23])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz', p='zzzzzz'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110])\n assert answers_match(candidate(s='thisisaverylongstringtocheckanagrams', p='strings'), [])\n assert answers_match(candidate(s='xyxzyzyx', p='zyx'), [1, 2, 5])\n assert answers_match(candidate(s='bbaaaaab', p='ab'), [1, 6])\n assert answers_match(candidate(s='bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc', p='bbccbb'), [])\n assert answers_match(candidate(s='abababababababababababababababababababababababababababababababababababababababababababab', p='bab'), [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85])\n assert answers_match(candidate(s='abcabcabcabcabcabc', p='abcabc'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\n assert answers_match(candidate(s='abcdabcdabcdabcd', p='dcba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', p='mnopqrstuvwxyz'), [])\n assert answers_match(candidate(s='thisisanotherexample', p='ample'), [15])\n assert answers_match(candidate(s='acbabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabcabc', p='bcab'), [1, 2, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', p='zyxwvutsrqponmlkjihgfedcba'), [])\n assert answers_match(candidate(s='xyzzzzzyxyzzzzzyxyzzzzzy', p='zzzzzyxy'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])\n assert answers_match(candidate(s='repeatedpatternrepeatedpatternrepeated', p='repeatedpattern'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])\n assert answers_match(candidate(s='eidbaooo', p='ab'), [3])\n assert answers_match(candidate(s='acdfgdcagdfgdsf', p='gcd'), [4])\n assert answers_match(candidate(s='abcdefgabcdefg', p='gfedcba'), [0, 1, 2, 3, 4, 5, 6, 7])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', p='mnopqrstuvwxzy'), [])\n assert answers_match(candidate(s='xyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyz', p='xyz'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42])\n assert answers_match(candidate(s='bcbcbcbcbcbc', p='bccb'), [0, 1, 2, 3, 4, 5, 6, 7, 8])\n assert answers_match(candidate(s='abcdefghij', p='ihgfedcba'), [0])\n assert answers_match(candidate(s='abcabcabcabcabcabcabcabcabcabc', p='cba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz', p='zzz'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103])\n assert answers_match(candidate(s='aaaaaaaaaabbbbbbbbbbcccccccccc', p='abc'), [])\n assert answers_match(candidate(s='abcdefghijklmnopqrstuvwxyz', p='zyxwvutsrqponmlkjihgfedcba'), [0])\n assert answers_match(candidate(s='pneumonoultramicroscopicsilicovolcanoconiosis', p='pneumonia'), [])\n assert answers_match(candidate(s='counterexampletofindallanagramsinaverylargeinputstring', p='example'), [7])\n assert answers_match(candidate(s='zazazazazaz', p='aaa'), [])\n assert answers_match(candidate(s='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz', p='zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'), [0])\n assert answers_match(candidate(s='thisisateststring', p='test'), [7])\n assert answers_match(candidate(s='ababababababababababababababababa', p='baba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29])\n assert answers_match(candidate(s='xyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyz', p='xyzzyx'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27])\n assert answers_match(candidate(s='anagramananagramanagramanagramanagram', p='nagaram'), [0, 1, 2, 3, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])\n assert answers_match(candidate(s='abcdabcde', p='cde'), [6])\n assert answers_match(candidate(s='abacbabcabcab', p='abc'), [1, 2, 3, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(s='anananananananananananananananananananananana', p='nana'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41])\n assert answers_match(candidate(s='aaaaaaaaaaaaaaaaaaaaaaaaaaab', p='ba'), [26])\n assert answers_match(candidate(s='acbabcabcabcabcabcabcabcabcabcabc', p='bac'), [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30])\n assert answers_match(candidate(s='aaaaaaaaaaaab', p='aaaab'), [8])\n assert answers_match(candidate(s='ldfldjflsdkflsdkjfldsjkfldsjfldsjflsdkjfldskjflds', p='sdkjf'), [13, 19, 35, 41])\n assert answers_match(candidate(s='abababababababababab', p='abab'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])\n assert answers_match(candidate(s='aabbccddeeffaabbccddeeff', p='abcdef'), [])\n assert answers_match(candidate(s='zzzzzzzzzz', p='zzz'), [0, 1, 2, 3, 4, 5, 6, 7])\n assert answers_match(candidate(s='zxyzzxyz', p='xyz'), [0, 1, 4, 5])\n assert answers_match(candidate(s='thisisanexampleofaverylongstringwherefindinganagramsisnotthatstraightforward', p='anagram'), [44])\n assert answers_match(candidate(s='anagramananagramananagram', p='anagram'), [0, 1, 2, 3, 9, 10, 11, 12, 18])\n assert answers_match(candidate(s='anananananananananananananananananana', p='anana'), [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32])\n assert answers_match(candidate(s='abcdefghij', p='jihgfedcba'), [0])\n assert answers_match(candidate(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', p='aaaaaa'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46])\n assert answers_match(candidate(s='aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', p='mnopqr'), [])\n assert answers_match(candidate(s='qwertyuiopasdfghjklzxcvbnm', p='mnbvcxzlkjhgfdsapoiuytrewq'), [0])\n assert answers_match(candidate(s='acbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacbacb', p='acbac'), [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63])\n assert answers_match(candidate(s='hellohellohellohellohellohellohellohellohellohello', p='world'), [])\n assert answers_match(candidate(s='anagramanagramanagram', p='nagaram'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14])\n assert answers_match(candidate(s='qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm', p='mnbvcxzlkjhgfdsapoiuytrewq'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26])\n assert answers_match(candidate(s='layer', p='relay'), [0])\n assert answers_match(candidate(s='quickbrownfoxjumpsoverthelazydog', p='thequickbrownfoxjumpsover'), [0])\n assert answers_match(candidate(s='llllllllllllllllllllllllllllllllllllll', p='ll'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36])\n assert answers_match(candidate(s='abababababababababab', p='baba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])\n assert answers_match(candidate(s='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab', p='aab'), [62])\n assert answers_match(candidate(s='qazwsxedcrfvtgbyhnujmikolp', p='lopihgfytvremkluzxwqjncbv'), [])\n assert answers_match(candidate(s='abacabadabacaba', p='abacab'), [0, 1, 8, 9])\n assert answers_match(candidate(s='thisisaverylongstringwithseveralrepeatingcharacters', p='characters'), [41])\n assert answers_match(candidate(s='aabbccddeeffgghhii', p='iihhggffeeddccbbaa'), [0])\n assert answers_match(candidate(s='thisisanagram', p='nagaram'), [6])\n assert answers_match(candidate(s='ababababababababababababababababababababababababababab', p='baba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50])\n assert answers_match(candidate(s='abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz', p='zyxwvutsrqponmlkjihgfedcba'), [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26])\n assert answers_match(candidate(s='aabbccddeeff', p='abcdef'), [])\n", "comparison": "unordered"}, "public_tests": ["\"cbaebabacd\"\n\"abc\"", "\"abab\"\n\"ab\""], "hints": [], "metadata": {"canonical_parameter_names": ["s", "p"], "leetcode_dataset_entry_point": "Solution().findAnagrams", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:12+00:00", "tests_total": 102, "tests_dropped": 0, "flags": ["any_order"], "topic_tags": ["hash-table", "string", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def find_anagrams(s, p)", "container": null, "callable": "find_anagrams", "parameters": [{"name": "s", "type": "String"}, {"name": "p", "type": "String"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 440, "task_id": "k-th-smallest-in-lexicographical-order", "difficulty": "Hard", "problem_description": "Given two integers n and k, return the k^th lexicographically smallest integer in the range [1, n].\n\nExample 1:\n\nInput: n = 13, k = 2\nOutput: 10\nExplanation: The lexicographical order is [1, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9], so the second smallest number is 10.\n\nExample 2:\n\nInput: n = 1, k = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= k <= n <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 13,k = 2) == 10\n assert candidate(n = 1,k = 1) == 1\n assert candidate(n = 100000,k = 50000) == 54998\n assert candidate(n = 10,k = 10) == 9\n assert candidate(n = 1000000,k = 100000) == 189998\n assert candidate(n = 200,k = 150) == 53\n assert candidate(n = 10,k = 1) == 1\n assert candidate(n = 1000,k = 100) == 188\n assert candidate(n = 999999999,k = 500000000) == 549999999\n assert candidate(n = 999,k = 999) == 999\n assert candidate(n = 99999,k = 50000) == 54999\n assert candidate(n = 2,k = 1) == 1\n assert candidate(n = 100,k = 10) == 17\n assert candidate(n = 1000000000,k = 100000000) == 189999998\n assert candidate(n = 20,k = 15) == 4\n assert candidate(n = 999999999,k = 123456789) == 211111103\n assert candidate(n = 999999999,k = 999999999) == 999999999\n assert candidate(n = 1000,k = 50) == 142\n assert candidate(n = 50,k = 25) == 31\n assert candidate(n = 10000,k = 9876) == 9887\n assert candidate(n = 98765,k = 87654) == 88888\n assert candidate(n = 111111111,k = 55555555) == 49999998\n assert candidate(n = 999999990,k = 500000000) == 549999999\n assert candidate(n = 987654321,k = 456789012) == 511110104\n assert candidate(n = 123456789,k = 123456789) == 99999999\n assert candidate(n = 1000000000,k = 500000000) == 549999998\n assert candidate(n = 1000000000,k = 1) == 1\n assert candidate(n = 333333333,k = 111111111) == 199999999\n assert candidate(n = 897654321,k = 123456789) == 211111103\n assert candidate(n = 456789123,k = 222222222) == 299999999\n assert candidate(n = 999999999,k = 1) == 1\n assert candidate(n = 987654321,k = 987654320) == 99999998\n assert candidate(n = 700000000,k = 700000000) == 99999999\n assert candidate(n = 777777777,k = 333333333) == 399999999\n assert candidate(n = 111111111,k = 33333333) == 29999998\n assert candidate(n = 200000000,k = 150000000) == 54999998\n assert candidate(n = 500,k = 250) == 323\n assert candidate(n = 500000000,k = 1) == 1\n assert candidate(n = 123456789,k = 1) == 1\n assert candidate(n = 10000,k = 5000) == 5498\n assert candidate(n = 777777777,k = 222222222) == 299999999\n assert candidate(n = 999999998,k = 999999998) == 999999998\n assert candidate(n = 500000000,k = 300000000) == 369999999\n assert candidate(n = 876543210,k = 123456789) == 211111103\n assert candidate(n = 987654321,k = 123456789) == 211111103\n assert candidate(n = 999999990,k = 999999990) == 999999990\n assert candidate(n = 500,k = 1) == 1\n assert candidate(n = 666666666,k = 333333333) == 399999999\n assert candidate(n = 123456789,k = 98765432) == 77777776\n assert candidate(n = 98765,k = 45678) == 51107\n assert candidate(n = 10000,k = 1000) == 1898\n assert candidate(n = 500000000,k = 250000000) == 324999998\n assert candidate(n = 10000,k = 9999) == 9998\n assert candidate(n = 500,k = 499) == 98\n assert candidate(n = 1000000000,k = 123456789) == 211111102\n assert candidate(n = 876543210,k = 543210987) == 588889887\n assert candidate(n = 400000000,k = 200000000) == 279999999\n assert candidate(n = 600000000,k = 500000000) == 549999999\n assert candidate(n = 876543210,k = 432109876) == 488898887\n assert candidate(n = 100000000,k = 99999999) == 99999998\n assert candidate(n = 800000000,k = 123456789) == 211111103\n assert candidate(n = 555555555,k = 277777777) == 349999998\n assert candidate(n = 987654321,k = 87654321) == 178888887\n assert candidate(n = 87654321,k = 5000000) == 14499998\n assert candidate(n = 1000000,k = 1000000) == 999999\n assert candidate(n = 888888888,k = 444444444) == 499999999\n assert candidate(n = 876543210,k = 345678901) == 411111004\n assert candidate(n = 987654321,k = 1) == 1\n assert candidate(n = 99999999,k = 50000000) == 54999999\n assert candidate(n = 999999999,k = 999999998) == 999999998\n assert candidate(n = 333333333,k = 166666666) == 249999998\n assert candidate(n = 1234567,k = 999999) == 788887\n assert candidate(n = 100000000,k = 10000000) == 18999998\n assert candidate(n = 100000000,k = 50000000) == 54999998\n assert candidate(n = 100000,k = 99999) == 99998\n assert candidate(n = 1000,k = 500) == 548\n assert candidate(n = 1234567,k = 345678) == 199998\n assert candidate(n = 123456789,k = 67890123) == 49989999\n assert candidate(n = 999999,k = 500000) == 549999\n assert candidate(n = 800000000,k = 400000000) == 459999999\n assert candidate(n = 1234567,k = 678901) == 499899\n assert candidate(n = 200000000,k = 100000000) == 189999999\n assert candidate(n = 100000,k = 75000) == 77498\n assert candidate(n = 300000000,k = 150000000) == 234999998\n assert candidate(n = 900000000,k = 800000000) == 819999999\n assert candidate(n = 300000000,k = 100000000) == 189999999\n assert candidate(n = 899999999,k = 500000000) == 549999999\n assert candidate(n = 1000000,k = 999999) == 999998\n assert candidate(n = 98765,k = 12345) == 21107\n assert candidate(n = 234567890,k = 123456789) == 211111103\n assert candidate(n = 600000000,k = 300000000) == 369999999\n", "comparison": "exact"}, "public_tests": ["13\n2", "1\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["n", "k"], "leetcode_dataset_entry_point": "Solution().findKthNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:17+00:00", "tests_total": 94, "tests_dropped": 3, "flags": [], "topic_tags": ["trie"]}, "language": "ruby", "interface": {"raw_signature": "def find_kth_number(n, k)", "container": null, "callable": "find_kth_number", "parameters": [{"name": "n", "type": "Integer"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 441, "task_id": "arranging-coins", "difficulty": "Easy", "problem_description": "You have n coins and you want to build a staircase with these coins. The staircase consists of k rows where the i^th row has exactly i coins. The last row of the staircase may be incomplete.\n\nGiven the integer n, return the number of complete rows of the staircase you will build.\n\nExample 1:\n\nInput: n = 5\nOutput: 2\nExplanation: Because the 3^rd row is incomplete, we return 2.\n\nExample 2:\n\nInput: n = 8\nOutput: 3\nExplanation: Because the 4^th row is incomplete, we return 3.\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == 3\n assert candidate(n = 100) == 13\n assert candidate(n = 30) == 7\n assert candidate(n = 15) == 5\n assert candidate(n = 22) == 6\n assert candidate(n = 21) == 6\n assert candidate(n = 2147483647) == 65535\n assert candidate(n = 1804289383) == 60070\n assert candidate(n = 1) == 1\n assert candidate(n = 180) == 18\n assert candidate(n = 10) == 4\n assert candidate(n = 5) == 2\n assert candidate(n = 210) == 20\n assert candidate(n = 45) == 9\n assert candidate(n = 171) == 18\n assert candidate(n = 3) == 2\n assert candidate(n = 576) == 33\n assert candidate(n = 2147483646) == 65535\n assert candidate(n = 12) == 4\n assert candidate(n = 7) == 3\n assert candidate(n = 70) == 11\n assert candidate(n = 1000) == 44\n assert candidate(n = 28) == 7\n assert candidate(n = 64) == 10\n assert candidate(n = 16) == 5\n assert candidate(n = 10000) == 140\n assert candidate(n = 1001) == 44\n assert candidate(n = 2) == 1\n assert candidate(n = 80) == 12\n assert candidate(n = 165) == 17\n assert candidate(n = 6678) == 115\n assert candidate(n = 101) == 13\n assert candidate(n = 100000) == 446\n assert candidate(n = 18) == 5\n assert candidate(n = 256) == 22\n assert candidate(n = 36) == 8\n assert candidate(n = 500) == 31\n assert candidate(n = 1000000000) == 44720\n assert candidate(n = 1999) == 62\n assert candidate(n = 987654321) == 44443\n assert candidate(n = 5000000) == 3161\n assert candidate(n = 325) == 25\n assert candidate(n = 441) == 29\n assert candidate(n = 136) == 16\n assert candidate(n = 500000000) == 31622\n assert candidate(n = 1000000) == 1413\n assert candidate(n = 6) == 3\n assert candidate(n = 123456789) == 15712\n assert candidate(n = 120) == 15\n assert candidate(n = 1999999999) == 63245\n assert candidate(n = 123456) == 496\n assert candidate(n = 5050) == 100\n assert candidate(n = 55) == 10\n assert candidate(n = 84) == 12\n", "comparison": "exact"}, "public_tests": ["5", "8"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().arrangeCoins", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:19+00:00", "tests_total": 54, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["math", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def arrange_coins(n)", "container": null, "callable": "arrange_coins", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 442, "task_id": "find-all-duplicates-in-an-array", "difficulty": "Medium", "problem_description": "Given an integer array nums of length n where all the integers of nums are in the range [1, n] and each integer appears at most twice, return an array of all the integers that appears twice.\n\nYou must write an algorithm that runs in O(n) time and uses only constant auxiliary space, excluding the space needed to store the output\n\nExample 1:\n\nInput: nums = [4,3,2,7,8,2,3,1]\nOutput: [2,3]\n\nExample 2:\n\nInput: nums = [1,1,2]\nOutput: [1]\n\nExample 3:\n\nInput: nums = [1]\nOutput: []\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 10^5\n- 1 <= nums[i] <= n\n- Each element in nums appears once or twice.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 2]) == [1]\n assert candidate(nums = [5, 3, 2, 3, 5, 1]) == [3, 5]\n assert candidate(nums = [1]) == []\n assert candidate(nums = [5, 3, 1, 2, 4, 3, 5]) == [3, 5]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9]) == [10, 9]\n assert candidate(nums = [5, 4, 6, 7, 9, 3, 10, 9, 5, 6]) == [5, 6, 9]\n assert candidate(nums = [10, 2, 5, 10, 9, 1, 1, 4, 3, 7]) == [1, 10]\n assert candidate(nums = [4, 3, 2, 7, 8, 2, 3, 1]) == [3, 2]\n assert candidate(nums = [5, 4, 3, 2, 1, 1, 2, 3]) == [1, 2, 3]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5]) == [2, 4, 3]\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5]) == [2, 4, 3, 5]\n assert candidate(nums = [5, 3, 4, 5, 3, 2, 1, 2, 4]) == [3, 5, 2, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2]) == [1, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 15]) == [10, 13, 5, 8, 15]\n assert candidate(nums = [3, 3, 2, 2, 1, 1, 6, 6, 5, 5, 4, 4, 10, 10, 9, 9, 8, 8, 7, 7]) == [2, 4, 5, 10, 3, 9, 6, 8, 1, 7]\n assert candidate(nums = [5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5]\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34, 34, 36, 36]) == [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [3, 6, 2, 7, 4, 8, 1, 9, 5, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [50, 50, 49, 49, 48, 48, 47, 47, 46, 46, 45, 45, 44, 44, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 38, 38, 37, 37, 36, 36, 35, 35, 34, 34, 33, 33, 32, 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == [38, 25, 39, 24, 31, 23, 40, 22, 35, 21, 41, 20, 30, 19, 42, 18, 36, 17, 43, 16, 29, 15, 44, 14, 33, 13, 45, 12, 28, 11, 46, 10, 37, 9, 47, 8, 27, 7, 48, 6, 32, 5, 49, 4, 26, 3, 50, 2, 34, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n assert candidate(nums = [3, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4]) == [3, 4]\n assert candidate(nums = [5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == [3, 6, 5, 7, 2, 8, 4, 9, 1, 10]\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10]) == [5, 2, 10]\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4]) == [5, 6, 7, 8, 9, 10, 1, 2, 3, 4]\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 1, 1, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20]) == [2, 1, 7, 12, 5, 13, 8, 14, 4, 15, 9, 16, 6, 17, 10, 18, 3, 19, 11, 20]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n assert candidate(nums = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 16, 16, 17, 18, 18, 19, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 25]) == [19, 2, 20, 16, 10, 22, 14, 18, 24, 12, 25]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 1]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == [3, 6, 2, 7, 4, 8, 1, 9, 5, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n assert candidate(nums = [5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1]) == [5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25]) == [13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20, 3, 21, 11, 22, 6, 23, 12, 24, 2, 25]\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]) == [2, 4, 5, 6, 7, 8, 9, 10, 1, 3]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == [5, 1, 6, 3, 7, 1, 8, 4, 9, 2]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == [4, 8, 1, 9, 5, 10, 3, 11, 6, 12, 2, 13, 7, 14]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20]) == [3, 11, 6, 12, 2, 13, 7, 14, 4, 15, 8, 16, 1, 17, 9, 18, 5, 19, 10, 20]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [8, 2, 3, 2, 1, 5, 6, 3, 7, 4, 8, 5]) == [3, 2, 8, 5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == [1, 2, 3, 4, 5]\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2]\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14]) == [5, 10, 6, 7, 8, 9]\n assert candidate(nums = [5, 5, 5, 5, 5, 1, 2, 3, 4, 1]) == [5, 5, 5, 5, 1]\n", "comparison": "exact"}, "public_tests": ["[4,3,2,7,8,2,3,1]", "[1,1,2]", "[1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findDuplicates", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:21+00:00", "tests_total": 61, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_duplicates(nums)", "container": null, "callable": "find_duplicates", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 446, "task_id": "arithmetic-slices-ii-subsequence", "difficulty": "Hard", "problem_description": "Given an integer array nums, return the number of all the arithmetic subsequences of nums.\n\nA sequence of numbers is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elements is the same.\n\n- For example, [1, 3, 5, 7, 9], [7, 7, 7, 7], and [3, -1, -5, -9] are arithmetic sequences.\n- For example, [1, 1, 2, 5, 7] is not an arithmetic sequence.\n\nA subsequence of an array is a sequence that can be formed by removing some elements (possibly none) of the array.\n\n- For example, [2,5,10] is a subsequence of [1,2,1,2,4,1,5,10].\n\nThe test cases are generated so that the answer fits in 32-bit integer.\n\nExample 1:\n\nInput: nums = [2,4,6,8,10]\nOutput: 7\nExplanation: All arithmetic subsequence slices are:\n[2,4,6]\n[4,6,8]\n[6,8,10]\n[2,4,6,8]\n[4,6,8,10]\n[2,4,6,8,10]\n[2,6,10]\n\nExample 2:\n\nInput: nums = [7,7,7,7,7]\nOutput: 16\nExplanation: Any subsequence of this array is arithmetic.\n\nConstraints:\n\n- 1 <= nums.length <= 1000\n- -2^31 <= nums[i] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == 29\n assert candidate(nums = [1, 2, 3, 8, 9]) == 1\n assert candidate(nums = [2, 4, 6, 8, 10]) == 7\n assert candidate(nums = [1, 3, 5, 7, 9]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 55\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [10, 20, 30, 40, 50]) == 7\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 55\n assert candidate(nums = [1, 1, 2, 5, 7]) == 0\n assert candidate(nums = [0, 2000000000, -294967296, -294967296]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5]) == 7\n assert candidate(nums = [10, 9, 4, 6, 8, 4, 3, 9, 1, 3, 5, 7]) == 10\n assert candidate(nums = [1, 2, 3, 8, 13, 18]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 11]) == 12\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1]) == 99\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34]) == 6\n assert candidate(nums = [7, 7, 7, 7, 7]) == 16\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 968\n assert candidate(nums = [1, 2, 3, 4, 5, 6]) == 12\n assert candidate(nums = [1, 2]) == 0\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3]) == 99\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64]) == 0\n assert candidate(nums = [1, 2, 3]) == 1\n assert candidate(nums = [1, 2, 3, 8, 9, 10]) == 2\n assert candidate(nums = [3, 1, 2, 2, 4, 5]) == 1\n assert candidate(nums = [3, 1, 2, 5, 7]) == 1\n assert candidate(nums = [1, 7, 10, 15, 27, 29]) == 1\n assert candidate(nums = [1, 2, 1, 2, 1]) == 1\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144]) == 9\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 968\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 194\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 55\n assert candidate(nums = [1, 2, 3, 6, 9, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96]) == 198\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 55\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36]) == 90\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 0\n assert candidate(nums = [1, 2, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288]) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 602\n assert candidate(nums = [10, 7, 4, 3, 2, 1, -1, -2, -3, -4]) == 20\n assert candidate(nums = [1000, 990, 980, 970, 960, 950, 940, 930, 920, 910, 900, 890, 880, 870, 860, 850, 840, 830, 820, 810, 800]) == 390\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52]) == 263\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256]) == 0\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987]) == 13\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 164\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33]) == 72\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45]) == 1\n assert candidate(nums = [-5, -1, 3, 7, 11, 15, 19, 23]) == 29\n assert candidate(nums = [1, 7, 13, 19, 25, 31, 37, 43, 49, 55]) == 55\n assert candidate(nums = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 72\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1048365\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]) == 55\n assert candidate(nums = [10, 10, 10, 20, 20, 20, 30, 30, 30, 40, 40, 40]) == 139\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 164\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 344\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 946\n assert candidate(nums = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35]) == 72\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 60\n assert candidate(nums = [1, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91]) == 72\n assert candidate(nums = [1, 3, 5, 7, 9, 12, 15, 18, 21, 24]) == 22\n assert candidate(nums = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47]) == 164\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 55\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]) == 604\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 0\n assert candidate(nums = [10, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38]) == 55\n assert candidate(nums = [1, 7, 10, 15, 27, 29, 33, 51]) == 3\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(nums = [1, 3, 5, 9, 15, 25, 39, 57, 79, 105, 135]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 164\n assert candidate(nums = [10, 12, 14, 18, 22, 26, 30, 34, 38, 42, 46]) == 56\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 55\n assert candidate(nums = [5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 72\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 1981\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6]) == 4172\n assert candidate(nums = [1, 3, 5, 7, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28]) == 62\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 65294\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 1048365\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 32647\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 4256\n assert candidate(nums = [1, 7, 10, 15, 27, 29, 33, 37, 41, 45, 49]) == 13\n assert candidate(nums = [5, 8, 11, 14, 17, 20, 23, 26, 29, 32]) == 55\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6]) == 160\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4]) == 164\n assert candidate(nums = [10, 20, 10, 20, 10, 20, 10, 20, 10, 20]) == 32\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 90\n assert candidate(nums = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57]) == 164\n assert candidate(nums = [-1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1]) == 1936\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40]) == 137\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]) == 8\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49]) == 604\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8]) == 772\n assert candidate(nums = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77]) == 344\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 1294\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35]) == 263\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 344\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58]) == 344\n assert candidate(nums = [1, 2, 4, 6, 8, 10, 14, 16, 18, 20, 24, 26, 28, 30, 34, 36, 38, 40]) == 72\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 344\n assert candidate(nums = [1, 2, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 114\n assert candidate(nums = [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 56\n assert candidate(nums = [-2, -1, 1, 4, 8, 13, 19, 26, 34, 43, 53, 64]) == 4\n assert candidate(nums = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 946\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 391\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90]) == 41\n assert candidate(nums = [2, 4, 6, 8, 12, 14, 16, 20, 22, 24, 28]) == 32\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]) == 72\n assert candidate(nums = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]) == 28\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 164\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 72\n assert candidate(nums = [1, 2, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54]) == 264\n assert candidate(nums = [10, 7, 4, 1, -2, -5, -8, -11, -14]) == 41\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45]) == 41\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 55\n assert candidate(nums = [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == 364\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25]) == 113\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91]) == 3\n assert candidate(nums = [1, 3, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37]) == 355\n assert candidate(nums = [1, 7, 13, 19, 25, 31, 37, 43, 49, 55, 61, 67, 73]) == 113\n assert candidate(nums = [1, 7, 13, 19, 25, 31, 37, 43, 49, 55, 61]) == 72\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 57\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) == 48\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]) == 0\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40]) == 164\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 968\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120]) == 90\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13]) == 25208\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 344\n assert candidate(nums = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31]) == 72\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800]) == 29\n assert candidate(nums = [1, 7, 13, 19, 25, 31, 37, 43, 49]) == 41\n assert candidate(nums = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45]) == 90\n assert candidate(nums = [10, 7, 4, 3, 2, 1, -1, -4, -7, -10]) == 16\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 55\n assert candidate(nums = [1, 10, 19, 28, 37, 46, 55, 64, 73, 82, 91, 100]) == 90\n assert candidate(nums = [1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == 17\n assert candidate(nums = [1, 3, 5, 3, 1, -1, -3, -5, -3, -1, 1, 3, 5]) == 53\n assert candidate(nums = [10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 72\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39]) == 113\n assert candidate(nums = [1, 2, 3, 6, 9, 12, 15, 18, 21]) == 21\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 1584\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9]) == 323\n assert candidate(nums = [1, 2, 3, 2, 1, 0, -1, -2, -1, 0, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3]) == 1370\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 55\n assert candidate(nums = [3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 55\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 0\n assert candidate(nums = [3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 160\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 72\n assert candidate(nums = [3, 6, 9, 15, 18, 21, 27, 30, 33, 39, 42, 45]) == 40\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 968\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 4, 5, 6, 4, 5, 6, 7]) == 165\n assert candidate(nums = [5, 10, 15, 25, 35, 45, 55, 65, 75, 85]) == 42\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 32647\n assert candidate(nums = [1, 7, 10, 15, 27, 29, 33, 18]) == 1\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 5029\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23]) == 90\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45]) == 164\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 55\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 164\n assert candidate(nums = [1, 2, 4, 7, 11, 16, 22, 29, 37, 46, 56, 67, 79]) == 4\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 32647\n", "comparison": "exact"}, "public_tests": ["[2,4,6,8,10]", "[7,7,7,7,7]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().numberOfArithmeticSlices", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:31+00:00", "tests_total": 164, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def number_of_arithmetic_slices(nums)", "container": null, "callable": "number_of_arithmetic_slices", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 447, "task_id": "number-of-boomerangs", "difficulty": "Medium", "problem_description": "You are given n points in the plane that are all distinct, where points[i] = [x_i, y_i]. A boomerang is a tuple of points (i, j, k) such that the distance between i and j equals the distance between i and k (the order of the tuple matters).\n\nReturn the number of boomerangs.\n\nExample 1:\n\nInput: points = [[0,0],[1,0],[2,0]]\nOutput: 2\nExplanation: The two boomerangs are [[1,0],[0,0],[2,0]] and [[1,0],[2,0],[0,0]].\n\nExample 2:\n\nInput: points = [[1,1],[2,2],[3,3]]\nOutput: 2\n\nExample 3:\n\nInput: points = [[1,1]]\nOutput: 0\n\nConstraints:\n\n- n == points.length\n- 1 <= n <= 500\n- points[i].length == 2\n- -10^4 <= x_i, y_i <= 10^4\n- All the points are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0]]) == 8\n assert candidate(points = [[1, 0], [0, 0], [0, 1]]) == 2\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5]]) == 4\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [0, 2]]) == 4\n assert candidate(points = [[0, 0], [1, 0], [2, 0]]) == 2\n assert candidate(points = [[0, 0], [1, 0], [-1, 0], [0, 1], [0, -1]]) == 20\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [1, 4]]) == 4\n assert candidate(points = [[0, 0], [1, 1], [1, 2], [2, 0]]) == 4\n assert candidate(points = [[10000, 10000], [-10000, -10000], [0, 0]]) == 2\n assert candidate(points = [[1, 1], [2, 2], [3, 3]]) == 2\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1]]) == 8\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3]]) == 4\n assert candidate(points = [[0, 0], [0, 1], [1, 0], [1, 1]]) == 8\n assert candidate(points = [[0, 0], [1, 0], [1, 1], [2, 0]]) == 8\n assert candidate(points = [[-1, 0], [0, 0], [1, 0]]) == 2\n assert candidate(points = [[1, 1]]) == 0\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [2, 3], [3, 2], [1, 2], [2, 1]]) == 38\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1], [2, 2], [2, 1], [1, 2]]) == 38\n assert candidate(points = [[-2, -2], [-1, -1], [1, 1], [2, 2], [-3, -3], [3, 3], [-4, -4], [4, 4]]) == 16\n assert candidate(points = [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10]]) == 8\n assert candidate(points = [[-1, 0], [0, -1], [1, 0], [0, 1], [0, 0]]) == 20\n assert candidate(points = [[-1, -1], [1, 1], [2, 2], [3, 3], [4, 4], [-1, 1], [1, -1], [-2, -2], [-3, -3], [-4, -4]]) == 48\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1], [2, 0], [2, 1]]) == 24\n assert candidate(points = [[-1, -1], [0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8]]) == 40\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]) == 40\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]) == 8\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [1, 0], [1, 1], [1, 2], [1, 3], [1, 4]]) == 64\n assert candidate(points = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]) == 8\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [1, 2], [2, 3], [3, 4], [4, 5]]) == 16\n assert candidate(points = [[0, 0], [0, 2], [2, 0], [2, 2], [4, 0], [4, 2], [0, 4], [2, 4], [4, 4]]) == 88\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 40\n assert candidate(points = [[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2]]) == 40\n assert candidate(points = [[5, 5], [5, 10], [10, 5], [10, 10], [7, 7], [8, 8]]) == 16\n assert candidate(points = [[0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]) == 24\n assert candidate(points = [[-1, 0], [1, 0], [0, -1], [0, 1], [1, 1], [-1, -1], [-1, 1], [1, -1]]) == 48\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [1, 2], [2, 1], [1, 3], [3, 1], [2, 3], [3, 2], [2, 0], [0, 2], [3, 0], [0, 3]]) == 192\n assert candidate(points = [[-10000, -10000], [10000, 10000], [0, 0], [5000, 5000], [-5000, -5000], [2000, 2000], [-2000, -2000]]) == 10\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [0, 1], [0, 2], [0, 3], [0, 4]]) == 18\n assert candidate(points = [[0, 0], [1, 1], [1, 0], [2, 0], [2, 1], [0, 1], [0, 2], [1, 2], [2, 2], [3, 2]]) == 104\n assert candidate(points = [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3], [4, 4]]) == 104\n assert candidate(points = [[-1, -1], [0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]) == 12\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0]]) == 18\n assert candidate(points = [[100, 100], [101, 101], [102, 102], [100, 102], [102, 100], [101, 100], [100, 101], [102, 101], [101, 102]]) == 88\n assert candidate(points = [[-1, -1], [0, 0], [1, 1], [2, 2], [3, 3], [4, 4]]) == 12\n assert candidate(points = [[-1, -1], [0, 0], [1, 1], [2, 2], [3, 3], [-1, 1], [-2, 2], [-3, 3], [1, -1], [2, -2], [3, -3]]) == 78\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]) == 40\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0]]) == 40\n assert candidate(points = [[0, 0], [1, 1], [1, -1], [-1, 1], [-1, -1]]) == 20\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [-1, 0], [0, -1]]) == 20\n assert candidate(points = [[-1, 0], [0, 0], [1, 0], [0, -1], [0, 1]]) == 20\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12], [13, 13]]) == 72\n assert candidate(points = [[0, 0], [10000, 10000], [-10000, -10000], [10000, -10000], [-10000, 10000]]) == 20\n assert candidate(points = [[-1, 0], [1, 0], [0, -1], [0, 1], [1, 1]]) == 12\n assert candidate(points = [[0, 0], [0, 5], [5, 0], [5, 5], [2, 2], [3, 3], [4, 4]]) == 24\n assert candidate(points = [[0, 0], [1, 0], [1, 1], [2, 1], [2, 2], [3, 2], [3, 3], [4, 3], [4, 4], [5, 4]]) == 40\n assert candidate(points = [[0, 0], [0, 1], [1, 0], [1, 1], [2, 2], [2, 1], [1, 2]]) == 38\n assert candidate(points = [[0, 1], [1, 0], [1, 2], [2, 1], [2, 3], [3, 2]]) == 24\n assert candidate(points = [[0, 0], [1, 2], [1, -2], [2, 4], [2, -4], [-1, 2], [-1, -2]]) == 18\n assert candidate(points = [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9]]) == 40\n assert candidate(points = [[0, 0], [10, 0], [20, 0], [0, 10], [10, 10], [20, 10], [0, 20], [10, 20], [20, 20]]) == 88\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6]]) == 8\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]) == 18\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [0, 1], [1, 1], [2, 1], [3, 1], [0, 2], [1, 2], [2, 2], [3, 2]]) == 164\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [1, 1], [1, -1]]) == 20\n assert candidate(points = [[0, 0], [0, 2], [2, 0], [2, 2], [1, 1]]) == 20\n assert candidate(points = [[0, 0], [1, 1], [1, 0], [0, 1], [2, 2], [2, 0], [0, 2]]) == 42\n assert candidate(points = [[-1000, -1000], [-1000, -999], [-999, -1000], [-999, -999], [-1001, -1001], [-1001, -1000], [-1000, -1001]]) == 38\n assert candidate(points = [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1]]) == 40\n assert candidate(points = [[0, 0], [1, 0], [1, 1], [0, 1], [0.5, 0.5], [1.5, 0.5], [1.5, 1.5], [0.5, 1.5]]) == 60\n assert candidate(points = [[-5, 5], [-3, -3], [-1, 1], [-2, -2], [0, 0], [2, 2], [3, 3], [5, -5], [4, 4]]) == 32\n assert candidate(points = [[-1, 0], [0, 0], [1, 0], [0, 1], [0, -1]]) == 20\n assert candidate(points = [[10, 10], [10, 20], [20, 20], [20, 10], [10, 15]]) == 12\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [1, 0], [0, 1], [2, 0], [0, 2]]) == 42\n assert candidate(points = [[-1, -1], [0, -1], [1, -1], [-1, 0], [0, 0], [1, 0], [-1, 1], [0, 1], [1, 1], [-1, 2], [0, 2], [1, 2]]) == 164\n assert candidate(points = [[-1, 0], [0, 1], [1, -1], [-2, 0], [0, 2], [2, -2], [-3, 0], [0, 3], [3, -3], [-4, 0]]) == 32\n assert candidate(points = [[-10000, -10000], [-9999, -9999], [-9998, -9998], [-9997, -9997], [-9996, -9996]]) == 8\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [0, 1], [1, 1], [2, 1], [0, 2], [1, 2], [2, 2]]) == 88\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [0, 1]]) == 6\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1], [2, 0], [0, 2]]) == 24\n assert candidate(points = [[0, 0], [1, 1], [1, 2], [2, 1], [2, 2]]) == 12\n assert candidate(points = [[1, 2], [2, 4], [3, 6], [4, 8], [5, 10], [6, 12]]) == 12\n assert candidate(points = [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0]]) == 12\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1], [2, 0], [0, 2], [2, 1], [1, 2], [2, 2], [3, 3]]) == 104\n assert candidate(points = [[100, 100], [101, 100], [100, 101], [101, 101], [102, 102], [102, 101], [101, 102]]) == 38\n assert candidate(points = [[0, 0], [0, 2], [2, 0], [2, 2], [1, 1], [1, 3], [3, 1], [3, 3], [2, 3], [3, 2]]) == 92\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0]]) == 40\n assert candidate(points = [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]) == 12\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 24\n assert candidate(points = [[-1, 0], [1, 0], [0, -1], [0, 1], [0, 0]]) == 20\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [11, 11], [12, 12]]) == 60\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]) == 8\n assert candidate(points = [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]) == 40\n assert candidate(points = [[0, 0], [1, 1], [2, 2], [1, 2], [2, 1]]) == 12\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1], [2, 0], [0, 2], [1, 2]]) == 38\n assert candidate(points = [[100, 100], [101, 100], [100, 101], [101, 101], [100, 99], [101, 99], [99, 100], [99, 101], [99, 99]]) == 88\n assert candidate(points = [[-2, -2], [-1, -1], [0, 0], [1, 1], [2, 2], [1, 0], [0, 1]]) == 26\n assert candidate(points = [[0, 0], [1, 2], [2, 1], [2, 3], [3, 2], [1, 3]]) == 18\n assert candidate(points = [[0, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2], [3, 0], [3, 1], [3, 2], [4, 0]]) == 94\n assert candidate(points = [[-1, 0], [0, 0], [1, 0], [0, -1], [0, 1], [1, 1], [-1, -1], [1, -1], [-1, 1]]) == 88\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [-1, 0], [0, -1], [1, 1], [-1, -1]]) == 38\n assert candidate(points = [[-5, -5], [-5, 0], [0, -5], [0, 0], [2, 2], [3, 3], [4, 4]]) == 18\n assert candidate(points = [[0, 0], [1, 0], [0, 1], [1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]) == 60\n", "comparison": "exact"}, "public_tests": ["[[0,0],[1,0],[2,0]]", "[[1,1],[2,2],[3,3]]", "[[1,1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["points"], "leetcode_dataset_entry_point": "Solution().numberOfBoomerangs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:33+00:00", "tests_total": 105, "tests_dropped": 3, "flags": [], "topic_tags": ["array", "hash-table", "math"]}, "language": "ruby", "interface": {"raw_signature": "def number_of_boomerangs(points)", "container": null, "callable": "number_of_boomerangs", "parameters": [{"name": "points", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 448, "task_id": "find-all-numbers-disappeared-in-an-array", "difficulty": "Easy", "problem_description": "Given an array nums of n integers where nums[i] is in the range [1, n], return an array of all the integers in the range [1, n] that do not appear in nums.\n\nExample 1:\n\nInput: nums = [4,3,2,7,8,2,3,1]\nOutput: [5,6]\n\nExample 2:\n\nInput: nums = [1,1]\nOutput: [2]\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 10^5\n- 1 <= nums[i] <= n\n\nFollow up: Could you do it without extra space and in O(n) runtime? You may assume the returned list does not count as extra space.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 4, 3, 2, 1]) == []\n assert candidate(nums = [10, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == []\n assert candidate(nums = [1, 1]) == [2]\n assert candidate(nums = [4, 3, 2, 7, 8, 2, 3, 1]) == [5, 6]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5]) == [6, 7, 8, 9]\n assert candidate(nums = [3, 3, 3, 3, 3]) == [1, 2, 4, 5]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert candidate(nums = [2, 2, 2, 2]) == [1, 3, 4]\n assert candidate(nums = [1, 2, 3, 4, 5]) == []\n assert candidate(nums = [1, 2, 2, 3, 3]) == [4, 5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == []\n assert candidate(nums = [5, 4, 3, 2, 1, 1, 1, 1, 1, 1]) == [6, 7, 8, 9, 10]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == [16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5]) == [21, 22, 23, 24, 25]\n assert candidate(nums = [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == [51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10]) == [11, 12, 13]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [1, 2, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8]) == [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == []\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2]) == [21]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == []\n assert candidate(nums = [5, 5, 5, 5, 5]) == [1, 2, 3, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 19, 18, 17, 16]) == [21, 22, 23, 24, 25]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(nums = [3, 1, 2, 5, 3, 3, 4, 6, 8, 7, 9, 10, 10]) == [11, 12, 13]\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16]) == [1, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == []\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60]\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]) == [21, 22, 23, 24, 25, 26, 27, 28, 29, 30]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == []\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [1, 2, 3, 4, 6, 7, 8, 9, 10]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(nums = [5, 3, 1, 2, 3, 6, 7, 4, 9, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == [41]\n assert candidate(nums = [3, 3, 3, 1, 2, 2, 2, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9, 9, 10, 10, 10, 10, 10]) == [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 1, 1, 1, 1]) == [2, 3, 4]\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 20]) == [11, 12, 13, 14, 15, 16, 17, 18, 19]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1]) == [21, 22, 23, 24, 25]\n assert candidate(nums = [3, 3, 3, 3, 3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == [17, 18, 19, 20]\n assert candidate(nums = [3, 3, 3, 3, 3, 1, 2, 4, 5]) == [6, 7, 8, 9]\n assert candidate(nums = [1, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9]) == [2, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == []\n assert candidate(nums = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == []\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]\n assert candidate(nums = [2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 1]) == [101]\n", "comparison": "exact"}, "public_tests": ["[4,3,2,7,8,2,3,1]", "[1,1]"], "hints": ["This is a really easy problem if you decide to use additional memory. For those trying to write an initial solution using additional memory, think counters!", "However, the trick really is to not use any additional space than what is already available to use. Sometimes, multiple passes over the input array help find the solution. However, there's an interesting piece of information in this problem that makes it easy to re-use the input array itself for the solution.", "The problem specifies that the numbers in the array will be in the range [1, n] where n is the number of elements in the array. Can we use this information and modify the array in-place somehow to find what we need?"], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findDisappearedNumbers", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:35+00:00", "tests_total": 68, "tests_dropped": 13, "flags": [], "topic_tags": ["array", "hash-table"]}, "language": "ruby", "interface": {"raw_signature": "def find_disappeared_numbers(nums)", "container": null, "callable": "find_disappeared_numbers", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 451, "task_id": "sort-characters-by-frequency", "difficulty": "Medium", "problem_description": "Given a string s, sort it in decreasing order based on the frequency of the characters. The frequency of a character is the number of times it appears in the string.\n\nReturn the sorted string. If there are multiple answers, return any of them.\n\nExample 1:\n\nInput: s = \"tree\"\nOutput: \"eert\"\nExplanation: 'e' appears twice while 'r' and 't' both appear once.\nSo 'e' must appear before both 'r' and 't'. Therefore \"eetr\" is also a valid answer.\n\nExample 2:\n\nInput: s = \"cccaaa\"\nOutput: \"aaaccc\"\nExplanation: Both 'c' and 'a' appear three times, so both \"cccaaa\" and \"aaaccc\" are valid answers.\nNote that \"cacaca\" is incorrect, as the same characters must be together.\n\nExample 3:\n\nInput: s = \"Aabb\"\nOutput: \"bbAa\"\nExplanation: \"bbaA\" is also a valid answer, but \"Aabb\" is incorrect.\nNote that 'A' and 'a' are treated as two different characters.\n\nConstraints:\n\n- 1 <= s.length <= 5 * 10^5\n- s consists of uppercase and lowercase English letters and digits.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"aA\") == \"aA\"\n assert candidate(s = \"2a554442f544asf\") == \"4444455522aaffs\"\n assert candidate(s = \"2a554442f544asfasss\") == \"44444ssssaaa55522ff\"\n assert candidate(s = \"zzzzZZZZ\") == \"zzzzZZZZ\"\n assert candidate(s = \"bbaaccdd\") == \"bbaaccdd\"\n assert candidate(s = \"1223334444\") == \"4444333221\"\n assert candidate(s = \"cccaaa\") == \"cccaaa\"\n assert candidate(s = \"tree\") == \"eetr\"\n assert candidate(s = \"aAaaaAaA\") == \"aaaaaAAA\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\"\n assert candidate(s = \"aAaaaAaaAAaAa\") == \"aaaaaaaaAAAAA\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\"\n assert candidate(s = \"aAaaaAaaAA\") == \"aaaaaaAAAA\"\n assert candidate(s = \"Aabb\") == \"bbAa\"\n assert candidate(s = \"1234567890\") == \"1234567890\"\n assert candidate(s = \"bbaacc\") == \"bbaacc\"\n assert candidate(s = \"aabbccddeeffgghhiiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"iiiaabbccddeeffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz\"\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhhiiiiiiijjjjjjjjjkkkkkkkkkkllllllllllllmmmmmmmmmmmmm\") == \"mmmmmmmmmmmmmllllllllllllkkkkkkkkkkjjjjjjjjjiiiiiiiaaaabbbbccccddddeeeeffffgggghhhh\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\"\n assert candidate(s = \"aabbccddeeffgghhiiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzAA\") == \"iiiaabbccddeeffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzzAA\"\n assert candidate(s = \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz\") == \"AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz\"\n assert candidate(s = \"a1b2c3d4e5f6g7h8i9j0a1b2c3d4e5f6g7h8i9j0a1b2c3d4e5f6g7h8i9j0\") == \"aaa111bbb222ccc333ddd444eee555fff666ggg777hhh888iii999jjj000\"\n assert candidate(s = \"eLeetCoDe\") == \"eeeeLtCoD\"\n assert candidate(s = \"112233445566778899001122334455\") == \"111122223333444455556677889900\"\n assert candidate(s = \"abcABC123abcABC123abcABC\") == \"aaabbbcccAAABBBCCC112233\"\n assert candidate(s = \"anagram\") == \"aaangrm\"\n assert candidate(s = \"a1b2c3d4e5f6g7h8i9j0A1B2C3D4E5F6G7H8I9J0\") == \"11223344556677889900abcdefghijABCDEFGHIJ\"\n assert candidate(s = \"frequencysorttestcase\") == \"eeeessstttrrccfqunyoa\"\n assert candidate(s = \"frequencySort\") == \"rreefquncySot\"\n assert candidate(s = \"aaaaaaaaaabbccccdddd\") == \"aaaaaaaaaaccccddddbb\"\n assert candidate(s = \"leetcode\") == \"eeeltcod\"\n assert candidate(s = \"ZzYyXxWwVvUuTtSsRrQqPpOoNnMmLlKkJjIiHhGgFfEeDdCcBbAa1234567890\") == \"ZzYyXxWwVvUuTtSsRrQqPpOoNnMmLlKkJjIiHhGgFfEeDdCcBbAa1234567890\"\n assert candidate(s = \"01233210\") == \"00112233\"\n assert candidate(s = \"aabbccddeeffgghhiiijjkkllmmnnooppqqrrssttuuvvwwxxyyzzABCDEFGHIJKLMNOPQRSTUVWXYZ\") == \"iiiaabbccddeeffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n assert candidate(s = \"111222333444555666777888999000\") == \"111222333444555666777888999000\"\n assert candidate(s = \"repeatedcharactersaretestedhere\") == \"eeeeeeeeerrrrraaaattttddcchhssp\"\n assert candidate(s = \"aaAAbbBBccCCddDDeeEEffFFggGGhhHHiiIIjjJJkkKKllLLmmMMnnNNooppQQrrSSttUUvvWWxxYYzzZZ\") == \"aaAAbbBBccCCddDDeeEEffFFggGGhhHHiiIIjjJJkkKKllLLmmMMnnNNooppQQrrSSttUUvvWWxxYYzzZZ\"\n assert candidate(s = \"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") == \"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n assert candidate(s = \"mississippi\") == \"iiiissssppm\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890\") == \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890\"\n assert candidate(s = \"aabbccddeeffgghhiiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890\") == \"iiiaabbccddeeffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz1234567890\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\"\n assert candidate(s = \"Mississippi\") == \"iiiissssppM\"\n assert candidate(s = \"aAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaA\") == \"aaaaaaaaaaaaaaaaaaaaAAAAAAAAAAAAAAAAAAAA\"\n assert candidate(s = \"123456789012345678901234567890\") == \"111222333444555666777888999000\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == \"zyxwvutsrqponmlkjihgfedcba\"\n", "comparison": "exact"}, "public_tests": ["\"tree\"", "\"cccaaa\"", "\"Aabb\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().frequencySort", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:40+00:00", "tests_total": 54, "tests_dropped": 5, "flags": ["multiple_answers"], "topic_tags": ["hash-table", "string", "sorting", "heap-priority-queue", "bucket-sort", "counting"]}, "language": "ruby", "interface": {"raw_signature": "def frequency_sort(s)", "container": null, "callable": "frequency_sort", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 452, "task_id": "minimum-number-of-arrows-to-burst-balloons", "difficulty": "Medium", "problem_description": "There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array points where points[i] = [x_start, x_end] denotes a balloon whose horizontal diameter stretches between x_start and x_end. You do not know the exact y-coordinates of the balloons.\n\nArrows can be shot up directly vertically (in the positive y-direction) from different points along the x-axis. A balloon with x_start and x_end is burst by an arrow shot at x if x_start <= x <= x_end. There is no limit to the number of arrows that can be shot. A shot arrow keeps traveling up infinitely, bursting any balloons in its path.\n\nGiven the array points, return the minimum number of arrows that must be shot to burst all balloons.\n\nExample 1:\n\nInput: points = [[10,16],[2,8],[1,6],[7,12]]\nOutput: 2\nExplanation: The balloons can be burst by 2 arrows:\n- Shoot an arrow at x = 6, bursting the balloons [2,8] and [1,6].\n- Shoot an arrow at x = 11, bursting the balloons [10,16] and [7,12].\n\nExample 2:\n\nInput: points = [[1,2],[3,4],[5,6],[7,8]]\nOutput: 4\nExplanation: One arrow needs to be shot for each balloon for a total of 4 arrows.\n\nExample 3:\n\nInput: points = [[1,2],[2,3],[3,4],[4,5]]\nOutput: 2\nExplanation: The balloons can be burst by 2 arrows:\n- Shoot an arrow at x = 2, bursting the balloons [1,2] and [2,3].\n- Shoot an arrow at x = 4, bursting the balloons [3,4] and [4,5].\n\nConstraints:\n\n- 1 <= points.length <= 10^5\n- points[i].length == 2\n- -2^31 <= x_start < x_end <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5]]) == 2\n assert candidate(points = [[10, 16], [2, 8], [1, 6], [7, 12]]) == 2\n assert candidate(points = [[1, 100], [2, 99], [3, 98]]) == 1\n assert candidate(points = [[3, 9], [7, 12], [3, 8], [6, 8], [9, 10], [2, 9], [0, 9], [3, 9], [0, 6], [2, 8]]) == 2\n assert candidate(points = [[1, 2], [3, 4], [5, 6], [7, 8]]) == 4\n assert candidate(points = [[0, 9], [0, 5], [4, 8], [7, 8], [9, 10], [9, 12], [4, 5], [4, 9], [5, 9], [8, 10]]) == 3\n assert candidate(points = [[-2147483646, -2147483645], [2147483646, 2147483647]]) == 2\n assert candidate(points = [[-1000000000, 1000000000], [-999999999, 999999999], [-999999998, 999999998], [1, 2], [2, 3], [3, 4]]) == 2\n assert candidate(points = [[-100, 0], [-90, 10], [-80, 20], [-70, 30], [-60, 40], [-50, 50], [-40, 60], [-30, 70], [-20, 80], [-10, 90]]) == 1\n assert candidate(points = [[1, 2], [2, 5], [5, 7], [6, 10], [10, 15], [15, 20]]) == 3\n assert candidate(points = [[5, 10], [15, 20], [25, 30], [5, 15], [10, 20], [15, 25]]) == 3\n assert candidate(points = [[1, 2], [2, 5], [5, 8], [8, 10], [10, 12], [12, 15], [15, 18], [18, 20], [20, 22], [22, 25], [25, 30], [30, 35], [35, 40]]) == 7\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 10]]) == 5\n assert candidate(points = [[-1, 1], [-2, 2], [-3, 3], [-4, 4], [-5, 5], [-6, 6], [-7, 7], [-8, 8], [-9, 9], [-10, 10]]) == 1\n assert candidate(points = [[-1000, -500], [-499, -300], [-299, -100], [-99, 0], [1, 100], [101, 200], [201, 300], [301, 400], [401, 500], [501, 600]]) == 10\n assert candidate(points = [[-10, 0], [0, 10], [5, 15], [10, 20]]) == 2\n assert candidate(points = [[1, 10], [11, 20], [21, 30], [31, 40], [41, 50], [51, 60], [61, 70], [71, 80], [81, 90], [91, 100]]) == 10\n assert candidate(points = [[-2147483648, 2147483647], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]) == 4\n assert candidate(points = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]) == 2\n assert candidate(points = [[1, 5], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 4\n assert candidate(points = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12]]) == 4\n assert candidate(points = [[1, 5], [5, 9], [9, 13], [13, 17], [17, 21], [21, 25], [25, 29], [29, 33], [33, 37]]) == 5\n assert candidate(points = [[-10, 15], [-5, 20], [0, 25], [5, 30], [10, 35], [15, 40], [20, 45], [25, 50]]) == 2\n assert candidate(points = [[-100, -50], [-50, 0], [0, 50], [50, 100], [25, 75]]) == 2\n assert candidate(points = [[-100, -90], [-90, -80], [-80, -70], [-70, -60], [-60, -50], [-50, -40], [-40, -30], [-30, -20], [-20, -10]]) == 5\n assert candidate(points = [[-100, -50], [-75, -25], [-50, 0], [-25, 25], [0, 50], [25, 75], [50, 100], [-100, 0], [0, 100]]) == 3\n assert candidate(points = [[-100, -90], [-80, -70], [-60, -50], [-40, -30], [-20, -10], [0, 10], [20, 30], [40, 50], [60, 70], [80, 90], [100, 110]]) == 11\n assert candidate(points = [[1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2], [1, 2]]) == 1\n assert candidate(points = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [1, 100]]) == 5\n assert candidate(points = [[-10, -8], [-7, -5], [-3, -1], [0, 2], [3, 5], [6, 8], [9, 11], [12, 14]]) == 8\n assert candidate(points = [[-5, -3], [-4, -2], [-3, -1], [-2, 0], [-1, 1], [0, 2], [1, 3], [2, 4], [3, 5]]) == 3\n assert candidate(points = [[-1000, 1000], [500, 1500], [-1500, -500], [0, 500], [500, 1000]]) == 2\n assert candidate(points = [[1, 1000], [2, 999], [3, 998], [4, 997], [5, 996], [6, 995], [7, 994], [8, 993], [9, 992], [10, 991], [11, 990], [12, 989], [13, 988], [14, 987]]) == 1\n assert candidate(points = [[-5, -3], [-4, -2], [-1, 1], [0, 2], [1, 3], [2, 4]]) == 3\n assert candidate(points = [[1, 5], [2, 6], [3, 7], [4, 8], [5, 9], [6, 10], [7, 11], [8, 12], [9, 13], [10, 14]]) == 2\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11]]) == 5\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15]]) == 7\n assert candidate(points = [[-1, 1], [-1, 2], [0, 2], [1, 3], [0, 3], [-1, 3]]) == 1\n assert candidate(points = [[1, 5], [2, 8], [3, 9], [4, 10], [5, 11], [6, 12], [7, 13], [8, 14], [9, 15]]) == 2\n assert candidate(points = [[-10, 5], [0, 10], [5, 15], [10, 20], [15, 25], [20, 30], [25, 35]]) == 3\n assert candidate(points = [[-5, 5], [0, 10], [-10, 0], [5, 15], [-15, -5], [10, 20], [-20, -10], [15, 25], [-25, -15], [20, 30]]) == 4\n assert candidate(points = [[-2147483648, 2147483647], [-2147483647, 2147483646], [-2147483646, 2147483645], [-2147483645, 2147483644], [-2147483644, 2147483643]]) == 1\n assert candidate(points = [[-10, -1], [0, 1], [2, 3], [5, 7], [10, 12], [15, 17], [20, 22], [25, 27], [30, 32]]) == 9\n assert candidate(points = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 3\n assert candidate(points = [[1, 5], [2, 8], [3, 10], [4, 12], [5, 14], [6, 16]]) == 2\n assert candidate(points = [[1, 100], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 5\n assert candidate(points = [[1, 5], [2, 3], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10], [9, 11], [10, 12], [11, 13]]) == 4\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]) == 5\n assert candidate(points = [[1, 20], [2, 19], [3, 18], [4, 17], [5, 16], [6, 15], [7, 14], [8, 13], [9, 12], [10, 11]]) == 1\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15], [15, 16]]) == 8\n assert candidate(points = [[10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 5\n assert candidate(points = [[-1000000, 1000000], [0, 1000000], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]) == 4\n assert candidate(points = [[1, 50], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100]]) == 5\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [1, 3], [3, 5], [5, 7], [7, 9], [2, 4], [4, 6], [6, 8], [8, 10]]) == 5\n assert candidate(points = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == 10\n assert candidate(points = [[100, 150], [120, 200], [130, 180], [160, 210], [170, 220], [180, 230]]) == 2\n assert candidate(points = [[100, 200], [150, 250], [200, 300], [250, 350], [300, 400], [350, 450], [400, 500], [450, 550], [500, 600]]) == 3\n assert candidate(points = [[-2, -1], [-1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8]]) == 5\n assert candidate(points = [[1, 2], [2, 3], [1, 3], [3, 4], [4, 5], [1, 5], [5, 6], [6, 7], [1, 7], [7, 8]]) == 4\n assert candidate(points = [[10, 16], [2, 8], [1, 6], [7, 12], [3, 11], [14, 17], [9, 13], [6, 10]]) == 3\n assert candidate(points = [[-1, 1], [-2, 2], [-3, 3], [-4, 4], [-5, 5], [-6, 6], [-7, 7], [-8, 8], [-9, 9], [-10, 10]]) == 1\n assert candidate(points = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10], [1, 11]]) == 1\n assert candidate(points = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [1, 10]]) == 1\n assert candidate(points = [[1, 3], [2, 4], [3, 5], [4, 6], [5, 7], [6, 8], [7, 9], [8, 10]]) == 3\n assert candidate(points = [[1, 10], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11], [11, 12], [12, 13], [13, 14]]) == 6\n assert candidate(points = [[0, 9], [2, 8], [3, 7], [6, 10], [1, 5], [4, 6], [7, 11], [8, 12], [9, 13], [10, 14]]) == 2\n assert candidate(points = [[1, 2], [2, 5], [5, 10], [10, 15], [15, 20], [20, 25], [25, 30], [30, 35], [35, 40], [40, 45]]) == 5\n assert candidate(points = [[1, 5], [5, 10], [10, 15], [15, 20], [20, 25]]) == 3\n assert candidate(points = [[-5, -1], [0, 5], [10, 15], [1, 9]]) == 3\n assert candidate(points = [[-10, -5], [-5, 0], [0, 5], [5, 10], [10, 15], [15, 20], [20, 25]]) == 4\n assert candidate(points = [[1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5], [1, 5]]) == 1\n assert candidate(points = [[1, 2], [3, 5], [4, 8], [5, 10], [6, 12], [7, 15], [8, 20]]) == 3\n assert candidate(points = [[-10, -1], [1, 2], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11], [12, 13], [14, 15], [16, 17]]) == 9\n assert candidate(points = [[-2147483646, -2147483645], [-2147483645, -2147483644], [-2147483644, -2147483643]]) == 2\n assert candidate(points = [[1, 3], [3, 5], [5, 7], [7, 9], [9, 11], [11, 13], [13, 15], [15, 17], [17, 19], [19, 21]]) == 5\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9]]) == 4\n assert candidate(points = [[1000, 2000], [1500, 2500], [2000, 3000], [2500, 3500], [3000, 4000], [3500, 4500], [4000, 5000]]) == 3\n assert candidate(points = [[-10, 0], [-5, 5], [0, 10], [5, 15], [10, 20]]) == 2\n assert candidate(points = [[1, 1000], [2, 999], [3, 998], [4, 997], [5, 996], [6, 995], [7, 994], [8, 993], [9, 992], [10, 991]]) == 1\n assert candidate(points = [[1, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80], [80, 90], [90, 100], [100, 110]]) == 5\n assert candidate(points = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [11, 20], [12, 19], [13, 18], [14, 17], [15, 16]]) == 2\n assert candidate(points = [[5, 10], [15, 20], [10, 15], [25, 30], [18, 25]]) == 3\n assert candidate(points = [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 11], [11, 12], [12, 13], [13, 14], [14, 15]]) == 7\n assert candidate(points = [[10, 20], [15, 25], [20, 30], [25, 35], [30, 40], [35, 45], [40, 50], [45, 55], [50, 60]]) == 3\n assert candidate(points = [[1, 10], [5, 15], [10, 20], [15, 25], [20, 30]]) == 2\n assert candidate(points = [[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60]]) == 4\n assert candidate(points = [[1, 10], [10, 20], [20, 30], [30, 40], [40, 50], [50, 60], [60, 70], [70, 80]]) == 4\n assert candidate(points = [[1, 2], [4, 5], [6, 7], [8, 9], [10, 11], [12, 13], [14, 15], [16, 17], [18, 19], [20, 21]]) == 10\n assert candidate(points = [[1, 1000000], [2, 999999], [3, 999998], [4, 999997], [5, 999996], [6, 999995], [7, 999994], [8, 999993], [9, 999992], [10, 999991]]) == 1\n", "comparison": "exact"}, "public_tests": ["[[10,16],[2,8],[1,6],[7,12]]", "[[1,2],[3,4],[5,6],[7,8]]", "[[1,2],[2,3],[3,4],[4,5]]"], "hints": [], "metadata": {"canonical_parameter_names": ["points"], "leetcode_dataset_entry_point": "Solution().findMinArrowShots", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:42+00:00", "tests_total": 110, "tests_dropped": 21, "flags": [], "topic_tags": ["array", "greedy", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_min_arrow_shots(points)", "container": null, "callable": "find_min_arrow_shots", "parameters": [{"name": "points", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 453, "task_id": "minimum-moves-to-equal-array-elements", "difficulty": "Medium", "problem_description": "Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal.\n\nIn one move, you can increment n - 1 elements of the array by 1.\n\nExample 1:\n\nInput: nums = [1,2,3]\nOutput: 3\nExplanation: Only three moves are needed (remember each move increments two elements):\n[1,2,3] => [2,3,3] => [3,4,3] => [4,4,4]\n\nExample 2:\n\nInput: nums = [1,1,1]\nOutput: 0\n\nConstraints:\n\n- n == nums.length\n- 1 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n- The answer is guaranteed to fit in a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1000000000, -1000000000]) == 2000000000\n assert candidate(nums = [1, 2, 100]) == 100\n assert candidate(nums = [10, 15, 20]) == 15\n assert candidate(nums = [1, 1, 1]) == 0\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 45\n assert candidate(nums = [1, 3, 5, 7, 9]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 45\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 20\n assert candidate(nums = [5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [1, 2, 1, 4]) == 4\n assert candidate(nums = [-5, -4, -3, -2, -1]) == 10\n assert candidate(nums = [100, 99, 98, 97, 96]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 45\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [-1000000000, -1000000000, -1000000000]) == 0\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 20\n assert candidate(nums = [4, 5, 6, 7]) == 6\n assert candidate(nums = [1, 2, 3]) == 3\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [5, 6, 8, 13]) == 12\n assert candidate(nums = [-1, 1, 0, -3]) == 9\n assert candidate(nums = [1, 2, 1, 2, 1]) == 2\n assert candidate(nums = [-1, 0, 1]) == 3\n assert candidate(nums = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 5490\n assert candidate(nums = [29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == 210\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 19000\n assert candidate(nums = [-1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000, -1000000000]) == 0\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]) == 950\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 55\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 4500\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 225\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == 45\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == 55\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15]) == 105\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 380\n assert candidate(nums = [-1000000000, -1000000000, -1000000000, -1000000000, -1000000000]) == 0\n assert candidate(nums = [1, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 1111111092\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [100, 200, 300, 400, 500, 100, 200, 300, 400, 500]) == 2000\n assert candidate(nums = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55]) == 210\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 1111111101\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 90\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 90\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 45\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1000000000]) == 999999999\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 2036\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == 2100\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 105\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 20\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990]) == 45\n assert candidate(nums = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 55\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 450\n assert candidate(nums = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145, 155, 165, 175, 185, 195]) == 1900\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000000000]) == 999999999\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 210\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 1900\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991]) == 45\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 190\n assert candidate(nums = [-100, 0, 100, -200, 0, 200, -300, 0, 300, -400, 0, 400, -500, 0, 500]) == 7500\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 300\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250]) == 3000\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 1]) == 81\n assert candidate(nums = [100, 100, 100, 100, 100, 99, 99, 99, 99, 99]) == 5\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6]) == 70\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == 450\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 190\n", "comparison": "exact"}, "public_tests": ["[1,2,3]", "[1,1,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().minMoves", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:44+00:00", "tests_total": 77, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "math"]}, "language": "ruby", "interface": {"raw_signature": "def min_moves(nums)", "container": null, "callable": "min_moves", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 454, "task_id": "4sum-ii", "difficulty": "Medium", "problem_description": "Given four integer arrays nums1, nums2, nums3, and nums4 all of length n, return the number of tuples (i, j, k, l) such that:\n\n- 0 <= i, j, k, l < n\n- nums1[i] + nums2[j] + nums3[k] + nums4[l] == 0\n\nExample 1:\n\nInput: nums1 = [1,2], nums2 = [-2,-1], nums3 = [-1,2], nums4 = [0,2]\nOutput: 2\nExplanation:\nThe two tuples are:\n1. (0, 0, 0, 1) -> nums1[0] + nums2[0] + nums3[0] + nums4[1] = 1 + (-2) + (-1) + 2 = 0\n2. (1, 1, 0, 0) -> nums1[1] + nums2[1] + nums3[0] + nums4[0] = 2 + (-1) + (-1) + 0 = 0\n\nExample 2:\n\nInput: nums1 = [0], nums2 = [0], nums3 = [0], nums4 = [0]\nOutput: 1\n\nConstraints:\n\n- n == nums1.length\n- n == nums2.length\n- n == nums3.length\n- n == nums4.length\n- 1 <= n <= 200\n- -2^28 <= nums1[i], nums2[i], nums3[i], nums4[i] <= 2^28\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [1, 2, 3],nums2 = [-1, -2, -3],nums3 = [1, -1, 0],nums4 = [0, 2, -2]) == 13\n assert candidate(nums1 = [1, 2, 3],nums2 = [-1, -2, -3],nums3 = [1, 2, 3],nums4 = [-1, -2, -3]) == 19\n assert candidate(nums1 = [-1, -2, -3],nums2 = [3, 2, 1],nums3 = [1, -2, 3],nums4 = [-3, 2, 1]) == 10\n assert candidate(nums1 = [-1, 1, 0],nums2 = [-1, 1, 0],nums3 = [-1, 1, 0],nums4 = [-1, 1, 0]) == 19\n assert candidate(nums1 = [0],nums2 = [0],nums3 = [0],nums4 = [0]) == 1\n assert candidate(nums1 = [-1, -1, -1, -1],nums2 = [1, 1, 1, 1],nums3 = [-1, -1, -1, -1],nums4 = [1, 1, 1, 1]) == 256\n assert candidate(nums1 = [1, 2, 3],nums2 = [-1, -2, -3],nums3 = [0, 1, -1],nums4 = [0, -1, 1]) == 19\n assert candidate(nums1 = [1, 0, -1],nums2 = [1, 0, -1],nums3 = [1, 0, -1],nums4 = [1, 0, -1]) == 19\n assert candidate(nums1 = [1, -1],nums2 = [1, -1],nums3 = [1, -1],nums4 = [1, -1]) == 6\n assert candidate(nums1 = [100000000, -100000000],nums2 = [100000000, -100000000],nums3 = [100000000, -100000000],nums4 = [100000000, -100000000]) == 6\n assert candidate(nums1 = [1, 2, 3],nums2 = [-3, -2, -1],nums3 = [-1, 2, 1],nums4 = [0, 2, -2]) == 12\n assert candidate(nums1 = [100, 200],nums2 = [-100, -200],nums3 = [100, 200],nums4 = [-100, -200]) == 6\n assert candidate(nums1 = [1, 2],nums2 = [-2, -1],nums3 = [-1, 2],nums4 = [0, 2]) == 2\n assert candidate(nums1 = [-1, -1, -1],nums2 = [-1, -1, -1],nums3 = [-1, -1, -1],nums4 = [-1, -1, -1]) == 0\n assert candidate(nums1 = [0, 1, -1],nums2 = [-1, 1, 0],nums3 = [0, -1, 1],nums4 = [1, 0, -1]) == 19\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [-100, -200, -300, -400, -500],nums3 = [500, -500, 500, -500, 500],nums4 = [-500, 500, -500, 500, -500]) == 65\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [1, 2, 3, 4],nums3 = [-1, -2, -3, -4],nums4 = [-1, -2, -3, -4]) == 44\n assert candidate(nums1 = [1, -1, 1, -1],nums2 = [1, -1, 1, -1],nums3 = [1, -1, 1, -1],nums4 = [1, -1, 1, -1]) == 96\n assert candidate(nums1 = [1, 1, 1, 1, 1],nums2 = [-1, -1, -1, -1, -1],nums3 = [0, 0, 0, 0, 0],nums4 = [0, 0, 0, 0, 0]) == 625\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [-10, -20, -30, -40],nums3 = [5, 10, 15, 20],nums4 = [-5, -10, -15, -20]) == 28\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [-1, -2, -3, -4, -5],nums3 = [0, 0, 0, 0, 0],nums4 = [0, 0, 0, 0, 0]) == 125\n assert candidate(nums1 = [-10, 10, -10, 10],nums2 = [10, -10, 10, -10],nums3 = [5, -5, 5, -5],nums4 = [-5, 5, -5, 5]) == 64\n assert candidate(nums1 = [10, 20, 30, 40, 50, 60, 70, 80],nums2 = [-10, -20, -30, -40, -50, -60, -70, -80],nums3 = [1, 2, 3, 4, 5, 6, 7, 8],nums4 = [-1, -2, -3, -4, -5, -6, -7, -8]) == 64\n assert candidate(nums1 = [-1, 0, 1, 2],nums2 = [1, -1, 2, -2],nums3 = [2, 1, -1, -2],nums4 = [-2, 2, -1, 1]) == 33\n assert candidate(nums1 = [0, 0, 0, 0],nums2 = [0, 0, 0, 0],nums3 = [0, 0, 0, 0],nums4 = [0, 0, 0, 0]) == 256\n assert candidate(nums1 = [100, 200, 300, 400],nums2 = [-100, -200, -300, -400],nums3 = [1, 2, 3, 4],nums4 = [-1, -2, -3, -4]) == 16\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [-1, -1, -1, -1],nums3 = [1, 1, 1, 1],nums4 = [-1, -1, -1, -1]) == 256\n assert candidate(nums1 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums2 = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1],nums3 = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2],nums4 = [-2, -2, -2, -2, -2, -2, -2, -2, -2, -2]) == 10000\n assert candidate(nums1 = [100, 200, 300, 400],nums2 = [-100, -200, -300, -400],nums3 = [50, 100, 150, 200],nums4 = [-50, -100, -150, -200]) == 28\n assert candidate(nums1 = [100, 200, 300, 400],nums2 = [-100, -200, -300, -400],nums3 = [50, 150, 250, 350],nums4 = [-50, -150, -250, -350]) == 44\n assert candidate(nums1 = [100, 200, 300, 400],nums2 = [-400, -300, -200, -100],nums3 = [50, 150, 250, 350],nums4 = [-350, -250, -150, -50]) == 44\n assert candidate(nums1 = [1, 0, -1, -2],nums2 = [2, -2, 1, 0],nums3 = [-1, 0, 1, 2],nums4 = [1, -1, -2, 2]) == 36\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [-10, -20, -30, -40],nums3 = [10, 20, 30, 40],nums4 = [5, 15, 25, 35]) == 0\n assert candidate(nums1 = [0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0],nums3 = [0, 0, 0, 0, 0],nums4 = [0, 0, 0, 0, 0]) == 625\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [-1, -2, -3, -4, -5],nums3 = [1, 2, 3, 4, 5],nums4 = [-1, -2, -3, -4, -5]) == 85\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1],nums3 = [-1, -2, -3, -4, -5],nums4 = [-5, -4, -3, -2, -1]) == 85\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [-1, -2, -3, -4],nums3 = [0, 0, 0, 0],nums4 = [0, 0, 0, 0]) == 64\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [-10, -20, -30, -40],nums3 = [10, -10, 20, -20],nums4 = [-10, 10, -20, 20]) == 36\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [-1, -2, -3, -4],nums3 = [1, -1, 1, -1],nums4 = [2, -2, 2, -2]) == 32\n assert candidate(nums1 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],nums2 = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],nums3 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums4 = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 100\n assert candidate(nums1 = [25, -25, 50, -50],nums2 = [30, -30, 60, -60],nums3 = [10, -10, 20, -20],nums4 = [15, -15, 30, -30]) == 10\n assert candidate(nums1 = [1, -2, 3, -4],nums2 = [4, -3, 2, -1],nums3 = [-1, 2, -3, 4],nums4 = [1, -2, 3, -4]) == 36\n assert candidate(nums1 = [100000000, -100000000, 200000000, -200000000],nums2 = [50000000, -50000000, 150000000, -150000000],nums3 = [25000000, -25000000, 75000000, -75000000],nums4 = [12500000, -12500000, 37500000, -37500000]) == 0\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [2, 2, 2, 2],nums3 = [-3, -3, -3, -3],nums4 = [4, 4, 4, 4]) == 0\n assert candidate(nums1 = [1, -1, 2, -2, 3, -3],nums2 = [-3, 3, -2, 2, -1, 1],nums3 = [2, -2, 1, -1, 3, -3],nums4 = [-3, 3, 2, -2, 1, -1]) == 122\n assert candidate(nums1 = [10, -10, 20, -20],nums2 = [1, -1, 2, -2],nums3 = [3, -3, 4, -4],nums4 = [-4, 4, -3, 3]) == 2\n assert candidate(nums1 = [123, -123, 246, -246],nums2 = [369, -369, 738, -738],nums3 = [456, -456, 912, -912],nums4 = [-912, -456, 456, 912]) == 0\n assert candidate(nums1 = [100, -100, 200, -200],nums2 = [150, -150, 250, -250],nums3 = [200, -200, 300, -300],nums4 = [250, -250, 350, -350]) == 22\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6],nums2 = [-1, -2, -3, -4, -5, -6],nums3 = [1, -1, 2, -2, 3, -3],nums4 = [-1, 1, -2, 2, -3, 3]) == 128\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [-5, -4, -3, -2, -1],nums3 = [1, 1, 1, 1, 1],nums4 = [-1, -1, -1, -1, -1]) == 125\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [-1, -2, -3, -4, -5],nums3 = [5, -5, 5, -5, 5],nums4 = [-5, 5, -5, 5, -5]) == 65\n assert candidate(nums1 = [1, -1, 2, -2],nums2 = [1, -1, 2, -2],nums3 = [1, -1, 2, -2],nums4 = [1, -1, 2, -2]) == 36\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [-10, -20, -30, -40],nums3 = [5, 15, 25, 35],nums4 = [-5, -15, -25, -35]) == 44\n assert candidate(nums1 = [100, 200, 300, 400, 500],nums2 = [-500, -400, -300, -200, -100],nums3 = [50, 150, 250, 350, 450],nums4 = [-450, -350, -250, -150, -50]) == 85\n assert candidate(nums1 = [7, -7, 14, -14],nums2 = [21, -21, 42, -42],nums3 = [6, -6, 12, -12],nums4 = [28, -28, 56, -56]) == 0\n assert candidate(nums1 = [10, -10, 20, -20],nums2 = [5, -5, 15, -15],nums3 = [3, -3, 12, -12],nums4 = [8, -8, 17, -17]) == 12\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],nums3 = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],nums4 = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == 1000\n assert candidate(nums1 = [1, -1, 1, -1],nums2 = [2, -2, 2, -2],nums3 = [3, -3, 3, -3],nums4 = [4, -4, 4, -4]) == 32\n assert candidate(nums1 = [1, -1, 1, -1, 1, -1, 1, -1],nums2 = [1, -1, 1, -1, 1, -1, 1, -1],nums3 = [1, -1, 1, -1, 1, -1, 1, -1],nums4 = [1, -1, 1, -1, 1, -1, 1, -1]) == 1536\n assert candidate(nums1 = [0, 0, 0, 0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0, 0, 0, 0],nums3 = [0, 0, 0, 0, 0, 0, 0, 0],nums4 = [0, 0, 0, 0, 0, 0, 0, 0]) == 4096\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [5, 6, 7, 8],nums3 = [-1, -2, -3, -4],nums4 = [-5, -6, -7, -8]) == 44\n assert candidate(nums1 = [-10, -9, -8, -7],nums2 = [7, 8, 9, 10],nums3 = [-5, 5, -5, 5],nums4 = [5, -5, 5, -5]) == 32\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [-4, -3, -2, -1],nums3 = [1, 2, 3, 4],nums4 = [-4, -3, -2, -1]) == 44\n assert candidate(nums1 = [-1, -2, -3, -4],nums2 = [1, 2, 3, 4],nums3 = [-1, -2, -3, -4],nums4 = [1, 2, 3, 4]) == 44\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [1, 1, 1, 1],nums3 = [-2, -2, -2, -2],nums4 = [-2, -2, -2, -2]) == 0\n assert candidate(nums1 = [100000000, 100000000, 100000000, 100000000],nums2 = [-250000000, 0, 250000000, 0],nums3 = [125000000, -125000000, 125000000, -125000000],nums4 = [-125000000, 125000000, -125000000, 125000000]) == 0\n assert candidate(nums1 = [1, -1, 2, -2],nums2 = [2, -2, 1, -1],nums3 = [3, -3, 4, -4],nums4 = [-4, 4, -3, 3]) == 24\n assert candidate(nums1 = [5, 10, 15, 20],nums2 = [-20, -15, -10, -5],nums3 = [25, 30, 35, 40],nums4 = [-40, -35, -30, -25]) == 44\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [-10, -20, -30, -40, -50],nums3 = [5, 10, 15, 20, 25],nums4 = [-5, -10, -15, -20, -25]) == 55\n assert candidate(nums1 = [0, 0, 0, 0, 0, 0],nums2 = [0, 0, 0, 0, 0, 0],nums3 = [0, 0, 0, 0, 0, 0],nums4 = [0, 0, 0, 0, 0, 0]) == 1296\n assert candidate(nums1 = [1, 2, 3, -6],nums2 = [-2, -3, 4, 1],nums3 = [0, 0, 0, 0],nums4 = [5, -5, 5, -5]) == 16\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [-1, -2, -3, -4],nums3 = [1, -1, 1, -1],nums4 = [-1, 1, -1, 1]) == 48\n assert candidate(nums1 = [-10, -20, -30, -40],nums2 = [10, 20, 30, 40],nums3 = [5, 15, 25, 35],nums4 = [-5, -15, -25, -35]) == 44\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [1, 1, 1, 1],nums3 = [-2, -2, -2, -2],nums4 = [2, 2, 2, 2]) == 0\n assert candidate(nums1 = [1, -2, 3, 4],nums2 = [-3, 2, 1, -1],nums3 = [2, -1, -3, 4],nums4 = [-4, 1, 2, 3]) == 21\n assert candidate(nums1 = [-1, 1, -2, 2],nums2 = [-1, 1, -2, 2],nums3 = [-1, 1, -2, 2],nums4 = [-1, 1, -2, 2]) == 36\n assert candidate(nums1 = [-100000000, 100000000, -200000000, 200000000],nums2 = [200000000, -200000000, 100000000, -100000000],nums3 = [-50000000, 50000000, -50000000, 50000000],nums4 = [50000000, -50000000, 50000000, -50000000]) == 48\n assert candidate(nums1 = [-23456789, 23456789, -98765432, 98765432],nums2 = [-45678912, 45678912, -87654321, 87654321],nums3 = [56789123, -56789123, 43210987, -43210987],nums4 = [-67891234, 67891234, -32109876, 32109876]) == 0\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7],nums2 = [-7, -6, -5, -4, -3, -2, -1],nums3 = [1, 2, 3, 4, 5, 6, 7],nums4 = [-7, -6, -5, -4, -3, -2, -1]) == 231\n assert candidate(nums1 = [100, -100, 200, -200],nums2 = [300, -300, 600, -600],nums3 = [100, -100, 200, -200],nums4 = [200, -200, 400, -400]) == 12\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [1, 2, 3, 4],nums3 = [1, 2, 3, 4],nums4 = [-8, 8, -8, 8]) == 24\n assert candidate(nums1 = [5, -4, 3, 2],nums2 = [-2, 6, -1, 0],nums3 = [1, -3, 4, -5],nums4 = [0, 1, -1, 2]) == 16\n assert candidate(nums1 = [150, 100, 50, 0],nums2 = [-50, -100, -150, -200],nums3 = [250, 200, 150, 100],nums4 = [-100, -150, -200, -250]) == 40\n assert candidate(nums1 = [100000000, -100000000, 50000000, -50000000],nums2 = [100000000, -100000000, 50000000, -50000000],nums3 = [100000000, -100000000, 50000000, -50000000],nums4 = [100000000, -100000000, 50000000, -50000000]) == 36\n assert candidate(nums1 = [1, 1, 1, 1],nums2 = [1, 1, 1, 1],nums3 = [-1, -1, -1, -1],nums4 = [-1, -1, -1, -1]) == 256\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [-10, -20, -30, -40],nums3 = [1, 2, 3, 4],nums4 = [-1, -2, -3, -4]) == 16\n assert candidate(nums1 = [5, 5, 5, 5],nums2 = [-5, -5, -5, -5],nums3 = [10, 10, 10, 10],nums4 = [-10, -10, -10, -10]) == 256\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8],nums2 = [-1, -2, -3, -4, -5, -6, -7, -8],nums3 = [1, 2, 3, 4, 5, 6, 7, 8],nums4 = [-1, -2, -3, -4, -5, -6, -7, -8]) == 344\n assert candidate(nums1 = [10, -10, 20, -20],nums2 = [-10, 10, -20, 20],nums3 = [30, -30, 40, -40],nums4 = [-40, 40, -30, 30]) == 24\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [-4, -3, -2, -1],nums3 = [0, 0, 0, 0],nums4 = [1, 1, 1, 1]) == 48\n assert candidate(nums1 = [5, -5, 5, -5],nums2 = [5, -5, 5, -5],nums3 = [5, -5, 5, -5],nums4 = [5, -5, 5, -5]) == 96\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6],nums2 = [-6, -5, -4, -3, -2, -1],nums3 = [0, 0, 0, 0, 0, 0],nums4 = [0, 0, 0, 0, 0, 0]) == 216\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [-40, -30, -20, -10],nums3 = [5, 15, 25, 35],nums4 = [-35, -25, -15, -5]) == 44\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8],nums2 = [-8, -7, -6, -5, -4, -3, -2, -1],nums3 = [8, 7, 6, 5, 4, 3, 2, 1],nums4 = [-1, -2, -3, -4, -5, -6, -7, -8]) == 344\n assert candidate(nums1 = [5, 3, -4, 1],nums2 = [-1, 4, -2, 6],nums3 = [-3, 5, 2, -7],nums4 = [1, 2, -4, -3]) == 12\n assert candidate(nums1 = [5, -5, 10, -10],nums2 = [5, -5, 10, -10],nums3 = [5, -5, 10, -10],nums4 = [5, -5, 10, -10]) == 36\n", "comparison": "exact"}, "public_tests": ["[1,2]\n[-2,-1]\n[-1,2]\n[0,2]", "[0]\n[0]\n[0]\n[0]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2", "nums3", "nums4"], "leetcode_dataset_entry_point": "Solution().fourSumCount", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:47+00:00", "tests_total": 97, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "hash-table"]}, "language": "ruby", "interface": {"raw_signature": "def four_sum_count(nums1, nums2, nums3, nums4)", "container": null, "callable": "four_sum_count", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}, {"name": "nums3", "type": "Integer[]"}, {"name": "nums4", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 455, "task_id": "assign-cookies", "difficulty": "Easy", "problem_description": "Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.\n\nEach child i has a greed factor g[i], which is the minimum size of a cookie that the child will be content with; and each cookie j has a size s[j]. If s[j] >= g[i], we can assign the cookie j to the child i, and the child i will be content. Your goal is to maximize the number of your content children and output the maximum number.\n\nExample 1:\n\nInput: g = [1,2,3], s = [1,1]\nOutput: 1\nExplanation: You have 3 children and 2 cookies. The greed factors of 3 children are 1, 2, 3.\nAnd even though you have 2 cookies, since their size is both 1, you could only make the child whose greed factor is 1 content.\nYou need to output 1.\n\nExample 2:\n\nInput: g = [1,2], s = [1,2,3]\nOutput: 2\nExplanation: You have 2 children and 3 cookies. The greed factors of 2 children are 1, 2.\nYou have 3 cookies and their sizes are big enough to gratify all of the children,\nYou need to output 2.\n\nConstraints:\n\n- 1 <= g.length <= 3 * 10^4\n- 0 <= s.length <= 3 * 10^4\n- 1 <= g[i], s[j] <= 2^31 - 1\n\nNote: This question is the same as 2410: Maximum Matching of Players With Trainers.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(g = [1, 2, 3, 4, 5],s = [5, 4, 3, 2, 1]) == 5\n assert candidate(g = [1, 3, 5],s = [2, 4, 6]) == 3\n assert candidate(g = [3, 3, 3, 3],s = [1, 1, 1, 1]) == 0\n assert candidate(g = [1, 1, 1, 1],s = [1, 1, 1, 1]) == 4\n assert candidate(g = [1, 2, 3],s = [1, 2, 3, 4]) == 3\n assert candidate(g = [1, 2, 3, 4, 5],s = [1, 2, 3]) == 3\n assert candidate(g = [5, 5, 5, 5],s = [5, 5, 5, 5]) == 4\n assert candidate(g = [1, 2],s = [1, 2, 3]) == 2\n assert candidate(g = [1],s = [1]) == 1\n assert candidate(g = [10, 20, 30],s = [1, 2, 3]) == 0\n assert candidate(g = [10, 9, 8, 7],s = [5, 6, 7, 8]) == 2\n assert candidate(g = [1, 2, 3],s = []) == 0\n assert candidate(g = [1, 2, 3],s = [1, 2, 3, 4, 5]) == 3\n assert candidate(g = [5, 5, 5, 5, 5],s = [5, 5, 5, 5]) == 4\n assert candidate(g = [1, 2, 3, 4, 5],s = []) == 0\n assert candidate(g = [1, 2, 3],s = [3, 2, 1]) == 3\n assert candidate(g = [1, 3, 5, 7],s = [2, 4, 6, 8]) == 4\n assert candidate(g = [1, 2, 3, 4, 5],s = [1, 2]) == 2\n assert candidate(g = [1, 1, 1, 1],s = [10, 10, 10, 10]) == 4\n assert candidate(g = [1, 2, 3],s = [1, 1]) == 1\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [1, 10, 100, 1000, 10000],s = [1, 2, 3, 4, 5]) == 1\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 10\n assert candidate(g = [1, 3, 5, 7, 9],s = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 5\n assert candidate(g = [2147483647, 2147483647, 2147483647],s = [2147483647, 2147483647, 2147483647, 2147483647, 2147483647]) == 3\n assert candidate(g = [5, 4, 3, 2, 1],s = [1, 2, 3, 4, 5]) == 5\n assert candidate(g = [1, 3, 5, 7, 9],s = [2, 4, 6, 8, 10]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [10, 9, 8, 7, 6],s = [5, 6, 7, 8, 9]) == 4\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 10\n assert candidate(g = [1000000000, 1000000000, 1000000000],s = [1000000000, 1000000000, 1000000000]) == 3\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 10\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 2, 3, 4, 5]) == 5\n assert candidate(g = [10, 20, 30, 40, 50],s = [1, 10, 100, 1000, 10000]) == 4\n assert candidate(g = [3, 5, 7, 9, 11],s = [2, 4, 6, 8, 10]) == 4\n assert candidate(g = [3, 5, 7, 9, 11],s = [2, 4, 6, 8, 10]) == 4\n assert candidate(g = [100, 101, 102, 103, 104],s = [100, 101, 102, 103, 104, 105]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 15\n assert candidate(g = [1, 3, 5, 7, 9],s = [2, 4, 6, 8, 10]) == 5\n assert candidate(g = [1, 2, 3, 4, 5],s = [1, 2, 2, 2, 2]) == 2\n assert candidate(g = [1, 2, 3, 4, 5],s = [5, 4, 3, 2, 1]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],s = [1, 3, 5, 7, 9, 11, 13, 15]) == 8\n assert candidate(g = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],s = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 10\n assert candidate(g = [1, 3, 5, 7, 9],s = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 5\n assert candidate(g = [231, 230, 229, 228, 227, 226, 225, 224, 223, 222],s = [230, 229, 228, 227, 226, 225, 224, 223, 222, 221]) == 9\n assert candidate(g = [5, 5, 5, 5, 5],s = [1, 2, 3, 4, 5]) == 1\n assert candidate(g = [1, 2, 2, 3, 4],s = [1, 2, 2, 3]) == 4\n assert candidate(g = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 2\n assert candidate(g = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],s = [15, 25, 35, 45, 55, 65, 75, 85, 95]) == 9\n assert candidate(g = [100, 200, 300, 400, 500],s = [500, 400, 300, 200, 100]) == 5\n assert candidate(g = [100, 200, 300],s = [50, 150, 250, 350]) == 3\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 20\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [10, 9, 8, 7, 6],s = [1, 2, 3, 4, 5]) == 0\n assert candidate(g = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],s = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 10\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [5, 5, 5, 5, 5]) == 5\n assert candidate(g = [1, 2, 3, 4, 5],s = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 3, 5, 7, 9]) == 5\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 10\n assert candidate(g = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],s = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 10\n assert candidate(g = [1000000000, 1000000000, 1000000000],s = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 3\n assert candidate(g = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],s = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105]) == 10\n assert candidate(g = [1, 2, 3, 4, 5],s = [3, 3, 3, 3, 3]) == 3\n assert candidate(g = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],s = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == 15\n assert candidate(g = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 8\n assert candidate(g = [10, 20, 30, 40, 50],s = [15, 25, 35, 45, 55]) == 5\n assert candidate(g = [3, 1, 5, 2, 4],s = [2, 3, 5, 6, 7]) == 5\n assert candidate(g = [1, 1, 1, 1, 1],s = [5, 5, 5, 5, 5]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],s = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 20\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],s = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 15\n assert candidate(g = [1, 2, 3, 4, 5],s = []) == 0\n assert candidate(g = [5, 8, 12, 16, 20],s = [1, 3, 4, 5, 9, 12, 15]) == 3\n assert candidate(g = [1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(g = [3, 4, 5, 6, 7, 8, 9, 10],s = [5, 6, 7, 8, 9]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 10\n assert candidate(g = [100, 200, 300, 400, 500],s = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500]) == 5\n assert candidate(g = [1, 1, 1, 1, 1],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 5\n assert candidate(g = [10, 20, 30, 40, 50],s = [5, 15, 25, 35, 45]) == 4\n assert candidate(g = [10, 20, 30, 40, 50],s = [1, 2, 3, 4, 5]) == 0\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],s = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 10\n assert candidate(g = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],s = [500, 500, 500, 500, 500, 500, 500, 500, 500, 500]) == 5\n assert candidate(g = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(g = [10, 9, 8, 7, 6],s = [5, 6, 7, 8, 9, 10]) == 5\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 10\n assert candidate(g = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],s = [1, 2, 3, 4, 5]) == 5\n assert candidate(g = [100, 200, 300],s = [50, 150, 250, 350]) == 3\n assert candidate(g = [1, 3, 5, 7],s = [2, 4, 6, 8]) == 4\n assert candidate(g = [10, 10, 10, 10, 10],s = [1, 2, 3, 4, 5]) == 0\n assert candidate(g = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],s = [1, 3, 5, 7, 9, 11, 13, 15]) == 8\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 10\n assert candidate(g = [1, 3, 5, 7, 9],s = [2, 4, 6, 8, 10, 12, 14, 16, 18]) == 5\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [5, 4, 3, 2, 1, 10, 9, 8, 7, 6]) == 10\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [1, 1, 1, 1, 1]) == 5\n assert candidate(g = [1, 3, 5, 7, 9],s = [2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(g = [3, 3, 3, 3, 3],s = [1, 2, 3, 4, 5]) == 3\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [1, 1, 1, 1, 1, 1]) == 6\n assert candidate(g = [5, 5, 5, 5, 5],s = [5, 5, 5, 5, 5]) == 5\n assert candidate(g = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],s = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105]) == 10\n assert candidate(g = [1, 2, 3, 4, 5],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 10\n assert candidate(g = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 5\n assert candidate(g = [5, 5, 5, 5, 5],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(g = [1, 2, 3, 4, 5],s = [6, 7, 8, 9, 10]) == 5\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(g = [5, 10, 3, 8, 6],s = [1, 2, 3, 7, 9]) == 3\n assert candidate(g = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(g = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],s = [10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == 20\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(g = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],s = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 6\n assert candidate(g = [1, 2, 3, 4, 5],s = [1, 1, 1, 1, 1]) == 1\n assert candidate(g = [1, 2, 3, 4, 5],s = [10000, 20000, 30000, 40000, 50000]) == 5\n assert candidate(g = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],s = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(g = [3, 2, 1],s = [1, 1, 1]) == 1\n assert candidate(g = [2, 2, 2, 2, 2],s = [1, 1, 1, 1, 1]) == 0\n assert candidate(g = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],s = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n", "comparison": "exact"}, "public_tests": ["[1,2,3]\n[1,1]", "[1,2]\n[1,2,3]"], "hints": [], "metadata": {"canonical_parameter_names": ["g", "s"], "leetcode_dataset_entry_point": "Solution().findContentChildren", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:49+00:00", "tests_total": 129, "tests_dropped": 5, "flags": [], "topic_tags": ["array", "two-pointers", "greedy", "sorting", "quicksort"]}, "language": "ruby", "interface": {"raw_signature": "def find_content_children(g, s)", "container": null, "callable": "find_content_children", "parameters": [{"name": "g", "type": "Integer[]"}, {"name": "s", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 456, "task_id": "132-pattern", "difficulty": "Medium", "problem_description": "Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < k and nums[i] < nums[k] < nums[j].\n\nReturn true if there is a 132 pattern in nums, otherwise, return false.\n\nExample 1:\n\nInput: nums = [1,2,3,4]\nOutput: false\nExplanation: There is no 132 pattern in the sequence.\n\nExample 2:\n\nInput: nums = [3,1,4,2]\nOutput: true\nExplanation: There is a 132 pattern in the sequence: [1, 4, 2].\n\nExample 3:\n\nInput: nums = [-1,3,2,0]\nOutput: true\nExplanation: There are three 132 patterns in the sequence: [-1, 3, 2], [-1, 3, 0] and [-1, 2, 0].\n\nConstraints:\n\n- n == nums.length\n- 1 <= n <= 2 * 10^5\n- -10^9 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-1, 3, 2, 0]) == True\n assert candidate(nums = [1, 3, 2, 4, 5]) == True\n assert candidate(nums = [3, 5, 0, 2, 3]) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1]) == False\n assert candidate(nums = [1, 2, 3, 4]) == False\n assert candidate(nums = [1, 2, 3, 3, 3, 4]) == False\n assert candidate(nums = [1, 2, 3, 4, 5]) == False\n assert candidate(nums = [1, 2, 3, -4, -3, -1]) == False\n assert candidate(nums = [3, 5, 0, 2, 4]) == True\n assert candidate(nums = [8, 10, 4, 6]) == False\n assert candidate(nums = [3, 1, 4, 2]) == True\n assert candidate(nums = [5, 4, 3, 2, 1]) == False\n assert candidate(nums = [1, 2]) == False\n assert candidate(nums = [1, 2, 3, 2, 1]) == True\n assert candidate(nums = [3, 3, 3, 3, 3]) == False\n assert candidate(nums = [3, 5, 4, 2, 5]) == True\n assert candidate(nums = [1, 0, 1, -4, -3]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 0, -1, -2]) == False\n assert candidate(nums = [5, 6, 7, 8, 9, 1, 2, 3, 4, 10]) == False\n assert candidate(nums = [3, 5, 0, 3, 4]) == True\n assert candidate(nums = [3, 5, 0, 2, 4, 6, 1]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == False\n assert candidate(nums = [2, 1, 3, 5, 0, 4, 6, 7]) == True\n assert candidate(nums = [5, 1, 6, 3, 4, 2, 7]) == True\n assert candidate(nums = [3, 1, 4, 2, 5, 3, 6, 4, 7]) == True\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 8, 9]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 2, 4, 6, 8, 10, 3, 5, 7, 9]) == True\n assert candidate(nums = [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [-2, -3, 0, 1, -1, -4, 2, 3]) == True\n assert candidate(nums = [3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 0]) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 13, 14]) == False\n assert candidate(nums = [8, 10, 4, 6, 2, 1, 9, 5]) == True\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 11]) == False\n assert candidate(nums = [1, 3, 2, 4, 6, 5, 7, 8, 10, 9, 11]) == True\n assert candidate(nums = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [3, 1, 4, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [1, 3, 2, 4, 6, 5, 7, 8, 10, 9, 11, 13, 12, 14, 15]) == True\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 3, 3]) == False\n assert candidate(nums = [3, 1, 4, 2, 5, 0]) == True\n assert candidate(nums = [10, 9, 8, 7, 11, 10, 12, 11, 13, 14]) == True\n assert candidate(nums = [8, 10, 4, 6, 2, 1, 9, 5, 7, 3]) == True\n assert candidate(nums = [7, 11, 5, 9, 6, 10, 3, 8, 2, 12]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, -1, 2, -2, 3, -3]) == True\n assert candidate(nums = [9, 11, 8, 9, 10, 7, 8, 9, 11, 6, 7, 8, 9, 10, 5, 6, 7, 8, 9]) == True\n assert candidate(nums = [5, 1, 5, 5, 2, 5, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == False\n assert candidate(nums = [1, 5, 3, 4, 2, 1, 6, 7, 8, 9, 10, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 3, 2, 4, 5, 6, 7, 8, 9, 0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 10, 15, 20]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 1, 3, 2, 4, 5, 6, 7, 8, 9, 0]) == True\n assert candidate(nums = [8, 10, 4, 6, 2, 1, 9]) == True\n assert candidate(nums = [7, 1, 3, 2, 6, 5, 8, 4, 9, 0]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 0]) == True\n assert candidate(nums = [1, 2, 4, 3, 5, 6, 0]) == True\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == True\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 0, 8, 9]) == False\n assert candidate(nums = [3, 1, 4, 2, 5, 6, 0, 7, 8, 9]) == True\n assert candidate(nums = [3, 5, 0, 2, 1, 4]) == True\n assert candidate(nums = [5, 1, 6, 4, 7, 3, 8, 2, 9]) == True\n assert candidate(nums = [3, 1, 4, 2, 5, 3, 6, 4, 7, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3]) == True\n assert candidate(nums = [3, 1, 4, 2, 5, 3]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 6]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 14, 12, 10, 8, 6, 4, 2, 0]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 1, 2]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, 12]) == False\n assert candidate(nums = [3, 5, 0, 3, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == False\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == False\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0]) == False\n assert candidate(nums = [3, 1, 4, 2, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == False\n assert candidate(nums = [3, 5, 0, 2, 8, 6, 7, 4, 1]) == True\n assert candidate(nums = [3, 1, 2, 4, 5, 0]) == False\n assert candidate(nums = [-1, -2, 2, 1, -3, -4, 3, 4]) == True\n assert candidate(nums = [1, 2, 0, 3, 4, -1, 5]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 1]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [1, 5, 4, 6, 7, 8, 9, 10, 2, 3]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 8, 9, 10, 11]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 50, 60, 70, 80, 90, 100, 55, 65, 75, 85]) == True\n assert candidate(nums = [1, 3, 2, 4, 6, 5, 7, 8, 9, 10]) == True\n assert candidate(nums = [3, 5, 0, 2, 3, 1, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 0]) == False\n assert candidate(nums = [1000000000, -1000000000, 500000000, 250000000, 750000000, 375000000, 625000000]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 11, 12, 13, 14, 15]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == False\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [3, 5, 0, 2, 4, 1]) == True\n assert candidate(nums = [25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == True\n assert candidate(nums = [1, 5, 3, 2, 4]) == True\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == True\n assert candidate(nums = [3, 1, 2, 4, 5, 6, 7, 8, 9, 0]) == False\n assert candidate(nums = [9, 11, 8, 9, 10, 7, 6, 5, 12]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 0, 7]) == True\n assert candidate(nums = [3, 1, 3, 2, 4, 3]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == False\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 3, 9, 3, 2, 8, 8, 4, 6]) == True\n assert candidate(nums = [8, 10, 4, 6, 2, 1, 9, 5]) == True\n assert candidate(nums = [1, 5, 3, 4, 2]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 0]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 11, 12, 13, 14]) == False\n assert candidate(nums = [3, 5, 0, 2, 8, 7, 6, 4, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 4, 6, 8, 10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == True\n assert candidate(nums = [5, 3, 4, 2, 1, 6, 7, 8, 9, 10]) == False\n assert candidate(nums = [8, 10, 4, 6, 2, 1, 9, 5, 7]) == True\n assert candidate(nums = [3, 5, 0, 2, 1]) == True\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == True\n assert candidate(nums = [3, 5, 0, 2, 8, 6, 7, 4, 1, 12, 14, 13, 11, 9, 10, 15, 16, 17, 18, 19]) == True\n assert candidate(nums = [5, 3, 1, 2, 4, 6, 7, 8, 0]) == False\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 2, 9]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 55, 65, 75]) == True\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1]) == False\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == False\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == False\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == False\n", "comparison": "exact"}, "public_tests": ["[1,2,3,4]", "[3,1,4,2]", "[-1,3,2,0]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().find132pattern", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:51+00:00", "tests_total": 143, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search", "stack", "monotonic-stack", "ordered-set"]}, "language": "ruby", "interface": {"raw_signature": "def find132pattern(nums)", "container": null, "callable": "find132pattern", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 457, "task_id": "circular-array-loop", "difficulty": "Medium", "problem_description": "You are playing a game involving a circular array of non-zero integers nums. Each nums[i] denotes the number of indices forward/backward you must move if you are located at index i:\n\n- If nums[i] is positive, move nums[i] steps forward, and\n- If nums[i] is negative, move abs(nums[i]) steps backward.\n\nSince the array is circular, you may assume that moving forward from the last element puts you on the first element, and moving backwards from the first element puts you on the last element.\n\nA cycle in the array consists of a sequence of indices seq of length k where:\n\n- Following the movement rules above results in the repeating index sequence seq[0] -> seq[1] -> ... -> seq[k - 1] -> seq[0] -> ...\n- Every nums[seq[j]] is either all positive or all negative.\n- k > 1\n\nReturn true if there is a cycle in nums, or false otherwise.\n\nExample 1:\n\nInput: nums = [2,-1,1,2,2]\nOutput: true\nExplanation: The graph shows how the indices are connected. White nodes are jumping forward, while red is jumping backward.\nWe can see the cycle 0 --> 2 --> 3 --> 0 --> ..., and all of its nodes are white (jumping in the same direction).\n\nExample 2:\n\nInput: nums = [-1,-2,-3,-4,-5,6]\nOutput: false\nExplanation: The graph shows how the indices are connected. White nodes are jumping forward, while red is jumping backward.\nThe only cycle is of size 1, so we return false.\n\nExample 3:\n\nInput: nums = [1,-1,5,1,4]\nOutput: true\nExplanation: The graph shows how the indices are connected. White nodes are jumping forward, while red is jumping backward.\nWe can see the cycle 0 --> 1 --> 0 --> ..., and while it is of size > 1, it has a node jumping forward and a node jumping backward, so it is not a cycle.\nWe can see the cycle 3 --> 4 --> 3 --> ..., and all of its nodes are white (jumping in the same direction).\n\nConstraints:\n\n- 1 <= nums.length <= 5000\n- -1000 <= nums[i] <= 1000\n- nums[i] != 0\n\nFollow up: Could you solve it in O(n) time complexity and O(1) extra space complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [-5, 1, 1, 4, 2]) == True\n assert candidate(nums = [-1, 2, -1, 2, -1]) == False\n assert candidate(nums = [-1, -2, -3, -4, -5, 6]) == False\n assert candidate(nums = [-2, -3, -4, -5, -6]) == False\n assert candidate(nums = [1, 2, -1, -2, 3]) == False\n assert candidate(nums = [5, 1, 1, 2, 2]) == False\n assert candidate(nums = [1]) == False\n assert candidate(nums = [5, -1, 1, 4, 2]) == True\n assert candidate(nums = [-1, -1, -1, -1, -1]) == True\n assert candidate(nums = [-1, 2]) == False\n assert candidate(nums = [-1, 2, -1, -2, -1]) == False\n assert candidate(nums = [-1, -2, -3, -4, -5]) == False\n assert candidate(nums = [-5, -4, -3, -2, -1]) == True\n assert candidate(nums = [-1, 1, -1, 1, -1]) == False\n assert candidate(nums = [2, -1, 1, 2, 2]) == True\n assert candidate(nums = [1, 2, 3, 4, 5]) == True\n assert candidate(nums = [3, 1, 2, 4, 3]) == True\n assert candidate(nums = [1, -1, 5, 1, 4]) == True\n assert candidate(nums = [-2, 1, -1, -2, -2]) == False\n assert candidate(nums = [-2, -2, -2, -2, -2]) == True\n assert candidate(nums = [3, 1, 2]) == True\n assert candidate(nums = [5, 2, 3, 4, -1]) == False\n assert candidate(nums = [2, 2, 2, 2, 2]) == True\n assert candidate(nums = [1, 2, -3, -4, 5, 6, -7, -8, 9, 10, -11, -12, 13, 14, -15, -16, 17, 18, -19, -20]) == False\n assert candidate(nums = [-10, 9, 8, -7, 6, -5, 4, -3, 2, -1]) == False\n assert candidate(nums = [-2, -3, -1, 3, 2, 1, 5]) == True\n assert candidate(nums = [10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -11]) == False\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50, 60, -60, 70, -70, 80, -80, 90, -90, 100, -100]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [3, 2, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == True\n assert candidate(nums = [3, 1, 2, -2, -5, 6, -1]) == False\n assert candidate(nums = [5, 4, 3, 2, 1, -1, -2, -3, -4, -5]) == False\n assert candidate(nums = [5, -1, 5, -1, 5, -1, 5, -1, 5, -1]) == False\n assert candidate(nums = [1, 2, 3, 4, -1, -2, -3, -4]) == False\n assert candidate(nums = [5, -5, 5, -5, 5, -5, 5, -5, 5, -5]) == False\n assert candidate(nums = [2, 3, 1, -4, -4, 2]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [4, 2, 3, 1, 1, -1, -1]) == False\n assert candidate(nums = [-3, -1, -2, -3, -1, -2, -3, -1, -2, -3]) == True\n assert candidate(nums = [2, 3, -1, 4, -1, -2]) == False\n assert candidate(nums = [-3, 3, 2, 1, -2, -1, 4, -4]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, -6, -5, -4, -3, -2, -1]) == False\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == True\n assert candidate(nums = [3, 1, 2, 3, 1, 2, 3]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == True\n assert candidate(nums = [1, 2, -1, -2, 1, 2, -1, -2, 1, 2, -1, -2]) == False\n assert candidate(nums = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == True\n assert candidate(nums = [5, 4, 3, 2, 1, -5, -4, -3, -2, -1]) == False\n assert candidate(nums = [5, -1, 3, 2, -3, 4, -4, 2, 1, -1]) == False\n assert candidate(nums = [-2, 1, -1, -2, -2, 2, -1, 2, 1, -1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, -10]) == True\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == False\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1]) == False\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, -10, -20, -30, -40, -50, -60, -70, -80, -90]) == False\n assert candidate(nums = [2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20]) == False\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16, 17, -18, 19, -20]) == False\n assert candidate(nums = [10, -10, 20, -20, 30, -30, 40, -40, 50, -50]) == False\n assert candidate(nums = [3, 1, 2, 3, 1, 2, 3, 1, 2, 3]) == True\n assert candidate(nums = [5, -2, 5, -2, 5, -2, 5, -2]) == True\n assert candidate(nums = [3, 1, 2, -3, 4, 2, 1, -4, 2, 3]) == False\n assert candidate(nums = [3, 1, 2, -1, -2, 4]) == False\n assert candidate(nums = [1, 2, -1, 2, -1, 2, -1, 2, -1, 2]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == False\n assert candidate(nums = [-1, 2, 2, -1, -2, 1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == False\n assert candidate(nums = [3, 1, 2, -2, -1]) == False\n assert candidate(nums = [2, 1, -1, -2, 2, 3, -3, -2, 1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -2, -3, -4, -5, -6, -7, -8, -9]) == False\n assert candidate(nums = [2, 3, -2, 2, -3, 2, -2, 3, -3, 1]) == False\n assert candidate(nums = [5, 3, 2, 1, 4, -2, -1, -3, -1]) == False\n assert candidate(nums = [2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -2]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 1]) == True\n assert candidate(nums = [10, -10, 10, -10, 10, -10, 10, -10, 10, -10]) == False\n assert candidate(nums = [5, 5, 2, 1, -2, -1, -3, -5, 4, 4, 3, 2, -2, -3, -4, -5, 1, 1, 2, 3]) == False\n assert candidate(nums = [1, 2, -3, 4, -5, 6, -7, 8, -9, 10]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == False\n assert candidate(nums = [10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 10, -10, 10, -10]) == True\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == False\n assert candidate(nums = [3, 1, 2, 4, -1]) == False\n assert candidate(nums = [1, -2, 3, -4, 5, -6, 7, -8, 9, -10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31, -32, -33, -34, -35, -36, -37, -38, -39, -40, -41, -42, -43, -44, -45, -46, -47, -48, -49, -50]) == False\n assert candidate(nums = [-2, -3, -4, -5, 6, 7]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [-2, -3, -4, -5, -6, -1]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, -1, -2, -3, -4, -5]) == False\n assert candidate(nums = [5, 1, 3, 2, 2, -1, 4]) == False\n assert candidate(nums = [10, 10, -10, -10, 10, -10, 10, -10]) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [-1, 1, -1, 1, -1, 1, -1, 1]) == False\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == True\n assert candidate(nums = [3, 1, 2, -2, 4, 2]) == True\n assert candidate(nums = [-1, 2, 1, -2, 2, -1, 2, -1]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [5, 4, 3, 2, 1, -1]) == False\n assert candidate(nums = [2, 2, -2, -2, 2, 2, -2, -2]) == False\n assert candidate(nums = [1, 2, -1, -2, 3, 2, -3, 3]) == False\n assert candidate(nums = [2, -1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == False\n assert candidate(nums = [-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5]) == True\n assert candidate(nums = [4, -1, 2, -1, -1, 2, -1, 4]) == False\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == False\n assert candidate(nums = [1, -1, 1, -1, 1, -1]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 2, 3, -4, -3, -2, -1, 4, 3, 2]) == False\n assert candidate(nums = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]) == True\n assert candidate(nums = [10, -10, 10, -10, 10, -10]) == True\n assert candidate(nums = [-2, -3, -4, -5, -6, -7, -8, -9, -10, -1]) == False\n assert candidate(nums = [1, 1, 1, 1, 1, -1, -1, -1, -1, -1]) == False\n", "comparison": "exact"}, "public_tests": ["[2,-1,1,2,2]", "[-1,-2,-3,-4,-5,6]", "[1,-1,5,1,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().circularArrayLoop", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:53+00:00", "tests_total": 116, "tests_dropped": 5, "flags": ["has_images"], "topic_tags": ["array", "hash-table", "two-pointers", "floyds-cycle-finding-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def circular_array_loop(nums)", "container": null, "callable": "circular_array_loop", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 458, "task_id": "poor-pigs", "difficulty": "Hard", "problem_description": "There are buckets buckets of liquid, where exactly one of the buckets is poisonous. To figure out which one is poisonous, you feed some number of (poor) pigs the liquid to see whether they will die or not. Unfortunately, you only have minutesToTest minutes to determine which bucket is poisonous.\n\nYou can feed the pigs according to these steps:\n\n1. Choose some live pigs to feed.\n2. For each pig, choose which buckets to feed it. The pig will consume all the chosen buckets simultaneously and will take no time. Each pig can feed from any number of buckets, and each bucket can be fed from by any number of pigs.\n3. Wait for minutesToDie minutes. You may not feed any other pigs during this time.\n4. After minutesToDie minutes have passed, any pigs that have been fed the poisonous bucket will die, and all others will survive.\n5. Repeat this process until you run out of time.\n\nGiven buckets, minutesToDie, and minutesToTest, return the minimum number of pigs needed to figure out which bucket is poisonous within the allotted time.\n\nExample 1:\n\nInput: buckets = 4, minutesToDie = 15, minutesToTest = 15\nOutput: 2\nExplanation: We can determine the poisonous bucket as follows:\nAt time 0, feed the first pig buckets 1 and 2, and feed the second pig buckets 2 and 3.\nAt time 15, there are 4 possible outcomes:\n- If only the first pig dies, then bucket 1 must be poisonous.\n- If only the second pig dies, then bucket 3 must be poisonous.\n- If both pigs die, then bucket 2 must be poisonous.\n- If neither pig dies, then bucket 4 must be poisonous.\n\nExample 2:\n\nInput: buckets = 4, minutesToDie = 15, minutesToTest = 30\nOutput: 2\nExplanation: We can determine the poisonous bucket as follows:\nAt time 0, feed the first pig bucket 1, and feed the second pig bucket 2.\nAt time 15, there are 2 possible outcomes:\n- If either pig dies, then the poisonous bucket is the one it was fed.\n- If neither pig dies, then feed the first pig bucket 3, and feed the second pig bucket 4.\nAt time 30, one of the two pigs must die, and the poisonous bucket is the one it was fed.\n\nConstraints:\n\n- 1 <= buckets <= 1000\n- 1 <= minutesToDie <= minutesToTest <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(buckets = 4,minutesToDie = 15,minutesToTest = 15) == 2\n assert candidate(buckets = 1,minutesToDie = 1,minutesToTest = 1) == 0\n assert candidate(buckets = 1000,minutesToDie = 1,minutesToTest = 100) == 2\n assert candidate(buckets = 4,minutesToDie = 15,minutesToTest = 30) == 2\n assert candidate(buckets = 1,minutesToDie = 10,minutesToTest = 10) == 0\n assert candidate(buckets = 8,minutesToDie = 10,minutesToTest = 40) == 2\n assert candidate(buckets = 10,minutesToDie = 5,minutesToTest = 10) == 3\n assert candidate(buckets = 1,minutesToDie = 10,minutesToTest = 100) == 0\n assert candidate(buckets = 1000,minutesToDie = 1,minutesToTest = 1) == 10\n assert candidate(buckets = 10,minutesToDie = 5,minutesToTest = 20) == 2\n assert candidate(buckets = 100,minutesToDie = 10,minutesToTest = 60) == 3\n assert candidate(buckets = 10,minutesToDie = 5,minutesToTest = 25) == 2\n assert candidate(buckets = 8,minutesToDie = 10,minutesToTest = 30) == 2\n assert candidate(buckets = 9,minutesToDie = 25,minutesToTest = 75) == 2\n assert candidate(buckets = 27,minutesToDie = 3,minutesToTest = 9) == 3\n assert candidate(buckets = 500,minutesToDie = 5,minutesToTest = 20) == 4\n assert candidate(buckets = 81,minutesToDie = 2,minutesToTest = 4) == 4\n assert candidate(buckets = 250,minutesToDie = 25,minutesToTest = 100) == 4\n assert candidate(buckets = 625,minutesToDie = 20,minutesToTest = 100) == 4\n assert candidate(buckets = 625,minutesToDie = 10,minutesToTest = 30) == 5\n assert candidate(buckets = 999,minutesToDie = 1,minutesToTest = 99) == 2\n assert candidate(buckets = 243,minutesToDie = 1,minutesToTest = 5) == 4\n assert candidate(buckets = 243,minutesToDie = 18,minutesToTest = 90) == 4\n assert candidate(buckets = 729,minutesToDie = 3,minutesToTest = 9) == 5\n assert candidate(buckets = 512,minutesToDie = 5,minutesToTest = 25) == 4\n assert candidate(buckets = 64,minutesToDie = 4,minutesToTest = 16) == 3\n assert candidate(buckets = 256,minutesToDie = 5,minutesToTest = 10) == 6\n assert candidate(buckets = 350,minutesToDie = 7,minutesToTest = 35) == 4\n assert candidate(buckets = 500,minutesToDie = 20,minutesToTest = 100) == 4\n assert candidate(buckets = 343,minutesToDie = 7,minutesToTest = 21) == 5\n assert candidate(buckets = 128,minutesToDie = 8,minutesToTest = 32) == 4\n assert candidate(buckets = 64,minutesToDie = 2,minutesToTest = 6) == 3\n assert candidate(buckets = 81,minutesToDie = 9,minutesToTest = 27) == 4\n assert candidate(buckets = 450,minutesToDie = 12,minutesToTest = 60) == 4\n assert candidate(buckets = 441,minutesToDie = 20,minutesToTest = 60) == 5\n assert candidate(buckets = 512,minutesToDie = 15,minutesToTest = 30) == 6\n assert candidate(buckets = 729,minutesToDie = 9,minutesToTest = 27) == 5\n assert candidate(buckets = 216,minutesToDie = 10,minutesToTest = 50) == 3\n assert candidate(buckets = 27,minutesToDie = 1,minutesToTest = 3) == 3\n assert candidate(buckets = 243,minutesToDie = 9,minutesToTest = 27) == 4\n assert candidate(buckets = 512,minutesToDie = 5,minutesToTest = 20) == 4\n assert candidate(buckets = 81,minutesToDie = 30,minutesToTest = 90) == 4\n assert candidate(buckets = 512,minutesToDie = 2,minutesToTest = 10) == 4\n assert candidate(buckets = 128,minutesToDie = 15,minutesToTest = 60) == 4\n assert candidate(buckets = 300,minutesToDie = 3,minutesToTest = 9) == 5\n assert candidate(buckets = 999,minutesToDie = 2,minutesToTest = 20) == 3\n assert candidate(buckets = 999,minutesToDie = 1,minutesToTest = 10) == 3\n assert candidate(buckets = 16,minutesToDie = 4,minutesToTest = 16) == 2\n assert candidate(buckets = 343,minutesToDie = 7,minutesToTest = 42) == 3\n assert candidate(buckets = 343,minutesToDie = 2,minutesToTest = 14) == 3\n assert candidate(buckets = 125,minutesToDie = 5,minutesToTest = 25) == 3\n assert candidate(buckets = 9,minutesToDie = 3,minutesToTest = 9) == 2\n assert candidate(buckets = 600,minutesToDie = 10,minutesToTest = 50) == 4\n assert candidate(buckets = 750,minutesToDie = 20,minutesToTest = 100) == 4\n assert candidate(buckets = 216,minutesToDie = 6,minutesToTest = 30) == 3\n assert candidate(buckets = 961,minutesToDie = 30,minutesToTest = 90) == 5\n assert candidate(buckets = 125,minutesToDie = 10,minutesToTest = 50) == 3\n assert candidate(buckets = 256,minutesToDie = 15,minutesToTest = 75) == 4\n assert candidate(buckets = 800,minutesToDie = 15,minutesToTest = 75) == 4\n assert candidate(buckets = 729,minutesToDie = 10,minutesToTest = 30) == 5\n assert candidate(buckets = 750,minutesToDie = 15,minutesToTest = 45) == 5\n assert candidate(buckets = 100,minutesToDie = 1,minutesToTest = 10) == 2\n assert candidate(buckets = 500,minutesToDie = 5,minutesToTest = 30) == 4\n assert candidate(buckets = 500,minutesToDie = 5,minutesToTest = 25) == 4\n assert candidate(buckets = 9,minutesToDie = 3,minutesToTest = 6) == 2\n assert candidate(buckets = 27,minutesToDie = 6,minutesToTest = 18) == 3\n assert candidate(buckets = 27,minutesToDie = 5,minutesToTest = 15) == 3\n assert candidate(buckets = 256,minutesToDie = 10,minutesToTest = 40) == 4\n assert candidate(buckets = 81,minutesToDie = 4,minutesToTest = 16) == 3\n assert candidate(buckets = 441,minutesToDie = 7,minutesToTest = 49) == 3\n assert candidate(buckets = 441,minutesToDie = 14,minutesToTest = 70) == 4\n assert candidate(buckets = 64,minutesToDie = 20,minutesToTest = 100) == 3\n assert candidate(buckets = 256,minutesToDie = 1,minutesToTest = 7) == 3\n assert candidate(buckets = 999,minutesToDie = 2,minutesToTest = 4) == 7\n assert candidate(buckets = 81,minutesToDie = 10,minutesToTest = 50) == 3\n assert candidate(buckets = 64,minutesToDie = 1,minutesToTest = 6) == 3\n assert candidate(buckets = 128,minutesToDie = 2,minutesToTest = 16) == 3\n assert candidate(buckets = 999,minutesToDie = 2,minutesToTest = 100) == 2\n assert candidate(buckets = 81,minutesToDie = 3,minutesToTest = 9) == 4\n assert candidate(buckets = 81,minutesToDie = 5,minutesToTest = 15) == 4\n assert candidate(buckets = 125,minutesToDie = 5,minutesToTest = 20) == 3\n assert candidate(buckets = 961,minutesToDie = 6,minutesToTest = 36) == 4\n assert candidate(buckets = 729,minutesToDie = 1,minutesToTest = 5) == 4\n assert candidate(buckets = 169,minutesToDie = 13,minutesToTest = 39) == 4\n assert candidate(buckets = 750,minutesToDie = 10,minutesToTest = 50) == 4\n assert candidate(buckets = 625,minutesToDie = 10,minutesToTest = 40) == 4\n assert candidate(buckets = 256,minutesToDie = 4,minutesToTest = 16) == 4\n assert candidate(buckets = 256,minutesToDie = 15,minutesToTest = 45) == 4\n assert candidate(buckets = 729,minutesToDie = 12,minutesToTest = 36) == 5\n assert candidate(buckets = 200,minutesToDie = 4,minutesToTest = 20) == 3\n", "comparison": "exact"}, "public_tests": ["4\n15\n15", "4\n15\n30"], "hints": ["What if you only have one shot? Eg. 4 buckets, 15 mins to die, and 15 mins to test.", "How many states can we generate with x pigs and T tests?", "Find minimum x such that (T+1)^x >= N"], "metadata": {"canonical_parameter_names": ["buckets", "minutesToDie", "minutesToTest"], "leetcode_dataset_entry_point": "Solution().poorPigs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:56+00:00", "tests_total": 99, "tests_dropped": 9, "flags": [], "topic_tags": ["math", "dynamic-programming", "combinatorics"]}, "language": "ruby", "interface": {"raw_signature": "def poor_pigs(buckets, minutes_to_die, minutes_to_test)", "container": null, "callable": "poor_pigs", "parameters": [{"name": "buckets", "type": "Integer"}, {"name": "minutes_to_die", "type": "Integer"}, {"name": "minutes_to_test", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 459, "task_id": "repeated-substring-pattern", "difficulty": "Easy", "problem_description": "Given a string s, check if it can be constructed by taking a substring of it and appending multiple copies of the substring together.\n\nExample 1:\n\nInput: s = \"abab\"\nOutput: true\nExplanation: It is the substring \"ab\" twice.\n\nExample 2:\n\nInput: s = \"aba\"\nOutput: false\n\nExample 3:\n\nInput: s = \"abcabcabcabc\"\nOutput: true\nExplanation: It is the substring \"abc\" four times or the substring \"abcabc\" twice.\n\nConstraints:\n\n- 1 <= s.length <= 10^4\n- s consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abac\") == False\n assert candidate(s = \"abcdef\") == False\n assert candidate(s = \"abababab\") == True\n assert candidate(s = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\") == True\n assert candidate(s = \"a\") == False\n assert candidate(s = \"abab\") == True\n assert candidate(s = \"abcabcabc\") == True\n assert candidate(s = \"abcabcabcabc\") == True\n assert candidate(s = \"bcbcbcbcbcbcbcbcbcbc\") == True\n assert candidate(s = \"babab\") == False\n assert candidate(s = \"abcabc\") == True\n assert candidate(s = \"abcdabcd\") == True\n assert candidate(s = \"abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab\") == True\n assert candidate(s = \"xyzxyzxyz\") == True\n assert candidate(s = \"abcdabcdabcd\") == True\n assert candidate(s = \"abc\") == False\n assert candidate(s = \"aaaa\") == True\n assert candidate(s = \"aba\") == False\n assert candidate(s = \"abcabcab\") == False\n assert candidate(s = \"ababab\") == True\n assert candidate(s = \"xyzxyzxyzxyz\") == True\n assert candidate(s = \"abacababacab\") == True\n assert candidate(s = \"bb\") == True\n assert candidate(s = \"abcabcabcabcabcabcabc\") == True\n assert candidate(s = \"aabbccddeeaabbccddeeaabbccddeeaabbccdd\") == False\n assert candidate(s = \"abbaabbaabba\") == True\n assert candidate(s = \"xyxyxyxyxyxy\") == True\n assert candidate(s = \"aaaabaaaabaaaaaab\") == False\n assert candidate(s = \"bcbcbcbcbcbcbcbc\") == True\n assert candidate(s = \"aaaaaaaab\") == False\n assert candidate(s = \"abacabacabac\") == True\n assert candidate(s = \"alibabaalibabaalibaba\") == True\n assert candidate(s = \"mnopqrsmnopqrsmnopqrsmnopqrsmnopqrsmnopqrs\") == True\n assert candidate(s = \"aabbccddeeffaabbccddeeffaabbccddeeff\") == True\n assert candidate(s = \"abcdeabcdeabcdeabcdeabcde\") == True\n assert candidate(s = \"qwertyuiopqwertyuiop\") == True\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzz\") == True\n assert candidate(s = \"abcdefabcdefabcdef\") == True\n assert candidate(s = \"abacbabacbabacb\") == True\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabc\") == True\n assert candidate(s = \"abcababcababcab\") == True\n assert candidate(s = \"abababababababababababababababababababababababab\") == True\n assert candidate(s = \"xyzxyzxyzxyzxyzxyz\") == True\n assert candidate(s = \"ababababab\") == True\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcd\") == True\n assert candidate(s = \"ababababababababababababababab\") == True\n assert candidate(s = \"bababababa\") == True\n assert candidate(s = \"aabbccddeeaabbccddeeaabbccddeeaabbccddeedded\") == False\n assert candidate(s = \"racecaracecar\") == False\n assert candidate(s = \"ababababa\") == False\n assert candidate(s = \"abababababababab\") == True\n assert candidate(s = \"aaaaaa\") == True\n assert candidate(s = \"abcabcabcabcabcabcabcabc\") == True\n assert candidate(s = \"abcdefabcdefabcdefabcdef\") == True\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabcabcabcabc\") == True\n assert candidate(s = \"lmnolmnonlmnonlmnonlmnolmnonlmnonlmnonlmnolmno\") == False\n assert candidate(s = \"abbaabbaabbaabbaabbaabbaabbaabba\") == True\n assert candidate(s = \"hellohellohello\") == True\n assert candidate(s = \"abacabacabacabacabacabacabacabac\") == True\n assert candidate(s = \"abababababab\") == True\n assert candidate(s = \"banana\") == False\n assert candidate(s = \"zzzzzzzzzzzz\") == True\n assert candidate(s = \"abcdeabcdeabcdeabcde\") == True\n assert candidate(s = \"xyzxyzxyzxyzxyzxyzxyzxyzxyzxyz\") == True\n assert candidate(s = \"aabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeffaabbccddeeff\") == True\n assert candidate(s = \"abcabcabcabcabcabc\") == True\n assert candidate(s = \"abababababababababababababababab\") == True\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabc\") == True\n assert candidate(s = \"abcabcabcabcabcab\") == False\n assert candidate(s = \"aabbaabbccddeeaabbccddeeaabbccddeeaabbccddeedded\") == False\n assert candidate(s = \"abcdabcdabcdabcdabcdabcd\") == True\n assert candidate(s = \"hello\") == False\n assert candidate(s = \"xyxxyxxyxxyxxyxxyxxyxxyxxyxxyxxyxxyxxyxxyxxyxyxxyxyxxyxxyx\") == False\n assert candidate(s = \"xyzxyzxyzxyzxyz\") == True\n assert candidate(s = \"mississippi\") == False\n assert candidate(s = \"abcabcabcabcabcabcabcabcabcabcabcabc\") == True\n assert candidate(s = \"xyxyxyxyxyxyxyxyxyxyxy\") == True\n assert candidate(s = \"abcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijkabcdefghijk\") == True\n assert candidate(s = \"abcabcabcabcabc\") == True\n assert candidate(s = \"abcdabcdabcdabcd\") == True\n assert candidate(s = \"abcdefghabcdefghabcdefgh\") == True\n assert candidate(s = \"zzzzzzzz\") == True\n assert candidate(s = \"aaaaaaa\") == True\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == True\n assert candidate(s = \"aabbccddeeffaabbccddeeff\") == True\n assert candidate(s = \"abcdabcda\") == False\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == True\n", "comparison": "exact"}, "public_tests": ["\"abab\"", "\"aba\"", "\"abcabcabcabc\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().repeatedSubstringPattern", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:49:58+00:00", "tests_total": 87, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "string-matching", "z-algorithm", "knuth-morris-pratt-algorithm"]}, "language": "ruby", "interface": {"raw_signature": "def repeated_substring_pattern(s)", "container": null, "callable": "repeated_substring_pattern", "parameters": [{"name": "s", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 461, "task_id": "hamming-distance", "difficulty": "Easy", "problem_description": "The Hamming distance between two integers is the number of positions at which the corresponding bits are different.\n\nGiven two integers x and y, return the Hamming distance between them.\n\nExample 1:\n\nInput: x = 1, y = 4\nOutput: 2\nExplanation:\n1 (0 0 0 1)\n4 (0 1 0 0)\n ↑ ↑\nThe above arrows point to positions where the corresponding bits are different.\n\nExample 2:\n\nInput: x = 3, y = 1\nOutput: 1\n\nConstraints:\n\n- 0 <= x, y <= 2^31 - 1\n\nNote: This question is the same as 2220: Minimum Bit Flips to Convert Number.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(x = 3,y = 1) == 1\n assert candidate(x = 7,y = 15) == 1\n assert candidate(x = 1073741823,y = 2147483647) == 1\n assert candidate(x = 1023,y = 512) == 9\n assert candidate(x = 2147483647,y = 0) == 31\n assert candidate(x = 2147483647,y = 1) == 30\n assert candidate(x = 1,y = 4) == 2\n assert candidate(x = 1023,y = 511) == 1\n assert candidate(x = 16,y = 32) == 2\n assert candidate(x = 1073741824,y = 1073741823) == 31\n assert candidate(x = 0,y = 0) == 0\n assert candidate(x = 255,y = 0) == 8\n assert candidate(x = 1,y = 1) == 0\n assert candidate(x = 15,y = 15) == 0\n assert candidate(x = 2147483647,y = 2147483647) == 0\n assert candidate(x = 15,y = 9) == 2\n assert candidate(x = 555,y = 666) == 4\n assert candidate(x = 33554432,y = 67108863) == 25\n assert candidate(x = 1717986918,y = 858993459) == 16\n assert candidate(x = 4095,y = 1023) == 2\n assert candidate(x = 33554431,y = 16777215) == 1\n assert candidate(x = 268435455,y = 134217727) == 1\n assert candidate(x = 65535,y = 32768) == 15\n assert candidate(x = 16777215,y = 16777216) == 25\n assert candidate(x = 2147483647,y = 2147483646) == 1\n assert candidate(x = 262143,y = 131071) == 1\n assert candidate(x = 13579,y = 24680) == 8\n assert candidate(x = 100000000,y = 100000001) == 1\n assert candidate(x = 2047,y = 4094) == 2\n assert candidate(x = 255,y = 127) == 1\n assert candidate(x = 0,y = 2147483647) == 31\n assert candidate(x = 33554431,y = 33554432) == 26\n assert candidate(x = 1000000000,y = 1000000001) == 1\n assert candidate(x = 134217728,y = 8388607) == 24\n assert candidate(x = 536870911,y = 536870912) == 30\n assert candidate(x = 268435456,y = 536870912) == 2\n assert candidate(x = 8,y = 16) == 2\n assert candidate(x = 1048575,y = 2097150) == 2\n assert candidate(x = 128,y = 32) == 2\n assert candidate(x = 8191,y = 4095) == 1\n assert candidate(x = 1048575,y = 524288) == 19\n assert candidate(x = 511,y = 255) == 1\n assert candidate(x = 1048576,y = 2097152) == 2\n assert candidate(x = 123456789,y = 987654321) == 15\n assert candidate(x = 1000000007,y = 1000000008) == 4\n assert candidate(x = 1073741824,y = 536870912) == 2\n assert candidate(x = 123,y = 456) == 6\n assert candidate(x = 67108863,y = 67108864) == 27\n assert candidate(x = 134217727,y = 268435455) == 1\n assert candidate(x = 1024,y = 511) == 10\n assert candidate(x = 1073741824,y = 2147483647) == 30\n assert candidate(x = 8,y = 24) == 1\n assert candidate(x = 1048575,y = 1048574) == 1\n assert candidate(x = 131071,y = 32768) == 16\n assert candidate(x = 65535,y = 65534) == 1\n assert candidate(x = 16777215,y = 0) == 24\n assert candidate(x = 8675309,y = 196418) == 11\n assert candidate(x = 5,y = 10) == 4\n assert candidate(x = 13,y = 29) == 1\n assert candidate(x = 8,y = 32) == 2\n assert candidate(x = 5,y = 255) == 6\n assert candidate(x = 131071,y = 1048575) == 3\n assert candidate(x = 17,y = 34) == 4\n assert candidate(x = 4095,y = 1) == 11\n assert candidate(x = 1048576,y = 524288) == 2\n assert candidate(x = 65535,y = 255) == 8\n assert candidate(x = 16777215,y = 8388608) == 23\n assert candidate(x = 0,y = 1073741824) == 1\n assert candidate(x = 1,y = 2147483647) == 30\n assert candidate(x = 858993459,y = 2147483647) == 15\n assert candidate(x = 65535,y = 0) == 16\n assert candidate(x = 500,y = 1000) == 4\n assert candidate(x = 8388607,y = 16777216) == 24\n assert candidate(x = 268435455,y = 268435456) == 29\n assert candidate(x = 131071,y = 65535) == 1\n assert candidate(x = 16777215,y = 65536) == 23\n assert candidate(x = 131072,y = 262144) == 2\n assert candidate(x = 16777215,y = 1) == 23\n assert candidate(x = 1048575,y = 2097151) == 1\n assert candidate(x = 2147483647,y = 1073741823) == 1\n assert candidate(x = 8191,y = 0) == 13\n assert candidate(x = 32768,y = 65535) == 15\n assert candidate(x = 1048575,y = 1048576) == 21\n", "comparison": "exact"}, "public_tests": ["1\n4", "3\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["x", "y"], "leetcode_dataset_entry_point": "Solution().hammingDistance", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:00+00:00", "tests_total": 88, "tests_dropped": 5, "flags": [], "topic_tags": ["bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def hamming_distance(x, y)", "container": null, "callable": "hamming_distance", "parameters": [{"name": "x", "type": "Integer"}, {"name": "y", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 462, "task_id": "minimum-moves-to-equal-array-elements-ii", "difficulty": "Medium", "problem_description": "Given an integer array nums of size n, return the minimum number of moves required to make all array elements equal.\n\nIn one move, you can increment or decrement an element of the array by 1.\n\nTest cases are designed so that the answer will fit in a 32-bit integer.\n\nExample 1:\n\nInput: nums = [1,2,3]\nOutput: 2\nExplanation:\nOnly two moves are needed (remember each move increments or decrements one element):\n[1,2,3] => [2,2,3] => [2,2,2]\n\nExample 2:\n\nInput: nums = [1,10,2,9]\nOutput: 16\n\nConstraints:\n\n- n == nums.length\n- 1 <= nums.length <= 10^5\n- -10^9 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 1, 1]) == 0\n assert candidate(nums = [1, 1, 1, 1]) == 0\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == 20\n assert candidate(nums = [1, 3, 5, 7, 9]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(nums = [1, 0, 0, 8, 6]) == 14\n assert candidate(nums = [1, 2, 3, 4, 5]) == 6\n assert candidate(nums = [-1, 1, 1, 0, -1, -1]) == 5\n assert candidate(nums = [1, 10, 2, 9]) == 16\n assert candidate(nums = [1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [100, 200, 300, 400, 500]) == 600\n assert candidate(nums = [-10, -20, -30, -40, -50]) == 60\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 8\n assert candidate(nums = [10, 5, 15, 20, 0]) == 30\n assert candidate(nums = [1000000000, -1000000000, 0]) == 2000000000\n assert candidate(nums = [1000000000, -1000000000, 0]) == 2000000000\n assert candidate(nums = [1, 2, 3]) == 2\n assert candidate(nums = [1, 2, 9, 10]) == 16\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [-1, 1, 0]) == 2\n assert candidate(nums = [-1, 0, 1]) == 2\n assert candidate(nums = [100, 100, 100]) == 0\n assert candidate(nums = [-1, 1, -2, 2, -3, 3, -4, 4, -5, 5]) == 30\n assert candidate(nums = [10, 1, 2, 7, 5]) == 14\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 10000\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 250\n assert candidate(nums = [100, 200, 300, 400, 500]) == 600\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 200]) == 190\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 225\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 5, 6, 6, 6, 7]) == 19\n assert candidate(nums = [-10, -20, -30, -40, -50]) == 60\n assert candidate(nums = [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6]) == 31\n assert candidate(nums = [1, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 1110988899\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4]) == 8\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10]) == 110\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 50\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 50\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == 60\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1000000000]) == 999999999\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 25\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 56\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(nums = [-100, 0, 100, 200, 300, 400, 500, 600, 700, 800, 900]) == 3000\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 250\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [-5, -3, -1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23]) == 112\n assert candidate(nums = [1, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120]) == 219\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]) == 450\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 100\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 156\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2]) == 7\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 30\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 9, 10, 11, 20]) == 29\n assert candidate(nums = [-5, -4, -3, -2, -1, 0]) == 9\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7]) == 34\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 100\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110]) == 300\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == 560\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]) == 25\n assert candidate(nums = [10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12]) == 10\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11]) == 18\n assert candidate(nums = [100, 101, 102, 103, 104]) == 6\n", "comparison": "exact"}, "public_tests": ["[1,2,3]", "[1,10,2,9]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().minMoves2", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:03+00:00", "tests_total": 79, "tests_dropped": 6, "flags": [], "topic_tags": ["array", "math", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def min_moves2(nums)", "container": null, "callable": "min_moves2", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 463, "task_id": "island-perimeter", "difficulty": "Easy", "problem_description": "You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water.\n\nGrid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells).\n\nThe island doesn't have \"lakes\", meaning the water inside isn't connected to the water around the island. One cell is a square with side length 1. The grid is rectangular, width and height don't exceed 100. Determine the perimeter of the island.\n\nExample 1:\n\nInput: grid = [[0,1,0,0],[1,1,1,0],[0,1,0,0],[1,1,0,0]]\nOutput: 16\nExplanation: The perimeter is the 16 yellow stripes in the image above.\n\nExample 2:\n\nInput: grid = [[1]]\nOutput: 4\n\nExample 3:\n\nInput: grid = [[1,0]]\nOutput: 4\n\nConstraints:\n\n- row == grid.length\n- col == grid[i].length\n- 1 <= row, col <= 100\n- grid[i][j] is 0 or 1.\n- There is exactly one island in grid.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(grid = [[0, 1, 0, 0, 0], [0, 1, 0, 0, 0], [0, 1, 1, 1, 0], [0, 0, 0, 0, 0]]) == 12\n assert candidate(grid = [[1]]) == 4\n assert candidate(grid = [[1, 1, 1], [1, 0, 1], [1, 1, 1]]) == 16\n assert candidate(grid = [[0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0]]) == 20\n assert candidate(grid = [[1, 0]]) == 4\n assert candidate(grid = [[0, 1, 1, 0], [1, 1, 1, 1], [0, 1, 1, 0]]) == 14\n assert candidate(grid = [[0, 1, 0, 0], [1, 1, 1, 0], [0, 1, 0, 0], [1, 1, 0, 0]]) == 16\n assert candidate(grid = [[1, 1, 0, 0], [1, 1, 0, 0], [0, 0, 1, 1], [0, 0, 1, 1]]) == 16\n assert candidate(grid = [[0, 0, 0, 0], [0, 1, 1, 0], [0, 1, 1, 0], [0, 0, 0, 0]]) == 8\n assert candidate(grid = [[0, 0, 1, 0], [0, 1, 1, 1], [0, 1, 1, 0], [0, 0, 1, 0]]) == 14\n assert candidate(grid = [[1, 1, 0, 0], [0, 1, 0, 0], [0, 1, 0, 1], [1, 1, 0, 0]]) == 18\n assert candidate(grid = [[1, 1], [1, 1]]) == 8\n assert candidate(grid = [[1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 1, 0, 1]]) == 48\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 0, 0, 1, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 38\n assert candidate(grid = [[0, 1, 1, 0, 0, 0], [1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 22\n assert candidate(grid = [[0, 1, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 1, 0]]) == 18\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]) == 64\n assert candidate(grid = [[1, 1, 1, 1], [1, 0, 0, 1], [1, 0, 0, 1], [1, 1, 1, 1]]) == 24\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1]]) == 72\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 36\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 28\n assert candidate(grid = [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 0, 1, 0], [0, 1, 1, 1, 0], [0, 0, 0, 0, 0]]) == 16\n assert candidate(grid = [[0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]) == 20\n assert candidate(grid = [[1, 1, 1, 1, 0, 0, 0, 0], [1, 0, 0, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1, 0]]) == 38\n assert candidate(grid = [[0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 30\n assert candidate(grid = [[1, 1, 1, 0, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 0, 1, 1, 1]]) == 64\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 32\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 1, 1, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 36\n assert candidate(grid = [[0, 1, 0, 0, 0, 0], [1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0], [0, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]) == 28\n assert candidate(grid = [[1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1]]) == 36\n assert candidate(grid = [[1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 1, 0], [1, 1, 0, 0, 1, 1], [0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 0]]) == 40\n assert candidate(grid = [[0, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0]]) == 28\n assert candidate(grid = [[0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0]]) == 32\n assert candidate(grid = [[1, 1, 1, 1, 0], [1, 0, 0, 1, 0], [1, 1, 1, 1, 0], [0, 0, 0, 0, 0]]) == 20\n assert candidate(grid = [[0, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 1, 1, 0]]) == 20\n assert candidate(grid = [[1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 1], [1, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1]]) == 48\n assert candidate(grid = [[1, 0, 0, 1, 1], [1, 1, 0, 0, 1], [0, 1, 1, 0, 0], [0, 0, 1, 1, 0], [1, 1, 0, 0, 1]]) == 34\n assert candidate(grid = [[0, 1, 0, 0, 0, 1, 0], [1, 1, 1, 0, 1, 1, 1], [0, 1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 0, 0]]) == 34\n assert candidate(grid = [[0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0], [1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1], [0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0]]) == 32\n assert candidate(grid = [[0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1]]) == 62\n assert candidate(grid = [[1, 1, 0, 0, 1, 1], [1, 0, 0, 0, 0, 1], [1, 1, 1, 0, 0, 1], [1, 0, 0, 0, 0, 1], [1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0]]) == 36\n assert candidate(grid = [[1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]]) == 156\n assert candidate(grid = [[1, 0, 0, 0, 1], [1, 1, 0, 1, 1], [0, 1, 1, 1, 0], [0, 0, 1, 0, 0], [1, 1, 0, 1, 1]]) == 34\n assert candidate(grid = [[0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [1, 0, 1, 0, 1], [0, 1, 1, 1, 0]]) == 30\n assert candidate(grid = [[1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 1]]) == 92\n assert candidate(grid = [[0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0], [0, 1, 0, 0, 1, 0], [0, 1, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]) == 24\n assert candidate(grid = [[0, 0, 1, 0, 0], [0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 1, 1, 1, 0], [0, 0, 1, 0, 0]]) == 24\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 1, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == 64\n assert candidate(grid = [[1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1]]) == 32\n assert candidate(grid = [[1, 1, 1, 0, 0], [1, 0, 0, 0, 1], [1, 0, 0, 1, 0], [0, 0, 1, 0, 0], [0, 0, 1, 1, 1]]) == 30\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 42\n assert candidate(grid = [[0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0]]) == 68\n assert candidate(grid = [[1, 1, 1, 0, 0], [1, 0, 1, 1, 0], [1, 1, 1, 1, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) == 18\n assert candidate(grid = [[0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 1, 0]]) == 18\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1, 0, 0], [0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 1, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 30\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0, 1, 0], [0, 1, 0, 1, 1, 0, 1, 0], [0, 1, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 48\n assert candidate(grid = [[1, 0, 0, 1, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 0]]) == 36\n assert candidate(grid = [[0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]) == 20\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 1, 0, 0, 0, 0, 1, 0, 1], [1, 0, 1, 1, 1, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 88\n assert candidate(grid = [[0, 0, 0, 1, 1, 0, 0], [0, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 0]]) == 28\n assert candidate(grid = [[1, 1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 0, 0, 0], [1, 0, 1, 1, 1, 0, 0], [1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 40\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0]]) == 32\n assert candidate(grid = [[1, 1, 1, 1, 1, 0], [1, 0, 0, 0, 1, 0], [1, 0, 1, 0, 1, 0], [1, 0, 0, 0, 1, 0], [1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0]]) == 36\n assert candidate(grid = [[1, 1, 1, 1, 1, 0], [0, 0, 1, 0, 0, 0], [0, 1, 1, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0]]) == 38\n assert candidate(grid = [[1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0], [1, 1, 0, 0, 1, 1]]) == 40\n assert candidate(grid = [[1, 1, 0, 1, 1], [0, 1, 1, 1, 0], [0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 0, 1, 0, 0]]) == 30\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 1, 0], [0, 1, 1, 1, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 34\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 1, 1, 1, 1, 1, 0], [0, 0, 1, 0, 0, 1, 1, 0], [0, 0, 1, 1, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0]]) == 32\n assert candidate(grid = [[1, 0, 1, 0, 1], [0, 1, 1, 1, 0], [1, 1, 0, 1, 1], [0, 1, 1, 1, 0], [1, 0, 1, 0, 1]]) == 40\n assert candidate(grid = [[0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [0, 1, 0, 1, 1, 1, 0], [0, 1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0]]) == 32\n assert candidate(grid = [[1, 0, 0, 1], [0, 1, 1, 0], [1, 1, 0, 1], [1, 0, 1, 0]]) == 28\n assert candidate(grid = [[1, 0, 0, 1, 1, 0, 0, 1], [1, 1, 0, 1, 1, 0, 1, 1], [0, 0, 1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 1, 1, 0, 0, 0]]) == 50\n", "comparison": "exact"}, "public_tests": ["[[0,1,0,0],[1,1,1,0],[0,1,0,0],[1,1,0,0]]", "[[1]]", "[[1,0]]"], "hints": [], "metadata": {"canonical_parameter_names": ["grid"], "leetcode_dataset_entry_point": "Solution().islandPerimeter", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:05+00:00", "tests_total": 72, "tests_dropped": 0, "flags": ["figure_reference", "has_images"], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def island_perimeter(grid)", "container": null, "callable": "island_perimeter", "parameters": [{"name": "grid", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 464, "task_id": "can-i-win", "difficulty": "Medium", "problem_description": "In the \"100 game\" two players take turns adding, to a running total, any integer from 1 to 10. The player who first causes the running total to reach or exceed 100 wins.\n\nWhat if we change the game so that players cannot re-use integers?\n\nFor example, two players might take turns drawing from a common pool of numbers from 1 to 15 without replacement until they reach a total >= 100.\n\nGiven two integers maxChoosableInteger and desiredTotal, return true if the first player to move can force a win, otherwise, return false. Assume both players play optimally.\n\nExample 1:\n\nInput: maxChoosableInteger = 10, desiredTotal = 11\nOutput: false\nExplanation:\nNo matter which integer the first player choose, the first player will lose.\nThe first player can choose an integer from 1 up to 10.\nIf the first player choose 1, the second player can only choose integers from 2 up to 10.\nThe second player will win by choosing 10 and get a total = 11, which is >= desiredTotal.\nSame with other integers chosen by the first player, the second player will always win.\n\nExample 2:\n\nInput: maxChoosableInteger = 10, desiredTotal = 0\nOutput: true\n\nExample 3:\n\nInput: maxChoosableInteger = 10, desiredTotal = 1\nOutput: true\n\nConstraints:\n\n- 1 <= maxChoosableInteger <= 20\n- 0 <= desiredTotal <= 300\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(maxChoosableInteger = 15,desiredTotal = 50) == True\n assert candidate(maxChoosableInteger = 10,desiredTotal = 0) == True\n assert candidate(maxChoosableInteger = 10,desiredTotal = 15) == True\n assert candidate(maxChoosableInteger = 8,desiredTotal = 25) == False\n assert candidate(maxChoosableInteger = 10,desiredTotal = 40) == False\n assert candidate(maxChoosableInteger = 10,desiredTotal = 25) == True\n assert candidate(maxChoosableInteger = 20,desiredTotal = 21) == False\n assert candidate(maxChoosableInteger = 5,desiredTotal = 50) == False\n assert candidate(maxChoosableInteger = 10,desiredTotal = 100) == False\n assert candidate(maxChoosableInteger = 20,desiredTotal = 28) == True\n assert candidate(maxChoosableInteger = 15,desiredTotal = 100) == True\n assert candidate(maxChoosableInteger = 12,desiredTotal = 30) == False\n assert candidate(maxChoosableInteger = 7,desiredTotal = 15) == False\n assert candidate(maxChoosableInteger = 6,desiredTotal = 16) == True\n assert candidate(maxChoosableInteger = 10,desiredTotal = 1) == True\n assert candidate(maxChoosableInteger = 3,desiredTotal = 8) == False\n assert candidate(maxChoosableInteger = 20,desiredTotal = 300) == False\n assert candidate(maxChoosableInteger = 10,desiredTotal = 11) == False\n assert candidate(maxChoosableInteger = 16,desiredTotal = 80) == True\n assert candidate(maxChoosableInteger = 18,desiredTotal = 150) == False\n assert candidate(maxChoosableInteger = 15,desiredTotal = 70) == False\n assert candidate(maxChoosableInteger = 8,desiredTotal = 30) == True\n assert candidate(maxChoosableInteger = 20,desiredTotal = 199) == False\n assert candidate(maxChoosableInteger = 9,desiredTotal = 36) == True\n assert candidate(maxChoosableInteger = 16,desiredTotal = 85) == False\n assert candidate(maxChoosableInteger = 20,desiredTotal = 200) == False\n assert candidate(maxChoosableInteger = 18,desiredTotal = 120) == False\n assert candidate(maxChoosableInteger = 11,desiredTotal = 33) == True\n assert candidate(maxChoosableInteger = 13,desiredTotal = 45) == True\n assert candidate(maxChoosableInteger = 10,desiredTotal = 99) == False\n assert candidate(maxChoosableInteger = 16,desiredTotal = 90) == False\n assert candidate(maxChoosableInteger = 14,desiredTotal = 49) == True\n assert candidate(maxChoosableInteger = 13,desiredTotal = 30) == True\n assert candidate(maxChoosableInteger = 20,desiredTotal = 180) == False\n assert candidate(maxChoosableInteger = 14,desiredTotal = 60) == False\n assert candidate(maxChoosableInteger = 13,desiredTotal = 80) == True\n assert candidate(maxChoosableInteger = 14,desiredTotal = 80) == True\n assert candidate(maxChoosableInteger = 16,desiredTotal = 60) == True\n assert candidate(maxChoosableInteger = 12,desiredTotal = 80) == False\n assert candidate(maxChoosableInteger = 10,desiredTotal = 55) == False\n assert candidate(maxChoosableInteger = 19,desiredTotal = 135) == True\n assert candidate(maxChoosableInteger = 14,desiredTotal = 99) == False\n assert candidate(maxChoosableInteger = 19,desiredTotal = 110) == True\n assert candidate(maxChoosableInteger = 12,desiredTotal = 75) == False\n assert candidate(maxChoosableInteger = 5,desiredTotal = 15) == True\n assert candidate(maxChoosableInteger = 14,desiredTotal = 95) == False\n assert candidate(maxChoosableInteger = 7,desiredTotal = 28) == True\n assert candidate(maxChoosableInteger = 14,desiredTotal = 50) == True\n assert candidate(maxChoosableInteger = 20,desiredTotal = 250) == False\n assert candidate(maxChoosableInteger = 17,desiredTotal = 140) == True\n assert candidate(maxChoosableInteger = 19,desiredTotal = 180) == True\n assert candidate(maxChoosableInteger = 16,desiredTotal = 110) == False\n assert candidate(maxChoosableInteger = 13,desiredTotal = 60) == True\n assert candidate(maxChoosableInteger = 9,desiredTotal = 45) == True\n assert candidate(maxChoosableInteger = 12,desiredTotal = 35) == True\n assert candidate(maxChoosableInteger = 17,desiredTotal = 85) == True\n assert candidate(maxChoosableInteger = 20,desiredTotal = 150) == False\n assert candidate(maxChoosableInteger = 15,desiredTotal = 80) == True\n assert candidate(maxChoosableInteger = 8,desiredTotal = 28) == True\n assert candidate(maxChoosableInteger = 7,desiredTotal = 25) == True\n assert candidate(maxChoosableInteger = 18,desiredTotal = 130) == True\n assert candidate(maxChoosableInteger = 11,desiredTotal = 55) == True\n assert candidate(maxChoosableInteger = 17,desiredTotal = 90) == True\n assert candidate(maxChoosableInteger = 17,desiredTotal = 100) == True\n assert candidate(maxChoosableInteger = 16,desiredTotal = 120) == True\n assert candidate(maxChoosableInteger = 20,desiredTotal = 130) == False\n assert candidate(maxChoosableInteger = 19,desiredTotal = 120) == True\n assert candidate(maxChoosableInteger = 16,desiredTotal = 130) == False\n assert candidate(maxChoosableInteger = 7,desiredTotal = 20) == True\n assert candidate(maxChoosableInteger = 18,desiredTotal = 180) == False\n assert candidate(maxChoosableInteger = 18,desiredTotal = 100) == True\n assert candidate(maxChoosableInteger = 12,desiredTotal = 60) == False\n assert candidate(maxChoosableInteger = 15,desiredTotal = 120) == True\n assert candidate(maxChoosableInteger = 14,desiredTotal = 70) == True\n assert candidate(maxChoosableInteger = 10,desiredTotal = 50) == False\n", "comparison": "exact"}, "public_tests": ["10\n11", "10\n0", "10\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["maxChoosableInteger", "desiredTotal"], "leetcode_dataset_entry_point": "Solution().canIWin", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:07+00:00", "tests_total": 75, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "dynamic-programming", "bit-manipulation", "memoization", "game-theory", "bitmask"]}, "language": "ruby", "interface": {"raw_signature": "def can_i_win(max_choosable_integer, desired_total)", "container": null, "callable": "can_i_win", "parameters": [{"name": "max_choosable_integer", "type": "Integer"}, {"name": "desired_total", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 466, "task_id": "count-the-repetitions", "difficulty": "Hard", "problem_description": "We define str = [s, n] as the string str which consists of the string s concatenated n times.\n\n- For example, str == [\"abc\", 3] ==\"abcabcabc\".\n\nWe define that string s1 can be obtained from string s2 if we can remove some characters from s2 such that it becomes s1.\n\n- For example, s1 = \"abc\" can be obtained from s2 = \"abdbec\" based on our definition by removing the bolded underlined characters.\n\nYou are given two strings s1 and s2 and two integers n1 and n2. You have the two strings str1 = [s1, n1] and str2 = [s2, n2].\n\nReturn the maximum integer m such that str = [str2, m] can be obtained from str1.\n\nExample 1:\n\nInput: s1 = \"acb\", n1 = 4, s2 = \"ab\", n2 = 2\nOutput: 2\n\nExample 2:\n\nInput: s1 = \"acb\", n1 = 1, s2 = \"acb\", n2 = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= s1.length, s2.length <= 100\n- s1 and s2 consist of lowercase English letters.\n- 1 <= n1, n2 <= 10^6\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s1 = \"acb\",n1 = 1,s2 = \"acb\",n2 = 1) == 1\n assert candidate(s1 = \"aaa\",n1 = 3,s2 = \"a\",n2 = 1) == 9\n assert candidate(s1 = \"aabaacaabaab\",n1 = 8,s2 = \"aab\",n2 = 1) == 24\n assert candidate(s1 = \"acb\",n1 = 4,s2 = \"ab\",n2 = 2) == 2\n assert candidate(s1 = \"abcde\",n1 = 2,s2 = \"ace\",n2 = 1) == 2\n assert candidate(s1 = \"banana\",n1 = 10,s2 = \"nan\",n2 = 1) == 10\n assert candidate(s1 = \"abcdabcd\",n1 = 5,s2 = \"abc\",n2 = 2) == 5\n assert candidate(s1 = \"aabbccddeeff\",n1 = 5,s2 = \"abcdef\",n2 = 1) == 5\n assert candidate(s1 = \"zzzzzzzz\",n1 = 1000,s2 = \"zz\",n2 = 100) == 40\n assert candidate(s1 = \"aabbcc\",n1 = 1000,s2 = \"abcabcabcabcabcabcabcabc\",n2 = 50) == 2\n assert candidate(s1 = \"abcdefg\",n1 = 500,s2 = \"aceg\",n2 = 100) == 5\n assert candidate(s1 = \"aabbccdd\",n1 = 25,s2 = \"abcdabcd\",n2 = 2) == 6\n assert candidate(s1 = \"hello\",n1 = 20,s2 = \"lohel\",n2 = 4) == 4\n assert candidate(s1 = \"pqrs\",n1 = 100,s2 = \"rqpqsr\",n2 = 5) == 5\n assert candidate(s1 = \"abcdefg\",n1 = 100,s2 = \"aceg\",n2 = 5) == 20\n assert candidate(s1 = \"zzzzz\",n1 = 1000000,s2 = \"z\",n2 = 1) == 5000000\n assert candidate(s1 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",n1 = 100,s2 = \"zyxwvutsrqponmlkjihgfedcba\",n2 = 1) == 3\n assert candidate(s1 = \"zabzabczb\",n1 = 10,s2 = \"abc\",n2 = 2) == 5\n assert candidate(s1 = \"xyzxyzxyz\",n1 = 5,s2 = \"xyz\",n2 = 1) == 15\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",n1 = 100,s2 = \"zyxwvutsrqponmlkjihgfedcba\",n2 = 50) == 0\n assert candidate(s1 = \"abcd\",n1 = 100000,s2 = \"dabc\",n2 = 1000) == 99\n assert candidate(s1 = \"abcdef\",n1 = 20,s2 = \"fedcba\",n2 = 1) == 3\n assert candidate(s1 = \"xyzxyz\",n1 = 3,s2 = \"xyzxyzxyz\",n2 = 1) == 2\n assert candidate(s1 = \"hellohello\",n1 = 10,s2 = \"lohe\",n2 = 1) == 19\n assert candidate(s1 = \"abcdefgh\",n1 = 10,s2 = \"aceg\",n2 = 1) == 10\n assert candidate(s1 = \"xyzxyzxyz\",n1 = 100,s2 = \"xyzxyzxyz\",n2 = 20) == 5\n assert candidate(s1 = \"xyz\",n1 = 50000,s2 = \"xzy\",n2 = 10000) == 2\n assert candidate(s1 = \"abcdef\",n1 = 15,s2 = \"defabc\",n2 = 3) == 4\n assert candidate(s1 = \"abcabcabcabcabcabcabcabc\",n1 = 10,s2 = \"abcabcabcabcabcabcabcabc\",n2 = 1) == 10\n assert candidate(s1 = \"acb\",n1 = 10,s2 = \"acbacb\",n2 = 1) == 5\n assert candidate(s1 = \"abcdefg\",n1 = 10,s2 = \"xyz\",n2 = 1) == 0\n assert candidate(s1 = \"ababababab\",n1 = 20,s2 = \"abab\",n2 = 5) == 10\n assert candidate(s1 = \"abcabcabcabcabc\",n1 = 999,s2 = \"abab\",n2 = 125) == 19\n assert candidate(s1 = \"aaa\",n1 = 10,s2 = \"aa\",n2 = 2) == 7\n assert candidate(s1 = \"mississippi\",n1 = 100,s2 = \"issi\",n2 = 5) == 20\n assert candidate(s1 = \"aabbccddeeffgg\",n1 = 20,s2 = \"abcdefg\",n2 = 2) == 10\n assert candidate(s1 = \"zzzzzzzzzz\",n1 = 1000,s2 = \"zz\",n2 = 100) == 50\n assert candidate(s1 = \"qwertyuiop\",n1 = 50,s2 = \"qrp\",n2 = 10) == 5\n assert candidate(s1 = \"xyzxyzxyz\",n1 = 15,s2 = \"zyxzyx\",n2 = 1) == 11\n assert candidate(s1 = \"abcabcabc\",n1 = 500,s2 = \"cab\",n2 = 250) == 5\n assert candidate(s1 = \"xyz\",n1 = 5,s2 = \"xz\",n2 = 1) == 5\n assert candidate(s1 = \"abcabcabcabcabcabcabcabc\",n1 = 10,s2 = \"abc\",n2 = 1) == 80\n assert candidate(s1 = \"xyz\",n1 = 1000000,s2 = \"xyzz\",n2 = 1000) == 500\n assert candidate(s1 = \"hello\",n1 = 10,s2 = \"heo\",n2 = 1) == 10\n assert candidate(s1 = \"abcabcabcabc\",n1 = 12,s2 = \"abcabc\",n2 = 2) == 12\n assert candidate(s1 = \"abacabadabacaba\",n1 = 200,s2 = \"abad\",n2 = 10) == 20\n assert candidate(s1 = \"xyz\",n1 = 10,s2 = \"yxz\",n2 = 1) == 5\n assert candidate(s1 = \"abacabadaba\",n1 = 1000,s2 = \"abad\",n2 = 250) == 4\n assert candidate(s1 = \"abababa\",n1 = 10,s2 = \"aba\",n2 = 2) == 10\n assert candidate(s1 = \"abcd\",n1 = 50,s2 = \"bd\",n2 = 10) == 5\n assert candidate(s1 = \"abcde\",n1 = 1,s2 = \"edcba\",n2 = 1) == 0\n assert candidate(s1 = \"zabzabczabc\",n1 = 10,s2 = \"abc\",n2 = 3) == 6\n assert candidate(s1 = \"aaaaaaab\",n1 = 1000,s2 = \"aab\",n2 = 100) == 10\n assert candidate(s1 = \"abcdef\",n1 = 6,s2 = \"fed\",n2 = 1) == 2\n assert candidate(s1 = \"aabbcc\",n1 = 10,s2 = \"abc\",n2 = 2) == 5\n assert candidate(s1 = \"ababcabc\",n1 = 10,s2 = \"abc\",n2 = 2) == 10\n assert candidate(s1 = \"aaaa\",n1 = 1000000,s2 = \"aa\",n2 = 100000) == 20\n assert candidate(s1 = \"abcdef\",n1 = 999999,s2 = \"fabcde\",n2 = 100000) == 9\n assert candidate(s1 = \"aaaaa\",n1 = 100000,s2 = \"aa\",n2 = 10000) == 25\n assert candidate(s1 = \"abccbaabccba\",n1 = 20,s2 = \"abc\",n2 = 4) == 10\n assert candidate(s1 = \"ababababababababababab\",n1 = 100,s2 = \"baba\",n2 = 25) == 21\n assert candidate(s1 = \"aeiou\",n1 = 10000,s2 = \"aeiouaeiou\",n2 = 500) == 10\n assert candidate(s1 = \"mississippi\",n1 = 3,s2 = \"issi\",n2 = 1) == 3\n assert candidate(s1 = \"abcdabcdabcd\",n1 = 3,s2 = \"abcd\",n2 = 1) == 9\n assert candidate(s1 = \"qwertyuiop\",n1 = 50,s2 = \"qo\",n2 = 10) == 5\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",n1 = 1000,s2 = \"abcdefghijklmnopqrstuvwxyz\",n2 = 10) == 100\n assert candidate(s1 = \"abcdabcdabcdabcd\",n1 = 20,s2 = \"abc\",n2 = 5) == 16\n assert candidate(s1 = \"abcd\",n1 = 100,s2 = \"dabc\",n2 = 50) == 1\n assert candidate(s1 = \"abababa\",n1 = 1000,s2 = \"aba\",n2 = 10) == 200\n assert candidate(s1 = \"banana\",n1 = 20,s2 = \"ban\",n2 = 5) == 4\n assert candidate(s1 = \"xyzabc\",n1 = 5,s2 = \"cab\",n2 = 2) == 2\n assert candidate(s1 = \"aaa\",n1 = 500,s2 = \"a\",n2 = 100) == 15\n assert candidate(s1 = \"xyxzyxyxyxy\",n1 = 2,s2 = \"xyz\",n2 = 1) == 2\n assert candidate(s1 = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",n1 = 1000000,s2 = \"zzz\",n2 = 100000) == 113\n assert candidate(s1 = \"ababab\",n1 = 5,s2 = \"ab\",n2 = 2) == 7\n assert candidate(s1 = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",n1 = 10,s2 = \"abcdefghijklmnopqrstuvwxyz\",n2 = 1) == 10\n assert candidate(s1 = \"aabbcc\",n1 = 3,s2 = \"abc\",n2 = 1) == 3\n assert candidate(s1 = \"ababcabcabc\",n1 = 6,s2 = \"abcabc\",n2 = 1) == 9\n assert candidate(s1 = \"abcdabcdabcd\",n1 = 500,s2 = \"abcd\",n2 = 125) == 12\n assert candidate(s1 = \"aabbccddeeff\",n1 = 1000,s2 = \"abcdef\",n2 = 10) == 100\n assert candidate(s1 = \"abcabcabcabc\",n1 = 10,s2 = \"abcabc\",n2 = 1) == 20\n assert candidate(s1 = \"aaaabbbbcccc\",n1 = 10,s2 = \"abccba\",n2 = 2) == 2\n assert candidate(s1 = \"abababab\",n1 = 100,s2 = \"aba\",n2 = 15) == 13\n assert candidate(s1 = \"abcdefghij\",n1 = 50,s2 = \"adgj\",n2 = 5) == 10\n assert candidate(s1 = \"mississippi\",n1 = 10,s2 = \"issi\",n2 = 1) == 10\n assert candidate(s1 = \"aaaaaa\",n1 = 1000000,s2 = \"aa\",n2 = 100000) == 30\n assert candidate(s1 = \"abcd\",n1 = 10000,s2 = \"dcba\",n2 = 1000) == 3\n assert candidate(s1 = \"aaaaaaaa\",n1 = 100000,s2 = \"aa\",n2 = 10000) == 40\n assert candidate(s1 = \"ab\",n1 = 1000000,s2 = \"a\",n2 = 500000) == 2\n assert candidate(s1 = \"aaaabaabaabaaaaaa\",n1 = 5,s2 = \"aab\",n2 = 1) == 15\n assert candidate(s1 = \"xyzabc\",n1 = 5,s2 = \"xz\",n2 = 1) == 5\n assert candidate(s1 = \"abababa\",n1 = 7,s2 = \"baab\",n2 = 1) == 7\n assert candidate(s1 = \"banana\",n1 = 10,s2 = \"an\",n2 = 2) == 10\n assert candidate(s1 = \"abcabcabcabc\",n1 = 500,s2 = \"bcab\",n2 = 125) == 8\n assert candidate(s1 = \"abcdabcd\",n1 = 100,s2 = \"cdab\",n2 = 10) == 19\n assert candidate(s1 = \"abcabcabc\",n1 = 1000,s2 = \"abcabc\",n2 = 200) == 7\n assert candidate(s1 = \"abcabcabc\",n1 = 1000,s2 = \"abc\",n2 = 100) == 30\n assert candidate(s1 = \"aaa\",n1 = 1000000,s2 = \"a\",n2 = 1) == 3000000\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",n1 = 10000,s2 = \"zyxwvutsrqponmlkjihgfedcba\",n2 = 5000) == 0\n assert candidate(s1 = \"zzzzzzzzzz\",n1 = 1000,s2 = \"z\",n2 = 100) == 100\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",n1 = 1000,s2 = \"zyxwvutsrqponmlkjihgfedcba\",n2 = 10) == 3\n assert candidate(s1 = \"mnopqrstuvwxyz\",n1 = 10000,s2 = \"mnop\",n2 = 2000) == 5\n assert candidate(s1 = \"abcdabcdabcdabcd\",n1 = 500,s2 = \"dcbadcbadcbadcba\",n2 = 100) == 1\n assert candidate(s1 = \"abcabcabcabc\",n1 = 100,s2 = \"abcabc\",n2 = 5) == 40\n assert candidate(s1 = \"abab\",n1 = 3,s2 = \"ab\",n2 = 2) == 3\n assert candidate(s1 = \"abacabacabacabac\",n1 = 1000,s2 = \"acabacabacabacab\",n2 = 250) == 3\n assert candidate(s1 = \"baba\",n1 = 20,s2 = \"ab\",n2 = 5) == 7\n assert candidate(s1 = \"babccbababcabbbabcbbabbbbabcbbb\",n1 = 100,s2 = \"babccbabab\",n2 = 10) == 10\n", "comparison": "exact"}, "public_tests": ["\"acb\"\n4\n\"ab\"\n2", "\"acb\"\n1\n\"acb\"\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["s1", "n1", "s2", "n2"], "leetcode_dataset_entry_point": "Solution().getMaxRepetitions", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:12+00:00", "tests_total": 108, "tests_dropped": 0, "flags": [], "topic_tags": ["two-pointers", "string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def get_max_repetitions(s1, n1, s2, n2)", "container": null, "callable": "get_max_repetitions", "parameters": [{"name": "s1", "type": "String"}, {"name": "n1", "type": "Integer"}, {"name": "s2", "type": "String"}, {"name": "n2", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 467, "task_id": "unique-substrings-in-wraparound-string", "difficulty": "Medium", "problem_description": "We define the string base to be the infinite wraparound string of \"abcdefghijklmnopqrstuvwxyz\", so base will look like this:\n\n- \"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd....\".\n\nGiven a string s, return the number of unique non-empty substrings of s are present in base.\n\nExample 1:\n\nInput: s = \"a\"\nOutput: 1\nExplanation: Only the substring \"a\" of s is in base.\n\nExample 2:\n\nInput: s = \"cac\"\nOutput: 2\nExplanation: There are two substrings (\"a\", \"c\") of s in base.\n\nExample 3:\n\nInput: s = \"zab\"\nOutput: 6\nExplanation: There are six substrings (\"z\", \"a\", \"b\", \"za\", \"ab\", and \"zab\") of s in base.\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"qpqprstuvwxyzqpqprstuvwxyzqpqprstuvwxyz\") == 48\n assert candidate(s = \"abczabczabcz\") == 10\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == 351\n assert candidate(s = \"azza\") == 3\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"za\") == 3\n assert candidate(s = \"qpqprstuvwxyz\") == 48\n assert candidate(s = \"zaabcdefghijklmnopqrstuvwxyz\") == 352\n assert candidate(s = \"a\") == 1\n assert candidate(s = \"abcabcabc\") == 6\n assert candidate(s = \"zabcdefghijklmnopqrstuvwxyz\") == 377\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"xyzxyzxyz\") == 6\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == 1027\n assert candidate(s = \"abcd\") == 10\n assert candidate(s = \"abczab\") == 9\n assert candidate(s = \"cac\") == 2\n assert candidate(s = \"cab\") == 4\n assert candidate(s = \"zab\") == 6\n assert candidate(s = \"zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == 1053\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"abcabcdabcdeabcdefabcdefg\") == 28\n assert candidate(s = \"mnopqrstuvwxyza\") == 120\n assert candidate(s = \"pqrstuvwxyzabcdefghijklmno\") == 351\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnooooqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz\") == 48\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\") == 10\n assert candidate(s = \"mnopqrstuvwxyzabcdefghijkl\") == 351\n assert candidate(s = \"nopqrstuvwxyzabcdefghijklmno\") == 403\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"aaaaaaaaaabbbbbbbbcccccccc\") == 5\n assert candidate(s = \"qrstuvqrstuvqrstuvqrstuvqrstuvqrstuvqrstuvqrstuvqrstuv\") == 21\n assert candidate(s = \"vwxyzabcdefghijklmnopqrstu\") == 351\n assert candidate(s = \"abcdbca\") == 10\n assert candidate(s = \"zabzabzabzabzabzabzabzabzabzabzabzabzabzabzab\") == 6\n assert candidate(s = \"abacabadabacaba\") == 5\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n assert candidate(s = \"abcabcabcabc\") == 6\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == 1703\n assert candidate(s = \"cdefghijklmnopqrstuvwxyzab\") == 351\n assert candidate(s = \"abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghij\") == 55\n assert candidate(s = \"abababababababababababababababababababab\") == 3\n assert candidate(s = \"abcdefgabcdefgabcdefgabcdefg\") == 28\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == 3055\n assert candidate(s = \"abcdzabcde\") == 21\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzaabcdefghijklmnopqrstuvwxyzab\") == 403\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == 351\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyza\") == 377\n assert candidate(s = \"zzzzzzzzzz\") == 1\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\") == 2379\n assert candidate(s = \"qpqrstuvwxyzabcdefghijklmno\") == 351\n assert candidate(s = \"xyzabcdezyxabcdezyxabcdezyxabcdezyxabcdezyxabcdezyx\") == 36\n assert candidate(s = \"aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnooooppppqqqqrrrrssssttttuuuuvvvvwwwwxxxxyyyyzzzz\") == 51\n assert candidate(s = \"xyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyzxyz\") == 6\n assert candidate(s = \"qpqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == 27\n assert candidate(s = \"abcdabcdeabcdefabcdefgabcdefg\") == 28\n assert candidate(s = \"abcdzabcdezabcdefzabcdefgzabcdefgz\") == 36\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == 351\n assert candidate(s = \"mnopqrstuvwxyzabcdefghijklmnop\") == 455\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == 351\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 51\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == 351\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(s = \"xyzabcdefghijklmnopqrstuvwxyz\") == 429\n assert candidate(s = \"xyzabc\") == 21\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 1\n", "comparison": "exact"}, "public_tests": ["\"a\"", "\"cac\"", "\"zab\""], "hints": ["One possible solution might be to consider allocating an array size of 26 for each character in the alphabet. (Credits to @r2ysxu)"], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().findSubstringInWraproundString", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:14+00:00", "tests_total": 66, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def find_substring_in_wrapround_string(s)", "container": null, "callable": "find_substring_in_wrapround_string", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 468, "task_id": "validate-ip-address", "difficulty": "Medium", "problem_description": "Given a string queryIP, return \"IPv4\" if IP is a valid IPv4 address, \"IPv6\" if IP is a valid IPv6 address or \"Neither\" if IP is not a correct IP of any type.\n\nA valid IPv4 address is an IP in the form \"x_1.x_2.x_3.x_4\" where 0 <= x_i <= 255 and x_i cannot contain leading zeros. For example, \"192.168.1.1\" and \"192.168.1.0\" are valid IPv4 addresses while \"192.168.01.1\", \"192.168.1.00\", and \"192.168@1.1\" are invalid IPv4 addresses.\n\nA valid IPv6 address is an IP in the form \"x_1:x_2:x_3:x_4:x_5:x_6:x_7:x_8\" where:\n\n- 1 <= x_i.length <= 4\n- x_i is a hexadecimal string which may contain digits, lowercase English letter ('a' to 'f') and upper-case English letters ('A' to 'F').\n- Leading zeros are allowed in x_i.\n\nFor example, \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\" and \"2001:db8:85a3:0:0:8A2E:0370:7334\" are valid IPv6 addresses, while \"2001:0db8:85a3::8A2E:037j:7334\" and \"02001:0db8:85a3:0000:0000:8a2e:0370:7334\" are invalid IPv6 addresses.\n\nExample 1:\n\nInput: queryIP = \"172.16.254.1\"\nOutput: \"IPv4\"\nExplanation: This is a valid IPv4 address, return \"IPv4\".\n\nExample 2:\n\nInput: queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334\"\nOutput: \"IPv6\"\nExplanation: This is a valid IPv6 address, return \"IPv6\".\n\nExample 3:\n\nInput: queryIP = \"256.256.256.256\"\nOutput: \"Neither\"\nExplanation: This is neither a IPv4 address nor a IPv6 address.\n\nConstraints:\n\n- queryIP consists only of English letters, digits and the characters '.' and ':'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(queryIP = \"192.168.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:DB8:85A3:0:0:8A2E:370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:733\") == \"IPv6\"\n assert candidate(queryIP = \"123.456.789.01\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:4567890:abcd\") == \"Neither\"\n assert candidate(queryIP = \"172.16.254.1\") == \"IPv4\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:1234\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:012:345\") == \"IPv6\"\n assert candidate(queryIP = \"0000:0000:0000:0000:0000:0000:0000:0000\") == \"IPv6\"\n assert candidate(queryIP = \"123.456.789.abc\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:extra\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:45678:abcd\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:4567890abcd\") == \"Neither\"\n assert candidate(queryIP = \"255.255.255.255\") == \"IPv4\"\n assert candidate(queryIP = \"1.2.3.256\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.0123\") == \"Neither\"\n assert candidate(queryIP = \"123.45.67.256\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.012\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:abcd\") == \"Neither\"\n assert candidate(queryIP = \"0db8:85a3:0:0:8A2E:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:db8:85a3:8d3:1319:8a2e:370:7348\") == \"IPv6\"\n assert candidate(queryIP = \"123.45.67\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:4567890\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.256\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:8A2E:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"0:0:0:0:0:0:0:0\") == \"IPv6\"\n assert candidate(queryIP = \"1.2.3\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8A2E:0370\") == \"Neither\"\n assert candidate(queryIP = \"123.45.67.89\") == \"IPv4\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334g\") == \"Neither\"\n assert candidate(queryIP = \"256.256.256.256\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:5678\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.00\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:db8::8a2e:370:7334\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:45678901abcd\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:012:345:678:901\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8::85a3:0:0:8A2E:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:def0\") == \"IPv6\"\n assert candidate(queryIP = \"123.45.67.89.01\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:456789\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:012:345:678:901:234\") == \"IPv6\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:037g:7334\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.00\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:1234\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1\") == \"IPv4\"\n assert candidate(queryIP = \"192.168.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370\") == \"Neither\"\n assert candidate(queryIP = \"::\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.a\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"0db8:85a3:0000:0000:8a2e:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8A2E:0370:7334:1234\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:01234:4567\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.01234\") == \"Neither\"\n assert candidate(queryIP = \"192.168.01.1\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:012:345:678:901:2345\") == \"IPv6\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:00:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:733g\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:4567:abcd\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3::0:8A2E:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.012345\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:012:345678\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.0000\") == \"Neither\"\n assert candidate(queryIP = \"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\") == \"IPv6\"\n assert candidate(queryIP = \"1.2.3.4.5\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:G334\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.123.456\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:4567\") == \"IPv6\"\n assert candidate(queryIP = \"2001:db8:85a3::8a2e:370:7334\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789.0\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:45678\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:4567abcd\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:1234\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:45678901:abcd\") == \"Neither\"\n assert candidate(queryIP = \"02001:0db8:85a3:0000:0000:8a2e:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:012:3456\") == \"IPv6\"\n assert candidate(queryIP = \"2001:db8::1\") == \"Neither\"\n assert candidate(queryIP = \"123.456.789\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:456789:abcd\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3::8A2E:037j:7334\") == \"Neither\"\n assert candidate(queryIP = \"0.0.0.0\") == \"IPv4\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:0123:45678901\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:73345\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8::\") == \"Neither\"\n assert candidate(queryIP = \"123:456:789:0123:456:789:012:34567\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:000g\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8a2e:0370:7334:\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8::85a3:0:0:8A2E:370:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:733G\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334::\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3::8A2E:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:00000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:733g\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:abcd\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1:\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:def0:1234\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"192.168.256.1\") == \"Neither\"\n assert candidate(queryIP = \"256.192.168.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3::8a2e:370:7334\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:733g\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8a2e:0370:7334:abcd\") == \"Neither\"\n assert candidate(queryIP = \"abcd:efgh:ijkl:mnop:qrst:uvwx:yza:12345\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.abc\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:12345\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:000g\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3::8A2E:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"a.192.168.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:00000\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8a2e:0370:7334:extra\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:0000:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334:7334:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:00000\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.a\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334::1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3::\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:000g\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:abz\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:extra\") == \"Neither\"\n assert candidate(queryIP = \"192.168.0.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000:0000:0000:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:73340\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:00000\") == \"Neither\"\n assert candidate(queryIP = \"2001:DB8:85A3:0:0:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"::ffff:192.168.1.1:1\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:0000\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:def0::1::\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"abcd:efgh:ijkl:mnop:qrst:uvwx:yza:1234\") == \"Neither\"\n assert candidate(queryIP = \"192.168.a.1.1\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.00\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:00000\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1::ffff\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:0000:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:000g\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.01.1\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.256\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:7334:\") == \"Neither\"\n assert candidate(queryIP = \"123.045.678.901\") == \"Neither\"\n assert candidate(queryIP = \"256.255.255.255\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.001\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.01\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.01.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:abG\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0000:0000:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8a2e:0370:73g4\") == \"Neither\"\n assert candidate(queryIP = \"0123.456.789.012\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:1:2:3:4:56789\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1a\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:extra\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000:0000:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:0000:000g\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:abcd\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334::7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"1200::AB00:1234::2552:7777:1313\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334::\") == \"Neither\"\n assert candidate(queryIP = \"192.a.168.1.1\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:def0::1\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1::1\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1::ffff:\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:00000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8a2e:0370\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.0.2.128\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:0000:00000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0DB8:85A3:0000:0000:8A2E:0370:7334\") == \"IPv6\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:abg\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:def0:1234:5678:9abc:def0\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334:7334:7334:7334:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334:000g\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1::\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:000G\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:000g\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"abcd:efgh:ijkl:mnop:qrst:uvwx:yza:\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:def0::\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:256.256.256.256\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.a.1\") == \"Neither\"\n assert candidate(queryIP = \"abcd:efgh:ijkl:mnop:qrst:uvwx:yza:1234:1234\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3::8A2E:0370:7334:\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"::ffff:192.168.1.1a\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.0000\") == \"Neither\"\n assert candidate(queryIP = \"192.256.168.1\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2e:0370:7334:0000::\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:0370:7334::\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0000:0000:8a2g:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:0000:000g\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3::8a2e:0370:7334\") == \"Neither\"\n assert candidate(queryIP = \"01.02.03.04\") == \"Neither\"\n assert candidate(queryIP = \"2001:db8:85a3:0:0:8A2E:370:7334:7334:7334:7334:7334:7334:7334:7334\") == \"Neither\"\n assert candidate(queryIP = \"1234:5678:9abc:def0:1234:5678:9abc:defg\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334:0000:0000:0000:0000:0000\") == \"Neither\"\n assert candidate(queryIP = \"2001:0db8:85a3:0:0:8A2E:0370:7334::\") == \"Neither\"\n assert candidate(queryIP = \"192.168.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1\") == \"Neither\"\n assert candidate(queryIP = \"::1\") == \"Neither\"\n", "comparison": "exact"}, "public_tests": ["\"172.16.254.1\"", "\"2001:0db8:85a3:0:0:8A2E:0370:7334\"", "\"256.256.256.256\""], "hints": [], "metadata": {"canonical_parameter_names": ["queryIP"], "leetcode_dataset_entry_point": "Solution().validIPAddress", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:17+00:00", "tests_total": 243, "tests_dropped": 7, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def valid_ip_address(query_ip)", "container": null, "callable": "valid_ip_address", "parameters": [{"name": "query_ip", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 472, "task_id": "concatenated-words", "difficulty": "Hard", "problem_description": "Given an array of strings words (without duplicates), return all the concatenated words in the given list of words.\n\nA concatenated word is defined as a string that is comprised entirely of at least two shorter words (not necessarily distinct) in the given array.\n\nExample 1:\n\nInput: words = [\"cat\",\"cats\",\"catsdogcats\",\"dog\",\"dogcatsdog\",\"hippopotamuses\",\"rat\",\"ratcatdogcat\"]\nOutput: [\"catsdogcats\",\"dogcatsdog\",\"ratcatdogcat\"]\nExplanation: \"catsdogcats\" can be concatenated by \"cats\", \"dog\" and \"cats\";\n\"dogcatsdog\" can be concatenated by \"dog\", \"cats\" and \"dog\";\n\"ratcatdogcat\" can be concatenated by \"rat\", \"cat\", \"dog\" and \"cat\".\n\nExample 2:\n\nInput: words = [\"cat\",\"dog\",\"catdog\"]\nOutput: [\"catdog\"]\n\nConstraints:\n\n- 1 <= words.length <= 10^4\n- 1 <= words[i].length <= 30\n- words[i] consists of only lowercase English letters.\n- All the strings of words are unique.\n- 1 <= sum(words[i].length) <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['hello', 'world', 'helloworld', 'worldhello']) == ['helloworld', 'worldhello']\n assert candidate(words = ['apple', 'banana', 'appbanana', 'banapple', 'app', 'ban']) == ['banapple', 'appbanana']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == ['aa', 'aaa', 'aaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']\n assert candidate(words = ['cat', 'dog', 'catdog']) == ['catdog']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa', 'aaaaa']) == ['aa', 'aaa', 'aaaa', 'aaaaa']\n assert candidate(words = ['fish', 'dog', 'cat', 'dogfishcat']) == ['dogfishcat']\n assert candidate(words = ['a', 'aa', 'aaa', 'aaaa']) == ['aa', 'aaa', 'aaaa']\n assert candidate(words = ['word', 'world', 'wordworld', 'worldword', 'wordworldword']) == ['wordworld', 'worldword', 'wordworldword']\n assert candidate(words = ['apple', 'banana', 'applepie', 'apples', 'pineapple', 'pine', 'pie']) == ['applepie', 'pineapple']\n assert candidate(words = ['ab', 'abc', 'abcd', 'abcde', 'abcdef']) == []\n assert candidate(words = ['cat', 'cats', 'catsdogcats', 'dog', 'dogcatsdog', 'hippopotamuses', 'rat', 'ratcatdogcat']) == ['dogcatsdog', 'catsdogcats', 'ratcatdogcat']\n assert candidate(words = ['hello', 'world', 'helloworld']) == ['helloworld']\n assert candidate(words = ['apple', 'banana', 'appbanana', 'banapple']) == []\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananasplit', 'applesplit', 'splitbananaapple']) == ['applebanana']\n assert candidate(words = ['a', 'b', 'ab', 'abc', 'bc', 'abcd']) == ['ab', 'abc']\n assert candidate(words = ['one', 'two', 'three', 'onetwo', 'twotwo', 'twoone', 'onetwothree', 'threetwoone', 'onetwoonetwo', 'twoonetwoone', 'onethree', 'threeone', 'onethreeone', 'threeoneone', 'threeonetwo', 'twothreeone', 'onetwothreeone', 'onetwoonetwothree']) == ['onetwo', 'twotwo', 'twoone', 'onethree', 'threeone', 'onetwothree', 'threetwoone', 'onethreeone', 'threeoneone', 'threeonetwo', 'twothreeone', 'onetwoonetwo', 'twoonetwoone', 'onetwothreeone', 'onetwoonetwothree']\n assert candidate(words = ['car', 'race', 'racecar', 'carrace', 'racecarrace', 'racecarcar']) == ['racecar', 'carrace', 'racecarcar', 'racecarrace']\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananaapple', 'grape', 'pineapple', 'pineappleapple', 'applegrapebanana']) == ['applebanana', 'bananaapple', 'pineappleapple', 'applegrapebanana']\n assert candidate(words = ['red', 'blue', 'green', 'redblue', 'bluegreen', 'greenred', 'redgreengreen', 'blueredblueblue', 'greenredblue']) == ['redblue', 'greenred', 'bluegreen', 'greenredblue', 'redgreengreen', 'blueredblueblue']\n assert candidate(words = ['base', 'ball', 'baseball', 'ballbase', 'baseballbase', 'basebaseball', 'baseballball', 'baseballbaseball']) == ['baseball', 'ballbase', 'baseballbase', 'basebaseball', 'baseballball', 'baseballbaseball']\n assert candidate(words = ['sun', 'moon', 'sunny', 'moonlight', 'sunmoon', 'moonsun', 'sunnyday', 'moonlightnight', 'sunmoonlight']) == ['sunmoon', 'moonsun', 'sunmoonlight']\n assert candidate(words = ['one', 'two', 'three', 'onetwo', 'twotwo', 'threeone', 'onetwothree', 'twothreeone', 'threeonetwo', 'onetwothreeone']) == ['onetwo', 'twotwo', 'threeone', 'onetwothree', 'twothreeone', 'threeonetwo', 'onetwothreeone']\n assert candidate(words = ['hello', 'world', 'helloworld', 'worldhello', 'hellohello', 'worldworld', 'hellohellohello', 'worldworldworld']) == ['helloworld', 'worldhello', 'hellohello', 'worldworld', 'hellohellohello', 'worldworldworld']\n assert candidate(words = ['hello', 'world', 'helloworld', 'worldhello', 'hellohello', 'worldworld', 'helloworldhello', 'worldhelloworld']) == ['helloworld', 'worldhello', 'hellohello', 'worldworld', 'helloworldhello', 'worldhelloworld']\n assert candidate(words = ['ab', 'abc', 'ababc', 'abcabc', 'aabbcc', 'aabbaabb']) == ['ababc', 'abcabc']\n assert candidate(words = ['short', 'long', 'shortlong', 'longshort', 'shortshortlong', 'longlongshort', 'shortlongshort', 'longshortlong']) == ['shortlong', 'longshort', 'longlongshort', 'longshortlong', 'shortshortlong', 'shortlongshort']\n assert candidate(words = ['prefix', 'suffix', 'prefixsuffix', 'suffixprefix', 'prefixprefix', 'suffixsuffix', 'prefixprefixsuffix', 'suffixprefixprefix']) == ['prefixsuffix', 'suffixprefix', 'prefixprefix', 'suffixsuffix', 'prefixprefixsuffix', 'suffixprefixprefix']\n assert candidate(words = ['prefix', 'suffix', 'prefixsuffix', 'suffixprefix', 'prefixsuffixprefix', 'suffixprefixsuffix', 'prefixsuffixsuffixprefix', 'suffixprefixprefixsuffix']) == ['prefixsuffix', 'suffixprefix', 'prefixsuffixprefix', 'suffixprefixsuffix', 'prefixsuffixsuffixprefix', 'suffixprefixprefixsuffix']\n assert candidate(words = ['cat', 'dog', 'catdog', 'dogcat', 'bird', 'catdogbird', 'dogcatbird', 'catbird', 'birdcat', 'dogdogcat', 'catcatdog', 'dogcatdog', 'catdogcat', 'birdbird', 'catbirdcat', 'dogcatdogcat', 'birdcatdogbird']) == ['catdog', 'dogcat', 'catbird', 'birdcat', 'birdbird', 'dogdogcat', 'catcatdog', 'dogcatdog', 'catdogcat', 'catdogbird', 'dogcatbird', 'catbirdcat', 'dogcatdogcat', 'birdcatdogbird']\n assert candidate(words = ['short', 'longer', 'longerword', 'wordlonger', 'shortword', 'wordshort', 'shortshortshort', 'longerlongerlonger']) == ['shortshortshort', 'longerlongerlonger']\n assert candidate(words = ['prefix', 'suffix', 'prefixsuffix', 'suffixprefix', 'prefixsuffixprefix', 'suffixprefixsuffix', 'prefixsuffixsuffixprefix', 'prefixprefixsuffix', 'suffixsuffixprefix']) == ['prefixsuffix', 'suffixprefix', 'prefixsuffixprefix', 'suffixprefixsuffix', 'prefixprefixsuffix', 'suffixsuffixprefix', 'prefixsuffixsuffixprefix']\n assert candidate(words = ['aaaa', 'aaaab', 'aaaaba', 'aaaabaaa', 'aaaabaaaa', 'aaaaa', 'aaaaaa', 'aaaaaaa', 'aaaaaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']) == ['aaaaaaaa', 'aaaabaaaa', 'aaaaaaaaa', 'aaaaaaaaaa']\n assert candidate(words = ['red', 'blue', 'redblue', 'bluered', 'redbluered', 'blueredblue', 'redredblue', 'blueredred']) == ['redblue', 'bluered', 'redbluered', 'redredblue', 'blueredred', 'blueredblue']\n assert candidate(words = ['ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij', 'abcdefghijk', 'abcdefghijkl', 'abcdefghijklm']) == []\n assert candidate(words = ['a', 'b', 'ab', 'ba', 'aba', 'baba', 'abab', 'bababa', 'abababa', 'babababa']) == ['ab', 'ba', 'aba', 'baba', 'abab', 'bababa', 'abababa', 'babababa']\n assert candidate(words = ['abcd', 'bcde', 'cdef', 'defg', 'efgh', 'fghi', 'ghij', 'hijk', 'ijkl', 'jklm', 'klmn', 'lmno', 'mnop', 'nopq', 'opqr', 'pqrs', 'qrst', 'rstu', 'stuv', 'tuvw', 'uvwx', 'vwxy', 'wxyz', 'xyz', 'mnopqr', 'qrstuv', 'vwxyz', 'mnopqrstuv', 'mnopqrstuvwxy', 'nopqrstuvwxyz']) == ['mnopqrstuv', 'nopqrstuvwxyz']\n assert candidate(words = ['tiny', 'medium', 'mediumtiny', 'tinytiny', 'tinymedium', 'mediummedium', 'mediumtinytiny', 'tinytinytiny', 'tinytinytinytiny', 'tinytinytinytinytiny']) == ['tinytiny', 'mediumtiny', 'tinymedium', 'mediummedium', 'tinytinytiny', 'mediumtinytiny', 'tinytinytinytiny', 'tinytinytinytinytiny']\n assert candidate(words = ['word', 'concatenate', 'wordconcatenate', 'concatenateword', 'wordconcatenateword', 'wordwordconcatenate', 'concatenatethree', 'concatenateconcatenate', 'wordconcatenateconcatenate']) == ['wordconcatenate', 'concatenateword', 'wordconcatenateword', 'wordwordconcatenate', 'concatenateconcatenate', 'wordconcatenateconcatenate']\n assert candidate(words = ['alpha', 'beta', 'alphabeta', 'betabeta', 'betaalpha', 'alphabetabet', 'alphaalphabeta', 'betaalphabeta']) == ['betabeta', 'alphabeta', 'betaalpha', 'betaalphabeta', 'alphaalphabeta']\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananaapple', 'appleapplebanana', 'bananabananaapple']) == ['applebanana', 'bananaapple', 'appleapplebanana', 'bananabananaapple']\n assert candidate(words = ['aabb', 'bbaa', 'aabbcc', 'ccaabb', 'aabbaa', 'aabbccaabb', 'aabbaabbcc', 'ccccaabbaabb', 'bbccccaabbaabb', 'aabbcccaabbcccaabb']) == ['aabbccaabb', 'aabbaabbcc']\n assert candidate(words = ['one', 'two', 'three', 'onetwo', 'twotwo', 'threetwo', 'onethree', 'twothree', 'threethree', 'onetwothree', 'twothreeone', 'threetwoone', 'onetwoonetwo', 'twotwoonetwo', 'threethreethree', 'onetwothreeonetwo', 'twothreeonethree', 'threetwooneonetwo', 'onetwoonetwoonetwo']) == ['onetwo', 'twotwo', 'threetwo', 'onethree', 'twothree', 'threethree', 'onetwothree', 'twothreeone', 'threetwoone', 'onetwoonetwo', 'twotwoonetwo', 'threethreethree', 'twothreeonethree', 'onetwothreeonetwo', 'threetwooneonetwo', 'onetwoonetwoonetwo']\n assert candidate(words = ['tiny', 'small', 'tinysmall', 'smallsmall', 'tinytiny', 'tinysmalltiny']) == ['tinytiny', 'tinysmall', 'smallsmall', 'tinysmalltiny']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'abcdefg', 'abcdefabc', 'abcabcabc']) == ['abcdef', 'defabc', 'abcdefabc', 'abcabcabc']\n assert candidate(words = ['prefix', 'suffix', 'prefixsuffix', 'suffixprefix', 'prefixsuffixprefix', 'suffixprefixsuffix', 'prefixsuffixprefixsuffix']) == ['prefixsuffix', 'suffixprefix', 'prefixsuffixprefix', 'suffixprefixsuffix', 'prefixsuffixprefixsuffix']\n assert candidate(words = ['aabb', 'bbaa', 'ab', 'ba', 'aabbab', 'baabaa', 'bbaabb', 'aabbaa', 'ababab', 'babaab', 'abbaba', 'bababb', 'aabbaabb', 'bbaabaab']) == ['aabbab', 'ababab', 'babaab', 'abbaba', 'aabbaabb', 'bbaabaab']\n assert candidate(words = ['one', 'two', 'three', 'onetwo', 'twotwo', 'onetwothree', 'threethreeone', 'onetwothreeone']) == ['onetwo', 'twotwo', 'onetwothree', 'threethreeone', 'onetwothreeone']\n assert candidate(words = ['aabb', 'abab', 'bbaa', 'aabbaa', 'ababaa', 'baaabb', 'aabbab', 'bbaaab', 'aabbba', 'abababab', 'baabbaab', 'aabbaaba']) == ['abababab']\n assert candidate(words = ['abc', 'def', 'gh', 'abcdefgh', 'defgh', 'abcdefg', 'abcdefghi', 'abcdefghij', 'abcdefghijk']) == ['defgh', 'abcdefgh']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'abcabcabc', 'defdefdef', 'abcdefabcdef']) == ['abcdef', 'defabc', 'abcabcabc', 'defdefdef', 'abcdefabcdef']\n assert candidate(words = ['hello', 'world', 'helloworld', 'worldhello', 'hellotest', 'testhello', 'hellotesthello']) == ['helloworld', 'worldhello', 'hellotesthello']\n assert candidate(words = ['apple', 'apples', 'banana', 'bananas', 'applesandbananas', 'bananaapple']) == ['bananaapple']\n assert candidate(words = ['hello', 'world', 'helloworld', 'hellohello', 'worldworldhello']) == ['helloworld', 'hellohello', 'worldworldhello']\n assert candidate(words = ['one', 'onel', 'oneone', 'two', 'twotwo', 'onetwo', 'twotwoone', 'onetwoone', 'twoonetwo', 'onetwotwo', 'twoonetwotwo', 'onetwoonetwoone']) == ['oneone', 'twotwo', 'onetwo', 'twotwoone', 'onetwoone', 'twoonetwo', 'onetwotwo', 'twoonetwotwo', 'onetwoonetwoone']\n assert candidate(words = ['one', 'two', 'onetwo', 'twotwo', 'twoone', 'onetwoone', 'twoonetwo', 'onetwoonetwo']) == ['onetwo', 'twotwo', 'twoone', 'onetwoone', 'twoonetwo', 'onetwoonetwo']\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananaapple', 'grape', 'grapeapple', 'pineapple']) == ['grapeapple', 'applebanana', 'bananaapple']\n assert candidate(words = ['happy', 'sad', 'happysad', 'sadhappy', 'happyhappy', 'sadsad', 'happyhappysad', 'sadhappyhappy', 'happysadsad']) == ['sadsad', 'happysad', 'sadhappy', 'happyhappy', 'happysadsad', 'happyhappysad', 'sadhappyhappy']\n assert candidate(words = ['apple', 'banana', 'peach', 'applepie', 'bananapeach', 'peachapple']) == ['peachapple', 'bananapeach']\n assert candidate(words = ['prefix', 'suffix', 'prefixsuffix', 'suffixprefix', 'prefixprefix', 'suffixsuffix', 'prefixsuffixprefix', 'suffixprefixsuffix']) == ['prefixsuffix', 'suffixprefix', 'prefixprefix', 'suffixsuffix', 'prefixsuffixprefix', 'suffixprefixsuffix']\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananasplit', 'split', 'applebananasplit']) == ['applebanana', 'bananasplit', 'applebananasplit']\n assert candidate(words = ['abc', 'ab', 'bc', 'abcabc', 'abcab', 'ababc', 'aabbc', 'abcababc']) == ['abcab', 'ababc', 'abcabc', 'abcababc']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'abcdefdef', 'abcabcabc']) == ['abcdef', 'defabc', 'abcdefdef', 'abcabcabc']\n assert candidate(words = ['quick', 'brown', 'fox', 'quickbrown', 'brownfox', 'foxquick', 'quickbrownfox', 'brownfoxquick']) == ['brownfox', 'foxquick', 'quickbrown', 'quickbrownfox', 'brownfoxquick']\n assert candidate(words = ['tiny', 'small', 'tinytiny', 'tinysmall', 'smalltiny', 'smallsmall', 'tinytinysmall', 'tinytinysmalltiny', 'smallsml', 'tinysmalltinytiny', 'smalltinytiny', 'tinytinytiny', 'tinysmallsmallsml']) == ['tinytiny', 'tinysmall', 'smalltiny', 'smallsmall', 'tinytinytiny', 'tinytinysmall', 'smalltinytiny', 'tinytinysmalltiny', 'tinysmalltinytiny', 'tinysmallsmallsml']\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananaapple', 'appleapplebanana']) == ['applebanana', 'bananaapple', 'appleapplebanana']\n assert candidate(words = ['hello', 'world', 'helloworld', 'worldhello', 'hellohello', 'worldworld']) == ['helloworld', 'worldhello', 'hellohello', 'worldworld']\n assert candidate(words = ['repeat', 'repeated', 'repeatrepeat', 'repeatedrepeat', 'repeatrepeatedrepeat', 'repeatedrepeatrepeatedrepeat', 'repeatedrepeated', 'repeatrepeatrepeat']) == ['repeatrepeat', 'repeatedrepeat', 'repeatedrepeated', 'repeatrepeatrepeat', 'repeatrepeatedrepeat', 'repeatedrepeatrepeatedrepeat']\n assert candidate(words = ['cat', 'cats', 'catsdogcats', 'dog', 'dogcatsdog', 'hippopotamuses', 'rat', 'ratcatdogcat', 'hippo', 'popo', 'hippopop']) == ['dogcatsdog', 'catsdogcats', 'ratcatdogcat']\n assert candidate(words = ['hello', 'world', 'helloworld', 'hellohello', 'worldworld', 'hellohelloworld']) == ['helloworld', 'hellohello', 'worldworld', 'hellohelloworld']\n assert candidate(words = ['sun', 'moon', 'sunmoon', 'moonsun', 'sunsunmoon', 'moonmoonsun', 'sunmoonsunsun']) == ['sunmoon', 'moonsun', 'sunsunmoon', 'moonmoonsun', 'sunmoonsunsun']\n assert candidate(words = ['one', 'two', 'three', 'onetwo', 'twotwo', 'onethree', 'threeone', 'onetwothree', 'twothreeone']) == ['onetwo', 'twotwo', 'onethree', 'threeone', 'onetwothree', 'twothreeone']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'ghijkl', 'mnop', 'mnopqrst', 'qrst', 'mnopqrstmnopqrst', 'nopqrst', 'nopqr', 'mnopq']) == ['abcdef', 'defabc', 'mnopqrst', 'mnopqrstmnopqrst']\n assert candidate(words = ['red', 'blue', 'green', 'redblue', 'bluegreen', 'greenred', 'redbluegreen', 'bluegreenred', 'greenredblue', 'redgreenred', 'bluegreenblue', 'greenredgreen', 'redgreenbluegreen', 'bluegreenredblue', 'greenredbluegreenred']) == ['redblue', 'greenred', 'bluegreen', 'redgreenred', 'redbluegreen', 'bluegreenred', 'greenredblue', 'bluegreenblue', 'greenredgreen', 'bluegreenredblue', 'redgreenbluegreen', 'greenredbluegreenred']\n assert candidate(words = ['base', 'ball', 'baseball', 'ballbase', 'baseballbase', 'ballbaseball', 'baseballball', 'baseballbaseball']) == ['baseball', 'ballbase', 'baseballbase', 'ballbaseball', 'baseballball', 'baseballbaseball']\n assert candidate(words = ['one', 'two', 'three', 'onetwo', 'twothree', 'threeone', 'onetwothree', 'twothreeone', 'threeonetwo']) == ['onetwo', 'twothree', 'threeone', 'onetwothree', 'twothreeone', 'threeonetwo']\n assert candidate(words = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'abcdefghijklmnopqrstuvwxyz']) == ['abcdefghijklmnopqrstuvwxyz']\n assert candidate(words = ['apple', 'banana', 'applebanana', 'bananapple', 'bananaapplebanana']) == ['applebanana', 'bananaapplebanana']\n assert candidate(words = ['small', 'medium', 'large', 'smallmedium', 'mediumlarge', 'largesmall', 'smallmediumlarge', 'mediumlargesmall', 'largesmallmedium', 'smallmediumlargesmall']) == ['largesmall', 'smallmedium', 'mediumlarge', 'smallmediumlarge', 'mediumlargesmall', 'largesmallmedium', 'smallmediumlargesmall']\n assert candidate(words = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij', 'abcdefghijk', 'abcdefghijkl', 'abcdefghijklm', 'abcdefghijklmn', 'abcdefghijklmno', 'abcdefghijklmnop', 'abcdefghijklmnopq', 'abcdefghijklmnopqr', 'abcdefghijklmnopqrs', 'abcdefghijklmnopqrst', 'abcdefghijklmnopqrstu', 'abcdefghijklmnopqrstuv', 'abcdefghijklmnopqrstuvw', 'abcdefghijklmnopqrstuvwx', 'abcdefghijklmnopqrstuvwxy', 'abcdefghijklmnopqrstuvwxyz']) == []\n assert candidate(words = ['bat', 'ball', 'batball', 'ballbat', 'batbatbat', 'ballballball', 'batballbat']) == ['batball', 'ballbat', 'batbatbat', 'batballbat', 'ballballball']\n assert candidate(words = ['partone', 'parttwo', 'partthree', 'onetwo', 'twothree', 'onetwothree', 'threeonetwo', 'twopartone', 'threeparttwo', 'onetwothreeonetwo']) == ['onetwothreeonetwo']\n assert candidate(words = ['x', 'xx', 'xxx', 'xxxx', 'xxxxx', 'xxxxxx', 'xxxxxxx', 'xxxxxxxx', 'xxxxxxxxx', 'xxxxxxxxxx']) == ['xx', 'xxx', 'xxxx', 'xxxxx', 'xxxxxx', 'xxxxxxx', 'xxxxxxxx', 'xxxxxxxxx', 'xxxxxxxxxx']\n assert candidate(words = ['alpha', 'beta', 'gamma', 'alphabeta', 'betagamma', 'alphagamma', 'betaalpha', 'gammaalpha', 'betagammabetagamma', 'gammabetagammaalpha']) == ['alphabeta', 'betagamma', 'betaalpha', 'alphagamma', 'gammaalpha', 'betagammabetagamma', 'gammabetagammaalpha']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'abcdefabc', 'abcabcabc', 'defdefdef', 'abcdefdef', 'defabcdef']) == ['abcdef', 'defabc', 'abcdefabc', 'abcabcabc', 'defdefdef', 'abcdefdef', 'defabcdef']\n assert candidate(words = ['apple', 'banana', 'appbanana', 'bananapple', 'applebananaapple']) == ['applebananaapple']\n assert candidate(words = ['sun', 'moon', 'star', 'sunset', 'moonlight', 'starlight', 'sunmoon', 'moonstar', 'sunmoonstar', 'moonstarsun']) == ['sunmoon', 'moonstar', 'sunmoonstar', 'moonstarsun']\n assert candidate(words = ['panda', 'bear', 'pandabear', 'bearpanda', 'pandapandabear', 'bearpandapanda', 'pandabearbear', 'bearbearpanda', 'pandapandapandabear', 'bearpandapandapanda']) == ['pandabear', 'bearpanda', 'pandabearbear', 'bearbearpanda', 'pandapandabear', 'bearpandapanda', 'pandapandapandabear', 'bearpandapandapanda']\n assert candidate(words = ['a', 'ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij', 'abcdefghijk', 'abcdefghijkl', 'abcdefghijklm', 'abcdefghijklmn', 'abcdefghijklmno', 'abcdefghijklmnop', 'abcdefghijklmnopq', 'abcdefghijklmnopqr', 'abcdefghijklmnopqrs', 'abcdefghijklmnopqrst']) == []\n assert candidate(words = ['abc', 'def', 'ghi', 'abcd', 'bcde', 'cdef', 'defg', 'efgh', 'fghi', 'ghij', 'hijk', 'ijkl', 'jklm', 'klmn', 'lmno', 'mnop', 'nopq', 'opqr', 'pqrs', 'qrst', 'rstu', 'stuv', 'tuvw', 'uvwxy', 'vwxyz', 'wxyzabc', 'xyzabcd', 'zabcde']) == []\n assert candidate(words = ['foo', 'bar', 'foobar', 'barfoo', 'foofoobar', 'barfoobaz', 'baz', 'foobazbar']) == ['foobar', 'barfoo', 'foofoobar', 'barfoobaz', 'foobazbar']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'ab', 'bc', 'de', 'f', 'abcd', 'cdef']) == ['def', 'abcdef', 'defabc']\n assert candidate(words = ['hello', 'world', 'helloworld', 'worldhello', 'hellohellohello', 'helloworldworld']) == ['helloworld', 'worldhello', 'hellohellohello', 'helloworldworld']\n assert candidate(words = ['apple', 'banana', 'cherry', 'applebanana', 'bananaapple', 'cherryapple', 'applecherry', 'bananaapplebanana']) == ['applebanana', 'bananaapple', 'cherryapple', 'applecherry', 'bananaapplebanana']\n assert candidate(words = ['abc', 'def', 'abcdef', 'defabc', 'fedcba', 'cab', 'bac', 'abcabc', 'defdef', 'ababab', 'defdefdef', 'abcdefgh', 'ghijklmn', 'opqrstuv', 'wxyz', 'abcdefghijk', 'lmnopqrstuv', 'wxyzabcd', 'efghijklmnopqr', 'stuvwxyzabcd']) == ['abcdef', 'defabc', 'abcabc', 'defdef', 'defdefdef']\n", "comparison": "exact"}, "public_tests": ["[\"cat\",\"cats\",\"catsdogcats\",\"dog\",\"dogcatsdog\",\"hippopotamuses\",\"rat\",\"ratcatdogcat\"]", "[\"cat\",\"dog\",\"catdog\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().findAllConcatenatedWordsInADict", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:24+00:00", "tests_total": 96, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "string", "dynamic-programming", "depth-first-search", "trie", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_all_concatenated_words_in_a_dict(words)", "container": null, "callable": "find_all_concatenated_words_in_a_dict", "parameters": [{"name": "words", "type": "String[]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 473, "task_id": "matchsticks-to-square", "difficulty": "Medium", "problem_description": "You are given an integer array matchsticks where matchsticks[i] is the length of the i^th matchstick. You want to use all the matchsticks to make one square. You should not break any stick, but you can link them up, and each matchstick must be used exactly one time.\n\nReturn true if you can make this square and false otherwise.\n\nExample 1:\n\nInput: matchsticks = [1,1,2,2,2]\nOutput: true\nExplanation: You can form a square with length 2, one side of the square came two sticks with length 1.\n\nExample 2:\n\nInput: matchsticks = [3,3,3,3,4]\nOutput: false\nExplanation: You cannot find a way to form a square with all the matchsticks.\n\nConstraints:\n\n- 1 <= matchsticks.length <= 15\n- 1 <= matchsticks[i] <= 10^8\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(matchsticks = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) == True\n assert candidate(matchsticks = [10, 10, 10, 10]) == True\n assert candidate(matchsticks = [5, 5, 5, 5]) == True\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == True\n assert candidate(matchsticks = [1, 3, 3, 3, 4]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 2, 2, 2, 2]) == True\n assert candidate(matchsticks = [1, 1, 2, 2, 2]) == True\n assert candidate(matchsticks = [1, 2, 3, 4, 5]) == False\n assert candidate(matchsticks = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 12]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 4, 4, 4, 4]) == True\n assert candidate(matchsticks = [3, 3, 3, 3, 4]) == False\n assert candidate(matchsticks = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]) == False\n assert candidate(matchsticks = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8]) == True\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(matchsticks = [2, 2, 2, 2, 2, 2, 2, 2]) == True\n assert candidate(matchsticks = [7, 7, 7, 7, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == False\n assert candidate(matchsticks = [10, 20, 30, 40, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(matchsticks = [1, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == False\n assert candidate(matchsticks = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == False\n assert candidate(matchsticks = [7, 8, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12]) == False\n assert candidate(matchsticks = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == False\n assert candidate(matchsticks = [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 80]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == False\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6]) == False\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 5]) == False\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 30]) == False\n assert candidate(matchsticks = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1]) == False\n assert candidate(matchsticks = [100000000, 100000000, 100000000, 100000000, 25000000, 25000000, 25000000, 25000000]) == True\n assert candidate(matchsticks = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]) == False\n assert candidate(matchsticks = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == False\n assert candidate(matchsticks = [15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1]) == False\n assert candidate(matchsticks = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8]) == True\n assert candidate(matchsticks = [2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 11, 12, 13, 14, 15]) == True\n assert candidate(matchsticks = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4]) == True\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5]) == False\n assert candidate(matchsticks = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) == True\n assert candidate(matchsticks = [10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(matchsticks = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 8]) == True\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 100]) == False\n assert candidate(matchsticks = [10, 10, 10, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2]) == False\n assert candidate(matchsticks = [100, 100, 100, 100, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25]) == False\n assert candidate(matchsticks = [100000000, 100000000, 100000000, 100000000, 25000000, 25000000, 25000000, 25000000, 25000000, 25000000, 25000000, 25000000, 25000000, 25000000, 25000000]) == False\n assert candidate(matchsticks = [100000000, 100000000, 100000000, 100000000, 1]) == False\n assert candidate(matchsticks = [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6]) == False\n assert candidate(matchsticks = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == False\n assert candidate(matchsticks = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 5]) == False\n assert candidate(matchsticks = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1]) == False\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == True\n assert candidate(matchsticks = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3]) == True\n assert candidate(matchsticks = [100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000, 100000000]) == False\n assert candidate(matchsticks = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == False\n assert candidate(matchsticks = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == True\n assert candidate(matchsticks = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4]) == False\n assert candidate(matchsticks = [10, 20, 30, 40, 10, 20, 30, 40]) == True\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 28]) == False\n assert candidate(matchsticks = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 1]) == False\n assert candidate(matchsticks = [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5]) == False\n assert candidate(matchsticks = [15, 15, 15, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 15]) == False\n assert candidate(matchsticks = [10, 20, 30, 40, 50, 15, 5, 25, 35]) == False\n assert candidate(matchsticks = [8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(matchsticks = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 32]) == False\n assert candidate(matchsticks = [15, 15, 15, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == False\n assert candidate(matchsticks = [100000000, 100000000, 100000000, 100000000]) == True\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1]) == False\n assert candidate(matchsticks = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 20]) == False\n assert candidate(matchsticks = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 1]) == False\n assert candidate(matchsticks = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1]) == False\n assert candidate(matchsticks = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 20]) == False\n assert candidate(matchsticks = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == True\n", "comparison": "exact"}, "public_tests": ["[1,1,2,2,2]", "[3,3,3,3,4]"], "hints": ["Treat the matchsticks as an array. Can we split the array into 4 equal parts?", "Every matchstick can belong to either of the 4 sides. We don't know which one. Maybe try out all options!", "For every matchstick, we have to try out each of the 4 options i.e. which side it can belong to. We can make use of recursion for this.", "We don't really need to keep track of which matchsticks belong to a particular side during recursion. We just need to keep track of the length of each of the 4 sides.", "When all matchsticks have been used we simply need to see the length of all 4 sides. If they're equal, we have a square on our hands!"], "metadata": {"canonical_parameter_names": ["matchsticks"], "leetcode_dataset_entry_point": "Solution().makesquare", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:26+00:00", "tests_total": 85, "tests_dropped": 4, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "backtracking", "bit-manipulation", "bitmask"]}, "language": "ruby", "interface": {"raw_signature": "def makesquare(matchsticks)", "container": null, "callable": "makesquare", "parameters": [{"name": "matchsticks", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 474, "task_id": "ones-and-zeroes", "difficulty": "Medium", "problem_description": "You are given an array of binary strings strs and two integers m and n.\n\nReturn the size of the largest subset of strs such that there are at most m 0's and n 1's in the subset.\n\nA set x is a subset of a set y if all elements of x are also elements of y.\n\nExample 1:\n\nInput: strs = [\"10\",\"0001\",\"111001\",\"1\",\"0\"], m = 5, n = 3\nOutput: 4\nExplanation: The largest subset with at most 5 0's and 3 1's is {\"10\", \"0001\", \"1\", \"0\"}, so the answer is 4.\nOther valid but smaller subsets include {\"0001\", \"1\"} and {\"10\", \"1\", \"0\"}.\n{\"111001\"} is an invalid subset because it contains 4 1's, greater than the maximum of 3.\n\nExample 2:\n\nInput: strs = [\"10\",\"0\",\"1\"], m = 1, n = 1\nOutput: 2\nExplanation: The largest subset is {\"0\", \"1\"}, so the answer is 2.\n\nConstraints:\n\n- 1 <= strs.length <= 600\n- 1 <= strs[i].length <= 100\n- strs[i] consists only of digits '0' and '1'.\n- 1 <= m, n <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(strs = ['0', '0', '1', '1'],m = 2,n = 2) == 4\n assert candidate(strs = ['111', '000', '101010'],m = 3,n = 3) == 2\n assert candidate(strs = ['10', '0', '1'],m = 1,n = 1) == 2\n assert candidate(strs = ['111', '000', '1010', '0101'],m = 3,n = 3) == 2\n assert candidate(strs = ['110', '100', '001'],m = 2,n = 2) == 1\n assert candidate(strs = ['110', '100', '010'],m = 2,n = 2) == 1\n assert candidate(strs = ['1', '10', '100', '1000'],m = 4,n = 4) == 3\n assert candidate(strs = ['111111', '000000'],m = 3,n = 3) == 0\n assert candidate(strs = ['1111', '1010', '0101', '0000'],m = 2,n = 2) == 1\n assert candidate(strs = ['111111', '000000', '101010', '010101'],m = 3,n = 3) == 1\n assert candidate(strs = ['11111010110010001111', '01001100001100111100', '00000110011101011010', '11010011000101000011', '10011001110100010100', '00110001011100100010', '01000101110110011101'],m = 34,n = 21) == 2\n assert candidate(strs = ['1100', '100001111000', '000000000000001010', '11111111111111111111', '100001111000', '100001111000'],m = 31,n = 12) == 3\n assert candidate(strs = ['00', '00'],m = 1,n = 1) == 0\n assert candidate(strs = ['1101', '1101', '0010', '0000'],m = 4,n = 4) == 2\n assert candidate(strs = ['10', '0001', '111001', '1', '0'],m = 5,n = 3) == 4\n assert candidate(strs = ['101010', '010101', '110011', '001100', '111000', '000111', '1111000000', '0000111111'],m = 10,n = 10) == 3\n assert candidate(strs = ['11111', '11100', '11010', '10110', '01110', '10011', '01011', '00111', '11110', '11001', '10101', '01101'],m = 9,n = 9) == 3\n assert candidate(strs = ['111000', '000111', '111100', '000011', '111111', '000000', '101010'],m = 5,n = 5) == 1\n assert candidate(strs = ['10101010', '01010101', '11110000', '00001111', '11001100', '00110011'],m = 8,n = 8) == 2\n assert candidate(strs = ['1111110', '1010101', '0101010', '0000000', '1111111', '1000001', '0011110'],m = 6,n = 6) == 1\n assert candidate(strs = ['1010101010', '0101010101', '1111111111', '0000000000'],m = 5,n = 5) == 1\n assert candidate(strs = ['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'],m = 10,n = 10) == 10\n assert candidate(strs = ['101', '0011', '1000', '1100', '0100', '0000'],m = 5,n = 5) == 2\n assert candidate(strs = ['1010101010', '0101010101', '1111100000', '0000011111', '1100110011'],m = 10,n = 10) == 2\n assert candidate(strs = ['1010101010', '0101010101', '1110000000', '0001111111', '1100110011', '0011001100', '1011000101', '0100111010', '1111000011', '0000111100'],m = 12,n = 12) == 2\n assert candidate(strs = ['110000', '001100', '101010', '010101', '111100', '000011', '101001'],m = 6,n = 6) == 2\n assert candidate(strs = ['1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0'],m = 10,n = 10) == 20\n assert candidate(strs = ['111111111', '000000000', '101010101', '010101010', '111000011', '000111100'],m = 7,n = 7) == 1\n assert candidate(strs = ['110', '100', '001', '100', '001', '001', '010', '101', '100', '001', '001', '100', '001', '101', '010', '101', '101', '010', '100', '001'],m = 6,n = 6) == 4\n assert candidate(strs = ['1110000', '0001111', '1100110', '0011001', '1011000', '0100111', '1000000', '0111111', '1101010', '0010101'],m = 10,n = 10) == 2\n assert candidate(strs = ['1111111111', '1111111111', '1111111111', '1111111111', '1111111111', '1111111111', '1111111111', '1111111111', '1111111111', '1111111111'],m = 5,n = 5) == 0\n assert candidate(strs = ['111110', '110101', '010110', '110001', '101000', '000011', '011101'],m = 6,n = 6) == 2\n assert candidate(strs = ['1100', '1010', '0011', '0101', '1111', '0000', '1000', '0111', '1101', '1011'],m = 6,n = 6) == 3\n assert candidate(strs = ['000000', '111111', '000000', '111111', '000000', '111111', '000000', '111111', '000000', '111111', '000000', '111111', '000000', '111111', '000000', '111111'],m = 8,n = 8) == 2\n assert candidate(strs = ['1010101', '0101010', '1110000', '0001111', '1100110', '0011001', '1011000', '0100111'],m = 6,n = 6) == 1\n assert candidate(strs = ['1001', '0110', '1010', '0011', '1111', '0000', '1100', '0010', '1000', '0100'],m = 5,n = 5) == 2\n assert candidate(strs = ['11111111', '10101010', '01010101', '00000000', '11000011', '00110011', '10001100'],m = 8,n = 8) == 2\n assert candidate(strs = ['111', '110', '101', '011', '100', '010', '001', '000', '1111', '0000', '1010', '0101'],m = 7,n = 7) == 4\n assert candidate(strs = ['1101010', '1010101', '0011001', '0100110', '1110000', '0001111'],m = 8,n = 8) == 2\n assert candidate(strs = ['111110', '000011', '101010', '010101', '111000', '000111'],m = 6,n = 6) == 2\n assert candidate(strs = ['0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1', '0', '1'],m = 12,n = 12) == 24\n assert candidate(strs = ['1111111111', '1111111111', '1111111111', '1111111111', '0000000000', '0000000000', '0000000000', '0000000000', '0000000000', '0000000000'],m = 5,n = 5) == 0\n assert candidate(strs = ['11000', '10011', '00100', '01101', '11111'],m = 5,n = 5) == 2\n assert candidate(strs = ['1111111111', '0000000000', '1010101010', '0101010101', '1110000111', '0001111000'],m = 8,n = 8) == 1\n assert candidate(strs = ['1100101', '0000000', '1010101', '1110111', '0001000'],m = 5,n = 5) == 1\n assert candidate(strs = ['1010101010', '0101010101', '1111000000', '0000111111', '1100110011', '0011001100'],m = 5,n = 5) == 1\n assert candidate(strs = ['101010101010101010', '010101010101010101', '111100000000000000', '000011111111111111', '110011001100110011', '001100110011001100'],m = 10,n = 10) == 1\n assert candidate(strs = ['11011', '10010', '01001', '10000', '00111', '01010', '10001'],m = 4,n = 4) == 1\n assert candidate(strs = ['001', '010', '100', '111', '000', '110', '011'],m = 3,n = 3) == 2\n assert candidate(strs = ['1010101010101010101010101010', '0101010101010101010101010101', '1111111111111111111111111111', '0000000000000000000000000000'],m = 10,n = 10) == 0\n assert candidate(strs = ['111100', '111000', '100000', '000111', '001010', '110101'],m = 6,n = 4) == 1\n assert candidate(strs = ['11001100', '00110011', '11110000', '00001111', '10101010', '01010101'],m = 8,n = 8) == 2\n assert candidate(strs = ['11001010', '00010101', '10101010', '00110011', '10111011', '01000100'],m = 6,n = 6) == 1\n assert candidate(strs = ['1101', '0110', '1010', '0010', '1111'],m = 4,n = 3) == 1\n assert candidate(strs = ['1111000000', '0000111100', '1100110000', '0011001100', '1010101000', '0101010100', '1110001100', '0001110011'],m = 10,n = 10) == 2\n assert candidate(strs = ['1101010', '0101110', '1010101', '0011010', '1110000', '0001111', '1111100', '0000011'],m = 8,n = 8) == 2\n assert candidate(strs = ['111000111', '000111000', '110011001', '001100110', '101010101'],m = 6,n = 5) == 1\n assert candidate(strs = ['11000', '01110', '00010', '10011', '00001'],m = 5,n = 5) == 2\n assert candidate(strs = ['1110101', '0001100', '1100011', '0101010', '0010101', '1011010'],m = 8,n = 8) == 2\n assert candidate(strs = ['10101', '01010', '11001', '00110', '11111', '00000'],m = 5,n = 5) == 2\n assert candidate(strs = ['11111111', '00000000', '11000000', '00111111', '10101010', '01010101'],m = 10,n = 10) == 2\n assert candidate(strs = ['1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1'],m = 10,n = 10) == 10\n assert candidate(strs = ['11111', '00000', '11000', '00111', '10101', '01010'],m = 4,n = 4) == 1\n assert candidate(strs = ['1111111111', '0000000000', '1111000000', '0000111111', '1110110011', '0001001100', '1011000101', '0100111010', '1111000011', '0000111100', '1010101010', '0101010101', '1101010010', '0010101101'],m = 10,n = 10) == 2\n assert candidate(strs = ['11111111', '00000000', '10101010', '01010101', '11001100', '00110011', '10010010', '01101101'],m = 10,n = 10) == 2\n assert candidate(strs = ['1111111111', '0000000000', '1100110011', '0011001100', '1010101010', '0101010101'],m = 8,n = 8) == 1\n assert candidate(strs = ['110000', '000011', '110000', '000011', '110000', '000011', '110000', '000011'],m = 6,n = 6) == 1\n assert candidate(strs = ['011101', '111111', '010101', '000001', '101011'],m = 5,n = 5) == 1\n assert candidate(strs = ['11110000', '00001111', '10101010', '01010101', '11001100', '00110011', '10011001', '01100110'],m = 8,n = 8) == 2\n assert candidate(strs = ['1001001', '0110110', '1111000', '0000111', '1010101', '0101010'],m = 6,n = 6) == 1\n assert candidate(strs = ['1110101', '1000110', '0111000', '0000111', '1010100', '0010011', '1001100'],m = 7,n = 7) == 1\n assert candidate(strs = ['11000', '10011', '01110', '00101', '10110', '11101'],m = 7,n = 7) == 2\n assert candidate(strs = ['111111', '000000', '111000', '000111', '101010', '010101', '110101'],m = 4,n = 5) == 1\n assert candidate(strs = ['1', '0', '11', '00', '10', '01', '1010', '0101'],m = 5,n = 5) == 6\n assert candidate(strs = ['101010101', '010101010', '111000000', '000111111', '110011001', '001100110', '100100100', '011011011'],m = 8,n = 8) == 1\n assert candidate(strs = ['111000', '000111', '110011', '010101', '101010'],m = 4,n = 4) == 1\n assert candidate(strs = ['1010101', '0101010', '1100110', '0011001', '1111000', '0000111'],m = 7,n = 7) == 2\n assert candidate(strs = ['111111', '000000', '110011', '010101', '101010', '001100', '110001', '000111'],m = 4,n = 4) == 1\n assert candidate(strs = ['1010101010', '0101010101', '1110000000', '0001111111', '1100110011', '0011001100', '1011000101', '0100111010', '1111000011', '0000111100', '1010101010', '0101010101'],m = 15,n = 15) == 3\n assert candidate(strs = ['11001100', '00110011', '10101010', '01010101', '11110000', '00001111', '10001000', '01110111'],m = 10,n = 10) == 2\n assert candidate(strs = ['101010101010', '010101010101', '111100000000', '000011111111', '110011001100', '001100110011'],m = 6,n = 6) == 1\n assert candidate(strs = ['10101010101010101010', '01010101010101010101', '11100000000000000000', '00011111111111111111', '11001100110011001100', '00110011001100110011', '10110001010101010101', '01001110101010101010', '11110000110000110000', '00001111001111001111'],m = 20,n = 20) == 2\n assert candidate(strs = ['010101010101', '101010101010', '111111000000', '000000111111', '110011001100'],m = 12,n = 12) == 2\n assert candidate(strs = ['1010101010', '0101010101', '1111000000', '0000111111', '1010101010', '0101010101', '1111000000', '0000111111'],m = 8,n = 8) == 1\n assert candidate(strs = ['110010', '010101', '100100', '111001', '001101', '110011'],m = 7,n = 6) == 2\n assert candidate(strs = ['110101', '101001', '001100', '111000', '000110'],m = 5,n = 5) == 1\n assert candidate(strs = ['110010', '1001', '110', '00010', '1'],m = 5,n = 4) == 3\n assert candidate(strs = ['1101101', '1010101', '0000001', '1111111', '0000000', '1010101'],m = 7,n = 7) == 2\n assert candidate(strs = ['110101', '100110', '101010', '111100', '000111', '010001'],m = 6,n = 6) == 2\n assert candidate(strs = ['00000', '11111', '10101', '01010', '11000', '00111'],m = 6,n = 6) == 2\n assert candidate(strs = ['010101010101', '101010101010', '111111111111', '000000000000', '110011001100', '001100110011'],m = 10,n = 10) == 1\n assert candidate(strs = ['1101010101', '1010101010', '0011001100', '1111111111', '0000000000', '1010101010', '0101010101', '1111000000'],m = 12,n = 12) == 2\n assert candidate(strs = ['1', '0', '11', '00', '101', '010', '110', '001', '111', '000'],m = 6,n = 6) == 6\n assert candidate(strs = ['111001101', '100110100', '011010101', '000111000', '111100001', '101010101', '010101010', '001001001', '110110110'],m = 9,n = 9) == 2\n assert candidate(strs = ['111000', '000111', '101010', '010101', '110011', '001100', '110100', '001011', '100110', '011001'],m = 10,n = 10) == 3\n assert candidate(strs = ['1111111111', '0000000000', '1010101010', '0101010101', '1100110011', '0011001100'],m = 8,n = 8) == 1\n assert candidate(strs = ['111000', '000111', '101010', '010101', '110010', '001101', '100100'],m = 8,n = 8) == 2\n assert candidate(strs = ['101010', '000000', '111111', '100100', '011011'],m = 5,n = 4) == 1\n assert candidate(strs = ['11110000', '00001111', '11101100', '00010011', '11010100', '00101011', '10111000', '01000111'],m = 8,n = 8) == 2\n assert candidate(strs = ['111111', '110000', '001111', '000011', '101010', '010101', '111000', '000111', '101010', '010101', '110011', '001100'],m = 12,n = 12) == 4\n assert candidate(strs = ['111111', '101010', '010101', '000000', '110011'],m = 3,n = 3) == 1\n assert candidate(strs = ['1111111', '0000000', '1110000', '0001111', '1010101', '0101010'],m = 5,n = 5) == 1\n assert candidate(strs = ['111100000', '000011111', '110011000', '001100111', '101010101', '010101010', '111000111', '000111000', '100100110', '011011001'],m = 10,n = 10) == 2\n assert candidate(strs = ['110', '100', '001', '000', '111', '011', '110', '101', '010', '100', '000', '001', '111', '101', '011', '110', '101', '010'],m = 10,n = 10) == 6\n assert candidate(strs = ['10000111', '01111000', '11100011', '00011100', '10101010', '01010101', '11010101', '00101010'],m = 12,n = 12) == 3\n assert candidate(strs = ['1100000000', '0011111111', '1010101010', '0101010101', '1110001110', '0001110001', '1101011011'],m = 7,n = 7) == 1\n assert candidate(strs = ['11001010', '1001111', '00010', '1010', '111', '0000000'],m = 6,n = 6) == 3\n assert candidate(strs = ['101010', '010101', '111111', '000000', '110000', '001100'],m = 4,n = 4) == 1\n", "comparison": "exact"}, "public_tests": ["[\"10\",\"0001\",\"111001\",\"1\",\"0\"]\n5\n3", "[\"10\",\"0\",\"1\"]\n1\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["strs", "m", "n"], "leetcode_dataset_entry_point": "Solution().findMaxForm", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:28+00:00", "tests_total": 110, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "string", "dynamic-programming", "knapsack-problem", "0-1-knapsack"]}, "language": "ruby", "interface": {"raw_signature": "def find_max_form(strs, m, n)", "container": null, "callable": "find_max_form", "parameters": [{"name": "strs", "type": "String[]"}, {"name": "m", "type": "Integer"}, {"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 475, "task_id": "heaters", "difficulty": "Medium", "problem_description": "Winter is coming! During the contest, your first job is to design a standard heater with a fixed warm radius to warm all the houses.\n\nEvery house can be warmed, as long as the house is within the heater's warm radius range.\n\nGiven the positions of houses and heaters on a horizontal line, return the minimum radius standard of heaters so that those heaters could cover all houses.\n\nNotice that all the heaters follow your radius standard, and the warm radius will be the same.\n\nExample 1:\n\nInput: houses = [1,2,3], heaters = [2]\nOutput: 1\nExplanation: The only heater was placed in the position 2, and if we use the radius 1 standard, then all the houses can be warmed.\n\nExample 2:\n\nInput: houses = [1,2,3,4], heaters = [1,4]\nOutput: 1\nExplanation: The two heaters were placed at positions 1 and 4. We need to use a radius 1 standard, then all the houses can be warmed.\n\nExample 3:\n\nInput: houses = [1,5], heaters = [2]\nOutput: 3\n\nConstraints:\n\n- 1 <= houses.length, heaters.length <= 3 * 10^4\n- 1 <= houses[i], heaters[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(houses = [1, 5],heaters = [2]) == 3\n assert candidate(houses = [1],heaters = [1]) == 0\n assert candidate(houses = [10, 20, 30, 40, 50],heaters = [15, 45]) == 15\n assert candidate(houses = [10, 20, 30, 40, 50],heaters = [5, 15, 25, 35, 45]) == 5\n assert candidate(houses = [1, 3, 5, 7, 9],heaters = [2, 6]) == 3\n assert candidate(houses = [1, 3, 5, 7, 9],heaters = [2, 6, 10]) == 1\n assert candidate(houses = [28, 8, 9, 26, 18, 25, 13, 19, 16, 11, 27, 24, 23, 17, 15, 22, 6, 10, 5, 3],heaters = [20, 1, 15, 10]) == 8\n assert candidate(houses = [10, 20, 30, 40, 50],heaters = [15, 25, 35, 45]) == 5\n assert candidate(houses = [1, 2, 3, 4, 5],heaters = [1, 5]) == 2\n assert candidate(houses = [1, 1000000000],heaters = [500000000]) == 500000000\n assert candidate(houses = [1, 2, 3],heaters = [2]) == 1\n assert candidate(houses = [1, 3, 5, 7, 9],heaters = [2, 6, 8]) == 1\n assert candidate(houses = [282475249, 622690073, 984943658, 144108930, 470211272, 101027544, 457850878, 458777923],heaters = [823564440, 115438165, 784484492, 74243042, 114807987, 137522503, 441282327, 622890097, 429201176]) == 161379218\n assert candidate(houses = [1, 3, 5, 7, 9],heaters = [2, 8]) == 3\n assert candidate(houses = [1, 2, 3, 4, 5],heaters = [3]) == 2\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],heaters = [1, 10]) == 4\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9],heaters = [1, 9]) == 4\n assert candidate(houses = [10, 20, 30, 40, 50],heaters = [15, 35]) == 15\n assert candidate(houses = [1, 2, 3, 4],heaters = [1, 4]) == 1\n assert candidate(houses = [1, 4, 6, 9],heaters = [1, 10]) == 4\n assert candidate(houses = [1, 9],heaters = [5]) == 4\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],heaters = [2, 6, 10, 14, 18]) == 1\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [5, 55, 105]) == 25\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],heaters = [25, 55, 85, 115, 145]) == 15\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],heaters = [5]) == 5\n assert candidate(houses = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97],heaters = [1, 97]) == 48\n assert candidate(houses = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [150, 350, 550, 750, 950]) == 50\n assert candidate(houses = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [200, 400, 600, 800]) == 200\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49],heaters = [25, 50]) == 24\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [10, 100]) == 40\n assert candidate(houses = [100, 150, 200, 250, 300, 350, 400, 450, 500],heaters = [200, 400]) == 100\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [15, 25, 35, 45, 55, 65, 75, 85, 95]) == 5\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],heaters = [15, 45, 75, 105, 135]) == 15\n assert candidate(houses = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000],heaters = [500000000]) == 500000000\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49],heaters = [10, 20, 30, 40]) == 9\n assert candidate(houses = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [500]) == 500\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 50],heaters = [1, 25, 50]) == 12\n assert candidate(houses = [1, 5, 10, 20, 30, 50, 60, 80, 90, 100],heaters = [15, 45, 75]) == 25\n assert candidate(houses = [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],heaters = [10, 60, 100]) == 25\n assert candidate(houses = [1, 5, 10, 15, 20],heaters = [12, 25]) == 11\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],heaters = [10, 20, 30]) == 9\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [1, 99]) == 49\n assert candidate(houses = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],heaters = [10, 40, 70, 100]) == 15\n assert candidate(houses = [1, 100, 200, 300, 400, 500],heaters = [50, 250, 450]) == 50\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],heaters = [2, 10, 18, 26]) == 3\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],heaters = [1, 8, 15]) == 3\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],heaters = [8, 22, 48]) == 13\n assert candidate(houses = [1, 5, 9, 15, 20, 25, 30, 35, 40],heaters = [10, 20, 30]) == 10\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],heaters = [2, 6, 14, 18]) == 3\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [5, 10, 15, 20]) == 4\n assert candidate(houses = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],heaters = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 1\n assert candidate(houses = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [50, 150, 250, 350, 450, 550, 650, 750, 850, 950]) == 50\n assert candidate(houses = [5, 15, 25, 35, 45, 55],heaters = [10, 40]) == 15\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [5, 15]) == 5\n assert candidate(houses = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],heaters = [50, 150, 250]) == 50\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],heaters = [1, 3, 5, 7, 9, 11, 13, 15]) == 1\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [1, 20]) == 9\n assert candidate(houses = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [50, 550, 950]) == 250\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 0\n assert candidate(houses = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000],heaters = [500000000, 1000000000]) == 499999999\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],heaters = [2, 10, 18]) == 3\n assert candidate(houses = [100, 200, 300, 400, 500],heaters = [50, 250, 450]) == 50\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130],heaters = [25, 75, 125]) == 25\n assert candidate(houses = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [150, 450, 750]) == 250\n assert candidate(houses = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],heaters = [20, 40, 60, 80]) == 15\n assert candidate(houses = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],heaters = [5, 15, 25]) == 5\n assert candidate(houses = [1, 3, 5, 7, 9],heaters = [2, 4, 6, 8]) == 1\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],heaters = [10, 100, 190, 290]) == 40\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [10, 11]) == 9\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [10, 20]) == 9\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],heaters = [1, 15]) == 7\n assert candidate(houses = [1, 5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49],heaters = [10, 30, 40]) == 9\n assert candidate(houses = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [5, 25, 45, 65, 85]) == 15\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],heaters = [10, 20, 30, 40, 50, 60, 70, 80, 90]) == 10\n assert candidate(houses = [1, 3, 7, 12, 17, 23, 30],heaters = [4, 9, 25]) == 8\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],heaters = [5, 10]) == 5\n assert candidate(houses = [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120],heaters = [1, 60, 120]) == 30\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],heaters = [10, 20, 30]) == 9\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],heaters = [1, 30]) == 14\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],heaters = [1, 15]) == 7\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],heaters = [5, 100, 195]) == 45\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],heaters = [5, 100]) == 45\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [1, 20]) == 9\n assert candidate(houses = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],heaters = [10, 40, 70]) == 25\n assert candidate(houses = [1, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50],heaters = [5, 25, 45]) == 10\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],heaters = [2, 4, 6, 8, 10, 12, 14, 16, 18]) == 1\n assert candidate(houses = [1, 1000000000],heaters = [500000000]) == 500000000\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],heaters = [1, 99]) == 49\n assert candidate(houses = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],heaters = [10, 30, 50, 70, 90]) == 5\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],heaters = [15, 45, 75]) == 25\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],heaters = [2, 6, 10, 14, 18, 22, 26]) == 3\n assert candidate(houses = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],heaters = [50, 100, 150, 200]) == 49\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],heaters = [5, 15, 25]) == 5\n assert candidate(houses = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],heaters = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 1\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],heaters = [5, 15, 20]) == 5\n assert candidate(houses = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],heaters = [150, 450, 750]) == 250\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],heaters = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 1\n assert candidate(houses = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],heaters = [10, 40, 80]) == 15\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130],heaters = [10, 130]) == 60\n assert candidate(houses = [1, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],heaters = [1, 50, 100]) == 25\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],heaters = [3, 7]) == 3\n assert candidate(houses = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],heaters = [25, 75, 125]) == 25\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],heaters = [7, 23, 37]) == 13\n assert candidate(houses = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],heaters = [5, 25, 45]) == 10\n assert candidate(houses = [50, 150, 250, 350, 450, 550, 650, 750, 850, 950],heaters = [100, 300, 500, 700, 900]) == 50\n assert candidate(houses = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],heaters = [3, 8, 13]) == 2\n assert candidate(houses = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],heaters = [5, 95, 195]) == 45\n", "comparison": "exact"}, "public_tests": ["[1,2,3]\n[2]", "[1,2,3,4]\n[1,4]", "[1,5]\n[2]"], "hints": [], "metadata": {"canonical_parameter_names": ["houses", "heaters"], "leetcode_dataset_entry_point": "Solution().findRadius", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:30+00:00", "tests_total": 108, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "two-pointers", "binary-search", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_radius(houses, heaters)", "container": null, "callable": "find_radius", "parameters": [{"name": "houses", "type": "Integer[]"}, {"name": "heaters", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 476, "task_id": "number-complement", "difficulty": "Easy", "problem_description": "The complement of an integer is the integer you get when you flip all the 0's to 1's and all the 1's to 0's in its binary representation.\n\n- For example, The integer 5 is \"101\" in binary and its complement is \"010\" which is the integer 2.\n\nGiven an integer num, return its complement.\n\nExample 1:\n\nInput: num = 5\nOutput: 2\nExplanation: The binary representation of 5 is 101 (no leading zero bits), and its complement is 010. So you need to output 2.\n\nExample 2:\n\nInput: num = 1\nOutput: 0\nExplanation: The binary representation of 1 is 1 (no leading zero bits), and its complement is 0. So you need to output 0.\n\nConstraints:\n\n- 1 <= num < 2^31\n\nNote: This question is the same as 1009: https://leetcode.com/problems/complement-of-base-10-integer/\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 31) == 0\n assert candidate(num = 10) == 5\n assert candidate(num = 32) == 31\n assert candidate(num = 5) == 2\n assert candidate(num = 1023) == 0\n assert candidate(num = 1) == 0\n assert candidate(num = 100) == 27\n assert candidate(num = 2147483647) == 0\n assert candidate(num = 15) == 0\n assert candidate(num = 8191) == 0\n assert candidate(num = 33) == 30\n assert candidate(num = 4095) == 0\n assert candidate(num = 1048575) == 0\n assert candidate(num = 123456789) == 10760938\n assert candidate(num = 65535) == 0\n assert candidate(num = 500) == 11\n assert candidate(num = 2097151) == 0\n assert candidate(num = 131071) == 0\n assert candidate(num = 16777215) == 0\n assert candidate(num = 2147483646) == 1\n assert candidate(num = 134217728) == 134217727\n assert candidate(num = 4194303) == 0\n assert candidate(num = 2047) == 0\n assert candidate(num = 987654321) == 86087502\n assert candidate(num = 89123456) == 45094271\n assert candidate(num = 255) == 0\n assert candidate(num = 8388607) == 0\n assert candidate(num = 1024) == 1023\n assert candidate(num = 100000) == 31071\n assert candidate(num = 1073741823) == 0\n assert candidate(num = 262143) == 0\n assert candidate(num = 268435455) == 0\n assert candidate(num = 123456) == 7615\n assert candidate(num = 1000000) == 48575\n assert candidate(num = 8) == 7\n assert candidate(num = 32767) == 0\n assert candidate(num = 524287) == 0\n assert candidate(num = 134217727) == 0\n assert candidate(num = 33554431) == 0\n assert candidate(num = 536870911) == 0\n assert candidate(num = 67108863) == 0\n assert candidate(num = 1073741824) == 1073741823\n", "comparison": "exact"}, "public_tests": ["5", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().findComplement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:33+00:00", "tests_total": 44, "tests_dropped": 2, "flags": [], "topic_tags": ["bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def find_complement(num)", "container": null, "callable": "find_complement", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 477, "task_id": "total-hamming-distance", "difficulty": "Medium", "problem_description": "The Hamming distance between two integers is the number of positions at which the corresponding bits are different.\n\nGiven an integer array nums, return the sum of Hamming distances between all the pairs of the integers in nums.\n\nExample 1:\n\nInput: nums = [4,14,2]\nOutput: 6\nExplanation: In binary representation, the 4 is 0100, 14 is 1110, and 2 is 0010 (just\nshowing the four bits relevant in this case).\nThe answer will be:\nHammingDistance(4, 14) + HammingDistance(4, 2) + HammingDistance(14, 2) = 2 + 2 + 2 = 6.\n\nExample 2:\n\nInput: nums = [4,14,4]\nOutput: 4\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- 0 <= nums[i] <= 10^9\n- The answer for the given input will fit in a 32-bit integer.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == 48\n assert candidate(nums = [4, 14, 4]) == 4\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 112\n assert candidate(nums = [31, 14, 7, 3, 1]) == 24\n assert candidate(nums = [1, 3, 5]) == 4\n assert candidate(nums = [1, 2, 4, 8, 16]) == 20\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 0\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9]) == 16\n assert candidate(nums = [1, 2, 3, 4]) == 11\n assert candidate(nums = [1, 2, 3, 4, 5]) == 18\n assert candidate(nums = [0, 1, 2, 3, 4]) == 16\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [0, 0, 0]) == 0\n assert candidate(nums = [1, 0, 1, 0, 1, 0]) == 9\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [3, 5, 6, 7, 9, 10, 11, 12]) == 62\n assert candidate(nums = [255, 128, 64, 32, 16, 8, 4, 2, 1, 0]) == 128\n assert candidate(nums = [31, 14, 7, 3]) == 13\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997]) == 32\n assert candidate(nums = [4, 14, 2]) == 6\n assert candidate(nums = [0, 1, 2, 3]) == 8\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 90\n assert candidate(nums = [123456789, 987654321, 111222333, 444555666, 777888999]) == 152\n assert candidate(nums = [536870911, 268435455, 134217727, 67108863, 33554431, 16777215, 8388607, 4194303, 2097151, 1048575]) == 165\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]) == 210\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200]) == 304\n assert candidate(nums = [1023, 2047, 4095, 8191, 16383, 32767, 65535]) == 56\n assert candidate(nums = [134217727, 134217726, 134217725, 134217724, 134217723, 134217722, 134217721, 134217720]) == 48\n assert candidate(nums = [1000000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000]) == 228\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == 90\n assert candidate(nums = [123, 456, 789, 101112, 131415, 161718, 192021, 222324]) == 250\n assert candidate(nums = [255, 127, 63, 31, 15, 7, 3, 1]) == 84\n assert candidate(nums = [1023, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]) == 180\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) == 156\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990, 999999989, 999999988, 999999987, 999999986, 999999985, 999999984, 999999983, 999999982, 999999981, 999999980]) == 456\n assert candidate(nums = [1000000, 1000001, 1000010, 1000011, 1000100, 1000101, 1000110, 1000111]) == 112\n assert candidate(nums = [128, 64, 32, 16, 8, 4, 2, 1, 255, 127, 63, 31, 15, 7, 3, 1, 0]) == 464\n assert candidate(nums = [1023, 2047, 4095, 8191, 16383]) == 20\n assert candidate(nums = [123456789, 987654321, 112233445, 556677889, 998877665, 543216789, 876543210]) == 322\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]) == 455\n assert candidate(nums = [1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]) == 420\n assert candidate(nums = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096]) == 90\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000]) == 324\n assert candidate(nums = [131071, 131072, 131073, 131074, 131075, 131076, 131077]) == 126\n assert candidate(nums = [123456789, 987654321, 111111111, 222222222, 333333333, 444444444, 555555555, 666666666]) == 411\n assert candidate(nums = [0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912]) == 900\n assert candidate(nums = [1048575, 524287, 262143, 131071, 65535, 32767, 16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1]) == 1330\n assert candidate(nums = [0, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 121\n assert candidate(nums = [536870911, 536870910, 536870909, 536870908, 536870907, 536870906]) == 25\n assert candidate(nums = [8388607, 4194303, 2097151, 1048575, 524287, 262143, 131071, 65535, 32767, 16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1]) == 2024\n assert candidate(nums = [100000000, 100000001, 100000002, 100000003, 100000004, 100000005, 100000006, 100000007, 100000008, 100000009, 100000010]) == 112\n assert candidate(nums = [1023, 2047, 3071, 4095, 5119]) == 16\n assert candidate(nums = [1023, 511, 255, 127, 63, 31, 15, 7, 3, 1]) == 165\n assert candidate(nums = [33554431, 16777215, 8388607, 4194303, 2097151, 1048575, 524287, 262143]) == 84\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 686\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000]) == 168\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991]) == 145\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 768\n assert candidate(nums = [123456789, 987654321, 111111111, 222222222, 333333333, 444444444, 555555555]) == 304\n assert candidate(nums = [1048575, 1048574, 1048573, 1048572, 1048571, 1048570, 1048569, 1048568]) == 48\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125]) == 634\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 512\n assert candidate(nums = [8, 4, 2, 1, 16, 8, 4, 2, 1, 32, 16, 8, 4, 2, 1, 64, 32, 16, 8, 4, 2, 1]) == 406\n assert candidate(nums = [8388607, 8388606, 8388605, 8388604, 8388603, 8388602]) == 25\n assert candidate(nums = [500000000, 500000001, 500000002, 500000003, 500000004, 500000005, 500000006, 500000007]) == 48\n assert candidate(nums = [1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287]) == 165\n assert candidate(nums = [5318008, 4618459, 4646774, 8777780, 8777736, 6218305, 4649788, 1048585, 4649456, 4618459]) == 459\n assert candidate(nums = [134217728, 67108864, 33554432, 16777216, 8388608, 4194304, 2097152, 1048576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1]) == 756\n assert candidate(nums = [268435455, 268435454, 268435453, 268435452, 268435451, 268435450, 268435449, 268435448, 268435447, 268435446, 268435445]) == 112\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000]) == 548\n assert candidate(nums = [255, 127, 63, 31, 15, 7, 3, 1, 0]) == 120\n assert candidate(nums = [8388607, 4194303, 2097151, 1048575, 524287, 262143, 131071, 65535, 32767, 16383, 8191, 4095, 2047, 1023, 511, 255, 127, 63, 31, 15, 7, 3, 1, 0]) == 2300\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 256\n assert candidate(nums = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610]) == 392\n assert candidate(nums = [135792468, 246813579, 357924681, 468135792, 579246813, 681357924, 792468135, 813579246, 924681357]) == 542\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 470\n assert candidate(nums = [536870911, 536870910, 536870909, 536870908, 536870907, 536870906, 536870905, 536870904]) == 48\n assert candidate(nums = [1000000, 2000000, 3000000, 4000000, 5000000, 6000000, 7000000, 8000000, 9000000, 10000000]) == 381\n assert candidate(nums = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384]) == 132\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768]) == 240\n", "comparison": "exact"}, "public_tests": ["[4,14,2]", "[4,14,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().totalHammingDistance", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:35+00:00", "tests_total": 98, "tests_dropped": 15, "flags": [], "topic_tags": ["array", "math", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def total_hamming_distance(nums)", "container": null, "callable": "total_hamming_distance", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 480, "task_id": "sliding-window-median", "difficulty": "Hard", "problem_description": "The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle values.\n\n- For examples, if arr = [2,3,4], the median is 3.\n- For examples, if arr = [1,2,3,4], the median is (2 + 3) / 2 = 2.5.\n\nYou are given an integer array nums and an integer k. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.\n\nReturn the median array for each window in the original array. Answers within 10^-5 of the actual value will be accepted.\n\nExample 1:\n\nInput: nums = [1,3,-1,-3,5,3,6,7], k = 3\nOutput: [1.00000,-1.00000,-1.00000,3.00000,5.00000,6.00000]\nExplanation:\nWindow position Median\n--------------- -----\n[1 3 -1] -3 5 3 6 7 1\n 1 [3 -1 -3] 5 3 6 7 -1\n 1 3 [-1 -3 5] 3 6 7 -1\n 1 3 -1 [-3 5 3] 6 7 3\n 1 3 -1 -3 [5 3 6] 7 5\n 1 3 -1 -3 5 [3 6 7] 6\n\nExample 2:\n\nInput: nums = [1,2,3,4,2,3,1,4,2], k = 3\nOutput: [2.00000,3.00000,3.00000,3.00000,2.00000,3.00000,2.00000]\n\nConstraints:\n\n- 1 <= k <= nums.length <= 10^5\n- -2^31 <= nums[i] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"Decimal answers are accepted within 1e-5 (absolute or relative), as on LeetCode.\"\"\"\n import math\n if isinstance(result, list) and isinstance(expected, list):\n return len(result) == len(expected) and all(answers_match(r, e) for r, e in zip(result, expected))\n numbers = (int, float)\n if isinstance(result, numbers) and isinstance(expected, numbers) and not isinstance(result, bool):\n return math.isclose(result, expected, rel_tol=1e-5, abs_tol=1e-5)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1], k=4), [7.5, 6.5, 5.5, 4.5, 3.5, 2.5])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 2, 3, 1, 4, 2], k=3), [2, 3, 3, 3, 2, 3, 2])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9], k=5), [3, 4, 5, 6, 7])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10], k=3), [-2, -3, -4, -5, -6, -7, -8, -9])\n assert answers_match(candidate(nums=[1, 2, 3], k=2), [1.5, 2.5])\n assert answers_match(candidate(nums=[1, 4, 2, 3], k=4), [2.5])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=5), [3, 4, 5, 6, 7, 8])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], k=5), [5, 7, 9, 11, 13, 15])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5], k=2), [1.5, 2.5, 3.5, 4.5])\n assert answers_match(candidate(nums=[1, 3, 5], k=1), [1, 3, 5])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=5), [1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums=[1], k=1), [1])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15], k=8), [8.0])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1], k=4), [3.5, 2.5])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19], k=1), [1, 3, 5, 7, 9, 11, 13, 15, 17, 19])\n assert answers_match(candidate(nums=[1, 2], k=2), [1.5])\n assert answers_match(candidate(nums=[5, 2, 2, 7, 3, 7, 9, 0, 2, 3], k=2), [3.5, 2.0, 4.5, 5.0, 5.0, 8.0, 4.5, 1.0, 2.5])\n assert answers_match(candidate(nums=[1, 3, -1, -3, 5, 3, 6, 7], k=3), [1, -1, -1, 3, 5, 6])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=2), [1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5])\n assert answers_match(candidate(nums=[1, 2, 2, 2, 2, 2, 3], k=3), [2, 2, 2, 2, 2])\n assert answers_match(candidate(nums=[5, 2, 2, 7, 3, 7, 9, 0, 2, 3], k=4), [3.5, 2.5, 5.0, 7.0, 5.0, 4.5, 2.5])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 2, 2, 1, 1, 1, 1], k=5), [3, 3, 2, 2, 1, 1])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], k=10), [5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=7), [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], k=3), [2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24])\n assert answers_match(candidate(nums=[100, 90, 80, 70, 60, 50, 40, 30, 20, 10, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100], k=5), [80, 70, 60, 50, 40, 30, 20, 10, -10, -20, -30, -40, -50, -60, -70, -80])\n assert answers_match(candidate(nums=[5, 3, 8, 6, 2, 7, 4, 1, 9, 0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=10), [4.5, 5.0, 6.5, 6.5, 8.0, 10.0, 11.5, 12.5, 13.5, 14.5, 15.5])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250], k=15), [80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], k=6), [3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.0])\n assert answers_match(candidate(nums=[3, 1, 2, 2, 3, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=7), [2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])\n assert answers_match(candidate(nums=[1000000000, 1000000000, 1000000000, 1000000000, 1000000000], k=3), [1000000000, 1000000000, 1000000000])\n assert answers_match(candidate(nums=[-1, -100, 2, -3, 5, 3, 6, 7, 100, 0], k=5), [-1, 2, 3, 5, 6, 6])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], k=10), [5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=7), [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], k=10), [5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=2), [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], k=10), [10.0, 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 4, 5, 5], k=4), [3.0, 3.0, 3.0, 2.5, 2.0, 2.0, 2.0, 3.0, 4.0, 4.0, 4.5])\n assert answers_match(candidate(nums=[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=7), [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], k=3), [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3])\n assert answers_match(candidate(nums=[2147483647, -2147483648, 1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000], k=3), [1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=15), [8, 9, 10, 11, 12, 13, 13, 13, 13, 13, 13, 13, 13, 8, 8, 8])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500], k=10), [550.0, 650.0, 750.0, 850.0, 950.0, 1050.0])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 2, 2, 2, 4, 4, 5], k=3), [3, 3, 3, 2, 2, 2, 4, 4])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], k=4), [25.0, 35.0, 45.0, 55.0, 65.0, 75.0, 85.0])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], k=1), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20], k=7), [6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10], k=5), [8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], k=15), [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=1), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])\n assert answers_match(candidate(nums=[5, 1, 4, 3, 6, 8, 9, 2, 7, 10], k=4), [3.5, 3.5, 5.0, 7.0, 7.0, 7.5, 8.0])\n assert answers_match(candidate(nums=[1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40], k=20), [10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5, 24.5, 25.5, 26.5, 27.5, 28.5, 29.5, 30.5])\n assert answers_match(candidate(nums=[5, 2, 2, 7, 3, 1, 6, 1, 5, 4, 9, 8], k=5), [3, 2, 3, 3, 3, 4, 5, 5])\n assert answers_match(candidate(nums=[5, 2, 2, 7, 3, 7, 9, 0, 2, 3], k=4), [3.5, 2.5, 5.0, 7.0, 5.0, 4.5, 2.5])\n assert answers_match(candidate(nums=[3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], k=1), [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=5), [1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0], k=5), [7, 6, 5, 4, 3, 2])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200], k=6), [35.0, 45.0, 55.0, 65.0, 75.0, 85.0, 95.0, 105.0, 115.0, 125.0, 135.0, 145.0, 155.0, 165.0, 175.0])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], k=7), [4, 5, 6, 7, 8, 9, 10, 11, 12])\n assert answers_match(candidate(nums=[20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], k=6), [17.5, 16.5, 15.5, 14.5, 13.5, 12.5, 11.5, 10.5, 9.5, 8.5, 7.5, 6.5, 5.5, 4.5, 3.5])\n assert answers_match(candidate(nums=[3, 1, 2, 2, 3, 1, 4, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 8], k=5), [2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 4, 5, 5, 5, 3, 3, 3, 4, 5, 6])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=6), [3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5])\n assert answers_match(candidate(nums=[5, 2, 2, 3, 4, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=5), [3, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=5), [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18])\n assert answers_match(candidate(nums=[9, 1, 2, 3, 4, 5, 6, 7, 8, 9], k=2), [5.0, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5])\n assert answers_match(candidate(nums=[1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10], k=3), [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], k=1), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n assert answers_match(candidate(nums=[33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], k=11), [38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60])\n assert answers_match(candidate(nums=[-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20], k=5), [-3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], k=15), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n assert answers_match(candidate(nums=[39, 37, 35, 33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1], k=7), [33, 31, 29, 27, 25, 23, 21, 19, 17, 15, 13, 11, 9, 7])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], k=5), [30, 40, 50, 60, 70, 80])\n assert answers_match(candidate(nums=[100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300], k=6), [350.0, 450.0, 550.0, 650.0, 750.0, 850.0, 950.0, 1050.0])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25], k=4), [2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, 18.5, 19.5, 20.5, 21.5, 22.5, 23.5])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35], k=9), [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10], k=4), [7.5, 6.5, 5.5, 4.5, 3.5, 2.5, 1.5, 0.5, -0.5, -1.5, -2.5, -3.5, -4.5, -5.5, -6.5, -7.5, -8.5])\n assert answers_match(candidate(nums=[1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005], k=3), [1000000001, 1000000002, 1000000003, 1000000004])\n assert answers_match(candidate(nums=[5, 3, 1, 2, 4, 8, 7, 6, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], k=15), [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23])\n assert answers_match(candidate(nums=[1, 3, -1, -3, 5, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19], k=9), [3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=100), [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])\n assert answers_match(candidate(nums=[5, 2, 1, 3, 4, 6, 7, 8, 9, 10], k=4), [2.5, 2.5, 3.5, 5.0, 6.5, 7.5, 8.5])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20], k=6), [7.5, 6.5, 5.5, 4.5, 3.5, 2.5, 1.5, 0.5, -0.5, -1.5, -2.5, -3.5, -4.5, -5.5, -6.5, -7.5, -8.5, -9.5, -10.5, -11.5, -12.5, -13.5, -14.5, -15.5, -16.5, -17.5])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], k=5), [3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5])\n assert answers_match(candidate(nums=[1, 3, -1, -3, 5, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], k=5), [1, 3, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30], k=9), [5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26])\n assert answers_match(candidate(nums=[5, 2, 2, 7, 3, 7, 9, 0, 2, 3, 2, 2, 6, 2, 8, 0, 4, 3, 6, 2, 6, 4, 8, 7, 6, 3, 7, 2, 9, 7, 4, 6, 3, 7, 2, 7, 4, 6], k=8), [4.0, 2.5, 3.0, 3.0, 2.5, 2.5, 2.0, 2.0, 2.0, 2.5, 2.5, 3.5, 3.5, 3.5, 4.0, 4.0, 5.0, 6.0, 6.0, 6.0, 6.0, 6.5, 7.0, 6.5, 6.0, 5.0, 6.5, 5.0, 6.5, 5.0, 5.0])\n assert answers_match(candidate(nums=[3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9, 7, 9, 3, 2, 3, 8, 4, 6, 2, 6, 4, 3, 3, 8, 3, 2, 7, 9, 5, 0, 2, 8, 8, 4, 1, 9, 7, 1, 6, 9, 3, 9, 9, 3, 7, 5, 1, 0, 5, 8, 2, 0, 9, 7, 4, 9, 4, 4, 5, 9, 2, 3, 0, 7, 8, 1, 6, 4, 0, 6, 2, 8, 6, 2, 0, 8, 9, 9, 8, 6, 2, 8, 0, 3, 4, 8, 2, 5, 3, 4, 2, 1, 7, 0, 6, 7], k=15), [5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 6, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 5, 4, 3, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 4])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 500000000, 250000000, -250000000], k=3), [500000000, 250000000, 250000000])\n assert answers_match(candidate(nums=[1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991], k=5), [999999998, 999999997, 999999996, 999999995, 999999994, 999999993])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 500000000, -500000000, 250000000, -250000000], k=3), [500000000, -500000000, 250000000, -250000000])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], k=5), [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])\n assert answers_match(candidate(nums=[4, 5, 1, 3, 7, 10, 2, 8, 9, 6], k=4), [3.5, 4.0, 5.0, 5.0, 7.5, 8.5, 7.0])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=20), [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])\n assert answers_match(candidate(nums=[1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000], k=5), [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=10), [5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], k=3), [20, 30, 40, 50, 60, 70, 80, 90])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=10), [1.0])\n assert answers_match(candidate(nums=[1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990], k=3), [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10], k=5), [7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], k=10), [5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1], k=5), [8, 7, 6, 5, 4, 3])\n assert answers_match(candidate(nums=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150], k=7), [40, 50, 60, 70, 80, 90, 100, 110, 120])\n assert answers_match(candidate(nums=[20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], k=5), [18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], k=7), [3, 3, 3, 3, 3, 3, 3, 3, 3])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=10), [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])\n assert answers_match(candidate(nums=[5, 2, 9, 1, 5, 6], k=2), [3.5, 5.5, 5.0, 3.0, 5.5])\n assert answers_match(candidate(nums=[1, 3, 3, 3, 3, 3, 3, 3, 3, 3], k=5), [3, 3, 3, 3, 3, 3])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], k=15), [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7], k=5), [2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7])\n assert answers_match(candidate(nums=[1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000], k=2), [0.0, 0.0, 0.0, 0.0, 0.0])\n assert answers_match(candidate(nums=[2147483647, -2147483648, 2147483647, -2147483648, 2147483647, -2147483648], k=3), [2147483647, -2147483648, 2147483647, -2147483648])\n assert answers_match(candidate(nums=[1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39], k=3), [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], k=10), [5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0, 5.0])\n assert answers_match(candidate(nums=[1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1], k=3), [1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], k=7), [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5])\n", "comparison": "float"}, "public_tests": ["[1,3,-1,-3,5,3,6,7]\n3", "[1,2,3,4,2,3,1,4,2]\n3"], "hints": ["The simplest of solutions comes from the basic idea of finding the median given a set of numbers. We know that by definition, a median is the center element (or an average of the two center elements). Given an unsorted list of numbers, how do we find the median element? If you know the answer to this question, can we extend this idea to every sliding window that we come across in the array?", "Is there a better way to do what we are doing in the above hint? Don't you think there is duplication of calculation being done there? Is there some sort of optimization that we can do to achieve the same result? This approach is merely a modification of the basic approach except that it simply reduces duplication of calculations once done.", "The third line of thought is also based on this same idea but achieving the result in a different way. We obviously need the window to be sorted for us to be able to find the median. Is there a data-structure out there that we can use (in one or more quantities) to obtain the median element extremely fast, say O(1) time while having the ability to perform the other operations fairly efficiently as well?"], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().medianSlidingWindow", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:40+00:00", "tests_total": 115, "tests_dropped": 0, "flags": ["decimal_answer"], "topic_tags": ["array", "hash-table", "sliding-window", "heap-priority-queue", "treap"]}, "language": "ruby", "interface": {"raw_signature": "def median_sliding_window(nums, k)", "container": null, "callable": "median_sliding_window", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Float[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 481, "task_id": "magical-string", "difficulty": "Medium", "problem_description": "A magical string s consists of only '1' and '2' and obeys the following rule:\n\n- Concatenating the sequence of lengths of its consecutive groups of identical characters '1' and '2' generates the string s itself.\n\nThe first few elements of s is s = \"1221121221221121122……\". If we group the consecutive 1's and 2's in s, it will be \"1 22 11 2 1 22 1 22 11 2 11 22 ......\" and counting the occurrences of 1's or 2's in each group yields the sequence \"1 2 2 1 1 2 1 2 2 1 2 2 ......\".\n\nYou can see that concatenating the occurrence sequence gives us s itself.\n\nGiven an integer n, return the number of 1's in the first n number in the magical string s.\n\nExample 1:\n\nInput: n = 6\nOutput: 3\nExplanation: The first 6 elements of magical string s is \"122112\" and it contains three 1's, so return 3.\n\nExample 2:\n\nInput: n = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= n <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 100000) == 49972\n assert candidate(n = 100) == 49\n assert candidate(n = 15) == 7\n assert candidate(n = 10000) == 4996\n assert candidate(n = 6) == 3\n assert candidate(n = 20) == 10\n assert candidate(n = 1) == 1\n assert candidate(n = 1000) == 502\n assert candidate(n = 10) == 5\n assert candidate(n = 32000) == 15996\n assert candidate(n = 99999) == 49972\n assert candidate(n = 15000) == 7501\n assert candidate(n = 3) == 1\n assert candidate(n = 12345) == 6172\n assert candidate(n = 7500) == 3747\n assert candidate(n = 90000) == 44975\n assert candidate(n = 50000) == 24985\n assert candidate(n = 50) == 25\n assert candidate(n = 5) == 3\n assert candidate(n = 300) == 150\n assert candidate(n = 30) == 15\n assert candidate(n = 60000) == 29976\n assert candidate(n = 40) == 20\n assert candidate(n = 4) == 2\n assert candidate(n = 30000) == 14993\n assert candidate(n = 2) == 1\n assert candidate(n = 45000) == 22491\n assert candidate(n = 85000) == 42478\n assert candidate(n = 80000) == 39982\n assert candidate(n = 8) == 4\n assert candidate(n = 20000) == 9996\n assert candidate(n = 5000) == 2500\n assert candidate(n = 75000) == 37487\n assert candidate(n = 9999) == 4995\n assert candidate(n = 50001) == 24986\n assert candidate(n = 200) == 100\n assert candidate(n = 400) == 199\n assert candidate(n = 9) == 4\n assert candidate(n = 500) == 249\n assert candidate(n = 7) == 4\n assert candidate(n = 25000) == 12495\n", "comparison": "exact"}, "public_tests": ["6", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().magicalString", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:42+00:00", "tests_total": 41, "tests_dropped": 0, "flags": [], "topic_tags": ["two-pointers", "string"]}, "language": "ruby", "interface": {"raw_signature": "def magical_string(n)", "container": null, "callable": "magical_string", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 482, "task_id": "license-key-formatting", "difficulty": "Easy", "problem_description": "You are given a license key represented as a string s that consists of only alphanumeric characters and dashes. The string is separated into n + 1 groups by n dashes. You are also given an integer k.\n\nWe want to reformat the string s such that each group contains exactly k characters, except for the first group, which could be shorter than k but still must contain at least one character. Furthermore, there must be a dash inserted between two groups, and you should convert all lowercase letters to uppercase.\n\nReturn the reformatted license key.\n\nExample 1:\n\nInput: s = \"5F3Z-2e-9-w\", k = 4\nOutput: \"5F3Z-2E9W\"\nExplanation: The string s has been split into two parts, each part has 4 characters.\nNote that the two extra dashes are not needed and can be removed.\n\nExample 2:\n\nInput: s = \"2-5g-3-J\", k = 2\nOutput: \"2-5G-3J\"\nExplanation: The string s has been split into three parts, each part has 2 characters except the first part as it could be shorter as mentioned above.\n\nConstraints:\n\n- 1 <= s.length <= 10^5\n- s consists of English letters, digits, and dashes '-'.\n- 1 <= k <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"AB-CD-EF-GH-IJ\",k = 2) == \"AB-CD-EF-GH-IJ\"\n assert candidate(s = \"abcdefg-hijkl-mnopqr-stuv-wxyz\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ\"\n assert candidate(s = \"1234567890\",k = 3) == \"1-234-567-890\"\n assert candidate(s = \"2-4A0r7-4k\",k = 3) == \"24-A0R-74K\"\n assert candidate(s = \"2-5g-3-J\",k = 2) == \"2-5G-3J\"\n assert candidate(s = \"5F3Z-2e-9-w\",k = 4) == \"5F3Z-2E9W\"\n assert candidate(s = \"----\",k = 2) == \"\"\n assert candidate(s = \"abcdefg\",k = 2) == \"A-BC-DE-FG\"\n assert candidate(s = \"a-a-a-a-\",k = 1) == \"A-A-A-A\"\n assert candidate(s = \"1-23-456\",k = 2) == \"12-34-56\"\n assert candidate(s = \"ABCDEF-GHIJKL-MNOPQR-STUVWX-YZ\",k = 1) == \"A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\"\n assert candidate(s = \"-1-2-3-4-5-6-7-8-9-0-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-\",k = 6) == \"123456-7890AB-CDEFGH-IJKLMN-OPQRST-UVWXYZ\"\n assert candidate(s = \"0000-0000-0000-0000-0000-0000\",k = 8) == \"00000000-00000000-00000000\"\n assert candidate(s = \"abcdefg-hijkl-mnopqr-stuv-wxyz-1234567890\",k = 3) == \"ABC-DEF-GHI-JKL-MNO-PQR-STU-VWX-YZ1-234-567-890\"\n assert candidate(s = \"a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z\",k = 6) == \"AB-CDEFGH-IJKLMN-OPQRST-UVWXYZ\"\n assert candidate(s = \"a-\",k = 2) == \"A\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-0-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 1) == \"1-2-3-4-5-6-7-8-9-0-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\"\n assert candidate(s = \"X1-Y2-Z3\",k = 1) == \"X-1-Y-2-Z-3\"\n assert candidate(s = \"123-4567-890-ABCD-EFGH-IJKL\",k = 3) == \"1-234-567-890-ABC-DEF-GHI-JKL\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-0-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 10) == \"123456-7890ABCDEF-GHIJKLMNOP-QRSTUVWXYZ\"\n assert candidate(s = \"a-\",k = 1) == \"A\"\n assert candidate(s = \"-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ\"\n assert candidate(s = \"x-y-z\",k = 10) == \"XYZ\"\n assert candidate(s = \"123-456-789-0123-4567-8901\",k = 4) == \"1-2345-6789-0123-4567-8901\"\n assert candidate(s = \"M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 6) == \"MN-OPQRST-UVWXYZ\"\n assert candidate(s = \"1234567890\",k = 1) == \"1-2-3-4-5-6-7-8-9-0\"\n assert candidate(s = \"xXxX-xXxX-xXxX-xXxX-xXxX-xXxX-xXxX-xXxX-xXxX\",k = 5) == \"X-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX\"\n assert candidate(s = \"aBcDeFgHiJkLmNoPqRsTuVwXyZ\",k = 3) == \"AB-CDE-FGH-IJK-LMN-OPQ-RST-UVW-XYZ\"\n assert candidate(s = \"----\",k = 1) == \"\"\n assert candidate(s = \"abcdefg-hijkl-mnopqr-stuv-wxyz-1234567890\",k = 7) == \"A-BCDEFGH-IJKLMNO-PQRSTUV-WXYZ123-4567890\"\n assert candidate(s = \"Z1-23X4-567-89A-BCD-EFG-HIJ-KLM-NOP-QRS-TUV-WXY-Z\",k = 3) == \"Z-123-X45-678-9AB-CDE-FGH-IJK-LMN-OPQ-RST-UVW-XYZ\"\n assert candidate(s = \"A1-B2-C3-D4-E5-F6-G7-H8-I9-J0-K1-L2-M3-N4-O5-P6-Q7-R8-S9-T0-U1-V2-W3-X4-Y5-Z6\",k = 6) == \"A1B2-C3D4E5-F6G7H8-I9J0K1-L2M3N4-O5P6Q7-R8S9T0-U1V2W3-X4Y5Z6\"\n assert candidate(s = \"a-1-b-2-c-3-d-4-e-5-f-6-g-7-h-8-i-9-j-0\",k = 2) == \"A1-B2-C3-D4-E5-F6-G7-H8-I9-J0\"\n assert candidate(s = \"a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-0-1-2-3-4-5-6-7-8-9\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ-01234-56789\"\n assert candidate(s = \"a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z\",k = 4) == \"AB-CDEF-GHIJ-KLMN-OPQR-STUV-WXYZ\"\n assert candidate(s = \"-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-\",k = 3) == \"AB-CDE-FGH-IJK-LMN-OPQ-RST-UVW-XYZ\"\n assert candidate(s = \"aA-bB-cC-dD-eE-fF-gG-hH-iI-jJ-kK-lL-mM-nN-oO-pP-qQ-rR-sS-tT-uU-vV-wW-xX-yY-zZ\",k = 5) == \"AA-BBCCD-DEEFF-GGHHI-IJJKK-LLMMN-NOOPP-QQRRS-STTUU-VVWWX-XYYZZ\"\n assert candidate(s = \"-a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-\",k = 2) == \"AB-CD-EF-GH-IJ-KL-MN-OP-QR-ST-UV-WX-YZ\"\n assert candidate(s = \"0-0-0-0-0-0-0-0-0-0\",k = 2) == \"00-00-00-00-00\"\n assert candidate(s = \"abcdefghij-klmnopqrstuvwxyz\",k = 6) == \"AB-CDEFGH-IJKLMN-OPQRST-UVWXYZ\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0\",k = 3) == \"12-345-678-901-234-567-890-123-456-789-012-345-678-901-234-567-890\"\n assert candidate(s = \"x-y-z-1-2-3-4-5-6-7-8-9-0-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 7) == \"XYZ1-2345678-90ABCDE-FGHIJKL-MNOPQRS-TUVWXYZ\"\n assert candidate(s = \"000-000-000-000-000\",k = 5) == \"00000-00000-00000\"\n assert candidate(s = \"123-456-7890-ABCD-EFGH-IJKL\",k = 3) == \"1-234-567-890-ABC-DEF-GHI-JKL\"\n assert candidate(s = \"2-5G-3-J-\",k = 1) == \"2-5-G-3-J\"\n assert candidate(s = \"-this-is-a-test-string-for-the-problem-description-\",k = 5) == \"T-HISIS-ATEST-STRIN-GFORT-HEPRO-BLEMD-ESCRI-PTION\"\n assert candidate(s = \"abcdefg-hijkl-mnopqr-stuv-wxyz-12345-67890\",k = 6) == \"ABCDEF-GHIJKL-MNOPQR-STUVWX-YZ1234-567890\"\n assert candidate(s = \"W3LC--DR5F--HR5P-TR22--W48P\",k = 4) == \"W3LC-DR5F-HR5P-TR22-W48P\"\n assert candidate(s = \"A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 26) == \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n assert candidate(s = \"abcdef\",k = 10) == \"ABCDEF\"\n assert candidate(s = \"---\",k = 1) == \"\"\n assert candidate(s = \"aBcDeFgHiJkLmNoPqRsTuVwXyZ\",k = 7) == \"ABCDE-FGHIJKL-MNOPQRS-TUVWXYZ\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\",k = 4) == \"AB-CDEF-GHIJ-KLMN-OPQR-STUV-WXYZ-ABCD-EFGH-IJKL-MNOP-QRST-UVWX-YZ01-2345-6789\"\n assert candidate(s = \"---\",k = 2) == \"\"\n assert candidate(s = \"A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ\"\n assert candidate(s = \"a\",k = 2) == \"A\"\n assert candidate(s = \"-a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-0-1-2-3-4-5-6-7-8-9---\",k = 1) == \"A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-0-1-2-3-4-5-6-7-8-9\"\n assert candidate(s = \"X-5F3Z-2E-9-W\",k = 3) == \"X5F-3Z2-E9W\"\n assert candidate(s = \"WXY-ZAB-CDE-FGH-IJK-LMN-OPQ-RST-UVW-XYZ-123-456-789\",k = 3) == \"WXY-ZAB-CDE-FGH-IJK-LMN-OPQ-RST-UVW-XYZ-123-456-789\"\n assert candidate(s = \"-\",k = 1) == \"\"\n assert candidate(s = \"1234567890-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\",k = 10) == \"12-34567890AB-CDEFGHIJKL-MNOPQRSTUV-WXYZABCDEF-GHIJKLMNOP-QRSTUVWXYZ\"\n assert candidate(s = \"1234567890-1234567890-1234567890-1234567890\",k = 9) == \"1234-567890123-456789012-345678901-234567890\"\n assert candidate(s = \"Z1234567890123456789012345678901234567890\",k = 15) == \"Z1234567890-123456789012345-678901234567890\"\n assert candidate(s = \"a0b1-c2d3-e4f5-g6h7-i8j9-k0l1-m2n3-o4p5-q6r7-s8t9-u0v1-w2x3-y4z5\",k = 3) == \"A-0B1-C2D-3E4-F5G-6H7-I8J-9K0-L1M-2N3-O4P-5Q6-R7S-8T9-U0V-1W2-X3Y-4Z5\"\n assert candidate(s = \"-a\",k = 1) == \"A\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",k = 13) == \"ABCDEFGHIJKLM-NOPQRSTUVWXYZ\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-0\",k = 1) == \"1-2-3-4-5-6-7-8-9-0\"\n assert candidate(s = \"---a---b---c---d---e---f---g---h---i---j---\",k = 2) == \"AB-CD-EF-GH-IJ\"\n assert candidate(s = \"abcdef-ghijklm-nopqrst-uvwxyz-012345-67890\",k = 6) == \"A-BCDEFG-HIJKLM-NOPQRS-TUVWXY-Z01234-567890\"\n assert candidate(s = \"1234567890-abcdefghij-klmnopqrstuvwxyz\",k = 6) == \"123456-7890AB-CDEFGH-IJKLMN-OPQRST-UVWXYZ\"\n assert candidate(s = \"-a-b--c-d--e-f--g-h--i-j--k-l--m-n--o-p--q-r--s-t--u-v--w-x--y-z-\",k = 4) == \"AB-CDEF-GHIJ-KLMN-OPQR-STUV-WXYZ\"\n assert candidate(s = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ-0123456789\",k = 8) == \"ABCD-EFGHIJKL-MNOPQRST-UVWXYZ01-23456789\"\n assert candidate(s = \"a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z-0-1-2-3-4-5-6-7-8-9\",k = 7) == \"A-BCDEFGH-IJKLMNO-PQRSTUV-WXYZ012-3456789\"\n assert candidate(s = \"-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-\",k = 2) == \"AB-CD-EF-GH-IJ-KL-MN-OP-QR-ST-UV-WX-YZ\"\n assert candidate(s = \"1234567890-abcdefghijklmnopqrstuvwxyz-ABCDEFGHIJKLMNOPQRSTUVWXYZ\",k = 6) == \"12-345678-90ABCD-EFGHIJ-KLMNOP-QRSTUV-WXYZAB-CDEFGH-IJKLMN-OPQRST-UVWXYZ\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 1) == \"1-2-3-4-5-6-7-8-9-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\"\n assert candidate(s = \"123-456-789-0ABC-DEF\",k = 4) == \"1234-5678-90AB-CDEF\"\n assert candidate(s = \"9876543210-zyxwvutsrqponmlkjihgfedcba-9876543210-zyxwvutsrqponmlkjihgfedcba\",k = 5) == \"98-76543-210ZY-XWVUT-SRQPO-NMLKJ-IHGFE-DCBA9-87654-3210Z-YXWVU-TSRQP-ONMLK-JIHGF-EDCBA\"\n assert candidate(s = \"123-456-789-0-ABC-DEF-GHI-JKL-MNO-PQR-STU-VWX-YZ\",k = 2) == \"12-34-56-78-90-AB-CD-EF-GH-IJ-KL-MN-OP-QR-ST-UV-WX-YZ\"\n assert candidate(s = \"0123456789\",k = 2) == \"01-23-45-67-89\"\n assert candidate(s = \"ZEBRA-1234-APPLE-5678-BANANA-9012-CHERRY\",k = 4) == \"ZE-BRA1-234A-PPLE-5678-BANA-NA90-12CH-ERRY\"\n assert candidate(s = \"-abc-def-ghi-jkl-mno-pqr-stu-vwx-yz-123-456-789-0\",k = 7) == \"A-BCDEFGH-IJKLMNO-PQRSTUV-WXYZ123-4567890\"\n assert candidate(s = \"X-Y-Z\",k = 1) == \"X-Y-Z\"\n assert candidate(s = \"-ABCD-EFGH-IJKL-MNOP-QRST-UVWX-YZ-\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ\"\n assert candidate(s = \"Z\",k = 10) == \"Z\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-0\",k = 10) == \"1234567890\"\n assert candidate(s = \"123-456-7890-ABC-DEF\",k = 3) == \"1-234-567-890-ABC-DEF\"\n assert candidate(s = \"123-456-789-0ABC-DEF\",k = 3) == \"1-234-567-890-ABC-DEF\"\n assert candidate(s = \"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ\",k = 15) == \"123456-7890ABCDEFGHIJK-LMNOPQRSTUVWXYZ\"\n assert candidate(s = \"1234567890-abcdef-1234567890-ABCDEF\",k = 7) == \"1234-567890A-BCDEF12-3456789-0ABCDEF\"\n assert candidate(s = \"0000-0000-0000-0000\",k = 4) == \"0000-0000-0000-0000\"\n assert candidate(s = \"--a-b--c-d--e-f--g-h--i-j--\",k = 2) == \"AB-CD-EF-GH-IJ\"\n assert candidate(s = \"Z\",k = 1) == \"Z\"\n assert candidate(s = \"a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z\",k = 27) == \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n assert candidate(s = \"A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z\",k = 4) == \"AB-CDEF-GHIJ-KLMN-OPQR-STUV-WXYZ\"\n assert candidate(s = \"-A--B--C--D--E--F--G--H--I--J--K--L--M--N--O--P--Q--R--S--T--U--V--W--X--Y--Z-\",k = 2) == \"AB-CD-EF-GH-IJ-KL-MN-OP-QR-ST-UV-WX-YZ\"\n assert candidate(s = \"-A-B-C-D-E-F-G-H-I-J-K-L-M-N-O-P-Q-R-S-T-U-V-W-X-Y-Z-0-1-2-3-4-5-6-7-8-9-\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ-01234-56789\"\n assert candidate(s = \"LICENSE-KEY-FOR-EXAMPLE-1234567\",k = 7) == \"LICENS-EKEYFOR-EXAMPLE-1234567\"\n assert candidate(s = \"a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a-a\",k = 2) == \"A-AA-AA-AA-AA-AA-AA-AA-AA-AA-AA-AA-AA-AA-AA-AA\"\n assert candidate(s = \"---a---b---c---d---e---f---g---h---i---j---k---l---m---n---o---p---q---r---s---t---u---v---w---x---y---z---\",k = 5) == \"A-BCDEF-GHIJK-LMNOP-QRSTU-VWXYZ\"\n assert candidate(s = \"0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0\",k = 4) == \"00-0000-0000-0000-0000-0000-0000-0000-0000-0000-0000-0000-0000-0000\"\n assert candidate(s = \"1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0-1-2-3-4-5-6-7-8-9-0\",k = 10) == \"1234567890-1234567890-1234567890\"\n assert candidate(s = \"a-b-c-d-e-f-g-h-i-j-k-l-m-n-o-p-q-r-s-t-u-v-w-x-y-z\",k = 3) == \"AB-CDE-FGH-IJK-LMN-OPQ-RST-UVW-XYZ\"\n", "comparison": "exact"}, "public_tests": ["\"5F3Z-2e-9-w\"\n4", "\"2-5g-3-J\"\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().licenseKeyFormatting", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:44+00:00", "tests_total": 105, "tests_dropped": 2, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def license_key_formatting(s, k)", "container": null, "callable": "license_key_formatting", "parameters": [{"name": "s", "type": "String"}, {"name": "k", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 483, "task_id": "smallest-good-base", "difficulty": "Hard", "problem_description": "Given an integer n represented as a string, return the smallest good base of n.\n\nWe call k >= 2 a good base of n, if all digits of n base k are 1's.\n\nExample 1:\n\nInput: n = \"13\"\nOutput: \"3\"\nExplanation: 13 base 3 is 111.\n\nExample 2:\n\nInput: n = \"4681\"\nOutput: \"8\"\nExplanation: 4681 base 8 is 11111.\n\nExample 3:\n\nInput: n = \"1000000000000000000\"\nOutput: \"999999999999999999\"\nExplanation: 1000000000000000000 base 999999999999999999 is 11.\n\nConstraints:\n\n- n is an integer in the range [3, 10^18].\n- n does not contain any leading zeros.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = \"4681\") == \"8\"\n assert candidate(n = \"9\") == \"8\"\n assert candidate(n = \"104729\") == \"104728\"\n assert candidate(n = \"15\") == \"2\"\n assert candidate(n = \"218\") == \"217\"\n assert candidate(n = \"13\") == \"3\"\n assert candidate(n = \"81\") == \"80\"\n assert candidate(n = \"7\") == \"2\"\n assert candidate(n = \"3\") == \"2\"\n assert candidate(n = \"4\") == \"3\"\n assert candidate(n = \"121\") == \"3\"\n assert candidate(n = \"8\") == \"7\"\n assert candidate(n = \"21\") == \"4\"\n assert candidate(n = \"1023\") == \"2\"\n assert candidate(n = \"255\") == \"2\"\n assert candidate(n = \"91\") == \"9\"\n assert candidate(n = \"1000\") == \"999\"\n assert candidate(n = \"999\") == \"998\"\n assert candidate(n = \"1000000000000000000\") == \"999999999999999999\"\n assert candidate(n = \"2187\") == \"2186\"\n assert candidate(n = \"100\") == \"99\"\n assert candidate(n = \"343\") == \"18\"\n assert candidate(n = \"1801088541\") == \"1801088540\"\n assert candidate(n = \"2222222222222222222\") == \"2222222222222222221\"\n assert candidate(n = \"14348907\") == \"14348906\"\n assert candidate(n = \"59048\") == \"59047\"\n assert candidate(n = \"1125899906842623\") == \"2\"\n assert candidate(n = \"100000000\") == \"99999999\"\n assert candidate(n = \"79228162514264337593543950336\") == \"79228162514264337593543950335\"\n assert candidate(n = \"348678440099710752\") == \"348678440099710751\"\n assert candidate(n = \"222222222222222222\") == \"222222222222222221\"\n assert candidate(n = \"1234567890123456789\") == \"1234567890123456788\"\n assert candidate(n = \"617673396283947\") == \"617673396283946\"\n assert candidate(n = \"1000000000\") == \"999999999\"\n assert candidate(n = \"987654321\") == \"987654320\"\n assert candidate(n = \"298023223876953125\") == \"298023223876953124\"\n assert candidate(n = \"98765432109876543\") == \"98765432109876542\"\n assert candidate(n = \"3486784401\") == \"3486784400\"\n assert candidate(n = \"8191\") == \"2\"\n assert candidate(n = \"19683\") == \"19682\"\n assert candidate(n = \"12345678987654321\") == \"12345678987654320\"\n assert candidate(n = \"68719476736\") == \"68719476735\"\n assert candidate(n = \"549755813888\") == \"549755813887\"\n assert candidate(n = \"99999999999999999999999999999999999999999999999999999999999999999999999999999999999\") == \"99999999999999999999999999999999999999999999999999999999999999999999999999999999998\"\n assert candidate(n = \"3125\") == \"3124\"\n assert candidate(n = \"555555555555555555\") == \"555555555555555554\"\n assert candidate(n = \"281474976710656\") == \"281474976710655\"\n assert candidate(n = \"10000000000000000000000000000000000000000000000000000\") == \"9999999999999999999999999999999999999999999999999999\"\n assert candidate(n = \"18446744073709551615\") == \"2\"\n assert candidate(n = \"18014398509481984\") == \"18014398509481983\"\n assert candidate(n = \"193836733056657\") == \"193836733056656\"\n assert candidate(n = \"387420488\") == \"387420487\"\n assert candidate(n = \"8916100448256\") == \"8916100448255\"\n assert candidate(n = \"98765432109876543210987654321\") == \"98765432109876543210987654320\"\n assert candidate(n = \"6789101112131415161718192021222324252627282930\") == \"6789101112131415161718192021222324252627282929\"\n assert candidate(n = \"68719476735\") == \"2\"\n assert candidate(n = \"2357947691\") == \"2357947690\"\n assert candidate(n = \"1000000000000000000000000000000\") == \"999999999999999999999999999999\"\n assert candidate(n = \"4095\") == \"2\"\n assert candidate(n = \"65535\") == \"2\"\n assert candidate(n = \"16777216\") == \"16777215\"\n assert candidate(n = \"65537\") == \"65536\"\n assert candidate(n = \"111111111\") == \"10\"\n assert candidate(n = \"4398046511104\") == \"4398046511103\"\n assert candidate(n = \"111111111111111111\") == \"10\"\n assert candidate(n = \"823543\") == \"823542\"\n assert candidate(n = \"123456789101112131415\") == \"123456789101112131414\"\n assert candidate(n = \"101110111\") == \"101110110\"\n assert candidate(n = \"1111111111111111111\") == \"10\"\n assert candidate(n = \"38127987654321\") == \"38127987654320\"\n assert candidate(n = \"1111111111111111111111111111111\") == \"10\"\n assert candidate(n = \"161051\") == \"161050\"\n assert candidate(n = \"4294967295\") == \"2\"\n assert candidate(n = \"2305843009213693952\") == \"2305843009213693951\"\n assert candidate(n = \"1134903170\") == \"1134903169\"\n assert candidate(n = \"797161\") == \"3\"\n assert candidate(n = \"59049\") == \"59048\"\n assert candidate(n = \"678223072849\") == \"678223072848\"\n assert candidate(n = \"134217728\") == \"134217727\"\n assert candidate(n = \"999999999999999998\") == \"999999999999999997\"\n assert candidate(n = \"2000000000000000000\") == \"1999999999999999999\"\n assert candidate(n = \"999999999999999997\") == \"999999999999999996\"\n assert candidate(n = \"9223372036854775807\") == \"2\"\n assert candidate(n = \"123456789012345678\") == \"123456789012345677\"\n assert candidate(n = \"987654321987654321\") == \"987654321987654320\"\n assert candidate(n = \"515377520732011329\") == \"515377520732011328\"\n assert candidate(n = \"387420489\") == \"387420488\"\n assert candidate(n = \"282429536481\") == \"282429536480\"\n assert candidate(n = \"57896044618658097711785492504343953926634992332820282019728792003956564819949\") == \"57896044618658097711785492504343953926634992332820282019728792003956564819948\"\n assert candidate(n = \"268435455\") == \"2\"\n assert candidate(n = \"999999999\") == \"999999998\"\n assert candidate(n = \"9811\") == \"9810\"\n assert candidate(n = \"123456789\") == \"123456788\"\n assert candidate(n = \"3689348814741910323\") == \"3689348814741910322\"\n assert candidate(n = \"5555555555555555555\") == \"5555555555555555554\"\n assert candidate(n = \"999999999999999981\") == \"999999999999999980\"\n assert candidate(n = \"1024\") == \"1023\"\n assert candidate(n = \"1010101010101010101\") == \"100\"\n assert candidate(n = \"1111111111111111112\") == \"1111111111111111111\"\n assert candidate(n = \"555555555555555555555555555555\") == \"555555555555555555555555555554\"\n assert candidate(n = \"1000000000000000001\") == \"1000000000000000000\"\n assert candidate(n = \"78364164096\") == \"78364164095\"\n assert candidate(n = \"123456789012345678901234567890\") == \"123456789012345678901234567889\"\n assert candidate(n = \"1125899906842624\") == \"1125899906842623\"\n", "comparison": "exact"}, "public_tests": ["\"13\"", "\"4681\"", "\"1000000000000000000\""], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().smallestGoodBase", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:46+00:00", "tests_total": 104, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def smallest_good_base(n)", "container": null, "callable": "smallest_good_base", "parameters": [{"name": "n", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 485, "task_id": "max-consecutive-ones", "difficulty": "Easy", "problem_description": "Given a binary array nums, return the maximum number of consecutive 1's in the array.\n\nExample 1:\n\nInput: nums = [1,1,0,1,1,1]\nOutput: 3\nExplanation: The first two digits or the last three digits are consecutive 1s. The maximum number of consecutive 1s is 3.\n\nExample 2:\n\nInput: nums = [1,0,1,1,0,1]\nOutput: 2\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- nums[i] is either 0 or 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 0, 0, 0, 1, 0, 0, 1, 1, 0]) == 2\n assert candidate(nums = [1, 0, 1, 1, 0, 1]) == 2\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0]) == 4\n assert candidate(nums = [1, 0]) == 1\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1]) == 4\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 1]) == 1\n assert candidate(nums = [0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1]) == 3\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [0]) == 0\n assert candidate(nums = [1, 1, 0, 1, 1, 1]) == 3\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [1, 0, 1]) == 1\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 0, 0, 0, 0, 1]) == 1\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 1, 0, 1, 1]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 0]) == 9\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1]) == 4\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0]) == 2\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 9\n assert candidate(nums = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 29\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 2\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 2\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1]) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]) == 37\n assert candidate(nums = [1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1]) == 3\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1]) == 5\n assert candidate(nums = [1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0]) == 4\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 2\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 10\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0]) == 7\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0]) == 7\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 15\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 14\n assert candidate(nums = [1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1]) == 2\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 39\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 17\n assert candidate(nums = [1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]) == 29\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 20\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 11\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 38\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0]) == 3\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1]) == 2\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 1\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1]) == 4\n assert candidate(nums = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]) == 1\n assert candidate(nums = [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1]) == 3\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 20\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 17\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 30\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]) == 8\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 2\n assert candidate(nums = [1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]) == 7\n assert candidate(nums = [0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 29\n assert candidate(nums = [1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]) == 5\n assert candidate(nums = [1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1]) == 3\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 2\n assert candidate(nums = [1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 18\n assert candidate(nums = [1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1]) == 28\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1]) == 6\n assert candidate(nums = [0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 5\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1]) == 5\n assert candidate(nums = [1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0]) == 3\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 1\n", "comparison": "exact"}, "public_tests": ["[1,1,0,1,1,1]", "[1,0,1,1,0,1]"], "hints": ["You need to think about two things as far as any window is concerned. One is the starting point for the window. How do you detect that a new window of 1s has started? The next part is detecting the ending point for this window. How do you detect the ending point for an existing window? If you figure these two things out, you will be able to detect the windows of consecutive ones. All that remains afterward is to find the longest such window and return the size."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMaxConsecutiveOnes", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:51+00:00", "tests_total": 97, "tests_dropped": 0, "flags": [], "topic_tags": ["array"]}, "language": "ruby", "interface": {"raw_signature": "def find_max_consecutive_ones(nums)", "container": null, "callable": "find_max_consecutive_ones", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 486, "task_id": "predict-the-winner", "difficulty": "Medium", "problem_description": "You are given an integer array nums.\n\nTwo players are playing a game with this array: Player 1 and Player 2.\n\nPlayer 1 and Player 2 take turns, with Player 1 starting first. Both players start the game with a score of 0.\n\nAt each turn, the current player takes the number at either end of the array (i.e., nums[0] or nums[nums.length - 1]), removing it from the array and adding it to their own score. The game ends when there are no more elements in the array.\n\nReturn true if Player 1's final score is greater than or equal to Player 2's final score, and false otherwise.\n\nNote that a tie counts as a win for Player 1. You may assume that both players play optimally.\n\nExample 1:\n\nInput: nums = [1,5,2]\nOutput: false\nExplanation:\n- Player 1 must open by taking either 1 or 2, and both choices lead to the same result.\n- If Player 1 takes 1, the array becomes [5,2]. Player 2 takes 5, leaving 2 for Player 1.\n- If Player 1 takes 2, the array becomes [1,5]. Player 2 takes 5, leaving 1 for Player 1.\n- Either way, Player 1 finishes with 1 + 2 = 3 and Player 2 finishes with 5. Player 1 can never win, so return false.\n\nExample 2:\n\nInput: nums = [1,5,233,7]\nOutput: true\nExplanation:\n- Player 1 first takes 1, leaving [5,233,7]. Player 2 must then choose between 5 and 7, and no matter which number Player 2 chooses, Player 1 can take 233 on the next turn.\n- Player 1 finishes with a higher score (234) than Player 2 (12), so return true.\n\nConstraints:\n\n- 1 <= nums.length <= 20\n- 0 <= nums[i] <= 10^7\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [10, 10, 10, 10]) == True\n assert candidate(nums = [1, 5, 2]) == False\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [10]) == True\n assert candidate(nums = [1]) == True\n assert candidate(nums = [5, 17, 100, 11]) == True\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [1, 2, 3, 4]) == True\n assert candidate(nums = [1, 2, 3, 4, 5]) == True\n assert candidate(nums = [1, 2, 3, 7]) == True\n assert candidate(nums = [0, 0, 7, 6, 5, 6, 1]) == False\n assert candidate(nums = [5, 18, 6, 3, 1, 19, 2, 4, 10, 11]) == True\n assert candidate(nums = [1, 5, 233, 7]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [0, 0, 0, 0]) == True\n assert candidate(nums = [8, 15, 3, 7]) == True\n assert candidate(nums = [10, 10]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8]) == True\n assert candidate(nums = [1, 2]) == True\n assert candidate(nums = [1, 2, 3]) == True\n assert candidate(nums = [1, 3, 1]) == False\n assert candidate(nums = [5, 18, 4, 3, 9, 13, 13, 17]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41]) == True\n assert candidate(nums = [8, 15, 3, 7, 25, 10]) == True\n assert candidate(nums = [10000000, 9999999, 9999998, 9999997, 9999996, 9999995, 9999994, 9999993, 9999992, 9999991]) == True\n assert candidate(nums = [10000000, 1000000, 100000, 10000, 1000, 100, 10, 1, 0]) == True\n assert candidate(nums = [23, 17, 10, 14, 3, 8, 15, 21]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16]) == True\n assert candidate(nums = [1, 100, 1, 100, 1, 100, 1, 100]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [10, 20, 30, 40, 50]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [1000, 100, 10, 1, 1, 10, 100, 1000]) == True\n assert candidate(nums = [3, 1, 5, 4, 2]) == True\n assert candidate(nums = [1, 2, 3, 6, 5, 4, 3]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [10000000, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80]) == True\n assert candidate(nums = [10, 2, 5, 6, 7, 8]) == True\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == True\n assert candidate(nums = [8, 15, 3, 7, 10, 12, 14, 13]) == True\n assert candidate(nums = [10, 80, 90, 30, 50]) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == True\n assert candidate(nums = [100, 50, 200, 250, 300, 150, 100, 50, 200, 250, 300]) == True\n assert candidate(nums = [10, 80, 60, 20, 40, 30]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10000000]) == True\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == True\n assert candidate(nums = [23, 19, 45, 3, 12, 67, 2, 9, 15, 18, 21, 34, 56, 78, 90]) == True\n assert candidate(nums = [12, 5, 7, 23, 19, 18, 15, 10]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == True\n assert candidate(nums = [5, 2, 3, 4, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [1, 5, 2, 4, 6, 8, 10]) == True\n assert candidate(nums = [1, 2, 100, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60]) == True\n assert candidate(nums = [8, 15, 3, 7, 10]) == False\n assert candidate(nums = [19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == True\n assert candidate(nums = [8, 15, 3, 7, 6, 12]) == True\n assert candidate(nums = [3, 4, 6, 10, 2, 1, 5, 9, 7, 8]) == True\n assert candidate(nums = [10000000, 1, 10000000, 1, 10000000, 1, 10000000, 1]) == True\n assert candidate(nums = [7, 10, 12, 5, 8, 7, 3, 9]) == True\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == True\n assert candidate(nums = [10000000, 9999999, 9999998, 9999997, 9999996]) == True\n assert candidate(nums = [30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]) == True\n assert candidate(nums = [10, 20, 15, 10, 5]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == True\n assert candidate(nums = [50, 40, 30, 20, 10, 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == True\n assert candidate(nums = [23, 12, 32, 4, 55, 2, 3]) == False\n assert candidate(nums = [3, 1, 5, 4, 2, 9, 10, 6, 8, 7]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == True\n assert candidate(nums = [10000000, 0, 10000000, 0, 10000000, 0, 10000000, 0, 10000000, 0]) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == True\n assert candidate(nums = [8, 15, 3, 7, 10, 12]) == True\n assert candidate(nums = [2, 8, 5, 3, 7, 1, 9, 4]) == True\n assert candidate(nums = [20, 10, 3, 8, 5, 2, 7, 6, 1, 4]) == True\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35]) == True\n assert candidate(nums = [10000000, 1, 10000000, 1, 10000000, 1, 10000000, 1, 10000000, 1]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == True\n assert candidate(nums = [100, 200, 150, 100, 50, 25]) == True\n assert candidate(nums = [8, 15, 3, 7, 11, 12]) == True\n assert candidate(nums = [23, 15, 56, 7, 98, 1]) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == True\n assert candidate(nums = [3, 30, 27, 5, 20, 10]) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21]) == True\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == True\n assert candidate(nums = [5, 23, 7, 1, 9, 15, 3, 18, 11, 17, 2, 14, 6, 12, 8, 10, 4, 13, 16, 19]) == True\n assert candidate(nums = [23, 11, 17, 19, 21, 13, 5, 3, 2, 8]) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == True\n assert candidate(nums = [1, 100, 50, 25, 20, 10, 5, 1]) == True\n assert candidate(nums = [3, 1, 5, 8, 9, 2]) == True\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == True\n assert candidate(nums = [3, 9, 1, 2]) == True\n assert candidate(nums = [1, 23, 45, 6, 78, 90, 12, 34]) == True\n assert candidate(nums = [10000000, 9000000, 8000000, 7000000, 6000000, 5000000, 4000000, 3000000, 2000000, 1000000]) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == True\n assert candidate(nums = [1, 3, 1, 5, 2, 4]) == True\n assert candidate(nums = [10, 8, 6, 4, 2, 1, 3, 5, 7, 9]) == True\n", "comparison": "exact"}, "public_tests": ["[1,5,2]", "[1,5,233,7]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().predictTheWinner", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:50:53+00:00", "tests_total": 109, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "math", "dynamic-programming", "recursion", "minimax-algorithm", "game-theory", "zero-sum-game"]}, "language": "ruby", "interface": {"raw_signature": "def predict_the_winner(nums)", "container": null, "callable": "predict_the_winner", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 491, "task_id": "non-decreasing-subsequences", "difficulty": "Medium", "problem_description": "Given an integer array nums, return all the different possible non-decreasing subsequences of the given array with at least two elements. You may return the answer in any order.\n\nExample 1:\n\nInput: nums = [4,6,7,7]\nOutput: [[4,6],[4,6,7],[4,6,7,7],[4,7],[4,7,7],[6,7],[6,7,7],[7,7]]\n\nExample 2:\n\nInput: nums = [4,4,3,2,1]\nOutput: [[4,4]]\n\nConstraints:\n\n- 1 <= nums.length <= 15\n- -100 <= nums[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(nums=[1, 3, 2, 4, 5]), [[1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 4, 5], [1, 4], [1, 5], [3, 4, 5], [3, 4], [3, 5], [2, 4, 5], [2, 4], [2, 5], [4, 5]])\n assert answers_match(candidate(nums=[1, 2, 2, 3]), [[1, 2, 2, 3], [1, 2, 2], [1, 2, 3], [1, 2], [1, 3], [2, 2, 3], [2, 2], [2, 3]])\n assert answers_match(candidate(nums=[1, 2, 2, 2, 3, 3, 4]), [[1, 2, 2, 2, 3, 3, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4], [1, 3], [1, 4], [2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4], [2, 2, 2], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4], [2, 3], [2, 4], [3, 3, 4], [3, 3], [3, 4]])\n assert answers_match(candidate(nums=[3, 2, 1, 2, 3, 4, 2, 2, 3, 4]), [[3, 3, 4, 4], [3, 3, 3, 4], [3, 3, 3], [2, 2, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 4, 4], [2, 2, 2, 2, 3, 4], [2, 2, 2, 2, 3], [2, 2, 2, 2, 4], [2, 2, 2, 2], [1, 2, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 4, 4], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 4], [1, 3], [1, 4], [2, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 4, 4], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4], [2, 2, 2], [3, 4, 4], [3, 3, 4], [3, 3], [4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [2, 3, 4], [2, 3], [2, 4], [3, 4]])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 4, 4]), [[1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4], [1, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4], [2, 4], [3, 4, 4], [3, 4], [4, 4]])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [8, 9, 10], [8, 9], [8, 10], [9, 10]])\n assert answers_match(candidate(nums=[4, 6, 7, 7]), [[4, 6, 7, 7], [4, 6, 7], [4, 6], [4, 7, 7], [4, 7], [6, 7, 7], [6, 7], [7, 7]])\n assert answers_match(candidate(nums=[1, 2, 3, 4]), [[1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 4], [1, 3], [1, 4], [2, 3, 4], [2, 3], [2, 4], [3, 4]])\n assert answers_match(candidate(nums=[-1, 0, 1, 0, -1]), [[-1, 0, 1], [-1, 0, 0], [-1, 1], [-1, 0], [-1, -1], [0, 1], [0, 0]])\n assert answers_match(candidate(nums=[1, 3, 2, 4, 3, 5]), [[1, 3, 4, 5], [1, 3, 4], [1, 3, 3, 5], [1, 3, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 5], [1, 2], [1, 4, 5], [1, 4], [1, 3, 5], [1, 3], [1, 5], [3, 4, 5], [3, 4], [3, 3, 5], [3, 3], [2, 4, 5], [2, 4], [2, 3, 5], [2, 3], [2, 5], [4, 5], [3, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 5, 4, 3, 2, 1]), [[1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 4, 5, 5], [1, 4, 5], [1, 4, 4], [1, 5, 5], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 4, 5, 5], [2, 4, 5], [2, 4, 4], [2, 5, 5], [2, 5], [2, 4], [2, 3], [2, 2], [3, 4, 5, 5], [3, 4, 5], [3, 4, 4], [3, 5, 5], [3, 5], [3, 4], [3, 3], [4, 5, 5], [4, 5], [4, 4], [5, 5]])\n assert answers_match(candidate(nums=[5, 5, 5, 5]), [[5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [3, 4, 5], [3, 4], [3, 5], [4, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 3, 2, 1]), [[1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 3, 4], [1, 3, 3], [1, 4], [1, 3], [1, 2], [1, 1], [2, 3, 4], [2, 3, 3], [2, 4], [2, 3], [2, 2], [3, 4], [3, 3]])\n assert answers_match(candidate(nums=[1, 2, 2, 2, 3, 4]), [[1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 4], [1, 3], [1, 4], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4], [2, 2, 2], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [2, 3, 4], [2, 3], [2, 4], [3, 4]])\n assert answers_match(candidate(nums=[-1, 0, 1, 0, -1, -1]), [[-1, 0, 1], [-1, 0, 0], [-1, 1], [-1, 0], [-1, -1, -1], [0, 1], [0, 0], [-1, -1]])\n assert answers_match(candidate(nums=[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1]), [[-10, -9, -8, -7, -6, -5, -4, -3, -2, -1], [-10, -9, -8, -7, -6, -5, -4, -3, -2], [-10, -9, -8, -7, -6, -5, -4, -3, -1], [-10, -9, -8, -7, -6, -5, -4, -3], [-10, -9, -8, -7, -6, -5, -4, -2, -1], [-10, -9, -8, -7, -6, -5, -4, -2], [-10, -9, -8, -7, -6, -5, -4, -1], [-10, -9, -8, -7, -6, -5, -4], [-10, -9, -8, -7, -6, -5, -3, -2, -1], [-10, -9, -8, -7, -6, -5, -3, -2], [-10, -9, -8, -7, -6, -5, -3, -1], [-10, -9, -8, -7, -6, -5, -3], [-10, -9, -8, -7, -6, -5, -2, -1], [-10, -9, -8, -7, -6, -5, -2], [-10, -9, -8, -7, -6, -5, -1], [-10, -9, -8, -7, -6, -5], [-10, -9, -8, -7, -6, -4, -3, -2, -1], [-10, -9, -8, -7, -6, -4, -3, -2], [-10, -9, -8, -7, -6, -4, -3, -1], [-10, -9, -8, -7, -6, -4, -3], [-10, -9, -8, -7, -6, -4, -2, -1], [-10, -9, -8, -7, -6, -4, -2], [-10, -9, -8, -7, -6, -4, -1], [-10, -9, -8, -7, -6, -4], [-10, -9, -8, -7, -6, -3, -2, -1], [-10, -9, -8, -7, -6, -3, -2], [-10, -9, -8, -7, -6, -3, -1], [-10, -9, -8, -7, -6, -3], [-10, -9, -8, -7, -6, -2, -1], [-10, -9, -8, -7, -6, -2], [-10, -9, -8, -7, -6, -1], [-10, -9, -8, -7, -6], [-10, -9, -8, -7, -5, -4, -3, -2, -1], [-10, -9, -8, -7, -5, -4, -3, -2], [-10, -9, -8, -7, -5, -4, -3, -1], [-10, -9, -8, -7, -5, -4, -3], [-10, -9, -8, -7, -5, -4, -2, -1], [-10, -9, -8, -7, -5, -4, -2], [-10, -9, -8, -7, -5, -4, -1], [-10, -9, -8, -7, -5, -4], [-10, -9, -8, -7, -5, -3, -2, -1], [-10, -9, -8, -7, -5, -3, -2], [-10, -9, -8, -7, -5, -3, -1], [-10, -9, -8, -7, -5, -3], [-10, -9, -8, -7, -5, -2, -1], [-10, -9, -8, -7, -5, -2], [-10, -9, -8, -7, -5, -1], [-10, -9, -8, -7, -5], [-10, -9, -8, -7, -4, -3, -2, -1], [-10, -9, -8, -7, -4, -3, -2], [-10, -9, -8, -7, -4, -3, -1], [-10, -9, -8, -7, -4, -3], [-10, -9, -8, -7, -4, -2, -1], [-10, -9, -8, -7, -4, -2], [-10, -9, -8, -7, -4, -1], [-10, -9, -8, -7, -4], [-10, -9, -8, -7, -3, -2, -1], [-10, -9, -8, -7, -3, -2], [-10, -9, -8, -7, -3, -1], [-10, -9, -8, -7, -3], [-10, -9, -8, -7, -2, -1], [-10, -9, -8, -7, -2], [-10, -9, -8, -7, -1], [-10, -9, -8, -7], [-10, -9, -8, -6, -5, -4, -3, -2, -1], [-10, -9, -8, -6, -5, -4, -3, -2], [-10, -9, -8, -6, -5, -4, -3, -1], [-10, -9, -8, -6, -5, -4, -3], [-10, -9, -8, -6, -5, -4, -2, -1], [-10, -9, -8, -6, -5, -4, -2], [-10, -9, -8, -6, -5, -4, -1], [-10, -9, -8, -6, -5, -4], [-10, -9, -8, -6, -5, -3, -2, -1], [-10, -9, -8, -6, -5, -3, -2], [-10, -9, -8, -6, -5, -3, -1], [-10, -9, -8, -6, -5, -3], [-10, -9, -8, -6, -5, -2, -1], [-10, -9, -8, -6, -5, -2], [-10, -9, -8, -6, -5, -1], [-10, -9, -8, -6, -5], [-10, -9, -8, -6, -4, -3, -2, -1], [-10, -9, -8, -6, -4, -3, -2], [-10, -9, -8, -6, -4, -3, -1], [-10, -9, -8, -6, -4, -3], [-10, -9, -8, -6, -4, -2, -1], [-10, -9, -8, -6, -4, -2], [-10, -9, -8, -6, -4, -1], [-10, -9, -8, -6, -4], [-10, -9, -8, -6, -3, -2, -1], [-10, -9, -8, -6, -3, -2], [-10, -9, -8, -6, -3, -1], [-10, -9, -8, -6, -3], [-10, -9, -8, -6, -2, -1], [-10, -9, -8, -6, -2], [-10, -9, -8, -6, -1], [-10, -9, -8, -6], [-10, -9, -8, -5, -4, -3, -2, -1], [-10, -9, -8, -5, -4, -3, -2], [-10, -9, -8, -5, -4, -3, -1], [-10, -9, -8, -5, -4, -3], [-10, -9, -8, -5, -4, -2, -1], [-10, -9, -8, -5, -4, -2], [-10, -9, -8, -5, -4, -1], [-10, -9, -8, -5, -4], [-10, -9, -8, -5, -3, -2, -1], [-10, -9, -8, -5, -3, -2], [-10, -9, -8, -5, -3, -1], [-10, -9, -8, -5, -3], [-10, -9, -8, -5, -2, -1], [-10, -9, -8, -5, -2], [-10, -9, -8, -5, -1], [-10, -9, -8, -5], [-10, -9, -8, -4, -3, -2, -1], [-10, -9, -8, -4, -3, -2], [-10, -9, -8, -4, -3, -1], [-10, -9, -8, -4, -3], [-10, -9, -8, -4, -2, -1], [-10, -9, -8, -4, -2], [-10, -9, -8, -4, -1], [-10, -9, -8, -4], [-10, -9, -8, -3, -2, -1], [-10, -9, -8, -3, -2], [-10, -9, -8, -3, -1], [-10, -9, -8, -3], [-10, -9, -8, -2, -1], [-10, -9, -8, -2], [-10, -9, -8, -1], [-10, -9, -8], [-10, -9, -7, -6, -5, -4, -3, -2, -1], [-10, -9, -7, -6, -5, -4, -3, -2], [-10, -9, -7, -6, -5, -4, -3, -1], [-10, -9, -7, -6, -5, -4, -3], [-10, -9, -7, -6, -5, -4, -2, -1], [-10, -9, -7, -6, -5, -4, -2], [-10, -9, -7, -6, -5, -4, -1], [-10, -9, -7, -6, -5, -4], [-10, -9, -7, -6, -5, -3, -2, -1], [-10, -9, -7, -6, -5, -3, -2], [-10, -9, -7, -6, -5, -3, -1], [-10, -9, -7, -6, -5, -3], [-10, -9, -7, -6, -5, -2, -1], [-10, -9, -7, -6, -5, -2], [-10, -9, -7, -6, -5, -1], [-10, -9, -7, -6, -5], [-10, -9, -7, -6, -4, -3, -2, -1], [-10, -9, -7, -6, -4, -3, -2], [-10, -9, -7, -6, -4, -3, -1], [-10, -9, -7, -6, -4, -3], [-10, -9, -7, -6, -4, -2, -1], [-10, -9, -7, -6, -4, -2], [-10, -9, -7, -6, -4, -1], [-10, -9, -7, -6, -4], [-10, -9, -7, -6, -3, -2, -1], [-10, -9, -7, -6, -3, -2], [-10, -9, -7, -6, -3, -1], [-10, -9, -7, -6, -3], [-10, -9, -7, -6, -2, -1], [-10, -9, -7, -6, -2], [-10, -9, -7, -6, -1], [-10, -9, -7, -6], [-10, -9, -7, -5, -4, -3, -2, -1], [-10, -9, -7, -5, -4, -3, -2], [-10, -9, -7, -5, -4, -3, -1], [-10, -9, -7, -5, -4, -3], [-10, -9, -7, -5, -4, -2, -1], [-10, -9, -7, -5, -4, -2], [-10, -9, -7, -5, -4, -1], [-10, -9, -7, -5, -4], [-10, -9, -7, -5, -3, -2, -1], [-10, -9, -7, -5, -3, -2], [-10, -9, -7, -5, -3, -1], [-10, -9, -7, -5, -3], [-10, -9, -7, -5, -2, -1], [-10, -9, -7, -5, -2], [-10, -9, -7, -5, -1], [-10, -9, -7, -5], [-10, -9, -7, -4, -3, -2, -1], [-10, -9, -7, -4, -3, -2], [-10, -9, -7, -4, -3, -1], [-10, -9, -7, -4, -3], [-10, -9, -7, -4, -2, -1], [-10, -9, -7, -4, -2], [-10, -9, -7, -4, -1], [-10, -9, -7, -4], [-10, -9, -7, -3, -2, -1], [-10, -9, -7, -3, -2], [-10, -9, -7, -3, -1], [-10, -9, -7, -3], [-10, -9, -7, -2, -1], [-10, -9, -7, -2], [-10, -9, -7, -1], [-10, -9, -7], [-10, -9, -6, -5, -4, -3, -2, -1], [-10, -9, -6, -5, -4, -3, -2], [-10, -9, -6, -5, -4, -3, -1], [-10, -9, -6, -5, -4, -3], [-10, -9, -6, -5, -4, -2, -1], [-10, -9, -6, -5, -4, -2], [-10, -9, -6, -5, -4, -1], [-10, -9, -6, -5, -4], [-10, -9, -6, -5, -3, -2, -1], [-10, -9, -6, -5, -3, -2], [-10, -9, -6, -5, -3, -1], [-10, -9, -6, -5, -3], [-10, -9, -6, -5, -2, -1], [-10, -9, -6, -5, -2], [-10, -9, -6, -5, -1], [-10, -9, -6, -5], [-10, -9, -6, -4, -3, -2, -1], [-10, -9, -6, -4, -3, -2], [-10, -9, -6, -4, -3, -1], [-10, -9, -6, -4, -3], [-10, -9, -6, -4, -2, -1], [-10, -9, -6, -4, -2], [-10, -9, -6, -4, -1], [-10, -9, -6, -4], [-10, -9, -6, -3, -2, -1], [-10, -9, -6, -3, -2], [-10, -9, -6, -3, -1], [-10, -9, -6, -3], [-10, -9, -6, -2, -1], [-10, -9, -6, -2], [-10, -9, -6, -1], [-10, -9, -6], [-10, -9, -5, -4, -3, -2, -1], [-10, -9, -5, -4, -3, -2], [-10, -9, -5, -4, -3, -1], [-10, -9, -5, -4, -3], [-10, -9, -5, -4, -2, -1], [-10, -9, -5, -4, -2], [-10, -9, -5, -4, -1], [-10, -9, -5, -4], [-10, -9, -5, -3, -2, -1], [-10, -9, -5, -3, -2], [-10, -9, -5, -3, -1], [-10, -9, -5, -3], [-10, -9, -5, -2, -1], [-10, -9, -5, -2], [-10, -9, -5, -1], [-10, -9, -5], [-10, -9, -4, -3, -2, -1], [-10, -9, -4, -3, -2], [-10, -9, -4, -3, -1], [-10, -9, -4, -3], [-10, -9, -4, -2, -1], [-10, -9, -4, -2], [-10, -9, -4, -1], [-10, -9, -4], [-10, -9, -3, -2, -1], [-10, -9, -3, -2], [-10, -9, -3, -1], [-10, -9, -3], [-10, -9, -2, -1], [-10, -9, -2], [-10, -9, -1], [-10, -9], [-10, -8, -7, -6, -5, -4, -3, -2, -1], [-10, -8, -7, -6, -5, -4, -3, -2], [-10, -8, -7, -6, -5, -4, -3, -1], [-10, -8, -7, -6, -5, -4, -3], [-10, -8, -7, -6, -5, -4, -2, -1], [-10, -8, -7, -6, -5, -4, -2], [-10, -8, -7, -6, -5, -4, -1], [-10, -8, -7, -6, -5, -4], [-10, -8, -7, -6, -5, -3, -2, -1], [-10, -8, -7, -6, -5, -3, -2], [-10, -8, -7, -6, -5, -3, -1], [-10, -8, -7, -6, -5, -3], [-10, -8, -7, -6, -5, -2, -1], [-10, -8, -7, -6, -5, -2], [-10, -8, -7, -6, -5, -1], [-10, -8, -7, -6, -5], [-10, -8, -7, -6, -4, -3, -2, -1], [-10, -8, -7, -6, -4, -3, -2], [-10, -8, -7, -6, -4, -3, -1], [-10, -8, -7, -6, -4, -3], [-10, -8, -7, -6, -4, -2, -1], [-10, -8, -7, -6, -4, -2], [-10, -8, -7, -6, -4, -1], [-10, -8, -7, -6, -4], [-10, -8, -7, -6, -3, -2, -1], [-10, -8, -7, -6, -3, -2], [-10, -8, -7, -6, -3, -1], [-10, -8, -7, -6, -3], [-10, -8, -7, -6, -2, -1], [-10, -8, -7, -6, -2], [-10, -8, -7, -6, -1], [-10, -8, -7, -6], [-10, -8, -7, -5, -4, -3, -2, -1], [-10, -8, -7, -5, -4, -3, -2], [-10, -8, -7, -5, -4, -3, -1], [-10, -8, -7, -5, -4, -3], [-10, -8, -7, -5, -4, -2, -1], [-10, -8, -7, -5, -4, -2], [-10, -8, -7, -5, -4, -1], [-10, -8, -7, -5, -4], [-10, -8, -7, -5, -3, -2, -1], [-10, -8, -7, -5, -3, -2], [-10, -8, -7, -5, -3, -1], [-10, -8, -7, -5, -3], [-10, -8, -7, -5, -2, -1], [-10, -8, -7, -5, -2], [-10, -8, -7, -5, -1], [-10, -8, -7, -5], [-10, -8, -7, -4, -3, -2, -1], [-10, -8, -7, -4, -3, -2], [-10, -8, -7, -4, -3, -1], [-10, -8, -7, -4, -3], [-10, -8, -7, -4, -2, -1], [-10, -8, -7, -4, -2], [-10, -8, -7, -4, -1], [-10, -8, -7, -4], [-10, -8, -7, -3, -2, -1], [-10, -8, -7, -3, -2], [-10, -8, -7, -3, -1], [-10, -8, -7, -3], [-10, -8, -7, -2, -1], [-10, -8, -7, -2], [-10, -8, -7, -1], [-10, -8, -7], [-10, -8, -6, -5, -4, -3, -2, -1], [-10, -8, -6, -5, -4, -3, -2], [-10, -8, -6, -5, -4, -3, -1], [-10, -8, -6, -5, -4, -3], [-10, -8, -6, -5, -4, -2, -1], [-10, -8, -6, -5, -4, -2], [-10, -8, -6, -5, -4, -1], [-10, -8, -6, -5, -4], [-10, -8, -6, -5, -3, -2, -1], [-10, -8, -6, -5, -3, -2], [-10, -8, -6, -5, -3, -1], [-10, -8, -6, -5, -3], [-10, -8, -6, -5, -2, -1], [-10, -8, -6, -5, -2], [-10, -8, -6, -5, -1], [-10, -8, -6, -5], [-10, -8, -6, -4, -3, -2, -1], [-10, -8, -6, -4, -3, -2], [-10, -8, -6, -4, -3, -1], [-10, -8, -6, -4, -3], [-10, -8, -6, -4, -2, -1], [-10, -8, -6, -4, -2], [-10, -8, -6, -4, -1], [-10, -8, -6, -4], [-10, -8, -6, -3, -2, -1], [-10, -8, -6, -3, -2], [-10, -8, -6, -3, -1], [-10, -8, -6, -3], [-10, -8, -6, -2, -1], [-10, -8, -6, -2], [-10, -8, -6, -1], [-10, -8, -6], [-10, -8, -5, -4, -3, -2, -1], [-10, -8, -5, -4, -3, -2], [-10, -8, -5, -4, -3, -1], [-10, -8, -5, -4, -3], [-10, -8, -5, -4, -2, -1], [-10, -8, -5, -4, -2], [-10, -8, -5, -4, -1], [-10, -8, -5, -4], [-10, -8, -5, -3, -2, -1], [-10, -8, -5, -3, -2], [-10, -8, -5, -3, -1], [-10, -8, -5, -3], [-10, -8, -5, -2, -1], [-10, -8, -5, -2], [-10, -8, -5, -1], [-10, -8, -5], [-10, -8, -4, -3, -2, -1], [-10, -8, -4, -3, -2], [-10, -8, -4, -3, -1], [-10, -8, -4, -3], [-10, -8, -4, -2, -1], [-10, -8, -4, -2], [-10, -8, -4, -1], [-10, -8, -4], [-10, -8, -3, -2, -1], [-10, -8, -3, -2], [-10, -8, -3, -1], [-10, -8, -3], [-10, -8, -2, -1], [-10, -8, -2], [-10, -8, -1], [-10, -8], [-10, -7, -6, -5, -4, -3, -2, -1], [-10, -7, -6, -5, -4, -3, -2], [-10, -7, -6, -5, -4, -3, -1], [-10, -7, -6, -5, -4, -3], [-10, -7, -6, -5, -4, -2, -1], [-10, -7, -6, -5, -4, -2], [-10, -7, -6, -5, -4, -1], [-10, -7, -6, -5, -4], [-10, -7, -6, -5, -3, -2, -1], [-10, -7, -6, -5, -3, -2], [-10, -7, -6, -5, -3, -1], [-10, -7, -6, -5, -3], [-10, -7, -6, -5, -2, -1], [-10, -7, -6, -5, -2], [-10, -7, -6, -5, -1], [-10, -7, -6, -5], [-10, -7, -6, -4, -3, -2, -1], [-10, -7, -6, -4, -3, -2], [-10, -7, -6, -4, -3, -1], [-10, -7, -6, -4, -3], [-10, -7, -6, -4, -2, -1], [-10, -7, -6, -4, -2], [-10, -7, -6, -4, -1], [-10, -7, -6, -4], [-10, -7, -6, -3, -2, -1], [-10, -7, -6, -3, -2], [-10, -7, -6, -3, -1], [-10, -7, -6, -3], [-10, -7, -6, -2, -1], [-10, -7, -6, -2], [-10, -7, -6, -1], [-10, -7, -6], [-10, -7, -5, -4, -3, -2, -1], [-10, -7, -5, -4, -3, -2], [-10, -7, -5, -4, -3, -1], [-10, -7, -5, -4, -3], [-10, -7, -5, -4, -2, -1], [-10, -7, -5, -4, -2], [-10, -7, -5, -4, -1], [-10, -7, -5, -4], [-10, -7, -5, -3, -2, -1], [-10, -7, -5, -3, -2], [-10, -7, -5, -3, -1], [-10, -7, -5, -3], [-10, -7, -5, -2, -1], [-10, -7, -5, -2], [-10, -7, -5, -1], [-10, -7, -5], [-10, -7, -4, -3, -2, -1], [-10, -7, -4, -3, -2], [-10, -7, -4, -3, -1], [-10, -7, -4, -3], [-10, -7, -4, -2, -1], [-10, -7, -4, -2], [-10, -7, -4, -1], [-10, -7, -4], [-10, -7, -3, -2, -1], [-10, -7, -3, -2], [-10, -7, -3, -1], [-10, -7, -3], [-10, -7, -2, -1], [-10, -7, -2], [-10, -7, -1], [-10, -7], [-10, -6, -5, -4, -3, -2, -1], [-10, -6, -5, -4, -3, -2], [-10, -6, -5, -4, -3, -1], [-10, -6, -5, -4, -3], [-10, -6, -5, -4, -2, -1], [-10, -6, -5, -4, -2], [-10, -6, -5, -4, -1], [-10, -6, -5, -4], [-10, -6, -5, -3, -2, -1], [-10, -6, -5, -3, -2], [-10, -6, -5, -3, -1], [-10, -6, -5, -3], [-10, -6, -5, -2, -1], [-10, -6, -5, -2], [-10, -6, -5, -1], [-10, -6, -5], [-10, -6, -4, -3, -2, -1], [-10, -6, -4, -3, -2], [-10, -6, -4, -3, -1], [-10, -6, -4, -3], [-10, -6, -4, -2, -1], [-10, -6, -4, -2], [-10, -6, -4, -1], [-10, -6, -4], [-10, -6, -3, -2, -1], [-10, -6, -3, -2], [-10, -6, -3, -1], [-10, -6, -3], [-10, -6, -2, -1], [-10, -6, -2], [-10, -6, -1], [-10, -6], [-10, -5, -4, -3, -2, -1], [-10, -5, -4, -3, -2], [-10, -5, -4, -3, -1], [-10, -5, -4, -3], [-10, -5, -4, -2, -1], [-10, -5, -4, -2], [-10, -5, -4, -1], [-10, -5, -4], [-10, -5, -3, -2, -1], [-10, -5, -3, -2], [-10, -5, -3, -1], [-10, -5, -3], [-10, -5, -2, -1], [-10, -5, -2], [-10, -5, -1], [-10, -5], [-10, -4, -3, -2, -1], [-10, -4, -3, -2], [-10, -4, -3, -1], [-10, -4, -3], [-10, -4, -2, -1], [-10, -4, -2], [-10, -4, -1], [-10, -4], [-10, -3, -2, -1], [-10, -3, -2], [-10, -3, -1], [-10, -3], [-10, -2, -1], [-10, -2], [-10, -1], [-9, -8, -7, -6, -5, -4, -3, -2, -1], [-9, -8, -7, -6, -5, -4, -3, -2], [-9, -8, -7, -6, -5, -4, -3, -1], [-9, -8, -7, -6, -5, -4, -3], [-9, -8, -7, -6, -5, -4, -2, -1], [-9, -8, -7, -6, -5, -4, -2], [-9, -8, -7, -6, -5, -4, -1], [-9, -8, -7, -6, -5, -4], [-9, -8, -7, -6, -5, -3, -2, -1], [-9, -8, -7, -6, -5, -3, -2], [-9, -8, -7, -6, -5, -3, -1], [-9, -8, -7, -6, -5, -3], [-9, -8, -7, -6, -5, -2, -1], [-9, -8, -7, -6, -5, -2], [-9, -8, -7, -6, -5, -1], [-9, -8, -7, -6, -5], [-9, -8, -7, -6, -4, -3, -2, -1], [-9, -8, -7, -6, -4, -3, -2], [-9, -8, -7, -6, -4, -3, -1], [-9, -8, -7, -6, -4, -3], [-9, -8, -7, -6, -4, -2, -1], [-9, -8, -7, -6, -4, -2], [-9, -8, -7, -6, -4, -1], [-9, -8, -7, -6, -4], [-9, -8, -7, -6, -3, -2, -1], [-9, -8, -7, -6, -3, -2], [-9, -8, -7, -6, -3, -1], [-9, -8, -7, -6, -3], [-9, -8, -7, -6, -2, -1], [-9, -8, -7, -6, -2], [-9, -8, -7, -6, -1], [-9, -8, -7, -6], [-9, -8, -7, -5, -4, -3, -2, -1], [-9, -8, -7, -5, -4, -3, -2], [-9, -8, -7, -5, -4, -3, -1], [-9, -8, -7, -5, -4, -3], [-9, -8, -7, -5, -4, -2, -1], [-9, -8, -7, -5, -4, -2], [-9, -8, -7, -5, -4, -1], [-9, -8, -7, -5, -4], [-9, -8, -7, -5, -3, -2, -1], [-9, -8, -7, -5, -3, -2], [-9, -8, -7, -5, -3, -1], [-9, -8, -7, -5, -3], [-9, -8, -7, -5, -2, -1], [-9, -8, -7, -5, -2], [-9, -8, -7, -5, -1], [-9, -8, -7, -5], [-9, -8, -7, -4, -3, -2, -1], [-9, -8, -7, -4, -3, -2], [-9, -8, -7, -4, -3, -1], [-9, -8, -7, -4, -3], [-9, -8, -7, -4, -2, -1], [-9, -8, -7, -4, -2], [-9, -8, -7, -4, -1], [-9, -8, -7, -4], [-9, -8, -7, -3, -2, -1], [-9, -8, -7, -3, -2], [-9, -8, -7, -3, -1], [-9, -8, -7, -3], [-9, -8, -7, -2, -1], [-9, -8, -7, -2], [-9, -8, -7, -1], [-9, -8, -7], [-9, -8, -6, -5, -4, -3, -2, -1], [-9, -8, -6, -5, -4, -3, -2], [-9, -8, -6, -5, -4, -3, -1], [-9, -8, -6, -5, -4, -3], [-9, -8, -6, -5, -4, -2, -1], [-9, -8, -6, -5, -4, -2], [-9, -8, -6, -5, -4, -1], [-9, -8, -6, -5, -4], [-9, -8, -6, -5, -3, -2, -1], [-9, -8, -6, -5, -3, -2], [-9, -8, -6, -5, -3, -1], [-9, -8, -6, -5, -3], [-9, -8, -6, -5, -2, -1], [-9, -8, -6, -5, -2], [-9, -8, -6, -5, -1], [-9, -8, -6, -5], [-9, -8, -6, -4, -3, -2, -1], [-9, -8, -6, -4, -3, -2], [-9, -8, -6, -4, -3, -1], [-9, -8, -6, -4, -3], [-9, -8, -6, -4, -2, -1], [-9, -8, -6, -4, -2], [-9, -8, -6, -4, -1], [-9, -8, -6, -4], [-9, -8, -6, -3, -2, -1], [-9, -8, -6, -3, -2], [-9, -8, -6, -3, -1], [-9, -8, -6, -3], [-9, -8, -6, -2, -1], [-9, -8, -6, -2], [-9, -8, -6, -1], [-9, -8, -6], [-9, -8, -5, -4, -3, -2, -1], [-9, -8, -5, -4, -3, -2], [-9, -8, -5, -4, -3, -1], [-9, -8, -5, -4, -3], [-9, -8, -5, -4, -2, -1], [-9, -8, -5, -4, -2], [-9, -8, -5, -4, -1], [-9, -8, -5, -4], [-9, -8, -5, -3, -2, -1], [-9, -8, -5, -3, -2], [-9, -8, -5, -3, -1], [-9, -8, -5, -3], [-9, -8, -5, -2, -1], [-9, -8, -5, -2], [-9, -8, -5, -1], [-9, -8, -5], [-9, -8, -4, -3, -2, -1], [-9, -8, -4, -3, -2], [-9, -8, -4, -3, -1], [-9, -8, -4, -3], [-9, -8, -4, -2, -1], [-9, -8, -4, -2], [-9, -8, -4, -1], [-9, -8, -4], [-9, -8, -3, -2, -1], [-9, -8, -3, -2], [-9, -8, -3, -1], [-9, -8, -3], [-9, -8, -2, -1], [-9, -8, -2], [-9, -8, -1], [-9, -8], [-9, -7, -6, -5, -4, -3, -2, -1], [-9, -7, -6, -5, -4, -3, -2], [-9, -7, -6, -5, -4, -3, -1], [-9, -7, -6, -5, -4, -3], [-9, -7, -6, -5, -4, -2, -1], [-9, -7, -6, -5, -4, -2], [-9, -7, -6, -5, -4, -1], [-9, -7, -6, -5, -4], [-9, -7, -6, -5, -3, -2, -1], [-9, -7, -6, -5, -3, -2], [-9, -7, -6, -5, -3, -1], [-9, -7, -6, -5, -3], [-9, -7, -6, -5, -2, -1], [-9, -7, -6, -5, -2], [-9, -7, -6, -5, -1], [-9, -7, -6, -5], [-9, -7, -6, -4, -3, -2, -1], [-9, -7, -6, -4, -3, -2], [-9, -7, -6, -4, -3, -1], [-9, -7, -6, -4, -3], [-9, -7, -6, -4, -2, -1], [-9, -7, -6, -4, -2], [-9, -7, -6, -4, -1], [-9, -7, -6, -4], [-9, -7, -6, -3, -2, -1], [-9, -7, -6, -3, -2], [-9, -7, -6, -3, -1], [-9, -7, -6, -3], [-9, -7, -6, -2, -1], [-9, -7, -6, -2], [-9, -7, -6, -1], [-9, -7, -6], [-9, -7, -5, -4, -3, -2, -1], [-9, -7, -5, -4, -3, -2], [-9, -7, -5, -4, -3, -1], [-9, -7, -5, -4, -3], [-9, -7, -5, -4, -2, -1], [-9, -7, -5, -4, -2], [-9, -7, -5, -4, -1], [-9, -7, -5, -4], [-9, -7, -5, -3, -2, -1], [-9, -7, -5, -3, -2], [-9, -7, -5, -3, -1], [-9, -7, -5, -3], [-9, -7, -5, -2, -1], [-9, -7, -5, -2], [-9, -7, -5, -1], [-9, -7, -5], [-9, -7, -4, -3, -2, -1], [-9, -7, -4, -3, -2], [-9, -7, -4, -3, -1], [-9, -7, -4, -3], [-9, -7, -4, -2, -1], [-9, -7, -4, -2], [-9, -7, -4, -1], [-9, -7, -4], [-9, -7, -3, -2, -1], [-9, -7, -3, -2], [-9, -7, -3, -1], [-9, -7, -3], [-9, -7, -2, -1], [-9, -7, -2], [-9, -7, -1], [-9, -7], [-9, -6, -5, -4, -3, -2, -1], [-9, -6, -5, -4, -3, -2], [-9, -6, -5, -4, -3, -1], [-9, -6, -5, -4, -3], [-9, -6, -5, -4, -2, -1], [-9, -6, -5, -4, -2], [-9, -6, -5, -4, -1], [-9, -6, -5, -4], [-9, -6, -5, -3, -2, -1], [-9, -6, -5, -3, -2], [-9, -6, -5, -3, -1], [-9, -6, -5, -3], [-9, -6, -5, -2, -1], [-9, -6, -5, -2], [-9, -6, -5, -1], [-9, -6, -5], [-9, -6, -4, -3, -2, -1], [-9, -6, -4, -3, -2], [-9, -6, -4, -3, -1], [-9, -6, -4, -3], [-9, -6, -4, -2, -1], [-9, -6, -4, -2], [-9, -6, -4, -1], [-9, -6, -4], [-9, -6, -3, -2, -1], [-9, -6, -3, -2], [-9, -6, -3, -1], [-9, -6, -3], [-9, -6, -2, -1], [-9, -6, -2], [-9, -6, -1], [-9, -6], [-9, -5, -4, -3, -2, -1], [-9, -5, -4, -3, -2], [-9, -5, -4, -3, -1], [-9, -5, -4, -3], [-9, -5, -4, -2, -1], [-9, -5, -4, -2], [-9, -5, -4, -1], [-9, -5, -4], [-9, -5, -3, -2, -1], [-9, -5, -3, -2], [-9, -5, -3, -1], [-9, -5, -3], [-9, -5, -2, -1], [-9, -5, -2], [-9, -5, -1], [-9, -5], [-9, -4, -3, -2, -1], [-9, -4, -3, -2], [-9, -4, -3, -1], [-9, -4, -3], [-9, -4, -2, -1], [-9, -4, -2], [-9, -4, -1], [-9, -4], [-9, -3, -2, -1], [-9, -3, -2], [-9, -3, -1], [-9, -3], [-9, -2, -1], [-9, -2], [-9, -1], [-8, -7, -6, -5, -4, -3, -2, -1], [-8, -7, -6, -5, -4, -3, -2], [-8, -7, -6, -5, -4, -3, -1], [-8, -7, -6, -5, -4, -3], [-8, -7, -6, -5, -4, -2, -1], [-8, -7, -6, -5, -4, -2], [-8, -7, -6, -5, -4, -1], [-8, -7, -6, -5, -4], [-8, -7, -6, -5, -3, -2, -1], [-8, -7, -6, -5, -3, -2], [-8, -7, -6, -5, -3, -1], [-8, -7, -6, -5, -3], [-8, -7, -6, -5, -2, -1], [-8, -7, -6, -5, -2], [-8, -7, -6, -5, -1], [-8, -7, -6, -5], [-8, -7, -6, -4, -3, -2, -1], [-8, -7, -6, -4, -3, -2], [-8, -7, -6, -4, -3, -1], [-8, -7, -6, -4, -3], [-8, -7, -6, -4, -2, -1], [-8, -7, -6, -4, -2], [-8, -7, -6, -4, -1], [-8, -7, -6, -4], [-8, -7, -6, -3, -2, -1], [-8, -7, -6, -3, -2], [-8, -7, -6, -3, -1], [-8, -7, -6, -3], [-8, -7, -6, -2, -1], [-8, -7, -6, -2], [-8, -7, -6, -1], [-8, -7, -6], [-8, -7, -5, -4, -3, -2, -1], [-8, -7, -5, -4, -3, -2], [-8, -7, -5, -4, -3, -1], [-8, -7, -5, -4, -3], [-8, -7, -5, -4, -2, -1], [-8, -7, -5, -4, -2], [-8, -7, -5, -4, -1], [-8, -7, -5, -4], [-8, -7, -5, -3, -2, -1], [-8, -7, -5, -3, -2], [-8, -7, -5, -3, -1], [-8, -7, -5, -3], [-8, -7, -5, -2, -1], [-8, -7, -5, -2], [-8, -7, -5, -1], [-8, -7, -5], [-8, -7, -4, -3, -2, -1], [-8, -7, -4, -3, -2], [-8, -7, -4, -3, -1], [-8, -7, -4, -3], [-8, -7, -4, -2, -1], [-8, -7, -4, -2], [-8, -7, -4, -1], [-8, -7, -4], [-8, -7, -3, -2, -1], [-8, -7, -3, -2], [-8, -7, -3, -1], [-8, -7, -3], [-8, -7, -2, -1], [-8, -7, -2], [-8, -7, -1], [-8, -7], [-8, -6, -5, -4, -3, -2, -1], [-8, -6, -5, -4, -3, -2], [-8, -6, -5, -4, -3, -1], [-8, -6, -5, -4, -3], [-8, -6, -5, -4, -2, -1], [-8, -6, -5, -4, -2], [-8, -6, -5, -4, -1], [-8, -6, -5, -4], [-8, -6, -5, -3, -2, -1], [-8, -6, -5, -3, -2], [-8, -6, -5, -3, -1], [-8, -6, -5, -3], [-8, -6, -5, -2, -1], [-8, -6, -5, -2], [-8, -6, -5, -1], [-8, -6, -5], [-8, -6, -4, -3, -2, -1], [-8, -6, -4, -3, -2], [-8, -6, -4, -3, -1], [-8, -6, -4, -3], [-8, -6, -4, -2, -1], [-8, -6, -4, -2], [-8, -6, -4, -1], [-8, -6, -4], [-8, -6, -3, -2, -1], [-8, -6, -3, -2], [-8, -6, -3, -1], [-8, -6, -3], [-8, -6, -2, -1], [-8, -6, -2], [-8, -6, -1], [-8, -6], [-8, -5, -4, -3, -2, -1], [-8, -5, -4, -3, -2], [-8, -5, -4, -3, -1], [-8, -5, -4, -3], [-8, -5, -4, -2, -1], [-8, -5, -4, -2], [-8, -5, -4, -1], [-8, -5, -4], [-8, -5, -3, -2, -1], [-8, -5, -3, -2], [-8, -5, -3, -1], [-8, -5, -3], [-8, -5, -2, -1], [-8, -5, -2], [-8, -5, -1], [-8, -5], [-8, -4, -3, -2, -1], [-8, -4, -3, -2], [-8, -4, -3, -1], [-8, -4, -3], [-8, -4, -2, -1], [-8, -4, -2], [-8, -4, -1], [-8, -4], [-8, -3, -2, -1], [-8, -3, -2], [-8, -3, -1], [-8, -3], [-8, -2, -1], [-8, -2], [-8, -1], [-7, -6, -5, -4, -3, -2, -1], [-7, -6, -5, -4, -3, -2], [-7, -6, -5, -4, -3, -1], [-7, -6, -5, -4, -3], [-7, -6, -5, -4, -2, -1], [-7, -6, -5, -4, -2], [-7, -6, -5, -4, -1], [-7, -6, -5, -4], [-7, -6, -5, -3, -2, -1], [-7, -6, -5, -3, -2], [-7, -6, -5, -3, -1], [-7, -6, -5, -3], [-7, -6, -5, -2, -1], [-7, -6, -5, -2], [-7, -6, -5, -1], [-7, -6, -5], [-7, -6, -4, -3, -2, -1], [-7, -6, -4, -3, -2], [-7, -6, -4, -3, -1], [-7, -6, -4, -3], [-7, -6, -4, -2, -1], [-7, -6, -4, -2], [-7, -6, -4, -1], [-7, -6, -4], [-7, -6, -3, -2, -1], [-7, -6, -3, -2], [-7, -6, -3, -1], [-7, -6, -3], [-7, -6, -2, -1], [-7, -6, -2], [-7, -6, -1], [-7, -6], [-7, -5, -4, -3, -2, -1], [-7, -5, -4, -3, -2], [-7, -5, -4, -3, -1], [-7, -5, -4, -3], [-7, -5, -4, -2, -1], [-7, -5, -4, -2], [-7, -5, -4, -1], [-7, -5, -4], [-7, -5, -3, -2, -1], [-7, -5, -3, -2], [-7, -5, -3, -1], [-7, -5, -3], [-7, -5, -2, -1], [-7, -5, -2], [-7, -5, -1], [-7, -5], [-7, -4, -3, -2, -1], [-7, -4, -3, -2], [-7, -4, -3, -1], [-7, -4, -3], [-7, -4, -2, -1], [-7, -4, -2], [-7, -4, -1], [-7, -4], [-7, -3, -2, -1], [-7, -3, -2], [-7, -3, -1], [-7, -3], [-7, -2, -1], [-7, -2], [-7, -1], [-6, -5, -4, -3, -2, -1], [-6, -5, -4, -3, -2], [-6, -5, -4, -3, -1], [-6, -5, -4, -3], [-6, -5, -4, -2, -1], [-6, -5, -4, -2], [-6, -5, -4, -1], [-6, -5, -4], [-6, -5, -3, -2, -1], [-6, -5, -3, -2], [-6, -5, -3, -1], [-6, -5, -3], [-6, -5, -2, -1], [-6, -5, -2], [-6, -5, -1], [-6, -5], [-6, -4, -3, -2, -1], [-6, -4, -3, -2], [-6, -4, -3, -1], [-6, -4, -3], [-6, -4, -2, -1], [-6, -4, -2], [-6, -4, -1], [-6, -4], [-6, -3, -2, -1], [-6, -3, -2], [-6, -3, -1], [-6, -3], [-6, -2, -1], [-6, -2], [-6, -1], [-5, -4, -3, -2, -1], [-5, -4, -3, -2], [-5, -4, -3, -1], [-5, -4, -3], [-5, -4, -2, -1], [-5, -4, -2], [-5, -4, -1], [-5, -4], [-5, -3, -2, -1], [-5, -3, -2], [-5, -3, -1], [-5, -3], [-5, -2, -1], [-5, -2], [-5, -1], [-4, -3, -2, -1], [-4, -3, -2], [-4, -3, -1], [-4, -3], [-4, -2, -1], [-4, -2], [-4, -1], [-3, -2, -1], [-3, -2], [-3, -1], [-2, -1]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1]), [[1, 1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1], [1, 1]])\n assert answers_match(candidate(nums=[5, 5, 4, 4, 3, 3]), [[5, 5], [4, 4], [3, 3]])\n assert answers_match(candidate(nums=[3, 2, 1]), [])\n assert answers_match(candidate(nums=[1, 3, 2, 4, 3]), [[1, 3, 4], [1, 3, 3], [1, 2, 4], [1, 2, 3], [1, 2], [1, 4], [1, 3], [3, 4], [3, 3], [2, 4], [2, 3]])\n assert answers_match(candidate(nums=[7, 7, 7, 7]), [[7, 7, 7, 7], [7, 7, 7], [7, 7]])\n assert answers_match(candidate(nums=[1, 2, 3]), [[1, 2, 3], [1, 2], [1, 3], [2, 3]])\n assert answers_match(candidate(nums=[1, 2, 3, 2, 1]), [[1, 2, 3], [1, 2, 2], [1, 3], [1, 2], [1, 1], [2, 3], [2, 2]])\n assert answers_match(candidate(nums=[4, 4, 3, 2, 1]), [[4, 4]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 3, 2, 1, 2, 3, 4]), [[1, 2, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3], [1, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 1, 2, 3, 4], [1, 1, 2, 3], [1, 1, 2, 4], [1, 1, 2], [1, 1, 3, 4], [1, 1, 3], [1, 1, 4], [1, 1], [2, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3], [2, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4], [2, 2, 2], [3, 4, 4], [3, 3, 3, 4], [3, 3, 3], [4, 4], [3, 3, 4], [3, 3], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 4], [1, 3], [1, 4], [2, 3, 4], [2, 3], [2, 4], [3, 4]])\n assert answers_match(candidate(nums=[100, -100, 0, 0]), [[-100, 0, 0], [-100, 0], [0, 0]])\n assert answers_match(candidate(nums=[3, 1, 2, 4, 3, 5, 1, 2, 4, 5, 6, 2, 3, 4, 5]), [[3, 4, 5, 5, 6], [3, 4, 5, 5, 5], [3, 4, 4, 5, 6], [3, 4, 4, 5, 5], [3, 4, 4, 6], [3, 4, 4, 4, 5], [3, 4, 4, 4], [3, 3, 5, 5, 6], [3, 3, 5, 5, 5], [3, 3, 4, 5, 6], [3, 3, 4, 5, 5], [3, 3, 4, 6], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 5, 6], [3, 3, 5, 5], [3, 3, 6], [3, 3, 3, 4, 5], [3, 3, 3, 4], [3, 3, 3, 5], [3, 3, 3], [1, 2, 4, 5, 5, 6], [1, 2, 4, 5, 5, 5], [1, 2, 4, 4, 5, 6], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 6], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 3, 5, 5, 6], [1, 2, 3, 5, 5, 5], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5, 6], [1, 2, 3, 5, 5], [1, 2, 3, 6], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 5, 5, 6], [1, 2, 5, 5, 5], [1, 2, 2, 4, 5, 6], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 6], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 5, 6], [1, 2, 2, 5, 5], [1, 2, 2, 6], [1, 2, 2, 2, 3, 4, 5], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 5], [1, 2, 2, 2], [1, 4, 5, 5, 6], [1, 4, 5, 5, 5], [1, 4, 4, 5, 6], [1, 4, 4, 5, 5], [1, 4, 4, 6], [1, 4, 4, 4, 5], [1, 4, 4, 4], [1, 3, 5, 5, 6], [1, 3, 5, 5, 5], [1, 3, 4, 5, 6], [1, 3, 4, 5, 5], [1, 3, 4, 6], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 5, 6], [1, 3, 5, 5], [1, 3, 6], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5], [1, 3, 3], [1, 5, 5, 6], [1, 5, 5, 5], [1, 1, 2, 4, 5, 6], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 6], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 5, 6], [1, 1, 2, 5, 5], [1, 1, 2, 6], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 4, 5, 6], [1, 1, 4, 5, 5], [1, 1, 4, 6], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 5, 6], [1, 1, 5, 5], [1, 1, 6], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5], [1, 1], [2, 4, 5, 5, 6], [2, 4, 5, 5, 5], [2, 4, 4, 5, 6], [2, 4, 4, 5, 5], [2, 4, 4, 6], [2, 4, 4, 4, 5], [2, 4, 4, 4], [2, 3, 5, 5, 6], [2, 3, 5, 5, 5], [2, 3, 4, 5, 6], [2, 3, 4, 5, 5], [2, 3, 4, 6], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 5, 6], [2, 3, 5, 5], [2, 3, 6], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5], [2, 3, 3], [2, 5, 5, 6], [2, 5, 5, 5], [2, 2, 4, 5, 6], [2, 2, 4, 5, 5], [2, 2, 4, 6], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 5, 6], [2, 2, 5, 5], [2, 2, 6], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 4], [2, 2, 2, 3, 5], [2, 2, 2, 3], [2, 2, 2, 4, 5], [2, 2, 2, 4], [2, 2, 2, 5], [2, 2, 2], [4, 5, 5, 6], [4, 5, 5, 5], [4, 4, 5, 6], [4, 4, 5, 5], [4, 4, 6], [4, 4, 4, 5], [4, 4, 4], [3, 5, 5, 6], [3, 5, 5, 5], [3, 4, 5, 6], [3, 4, 5, 5], [3, 4, 6], [3, 4, 4, 5], [3, 4, 4], [3, 5, 6], [3, 5, 5], [3, 6], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5], [3, 3], [5, 5, 6], [5, 5, 5], [1, 2, 4, 5, 6], [1, 2, 4, 5, 5], [1, 2, 4, 6], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 5, 6], [1, 2, 5, 5], [1, 2, 6], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5], [1, 2, 2], [1, 4, 5, 6], [1, 4, 5, 5], [1, 4, 6], [1, 4, 4, 5], [1, 4, 4], [1, 5, 6], [1, 5, 5], [1, 6], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [2, 4, 5, 6], [2, 4, 5, 5], [2, 4, 6], [2, 4, 4, 5], [2, 4, 4], [2, 5, 6], [2, 5, 5], [2, 6], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [4, 5, 6], [4, 5, 5], [4, 6], [4, 4, 5], [4, 4], [5, 6], [5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [3, 4, 5], [3, 4], [3, 5], [4, 5]])\n assert answers_match(candidate(nums=[3, 3, 3, 3, 3, 3, 3, 3, 3, 3]), [[3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3], [3, 3, 3], [3, 3]])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5]), [[1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3, 5, 5, 5], [1, 2, 2, 3, 3, 3, 5, 5], [1, 2, 2, 3, 3, 3, 5], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5, 5], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5, 5], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5, 5, 5], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5, 5], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5, 5], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 5, 5], [1, 2, 3, 3, 3, 4, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 5, 5, 5], [1, 2, 3, 3, 3, 5, 5], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5, 5], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5, 5], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5, 5], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5, 5, 5], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5, 5], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5, 5], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 3, 4, 4, 5, 5], [1, 3, 3, 3, 4, 4, 5], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4, 5, 5, 5], [1, 3, 3, 3, 4, 5, 5], [1, 3, 3, 3, 4, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 5, 5, 5], [1, 3, 3, 3, 5, 5], [1, 3, 3, 3, 5], [1, 3, 3, 3], [1, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5, 5], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5, 5], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5, 5, 5], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5, 5], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5, 5], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 5, 5, 5], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5, 5], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5, 5], [1, 5, 5], [1, 5], [2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 5, 5], [2, 2, 3, 3, 3, 4, 5], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 3, 3, 3, 5, 5], [2, 2, 3, 3, 3, 5], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 5, 5, 5], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5, 5], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5, 5], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5, 5], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5, 5], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5, 5, 5], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5, 5], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5, 5], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 3, 3, 3, 4, 4, 5, 5], [2, 3, 3, 3, 4, 4, 5], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4, 5, 5, 5], [2, 3, 3, 3, 4, 5, 5], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 5, 5, 5], [2, 3, 3, 3, 5, 5], [2, 3, 3, 3, 5], [2, 3, 3, 3], [2, 3, 3, 4, 4, 5, 5, 5], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5, 5], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5, 5], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5, 5, 5], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5, 5], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5, 5], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 5, 5, 5], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5, 5], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5, 5], [2, 5, 5], [2, 5], [3, 3, 3, 4, 4, 5, 5, 5], [3, 3, 3, 4, 4, 5, 5], [3, 3, 3, 4, 4, 5], [3, 3, 3, 4, 4], [3, 3, 3, 4, 5, 5, 5], [3, 3, 3, 4, 5, 5], [3, 3, 3, 4, 5], [3, 3, 3, 4], [3, 3, 3, 5, 5, 5], [3, 3, 3, 5, 5], [3, 3, 3, 5], [3, 3, 3], [3, 3, 4, 4, 5, 5, 5], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5, 5], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5, 5], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 5, 5, 5], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5, 5], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5, 5], [3, 5, 5], [3, 5], [4, 4, 5, 5, 5], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5, 5], [4, 5, 5], [4, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[3, 8, 7, 1, 2, 1, 5, 6, 7, 8, 10]), [[3, 8, 8, 10], [3, 8, 8], [3, 7, 7, 8, 10], [3, 7, 7, 8], [3, 7, 7, 10], [3, 7, 7], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 10], [3, 5, 8], [3, 5, 10], [3, 5], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 10], [3, 6, 8], [3, 6, 10], [3, 6], [3, 7, 8, 10], [3, 7, 8], [3, 7, 10], [3, 7], [3, 8, 10], [3, 8], [3, 10], [8, 8, 10], [8, 8], [7, 7, 8, 10], [7, 7, 8], [7, 7, 10], [7, 7], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 10], [1, 2, 8], [1, 2, 10], [1, 2], [1, 1, 5, 6, 7, 8, 10], [1, 1, 5, 6, 7, 8], [1, 1, 5, 6, 7, 10], [1, 1, 5, 6, 7], [1, 1, 5, 6, 8, 10], [1, 1, 5, 6, 8], [1, 1, 5, 6, 10], [1, 1, 5, 6], [1, 1, 5, 7, 8, 10], [1, 1, 5, 7, 8], [1, 1, 5, 7, 10], [1, 1, 5, 7], [1, 1, 5, 8, 10], [1, 1, 5, 8], [1, 1, 5, 10], [1, 1, 5], [1, 1, 6, 7, 8, 10], [1, 1, 6, 7, 8], [1, 1, 6, 7, 10], [1, 1, 6, 7], [1, 1, 6, 8, 10], [1, 1, 6, 8], [1, 1, 6, 10], [1, 1, 6], [1, 1, 7, 8, 10], [1, 1, 7, 8], [1, 1, 7, 10], [1, 1, 7], [1, 1, 8, 10], [1, 1, 8], [1, 1, 10], [1, 1], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 10], [2, 5, 8], [2, 5, 10], [2, 5], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 10], [2, 6, 8], [2, 6, 10], [2, 6], [2, 7, 8, 10], [2, 7, 8], [2, 7, 10], [2, 7], [2, 8, 10], [2, 8], [2, 10], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 10], [1, 5, 8], [1, 5, 10], [1, 5], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 10], [1, 6, 8], [1, 6, 10], [1, 6], [1, 7, 8, 10], [1, 7, 8], [1, 7, 10], [1, 7], [1, 8, 10], [1, 8], [1, 10], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 10], [5, 6, 8], [5, 6, 10], [5, 6], [5, 7, 8, 10], [5, 7, 8], [5, 7, 10], [5, 7], [5, 8, 10], [5, 8], [5, 10], [6, 7, 8, 10], [6, 7, 8], [6, 7, 10], [6, 7], [6, 8, 10], [6, 8], [6, 10], [7, 8, 10], [7, 8], [7, 10], [8, 10]])\n assert answers_match(candidate(nums=[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]), [[1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2], [1, 2, 2, 2, 2], [1, 1, 2, 2, 2], [1, 1, 1, 2, 2], [1, 1, 1, 1, 2], [1, 1, 1, 1, 1], [2, 2, 2, 2], [1, 2, 2, 2], [1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1, 1], [2, 2, 2], [1, 2, 2], [1, 1, 2], [1, 1, 1], [2, 2], [1, 2], [1, 1]])\n assert answers_match(candidate(nums=[1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9]), [[1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 7, 9], [1, 3, 4, 5, 6, 7, 7], [1, 3, 4, 5, 6, 6, 8, 9], [1, 3, 4, 5, 6, 6, 8], [1, 3, 4, 5, 6, 6, 7, 9], [1, 3, 4, 5, 6, 6, 7], [1, 3, 4, 5, 6, 6, 9], [1, 3, 4, 5, 6, 6], [1, 3, 4, 5, 5, 7, 8, 9], [1, 3, 4, 5, 5, 7, 8], [1, 3, 4, 5, 5, 7, 7, 9], [1, 3, 4, 5, 5, 7, 7], [1, 3, 4, 5, 5, 6, 8, 9], [1, 3, 4, 5, 5, 6, 8], [1, 3, 4, 5, 5, 6, 7, 9], [1, 3, 4, 5, 5, 6, 7], [1, 3, 4, 5, 5, 6, 9], [1, 3, 4, 5, 5, 6], [1, 3, 4, 5, 5, 8, 9], [1, 3, 4, 5, 5, 8], [1, 3, 4, 5, 5, 7, 9], [1, 3, 4, 5, 5, 7], [1, 3, 4, 5, 5, 9], [1, 3, 4, 5, 5], [1, 3, 4, 4, 6, 7, 8, 9], [1, 3, 4, 4, 6, 7, 8], [1, 3, 4, 4, 6, 7, 7, 9], [1, 3, 4, 4, 6, 7, 7], [1, 3, 4, 4, 6, 6, 8, 9], [1, 3, 4, 4, 6, 6, 8], [1, 3, 4, 4, 6, 6, 7, 9], [1, 3, 4, 4, 6, 6, 7], [1, 3, 4, 4, 6, 6, 9], [1, 3, 4, 4, 6, 6], [1, 3, 4, 4, 5, 7, 8, 9], [1, 3, 4, 4, 5, 7, 8], [1, 3, 4, 4, 5, 7, 7, 9], [1, 3, 4, 4, 5, 7, 7], [1, 3, 4, 4, 5, 6, 8, 9], [1, 3, 4, 4, 5, 6, 8], [1, 3, 4, 4, 5, 6, 7, 9], [1, 3, 4, 4, 5, 6, 7], [1, 3, 4, 4, 5, 6, 9], [1, 3, 4, 4, 5, 6], [1, 3, 4, 4, 5, 8, 9], [1, 3, 4, 4, 5, 8], [1, 3, 4, 4, 5, 7, 9], [1, 3, 4, 4, 5, 7], [1, 3, 4, 4, 5, 9], [1, 3, 4, 4, 5], [1, 3, 4, 4, 7, 8, 9], [1, 3, 4, 4, 7, 8], [1, 3, 4, 4, 7, 7, 9], [1, 3, 4, 4, 7, 7], [1, 3, 4, 4, 6, 8, 9], [1, 3, 4, 4, 6, 8], [1, 3, 4, 4, 6, 7, 9], [1, 3, 4, 4, 6, 7], [1, 3, 4, 4, 6, 9], [1, 3, 4, 4, 6], [1, 3, 4, 4, 8, 9], [1, 3, 4, 4, 8], [1, 3, 4, 4, 7, 9], [1, 3, 4, 4, 7], [1, 3, 4, 4, 9], [1, 3, 4, 4], [1, 3, 3, 5, 6, 7, 8, 9], [1, 3, 3, 5, 6, 7, 8], [1, 3, 3, 5, 6, 7, 7, 9], [1, 3, 3, 5, 6, 7, 7], [1, 3, 3, 5, 6, 6, 8, 9], [1, 3, 3, 5, 6, 6, 8], [1, 3, 3, 5, 6, 6, 7, 9], [1, 3, 3, 5, 6, 6, 7], [1, 3, 3, 5, 6, 6, 9], [1, 3, 3, 5, 6, 6], [1, 3, 3, 5, 5, 7, 8, 9], [1, 3, 3, 5, 5, 7, 8], [1, 3, 3, 5, 5, 7, 7, 9], [1, 3, 3, 5, 5, 7, 7], [1, 3, 3, 5, 5, 6, 8, 9], [1, 3, 3, 5, 5, 6, 8], [1, 3, 3, 5, 5, 6, 7, 9], [1, 3, 3, 5, 5, 6, 7], [1, 3, 3, 5, 5, 6, 9], [1, 3, 3, 5, 5, 6], [1, 3, 3, 5, 5, 8, 9], [1, 3, 3, 5, 5, 8], [1, 3, 3, 5, 5, 7, 9], [1, 3, 3, 5, 5, 7], [1, 3, 3, 5, 5, 9], [1, 3, 3, 5, 5], [1, 3, 3, 4, 6, 7, 8, 9], [1, 3, 3, 4, 6, 7, 8], [1, 3, 3, 4, 6, 7, 7, 9], [1, 3, 3, 4, 6, 7, 7], [1, 3, 3, 4, 6, 6, 8, 9], [1, 3, 3, 4, 6, 6, 8], [1, 3, 3, 4, 6, 6, 7, 9], [1, 3, 3, 4, 6, 6, 7], [1, 3, 3, 4, 6, 6, 9], [1, 3, 3, 4, 6, 6], [1, 3, 3, 4, 5, 7, 8, 9], [1, 3, 3, 4, 5, 7, 8], [1, 3, 3, 4, 5, 7, 7, 9], [1, 3, 3, 4, 5, 7, 7], [1, 3, 3, 4, 5, 6, 8, 9], [1, 3, 3, 4, 5, 6, 8], [1, 3, 3, 4, 5, 6, 7, 9], [1, 3, 3, 4, 5, 6, 7], [1, 3, 3, 4, 5, 6, 9], [1, 3, 3, 4, 5, 6], [1, 3, 3, 4, 5, 8, 9], [1, 3, 3, 4, 5, 8], [1, 3, 3, 4, 5, 7, 9], [1, 3, 3, 4, 5, 7], [1, 3, 3, 4, 5, 9], [1, 3, 3, 4, 5], [1, 3, 3, 4, 7, 8, 9], [1, 3, 3, 4, 7, 8], [1, 3, 3, 4, 7, 7, 9], [1, 3, 3, 4, 7, 7], [1, 3, 3, 4, 6, 8, 9], [1, 3, 3, 4, 6, 8], [1, 3, 3, 4, 6, 7, 9], [1, 3, 3, 4, 6, 7], [1, 3, 3, 4, 6, 9], [1, 3, 3, 4, 6], [1, 3, 3, 4, 8, 9], [1, 3, 3, 4, 8], [1, 3, 3, 4, 7, 9], [1, 3, 3, 4, 7], [1, 3, 3, 4, 9], [1, 3, 3, 4], [1, 3, 3, 6, 7, 8, 9], [1, 3, 3, 6, 7, 8], [1, 3, 3, 6, 7, 7, 9], [1, 3, 3, 6, 7, 7], [1, 3, 3, 6, 6, 8, 9], [1, 3, 3, 6, 6, 8], [1, 3, 3, 6, 6, 7, 9], [1, 3, 3, 6, 6, 7], [1, 3, 3, 6, 6, 9], [1, 3, 3, 6, 6], [1, 3, 3, 5, 7, 8, 9], [1, 3, 3, 5, 7, 8], [1, 3, 3, 5, 7, 7, 9], [1, 3, 3, 5, 7, 7], [1, 3, 3, 5, 6, 8, 9], [1, 3, 3, 5, 6, 8], [1, 3, 3, 5, 6, 7, 9], [1, 3, 3, 5, 6, 7], [1, 3, 3, 5, 6, 9], [1, 3, 3, 5, 6], [1, 3, 3, 5, 8, 9], [1, 3, 3, 5, 8], [1, 3, 3, 5, 7, 9], [1, 3, 3, 5, 7], [1, 3, 3, 5, 9], [1, 3, 3, 5], [1, 3, 3, 7, 8, 9], [1, 3, 3, 7, 8], [1, 3, 3, 7, 7, 9], [1, 3, 3, 7, 7], [1, 3, 3, 6, 8, 9], [1, 3, 3, 6, 8], [1, 3, 3, 6, 7, 9], [1, 3, 3, 6, 7], [1, 3, 3, 6, 9], [1, 3, 3, 6], [1, 3, 3, 8, 9], [1, 3, 3, 8], [1, 3, 3, 7, 9], [1, 3, 3, 7], [1, 3, 3, 9], [1, 3, 3], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 7, 9], [1, 2, 4, 5, 6, 7, 7], [1, 2, 4, 5, 6, 6, 8, 9], [1, 2, 4, 5, 6, 6, 8], [1, 2, 4, 5, 6, 6, 7, 9], [1, 2, 4, 5, 6, 6, 7], [1, 2, 4, 5, 6, 6, 9], [1, 2, 4, 5, 6, 6], [1, 2, 4, 5, 5, 7, 8, 9], [1, 2, 4, 5, 5, 7, 8], [1, 2, 4, 5, 5, 7, 7, 9], [1, 2, 4, 5, 5, 7, 7], [1, 2, 4, 5, 5, 6, 8, 9], [1, 2, 4, 5, 5, 6, 8], [1, 2, 4, 5, 5, 6, 7, 9], [1, 2, 4, 5, 5, 6, 7], [1, 2, 4, 5, 5, 6, 9], [1, 2, 4, 5, 5, 6], [1, 2, 4, 5, 5, 8, 9], [1, 2, 4, 5, 5, 8], [1, 2, 4, 5, 5, 7, 9], [1, 2, 4, 5, 5, 7], [1, 2, 4, 5, 5, 9], [1, 2, 4, 5, 5], [1, 2, 4, 4, 6, 7, 8, 9], [1, 2, 4, 4, 6, 7, 8], [1, 2, 4, 4, 6, 7, 7, 9], [1, 2, 4, 4, 6, 7, 7], [1, 2, 4, 4, 6, 6, 8, 9], [1, 2, 4, 4, 6, 6, 8], [1, 2, 4, 4, 6, 6, 7, 9], [1, 2, 4, 4, 6, 6, 7], [1, 2, 4, 4, 6, 6, 9], [1, 2, 4, 4, 6, 6], [1, 2, 4, 4, 5, 7, 8, 9], [1, 2, 4, 4, 5, 7, 8], [1, 2, 4, 4, 5, 7, 7, 9], [1, 2, 4, 4, 5, 7, 7], [1, 2, 4, 4, 5, 6, 8, 9], [1, 2, 4, 4, 5, 6, 8], [1, 2, 4, 4, 5, 6, 7, 9], [1, 2, 4, 4, 5, 6, 7], [1, 2, 4, 4, 5, 6, 9], [1, 2, 4, 4, 5, 6], [1, 2, 4, 4, 5, 8, 9], [1, 2, 4, 4, 5, 8], [1, 2, 4, 4, 5, 7, 9], [1, 2, 4, 4, 5, 7], [1, 2, 4, 4, 5, 9], [1, 2, 4, 4, 5], [1, 2, 4, 4, 7, 8, 9], [1, 2, 4, 4, 7, 8], [1, 2, 4, 4, 7, 7, 9], [1, 2, 4, 4, 7, 7], [1, 2, 4, 4, 6, 8, 9], [1, 2, 4, 4, 6, 8], [1, 2, 4, 4, 6, 7, 9], [1, 2, 4, 4, 6, 7], [1, 2, 4, 4, 6, 9], [1, 2, 4, 4, 6], [1, 2, 4, 4, 8, 9], [1, 2, 4, 4, 8], [1, 2, 4, 4, 7, 9], [1, 2, 4, 4, 7], [1, 2, 4, 4, 9], [1, 2, 4, 4], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 7, 9], [1, 2, 3, 5, 6, 7, 7], [1, 2, 3, 5, 6, 6, 8, 9], [1, 2, 3, 5, 6, 6, 8], [1, 2, 3, 5, 6, 6, 7, 9], [1, 2, 3, 5, 6, 6, 7], [1, 2, 3, 5, 6, 6, 9], [1, 2, 3, 5, 6, 6], [1, 2, 3, 5, 5, 7, 8, 9], [1, 2, 3, 5, 5, 7, 8], [1, 2, 3, 5, 5, 7, 7, 9], [1, 2, 3, 5, 5, 7, 7], [1, 2, 3, 5, 5, 6, 8, 9], [1, 2, 3, 5, 5, 6, 8], [1, 2, 3, 5, 5, 6, 7, 9], [1, 2, 3, 5, 5, 6, 7], [1, 2, 3, 5, 5, 6, 9], [1, 2, 3, 5, 5, 6], [1, 2, 3, 5, 5, 8, 9], [1, 2, 3, 5, 5, 8], [1, 2, 3, 5, 5, 7, 9], [1, 2, 3, 5, 5, 7], [1, 2, 3, 5, 5, 9], [1, 2, 3, 5, 5], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 7, 9], [1, 2, 3, 4, 6, 7, 7], [1, 2, 3, 4, 6, 6, 8, 9], [1, 2, 3, 4, 6, 6, 8], [1, 2, 3, 4, 6, 6, 7, 9], [1, 2, 3, 4, 6, 6, 7], [1, 2, 3, 4, 6, 6, 9], [1, 2, 3, 4, 6, 6], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 7, 9], [1, 2, 3, 4, 5, 7, 7], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 7, 9], [1, 2, 3, 4, 7, 7], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7], [1, 2, 3, 4, 9], [1, 2, 3, 4], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 7, 9], [1, 2, 3, 6, 7, 7], [1, 2, 3, 6, 6, 8, 9], [1, 2, 3, 6, 6, 8], [1, 2, 3, 6, 6, 7, 9], [1, 2, 3, 6, 6, 7], [1, 2, 3, 6, 6, 9], [1, 2, 3, 6, 6], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 7, 9], [1, 2, 3, 5, 7, 7], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7], [1, 2, 3, 5, 9], [1, 2, 3, 5], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8], [1, 2, 3, 7, 7, 9], [1, 2, 3, 7, 7], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7], [1, 2, 3, 6, 9], [1, 2, 3, 6], [1, 2, 3, 8, 9], [1, 2, 3, 8], [1, 2, 3, 7, 9], [1, 2, 3, 7], [1, 2, 3, 9], [1, 2, 3], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 7, 9], [1, 2, 5, 6, 7, 7], [1, 2, 5, 6, 6, 8, 9], [1, 2, 5, 6, 6, 8], [1, 2, 5, 6, 6, 7, 9], [1, 2, 5, 6, 6, 7], [1, 2, 5, 6, 6, 9], [1, 2, 5, 6, 6], [1, 2, 5, 5, 7, 8, 9], [1, 2, 5, 5, 7, 8], [1, 2, 5, 5, 7, 7, 9], [1, 2, 5, 5, 7, 7], [1, 2, 5, 5, 6, 8, 9], [1, 2, 5, 5, 6, 8], [1, 2, 5, 5, 6, 7, 9], [1, 2, 5, 5, 6, 7], [1, 2, 5, 5, 6, 9], [1, 2, 5, 5, 6], [1, 2, 5, 5, 8, 9], [1, 2, 5, 5, 8], [1, 2, 5, 5, 7, 9], [1, 2, 5, 5, 7], [1, 2, 5, 5, 9], [1, 2, 5, 5], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 7, 9], [1, 2, 4, 6, 7, 7], [1, 2, 4, 6, 6, 8, 9], [1, 2, 4, 6, 6, 8], [1, 2, 4, 6, 6, 7, 9], [1, 2, 4, 6, 6, 7], [1, 2, 4, 6, 6, 9], [1, 2, 4, 6, 6], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 7, 9], [1, 2, 4, 5, 7, 7], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7], [1, 2, 4, 5, 9], [1, 2, 4, 5], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8], [1, 2, 4, 7, 7, 9], [1, 2, 4, 7, 7], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7], [1, 2, 4, 6, 9], [1, 2, 4, 6], [1, 2, 4, 8, 9], [1, 2, 4, 8], [1, 2, 4, 7, 9], [1, 2, 4, 7], [1, 2, 4, 9], [1, 2, 4], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8], [1, 2, 6, 7, 7, 9], [1, 2, 6, 7, 7], [1, 2, 6, 6, 8, 9], [1, 2, 6, 6, 8], [1, 2, 6, 6, 7, 9], [1, 2, 6, 6, 7], [1, 2, 6, 6, 9], [1, 2, 6, 6], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8], [1, 2, 5, 7, 7, 9], [1, 2, 5, 7, 7], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7], [1, 2, 5, 6, 9], [1, 2, 5, 6], [1, 2, 5, 8, 9], [1, 2, 5, 8], [1, 2, 5, 7, 9], [1, 2, 5, 7], [1, 2, 5, 9], [1, 2, 5], [1, 2, 7, 8, 9], [1, 2, 7, 8], [1, 2, 7, 7, 9], [1, 2, 7, 7], [1, 2, 6, 8, 9], [1, 2, 6, 8], [1, 2, 6, 7, 9], [1, 2, 6, 7], [1, 2, 6, 9], [1, 2, 6], [1, 2, 8, 9], [1, 2, 8], [1, 2, 7, 9], [1, 2, 7], [1, 2, 9], [1, 2], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 7, 9], [1, 4, 5, 6, 7, 7], [1, 4, 5, 6, 6, 8, 9], [1, 4, 5, 6, 6, 8], [1, 4, 5, 6, 6, 7, 9], [1, 4, 5, 6, 6, 7], [1, 4, 5, 6, 6, 9], [1, 4, 5, 6, 6], [1, 4, 5, 5, 7, 8, 9], [1, 4, 5, 5, 7, 8], [1, 4, 5, 5, 7, 7, 9], [1, 4, 5, 5, 7, 7], [1, 4, 5, 5, 6, 8, 9], [1, 4, 5, 5, 6, 8], [1, 4, 5, 5, 6, 7, 9], [1, 4, 5, 5, 6, 7], [1, 4, 5, 5, 6, 9], [1, 4, 5, 5, 6], [1, 4, 5, 5, 8, 9], [1, 4, 5, 5, 8], [1, 4, 5, 5, 7, 9], [1, 4, 5, 5, 7], [1, 4, 5, 5, 9], [1, 4, 5, 5], [1, 4, 4, 6, 7, 8, 9], [1, 4, 4, 6, 7, 8], [1, 4, 4, 6, 7, 7, 9], [1, 4, 4, 6, 7, 7], [1, 4, 4, 6, 6, 8, 9], [1, 4, 4, 6, 6, 8], [1, 4, 4, 6, 6, 7, 9], [1, 4, 4, 6, 6, 7], [1, 4, 4, 6, 6, 9], [1, 4, 4, 6, 6], [1, 4, 4, 5, 7, 8, 9], [1, 4, 4, 5, 7, 8], [1, 4, 4, 5, 7, 7, 9], [1, 4, 4, 5, 7, 7], [1, 4, 4, 5, 6, 8, 9], [1, 4, 4, 5, 6, 8], [1, 4, 4, 5, 6, 7, 9], [1, 4, 4, 5, 6, 7], [1, 4, 4, 5, 6, 9], [1, 4, 4, 5, 6], [1, 4, 4, 5, 8, 9], [1, 4, 4, 5, 8], [1, 4, 4, 5, 7, 9], [1, 4, 4, 5, 7], [1, 4, 4, 5, 9], [1, 4, 4, 5], [1, 4, 4, 7, 8, 9], [1, 4, 4, 7, 8], [1, 4, 4, 7, 7, 9], [1, 4, 4, 7, 7], [1, 4, 4, 6, 8, 9], [1, 4, 4, 6, 8], [1, 4, 4, 6, 7, 9], [1, 4, 4, 6, 7], [1, 4, 4, 6, 9], [1, 4, 4, 6], [1, 4, 4, 8, 9], [1, 4, 4, 8], [1, 4, 4, 7, 9], [1, 4, 4, 7], [1, 4, 4, 9], [1, 4, 4], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 7, 9], [1, 3, 5, 6, 7, 7], [1, 3, 5, 6, 6, 8, 9], [1, 3, 5, 6, 6, 8], [1, 3, 5, 6, 6, 7, 9], [1, 3, 5, 6, 6, 7], [1, 3, 5, 6, 6, 9], [1, 3, 5, 6, 6], [1, 3, 5, 5, 7, 8, 9], [1, 3, 5, 5, 7, 8], [1, 3, 5, 5, 7, 7, 9], [1, 3, 5, 5, 7, 7], [1, 3, 5, 5, 6, 8, 9], [1, 3, 5, 5, 6, 8], [1, 3, 5, 5, 6, 7, 9], [1, 3, 5, 5, 6, 7], [1, 3, 5, 5, 6, 9], [1, 3, 5, 5, 6], [1, 3, 5, 5, 8, 9], [1, 3, 5, 5, 8], [1, 3, 5, 5, 7, 9], [1, 3, 5, 5, 7], [1, 3, 5, 5, 9], [1, 3, 5, 5], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 7, 9], [1, 3, 4, 6, 7, 7], [1, 3, 4, 6, 6, 8, 9], [1, 3, 4, 6, 6, 8], [1, 3, 4, 6, 6, 7, 9], [1, 3, 4, 6, 6, 7], [1, 3, 4, 6, 6, 9], [1, 3, 4, 6, 6], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 7, 9], [1, 3, 4, 5, 7, 7], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7], [1, 3, 4, 5, 9], [1, 3, 4, 5], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8], [1, 3, 4, 7, 7, 9], [1, 3, 4, 7, 7], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7], [1, 3, 4, 6, 9], [1, 3, 4, 6], [1, 3, 4, 8, 9], [1, 3, 4, 8], [1, 3, 4, 7, 9], [1, 3, 4, 7], [1, 3, 4, 9], [1, 3, 4], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8], [1, 3, 6, 7, 7, 9], [1, 3, 6, 7, 7], [1, 3, 6, 6, 8, 9], [1, 3, 6, 6, 8], [1, 3, 6, 6, 7, 9], [1, 3, 6, 6, 7], [1, 3, 6, 6, 9], [1, 3, 6, 6], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8], [1, 3, 5, 7, 7, 9], [1, 3, 5, 7, 7], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7], [1, 3, 5, 6, 9], [1, 3, 5, 6], [1, 3, 5, 8, 9], [1, 3, 5, 8], [1, 3, 5, 7, 9], [1, 3, 5, 7], [1, 3, 5, 9], [1, 3, 5], [1, 3, 7, 8, 9], [1, 3, 7, 8], [1, 3, 7, 7, 9], [1, 3, 7, 7], [1, 3, 6, 8, 9], [1, 3, 6, 8], [1, 3, 6, 7, 9], [1, 3, 6, 7], [1, 3, 6, 9], [1, 3, 6], [1, 3, 8, 9], [1, 3, 8], [1, 3, 7, 9], [1, 3, 7], [1, 3, 9], [1, 3], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8], [1, 5, 6, 7, 7, 9], [1, 5, 6, 7, 7], [1, 5, 6, 6, 8, 9], [1, 5, 6, 6, 8], [1, 5, 6, 6, 7, 9], [1, 5, 6, 6, 7], [1, 5, 6, 6, 9], [1, 5, 6, 6], [1, 5, 5, 7, 8, 9], [1, 5, 5, 7, 8], [1, 5, 5, 7, 7, 9], [1, 5, 5, 7, 7], [1, 5, 5, 6, 8, 9], [1, 5, 5, 6, 8], [1, 5, 5, 6, 7, 9], [1, 5, 5, 6, 7], [1, 5, 5, 6, 9], [1, 5, 5, 6], [1, 5, 5, 8, 9], [1, 5, 5, 8], [1, 5, 5, 7, 9], [1, 5, 5, 7], [1, 5, 5, 9], [1, 5, 5], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8], [1, 4, 6, 7, 7, 9], [1, 4, 6, 7, 7], [1, 4, 6, 6, 8, 9], [1, 4, 6, 6, 8], [1, 4, 6, 6, 7, 9], [1, 4, 6, 6, 7], [1, 4, 6, 6, 9], [1, 4, 6, 6], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8], [1, 4, 5, 7, 7, 9], [1, 4, 5, 7, 7], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7], [1, 4, 5, 6, 9], [1, 4, 5, 6], [1, 4, 5, 8, 9], [1, 4, 5, 8], [1, 4, 5, 7, 9], [1, 4, 5, 7], [1, 4, 5, 9], [1, 4, 5], [1, 4, 7, 8, 9], [1, 4, 7, 8], [1, 4, 7, 7, 9], [1, 4, 7, 7], [1, 4, 6, 8, 9], [1, 4, 6, 8], [1, 4, 6, 7, 9], [1, 4, 6, 7], [1, 4, 6, 9], [1, 4, 6], [1, 4, 8, 9], [1, 4, 8], [1, 4, 7, 9], [1, 4, 7], [1, 4, 9], [1, 4], [1, 6, 7, 8, 9], [1, 6, 7, 8], [1, 6, 7, 7, 9], [1, 6, 7, 7], [1, 6, 6, 8, 9], [1, 6, 6, 8], [1, 6, 6, 7, 9], [1, 6, 6, 7], [1, 6, 6, 9], [1, 6, 6], [1, 5, 7, 8, 9], [1, 5, 7, 8], [1, 5, 7, 7, 9], [1, 5, 7, 7], [1, 5, 6, 8, 9], [1, 5, 6, 8], [1, 5, 6, 7, 9], [1, 5, 6, 7], [1, 5, 6, 9], [1, 5, 6], [1, 5, 8, 9], [1, 5, 8], [1, 5, 7, 9], [1, 5, 7], [1, 5, 9], [1, 5], [1, 7, 8, 9], [1, 7, 8], [1, 7, 7, 9], [1, 7, 7], [1, 6, 8, 9], [1, 6, 8], [1, 6, 7, 9], [1, 6, 7], [1, 6, 9], [1, 6], [1, 8, 9], [1, 8], [1, 7, 9], [1, 7], [1, 9], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 7, 9], [3, 4, 5, 6, 7, 7], [3, 4, 5, 6, 6, 8, 9], [3, 4, 5, 6, 6, 8], [3, 4, 5, 6, 6, 7, 9], [3, 4, 5, 6, 6, 7], [3, 4, 5, 6, 6, 9], [3, 4, 5, 6, 6], [3, 4, 5, 5, 7, 8, 9], [3, 4, 5, 5, 7, 8], [3, 4, 5, 5, 7, 7, 9], [3, 4, 5, 5, 7, 7], [3, 4, 5, 5, 6, 8, 9], [3, 4, 5, 5, 6, 8], [3, 4, 5, 5, 6, 7, 9], [3, 4, 5, 5, 6, 7], [3, 4, 5, 5, 6, 9], [3, 4, 5, 5, 6], [3, 4, 5, 5, 8, 9], [3, 4, 5, 5, 8], [3, 4, 5, 5, 7, 9], [3, 4, 5, 5, 7], [3, 4, 5, 5, 9], [3, 4, 5, 5], [3, 4, 4, 6, 7, 8, 9], [3, 4, 4, 6, 7, 8], [3, 4, 4, 6, 7, 7, 9], [3, 4, 4, 6, 7, 7], [3, 4, 4, 6, 6, 8, 9], [3, 4, 4, 6, 6, 8], [3, 4, 4, 6, 6, 7, 9], [3, 4, 4, 6, 6, 7], [3, 4, 4, 6, 6, 9], [3, 4, 4, 6, 6], [3, 4, 4, 5, 7, 8, 9], [3, 4, 4, 5, 7, 8], [3, 4, 4, 5, 7, 7, 9], [3, 4, 4, 5, 7, 7], [3, 4, 4, 5, 6, 8, 9], [3, 4, 4, 5, 6, 8], [3, 4, 4, 5, 6, 7, 9], [3, 4, 4, 5, 6, 7], [3, 4, 4, 5, 6, 9], [3, 4, 4, 5, 6], [3, 4, 4, 5, 8, 9], [3, 4, 4, 5, 8], [3, 4, 4, 5, 7, 9], [3, 4, 4, 5, 7], [3, 4, 4, 5, 9], [3, 4, 4, 5], [3, 4, 4, 7, 8, 9], [3, 4, 4, 7, 8], [3, 4, 4, 7, 7, 9], [3, 4, 4, 7, 7], [3, 4, 4, 6, 8, 9], [3, 4, 4, 6, 8], [3, 4, 4, 6, 7, 9], [3, 4, 4, 6, 7], [3, 4, 4, 6, 9], [3, 4, 4, 6], [3, 4, 4, 8, 9], [3, 4, 4, 8], [3, 4, 4, 7, 9], [3, 4, 4, 7], [3, 4, 4, 9], [3, 4, 4], [3, 3, 5, 6, 7, 8, 9], [3, 3, 5, 6, 7, 8], [3, 3, 5, 6, 7, 7, 9], [3, 3, 5, 6, 7, 7], [3, 3, 5, 6, 6, 8, 9], [3, 3, 5, 6, 6, 8], [3, 3, 5, 6, 6, 7, 9], [3, 3, 5, 6, 6, 7], [3, 3, 5, 6, 6, 9], [3, 3, 5, 6, 6], [3, 3, 5, 5, 7, 8, 9], [3, 3, 5, 5, 7, 8], [3, 3, 5, 5, 7, 7, 9], [3, 3, 5, 5, 7, 7], [3, 3, 5, 5, 6, 8, 9], [3, 3, 5, 5, 6, 8], [3, 3, 5, 5, 6, 7, 9], [3, 3, 5, 5, 6, 7], [3, 3, 5, 5, 6, 9], [3, 3, 5, 5, 6], [3, 3, 5, 5, 8, 9], [3, 3, 5, 5, 8], [3, 3, 5, 5, 7, 9], [3, 3, 5, 5, 7], [3, 3, 5, 5, 9], [3, 3, 5, 5], [3, 3, 4, 6, 7, 8, 9], [3, 3, 4, 6, 7, 8], [3, 3, 4, 6, 7, 7, 9], [3, 3, 4, 6, 7, 7], [3, 3, 4, 6, 6, 8, 9], [3, 3, 4, 6, 6, 8], [3, 3, 4, 6, 6, 7, 9], [3, 3, 4, 6, 6, 7], [3, 3, 4, 6, 6, 9], [3, 3, 4, 6, 6], [3, 3, 4, 5, 7, 8, 9], [3, 3, 4, 5, 7, 8], [3, 3, 4, 5, 7, 7, 9], [3, 3, 4, 5, 7, 7], [3, 3, 4, 5, 6, 8, 9], [3, 3, 4, 5, 6, 8], [3, 3, 4, 5, 6, 7, 9], [3, 3, 4, 5, 6, 7], [3, 3, 4, 5, 6, 9], [3, 3, 4, 5, 6], [3, 3, 4, 5, 8, 9], [3, 3, 4, 5, 8], [3, 3, 4, 5, 7, 9], [3, 3, 4, 5, 7], [3, 3, 4, 5, 9], [3, 3, 4, 5], [3, 3, 4, 7, 8, 9], [3, 3, 4, 7, 8], [3, 3, 4, 7, 7, 9], [3, 3, 4, 7, 7], [3, 3, 4, 6, 8, 9], [3, 3, 4, 6, 8], [3, 3, 4, 6, 7, 9], [3, 3, 4, 6, 7], [3, 3, 4, 6, 9], [3, 3, 4, 6], [3, 3, 4, 8, 9], [3, 3, 4, 8], [3, 3, 4, 7, 9], [3, 3, 4, 7], [3, 3, 4, 9], [3, 3, 4], [3, 3, 6, 7, 8, 9], [3, 3, 6, 7, 8], [3, 3, 6, 7, 7, 9], [3, 3, 6, 7, 7], [3, 3, 6, 6, 8, 9], [3, 3, 6, 6, 8], [3, 3, 6, 6, 7, 9], [3, 3, 6, 6, 7], [3, 3, 6, 6, 9], [3, 3, 6, 6], [3, 3, 5, 7, 8, 9], [3, 3, 5, 7, 8], [3, 3, 5, 7, 7, 9], [3, 3, 5, 7, 7], [3, 3, 5, 6, 8, 9], [3, 3, 5, 6, 8], [3, 3, 5, 6, 7, 9], [3, 3, 5, 6, 7], [3, 3, 5, 6, 9], [3, 3, 5, 6], [3, 3, 5, 8, 9], [3, 3, 5, 8], [3, 3, 5, 7, 9], [3, 3, 5, 7], [3, 3, 5, 9], [3, 3, 5], [3, 3, 7, 8, 9], [3, 3, 7, 8], [3, 3, 7, 7, 9], [3, 3, 7, 7], [3, 3, 6, 8, 9], [3, 3, 6, 8], [3, 3, 6, 7, 9], [3, 3, 6, 7], [3, 3, 6, 9], [3, 3, 6], [3, 3, 8, 9], [3, 3, 8], [3, 3, 7, 9], [3, 3, 7], [3, 3, 9], [3, 3], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 7, 9], [2, 4, 5, 6, 7, 7], [2, 4, 5, 6, 6, 8, 9], [2, 4, 5, 6, 6, 8], [2, 4, 5, 6, 6, 7, 9], [2, 4, 5, 6, 6, 7], [2, 4, 5, 6, 6, 9], [2, 4, 5, 6, 6], [2, 4, 5, 5, 7, 8, 9], [2, 4, 5, 5, 7, 8], [2, 4, 5, 5, 7, 7, 9], [2, 4, 5, 5, 7, 7], [2, 4, 5, 5, 6, 8, 9], [2, 4, 5, 5, 6, 8], [2, 4, 5, 5, 6, 7, 9], [2, 4, 5, 5, 6, 7], [2, 4, 5, 5, 6, 9], [2, 4, 5, 5, 6], [2, 4, 5, 5, 8, 9], [2, 4, 5, 5, 8], [2, 4, 5, 5, 7, 9], [2, 4, 5, 5, 7], [2, 4, 5, 5, 9], [2, 4, 5, 5], [2, 4, 4, 6, 7, 8, 9], [2, 4, 4, 6, 7, 8], [2, 4, 4, 6, 7, 7, 9], [2, 4, 4, 6, 7, 7], [2, 4, 4, 6, 6, 8, 9], [2, 4, 4, 6, 6, 8], [2, 4, 4, 6, 6, 7, 9], [2, 4, 4, 6, 6, 7], [2, 4, 4, 6, 6, 9], [2, 4, 4, 6, 6], [2, 4, 4, 5, 7, 8, 9], [2, 4, 4, 5, 7, 8], [2, 4, 4, 5, 7, 7, 9], [2, 4, 4, 5, 7, 7], [2, 4, 4, 5, 6, 8, 9], [2, 4, 4, 5, 6, 8], [2, 4, 4, 5, 6, 7, 9], [2, 4, 4, 5, 6, 7], [2, 4, 4, 5, 6, 9], [2, 4, 4, 5, 6], [2, 4, 4, 5, 8, 9], [2, 4, 4, 5, 8], [2, 4, 4, 5, 7, 9], [2, 4, 4, 5, 7], [2, 4, 4, 5, 9], [2, 4, 4, 5], [2, 4, 4, 7, 8, 9], [2, 4, 4, 7, 8], [2, 4, 4, 7, 7, 9], [2, 4, 4, 7, 7], [2, 4, 4, 6, 8, 9], [2, 4, 4, 6, 8], [2, 4, 4, 6, 7, 9], [2, 4, 4, 6, 7], [2, 4, 4, 6, 9], [2, 4, 4, 6], [2, 4, 4, 8, 9], [2, 4, 4, 8], [2, 4, 4, 7, 9], [2, 4, 4, 7], [2, 4, 4, 9], [2, 4, 4], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 7, 9], [2, 3, 5, 6, 7, 7], [2, 3, 5, 6, 6, 8, 9], [2, 3, 5, 6, 6, 8], [2, 3, 5, 6, 6, 7, 9], [2, 3, 5, 6, 6, 7], [2, 3, 5, 6, 6, 9], [2, 3, 5, 6, 6], [2, 3, 5, 5, 7, 8, 9], [2, 3, 5, 5, 7, 8], [2, 3, 5, 5, 7, 7, 9], [2, 3, 5, 5, 7, 7], [2, 3, 5, 5, 6, 8, 9], [2, 3, 5, 5, 6, 8], [2, 3, 5, 5, 6, 7, 9], [2, 3, 5, 5, 6, 7], [2, 3, 5, 5, 6, 9], [2, 3, 5, 5, 6], [2, 3, 5, 5, 8, 9], [2, 3, 5, 5, 8], [2, 3, 5, 5, 7, 9], [2, 3, 5, 5, 7], [2, 3, 5, 5, 9], [2, 3, 5, 5], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 7, 9], [2, 3, 4, 6, 7, 7], [2, 3, 4, 6, 6, 8, 9], [2, 3, 4, 6, 6, 8], [2, 3, 4, 6, 6, 7, 9], [2, 3, 4, 6, 6, 7], [2, 3, 4, 6, 6, 9], [2, 3, 4, 6, 6], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 7, 9], [2, 3, 4, 5, 7, 7], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7], [2, 3, 4, 5, 9], [2, 3, 4, 5], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8], [2, 3, 4, 7, 7, 9], [2, 3, 4, 7, 7], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7], [2, 3, 4, 6, 9], [2, 3, 4, 6], [2, 3, 4, 8, 9], [2, 3, 4, 8], [2, 3, 4, 7, 9], [2, 3, 4, 7], [2, 3, 4, 9], [2, 3, 4], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8], [2, 3, 6, 7, 7, 9], [2, 3, 6, 7, 7], [2, 3, 6, 6, 8, 9], [2, 3, 6, 6, 8], [2, 3, 6, 6, 7, 9], [2, 3, 6, 6, 7], [2, 3, 6, 6, 9], [2, 3, 6, 6], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8], [2, 3, 5, 7, 7, 9], [2, 3, 5, 7, 7], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7], [2, 3, 5, 6, 9], [2, 3, 5, 6], [2, 3, 5, 8, 9], [2, 3, 5, 8], [2, 3, 5, 7, 9], [2, 3, 5, 7], [2, 3, 5, 9], [2, 3, 5], [2, 3, 7, 8, 9], [2, 3, 7, 8], [2, 3, 7, 7, 9], [2, 3, 7, 7], [2, 3, 6, 8, 9], [2, 3, 6, 8], [2, 3, 6, 7, 9], [2, 3, 6, 7], [2, 3, 6, 9], [2, 3, 6], [2, 3, 8, 9], [2, 3, 8], [2, 3, 7, 9], [2, 3, 7], [2, 3, 9], [2, 3], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8], [2, 5, 6, 7, 7, 9], [2, 5, 6, 7, 7], [2, 5, 6, 6, 8, 9], [2, 5, 6, 6, 8], [2, 5, 6, 6, 7, 9], [2, 5, 6, 6, 7], [2, 5, 6, 6, 9], [2, 5, 6, 6], [2, 5, 5, 7, 8, 9], [2, 5, 5, 7, 8], [2, 5, 5, 7, 7, 9], [2, 5, 5, 7, 7], [2, 5, 5, 6, 8, 9], [2, 5, 5, 6, 8], [2, 5, 5, 6, 7, 9], [2, 5, 5, 6, 7], [2, 5, 5, 6, 9], [2, 5, 5, 6], [2, 5, 5, 8, 9], [2, 5, 5, 8], [2, 5, 5, 7, 9], [2, 5, 5, 7], [2, 5, 5, 9], [2, 5, 5], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8], [2, 4, 6, 7, 7, 9], [2, 4, 6, 7, 7], [2, 4, 6, 6, 8, 9], [2, 4, 6, 6, 8], [2, 4, 6, 6, 7, 9], [2, 4, 6, 6, 7], [2, 4, 6, 6, 9], [2, 4, 6, 6], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8], [2, 4, 5, 7, 7, 9], [2, 4, 5, 7, 7], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7], [2, 4, 5, 6, 9], [2, 4, 5, 6], [2, 4, 5, 8, 9], [2, 4, 5, 8], [2, 4, 5, 7, 9], [2, 4, 5, 7], [2, 4, 5, 9], [2, 4, 5], [2, 4, 7, 8, 9], [2, 4, 7, 8], [2, 4, 7, 7, 9], [2, 4, 7, 7], [2, 4, 6, 8, 9], [2, 4, 6, 8], [2, 4, 6, 7, 9], [2, 4, 6, 7], [2, 4, 6, 9], [2, 4, 6], [2, 4, 8, 9], [2, 4, 8], [2, 4, 7, 9], [2, 4, 7], [2, 4, 9], [2, 4], [2, 6, 7, 8, 9], [2, 6, 7, 8], [2, 6, 7, 7, 9], [2, 6, 7, 7], [2, 6, 6, 8, 9], [2, 6, 6, 8], [2, 6, 6, 7, 9], [2, 6, 6, 7], [2, 6, 6, 9], [2, 6, 6], [2, 5, 7, 8, 9], [2, 5, 7, 8], [2, 5, 7, 7, 9], [2, 5, 7, 7], [2, 5, 6, 8, 9], [2, 5, 6, 8], [2, 5, 6, 7, 9], [2, 5, 6, 7], [2, 5, 6, 9], [2, 5, 6], [2, 5, 8, 9], [2, 5, 8], [2, 5, 7, 9], [2, 5, 7], [2, 5, 9], [2, 5], [2, 7, 8, 9], [2, 7, 8], [2, 7, 7, 9], [2, 7, 7], [2, 6, 8, 9], [2, 6, 8], [2, 6, 7, 9], [2, 6, 7], [2, 6, 9], [2, 6], [2, 8, 9], [2, 8], [2, 7, 9], [2, 7], [2, 9], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8], [4, 5, 6, 7, 7, 9], [4, 5, 6, 7, 7], [4, 5, 6, 6, 8, 9], [4, 5, 6, 6, 8], [4, 5, 6, 6, 7, 9], [4, 5, 6, 6, 7], [4, 5, 6, 6, 9], [4, 5, 6, 6], [4, 5, 5, 7, 8, 9], [4, 5, 5, 7, 8], [4, 5, 5, 7, 7, 9], [4, 5, 5, 7, 7], [4, 5, 5, 6, 8, 9], [4, 5, 5, 6, 8], [4, 5, 5, 6, 7, 9], [4, 5, 5, 6, 7], [4, 5, 5, 6, 9], [4, 5, 5, 6], [4, 5, 5, 8, 9], [4, 5, 5, 8], [4, 5, 5, 7, 9], [4, 5, 5, 7], [4, 5, 5, 9], [4, 5, 5], [4, 4, 6, 7, 8, 9], [4, 4, 6, 7, 8], [4, 4, 6, 7, 7, 9], [4, 4, 6, 7, 7], [4, 4, 6, 6, 8, 9], [4, 4, 6, 6, 8], [4, 4, 6, 6, 7, 9], [4, 4, 6, 6, 7], [4, 4, 6, 6, 9], [4, 4, 6, 6], [4, 4, 5, 7, 8, 9], [4, 4, 5, 7, 8], [4, 4, 5, 7, 7, 9], [4, 4, 5, 7, 7], [4, 4, 5, 6, 8, 9], [4, 4, 5, 6, 8], [4, 4, 5, 6, 7, 9], [4, 4, 5, 6, 7], [4, 4, 5, 6, 9], [4, 4, 5, 6], [4, 4, 5, 8, 9], [4, 4, 5, 8], [4, 4, 5, 7, 9], [4, 4, 5, 7], [4, 4, 5, 9], [4, 4, 5], [4, 4, 7, 8, 9], [4, 4, 7, 8], [4, 4, 7, 7, 9], [4, 4, 7, 7], [4, 4, 6, 8, 9], [4, 4, 6, 8], [4, 4, 6, 7, 9], [4, 4, 6, 7], [4, 4, 6, 9], [4, 4, 6], [4, 4, 8, 9], [4, 4, 8], [4, 4, 7, 9], [4, 4, 7], [4, 4, 9], [4, 4], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8], [3, 5, 6, 7, 7, 9], [3, 5, 6, 7, 7], [3, 5, 6, 6, 8, 9], [3, 5, 6, 6, 8], [3, 5, 6, 6, 7, 9], [3, 5, 6, 6, 7], [3, 5, 6, 6, 9], [3, 5, 6, 6], [3, 5, 5, 7, 8, 9], [3, 5, 5, 7, 8], [3, 5, 5, 7, 7, 9], [3, 5, 5, 7, 7], [3, 5, 5, 6, 8, 9], [3, 5, 5, 6, 8], [3, 5, 5, 6, 7, 9], [3, 5, 5, 6, 7], [3, 5, 5, 6, 9], [3, 5, 5, 6], [3, 5, 5, 8, 9], [3, 5, 5, 8], [3, 5, 5, 7, 9], [3, 5, 5, 7], [3, 5, 5, 9], [3, 5, 5], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8], [3, 4, 6, 7, 7, 9], [3, 4, 6, 7, 7], [3, 4, 6, 6, 8, 9], [3, 4, 6, 6, 8], [3, 4, 6, 6, 7, 9], [3, 4, 6, 6, 7], [3, 4, 6, 6, 9], [3, 4, 6, 6], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8], [3, 4, 5, 7, 7, 9], [3, 4, 5, 7, 7], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7], [3, 4, 5, 6, 9], [3, 4, 5, 6], [3, 4, 5, 8, 9], [3, 4, 5, 8], [3, 4, 5, 7, 9], [3, 4, 5, 7], [3, 4, 5, 9], [3, 4, 5], [3, 4, 7, 8, 9], [3, 4, 7, 8], [3, 4, 7, 7, 9], [3, 4, 7, 7], [3, 4, 6, 8, 9], [3, 4, 6, 8], [3, 4, 6, 7, 9], [3, 4, 6, 7], [3, 4, 6, 9], [3, 4, 6], [3, 4, 8, 9], [3, 4, 8], [3, 4, 7, 9], [3, 4, 7], [3, 4, 9], [3, 4], [3, 6, 7, 8, 9], [3, 6, 7, 8], [3, 6, 7, 7, 9], [3, 6, 7, 7], [3, 6, 6, 8, 9], [3, 6, 6, 8], [3, 6, 6, 7, 9], [3, 6, 6, 7], [3, 6, 6, 9], [3, 6, 6], [3, 5, 7, 8, 9], [3, 5, 7, 8], [3, 5, 7, 7, 9], [3, 5, 7, 7], [3, 5, 6, 8, 9], [3, 5, 6, 8], [3, 5, 6, 7, 9], [3, 5, 6, 7], [3, 5, 6, 9], [3, 5, 6], [3, 5, 8, 9], [3, 5, 8], [3, 5, 7, 9], [3, 5, 7], [3, 5, 9], [3, 5], [3, 7, 8, 9], [3, 7, 8], [3, 7, 7, 9], [3, 7, 7], [3, 6, 8, 9], [3, 6, 8], [3, 6, 7, 9], [3, 6, 7], [3, 6, 9], [3, 6], [3, 8, 9], [3, 8], [3, 7, 9], [3, 7], [3, 9], [5, 6, 7, 8, 9], [5, 6, 7, 8], [5, 6, 7, 7, 9], [5, 6, 7, 7], [5, 6, 6, 8, 9], [5, 6, 6, 8], [5, 6, 6, 7, 9], [5, 6, 6, 7], [5, 6, 6, 9], [5, 6, 6], [5, 5, 7, 8, 9], [5, 5, 7, 8], [5, 5, 7, 7, 9], [5, 5, 7, 7], [5, 5, 6, 8, 9], [5, 5, 6, 8], [5, 5, 6, 7, 9], [5, 5, 6, 7], [5, 5, 6, 9], [5, 5, 6], [5, 5, 8, 9], [5, 5, 8], [5, 5, 7, 9], [5, 5, 7], [5, 5, 9], [5, 5], [4, 6, 7, 8, 9], [4, 6, 7, 8], [4, 6, 7, 7, 9], [4, 6, 7, 7], [4, 6, 6, 8, 9], [4, 6, 6, 8], [4, 6, 6, 7, 9], [4, 6, 6, 7], [4, 6, 6, 9], [4, 6, 6], [4, 5, 7, 8, 9], [4, 5, 7, 8], [4, 5, 7, 7, 9], [4, 5, 7, 7], [4, 5, 6, 8, 9], [4, 5, 6, 8], [4, 5, 6, 7, 9], [4, 5, 6, 7], [4, 5, 6, 9], [4, 5, 6], [4, 5, 8, 9], [4, 5, 8], [4, 5, 7, 9], [4, 5, 7], [4, 5, 9], [4, 5], [4, 7, 8, 9], [4, 7, 8], [4, 7, 7, 9], [4, 7, 7], [4, 6, 8, 9], [4, 6, 8], [4, 6, 7, 9], [4, 6, 7], [4, 6, 9], [4, 6], [4, 8, 9], [4, 8], [4, 7, 9], [4, 7], [4, 9], [6, 7, 8, 9], [6, 7, 8], [6, 7, 7, 9], [6, 7, 7], [6, 6, 8, 9], [6, 6, 8], [6, 6, 7, 9], [6, 6, 7], [6, 6, 9], [6, 6], [5, 7, 8, 9], [5, 7, 8], [5, 7, 7, 9], [5, 7, 7], [5, 6, 8, 9], [5, 6, 8], [5, 6, 7, 9], [5, 6, 7], [5, 6, 9], [5, 6], [5, 8, 9], [5, 8], [5, 7, 9], [5, 7], [5, 9], [7, 8, 9], [7, 8], [7, 7, 9], [7, 7], [6, 8, 9], [6, 8], [6, 7, 9], [6, 7], [6, 9], [8, 9], [7, 9]])\n assert answers_match(candidate(nums=[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5]), [[5, 5], [4, 4, 5], [4, 4], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5], [3, 3], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5], [1, 1], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [3, 4, 5], [3, 4], [3, 5], [4, 5]])\n assert answers_match(candidate(nums=[15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4], [1, 2, 3, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 3, 4, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3], [1, 2, 4, 5, 5, 5], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 5, 5], [1, 2, 2, 2, 3, 4, 5], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 5], [1, 2, 2, 2], [1, 3, 4, 5, 5, 5], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4], [1, 3, 5, 5, 5], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 5, 5], [1, 3, 3, 3, 4, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 5], [1, 3, 3, 3], [1, 4, 5, 5, 5], [1, 4, 4, 5, 5], [1, 4, 4, 4, 5], [1, 4, 4, 4], [1, 5, 5, 5], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 5, 5], [1, 1, 1, 2, 3, 4, 5], [1, 1, 1, 2, 3, 4], [1, 1, 1, 2, 3, 5], [1, 1, 1, 2, 3], [1, 1, 1, 2, 4, 5], [1, 1, 1, 2, 4], [1, 1, 1, 2, 5], [1, 1, 1, 2], [1, 1, 1, 3, 4, 5], [1, 1, 1, 3, 4], [1, 1, 1, 3, 5], [1, 1, 1, 3], [1, 1, 1, 4, 5], [1, 1, 1, 4], [1, 1, 1, 5], [1, 1, 1], [2, 3, 4, 5, 5, 5], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4], [2, 3, 5, 5, 5], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 5, 5], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 5], [2, 3, 3, 3], [2, 4, 5, 5, 5], [2, 4, 4, 5, 5], [2, 4, 4, 4, 5], [2, 4, 4, 4], [2, 5, 5, 5], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 5, 5], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 4], [2, 2, 2, 3, 5], [2, 2, 2, 3], [2, 2, 2, 4, 5], [2, 2, 2, 4], [2, 2, 2, 5], [2, 2, 2], [3, 4, 5, 5, 5], [3, 4, 4, 5, 5], [3, 4, 4, 4, 5], [3, 4, 4, 4], [3, 5, 5, 5], [3, 3, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 5, 5], [3, 3, 3, 4, 5], [3, 3, 3, 4], [3, 3, 3, 5], [3, 3, 3], [4, 5, 5, 5], [4, 4, 5, 5], [4, 4, 4, 5], [4, 4, 4], [5, 5, 5], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5], [1, 2, 2], [1, 3, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5], [1, 3, 3], [1, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5], [1, 1], [2, 3, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5], [2, 3, 3], [2, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [3, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5], [3, 3], [4, 5, 5], [4, 4, 5], [4, 4], [5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [3, 4, 5], [3, 4], [3, 5], [4, 5]])\n assert answers_match(candidate(nums=[15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]), [])\n assert answers_match(candidate(nums=[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]), [[1, 2, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 3, 3, 3, 3], [1, 1, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 3, 3, 3], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2], [1, 1, 1, 3, 3], [1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 2], [1, 1, 1, 1, 3], [1, 1, 1, 1], [2, 3, 3, 3, 3], [2, 2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 2, 3], [2, 2, 2, 2], [3, 3, 3, 3], [1, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 3, 3, 3], [1, 1, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 3, 3], [1, 1, 1, 2, 3], [1, 1, 1, 2], [1, 1, 1, 3], [1, 1, 1], [2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [3, 3, 3], [1, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3], [1, 1], [2, 3, 3], [2, 2, 3], [2, 2], [3, 3], [1, 2, 3], [1, 2], [1, 3], [2, 3]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 4, 3, 2, 1]), [[1, 2, 3, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4, 5], [1, 2, 4, 4], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 3, 4, 5], [1, 3, 4, 4], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 4, 5], [1, 4, 4], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1], [2, 3, 4, 5], [2, 3, 4, 4], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 4, 5], [2, 4, 4], [2, 5], [2, 4], [2, 3], [2, 2], [3, 4, 5], [3, 4, 4], [3, 5], [3, 4], [3, 3], [4, 5], [4, 4]])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4]), [[1, 2, 2, 3, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4, 4], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4, 4], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4, 4], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4, 4], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 3, 4, 4, 4, 4], [1, 3, 3, 3, 4, 4, 4], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3], [1, 3, 3, 4, 4, 4, 4], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4, 4], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4, 4], [1, 4, 4, 4], [1, 4, 4], [1, 4], [2, 2, 3, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4, 4], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4, 4], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 3, 4, 4, 4, 4], [2, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3], [2, 3, 3, 4, 4, 4, 4], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4, 4], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4, 4], [2, 4, 4, 4], [2, 4, 4], [2, 4], [3, 3, 3, 4, 4, 4, 4], [3, 3, 3, 4, 4, 4], [3, 3, 3, 4, 4], [3, 3, 3, 4], [3, 3, 3], [3, 3, 4, 4, 4, 4], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4, 4], [3, 4, 4, 4], [3, 4, 4], [3, 4], [4, 4, 4, 4], [4, 4, 4], [4, 4]])\n assert answers_match(candidate(nums=[100, 99, 98, 97, 96, 95, 94, 93, 92, 91]), [])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3]), [[1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4, 4], [1, 2, 3, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 5], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 3], [1, 2, 4, 5, 5], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4, 4], [1, 2, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 2, 2, 3, 4, 5], [1, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 4, 5], [1, 2, 2, 2, 4, 4], [1, 2, 2, 2, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 3, 4, 5, 5], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4, 4], [1, 3, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4, 4], [1, 3, 3, 3, 4, 5], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 3], [1, 4, 5, 5], [1, 4, 4, 4, 5], [1, 4, 4, 4, 4], [1, 5, 5], [1, 4, 4, 5], [1, 4, 4, 4], [1, 3, 3, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 5], [1, 3, 3, 4], [1, 3, 3, 3], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 5], [1, 2, 2, 4], [1, 2, 2, 3], [1, 2, 2], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 3], [1, 1, 2, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 5], [1, 1, 2, 4], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 5], [1, 1, 3, 4], [1, 1, 3, 3], [1, 1, 4, 5], [1, 1, 4, 4], [1, 1, 5], [1, 1, 4], [1, 1, 3], [1, 1], [2, 3, 4, 5, 5], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4, 4], [2, 3, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4, 4], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 3], [2, 4, 5, 5], [2, 4, 4, 4, 5], [2, 4, 4, 4, 4], [2, 5, 5], [2, 4, 4, 5], [2, 4, 4, 4], [2, 3, 3, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 5], [2, 3, 3, 4], [2, 3, 3, 3], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 4, 4], [2, 2, 2, 3, 5], [2, 2, 2, 3, 4], [2, 2, 2, 3, 3], [2, 2, 2, 4, 5], [2, 2, 2, 4, 4], [2, 2, 2, 5], [2, 2, 2, 4], [2, 2, 2, 3], [2, 2, 2], [3, 4, 5, 5], [3, 4, 4, 4, 5], [3, 4, 4, 4, 4], [3, 5, 5], [3, 4, 4, 5], [3, 4, 4, 4], [3, 3, 3, 4, 5], [3, 3, 3, 4, 4], [3, 3, 3, 5], [3, 3, 3, 4], [3, 3, 3, 3], [4, 5, 5], [4, 4, 4, 5], [4, 4, 4, 4], [5, 5], [4, 4, 5], [4, 4, 4], [3, 3, 4, 5], [3, 3, 4, 4], [3, 3, 5], [3, 3, 4], [3, 3, 3], [2, 2, 3, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 5], [2, 2, 3, 4], [2, 2, 3, 3], [2, 2, 4, 5], [2, 2, 4, 4], [2, 2, 5], [2, 2, 4], [2, 2, 3], [2, 2], [1, 2, 3, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4, 5], [1, 2, 4, 4], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2], [1, 3, 4, 5], [1, 3, 4, 4], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 4, 5], [1, 4, 4], [1, 5], [1, 4], [1, 3], [2, 3, 4, 5], [2, 3, 4, 4], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 4, 5], [2, 4, 4], [2, 5], [2, 4], [2, 3], [3, 4, 5], [3, 4, 4], [3, 5], [3, 4], [3, 3], [4, 5], [4, 4]])\n assert answers_match(candidate(nums=[1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]), [[1, 1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1], [2, 2, 2, 2, 2], [1, 2, 2, 2, 2], [1, 1, 2, 2, 2], [1, 1, 1, 2, 2], [1, 1, 1, 1, 2], [1, 1, 1, 1], [2, 2, 2, 2], [1, 2, 2, 2], [1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1], [2, 2, 2], [1, 2, 2], [1, 1, 2], [1, 1], [2, 2], [1, 2]])\n assert answers_match(candidate(nums=[7, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 4]), [[7, 7, 7, 7, 7], [7, 7, 7, 7], [7, 7, 7], [7, 7], [6, 6, 6, 6], [6, 6, 6], [6, 6], [5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]), [[10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10, 10], [10, 10, 10, 10, 10], [10, 10, 10, 10], [10, 10, 10], [10, 10]])\n assert answers_match(candidate(nums=[3, 2, 1, 2, 3, 4, 3, 2, 1]), [[3, 3, 4], [3, 3, 3], [2, 2, 3, 4], [2, 2, 3, 3], [2, 2, 4], [2, 2, 3], [2, 2, 2], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 3, 4], [1, 3, 3], [1, 4], [1, 3], [1, 2], [1, 1], [2, 3, 4], [2, 3, 3], [2, 4], [2, 3], [2, 2], [3, 4], [3, 3]])\n assert answers_match(candidate(nums=[100, -100, 100, -100, 100, -100]), [[100, 100, 100], [-100, 100, 100], [-100, -100, 100], [-100, -100, -100], [100, 100], [-100, 100], [-100, -100]])\n assert answers_match(candidate(nums=[1, 2, 3, 2, 3, 4, 5, 4, 5, 6]), [[1, 2, 3, 3, 4, 5, 5, 6], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5, 6], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4, 6], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 5, 5, 6], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 4, 5, 6], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4, 6], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 6], [1, 2, 3, 3, 5], [1, 2, 3, 3, 6], [1, 2, 3, 3], [1, 2, 2, 3, 4, 5, 5, 6], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5, 6], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4, 6], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 5, 5, 6], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 4, 5, 6], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4, 6], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 6], [1, 2, 2, 3, 5], [1, 2, 2, 3, 6], [1, 2, 2, 3], [1, 2, 2, 4, 5, 5, 6], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 4, 5, 6], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4, 6], [1, 2, 2, 4, 4], [1, 2, 2, 5, 5, 6], [1, 2, 2, 5, 5], [1, 2, 2, 4, 5, 6], [1, 2, 2, 4, 5], [1, 2, 2, 4, 6], [1, 2, 2, 4], [1, 2, 2, 5, 6], [1, 2, 2, 5], [1, 2, 2, 6], [1, 2, 2], [1, 3, 3, 4, 5, 5, 6], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 4, 5, 6], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4, 6], [1, 3, 3, 4, 4], [1, 3, 3, 5, 5, 6], [1, 3, 3, 5, 5], [1, 3, 3, 4, 5, 6], [1, 3, 3, 4, 5], [1, 3, 3, 4, 6], [1, 3, 3, 4], [1, 3, 3, 5, 6], [1, 3, 3, 5], [1, 3, 3, 6], [1, 3, 3], [1, 2, 3, 4, 5, 5, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 4, 5, 6], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 4], [1, 2, 3, 5, 5, 6], [1, 2, 3, 5, 5], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6], [1, 2, 3, 4], [1, 2, 3, 5, 6], [1, 2, 3, 5], [1, 2, 3, 6], [1, 2, 3], [1, 2, 4, 5, 5, 6], [1, 2, 4, 5, 5], [1, 2, 4, 4, 5, 6], [1, 2, 4, 4, 5], [1, 2, 4, 4, 6], [1, 2, 4, 4], [1, 2, 5, 5, 6], [1, 2, 5, 5], [1, 2, 4, 5, 6], [1, 2, 4, 5], [1, 2, 4, 6], [1, 2, 4], [1, 2, 5, 6], [1, 2, 5], [1, 2, 6], [1, 2], [1, 3, 4, 5, 5, 6], [1, 3, 4, 5, 5], [1, 3, 4, 4, 5, 6], [1, 3, 4, 4, 5], [1, 3, 4, 4, 6], [1, 3, 4, 4], [1, 3, 5, 5, 6], [1, 3, 5, 5], [1, 3, 4, 5, 6], [1, 3, 4, 5], [1, 3, 4, 6], [1, 3, 4], [1, 3, 5, 6], [1, 3, 5], [1, 3, 6], [1, 3], [1, 4, 5, 5, 6], [1, 4, 5, 5], [1, 4, 4, 5, 6], [1, 4, 4, 5], [1, 4, 4, 6], [1, 4, 4], [1, 5, 5, 6], [1, 5, 5], [1, 4, 5, 6], [1, 4, 5], [1, 4, 6], [1, 4], [1, 5, 6], [1, 5], [1, 6], [2, 3, 3, 4, 5, 5, 6], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 4, 5, 6], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4, 6], [2, 3, 3, 4, 4], [2, 3, 3, 5, 5, 6], [2, 3, 3, 5, 5], [2, 3, 3, 4, 5, 6], [2, 3, 3, 4, 5], [2, 3, 3, 4, 6], [2, 3, 3, 4], [2, 3, 3, 5, 6], [2, 3, 3, 5], [2, 3, 3, 6], [2, 3, 3], [2, 2, 3, 4, 5, 5, 6], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 4, 5, 6], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4, 6], [2, 2, 3, 4, 4], [2, 2, 3, 5, 5, 6], [2, 2, 3, 5, 5], [2, 2, 3, 4, 5, 6], [2, 2, 3, 4, 5], [2, 2, 3, 4, 6], [2, 2, 3, 4], [2, 2, 3, 5, 6], [2, 2, 3, 5], [2, 2, 3, 6], [2, 2, 3], [2, 2, 4, 5, 5, 6], [2, 2, 4, 5, 5], [2, 2, 4, 4, 5, 6], [2, 2, 4, 4, 5], [2, 2, 4, 4, 6], [2, 2, 4, 4], [2, 2, 5, 5, 6], [2, 2, 5, 5], [2, 2, 4, 5, 6], [2, 2, 4, 5], [2, 2, 4, 6], [2, 2, 4], [2, 2, 5, 6], [2, 2, 5], [2, 2, 6], [2, 2], [3, 3, 4, 5, 5, 6], [3, 3, 4, 5, 5], [3, 3, 4, 4, 5, 6], [3, 3, 4, 4, 5], [3, 3, 4, 4, 6], [3, 3, 4, 4], [3, 3, 5, 5, 6], [3, 3, 5, 5], [3, 3, 4, 5, 6], [3, 3, 4, 5], [3, 3, 4, 6], [3, 3, 4], [3, 3, 5, 6], [3, 3, 5], [3, 3, 6], [3, 3], [2, 3, 4, 5, 5, 6], [2, 3, 4, 5, 5], [2, 3, 4, 4, 5, 6], [2, 3, 4, 4, 5], [2, 3, 4, 4, 6], [2, 3, 4, 4], [2, 3, 5, 5, 6], [2, 3, 5, 5], [2, 3, 4, 5, 6], [2, 3, 4, 5], [2, 3, 4, 6], [2, 3, 4], [2, 3, 5, 6], [2, 3, 5], [2, 3, 6], [2, 3], [2, 4, 5, 5, 6], [2, 4, 5, 5], [2, 4, 4, 5, 6], [2, 4, 4, 5], [2, 4, 4, 6], [2, 4, 4], [2, 5, 5, 6], [2, 5, 5], [2, 4, 5, 6], [2, 4, 5], [2, 4, 6], [2, 4], [2, 5, 6], [2, 5], [2, 6], [3, 4, 5, 5, 6], [3, 4, 5, 5], [3, 4, 4, 5, 6], [3, 4, 4, 5], [3, 4, 4, 6], [3, 4, 4], [3, 5, 5, 6], [3, 5, 5], [3, 4, 5, 6], [3, 4, 5], [3, 4, 6], [3, 4], [3, 5, 6], [3, 5], [3, 6], [4, 5, 5, 6], [4, 5, 5], [4, 4, 5, 6], [4, 4, 5], [4, 4, 6], [4, 4], [5, 5, 6], [5, 5], [4, 5, 6], [4, 5], [4, 6], [5, 6]])\n assert answers_match(candidate(nums=[1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5, 3, 1, 3, 5]), [[1, 3, 5, 5, 5, 5], [1, 3, 3, 3, 5, 5, 5], [1, 3, 3, 3, 3, 3, 5, 5], [1, 3, 3, 3, 3, 3, 3, 3, 5], [1, 3, 3, 3, 3, 3, 3, 3], [1, 5, 5, 5, 5], [1, 3, 3, 5, 5, 5], [1, 3, 3, 3, 3, 5, 5], [1, 3, 3, 3, 3, 3, 3, 5], [1, 3, 3, 3, 3, 3, 3], [1, 1, 3, 5, 5, 5], [1, 1, 3, 3, 3, 5, 5], [1, 1, 3, 3, 3, 3, 3, 5], [1, 1, 3, 3, 3, 3, 3], [1, 1, 5, 5, 5], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 3, 3, 5], [1, 1, 3, 3, 3, 3], [1, 1, 1, 3, 5, 5], [1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 3, 3, 3], [1, 1, 1, 5, 5], [1, 1, 1, 3, 3, 5], [1, 1, 1, 3, 3], [1, 1, 1, 1, 3, 5], [1, 1, 1, 1, 3], [1, 1, 1, 1, 5], [1, 1, 1, 1], [3, 5, 5, 5, 5], [3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3, 3], [5, 5, 5, 5], [3, 3, 5, 5, 5], [3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3], [1, 3, 5, 5, 5], [1, 3, 3, 3, 5, 5], [1, 3, 3, 3, 3, 3, 5], [1, 3, 3, 3, 3, 3], [1, 5, 5, 5], [1, 3, 3, 5, 5], [1, 3, 3, 3, 3, 5], [1, 3, 3, 3, 3], [1, 1, 3, 5, 5], [1, 1, 3, 3, 3, 5], [1, 1, 3, 3, 3], [1, 1, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 1, 3, 5], [1, 1, 1, 3], [1, 1, 1, 5], [1, 1, 1], [3, 5, 5, 5], [3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3], [5, 5, 5], [3, 3, 5, 5], [3, 3, 3, 3, 5], [3, 3, 3, 3], [1, 3, 5, 5], [1, 3, 3, 3, 5], [1, 3, 3, 3], [1, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 1, 3, 5], [1, 1, 3], [1, 1, 5], [1, 1], [3, 5, 5], [3, 3, 3, 5], [3, 3, 3], [5, 5], [3, 3, 5], [3, 3], [1, 3, 5], [1, 3], [1, 5], [3, 5]])\n assert answers_match(candidate(nums=[100, -100, 0, 50, -50, 25, -25, 75, -75, 50, 0, -100, 100, 50, -50]), [[100, 100], [-100, 0, 50, 75, 100], [-100, 0, 50, 75], [-100, 0, 50, 50, 100], [-100, 0, 50, 50, 50], [-100, 0, 25, 75, 100], [-100, 0, 25, 75], [-100, 0, 25, 50, 100], [-100, 0, 25, 50, 50], [-100, 0, 25, 100], [-100, 0, 25, 50], [-100, 0, 25], [-100, 0, 75, 100], [-100, 0, 75], [-100, 0, 50, 100], [-100, 0, 50, 50], [-100, 0, 0, 100], [-100, 0, 0, 50], [-100, 0, 0], [-100, 50, 75, 100], [-100, 50, 75], [-100, 50, 50, 100], [-100, 50, 50, 50], [-100, -50, 25, 75, 100], [-100, -50, 25, 75], [-100, -50, 25, 50, 100], [-100, -50, 25, 50, 50], [-100, -50, 25, 100], [-100, -50, 25, 50], [-100, -50, 25], [-100, -50, -25, 75, 100], [-100, -50, -25, 75], [-100, -50, -25, 50, 100], [-100, -50, -25, 50, 50], [-100, -50, -25, 0, 100], [-100, -50, -25, 0, 50], [-100, -50, -25, 0], [-100, -50, -25, 100], [-100, -50, -25, 50], [-100, -50, -25], [-100, -50, 75, 100], [-100, -50, 75], [-100, -50, 50, 100], [-100, -50, 50, 50], [-100, -50, 0, 100], [-100, -50, 0, 50], [-100, -50, 0], [-100, -50, 100], [-100, -50, 50], [-100, -50, -50], [-100, 25, 75, 100], [-100, 25, 75], [-100, 25, 50, 100], [-100, 25, 50, 50], [-100, 25, 100], [-100, 25, 50], [-100, 25], [-100, -25, 75, 100], [-100, -25, 75], [-100, -25, 50, 100], [-100, -25, 50, 50], [-100, -25, 0, 100], [-100, -25, 0, 50], [-100, -25, 0], [-100, -25, 100], [-100, -25, 50], [-100, -25], [-100, 75, 100], [-100, 75], [-100, -75, 50, 100], [-100, -75, 50, 50], [-100, -75, 0, 100], [-100, -75, 0, 50], [-100, -75, 0], [-100, -75, 100], [-100, -75, 50], [-100, -75, -50], [-100, -75], [-100, 50, 100], [-100, 50, 50], [-100, 0, 100], [-100, 0, 50], [-100, 0], [-100, -100, 100], [-100, -100, 50], [-100, -100, -50], [-100, -100], [0, 50, 75, 100], [0, 50, 75], [0, 50, 50, 100], [0, 50, 50, 50], [0, 25, 75, 100], [0, 25, 75], [0, 25, 50, 100], [0, 25, 50, 50], [0, 25, 100], [0, 25, 50], [0, 25], [0, 75, 100], [0, 75], [0, 50, 100], [0, 50, 50], [0, 0, 100], [0, 0, 50], [0, 0], [50, 75, 100], [50, 75], [50, 50, 100], [50, 50, 50], [-50, 25, 75, 100], [-50, 25, 75], [-50, 25, 50, 100], [-50, 25, 50, 50], [-50, 25, 100], [-50, 25, 50], [-50, 25], [-50, -25, 75, 100], [-50, -25, 75], [-50, -25, 50, 100], [-50, -25, 50, 50], [-50, -25, 0, 100], [-50, -25, 0, 50], [-50, -25, 0], [-50, -25, 100], [-50, -25, 50], [-50, -25], [-50, 75, 100], [-50, 75], [-50, 50, 100], [-50, 50, 50], [-50, 0, 100], [-50, 0, 50], [-50, 0], [-50, 100], [-50, 50], [-50, -50], [25, 75, 100], [25, 75], [25, 50, 100], [25, 50, 50], [25, 100], [25, 50], [-25, 75, 100], [-25, 75], [-25, 50, 100], [-25, 50, 50], [-25, 0, 100], [-25, 0, 50], [-25, 0], [-25, 100], [-25, 50], [75, 100], [-75, 50, 100], [-75, 50, 50], [-75, 0, 100], [-75, 0, 50], [-75, 0], [-75, 100], [-75, 50], [-75, -50], [50, 100], [50, 50], [0, 100], [0, 50], [-100, 100], [-100, 50], [-100, -50]])\n assert answers_match(candidate(nums=[1, 3, 2, 4, 2, 3, 4]), [[1, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 2, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4], [1, 2, 2], [1, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4], [1, 2], [1, 3, 4], [1, 3], [1, 4], [3, 4, 4], [3, 3, 4], [3, 3], [2, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4], [2, 2], [4, 4], [2, 3, 4], [2, 3], [2, 4], [3, 4]])\n assert answers_match(candidate(nums=[0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]), [[0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5], [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], [0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 5], [0, 0, 1, 1, 2, 2, 3, 3, 4, 5], [0, 0, 1, 1, 2, 2, 3, 3, 4], [0, 0, 1, 1, 2, 2, 3, 3, 5, 5], [0, 0, 1, 1, 2, 2, 3, 3, 5], [0, 0, 1, 1, 2, 2, 3, 3], [0, 0, 1, 1, 2, 2, 3, 4, 4, 5, 5], [0, 0, 1, 1, 2, 2, 3, 4, 4, 5], [0, 0, 1, 1, 2, 2, 3, 4, 4], [0, 0, 1, 1, 2, 2, 3, 4, 5, 5], [0, 0, 1, 1, 2, 2, 3, 4, 5], [0, 0, 1, 1, 2, 2, 3, 4], [0, 0, 1, 1, 2, 2, 3, 5, 5], [0, 0, 1, 1, 2, 2, 3, 5], [0, 0, 1, 1, 2, 2, 3], [0, 0, 1, 1, 2, 2, 4, 4, 5, 5], [0, 0, 1, 1, 2, 2, 4, 4, 5], [0, 0, 1, 1, 2, 2, 4, 4], [0, 0, 1, 1, 2, 2, 4, 5, 5], [0, 0, 1, 1, 2, 2, 4, 5], [0, 0, 1, 1, 2, 2, 4], [0, 0, 1, 1, 2, 2, 5, 5], [0, 0, 1, 1, 2, 2, 5], [0, 0, 1, 1, 2, 2], [0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5], [0, 0, 1, 1, 2, 3, 3, 4, 4, 5], [0, 0, 1, 1, 2, 3, 3, 4, 4], [0, 0, 1, 1, 2, 3, 3, 4, 5, 5], [0, 0, 1, 1, 2, 3, 3, 4, 5], [0, 0, 1, 1, 2, 3, 3, 4], [0, 0, 1, 1, 2, 3, 3, 5, 5], [0, 0, 1, 1, 2, 3, 3, 5], [0, 0, 1, 1, 2, 3, 3], [0, 0, 1, 1, 2, 3, 4, 4, 5, 5], [0, 0, 1, 1, 2, 3, 4, 4, 5], [0, 0, 1, 1, 2, 3, 4, 4], [0, 0, 1, 1, 2, 3, 4, 5, 5], [0, 0, 1, 1, 2, 3, 4, 5], [0, 0, 1, 1, 2, 3, 4], [0, 0, 1, 1, 2, 3, 5, 5], [0, 0, 1, 1, 2, 3, 5], [0, 0, 1, 1, 2, 3], [0, 0, 1, 1, 2, 4, 4, 5, 5], [0, 0, 1, 1, 2, 4, 4, 5], [0, 0, 1, 1, 2, 4, 4], [0, 0, 1, 1, 2, 4, 5, 5], [0, 0, 1, 1, 2, 4, 5], [0, 0, 1, 1, 2, 4], [0, 0, 1, 1, 2, 5, 5], [0, 0, 1, 1, 2, 5], [0, 0, 1, 1, 2], [0, 0, 1, 1, 3, 3, 4, 4, 5, 5], [0, 0, 1, 1, 3, 3, 4, 4, 5], [0, 0, 1, 1, 3, 3, 4, 4], [0, 0, 1, 1, 3, 3, 4, 5, 5], [0, 0, 1, 1, 3, 3, 4, 5], [0, 0, 1, 1, 3, 3, 4], [0, 0, 1, 1, 3, 3, 5, 5], [0, 0, 1, 1, 3, 3, 5], [0, 0, 1, 1, 3, 3], [0, 0, 1, 1, 3, 4, 4, 5, 5], [0, 0, 1, 1, 3, 4, 4, 5], [0, 0, 1, 1, 3, 4, 4], [0, 0, 1, 1, 3, 4, 5, 5], [0, 0, 1, 1, 3, 4, 5], [0, 0, 1, 1, 3, 4], [0, 0, 1, 1, 3, 5, 5], [0, 0, 1, 1, 3, 5], [0, 0, 1, 1, 3], [0, 0, 1, 1, 4, 4, 5, 5], [0, 0, 1, 1, 4, 4, 5], [0, 0, 1, 1, 4, 4], [0, 0, 1, 1, 4, 5, 5], [0, 0, 1, 1, 4, 5], [0, 0, 1, 1, 4], [0, 0, 1, 1, 5, 5], [0, 0, 1, 1, 5], [0, 0, 1, 1], [0, 0, 1, 2, 2, 3, 3, 4, 4, 5, 5], [0, 0, 1, 2, 2, 3, 3, 4, 4, 5], [0, 0, 1, 2, 2, 3, 3, 4, 4], [0, 0, 1, 2, 2, 3, 3, 4, 5, 5], [0, 0, 1, 2, 2, 3, 3, 4, 5], [0, 0, 1, 2, 2, 3, 3, 4], [0, 0, 1, 2, 2, 3, 3, 5, 5], [0, 0, 1, 2, 2, 3, 3, 5], [0, 0, 1, 2, 2, 3, 3], [0, 0, 1, 2, 2, 3, 4, 4, 5, 5], [0, 0, 1, 2, 2, 3, 4, 4, 5], [0, 0, 1, 2, 2, 3, 4, 4], [0, 0, 1, 2, 2, 3, 4, 5, 5], [0, 0, 1, 2, 2, 3, 4, 5], [0, 0, 1, 2, 2, 3, 4], [0, 0, 1, 2, 2, 3, 5, 5], [0, 0, 1, 2, 2, 3, 5], [0, 0, 1, 2, 2, 3], [0, 0, 1, 2, 2, 4, 4, 5, 5], [0, 0, 1, 2, 2, 4, 4, 5], [0, 0, 1, 2, 2, 4, 4], [0, 0, 1, 2, 2, 4, 5, 5], [0, 0, 1, 2, 2, 4, 5], [0, 0, 1, 2, 2, 4], [0, 0, 1, 2, 2, 5, 5], [0, 0, 1, 2, 2, 5], [0, 0, 1, 2, 2], [0, 0, 1, 2, 3, 3, 4, 4, 5, 5], [0, 0, 1, 2, 3, 3, 4, 4, 5], [0, 0, 1, 2, 3, 3, 4, 4], [0, 0, 1, 2, 3, 3, 4, 5, 5], [0, 0, 1, 2, 3, 3, 4, 5], [0, 0, 1, 2, 3, 3, 4], [0, 0, 1, 2, 3, 3, 5, 5], [0, 0, 1, 2, 3, 3, 5], [0, 0, 1, 2, 3, 3], [0, 0, 1, 2, 3, 4, 4, 5, 5], [0, 0, 1, 2, 3, 4, 4, 5], [0, 0, 1, 2, 3, 4, 4], [0, 0, 1, 2, 3, 4, 5, 5], [0, 0, 1, 2, 3, 4, 5], [0, 0, 1, 2, 3, 4], [0, 0, 1, 2, 3, 5, 5], [0, 0, 1, 2, 3, 5], [0, 0, 1, 2, 3], [0, 0, 1, 2, 4, 4, 5, 5], [0, 0, 1, 2, 4, 4, 5], [0, 0, 1, 2, 4, 4], [0, 0, 1, 2, 4, 5, 5], [0, 0, 1, 2, 4, 5], [0, 0, 1, 2, 4], [0, 0, 1, 2, 5, 5], [0, 0, 1, 2, 5], [0, 0, 1, 2], [0, 0, 1, 3, 3, 4, 4, 5, 5], [0, 0, 1, 3, 3, 4, 4, 5], [0, 0, 1, 3, 3, 4, 4], [0, 0, 1, 3, 3, 4, 5, 5], [0, 0, 1, 3, 3, 4, 5], [0, 0, 1, 3, 3, 4], [0, 0, 1, 3, 3, 5, 5], [0, 0, 1, 3, 3, 5], [0, 0, 1, 3, 3], [0, 0, 1, 3, 4, 4, 5, 5], [0, 0, 1, 3, 4, 4, 5], [0, 0, 1, 3, 4, 4], [0, 0, 1, 3, 4, 5, 5], [0, 0, 1, 3, 4, 5], [0, 0, 1, 3, 4], [0, 0, 1, 3, 5, 5], [0, 0, 1, 3, 5], [0, 0, 1, 3], [0, 0, 1, 4, 4, 5, 5], [0, 0, 1, 4, 4, 5], [0, 0, 1, 4, 4], [0, 0, 1, 4, 5, 5], [0, 0, 1, 4, 5], [0, 0, 1, 4], [0, 0, 1, 5, 5], [0, 0, 1, 5], [0, 0, 1], [0, 0, 2, 2, 3, 3, 4, 4, 5, 5], [0, 0, 2, 2, 3, 3, 4, 4, 5], [0, 0, 2, 2, 3, 3, 4, 4], [0, 0, 2, 2, 3, 3, 4, 5, 5], [0, 0, 2, 2, 3, 3, 4, 5], [0, 0, 2, 2, 3, 3, 4], [0, 0, 2, 2, 3, 3, 5, 5], [0, 0, 2, 2, 3, 3, 5], [0, 0, 2, 2, 3, 3], [0, 0, 2, 2, 3, 4, 4, 5, 5], [0, 0, 2, 2, 3, 4, 4, 5], [0, 0, 2, 2, 3, 4, 4], [0, 0, 2, 2, 3, 4, 5, 5], [0, 0, 2, 2, 3, 4, 5], [0, 0, 2, 2, 3, 4], [0, 0, 2, 2, 3, 5, 5], [0, 0, 2, 2, 3, 5], [0, 0, 2, 2, 3], [0, 0, 2, 2, 4, 4, 5, 5], [0, 0, 2, 2, 4, 4, 5], [0, 0, 2, 2, 4, 4], [0, 0, 2, 2, 4, 5, 5], [0, 0, 2, 2, 4, 5], [0, 0, 2, 2, 4], [0, 0, 2, 2, 5, 5], [0, 0, 2, 2, 5], [0, 0, 2, 2], [0, 0, 2, 3, 3, 4, 4, 5, 5], [0, 0, 2, 3, 3, 4, 4, 5], [0, 0, 2, 3, 3, 4, 4], [0, 0, 2, 3, 3, 4, 5, 5], [0, 0, 2, 3, 3, 4, 5], [0, 0, 2, 3, 3, 4], [0, 0, 2, 3, 3, 5, 5], [0, 0, 2, 3, 3, 5], [0, 0, 2, 3, 3], [0, 0, 2, 3, 4, 4, 5, 5], [0, 0, 2, 3, 4, 4, 5], [0, 0, 2, 3, 4, 4], [0, 0, 2, 3, 4, 5, 5], [0, 0, 2, 3, 4, 5], [0, 0, 2, 3, 4], [0, 0, 2, 3, 5, 5], [0, 0, 2, 3, 5], [0, 0, 2, 3], [0, 0, 2, 4, 4, 5, 5], [0, 0, 2, 4, 4, 5], [0, 0, 2, 4, 4], [0, 0, 2, 4, 5, 5], [0, 0, 2, 4, 5], [0, 0, 2, 4], [0, 0, 2, 5, 5], [0, 0, 2, 5], [0, 0, 2], [0, 0, 3, 3, 4, 4, 5, 5], [0, 0, 3, 3, 4, 4, 5], [0, 0, 3, 3, 4, 4], [0, 0, 3, 3, 4, 5, 5], [0, 0, 3, 3, 4, 5], [0, 0, 3, 3, 4], [0, 0, 3, 3, 5, 5], [0, 0, 3, 3, 5], [0, 0, 3, 3], [0, 0, 3, 4, 4, 5, 5], [0, 0, 3, 4, 4, 5], [0, 0, 3, 4, 4], [0, 0, 3, 4, 5, 5], [0, 0, 3, 4, 5], [0, 0, 3, 4], [0, 0, 3, 5, 5], [0, 0, 3, 5], [0, 0, 3], [0, 0, 4, 4, 5, 5], [0, 0, 4, 4, 5], [0, 0, 4, 4], [0, 0, 4, 5, 5], [0, 0, 4, 5], [0, 0, 4], [0, 0, 5, 5], [0, 0, 5], [0, 0], [0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [0, 1, 1, 2, 2, 3, 3, 4, 4, 5], [0, 1, 1, 2, 2, 3, 3, 4, 4], [0, 1, 1, 2, 2, 3, 3, 4, 5, 5], [0, 1, 1, 2, 2, 3, 3, 4, 5], [0, 1, 1, 2, 2, 3, 3, 4], [0, 1, 1, 2, 2, 3, 3, 5, 5], [0, 1, 1, 2, 2, 3, 3, 5], [0, 1, 1, 2, 2, 3, 3], [0, 1, 1, 2, 2, 3, 4, 4, 5, 5], [0, 1, 1, 2, 2, 3, 4, 4, 5], [0, 1, 1, 2, 2, 3, 4, 4], [0, 1, 1, 2, 2, 3, 4, 5, 5], [0, 1, 1, 2, 2, 3, 4, 5], [0, 1, 1, 2, 2, 3, 4], [0, 1, 1, 2, 2, 3, 5, 5], [0, 1, 1, 2, 2, 3, 5], [0, 1, 1, 2, 2, 3], [0, 1, 1, 2, 2, 4, 4, 5, 5], [0, 1, 1, 2, 2, 4, 4, 5], [0, 1, 1, 2, 2, 4, 4], [0, 1, 1, 2, 2, 4, 5, 5], [0, 1, 1, 2, 2, 4, 5], [0, 1, 1, 2, 2, 4], [0, 1, 1, 2, 2, 5, 5], [0, 1, 1, 2, 2, 5], [0, 1, 1, 2, 2], [0, 1, 1, 2, 3, 3, 4, 4, 5, 5], [0, 1, 1, 2, 3, 3, 4, 4, 5], [0, 1, 1, 2, 3, 3, 4, 4], [0, 1, 1, 2, 3, 3, 4, 5, 5], [0, 1, 1, 2, 3, 3, 4, 5], [0, 1, 1, 2, 3, 3, 4], [0, 1, 1, 2, 3, 3, 5, 5], [0, 1, 1, 2, 3, 3, 5], [0, 1, 1, 2, 3, 3], [0, 1, 1, 2, 3, 4, 4, 5, 5], [0, 1, 1, 2, 3, 4, 4, 5], [0, 1, 1, 2, 3, 4, 4], [0, 1, 1, 2, 3, 4, 5, 5], [0, 1, 1, 2, 3, 4, 5], [0, 1, 1, 2, 3, 4], [0, 1, 1, 2, 3, 5, 5], [0, 1, 1, 2, 3, 5], [0, 1, 1, 2, 3], [0, 1, 1, 2, 4, 4, 5, 5], [0, 1, 1, 2, 4, 4, 5], [0, 1, 1, 2, 4, 4], [0, 1, 1, 2, 4, 5, 5], [0, 1, 1, 2, 4, 5], [0, 1, 1, 2, 4], [0, 1, 1, 2, 5, 5], [0, 1, 1, 2, 5], [0, 1, 1, 2], [0, 1, 1, 3, 3, 4, 4, 5, 5], [0, 1, 1, 3, 3, 4, 4, 5], [0, 1, 1, 3, 3, 4, 4], [0, 1, 1, 3, 3, 4, 5, 5], [0, 1, 1, 3, 3, 4, 5], [0, 1, 1, 3, 3, 4], [0, 1, 1, 3, 3, 5, 5], [0, 1, 1, 3, 3, 5], [0, 1, 1, 3, 3], [0, 1, 1, 3, 4, 4, 5, 5], [0, 1, 1, 3, 4, 4, 5], [0, 1, 1, 3, 4, 4], [0, 1, 1, 3, 4, 5, 5], [0, 1, 1, 3, 4, 5], [0, 1, 1, 3, 4], [0, 1, 1, 3, 5, 5], [0, 1, 1, 3, 5], [0, 1, 1, 3], [0, 1, 1, 4, 4, 5, 5], [0, 1, 1, 4, 4, 5], [0, 1, 1, 4, 4], [0, 1, 1, 4, 5, 5], [0, 1, 1, 4, 5], [0, 1, 1, 4], [0, 1, 1, 5, 5], [0, 1, 1, 5], [0, 1, 1], [0, 1, 2, 2, 3, 3, 4, 4, 5, 5], [0, 1, 2, 2, 3, 3, 4, 4, 5], [0, 1, 2, 2, 3, 3, 4, 4], [0, 1, 2, 2, 3, 3, 4, 5, 5], [0, 1, 2, 2, 3, 3, 4, 5], [0, 1, 2, 2, 3, 3, 4], [0, 1, 2, 2, 3, 3, 5, 5], [0, 1, 2, 2, 3, 3, 5], [0, 1, 2, 2, 3, 3], [0, 1, 2, 2, 3, 4, 4, 5, 5], [0, 1, 2, 2, 3, 4, 4, 5], [0, 1, 2, 2, 3, 4, 4], [0, 1, 2, 2, 3, 4, 5, 5], [0, 1, 2, 2, 3, 4, 5], [0, 1, 2, 2, 3, 4], [0, 1, 2, 2, 3, 5, 5], [0, 1, 2, 2, 3, 5], [0, 1, 2, 2, 3], [0, 1, 2, 2, 4, 4, 5, 5], [0, 1, 2, 2, 4, 4, 5], [0, 1, 2, 2, 4, 4], [0, 1, 2, 2, 4, 5, 5], [0, 1, 2, 2, 4, 5], [0, 1, 2, 2, 4], [0, 1, 2, 2, 5, 5], [0, 1, 2, 2, 5], [0, 1, 2, 2], [0, 1, 2, 3, 3, 4, 4, 5, 5], [0, 1, 2, 3, 3, 4, 4, 5], [0, 1, 2, 3, 3, 4, 4], [0, 1, 2, 3, 3, 4, 5, 5], [0, 1, 2, 3, 3, 4, 5], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 3, 5, 5], [0, 1, 2, 3, 3, 5], [0, 1, 2, 3, 3], [0, 1, 2, 3, 4, 4, 5, 5], [0, 1, 2, 3, 4, 4, 5], [0, 1, 2, 3, 4, 4], [0, 1, 2, 3, 4, 5, 5], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5, 5], [0, 1, 2, 3, 5], [0, 1, 2, 3], [0, 1, 2, 4, 4, 5, 5], [0, 1, 2, 4, 4, 5], [0, 1, 2, 4, 4], [0, 1, 2, 4, 5, 5], [0, 1, 2, 4, 5], [0, 1, 2, 4], [0, 1, 2, 5, 5], [0, 1, 2, 5], [0, 1, 2], [0, 1, 3, 3, 4, 4, 5, 5], [0, 1, 3, 3, 4, 4, 5], [0, 1, 3, 3, 4, 4], [0, 1, 3, 3, 4, 5, 5], [0, 1, 3, 3, 4, 5], [0, 1, 3, 3, 4], [0, 1, 3, 3, 5, 5], [0, 1, 3, 3, 5], [0, 1, 3, 3], [0, 1, 3, 4, 4, 5, 5], [0, 1, 3, 4, 4, 5], [0, 1, 3, 4, 4], [0, 1, 3, 4, 5, 5], [0, 1, 3, 4, 5], [0, 1, 3, 4], [0, 1, 3, 5, 5], [0, 1, 3, 5], [0, 1, 3], [0, 1, 4, 4, 5, 5], [0, 1, 4, 4, 5], [0, 1, 4, 4], [0, 1, 4, 5, 5], [0, 1, 4, 5], [0, 1, 4], [0, 1, 5, 5], [0, 1, 5], [0, 1], [0, 2, 2, 3, 3, 4, 4, 5, 5], [0, 2, 2, 3, 3, 4, 4, 5], [0, 2, 2, 3, 3, 4, 4], [0, 2, 2, 3, 3, 4, 5, 5], [0, 2, 2, 3, 3, 4, 5], [0, 2, 2, 3, 3, 4], [0, 2, 2, 3, 3, 5, 5], [0, 2, 2, 3, 3, 5], [0, 2, 2, 3, 3], [0, 2, 2, 3, 4, 4, 5, 5], [0, 2, 2, 3, 4, 4, 5], [0, 2, 2, 3, 4, 4], [0, 2, 2, 3, 4, 5, 5], [0, 2, 2, 3, 4, 5], [0, 2, 2, 3, 4], [0, 2, 2, 3, 5, 5], [0, 2, 2, 3, 5], [0, 2, 2, 3], [0, 2, 2, 4, 4, 5, 5], [0, 2, 2, 4, 4, 5], [0, 2, 2, 4, 4], [0, 2, 2, 4, 5, 5], [0, 2, 2, 4, 5], [0, 2, 2, 4], [0, 2, 2, 5, 5], [0, 2, 2, 5], [0, 2, 2], [0, 2, 3, 3, 4, 4, 5, 5], [0, 2, 3, 3, 4, 4, 5], [0, 2, 3, 3, 4, 4], [0, 2, 3, 3, 4, 5, 5], [0, 2, 3, 3, 4, 5], [0, 2, 3, 3, 4], [0, 2, 3, 3, 5, 5], [0, 2, 3, 3, 5], [0, 2, 3, 3], [0, 2, 3, 4, 4, 5, 5], [0, 2, 3, 4, 4, 5], [0, 2, 3, 4, 4], [0, 2, 3, 4, 5, 5], [0, 2, 3, 4, 5], [0, 2, 3, 4], [0, 2, 3, 5, 5], [0, 2, 3, 5], [0, 2, 3], [0, 2, 4, 4, 5, 5], [0, 2, 4, 4, 5], [0, 2, 4, 4], [0, 2, 4, 5, 5], [0, 2, 4, 5], [0, 2, 4], [0, 2, 5, 5], [0, 2, 5], [0, 2], [0, 3, 3, 4, 4, 5, 5], [0, 3, 3, 4, 4, 5], [0, 3, 3, 4, 4], [0, 3, 3, 4, 5, 5], [0, 3, 3, 4, 5], [0, 3, 3, 4], [0, 3, 3, 5, 5], [0, 3, 3, 5], [0, 3, 3], [0, 3, 4, 4, 5, 5], [0, 3, 4, 4, 5], [0, 3, 4, 4], [0, 3, 4, 5, 5], [0, 3, 4, 5], [0, 3, 4], [0, 3, 5, 5], [0, 3, 5], [0, 3], [0, 4, 4, 5, 5], [0, 4, 4, 5], [0, 4, 4], [0, 4, 5, 5], [0, 4, 5], [0, 4], [0, 5, 5], [0, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5, 5], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5, 5], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5, 5], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5, 5], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5, 5], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5, 5], [1, 1, 5], [1, 1], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5], [1, 5], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5], [2, 5], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5], [3, 5], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5], [4, 5], [5, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3]), [[1, 2, 3, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3, 3], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2], [1, 3, 3, 3, 3, 3], [1, 1, 2, 3, 3, 3, 3], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 3], [1, 1, 2, 2, 2, 2], [1, 1, 3, 3, 3, 3], [1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2], [1, 1, 1, 3, 3, 3], [1, 1, 1, 1, 2, 3, 3], [1, 1, 1, 1, 2, 2, 3], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 3], [1, 1, 1, 1, 1], [2, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2], [3, 3, 3, 3, 3], [1, 2, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 3, 3, 3, 3], [1, 1, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 3, 3, 3], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2], [1, 1, 1, 3, 3], [1, 1, 1, 1, 2, 3], [1, 1, 1, 1, 2], [1, 1, 1, 1, 3], [1, 1, 1, 1], [2, 3, 3, 3, 3], [2, 2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 2, 3], [2, 2, 2, 2], [3, 3, 3, 3], [1, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 3, 3, 3], [1, 1, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 3, 3], [1, 1, 1, 2, 3], [1, 1, 1, 2], [1, 1, 1, 3], [1, 1, 1], [2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [3, 3, 3], [1, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3], [1, 1], [2, 3, 3], [2, 2, 3], [2, 2], [3, 3], [1, 2, 3], [1, 2], [1, 3], [2, 3]])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4]), [[9, 9], [8, 9], [8, 8], [7, 9], [7, 8], [7, 7], [6, 9], [6, 8], [6, 7], [6, 6], [5, 9], [5, 8], [5, 7], [5, 6], [5, 5], [4, 9], [4, 8], [4, 7], [4, 6], [4, 5], [4, 4], [3, 9], [3, 8], [3, 7], [3, 6], [3, 5], [3, 4], [2, 9], [2, 8], [2, 7], [2, 6], [2, 5], [2, 4], [1, 9], [1, 8], [1, 7], [1, 6], [1, 5], [1, 4]])\n assert answers_match(candidate(nums=[1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 3, 3, 2, 2, 1]), [[1, 1, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 3], [1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 2, 3, 3, 3, 3], [1, 1, 2, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2, 2, 2], [1, 1, 3, 3, 3, 3], [1, 1, 3, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2, 2, 2], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2, 2, 2], [1, 1, 1, 1, 3, 3], [1, 1, 1, 1, 3], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 2], [1, 1, 1, 1, 1], [1, 2, 2, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2, 2], [1, 2, 3, 3, 3, 3], [1, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2], [1, 3, 3, 3, 3], [1, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2, 2, 2], [1, 2, 3, 3], [1, 2, 3], [1, 2, 2, 2], [1, 1, 1, 3, 3], [1, 1, 1, 3], [1, 1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1, 1], [2, 2, 3, 3, 3, 3], [2, 2, 3, 3, 3], [2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 3], [2, 2, 2, 2, 2, 2], [2, 3, 3, 3, 3], [2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2, 2, 2], [3, 3, 3, 3], [3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2, 2, 2], [2, 3, 3], [2, 3], [2, 2, 2], [1, 1, 3, 3], [1, 1, 3], [1, 1, 2, 2], [1, 1, 2], [1, 1, 1], [1, 3, 3], [1, 3], [1, 2, 2], [1, 2], [1, 1], [3, 3], [2, 2]])\n assert answers_match(candidate(nums=[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]), [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1], [1, 1]])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1]), [[5, 5, 5], [4, 5, 5], [4, 4, 5], [4, 4, 4], [3, 5, 5], [3, 4, 5], [3, 4, 4], [3, 3, 5], [3, 3, 4], [3, 3, 3], [2, 5, 5], [2, 4, 5], [2, 4, 4], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 2, 5], [2, 2, 4], [2, 2, 3], [2, 2, 2], [1, 5, 5], [1, 4, 5], [1, 4, 4], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 1, 5], [1, 1, 4], [1, 1, 3], [1, 1, 2], [1, 1, 1], [5, 5], [4, 5], [4, 4], [3, 5], [3, 4], [3, 3], [2, 5], [2, 4], [2, 3], [2, 2], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1]])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3]), [[1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2], [1, 1, 1, 2, 2, 3, 3, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2], [1, 1, 1, 2, 3, 3, 3, 3, 3], [1, 1, 1, 2, 3, 3, 3, 3], [1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 3], [1, 1, 1, 2], [1, 1, 1, 3, 3, 3, 3, 3], [1, 1, 1, 3, 3, 3, 3], [1, 1, 1, 3, 3, 3], [1, 1, 1, 3, 3], [1, 1, 1, 3], [1, 1, 1], [1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 2, 2, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 2, 3], [1, 1, 2, 2, 2, 2], [1, 1, 2, 2, 2, 3, 3, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3, 3, 3, 3], [1, 1, 2, 2, 3, 3, 3, 3], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 2, 3, 3, 3, 3, 3], [1, 1, 2, 3, 3, 3, 3], [1, 1, 2, 3, 3, 3], [1, 1, 2, 3, 3], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3, 3, 3, 3, 3], [1, 1, 3, 3, 3, 3], [1, 1, 3, 3, 3], [1, 1, 3, 3], [1, 1, 3], [1, 1], [1, 2, 2, 2, 2, 3, 3, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 2, 2, 2, 3, 3, 3, 3, 3], [1, 2, 2, 2, 3, 3, 3, 3], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 2, 2, 3, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3, 3], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3, 3, 3, 3], [1, 2, 3, 3, 3, 3], [1, 2, 3, 3, 3], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3, 3, 3, 3], [1, 3, 3, 3, 3], [1, 3, 3, 3], [1, 3, 3], [1, 3], [2, 2, 2, 2, 3, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 3], [2, 2, 2, 2], [2, 2, 2, 3, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [2, 2, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 3], [2, 2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3, 3, 3, 3], [2, 3, 3, 3, 3], [2, 3, 3, 3], [2, 3, 3], [2, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3], [3, 3, 3], [3, 3]])\n assert answers_match(candidate(nums=[1, 2, 2, 2, 3, 3, 4, 4, 4, 4]), [[1, 2, 2, 2, 3, 3, 4, 4, 4, 4], [1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 2, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3, 4, 4, 4, 4], [1, 2, 2, 2, 3, 4, 4, 4], [1, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 4, 4, 4], [1, 2, 2, 2, 4, 4, 4], [1, 2, 2, 2, 4, 4], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 2, 2, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4, 4], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4, 4], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4, 4], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4, 4], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 4, 4, 4, 4], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4, 4], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4, 4], [1, 4, 4, 4], [1, 4, 4], [1, 4], [2, 2, 2, 3, 3, 4, 4, 4, 4], [2, 2, 2, 3, 3, 4, 4, 4], [2, 2, 2, 3, 3, 4, 4], [2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3], [2, 2, 2, 3, 4, 4, 4, 4], [2, 2, 2, 3, 4, 4, 4], [2, 2, 2, 3, 4, 4], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4, 4, 4, 4], [2, 2, 2, 4, 4, 4], [2, 2, 2, 4, 4], [2, 2, 2, 4], [2, 2, 2], [2, 2, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4, 4], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4, 4], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 4, 4, 4, 4], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4, 4], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4, 4], [2, 4, 4, 4], [2, 4, 4], [2, 4], [3, 3, 4, 4, 4, 4], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4, 4], [3, 4, 4, 4], [3, 4, 4], [3, 4], [4, 4, 4, 4], [4, 4, 4], [4, 4]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3]), [[1, 2, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 3, 3], [1, 2, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3, 3, 3], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2, 2], [1, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3, 3, 3], [1, 4, 4], [1, 3, 3, 4], [1, 3, 3, 3, 3], [1, 2, 2, 3, 4], [1, 2, 2, 3, 3, 3], [1, 2, 2, 4], [1, 2, 2, 3, 3], [1, 2, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 1, 2, 3, 4], [1, 1, 2, 3, 3, 3], [1, 1, 2, 4], [1, 1, 2, 3, 3], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2], [1, 1, 3, 4], [1, 1, 3, 3, 3], [1, 1, 4], [1, 1, 3, 3], [1, 1, 2, 2, 3], [1, 1, 2, 2], [1, 1, 1, 2, 3], [1, 1, 1, 2], [1, 1, 1, 3], [1, 1, 1], [2, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3, 3, 3], [2, 4, 4], [2, 3, 3, 4], [2, 3, 3, 3, 3], [2, 2, 2, 3, 4], [2, 2, 2, 3, 3, 3], [2, 2, 2, 4], [2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2], [3, 4, 4], [3, 3, 3, 4], [3, 3, 3, 3, 3], [4, 4], [3, 3, 4], [3, 3, 3, 3], [2, 2, 3, 4], [2, 2, 3, 3, 3], [2, 2, 4], [2, 2, 3, 3], [2, 2, 2, 2, 3], [2, 2, 2, 2], [1, 2, 3, 4], [1, 2, 3, 3, 3], [1, 2, 4], [1, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 3, 4], [1, 3, 3, 3], [1, 4], [1, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 1, 2, 3], [1, 1, 2], [1, 1, 3], [1, 1], [2, 3, 4], [2, 3, 3, 3], [2, 4], [2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [3, 4], [3, 3, 3], [3, 3], [2, 2, 3], [2, 2], [1, 2, 3], [1, 2], [1, 3], [2, 3]])\n assert answers_match(candidate(nums=[1, 2, 3, 2, 1, 2, 3, 2, 1]), [[1, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 3, 3], [1, 2, 2, 3], [1, 2, 2, 2], [1, 1, 2, 3], [1, 1, 2, 2], [1, 1, 3], [1, 1, 2], [1, 1, 1], [2, 3, 3], [2, 2, 2, 3], [2, 2, 2, 2], [3, 3], [2, 2, 3], [2, 2, 2], [1, 2, 3], [1, 2, 2], [1, 3], [1, 2], [1, 1], [2, 3], [2, 2]])\n assert answers_match(candidate(nums=[1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]), [[1, 2, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2, 2], [1, 1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2], [1, 2, 2, 2, 2, 2], [1, 1, 2, 2, 2, 2], [1, 1, 1, 2, 2, 2], [1, 1, 1, 1, 2, 2], [1, 1, 1, 1, 1, 2], [1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2], [1, 2, 2, 2, 2], [1, 1, 2, 2, 2], [1, 1, 1, 2, 2], [1, 1, 1, 1, 2], [1, 1, 1, 1, 1], [2, 2, 2, 2], [1, 2, 2, 2], [1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1, 1], [2, 2, 2], [1, 2, 2], [1, 1, 2], [1, 1, 1], [2, 2], [1, 2], [1, 1]])\n assert answers_match(candidate(nums=[0, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6]), [[0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 6], [0, 1, 2, 3, 4, 5, 5, 7], [0, 1, 2, 3, 4, 5, 5, 6], [0, 1, 2, 3, 4, 5, 5], [0, 1, 2, 3, 4, 4, 6, 7], [0, 1, 2, 3, 4, 4, 6, 6], [0, 1, 2, 3, 4, 4, 5, 7], [0, 1, 2, 3, 4, 4, 5, 6], [0, 1, 2, 3, 4, 4, 5], [0, 1, 2, 3, 4, 4, 7], [0, 1, 2, 3, 4, 4, 6], [0, 1, 2, 3, 4, 4], [0, 1, 2, 3, 3, 5, 6, 7], [0, 1, 2, 3, 3, 5, 6, 6], [0, 1, 2, 3, 3, 5, 5, 7], [0, 1, 2, 3, 3, 5, 5, 6], [0, 1, 2, 3, 3, 5, 5], [0, 1, 2, 3, 3, 4, 6, 7], [0, 1, 2, 3, 3, 4, 6, 6], [0, 1, 2, 3, 3, 4, 5, 7], [0, 1, 2, 3, 3, 4, 5, 6], [0, 1, 2, 3, 3, 4, 5], [0, 1, 2, 3, 3, 4, 7], [0, 1, 2, 3, 3, 4, 6], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 3, 6, 7], [0, 1, 2, 3, 3, 6, 6], [0, 1, 2, 3, 3, 5, 7], [0, 1, 2, 3, 3, 5, 6], [0, 1, 2, 3, 3, 5], [0, 1, 2, 3, 3, 7], [0, 1, 2, 3, 3, 6], [0, 1, 2, 3, 3], [0, 1, 2, 2, 4, 5, 6, 7], [0, 1, 2, 2, 4, 5, 6, 6], [0, 1, 2, 2, 4, 5, 5, 7], [0, 1, 2, 2, 4, 5, 5, 6], [0, 1, 2, 2, 4, 5, 5], [0, 1, 2, 2, 4, 4, 6, 7], [0, 1, 2, 2, 4, 4, 6, 6], [0, 1, 2, 2, 4, 4, 5, 7], [0, 1, 2, 2, 4, 4, 5, 6], [0, 1, 2, 2, 4, 4, 5], [0, 1, 2, 2, 4, 4, 7], [0, 1, 2, 2, 4, 4, 6], [0, 1, 2, 2, 4, 4], [0, 1, 2, 2, 3, 5, 6, 7], [0, 1, 2, 2, 3, 5, 6, 6], [0, 1, 2, 2, 3, 5, 5, 7], [0, 1, 2, 2, 3, 5, 5, 6], [0, 1, 2, 2, 3, 5, 5], [0, 1, 2, 2, 3, 4, 6, 7], [0, 1, 2, 2, 3, 4, 6, 6], [0, 1, 2, 2, 3, 4, 5, 7], [0, 1, 2, 2, 3, 4, 5, 6], [0, 1, 2, 2, 3, 4, 5], [0, 1, 2, 2, 3, 4, 7], [0, 1, 2, 2, 3, 4, 6], [0, 1, 2, 2, 3, 4], [0, 1, 2, 2, 3, 6, 7], [0, 1, 2, 2, 3, 6, 6], [0, 1, 2, 2, 3, 5, 7], [0, 1, 2, 2, 3, 5, 6], [0, 1, 2, 2, 3, 5], [0, 1, 2, 2, 3, 7], [0, 1, 2, 2, 3, 6], [0, 1, 2, 2, 3], [0, 1, 2, 2, 5, 6, 7], [0, 1, 2, 2, 5, 6, 6], [0, 1, 2, 2, 5, 5, 7], [0, 1, 2, 2, 5, 5, 6], [0, 1, 2, 2, 5, 5], [0, 1, 2, 2, 4, 6, 7], [0, 1, 2, 2, 4, 6, 6], [0, 1, 2, 2, 4, 5, 7], [0, 1, 2, 2, 4, 5, 6], [0, 1, 2, 2, 4, 5], [0, 1, 2, 2, 4, 7], [0, 1, 2, 2, 4, 6], [0, 1, 2, 2, 4], [0, 1, 2, 2, 6, 7], [0, 1, 2, 2, 6, 6], [0, 1, 2, 2, 5, 7], [0, 1, 2, 2, 5, 6], [0, 1, 2, 2, 5], [0, 1, 2, 2, 7], [0, 1, 2, 2, 6], [0, 1, 2, 2], [0, 1, 1, 3, 4, 5, 6, 7], [0, 1, 1, 3, 4, 5, 6, 6], [0, 1, 1, 3, 4, 5, 5, 7], [0, 1, 1, 3, 4, 5, 5, 6], [0, 1, 1, 3, 4, 5, 5], [0, 1, 1, 3, 4, 4, 6, 7], [0, 1, 1, 3, 4, 4, 6, 6], [0, 1, 1, 3, 4, 4, 5, 7], [0, 1, 1, 3, 4, 4, 5, 6], [0, 1, 1, 3, 4, 4, 5], [0, 1, 1, 3, 4, 4, 7], [0, 1, 1, 3, 4, 4, 6], [0, 1, 1, 3, 4, 4], [0, 1, 1, 3, 3, 5, 6, 7], [0, 1, 1, 3, 3, 5, 6, 6], [0, 1, 1, 3, 3, 5, 5, 7], [0, 1, 1, 3, 3, 5, 5, 6], [0, 1, 1, 3, 3, 5, 5], [0, 1, 1, 3, 3, 4, 6, 7], [0, 1, 1, 3, 3, 4, 6, 6], [0, 1, 1, 3, 3, 4, 5, 7], [0, 1, 1, 3, 3, 4, 5, 6], [0, 1, 1, 3, 3, 4, 5], [0, 1, 1, 3, 3, 4, 7], [0, 1, 1, 3, 3, 4, 6], [0, 1, 1, 3, 3, 4], [0, 1, 1, 3, 3, 6, 7], [0, 1, 1, 3, 3, 6, 6], [0, 1, 1, 3, 3, 5, 7], [0, 1, 1, 3, 3, 5, 6], [0, 1, 1, 3, 3, 5], [0, 1, 1, 3, 3, 7], [0, 1, 1, 3, 3, 6], [0, 1, 1, 3, 3], [0, 1, 1, 2, 4, 5, 6, 7], [0, 1, 1, 2, 4, 5, 6, 6], [0, 1, 1, 2, 4, 5, 5, 7], [0, 1, 1, 2, 4, 5, 5, 6], [0, 1, 1, 2, 4, 5, 5], [0, 1, 1, 2, 4, 4, 6, 7], [0, 1, 1, 2, 4, 4, 6, 6], [0, 1, 1, 2, 4, 4, 5, 7], [0, 1, 1, 2, 4, 4, 5, 6], [0, 1, 1, 2, 4, 4, 5], [0, 1, 1, 2, 4, 4, 7], [0, 1, 1, 2, 4, 4, 6], [0, 1, 1, 2, 4, 4], [0, 1, 1, 2, 3, 5, 6, 7], [0, 1, 1, 2, 3, 5, 6, 6], [0, 1, 1, 2, 3, 5, 5, 7], [0, 1, 1, 2, 3, 5, 5, 6], [0, 1, 1, 2, 3, 5, 5], [0, 1, 1, 2, 3, 4, 6, 7], [0, 1, 1, 2, 3, 4, 6, 6], [0, 1, 1, 2, 3, 4, 5, 7], [0, 1, 1, 2, 3, 4, 5, 6], [0, 1, 1, 2, 3, 4, 5], [0, 1, 1, 2, 3, 4, 7], [0, 1, 1, 2, 3, 4, 6], [0, 1, 1, 2, 3, 4], [0, 1, 1, 2, 3, 6, 7], [0, 1, 1, 2, 3, 6, 6], [0, 1, 1, 2, 3, 5, 7], [0, 1, 1, 2, 3, 5, 6], [0, 1, 1, 2, 3, 5], [0, 1, 1, 2, 3, 7], [0, 1, 1, 2, 3, 6], [0, 1, 1, 2, 3], [0, 1, 1, 2, 5, 6, 7], [0, 1, 1, 2, 5, 6, 6], [0, 1, 1, 2, 5, 5, 7], [0, 1, 1, 2, 5, 5, 6], [0, 1, 1, 2, 5, 5], [0, 1, 1, 2, 4, 6, 7], [0, 1, 1, 2, 4, 6, 6], [0, 1, 1, 2, 4, 5, 7], [0, 1, 1, 2, 4, 5, 6], [0, 1, 1, 2, 4, 5], [0, 1, 1, 2, 4, 7], [0, 1, 1, 2, 4, 6], [0, 1, 1, 2, 4], [0, 1, 1, 2, 6, 7], [0, 1, 1, 2, 6, 6], [0, 1, 1, 2, 5, 7], [0, 1, 1, 2, 5, 6], [0, 1, 1, 2, 5], [0, 1, 1, 2, 7], [0, 1, 1, 2, 6], [0, 1, 1, 2], [0, 1, 1, 4, 5, 6, 7], [0, 1, 1, 4, 5, 6, 6], [0, 1, 1, 4, 5, 5, 7], [0, 1, 1, 4, 5, 5, 6], [0, 1, 1, 4, 5, 5], [0, 1, 1, 4, 4, 6, 7], [0, 1, 1, 4, 4, 6, 6], [0, 1, 1, 4, 4, 5, 7], [0, 1, 1, 4, 4, 5, 6], [0, 1, 1, 4, 4, 5], [0, 1, 1, 4, 4, 7], [0, 1, 1, 4, 4, 6], [0, 1, 1, 4, 4], [0, 1, 1, 3, 5, 6, 7], [0, 1, 1, 3, 5, 6, 6], [0, 1, 1, 3, 5, 5, 7], [0, 1, 1, 3, 5, 5, 6], [0, 1, 1, 3, 5, 5], [0, 1, 1, 3, 4, 6, 7], [0, 1, 1, 3, 4, 6, 6], [0, 1, 1, 3, 4, 5, 7], [0, 1, 1, 3, 4, 5, 6], [0, 1, 1, 3, 4, 5], [0, 1, 1, 3, 4, 7], [0, 1, 1, 3, 4, 6], [0, 1, 1, 3, 4], [0, 1, 1, 3, 6, 7], [0, 1, 1, 3, 6, 6], [0, 1, 1, 3, 5, 7], [0, 1, 1, 3, 5, 6], [0, 1, 1, 3, 5], [0, 1, 1, 3, 7], [0, 1, 1, 3, 6], [0, 1, 1, 3], [0, 1, 1, 5, 6, 7], [0, 1, 1, 5, 6, 6], [0, 1, 1, 5, 5, 7], [0, 1, 1, 5, 5, 6], [0, 1, 1, 5, 5], [0, 1, 1, 4, 6, 7], [0, 1, 1, 4, 6, 6], [0, 1, 1, 4, 5, 7], [0, 1, 1, 4, 5, 6], [0, 1, 1, 4, 5], [0, 1, 1, 4, 7], [0, 1, 1, 4, 6], [0, 1, 1, 4], [0, 1, 1, 6, 7], [0, 1, 1, 6, 6], [0, 1, 1, 5, 7], [0, 1, 1, 5, 6], [0, 1, 1, 5], [0, 1, 1, 7], [0, 1, 1, 6], [0, 1, 1], [0, 0, 2, 3, 4, 5, 6, 7], [0, 0, 2, 3, 4, 5, 6, 6], [0, 0, 2, 3, 4, 5, 5, 7], [0, 0, 2, 3, 4, 5, 5, 6], [0, 0, 2, 3, 4, 5, 5], [0, 0, 2, 3, 4, 4, 6, 7], [0, 0, 2, 3, 4, 4, 6, 6], [0, 0, 2, 3, 4, 4, 5, 7], [0, 0, 2, 3, 4, 4, 5, 6], [0, 0, 2, 3, 4, 4, 5], [0, 0, 2, 3, 4, 4, 7], [0, 0, 2, 3, 4, 4, 6], [0, 0, 2, 3, 4, 4], [0, 0, 2, 3, 3, 5, 6, 7], [0, 0, 2, 3, 3, 5, 6, 6], [0, 0, 2, 3, 3, 5, 5, 7], [0, 0, 2, 3, 3, 5, 5, 6], [0, 0, 2, 3, 3, 5, 5], [0, 0, 2, 3, 3, 4, 6, 7], [0, 0, 2, 3, 3, 4, 6, 6], [0, 0, 2, 3, 3, 4, 5, 7], [0, 0, 2, 3, 3, 4, 5, 6], [0, 0, 2, 3, 3, 4, 5], [0, 0, 2, 3, 3, 4, 7], [0, 0, 2, 3, 3, 4, 6], [0, 0, 2, 3, 3, 4], [0, 0, 2, 3, 3, 6, 7], [0, 0, 2, 3, 3, 6, 6], [0, 0, 2, 3, 3, 5, 7], [0, 0, 2, 3, 3, 5, 6], [0, 0, 2, 3, 3, 5], [0, 0, 2, 3, 3, 7], [0, 0, 2, 3, 3, 6], [0, 0, 2, 3, 3], [0, 0, 2, 2, 4, 5, 6, 7], [0, 0, 2, 2, 4, 5, 6, 6], [0, 0, 2, 2, 4, 5, 5, 7], [0, 0, 2, 2, 4, 5, 5, 6], [0, 0, 2, 2, 4, 5, 5], [0, 0, 2, 2, 4, 4, 6, 7], [0, 0, 2, 2, 4, 4, 6, 6], [0, 0, 2, 2, 4, 4, 5, 7], [0, 0, 2, 2, 4, 4, 5, 6], [0, 0, 2, 2, 4, 4, 5], [0, 0, 2, 2, 4, 4, 7], [0, 0, 2, 2, 4, 4, 6], [0, 0, 2, 2, 4, 4], [0, 0, 2, 2, 3, 5, 6, 7], [0, 0, 2, 2, 3, 5, 6, 6], [0, 0, 2, 2, 3, 5, 5, 7], [0, 0, 2, 2, 3, 5, 5, 6], [0, 0, 2, 2, 3, 5, 5], [0, 0, 2, 2, 3, 4, 6, 7], [0, 0, 2, 2, 3, 4, 6, 6], [0, 0, 2, 2, 3, 4, 5, 7], [0, 0, 2, 2, 3, 4, 5, 6], [0, 0, 2, 2, 3, 4, 5], [0, 0, 2, 2, 3, 4, 7], [0, 0, 2, 2, 3, 4, 6], [0, 0, 2, 2, 3, 4], [0, 0, 2, 2, 3, 6, 7], [0, 0, 2, 2, 3, 6, 6], [0, 0, 2, 2, 3, 5, 7], [0, 0, 2, 2, 3, 5, 6], [0, 0, 2, 2, 3, 5], [0, 0, 2, 2, 3, 7], [0, 0, 2, 2, 3, 6], [0, 0, 2, 2, 3], [0, 0, 2, 2, 5, 6, 7], [0, 0, 2, 2, 5, 6, 6], [0, 0, 2, 2, 5, 5, 7], [0, 0, 2, 2, 5, 5, 6], [0, 0, 2, 2, 5, 5], [0, 0, 2, 2, 4, 6, 7], [0, 0, 2, 2, 4, 6, 6], [0, 0, 2, 2, 4, 5, 7], [0, 0, 2, 2, 4, 5, 6], [0, 0, 2, 2, 4, 5], [0, 0, 2, 2, 4, 7], [0, 0, 2, 2, 4, 6], [0, 0, 2, 2, 4], [0, 0, 2, 2, 6, 7], [0, 0, 2, 2, 6, 6], [0, 0, 2, 2, 5, 7], [0, 0, 2, 2, 5, 6], [0, 0, 2, 2, 5], [0, 0, 2, 2, 7], [0, 0, 2, 2, 6], [0, 0, 2, 2], [0, 0, 1, 3, 4, 5, 6, 7], [0, 0, 1, 3, 4, 5, 6, 6], [0, 0, 1, 3, 4, 5, 5, 7], [0, 0, 1, 3, 4, 5, 5, 6], [0, 0, 1, 3, 4, 5, 5], [0, 0, 1, 3, 4, 4, 6, 7], [0, 0, 1, 3, 4, 4, 6, 6], [0, 0, 1, 3, 4, 4, 5, 7], [0, 0, 1, 3, 4, 4, 5, 6], [0, 0, 1, 3, 4, 4, 5], [0, 0, 1, 3, 4, 4, 7], [0, 0, 1, 3, 4, 4, 6], [0, 0, 1, 3, 4, 4], [0, 0, 1, 3, 3, 5, 6, 7], [0, 0, 1, 3, 3, 5, 6, 6], [0, 0, 1, 3, 3, 5, 5, 7], [0, 0, 1, 3, 3, 5, 5, 6], [0, 0, 1, 3, 3, 5, 5], [0, 0, 1, 3, 3, 4, 6, 7], [0, 0, 1, 3, 3, 4, 6, 6], [0, 0, 1, 3, 3, 4, 5, 7], [0, 0, 1, 3, 3, 4, 5, 6], [0, 0, 1, 3, 3, 4, 5], [0, 0, 1, 3, 3, 4, 7], [0, 0, 1, 3, 3, 4, 6], [0, 0, 1, 3, 3, 4], [0, 0, 1, 3, 3, 6, 7], [0, 0, 1, 3, 3, 6, 6], [0, 0, 1, 3, 3, 5, 7], [0, 0, 1, 3, 3, 5, 6], [0, 0, 1, 3, 3, 5], [0, 0, 1, 3, 3, 7], [0, 0, 1, 3, 3, 6], [0, 0, 1, 3, 3], [0, 0, 1, 2, 4, 5, 6, 7], [0, 0, 1, 2, 4, 5, 6, 6], [0, 0, 1, 2, 4, 5, 5, 7], [0, 0, 1, 2, 4, 5, 5, 6], [0, 0, 1, 2, 4, 5, 5], [0, 0, 1, 2, 4, 4, 6, 7], [0, 0, 1, 2, 4, 4, 6, 6], [0, 0, 1, 2, 4, 4, 5, 7], [0, 0, 1, 2, 4, 4, 5, 6], [0, 0, 1, 2, 4, 4, 5], [0, 0, 1, 2, 4, 4, 7], [0, 0, 1, 2, 4, 4, 6], [0, 0, 1, 2, 4, 4], [0, 0, 1, 2, 3, 5, 6, 7], [0, 0, 1, 2, 3, 5, 6, 6], [0, 0, 1, 2, 3, 5, 5, 7], [0, 0, 1, 2, 3, 5, 5, 6], [0, 0, 1, 2, 3, 5, 5], [0, 0, 1, 2, 3, 4, 6, 7], [0, 0, 1, 2, 3, 4, 6, 6], [0, 0, 1, 2, 3, 4, 5, 7], [0, 0, 1, 2, 3, 4, 5, 6], [0, 0, 1, 2, 3, 4, 5], [0, 0, 1, 2, 3, 4, 7], [0, 0, 1, 2, 3, 4, 6], [0, 0, 1, 2, 3, 4], [0, 0, 1, 2, 3, 6, 7], [0, 0, 1, 2, 3, 6, 6], [0, 0, 1, 2, 3, 5, 7], [0, 0, 1, 2, 3, 5, 6], [0, 0, 1, 2, 3, 5], [0, 0, 1, 2, 3, 7], [0, 0, 1, 2, 3, 6], [0, 0, 1, 2, 3], [0, 0, 1, 2, 5, 6, 7], [0, 0, 1, 2, 5, 6, 6], [0, 0, 1, 2, 5, 5, 7], [0, 0, 1, 2, 5, 5, 6], [0, 0, 1, 2, 5, 5], [0, 0, 1, 2, 4, 6, 7], [0, 0, 1, 2, 4, 6, 6], [0, 0, 1, 2, 4, 5, 7], [0, 0, 1, 2, 4, 5, 6], [0, 0, 1, 2, 4, 5], [0, 0, 1, 2, 4, 7], [0, 0, 1, 2, 4, 6], [0, 0, 1, 2, 4], [0, 0, 1, 2, 6, 7], [0, 0, 1, 2, 6, 6], [0, 0, 1, 2, 5, 7], [0, 0, 1, 2, 5, 6], [0, 0, 1, 2, 5], [0, 0, 1, 2, 7], [0, 0, 1, 2, 6], [0, 0, 1, 2], [0, 0, 1, 4, 5, 6, 7], [0, 0, 1, 4, 5, 6, 6], [0, 0, 1, 4, 5, 5, 7], [0, 0, 1, 4, 5, 5, 6], [0, 0, 1, 4, 5, 5], [0, 0, 1, 4, 4, 6, 7], [0, 0, 1, 4, 4, 6, 6], [0, 0, 1, 4, 4, 5, 7], [0, 0, 1, 4, 4, 5, 6], [0, 0, 1, 4, 4, 5], [0, 0, 1, 4, 4, 7], [0, 0, 1, 4, 4, 6], [0, 0, 1, 4, 4], [0, 0, 1, 3, 5, 6, 7], [0, 0, 1, 3, 5, 6, 6], [0, 0, 1, 3, 5, 5, 7], [0, 0, 1, 3, 5, 5, 6], [0, 0, 1, 3, 5, 5], [0, 0, 1, 3, 4, 6, 7], [0, 0, 1, 3, 4, 6, 6], [0, 0, 1, 3, 4, 5, 7], [0, 0, 1, 3, 4, 5, 6], [0, 0, 1, 3, 4, 5], [0, 0, 1, 3, 4, 7], [0, 0, 1, 3, 4, 6], [0, 0, 1, 3, 4], [0, 0, 1, 3, 6, 7], [0, 0, 1, 3, 6, 6], [0, 0, 1, 3, 5, 7], [0, 0, 1, 3, 5, 6], [0, 0, 1, 3, 5], [0, 0, 1, 3, 7], [0, 0, 1, 3, 6], [0, 0, 1, 3], [0, 0, 1, 5, 6, 7], [0, 0, 1, 5, 6, 6], [0, 0, 1, 5, 5, 7], [0, 0, 1, 5, 5, 6], [0, 0, 1, 5, 5], [0, 0, 1, 4, 6, 7], [0, 0, 1, 4, 6, 6], [0, 0, 1, 4, 5, 7], [0, 0, 1, 4, 5, 6], [0, 0, 1, 4, 5], [0, 0, 1, 4, 7], [0, 0, 1, 4, 6], [0, 0, 1, 4], [0, 0, 1, 6, 7], [0, 0, 1, 6, 6], [0, 0, 1, 5, 7], [0, 0, 1, 5, 6], [0, 0, 1, 5], [0, 0, 1, 7], [0, 0, 1, 6], [0, 0, 1], [0, 0, 3, 4, 5, 6, 7], [0, 0, 3, 4, 5, 6, 6], [0, 0, 3, 4, 5, 5, 7], [0, 0, 3, 4, 5, 5, 6], [0, 0, 3, 4, 5, 5], [0, 0, 3, 4, 4, 6, 7], [0, 0, 3, 4, 4, 6, 6], [0, 0, 3, 4, 4, 5, 7], [0, 0, 3, 4, 4, 5, 6], [0, 0, 3, 4, 4, 5], [0, 0, 3, 4, 4, 7], [0, 0, 3, 4, 4, 6], [0, 0, 3, 4, 4], [0, 0, 3, 3, 5, 6, 7], [0, 0, 3, 3, 5, 6, 6], [0, 0, 3, 3, 5, 5, 7], [0, 0, 3, 3, 5, 5, 6], [0, 0, 3, 3, 5, 5], [0, 0, 3, 3, 4, 6, 7], [0, 0, 3, 3, 4, 6, 6], [0, 0, 3, 3, 4, 5, 7], [0, 0, 3, 3, 4, 5, 6], [0, 0, 3, 3, 4, 5], [0, 0, 3, 3, 4, 7], [0, 0, 3, 3, 4, 6], [0, 0, 3, 3, 4], [0, 0, 3, 3, 6, 7], [0, 0, 3, 3, 6, 6], [0, 0, 3, 3, 5, 7], [0, 0, 3, 3, 5, 6], [0, 0, 3, 3, 5], [0, 0, 3, 3, 7], [0, 0, 3, 3, 6], [0, 0, 3, 3], [0, 0, 2, 4, 5, 6, 7], [0, 0, 2, 4, 5, 6, 6], [0, 0, 2, 4, 5, 5, 7], [0, 0, 2, 4, 5, 5, 6], [0, 0, 2, 4, 5, 5], [0, 0, 2, 4, 4, 6, 7], [0, 0, 2, 4, 4, 6, 6], [0, 0, 2, 4, 4, 5, 7], [0, 0, 2, 4, 4, 5, 6], [0, 0, 2, 4, 4, 5], [0, 0, 2, 4, 4, 7], [0, 0, 2, 4, 4, 6], [0, 0, 2, 4, 4], [0, 0, 2, 3, 5, 6, 7], [0, 0, 2, 3, 5, 6, 6], [0, 0, 2, 3, 5, 5, 7], [0, 0, 2, 3, 5, 5, 6], [0, 0, 2, 3, 5, 5], [0, 0, 2, 3, 4, 6, 7], [0, 0, 2, 3, 4, 6, 6], [0, 0, 2, 3, 4, 5, 7], [0, 0, 2, 3, 4, 5, 6], [0, 0, 2, 3, 4, 5], [0, 0, 2, 3, 4, 7], [0, 0, 2, 3, 4, 6], [0, 0, 2, 3, 4], [0, 0, 2, 3, 6, 7], [0, 0, 2, 3, 6, 6], [0, 0, 2, 3, 5, 7], [0, 0, 2, 3, 5, 6], [0, 0, 2, 3, 5], [0, 0, 2, 3, 7], [0, 0, 2, 3, 6], [0, 0, 2, 3], [0, 0, 2, 5, 6, 7], [0, 0, 2, 5, 6, 6], [0, 0, 2, 5, 5, 7], [0, 0, 2, 5, 5, 6], [0, 0, 2, 5, 5], [0, 0, 2, 4, 6, 7], [0, 0, 2, 4, 6, 6], [0, 0, 2, 4, 5, 7], [0, 0, 2, 4, 5, 6], [0, 0, 2, 4, 5], [0, 0, 2, 4, 7], [0, 0, 2, 4, 6], [0, 0, 2, 4], [0, 0, 2, 6, 7], [0, 0, 2, 6, 6], [0, 0, 2, 5, 7], [0, 0, 2, 5, 6], [0, 0, 2, 5], [0, 0, 2, 7], [0, 0, 2, 6], [0, 0, 2], [0, 0, 4, 5, 6, 7], [0, 0, 4, 5, 6, 6], [0, 0, 4, 5, 5, 7], [0, 0, 4, 5, 5, 6], [0, 0, 4, 5, 5], [0, 0, 4, 4, 6, 7], [0, 0, 4, 4, 6, 6], [0, 0, 4, 4, 5, 7], [0, 0, 4, 4, 5, 6], [0, 0, 4, 4, 5], [0, 0, 4, 4, 7], [0, 0, 4, 4, 6], [0, 0, 4, 4], [0, 0, 3, 5, 6, 7], [0, 0, 3, 5, 6, 6], [0, 0, 3, 5, 5, 7], [0, 0, 3, 5, 5, 6], [0, 0, 3, 5, 5], [0, 0, 3, 4, 6, 7], [0, 0, 3, 4, 6, 6], [0, 0, 3, 4, 5, 7], [0, 0, 3, 4, 5, 6], [0, 0, 3, 4, 5], [0, 0, 3, 4, 7], [0, 0, 3, 4, 6], [0, 0, 3, 4], [0, 0, 3, 6, 7], [0, 0, 3, 6, 6], [0, 0, 3, 5, 7], [0, 0, 3, 5, 6], [0, 0, 3, 5], [0, 0, 3, 7], [0, 0, 3, 6], [0, 0, 3], [0, 0, 5, 6, 7], [0, 0, 5, 6, 6], [0, 0, 5, 5, 7], [0, 0, 5, 5, 6], [0, 0, 5, 5], [0, 0, 4, 6, 7], [0, 0, 4, 6, 6], [0, 0, 4, 5, 7], [0, 0, 4, 5, 6], [0, 0, 4, 5], [0, 0, 4, 7], [0, 0, 4, 6], [0, 0, 4], [0, 0, 6, 7], [0, 0, 6, 6], [0, 0, 5, 7], [0, 0, 5, 6], [0, 0, 5], [0, 0, 7], [0, 0, 6], [0, 0], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 6], [1, 2, 3, 4, 5, 5, 7], [1, 2, 3, 4, 5, 5, 6], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 4, 6, 7], [1, 2, 3, 4, 4, 6, 6], [1, 2, 3, 4, 4, 5, 7], [1, 2, 3, 4, 4, 5, 6], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4, 7], [1, 2, 3, 4, 4, 6], [1, 2, 3, 4, 4], [1, 2, 3, 3, 5, 6, 7], [1, 2, 3, 3, 5, 6, 6], [1, 2, 3, 3, 5, 5, 7], [1, 2, 3, 3, 5, 5, 6], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 4, 6, 7], [1, 2, 3, 3, 4, 6, 6], [1, 2, 3, 3, 4, 5, 7], [1, 2, 3, 3, 4, 5, 6], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4, 7], [1, 2, 3, 3, 4, 6], [1, 2, 3, 3, 4], [1, 2, 3, 3, 6, 7], [1, 2, 3, 3, 6, 6], [1, 2, 3, 3, 5, 7], [1, 2, 3, 3, 5, 6], [1, 2, 3, 3, 5], [1, 2, 3, 3, 7], [1, 2, 3, 3, 6], [1, 2, 3, 3], [1, 2, 2, 4, 5, 6, 7], [1, 2, 2, 4, 5, 6, 6], [1, 2, 2, 4, 5, 5, 7], [1, 2, 2, 4, 5, 5, 6], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 4, 6, 7], [1, 2, 2, 4, 4, 6, 6], [1, 2, 2, 4, 4, 5, 7], [1, 2, 2, 4, 4, 5, 6], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4, 7], [1, 2, 2, 4, 4, 6], [1, 2, 2, 4, 4], [1, 2, 2, 3, 5, 6, 7], [1, 2, 2, 3, 5, 6, 6], [1, 2, 2, 3, 5, 5, 7], [1, 2, 2, 3, 5, 5, 6], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 4, 6, 7], [1, 2, 2, 3, 4, 6, 6], [1, 2, 2, 3, 4, 5, 7], [1, 2, 2, 3, 4, 5, 6], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4, 7], [1, 2, 2, 3, 4, 6], [1, 2, 2, 3, 4], [1, 2, 2, 3, 6, 7], [1, 2, 2, 3, 6, 6], [1, 2, 2, 3, 5, 7], [1, 2, 2, 3, 5, 6], [1, 2, 2, 3, 5], [1, 2, 2, 3, 7], [1, 2, 2, 3, 6], [1, 2, 2, 3], [1, 2, 2, 5, 6, 7], [1, 2, 2, 5, 6, 6], [1, 2, 2, 5, 5, 7], [1, 2, 2, 5, 5, 6], [1, 2, 2, 5, 5], [1, 2, 2, 4, 6, 7], [1, 2, 2, 4, 6, 6], [1, 2, 2, 4, 5, 7], [1, 2, 2, 4, 5, 6], [1, 2, 2, 4, 5], [1, 2, 2, 4, 7], [1, 2, 2, 4, 6], [1, 2, 2, 4], [1, 2, 2, 6, 7], [1, 2, 2, 6, 6], [1, 2, 2, 5, 7], [1, 2, 2, 5, 6], [1, 2, 2, 5], [1, 2, 2, 7], [1, 2, 2, 6], [1, 2, 2], [1, 1, 3, 4, 5, 6, 7], [1, 1, 3, 4, 5, 6, 6], [1, 1, 3, 4, 5, 5, 7], [1, 1, 3, 4, 5, 5, 6], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 4, 6, 7], [1, 1, 3, 4, 4, 6, 6], [1, 1, 3, 4, 4, 5, 7], [1, 1, 3, 4, 4, 5, 6], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4, 7], [1, 1, 3, 4, 4, 6], [1, 1, 3, 4, 4], [1, 1, 3, 3, 5, 6, 7], [1, 1, 3, 3, 5, 6, 6], [1, 1, 3, 3, 5, 5, 7], [1, 1, 3, 3, 5, 5, 6], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 4, 6, 7], [1, 1, 3, 3, 4, 6, 6], [1, 1, 3, 3, 4, 5, 7], [1, 1, 3, 3, 4, 5, 6], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4, 7], [1, 1, 3, 3, 4, 6], [1, 1, 3, 3, 4], [1, 1, 3, 3, 6, 7], [1, 1, 3, 3, 6, 6], [1, 1, 3, 3, 5, 7], [1, 1, 3, 3, 5, 6], [1, 1, 3, 3, 5], [1, 1, 3, 3, 7], [1, 1, 3, 3, 6], [1, 1, 3, 3], [1, 1, 2, 4, 5, 6, 7], [1, 1, 2, 4, 5, 6, 6], [1, 1, 2, 4, 5, 5, 7], [1, 1, 2, 4, 5, 5, 6], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 4, 6, 7], [1, 1, 2, 4, 4, 6, 6], [1, 1, 2, 4, 4, 5, 7], [1, 1, 2, 4, 4, 5, 6], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4, 7], [1, 1, 2, 4, 4, 6], [1, 1, 2, 4, 4], [1, 1, 2, 3, 5, 6, 7], [1, 1, 2, 3, 5, 6, 6], [1, 1, 2, 3, 5, 5, 7], [1, 1, 2, 3, 5, 5, 6], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 4, 6, 7], [1, 1, 2, 3, 4, 6, 6], [1, 1, 2, 3, 4, 5, 7], [1, 1, 2, 3, 4, 5, 6], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4, 7], [1, 1, 2, 3, 4, 6], [1, 1, 2, 3, 4], [1, 1, 2, 3, 6, 7], [1, 1, 2, 3, 6, 6], [1, 1, 2, 3, 5, 7], [1, 1, 2, 3, 5, 6], [1, 1, 2, 3, 5], [1, 1, 2, 3, 7], [1, 1, 2, 3, 6], [1, 1, 2, 3], [1, 1, 2, 5, 6, 7], [1, 1, 2, 5, 6, 6], [1, 1, 2, 5, 5, 7], [1, 1, 2, 5, 5, 6], [1, 1, 2, 5, 5], [1, 1, 2, 4, 6, 7], [1, 1, 2, 4, 6, 6], [1, 1, 2, 4, 5, 7], [1, 1, 2, 4, 5, 6], [1, 1, 2, 4, 5], [1, 1, 2, 4, 7], [1, 1, 2, 4, 6], [1, 1, 2, 4], [1, 1, 2, 6, 7], [1, 1, 2, 6, 6], [1, 1, 2, 5, 7], [1, 1, 2, 5, 6], [1, 1, 2, 5], [1, 1, 2, 7], [1, 1, 2, 6], [1, 1, 2], [1, 1, 4, 5, 6, 7], [1, 1, 4, 5, 6, 6], [1, 1, 4, 5, 5, 7], [1, 1, 4, 5, 5, 6], [1, 1, 4, 5, 5], [1, 1, 4, 4, 6, 7], [1, 1, 4, 4, 6, 6], [1, 1, 4, 4, 5, 7], [1, 1, 4, 4, 5, 6], [1, 1, 4, 4, 5], [1, 1, 4, 4, 7], [1, 1, 4, 4, 6], [1, 1, 4, 4], [1, 1, 3, 5, 6, 7], [1, 1, 3, 5, 6, 6], [1, 1, 3, 5, 5, 7], [1, 1, 3, 5, 5, 6], [1, 1, 3, 5, 5], [1, 1, 3, 4, 6, 7], [1, 1, 3, 4, 6, 6], [1, 1, 3, 4, 5, 7], [1, 1, 3, 4, 5, 6], [1, 1, 3, 4, 5], [1, 1, 3, 4, 7], [1, 1, 3, 4, 6], [1, 1, 3, 4], [1, 1, 3, 6, 7], [1, 1, 3, 6, 6], [1, 1, 3, 5, 7], [1, 1, 3, 5, 6], [1, 1, 3, 5], [1, 1, 3, 7], [1, 1, 3, 6], [1, 1, 3], [1, 1, 5, 6, 7], [1, 1, 5, 6, 6], [1, 1, 5, 5, 7], [1, 1, 5, 5, 6], [1, 1, 5, 5], [1, 1, 4, 6, 7], [1, 1, 4, 6, 6], [1, 1, 4, 5, 7], [1, 1, 4, 5, 6], [1, 1, 4, 5], [1, 1, 4, 7], [1, 1, 4, 6], [1, 1, 4], [1, 1, 6, 7], [1, 1, 6, 6], [1, 1, 5, 7], [1, 1, 5, 6], [1, 1, 5], [1, 1, 7], [1, 1, 6], [1, 1], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6, 6], [0, 2, 3, 4, 5, 5, 7], [0, 2, 3, 4, 5, 5, 6], [0, 2, 3, 4, 5, 5], [0, 2, 3, 4, 4, 6, 7], [0, 2, 3, 4, 4, 6, 6], [0, 2, 3, 4, 4, 5, 7], [0, 2, 3, 4, 4, 5, 6], [0, 2, 3, 4, 4, 5], [0, 2, 3, 4, 4, 7], [0, 2, 3, 4, 4, 6], [0, 2, 3, 4, 4], [0, 2, 3, 3, 5, 6, 7], [0, 2, 3, 3, 5, 6, 6], [0, 2, 3, 3, 5, 5, 7], [0, 2, 3, 3, 5, 5, 6], [0, 2, 3, 3, 5, 5], [0, 2, 3, 3, 4, 6, 7], [0, 2, 3, 3, 4, 6, 6], [0, 2, 3, 3, 4, 5, 7], [0, 2, 3, 3, 4, 5, 6], [0, 2, 3, 3, 4, 5], [0, 2, 3, 3, 4, 7], [0, 2, 3, 3, 4, 6], [0, 2, 3, 3, 4], [0, 2, 3, 3, 6, 7], [0, 2, 3, 3, 6, 6], [0, 2, 3, 3, 5, 7], [0, 2, 3, 3, 5, 6], [0, 2, 3, 3, 5], [0, 2, 3, 3, 7], [0, 2, 3, 3, 6], [0, 2, 3, 3], [0, 2, 2, 4, 5, 6, 7], [0, 2, 2, 4, 5, 6, 6], [0, 2, 2, 4, 5, 5, 7], [0, 2, 2, 4, 5, 5, 6], [0, 2, 2, 4, 5, 5], [0, 2, 2, 4, 4, 6, 7], [0, 2, 2, 4, 4, 6, 6], [0, 2, 2, 4, 4, 5, 7], [0, 2, 2, 4, 4, 5, 6], [0, 2, 2, 4, 4, 5], [0, 2, 2, 4, 4, 7], [0, 2, 2, 4, 4, 6], [0, 2, 2, 4, 4], [0, 2, 2, 3, 5, 6, 7], [0, 2, 2, 3, 5, 6, 6], [0, 2, 2, 3, 5, 5, 7], [0, 2, 2, 3, 5, 5, 6], [0, 2, 2, 3, 5, 5], [0, 2, 2, 3, 4, 6, 7], [0, 2, 2, 3, 4, 6, 6], [0, 2, 2, 3, 4, 5, 7], [0, 2, 2, 3, 4, 5, 6], [0, 2, 2, 3, 4, 5], [0, 2, 2, 3, 4, 7], [0, 2, 2, 3, 4, 6], [0, 2, 2, 3, 4], [0, 2, 2, 3, 6, 7], [0, 2, 2, 3, 6, 6], [0, 2, 2, 3, 5, 7], [0, 2, 2, 3, 5, 6], [0, 2, 2, 3, 5], [0, 2, 2, 3, 7], [0, 2, 2, 3, 6], [0, 2, 2, 3], [0, 2, 2, 5, 6, 7], [0, 2, 2, 5, 6, 6], [0, 2, 2, 5, 5, 7], [0, 2, 2, 5, 5, 6], [0, 2, 2, 5, 5], [0, 2, 2, 4, 6, 7], [0, 2, 2, 4, 6, 6], [0, 2, 2, 4, 5, 7], [0, 2, 2, 4, 5, 6], [0, 2, 2, 4, 5], [0, 2, 2, 4, 7], [0, 2, 2, 4, 6], [0, 2, 2, 4], [0, 2, 2, 6, 7], [0, 2, 2, 6, 6], [0, 2, 2, 5, 7], [0, 2, 2, 5, 6], [0, 2, 2, 5], [0, 2, 2, 7], [0, 2, 2, 6], [0, 2, 2], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6, 6], [0, 1, 3, 4, 5, 5, 7], [0, 1, 3, 4, 5, 5, 6], [0, 1, 3, 4, 5, 5], [0, 1, 3, 4, 4, 6, 7], [0, 1, 3, 4, 4, 6, 6], [0, 1, 3, 4, 4, 5, 7], [0, 1, 3, 4, 4, 5, 6], [0, 1, 3, 4, 4, 5], [0, 1, 3, 4, 4, 7], [0, 1, 3, 4, 4, 6], [0, 1, 3, 4, 4], [0, 1, 3, 3, 5, 6, 7], [0, 1, 3, 3, 5, 6, 6], [0, 1, 3, 3, 5, 5, 7], [0, 1, 3, 3, 5, 5, 6], [0, 1, 3, 3, 5, 5], [0, 1, 3, 3, 4, 6, 7], [0, 1, 3, 3, 4, 6, 6], [0, 1, 3, 3, 4, 5, 7], [0, 1, 3, 3, 4, 5, 6], [0, 1, 3, 3, 4, 5], [0, 1, 3, 3, 4, 7], [0, 1, 3, 3, 4, 6], [0, 1, 3, 3, 4], [0, 1, 3, 3, 6, 7], [0, 1, 3, 3, 6, 6], [0, 1, 3, 3, 5, 7], [0, 1, 3, 3, 5, 6], [0, 1, 3, 3, 5], [0, 1, 3, 3, 7], [0, 1, 3, 3, 6], [0, 1, 3, 3], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6, 6], [0, 1, 2, 4, 5, 5, 7], [0, 1, 2, 4, 5, 5, 6], [0, 1, 2, 4, 5, 5], [0, 1, 2, 4, 4, 6, 7], [0, 1, 2, 4, 4, 6, 6], [0, 1, 2, 4, 4, 5, 7], [0, 1, 2, 4, 4, 5, 6], [0, 1, 2, 4, 4, 5], [0, 1, 2, 4, 4, 7], [0, 1, 2, 4, 4, 6], [0, 1, 2, 4, 4], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6, 6], [0, 1, 2, 3, 5, 5, 7], [0, 1, 2, 3, 5, 5, 6], [0, 1, 2, 3, 5, 5], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6, 6], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5], [0, 1, 2, 3, 7], [0, 1, 2, 3, 6], [0, 1, 2, 3], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6, 6], [0, 1, 2, 5, 5, 7], [0, 1, 2, 5, 5, 6], [0, 1, 2, 5, 5], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6, 6], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5], [0, 1, 2, 4, 7], [0, 1, 2, 4, 6], [0, 1, 2, 4], [0, 1, 2, 6, 7], [0, 1, 2, 6, 6], [0, 1, 2, 5, 7], [0, 1, 2, 5, 6], [0, 1, 2, 5], [0, 1, 2, 7], [0, 1, 2, 6], [0, 1, 2], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6, 6], [0, 1, 4, 5, 5, 7], [0, 1, 4, 5, 5, 6], [0, 1, 4, 5, 5], [0, 1, 4, 4, 6, 7], [0, 1, 4, 4, 6, 6], [0, 1, 4, 4, 5, 7], [0, 1, 4, 4, 5, 6], [0, 1, 4, 4, 5], [0, 1, 4, 4, 7], [0, 1, 4, 4, 6], [0, 1, 4, 4], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6, 6], [0, 1, 3, 5, 5, 7], [0, 1, 3, 5, 5, 6], [0, 1, 3, 5, 5], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6, 6], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5], [0, 1, 3, 4, 7], [0, 1, 3, 4, 6], [0, 1, 3, 4], [0, 1, 3, 6, 7], [0, 1, 3, 6, 6], [0, 1, 3, 5, 7], [0, 1, 3, 5, 6], [0, 1, 3, 5], [0, 1, 3, 7], [0, 1, 3, 6], [0, 1, 3], [0, 1, 5, 6, 7], [0, 1, 5, 6, 6], [0, 1, 5, 5, 7], [0, 1, 5, 5, 6], [0, 1, 5, 5], [0, 1, 4, 6, 7], [0, 1, 4, 6, 6], [0, 1, 4, 5, 7], [0, 1, 4, 5, 6], [0, 1, 4, 5], [0, 1, 4, 7], [0, 1, 4, 6], [0, 1, 4], [0, 1, 6, 7], [0, 1, 6, 6], [0, 1, 5, 7], [0, 1, 5, 6], [0, 1, 5], [0, 1, 7], [0, 1, 6], [0, 1], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6, 6], [0, 3, 4, 5, 5, 7], [0, 3, 4, 5, 5, 6], [0, 3, 4, 5, 5], [0, 3, 4, 4, 6, 7], [0, 3, 4, 4, 6, 6], [0, 3, 4, 4, 5, 7], [0, 3, 4, 4, 5, 6], [0, 3, 4, 4, 5], [0, 3, 4, 4, 7], [0, 3, 4, 4, 6], [0, 3, 4, 4], [0, 3, 3, 5, 6, 7], [0, 3, 3, 5, 6, 6], [0, 3, 3, 5, 5, 7], [0, 3, 3, 5, 5, 6], [0, 3, 3, 5, 5], [0, 3, 3, 4, 6, 7], [0, 3, 3, 4, 6, 6], [0, 3, 3, 4, 5, 7], [0, 3, 3, 4, 5, 6], [0, 3, 3, 4, 5], [0, 3, 3, 4, 7], [0, 3, 3, 4, 6], [0, 3, 3, 4], [0, 3, 3, 6, 7], [0, 3, 3, 6, 6], [0, 3, 3, 5, 7], [0, 3, 3, 5, 6], [0, 3, 3, 5], [0, 3, 3, 7], [0, 3, 3, 6], [0, 3, 3], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6, 6], [0, 2, 4, 5, 5, 7], [0, 2, 4, 5, 5, 6], [0, 2, 4, 5, 5], [0, 2, 4, 4, 6, 7], [0, 2, 4, 4, 6, 6], [0, 2, 4, 4, 5, 7], [0, 2, 4, 4, 5, 6], [0, 2, 4, 4, 5], [0, 2, 4, 4, 7], [0, 2, 4, 4, 6], [0, 2, 4, 4], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6, 6], [0, 2, 3, 5, 5, 7], [0, 2, 3, 5, 5, 6], [0, 2, 3, 5, 5], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6, 6], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5], [0, 2, 3, 4, 7], [0, 2, 3, 4, 6], [0, 2, 3, 4], [0, 2, 3, 6, 7], [0, 2, 3, 6, 6], [0, 2, 3, 5, 7], [0, 2, 3, 5, 6], [0, 2, 3, 5], [0, 2, 3, 7], [0, 2, 3, 6], [0, 2, 3], [0, 2, 5, 6, 7], [0, 2, 5, 6, 6], [0, 2, 5, 5, 7], [0, 2, 5, 5, 6], [0, 2, 5, 5], [0, 2, 4, 6, 7], [0, 2, 4, 6, 6], [0, 2, 4, 5, 7], [0, 2, 4, 5, 6], [0, 2, 4, 5], [0, 2, 4, 7], [0, 2, 4, 6], [0, 2, 4], [0, 2, 6, 7], [0, 2, 6, 6], [0, 2, 5, 7], [0, 2, 5, 6], [0, 2, 5], [0, 2, 7], [0, 2, 6], [0, 2], [0, 4, 5, 6, 7], [0, 4, 5, 6, 6], [0, 4, 5, 5, 7], [0, 4, 5, 5, 6], [0, 4, 5, 5], [0, 4, 4, 6, 7], [0, 4, 4, 6, 6], [0, 4, 4, 5, 7], [0, 4, 4, 5, 6], [0, 4, 4, 5], [0, 4, 4, 7], [0, 4, 4, 6], [0, 4, 4], [0, 3, 5, 6, 7], [0, 3, 5, 6, 6], [0, 3, 5, 5, 7], [0, 3, 5, 5, 6], [0, 3, 5, 5], [0, 3, 4, 6, 7], [0, 3, 4, 6, 6], [0, 3, 4, 5, 7], [0, 3, 4, 5, 6], [0, 3, 4, 5], [0, 3, 4, 7], [0, 3, 4, 6], [0, 3, 4], [0, 3, 6, 7], [0, 3, 6, 6], [0, 3, 5, 7], [0, 3, 5, 6], [0, 3, 5], [0, 3, 7], [0, 3, 6], [0, 3], [0, 5, 6, 7], [0, 5, 6, 6], [0, 5, 5, 7], [0, 5, 5, 6], [0, 5, 5], [0, 4, 6, 7], [0, 4, 6, 6], [0, 4, 5, 7], [0, 4, 5, 6], [0, 4, 5], [0, 4, 7], [0, 4, 6], [0, 4], [0, 6, 7], [0, 6, 6], [0, 5, 7], [0, 5, 6], [0, 5], [0, 7], [0, 6], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 6], [2, 3, 4, 5, 5, 7], [2, 3, 4, 5, 5, 6], [2, 3, 4, 5, 5], [2, 3, 4, 4, 6, 7], [2, 3, 4, 4, 6, 6], [2, 3, 4, 4, 5, 7], [2, 3, 4, 4, 5, 6], [2, 3, 4, 4, 5], [2, 3, 4, 4, 7], [2, 3, 4, 4, 6], [2, 3, 4, 4], [2, 3, 3, 5, 6, 7], [2, 3, 3, 5, 6, 6], [2, 3, 3, 5, 5, 7], [2, 3, 3, 5, 5, 6], [2, 3, 3, 5, 5], [2, 3, 3, 4, 6, 7], [2, 3, 3, 4, 6, 6], [2, 3, 3, 4, 5, 7], [2, 3, 3, 4, 5, 6], [2, 3, 3, 4, 5], [2, 3, 3, 4, 7], [2, 3, 3, 4, 6], [2, 3, 3, 4], [2, 3, 3, 6, 7], [2, 3, 3, 6, 6], [2, 3, 3, 5, 7], [2, 3, 3, 5, 6], [2, 3, 3, 5], [2, 3, 3, 7], [2, 3, 3, 6], [2, 3, 3], [2, 2, 4, 5, 6, 7], [2, 2, 4, 5, 6, 6], [2, 2, 4, 5, 5, 7], [2, 2, 4, 5, 5, 6], [2, 2, 4, 5, 5], [2, 2, 4, 4, 6, 7], [2, 2, 4, 4, 6, 6], [2, 2, 4, 4, 5, 7], [2, 2, 4, 4, 5, 6], [2, 2, 4, 4, 5], [2, 2, 4, 4, 7], [2, 2, 4, 4, 6], [2, 2, 4, 4], [2, 2, 3, 5, 6, 7], [2, 2, 3, 5, 6, 6], [2, 2, 3, 5, 5, 7], [2, 2, 3, 5, 5, 6], [2, 2, 3, 5, 5], [2, 2, 3, 4, 6, 7], [2, 2, 3, 4, 6, 6], [2, 2, 3, 4, 5, 7], [2, 2, 3, 4, 5, 6], [2, 2, 3, 4, 5], [2, 2, 3, 4, 7], [2, 2, 3, 4, 6], [2, 2, 3, 4], [2, 2, 3, 6, 7], [2, 2, 3, 6, 6], [2, 2, 3, 5, 7], [2, 2, 3, 5, 6], [2, 2, 3, 5], [2, 2, 3, 7], [2, 2, 3, 6], [2, 2, 3], [2, 2, 5, 6, 7], [2, 2, 5, 6, 6], [2, 2, 5, 5, 7], [2, 2, 5, 5, 6], [2, 2, 5, 5], [2, 2, 4, 6, 7], [2, 2, 4, 6, 6], [2, 2, 4, 5, 7], [2, 2, 4, 5, 6], [2, 2, 4, 5], [2, 2, 4, 7], [2, 2, 4, 6], [2, 2, 4], [2, 2, 6, 7], [2, 2, 6, 6], [2, 2, 5, 7], [2, 2, 5, 6], [2, 2, 5], [2, 2, 7], [2, 2, 6], [2, 2], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 6], [1, 3, 4, 5, 5, 7], [1, 3, 4, 5, 5, 6], [1, 3, 4, 5, 5], [1, 3, 4, 4, 6, 7], [1, 3, 4, 4, 6, 6], [1, 3, 4, 4, 5, 7], [1, 3, 4, 4, 5, 6], [1, 3, 4, 4, 5], [1, 3, 4, 4, 7], [1, 3, 4, 4, 6], [1, 3, 4, 4], [1, 3, 3, 5, 6, 7], [1, 3, 3, 5, 6, 6], [1, 3, 3, 5, 5, 7], [1, 3, 3, 5, 5, 6], [1, 3, 3, 5, 5], [1, 3, 3, 4, 6, 7], [1, 3, 3, 4, 6, 6], [1, 3, 3, 4, 5, 7], [1, 3, 3, 4, 5, 6], [1, 3, 3, 4, 5], [1, 3, 3, 4, 7], [1, 3, 3, 4, 6], [1, 3, 3, 4], [1, 3, 3, 6, 7], [1, 3, 3, 6, 6], [1, 3, 3, 5, 7], [1, 3, 3, 5, 6], [1, 3, 3, 5], [1, 3, 3, 7], [1, 3, 3, 6], [1, 3, 3], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 6], [1, 2, 4, 5, 5, 7], [1, 2, 4, 5, 5, 6], [1, 2, 4, 5, 5], [1, 2, 4, 4, 6, 7], [1, 2, 4, 4, 6, 6], [1, 2, 4, 4, 5, 7], [1, 2, 4, 4, 5, 6], [1, 2, 4, 4, 5], [1, 2, 4, 4, 7], [1, 2, 4, 4, 6], [1, 2, 4, 4], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 6], [1, 2, 3, 5, 5, 7], [1, 2, 3, 5, 5, 6], [1, 2, 3, 5, 5], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5], [1, 2, 3, 4, 7], [1, 2, 3, 4, 6], [1, 2, 3, 4], [1, 2, 3, 6, 7], [1, 2, 3, 6, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5], [1, 2, 3, 7], [1, 2, 3, 6], [1, 2, 3], [1, 2, 5, 6, 7], [1, 2, 5, 6, 6], [1, 2, 5, 5, 7], [1, 2, 5, 5, 6], [1, 2, 5, 5], [1, 2, 4, 6, 7], [1, 2, 4, 6, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5], [1, 2, 4, 7], [1, 2, 4, 6], [1, 2, 4], [1, 2, 6, 7], [1, 2, 6, 6], [1, 2, 5, 7], [1, 2, 5, 6], [1, 2, 5], [1, 2, 7], [1, 2, 6], [1, 2], [1, 4, 5, 6, 7], [1, 4, 5, 6, 6], [1, 4, 5, 5, 7], [1, 4, 5, 5, 6], [1, 4, 5, 5], [1, 4, 4, 6, 7], [1, 4, 4, 6, 6], [1, 4, 4, 5, 7], [1, 4, 4, 5, 6], [1, 4, 4, 5], [1, 4, 4, 7], [1, 4, 4, 6], [1, 4, 4], [1, 3, 5, 6, 7], [1, 3, 5, 6, 6], [1, 3, 5, 5, 7], [1, 3, 5, 5, 6], [1, 3, 5, 5], [1, 3, 4, 6, 7], [1, 3, 4, 6, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5], [1, 3, 4, 7], [1, 3, 4, 6], [1, 3, 4], [1, 3, 6, 7], [1, 3, 6, 6], [1, 3, 5, 7], [1, 3, 5, 6], [1, 3, 5], [1, 3, 7], [1, 3, 6], [1, 3], [1, 5, 6, 7], [1, 5, 6, 6], [1, 5, 5, 7], [1, 5, 5, 6], [1, 5, 5], [1, 4, 6, 7], [1, 4, 6, 6], [1, 4, 5, 7], [1, 4, 5, 6], [1, 4, 5], [1, 4, 7], [1, 4, 6], [1, 4], [1, 6, 7], [1, 6, 6], [1, 5, 7], [1, 5, 6], [1, 5], [1, 7], [1, 6], [3, 4, 5, 6, 7], [3, 4, 5, 6, 6], [3, 4, 5, 5, 7], [3, 4, 5, 5, 6], [3, 4, 5, 5], [3, 4, 4, 6, 7], [3, 4, 4, 6, 6], [3, 4, 4, 5, 7], [3, 4, 4, 5, 6], [3, 4, 4, 5], [3, 4, 4, 7], [3, 4, 4, 6], [3, 4, 4], [3, 3, 5, 6, 7], [3, 3, 5, 6, 6], [3, 3, 5, 5, 7], [3, 3, 5, 5, 6], [3, 3, 5, 5], [3, 3, 4, 6, 7], [3, 3, 4, 6, 6], [3, 3, 4, 5, 7], [3, 3, 4, 5, 6], [3, 3, 4, 5], [3, 3, 4, 7], [3, 3, 4, 6], [3, 3, 4], [3, 3, 6, 7], [3, 3, 6, 6], [3, 3, 5, 7], [3, 3, 5, 6], [3, 3, 5], [3, 3, 7], [3, 3, 6], [3, 3], [2, 4, 5, 6, 7], [2, 4, 5, 6, 6], [2, 4, 5, 5, 7], [2, 4, 5, 5, 6], [2, 4, 5, 5], [2, 4, 4, 6, 7], [2, 4, 4, 6, 6], [2, 4, 4, 5, 7], [2, 4, 4, 5, 6], [2, 4, 4, 5], [2, 4, 4, 7], [2, 4, 4, 6], [2, 4, 4], [2, 3, 5, 6, 7], [2, 3, 5, 6, 6], [2, 3, 5, 5, 7], [2, 3, 5, 5, 6], [2, 3, 5, 5], [2, 3, 4, 6, 7], [2, 3, 4, 6, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5], [2, 3, 4, 7], [2, 3, 4, 6], [2, 3, 4], [2, 3, 6, 7], [2, 3, 6, 6], [2, 3, 5, 7], [2, 3, 5, 6], [2, 3, 5], [2, 3, 7], [2, 3, 6], [2, 3], [2, 5, 6, 7], [2, 5, 6, 6], [2, 5, 5, 7], [2, 5, 5, 6], [2, 5, 5], [2, 4, 6, 7], [2, 4, 6, 6], [2, 4, 5, 7], [2, 4, 5, 6], [2, 4, 5], [2, 4, 7], [2, 4, 6], [2, 4], [2, 6, 7], [2, 6, 6], [2, 5, 7], [2, 5, 6], [2, 5], [2, 7], [2, 6], [4, 5, 6, 7], [4, 5, 6, 6], [4, 5, 5, 7], [4, 5, 5, 6], [4, 5, 5], [4, 4, 6, 7], [4, 4, 6, 6], [4, 4, 5, 7], [4, 4, 5, 6], [4, 4, 5], [4, 4, 7], [4, 4, 6], [4, 4], [3, 5, 6, 7], [3, 5, 6, 6], [3, 5, 5, 7], [3, 5, 5, 6], [3, 5, 5], [3, 4, 6, 7], [3, 4, 6, 6], [3, 4, 5, 7], [3, 4, 5, 6], [3, 4, 5], [3, 4, 7], [3, 4, 6], [3, 4], [3, 6, 7], [3, 6, 6], [3, 5, 7], [3, 5, 6], [3, 5], [3, 7], [3, 6], [5, 6, 7], [5, 6, 6], [5, 5, 7], [5, 5, 6], [5, 5], [4, 6, 7], [4, 6, 6], [4, 5, 7], [4, 5, 6], [4, 5], [4, 7], [4, 6], [6, 7], [6, 6], [5, 7], [5, 6]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[100, -100, 50, -50, 25, -25, 0, 0, 0, 0]), [[-100, 50], [-100, -50, 25], [-100, -50, -25, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0], [-100, -50, -25, 0, 0], [-100, -50, -25, 0], [-100, -50, -25], [-100, -50, 0, 0, 0, 0], [-100, -50, 0, 0, 0], [-100, -50, 0, 0], [-100, -50, 0], [-100, -50], [-100, 25], [-100, -25, 0, 0, 0, 0], [-100, -25, 0, 0, 0], [-100, -25, 0, 0], [-100, -25, 0], [-100, -25], [-100, 0, 0, 0, 0], [-100, 0, 0, 0], [-100, 0, 0], [-100, 0], [-50, 25], [-50, -25, 0, 0, 0, 0], [-50, -25, 0, 0, 0], [-50, -25, 0, 0], [-50, -25, 0], [-50, -25], [-50, 0, 0, 0, 0], [-50, 0, 0, 0], [-50, 0, 0], [-50, 0], [-25, 0, 0, 0, 0], [-25, 0, 0, 0], [-25, 0, 0], [-25, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[-10, 10, -10, 10, -10, 10, -10, 10, -10, 10]), [[-10, 10, 10, 10, 10, 10], [-10, -10, 10, 10, 10, 10], [-10, -10, -10, 10, 10, 10], [-10, -10, -10, -10, 10, 10], [-10, -10, -10, -10, -10, 10], [-10, -10, -10, -10, -10], [10, 10, 10, 10, 10], [-10, 10, 10, 10, 10], [-10, -10, 10, 10, 10], [-10, -10, -10, 10, 10], [-10, -10, -10, -10, 10], [-10, -10, -10, -10], [10, 10, 10, 10], [-10, 10, 10, 10], [-10, -10, 10, 10], [-10, -10, -10, 10], [-10, -10, -10], [10, 10, 10], [-10, 10, 10], [-10, -10, 10], [-10, -10], [10, 10], [-10, 10]])\n assert answers_match(candidate(nums=[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]), [[1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 5, 5, 5, 5], [1, 2, 2, 3, 3, 3, 5, 5, 5], [1, 2, 2, 3, 3, 3, 5, 5], [1, 2, 2, 3, 3, 3, 5], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 5, 5, 5, 5], [1, 2, 2, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5, 5, 5, 5], [1, 2, 2, 3, 3, 5, 5, 5, 5], [1, 2, 2, 3, 3, 5, 5, 5], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 4, 4, 5], [1, 2, 2, 3, 4, 4, 4, 4], [1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 4, 4, 5, 5, 5, 5], [1, 2, 2, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5, 5, 5, 5], [1, 2, 2, 3, 5, 5, 5, 5], [1, 2, 2, 3, 5, 5, 5], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 4, 4, 4, 4, 5, 5, 5], [1, 2, 2, 4, 4, 4, 4, 5, 5], [1, 2, 2, 4, 4, 4, 4, 5], [1, 2, 2, 4, 4, 4, 4], [1, 2, 2, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 4, 4, 4, 5, 5, 5, 5], [1, 2, 2, 4, 4, 4, 5, 5, 5], [1, 2, 2, 4, 4, 4, 5, 5], [1, 2, 2, 4, 4, 4, 5], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4, 5, 5, 5, 5, 5], [1, 2, 2, 4, 4, 5, 5, 5, 5], [1, 2, 2, 4, 4, 5, 5, 5], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5, 5, 5, 5], [1, 2, 2, 4, 5, 5, 5, 5], [1, 2, 2, 4, 5, 5, 5], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5, 5, 5, 5], [1, 2, 2, 5, 5, 5, 5], [1, 2, 2, 5, 5, 5], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 4, 5], [1, 2, 3, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 5], [1, 2, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 5, 5, 5, 5], [1, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 5, 5], [1, 2, 3, 3, 3, 4, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 5, 5, 5, 5, 5], [1, 2, 3, 3, 3, 5, 5, 5, 5], [1, 2, 3, 3, 3, 5, 5, 5], [1, 2, 3, 3, 3, 5, 5], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 4, 4, 5], [1, 2, 3, 3, 4, 4, 4, 4], [1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 4, 4, 5, 5, 5, 5], [1, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5, 5, 5, 5], [1, 2, 3, 3, 5, 5, 5, 5], [1, 2, 3, 3, 5, 5, 5], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 3, 4, 4, 4, 4, 5, 5, 5], [1, 2, 3, 4, 4, 4, 4, 5, 5], [1, 2, 3, 4, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4, 4], [1, 2, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 4, 4, 4, 5, 5, 5, 5], [1, 2, 3, 4, 4, 4, 5, 5, 5], [1, 2, 3, 4, 4, 4, 5, 5], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4, 5, 5, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5, 5, 5, 5], [1, 2, 3, 4, 5, 5, 5, 5], [1, 2, 3, 4, 5, 5, 5], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5, 5, 5, 5], [1, 2, 3, 5, 5, 5, 5], [1, 2, 3, 5, 5, 5], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 4, 4, 4, 4, 5, 5, 5, 5], [1, 2, 4, 4, 4, 4, 5, 5, 5], [1, 2, 4, 4, 4, 4, 5, 5], [1, 2, 4, 4, 4, 4, 5], [1, 2, 4, 4, 4, 4], [1, 2, 4, 4, 4, 5, 5, 5, 5, 5], [1, 2, 4, 4, 4, 5, 5, 5, 5], [1, 2, 4, 4, 4, 5, 5, 5], [1, 2, 4, 4, 4, 5, 5], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 4, 4, 5, 5, 5, 5, 5], [1, 2, 4, 4, 5, 5, 5, 5], [1, 2, 4, 4, 5, 5, 5], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5, 5, 5, 5], [1, 2, 4, 5, 5, 5, 5], [1, 2, 4, 5, 5, 5], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5, 5, 5, 5], [1, 2, 5, 5, 5, 5], [1, 2, 5, 5, 5], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 4, 5, 5], [1, 3, 3, 3, 4, 4, 4, 4, 5], [1, 3, 3, 3, 4, 4, 4, 4], [1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 5, 5], [1, 3, 3, 3, 4, 4, 4, 5], [1, 3, 3, 3, 4, 4, 4], [1, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5], [1, 3, 3, 3, 4, 4, 5, 5, 5, 5], [1, 3, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 3, 4, 4, 5, 5], [1, 3, 3, 3, 4, 4, 5], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4, 5, 5, 5, 5, 5], [1, 3, 3, 3, 4, 5, 5, 5, 5], [1, 3, 3, 3, 4, 5, 5, 5], [1, 3, 3, 3, 4, 5, 5], [1, 3, 3, 3, 4, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 5, 5, 5, 5, 5], [1, 3, 3, 3, 5, 5, 5, 5], [1, 3, 3, 3, 5, 5, 5], [1, 3, 3, 3, 5, 5], [1, 3, 3, 3, 5], [1, 3, 3, 3], [1, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 3, 3, 4, 4, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 4, 4, 5, 5], [1, 3, 3, 4, 4, 4, 4, 5], [1, 3, 3, 4, 4, 4, 4], [1, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 3, 3, 4, 4, 4, 5, 5, 5, 5], [1, 3, 3, 4, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 4, 5, 5], [1, 3, 3, 4, 4, 4, 5], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4, 5, 5, 5, 5, 5], [1, 3, 3, 4, 4, 5, 5, 5, 5], [1, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5, 5, 5, 5], [1, 3, 3, 4, 5, 5, 5, 5], [1, 3, 3, 4, 5, 5, 5], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5, 5, 5, 5], [1, 3, 3, 5, 5, 5, 5], [1, 3, 3, 5, 5, 5], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 3, 4, 4, 4, 4, 5, 5, 5, 5], [1, 3, 4, 4, 4, 4, 5, 5, 5], [1, 3, 4, 4, 4, 4, 5, 5], [1, 3, 4, 4, 4, 4, 5], [1, 3, 4, 4, 4, 4], [1, 3, 4, 4, 4, 5, 5, 5, 5, 5], [1, 3, 4, 4, 4, 5, 5, 5, 5], [1, 3, 4, 4, 4, 5, 5, 5], [1, 3, 4, 4, 4, 5, 5], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4], [1, 3, 4, 4, 5, 5, 5, 5, 5], [1, 3, 4, 4, 5, 5, 5, 5], [1, 3, 4, 4, 5, 5, 5], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5, 5, 5, 5], [1, 3, 4, 5, 5, 5, 5], [1, 3, 4, 5, 5, 5], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5, 5, 5, 5], [1, 3, 5, 5, 5, 5], [1, 3, 5, 5, 5], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 4, 4, 5, 5, 5, 5, 5], [1, 4, 4, 4, 4, 5, 5, 5, 5], [1, 4, 4, 4, 4, 5, 5, 5], [1, 4, 4, 4, 4, 5, 5], [1, 4, 4, 4, 4, 5], [1, 4, 4, 4, 4], [1, 4, 4, 4, 5, 5, 5, 5, 5], [1, 4, 4, 4, 5, 5, 5, 5], [1, 4, 4, 4, 5, 5, 5], [1, 4, 4, 4, 5, 5], [1, 4, 4, 4, 5], [1, 4, 4, 4], [1, 4, 4, 5, 5, 5, 5, 5], [1, 4, 4, 5, 5, 5, 5], [1, 4, 4, 5, 5, 5], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5, 5, 5, 5], [1, 4, 5, 5, 5, 5], [1, 4, 5, 5, 5], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5, 5, 5, 5], [1, 5, 5, 5, 5], [1, 5, 5, 5], [1, 5, 5], [1, 5], [2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 5, 5, 5, 5], [2, 2, 3, 3, 3, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 5, 5], [2, 2, 3, 3, 3, 4, 5], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3, 5, 5, 5, 5, 5], [2, 2, 3, 3, 3, 5, 5, 5, 5], [2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 3, 3, 3, 5, 5], [2, 2, 3, 3, 3, 5], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 4, 4, 5], [2, 2, 3, 3, 4, 4, 4, 4], [2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 4, 4, 5, 5, 5, 5], [2, 2, 3, 3, 4, 4, 5, 5, 5], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5, 5, 5, 5], [2, 2, 3, 3, 4, 5, 5, 5, 5], [2, 2, 3, 3, 4, 5, 5, 5], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5, 5, 5, 5], [2, 2, 3, 3, 5, 5, 5, 5], [2, 2, 3, 3, 5, 5, 5], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 5], [2, 2, 3, 4, 4, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 4, 4, 5, 5], [2, 2, 3, 4, 4, 4, 4, 5], [2, 2, 3, 4, 4, 4, 4], [2, 2, 3, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 4, 4, 4, 5, 5, 5, 5], [2, 2, 3, 4, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 4, 5, 5], [2, 2, 3, 4, 4, 4, 5], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4, 5, 5, 5, 5, 5], [2, 2, 3, 4, 4, 5, 5, 5, 5], [2, 2, 3, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5, 5, 5, 5], [2, 2, 3, 4, 5, 5, 5, 5], [2, 2, 3, 4, 5, 5, 5], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5, 5, 5, 5], [2, 2, 3, 5, 5, 5, 5], [2, 2, 3, 5, 5, 5], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 4, 4, 4, 4, 5, 5, 5, 5], [2, 2, 4, 4, 4, 4, 5, 5, 5], [2, 2, 4, 4, 4, 4, 5, 5], [2, 2, 4, 4, 4, 4, 5], [2, 2, 4, 4, 4, 4], [2, 2, 4, 4, 4, 5, 5, 5, 5, 5], [2, 2, 4, 4, 4, 5, 5, 5, 5], [2, 2, 4, 4, 4, 5, 5, 5], [2, 2, 4, 4, 4, 5, 5], [2, 2, 4, 4, 4, 5], [2, 2, 4, 4, 4], [2, 2, 4, 4, 5, 5, 5, 5, 5], [2, 2, 4, 4, 5, 5, 5, 5], [2, 2, 4, 4, 5, 5, 5], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5, 5, 5, 5], [2, 2, 4, 5, 5, 5, 5], [2, 2, 4, 5, 5, 5], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5, 5, 5, 5], [2, 2, 5, 5, 5, 5], [2, 2, 5, 5, 5], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 4, 5, 5], [2, 3, 3, 3, 4, 4, 4, 4, 5], [2, 3, 3, 3, 4, 4, 4, 4], [2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 5, 5], [2, 3, 3, 3, 4, 4, 4, 5], [2, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4, 5, 5, 5, 5, 5], [2, 3, 3, 3, 4, 4, 5, 5, 5, 5], [2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 3, 3, 3, 4, 4, 5, 5], [2, 3, 3, 3, 4, 4, 5], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4, 5, 5, 5, 5, 5], [2, 3, 3, 3, 4, 5, 5, 5, 5], [2, 3, 3, 3, 4, 5, 5, 5], [2, 3, 3, 3, 4, 5, 5], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 5, 5, 5, 5, 5], [2, 3, 3, 3, 5, 5, 5, 5], [2, 3, 3, 3, 5, 5, 5], [2, 3, 3, 3, 5, 5], [2, 3, 3, 3, 5], [2, 3, 3, 3], [2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [2, 3, 3, 4, 4, 4, 4, 5, 5, 5], [2, 3, 3, 4, 4, 4, 4, 5, 5], [2, 3, 3, 4, 4, 4, 4, 5], [2, 3, 3, 4, 4, 4, 4], [2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [2, 3, 3, 4, 4, 4, 5, 5, 5, 5], [2, 3, 3, 4, 4, 4, 5, 5, 5], [2, 3, 3, 4, 4, 4, 5, 5], [2, 3, 3, 4, 4, 4, 5], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4, 5, 5, 5, 5, 5], [2, 3, 3, 4, 4, 5, 5, 5, 5], [2, 3, 3, 4, 4, 5, 5, 5], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5, 5, 5, 5], [2, 3, 3, 4, 5, 5, 5, 5], [2, 3, 3, 4, 5, 5, 5], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5, 5, 5, 5], [2, 3, 3, 5, 5, 5, 5], [2, 3, 3, 5, 5, 5], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 3, 4, 4, 4, 4, 5, 5, 5, 5], [2, 3, 4, 4, 4, 4, 5, 5, 5], [2, 3, 4, 4, 4, 4, 5, 5], [2, 3, 4, 4, 4, 4, 5], [2, 3, 4, 4, 4, 4], [2, 3, 4, 4, 4, 5, 5, 5, 5, 5], [2, 3, 4, 4, 4, 5, 5, 5, 5], [2, 3, 4, 4, 4, 5, 5, 5], [2, 3, 4, 4, 4, 5, 5], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4], [2, 3, 4, 4, 5, 5, 5, 5, 5], [2, 3, 4, 4, 5, 5, 5, 5], [2, 3, 4, 4, 5, 5, 5], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5, 5, 5, 5], [2, 3, 4, 5, 5, 5, 5], [2, 3, 4, 5, 5, 5], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5, 5, 5, 5], [2, 3, 5, 5, 5, 5], [2, 3, 5, 5, 5], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 4, 4, 5, 5, 5, 5, 5], [2, 4, 4, 4, 4, 5, 5, 5, 5], [2, 4, 4, 4, 4, 5, 5, 5], [2, 4, 4, 4, 4, 5, 5], [2, 4, 4, 4, 4, 5], [2, 4, 4, 4, 4], [2, 4, 4, 4, 5, 5, 5, 5, 5], [2, 4, 4, 4, 5, 5, 5, 5], [2, 4, 4, 4, 5, 5, 5], [2, 4, 4, 4, 5, 5], [2, 4, 4, 4, 5], [2, 4, 4, 4], [2, 4, 4, 5, 5, 5, 5, 5], [2, 4, 4, 5, 5, 5, 5], [2, 4, 4, 5, 5, 5], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5, 5, 5, 5], [2, 4, 5, 5, 5, 5], [2, 4, 5, 5, 5], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5, 5, 5, 5], [2, 5, 5, 5, 5], [2, 5, 5, 5], [2, 5, 5], [2, 5], [3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [3, 3, 3, 4, 4, 4, 4, 5, 5, 5], [3, 3, 3, 4, 4, 4, 4, 5, 5], [3, 3, 3, 4, 4, 4, 4, 5], [3, 3, 3, 4, 4, 4, 4], [3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [3, 3, 3, 4, 4, 4, 5, 5, 5, 5], [3, 3, 3, 4, 4, 4, 5, 5, 5], [3, 3, 3, 4, 4, 4, 5, 5], [3, 3, 3, 4, 4, 4, 5], [3, 3, 3, 4, 4, 4], [3, 3, 3, 4, 4, 5, 5, 5, 5, 5], [3, 3, 3, 4, 4, 5, 5, 5, 5], [3, 3, 3, 4, 4, 5, 5, 5], [3, 3, 3, 4, 4, 5, 5], [3, 3, 3, 4, 4, 5], [3, 3, 3, 4, 4], [3, 3, 3, 4, 5, 5, 5, 5, 5], [3, 3, 3, 4, 5, 5, 5, 5], [3, 3, 3, 4, 5, 5, 5], [3, 3, 3, 4, 5, 5], [3, 3, 3, 4, 5], [3, 3, 3, 4], [3, 3, 3, 5, 5, 5, 5, 5], [3, 3, 3, 5, 5, 5, 5], [3, 3, 3, 5, 5, 5], [3, 3, 3, 5, 5], [3, 3, 3, 5], [3, 3, 3], [3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [3, 3, 4, 4, 4, 4, 5, 5, 5, 5], [3, 3, 4, 4, 4, 4, 5, 5, 5], [3, 3, 4, 4, 4, 4, 5, 5], [3, 3, 4, 4, 4, 4, 5], [3, 3, 4, 4, 4, 4], [3, 3, 4, 4, 4, 5, 5, 5, 5, 5], [3, 3, 4, 4, 4, 5, 5, 5, 5], [3, 3, 4, 4, 4, 5, 5, 5], [3, 3, 4, 4, 4, 5, 5], [3, 3, 4, 4, 4, 5], [3, 3, 4, 4, 4], [3, 3, 4, 4, 5, 5, 5, 5, 5], [3, 3, 4, 4, 5, 5, 5, 5], [3, 3, 4, 4, 5, 5, 5], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5, 5, 5, 5], [3, 3, 4, 5, 5, 5, 5], [3, 3, 4, 5, 5, 5], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5, 5, 5, 5], [3, 3, 5, 5, 5, 5], [3, 3, 5, 5, 5], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 4, 4, 5, 5, 5, 5, 5], [3, 4, 4, 4, 4, 5, 5, 5, 5], [3, 4, 4, 4, 4, 5, 5, 5], [3, 4, 4, 4, 4, 5, 5], [3, 4, 4, 4, 4, 5], [3, 4, 4, 4, 4], [3, 4, 4, 4, 5, 5, 5, 5, 5], [3, 4, 4, 4, 5, 5, 5, 5], [3, 4, 4, 4, 5, 5, 5], [3, 4, 4, 4, 5, 5], [3, 4, 4, 4, 5], [3, 4, 4, 4], [3, 4, 4, 5, 5, 5, 5, 5], [3, 4, 4, 5, 5, 5, 5], [3, 4, 4, 5, 5, 5], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5, 5, 5, 5], [3, 4, 5, 5, 5, 5], [3, 4, 5, 5, 5], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5, 5, 5, 5], [3, 5, 5, 5, 5], [3, 5, 5, 5], [3, 5, 5], [3, 5], [4, 4, 4, 4, 5, 5, 5, 5, 5], [4, 4, 4, 4, 5, 5, 5, 5], [4, 4, 4, 4, 5, 5, 5], [4, 4, 4, 4, 5, 5], [4, 4, 4, 4, 5], [4, 4, 4, 4], [4, 4, 4, 5, 5, 5, 5, 5], [4, 4, 4, 5, 5, 5, 5], [4, 4, 4, 5, 5, 5], [4, 4, 4, 5, 5], [4, 4, 4, 5], [4, 4, 4], [4, 4, 5, 5, 5, 5, 5], [4, 4, 5, 5, 5, 5], [4, 4, 5, 5, 5], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5, 5, 5, 5], [4, 5, 5, 5, 5], [4, 5, 5, 5], [4, 5, 5], [4, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [8, 9, 10], [8, 9], [8, 10], [9, 10]])\n assert answers_match(candidate(nums=[9, 8, 7, 7, 7, 6, 5, 4, 4, 3, 2, 1]), [[7, 7, 7], [7, 7], [4, 4]])\n assert answers_match(candidate(nums=[5, 3, 5, 7, 5, 3, 7, 3, 5, 3, 5, 3, 5, 3, 5]), [[5, 5, 7, 7], [5, 5, 5, 7], [5, 5, 5, 5, 5, 5, 5], [3, 5, 7, 7], [3, 5, 5, 7], [3, 5, 5, 5, 5, 5, 5], [3, 7, 7], [3, 5, 7], [3, 5, 5, 5, 5, 5], [3, 3, 7], [3, 3, 3, 5, 5, 5, 5], [3, 3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3, 3], [5, 7, 7], [5, 5, 7], [5, 5, 5, 5, 5, 5], [7, 7], [5, 7], [5, 5, 5, 5, 5], [3, 7], [3, 3, 5, 5, 5, 5], [3, 3, 3, 5, 5, 5], [3, 3, 3, 3, 5, 5], [3, 3, 3, 3, 3, 5], [3, 3, 3, 3, 3], [3, 5, 5, 5, 5], [3, 3, 5, 5, 5], [3, 3, 3, 5, 5], [3, 3, 3, 3, 5], [3, 3, 3, 3], [5, 5, 5, 5], [3, 5, 5, 5], [3, 3, 5, 5], [3, 3, 3, 5], [3, 3, 3], [5, 5, 5], [3, 5, 5], [3, 3, 5], [3, 3], [5, 5], [3, 5]])\n assert answers_match(candidate(nums=[1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6]), [[1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 6], [1, 3, 4, 5, 5, 7], [1, 3, 4, 5, 5, 6], [1, 3, 4, 5, 5], [1, 3, 4, 4, 6, 7], [1, 3, 4, 4, 6, 6], [1, 3, 4, 4, 5, 7], [1, 3, 4, 4, 5, 6], [1, 3, 4, 4, 5], [1, 3, 4, 4, 7], [1, 3, 4, 4, 6], [1, 3, 4, 4], [1, 3, 3, 5, 6, 7], [1, 3, 3, 5, 6, 6], [1, 3, 3, 5, 5, 7], [1, 3, 3, 5, 5, 6], [1, 3, 3, 5, 5], [1, 3, 3, 4, 6, 7], [1, 3, 3, 4, 6, 6], [1, 3, 3, 4, 5, 7], [1, 3, 3, 4, 5, 6], [1, 3, 3, 4, 5], [1, 3, 3, 4, 7], [1, 3, 3, 4, 6], [1, 3, 3, 4], [1, 3, 3, 6, 7], [1, 3, 3, 6, 6], [1, 3, 3, 5, 7], [1, 3, 3, 5, 6], [1, 3, 3, 5], [1, 3, 3, 7], [1, 3, 3, 6], [1, 3, 3], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 6], [1, 2, 4, 5, 5, 7], [1, 2, 4, 5, 5, 6], [1, 2, 4, 5, 5], [1, 2, 4, 4, 6, 7], [1, 2, 4, 4, 6, 6], [1, 2, 4, 4, 5, 7], [1, 2, 4, 4, 5, 6], [1, 2, 4, 4, 5], [1, 2, 4, 4, 7], [1, 2, 4, 4, 6], [1, 2, 4, 4], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 6], [1, 2, 3, 5, 5, 7], [1, 2, 3, 5, 5, 6], [1, 2, 3, 5, 5], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5], [1, 2, 3, 4, 7], [1, 2, 3, 4, 6], [1, 2, 3, 4], [1, 2, 3, 6, 7], [1, 2, 3, 6, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5], [1, 2, 3, 7], [1, 2, 3, 6], [1, 2, 3], [1, 2, 5, 6, 7], [1, 2, 5, 6, 6], [1, 2, 5, 5, 7], [1, 2, 5, 5, 6], [1, 2, 5, 5], [1, 2, 4, 6, 7], [1, 2, 4, 6, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5], [1, 2, 4, 7], [1, 2, 4, 6], [1, 2, 4], [1, 2, 6, 7], [1, 2, 6, 6], [1, 2, 5, 7], [1, 2, 5, 6], [1, 2, 5], [1, 2, 7], [1, 2, 6], [1, 2], [1, 4, 5, 6, 7], [1, 4, 5, 6, 6], [1, 4, 5, 5, 7], [1, 4, 5, 5, 6], [1, 4, 5, 5], [1, 4, 4, 6, 7], [1, 4, 4, 6, 6], [1, 4, 4, 5, 7], [1, 4, 4, 5, 6], [1, 4, 4, 5], [1, 4, 4, 7], [1, 4, 4, 6], [1, 4, 4], [1, 3, 5, 6, 7], [1, 3, 5, 6, 6], [1, 3, 5, 5, 7], [1, 3, 5, 5, 6], [1, 3, 5, 5], [1, 3, 4, 6, 7], [1, 3, 4, 6, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5], [1, 3, 4, 7], [1, 3, 4, 6], [1, 3, 4], [1, 3, 6, 7], [1, 3, 6, 6], [1, 3, 5, 7], [1, 3, 5, 6], [1, 3, 5], [1, 3, 7], [1, 3, 6], [1, 3], [1, 5, 6, 7], [1, 5, 6, 6], [1, 5, 5, 7], [1, 5, 5, 6], [1, 5, 5], [1, 4, 6, 7], [1, 4, 6, 6], [1, 4, 5, 7], [1, 4, 5, 6], [1, 4, 5], [1, 4, 7], [1, 4, 6], [1, 4], [1, 6, 7], [1, 6, 6], [1, 5, 7], [1, 5, 6], [1, 5], [1, 7], [1, 6], [3, 4, 5, 6, 7], [3, 4, 5, 6, 6], [3, 4, 5, 5, 7], [3, 4, 5, 5, 6], [3, 4, 5, 5], [3, 4, 4, 6, 7], [3, 4, 4, 6, 6], [3, 4, 4, 5, 7], [3, 4, 4, 5, 6], [3, 4, 4, 5], [3, 4, 4, 7], [3, 4, 4, 6], [3, 4, 4], [3, 3, 5, 6, 7], [3, 3, 5, 6, 6], [3, 3, 5, 5, 7], [3, 3, 5, 5, 6], [3, 3, 5, 5], [3, 3, 4, 6, 7], [3, 3, 4, 6, 6], [3, 3, 4, 5, 7], [3, 3, 4, 5, 6], [3, 3, 4, 5], [3, 3, 4, 7], [3, 3, 4, 6], [3, 3, 4], [3, 3, 6, 7], [3, 3, 6, 6], [3, 3, 5, 7], [3, 3, 5, 6], [3, 3, 5], [3, 3, 7], [3, 3, 6], [3, 3], [2, 4, 5, 6, 7], [2, 4, 5, 6, 6], [2, 4, 5, 5, 7], [2, 4, 5, 5, 6], [2, 4, 5, 5], [2, 4, 4, 6, 7], [2, 4, 4, 6, 6], [2, 4, 4, 5, 7], [2, 4, 4, 5, 6], [2, 4, 4, 5], [2, 4, 4, 7], [2, 4, 4, 6], [2, 4, 4], [2, 3, 5, 6, 7], [2, 3, 5, 6, 6], [2, 3, 5, 5, 7], [2, 3, 5, 5, 6], [2, 3, 5, 5], [2, 3, 4, 6, 7], [2, 3, 4, 6, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5], [2, 3, 4, 7], [2, 3, 4, 6], [2, 3, 4], [2, 3, 6, 7], [2, 3, 6, 6], [2, 3, 5, 7], [2, 3, 5, 6], [2, 3, 5], [2, 3, 7], [2, 3, 6], [2, 3], [2, 5, 6, 7], [2, 5, 6, 6], [2, 5, 5, 7], [2, 5, 5, 6], [2, 5, 5], [2, 4, 6, 7], [2, 4, 6, 6], [2, 4, 5, 7], [2, 4, 5, 6], [2, 4, 5], [2, 4, 7], [2, 4, 6], [2, 4], [2, 6, 7], [2, 6, 6], [2, 5, 7], [2, 5, 6], [2, 5], [2, 7], [2, 6], [4, 5, 6, 7], [4, 5, 6, 6], [4, 5, 5, 7], [4, 5, 5, 6], [4, 5, 5], [4, 4, 6, 7], [4, 4, 6, 6], [4, 4, 5, 7], [4, 4, 5, 6], [4, 4, 5], [4, 4, 7], [4, 4, 6], [4, 4], [3, 5, 6, 7], [3, 5, 6, 6], [3, 5, 5, 7], [3, 5, 5, 6], [3, 5, 5], [3, 4, 6, 7], [3, 4, 6, 6], [3, 4, 5, 7], [3, 4, 5, 6], [3, 4, 5], [3, 4, 7], [3, 4, 6], [3, 4], [3, 6, 7], [3, 6, 6], [3, 5, 7], [3, 5, 6], [3, 5], [3, 7], [3, 6], [5, 6, 7], [5, 6, 6], [5, 5, 7], [5, 5, 6], [5, 5], [4, 6, 7], [4, 6, 6], [4, 5, 7], [4, 5, 6], [4, 5], [4, 7], [4, 6], [6, 7], [6, 6], [5, 7], [5, 6]])\n assert answers_match(candidate(nums=[9, 7, 5, 3, 1, 9, 7, 5, 3, 1, 9, 7, 5, 3, 1]), [[9, 9, 9], [7, 9, 9], [7, 7, 9], [7, 7, 7], [5, 9, 9], [5, 7, 9], [5, 7, 7], [5, 5, 9], [5, 5, 7], [5, 5, 5], [3, 9, 9], [3, 7, 9], [3, 7, 7], [3, 5, 9], [3, 5, 7], [3, 5, 5], [3, 3, 9], [3, 3, 7], [3, 3, 5], [3, 3, 3], [1, 9, 9], [1, 7, 9], [1, 7, 7], [1, 5, 9], [1, 5, 7], [1, 5, 5], [1, 3, 9], [1, 3, 7], [1, 3, 5], [1, 3, 3], [1, 1, 9], [1, 1, 7], [1, 1, 5], [1, 1, 3], [1, 1, 1], [9, 9], [7, 9], [7, 7], [5, 9], [5, 7], [5, 5], [3, 9], [3, 7], [3, 5], [3, 3], [1, 9], [1, 7], [1, 5], [1, 3], [1, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]), [[1, 2, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 3], [1, 2, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3, 3], [1, 4, 4], [1, 3, 3, 4], [1, 3, 3, 3], [1, 2, 2, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 4], [1, 2, 2, 3], [1, 2, 2, 2], [1, 1, 2, 3, 4], [1, 1, 2, 3, 3], [1, 1, 2, 4], [1, 1, 2, 3], [1, 1, 2, 2], [1, 1, 3, 4], [1, 1, 3, 3], [1, 1, 4], [1, 1, 3], [1, 1, 2], [1, 1, 1], [2, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3, 3], [2, 4, 4], [2, 3, 3, 4], [2, 3, 3, 3], [2, 2, 2, 3, 4], [2, 2, 2, 3, 3], [2, 2, 2, 4], [2, 2, 2, 3], [2, 2, 2, 2], [3, 4, 4], [3, 3, 3, 4], [3, 3, 3, 3], [4, 4], [3, 3, 4], [3, 3, 3], [2, 2, 3, 4], [2, 2, 3, 3], [2, 2, 4], [2, 2, 3], [2, 2, 2], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 3, 4], [1, 3, 3], [1, 4], [1, 3], [1, 2], [1, 1], [2, 3, 4], [2, 3, 3], [2, 4], [2, 3], [2, 2], [3, 4], [3, 3]])\n assert answers_match(candidate(nums=[5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1]), [[5, 5, 5], [4, 5, 5], [4, 4, 5], [4, 4, 4], [3, 5, 5], [3, 4, 5], [3, 4, 4], [3, 3, 5], [3, 3, 4], [3, 3, 3], [2, 5, 5], [2, 4, 5], [2, 4, 4], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 2, 5], [2, 2, 4], [2, 2, 3], [2, 2, 2], [1, 5, 5], [1, 4, 5], [1, 4, 4], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 1, 5], [1, 1, 4], [1, 1, 3], [1, 1, 2], [1, 1, 1], [5, 5], [4, 5], [4, 4], [3, 5], [3, 4], [3, 3], [2, 5], [2, 4], [2, 3], [2, 2], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1]])\n assert answers_match(candidate(nums=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0]])\n assert answers_match(candidate(nums=[3, 3, 3, 1, 2, 2, 2, 3, 3, 3]), [[3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3], [3, 3, 3, 3], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 2, 2, 2], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3], [1, 2, 2, 3], [1, 2, 2], [1, 2, 3, 3, 3], [1, 2, 3, 3], [1, 2, 3], [1, 2], [1, 3, 3, 3], [1, 3, 3], [1, 3], [2, 2, 2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [2, 2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 3], [2, 2], [2, 3, 3, 3], [2, 3, 3], [2, 3], [3, 3, 3], [3, 3]])\n assert answers_match(candidate(nums=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5]), [[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3, 5], [1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4, 5], [1, 1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 1, 2, 2, 2, 3, 3, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 5, 5], [1, 1, 1, 2, 2, 2, 3, 3, 5], [1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4, 5], [1, 1, 1, 2, 2, 2, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 5, 5], [1, 1, 1, 2, 2, 2, 3, 4, 5], [1, 1, 1, 2, 2, 2, 3, 4], [1, 1, 1, 2, 2, 2, 3, 5, 5, 5], [1, 1, 1, 2, 2, 2, 3, 5, 5], [1, 1, 1, 2, 2, 2, 3, 5], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 4, 4, 4, 5], [1, 1, 1, 2, 2, 2, 4, 4, 4], [1, 1, 1, 2, 2, 2, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 4, 4, 5, 5], [1, 1, 1, 2, 2, 2, 4, 4, 5], [1, 1, 1, 2, 2, 2, 4, 4], [1, 1, 1, 2, 2, 2, 4, 5, 5, 5], [1, 1, 1, 2, 2, 2, 4, 5, 5], [1, 1, 1, 2, 2, 2, 4, 5], [1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 2, 2, 2, 5, 5, 5], [1, 1, 1, 2, 2, 2, 5, 5], [1, 1, 1, 2, 2, 2, 5], [1, 1, 1, 2, 2, 2], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4], [1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4, 5], [1, 1, 1, 2, 2, 3, 3, 3, 4], [1, 1, 1, 2, 2, 3, 3, 3, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 5, 5], [1, 1, 1, 2, 2, 3, 3, 3, 5], [1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 1, 2, 2, 3, 3, 4], [1, 1, 1, 2, 2, 3, 3, 5, 5, 5], [1, 1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 1, 2, 2, 3, 3, 5], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 3, 4, 4, 4, 5], [1, 1, 1, 2, 2, 3, 4, 4, 4], [1, 1, 1, 2, 2, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 1, 2, 2, 3, 4, 4], [1, 1, 1, 2, 2, 3, 4, 5, 5, 5], [1, 1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 1, 2, 2, 3, 4, 5], [1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 2, 2, 3, 5, 5, 5], [1, 1, 1, 2, 2, 3, 5, 5], [1, 1, 1, 2, 2, 3, 5], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 4, 4, 4, 5, 5], [1, 1, 1, 2, 2, 4, 4, 4, 5], [1, 1, 1, 2, 2, 4, 4, 4], [1, 1, 1, 2, 2, 4, 4, 5, 5, 5], [1, 1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 1, 2, 2, 4, 4, 5], [1, 1, 1, 2, 2, 4, 4], [1, 1, 1, 2, 2, 4, 5, 5, 5], [1, 1, 1, 2, 2, 4, 5, 5], [1, 1, 1, 2, 2, 4, 5], [1, 1, 1, 2, 2, 4], [1, 1, 1, 2, 2, 5, 5, 5], [1, 1, 1, 2, 2, 5, 5], [1, 1, 1, 2, 2, 5], [1, 1, 1, 2, 2], [1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 3, 4, 4, 5, 5], [1, 1, 1, 2, 3, 3, 3, 4, 4, 5], [1, 1, 1, 2, 3, 3, 3, 4, 4], [1, 1, 1, 2, 3, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 3, 4, 5, 5], [1, 1, 1, 2, 3, 3, 3, 4, 5], [1, 1, 1, 2, 3, 3, 3, 4], [1, 1, 1, 2, 3, 3, 3, 5, 5, 5], [1, 1, 1, 2, 3, 3, 3, 5, 5], [1, 1, 1, 2, 3, 3, 3, 5], [1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 3, 3, 4, 4, 4, 5], [1, 1, 1, 2, 3, 3, 4, 4, 4], [1, 1, 1, 2, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 1, 2, 3, 3, 4, 4], [1, 1, 1, 2, 3, 3, 4, 5, 5, 5], [1, 1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 1, 2, 3, 3, 4, 5], [1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 2, 3, 3, 5, 5, 5], [1, 1, 1, 2, 3, 3, 5, 5], [1, 1, 1, 2, 3, 3, 5], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 3, 4, 4, 4, 5, 5], [1, 1, 1, 2, 3, 4, 4, 4, 5], [1, 1, 1, 2, 3, 4, 4, 4], [1, 1, 1, 2, 3, 4, 4, 5, 5, 5], [1, 1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 1, 2, 3, 4, 4, 5], [1, 1, 1, 2, 3, 4, 4], [1, 1, 1, 2, 3, 4, 5, 5, 5], [1, 1, 1, 2, 3, 4, 5, 5], [1, 1, 1, 2, 3, 4, 5], [1, 1, 1, 2, 3, 4], [1, 1, 1, 2, 3, 5, 5, 5], [1, 1, 1, 2, 3, 5, 5], [1, 1, 1, 2, 3, 5], [1, 1, 1, 2, 3], [1, 1, 1, 2, 4, 4, 4, 5, 5, 5], [1, 1, 1, 2, 4, 4, 4, 5, 5], [1, 1, 1, 2, 4, 4, 4, 5], [1, 1, 1, 2, 4, 4, 4], [1, 1, 1, 2, 4, 4, 5, 5, 5], [1, 1, 1, 2, 4, 4, 5, 5], [1, 1, 1, 2, 4, 4, 5], [1, 1, 1, 2, 4, 4], [1, 1, 1, 2, 4, 5, 5, 5], [1, 1, 1, 2, 4, 5, 5], [1, 1, 1, 2, 4, 5], [1, 1, 1, 2, 4], [1, 1, 1, 2, 5, 5, 5], [1, 1, 1, 2, 5, 5], [1, 1, 1, 2, 5], [1, 1, 1, 2], [1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 3, 3, 3, 4, 4, 4, 5], [1, 1, 1, 3, 3, 3, 4, 4, 4], [1, 1, 1, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 3, 3, 3, 4, 4, 5, 5], [1, 1, 1, 3, 3, 3, 4, 4, 5], [1, 1, 1, 3, 3, 3, 4, 4], [1, 1, 1, 3, 3, 3, 4, 5, 5, 5], [1, 1, 1, 3, 3, 3, 4, 5, 5], [1, 1, 1, 3, 3, 3, 4, 5], [1, 1, 1, 3, 3, 3, 4], [1, 1, 1, 3, 3, 3, 5, 5, 5], [1, 1, 1, 3, 3, 3, 5, 5], [1, 1, 1, 3, 3, 3, 5], [1, 1, 1, 3, 3, 3], [1, 1, 1, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 3, 3, 4, 4, 4, 5, 5], [1, 1, 1, 3, 3, 4, 4, 4, 5], [1, 1, 1, 3, 3, 4, 4, 4], [1, 1, 1, 3, 3, 4, 4, 5, 5, 5], [1, 1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 1, 3, 3, 4, 4, 5], [1, 1, 1, 3, 3, 4, 4], [1, 1, 1, 3, 3, 4, 5, 5, 5], [1, 1, 1, 3, 3, 4, 5, 5], [1, 1, 1, 3, 3, 4, 5], [1, 1, 1, 3, 3, 4], [1, 1, 1, 3, 3, 5, 5, 5], [1, 1, 1, 3, 3, 5, 5], [1, 1, 1, 3, 3, 5], [1, 1, 1, 3, 3], [1, 1, 1, 3, 4, 4, 4, 5, 5, 5], [1, 1, 1, 3, 4, 4, 4, 5, 5], [1, 1, 1, 3, 4, 4, 4, 5], [1, 1, 1, 3, 4, 4, 4], [1, 1, 1, 3, 4, 4, 5, 5, 5], [1, 1, 1, 3, 4, 4, 5, 5], [1, 1, 1, 3, 4, 4, 5], [1, 1, 1, 3, 4, 4], [1, 1, 1, 3, 4, 5, 5, 5], [1, 1, 1, 3, 4, 5, 5], [1, 1, 1, 3, 4, 5], [1, 1, 1, 3, 4], [1, 1, 1, 3, 5, 5, 5], [1, 1, 1, 3, 5, 5], [1, 1, 1, 3, 5], [1, 1, 1, 3], [1, 1, 1, 4, 4, 4, 5, 5, 5], [1, 1, 1, 4, 4, 4, 5, 5], [1, 1, 1, 4, 4, 4, 5], [1, 1, 1, 4, 4, 4], [1, 1, 1, 4, 4, 5, 5, 5], [1, 1, 1, 4, 4, 5, 5], [1, 1, 1, 4, 4, 5], [1, 1, 1, 4, 4], [1, 1, 1, 4, 5, 5, 5], [1, 1, 1, 4, 5, 5], [1, 1, 1, 4, 5], [1, 1, 1, 4], [1, 1, 1, 5, 5, 5], [1, 1, 1, 5, 5], [1, 1, 1, 5], [1, 1, 1], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4, 5], [1, 1, 2, 2, 2, 3, 3, 3, 4], [1, 1, 2, 2, 2, 3, 3, 3, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 5, 5], [1, 1, 2, 2, 2, 3, 3, 3, 5], [1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4, 4, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 2, 3, 3, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 2, 2, 2, 3, 3, 5, 5, 5], [1, 1, 2, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 2, 3, 3, 5], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 4, 4, 4, 5, 5], [1, 1, 2, 2, 2, 3, 4, 4, 4, 5], [1, 1, 2, 2, 2, 3, 4, 4, 4], [1, 1, 2, 2, 2, 3, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 2, 3, 4, 4], [1, 1, 2, 2, 2, 3, 4, 5, 5, 5], [1, 1, 2, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 2, 3, 4, 5], [1, 1, 2, 2, 2, 3, 4], [1, 1, 2, 2, 2, 3, 5, 5, 5], [1, 1, 2, 2, 2, 3, 5, 5], [1, 1, 2, 2, 2, 3, 5], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 4, 4, 4, 5, 5], [1, 1, 2, 2, 2, 4, 4, 4, 5], [1, 1, 2, 2, 2, 4, 4, 4], [1, 1, 2, 2, 2, 4, 4, 5, 5, 5], [1, 1, 2, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 2, 4, 4, 5], [1, 1, 2, 2, 2, 4, 4], [1, 1, 2, 2, 2, 4, 5, 5, 5], [1, 1, 2, 2, 2, 4, 5, 5], [1, 1, 2, 2, 2, 4, 5], [1, 1, 2, 2, 2, 4], [1, 1, 2, 2, 2, 5, 5, 5], [1, 1, 2, 2, 2, 5, 5], [1, 1, 2, 2, 2, 5], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 1, 2, 2, 3, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 3, 4], [1, 1, 2, 2, 3, 3, 3, 5, 5, 5], [1, 1, 2, 2, 3, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 3, 5], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4, 4], [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 4, 5], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4, 5, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5, 5], [1, 1, 2, 2, 3, 3, 4, 5], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3, 5, 5, 5], [1, 1, 2, 2, 3, 3, 5, 5], [1, 1, 2, 2, 3, 3, 5], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 3, 4, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4, 4], [1, 1, 2, 2, 3, 4, 4, 5, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5, 5], [1, 1, 2, 2, 3, 4, 4, 5], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4, 5, 5, 5], [1, 1, 2, 2, 3, 4, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5, 5, 5], [1, 1, 2, 2, 3, 5, 5], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 4, 5, 5, 5], [1, 1, 2, 2, 4, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 4, 5], [1, 1, 2, 2, 4, 4, 4], [1, 1, 2, 2, 4, 4, 5, 5, 5], [1, 1, 2, 2, 4, 4, 5, 5], [1, 1, 2, 2, 4, 4, 5], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4, 5, 5, 5], [1, 1, 2, 2, 4, 5, 5], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5, 5, 5], [1, 1, 2, 2, 5, 5], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 2, 3, 3, 3, 4, 4, 4, 5], [1, 1, 2, 3, 3, 3, 4, 4, 4], [1, 1, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 2, 3, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 3, 4, 4], [1, 1, 2, 3, 3, 3, 4, 5, 5, 5], [1, 1, 2, 3, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 3, 4, 5], [1, 1, 2, 3, 3, 3, 4], [1, 1, 2, 3, 3, 3, 5, 5, 5], [1, 1, 2, 3, 3, 3, 5, 5], [1, 1, 2, 3, 3, 3, 5], [1, 1, 2, 3, 3, 3], [1, 1, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 3, 3, 4, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4, 4], [1, 1, 2, 3, 3, 4, 4, 5, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5, 5], [1, 1, 2, 3, 3, 4, 4, 5], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4, 5, 5, 5], [1, 1, 2, 3, 3, 4, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5, 5, 5], [1, 1, 2, 3, 3, 5, 5], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 4, 5, 5, 5], [1, 1, 2, 3, 4, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 4, 5], [1, 1, 2, 3, 4, 4, 4], [1, 1, 2, 3, 4, 4, 5, 5, 5], [1, 1, 2, 3, 4, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4, 5, 5, 5], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5, 5, 5], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 4, 4, 5, 5, 5], [1, 1, 2, 4, 4, 4, 5, 5], [1, 1, 2, 4, 4, 4, 5], [1, 1, 2, 4, 4, 4], [1, 1, 2, 4, 4, 5, 5, 5], [1, 1, 2, 4, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 4, 5, 5, 5], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5, 5, 5], [1, 1, 2, 5, 5], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 3, 3, 3, 4, 4, 4, 5, 5], [1, 1, 3, 3, 3, 4, 4, 4, 5], [1, 1, 3, 3, 3, 4, 4, 4], [1, 1, 3, 3, 3, 4, 4, 5, 5, 5], [1, 1, 3, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 3, 4, 4, 5], [1, 1, 3, 3, 3, 4, 4], [1, 1, 3, 3, 3, 4, 5, 5, 5], [1, 1, 3, 3, 3, 4, 5, 5], [1, 1, 3, 3, 3, 4, 5], [1, 1, 3, 3, 3, 4], [1, 1, 3, 3, 3, 5, 5, 5], [1, 1, 3, 3, 3, 5, 5], [1, 1, 3, 3, 3, 5], [1, 1, 3, 3, 3], [1, 1, 3, 3, 4, 4, 4, 5, 5, 5], [1, 1, 3, 3, 4, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 4, 5], [1, 1, 3, 3, 4, 4, 4], [1, 1, 3, 3, 4, 4, 5, 5, 5], [1, 1, 3, 3, 4, 4, 5, 5], [1, 1, 3, 3, 4, 4, 5], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4, 5, 5, 5], [1, 1, 3, 3, 4, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5, 5, 5], [1, 1, 3, 3, 5, 5], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 3, 4, 4, 4, 5, 5, 5], [1, 1, 3, 4, 4, 4, 5, 5], [1, 1, 3, 4, 4, 4, 5], [1, 1, 3, 4, 4, 4], [1, 1, 3, 4, 4, 5, 5, 5], [1, 1, 3, 4, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 4, 5, 5, 5], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5, 5, 5], [1, 1, 3, 5, 5], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 4, 4, 5, 5, 5], [1, 1, 4, 4, 4, 5, 5], [1, 1, 4, 4, 4, 5], [1, 1, 4, 4, 4], [1, 1, 4, 4, 5, 5, 5], [1, 1, 4, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 4, 5, 5, 5], [1, 1, 4, 5, 5], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5, 5, 5], [1, 1, 5, 5], [1, 1, 5], [1, 1], [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 4, 5], [1, 2, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 5, 5], [1, 2, 2, 2, 3, 3, 3, 4, 5], [1, 2, 2, 2, 3, 3, 3, 4], [1, 2, 2, 2, 3, 3, 3, 5, 5, 5], [1, 2, 2, 2, 3, 3, 3, 5, 5], [1, 2, 2, 2, 3, 3, 3, 5], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 2, 3, 3, 4, 4, 4, 5], [1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 2, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 4, 5, 5, 5], [1, 2, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 2, 3, 3, 4, 5], [1, 2, 2, 2, 3, 3, 4], [1, 2, 2, 2, 3, 3, 5, 5, 5], [1, 2, 2, 2, 3, 3, 5, 5], [1, 2, 2, 2, 3, 3, 5], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 2, 3, 4, 4, 4, 5, 5], [1, 2, 2, 2, 3, 4, 4, 4, 5], [1, 2, 2, 2, 3, 4, 4, 4], [1, 2, 2, 2, 3, 4, 4, 5, 5, 5], [1, 2, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 2, 3, 4, 4, 5], [1, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 3, 4, 5, 5, 5], [1, 2, 2, 2, 3, 4, 5, 5], [1, 2, 2, 2, 3, 4, 5], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 5, 5, 5], [1, 2, 2, 2, 3, 5, 5], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 4, 4, 5, 5, 5], [1, 2, 2, 2, 4, 4, 4, 5, 5], [1, 2, 2, 2, 4, 4, 4, 5], [1, 2, 2, 2, 4, 4, 4], [1, 2, 2, 2, 4, 4, 5, 5, 5], [1, 2, 2, 2, 4, 4, 5, 5], [1, 2, 2, 2, 4, 4, 5], [1, 2, 2, 2, 4, 4], [1, 2, 2, 2, 4, 5, 5, 5], [1, 2, 2, 2, 4, 5, 5], [1, 2, 2, 2, 4, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 5, 5, 5], [1, 2, 2, 2, 5, 5], [1, 2, 2, 2, 5], [1, 2, 2, 2], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4, 5], [1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 3, 4, 5], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3, 5, 5, 5], [1, 2, 2, 3, 3, 3, 5, 5], [1, 2, 2, 3, 3, 3, 5], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5, 5], [1, 2, 2, 3, 3, 4, 4, 5], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4, 5, 5, 5], [1, 2, 2, 3, 3, 4, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5, 5, 5], [1, 2, 2, 3, 3, 5, 5], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4, 5, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 4, 5], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4, 5, 5, 5], [1, 2, 2, 3, 4, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5, 5, 5], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4, 5, 5, 5], [1, 2, 2, 4, 4, 4, 5, 5], [1, 2, 2, 4, 4, 4, 5], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4, 5, 5, 5], [1, 2, 2, 4, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 4, 5, 5, 5], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5, 5, 5], [1, 2, 2, 5, 5], [1, 2, 2, 5], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 4, 5], [1, 2, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 3, 4, 4, 5], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4, 5, 5, 5], [1, 2, 3, 3, 3, 4, 5, 5], [1, 2, 3, 3, 3, 4, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 5, 5, 5], [1, 2, 3, 3, 3, 5, 5], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 4, 5, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 4, 5], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4, 5, 5, 5], [1, 2, 3, 3, 4, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5, 5, 5], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4, 5, 5, 5], [1, 2, 3, 4, 4, 4, 5, 5], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 4, 5, 5, 5], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5, 5, 5], [1, 2, 3, 5, 5], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 4, 4, 5, 5, 5], [1, 2, 4, 4, 4, 5, 5], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 4, 4, 5, 5, 5], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 4, 5, 5, 5], [1, 2, 4, 5, 5], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5, 5, 5], [1, 2, 5, 5], [1, 2, 5], [1, 2], [1, 3, 3, 3, 4, 4, 4, 5, 5, 5], [1, 3, 3, 3, 4, 4, 4, 5, 5], [1, 3, 3, 3, 4, 4, 4, 5], [1, 3, 3, 3, 4, 4, 4], [1, 3, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 3, 4, 4, 5, 5], [1, 3, 3, 3, 4, 4, 5], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4, 5, 5, 5], [1, 3, 3, 3, 4, 5, 5], [1, 3, 3, 3, 4, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 5, 5, 5], [1, 3, 3, 3, 5, 5], [1, 3, 3, 3, 5], [1, 3, 3, 3], [1, 3, 3, 4, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 4, 5, 5], [1, 3, 3, 4, 4, 4, 5], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4, 5, 5, 5], [1, 3, 3, 4, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 4, 5, 5, 5], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5, 5, 5], [1, 3, 3, 5, 5], [1, 3, 3, 5], [1, 3, 3], [1, 3, 4, 4, 4, 5, 5, 5], [1, 3, 4, 4, 4, 5, 5], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4], [1, 3, 4, 4, 5, 5, 5], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 4, 5, 5, 5], [1, 3, 4, 5, 5], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5, 5, 5], [1, 3, 5, 5], [1, 3, 5], [1, 3], [1, 4, 4, 4, 5, 5, 5], [1, 4, 4, 4, 5, 5], [1, 4, 4, 4, 5], [1, 4, 4, 4], [1, 4, 4, 5, 5, 5], [1, 4, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 4, 5, 5, 5], [1, 4, 5, 5], [1, 4, 5], [1, 4], [1, 5, 5, 5], [1, 5, 5], [1, 5], [2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [2, 2, 2, 3, 3, 3, 4, 4, 4, 5], [2, 2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 2, 2, 3, 3, 3, 4, 4, 5, 5], [2, 2, 2, 3, 3, 3, 4, 4, 5], [2, 2, 2, 3, 3, 3, 4, 4], [2, 2, 2, 3, 3, 3, 4, 5, 5, 5], [2, 2, 2, 3, 3, 3, 4, 5, 5], [2, 2, 2, 3, 3, 3, 4, 5], [2, 2, 2, 3, 3, 3, 4], [2, 2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 2, 3, 3, 3, 5, 5], [2, 2, 2, 3, 3, 3, 5], [2, 2, 2, 3, 3, 3], [2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [2, 2, 2, 3, 3, 4, 4, 4, 5, 5], [2, 2, 2, 3, 3, 4, 4, 4, 5], [2, 2, 2, 3, 3, 4, 4, 4], [2, 2, 2, 3, 3, 4, 4, 5, 5, 5], [2, 2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 2, 3, 3, 4, 4, 5], [2, 2, 2, 3, 3, 4, 4], [2, 2, 2, 3, 3, 4, 5, 5, 5], [2, 2, 2, 3, 3, 4, 5, 5], [2, 2, 2, 3, 3, 4, 5], [2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3, 5, 5, 5], [2, 2, 2, 3, 3, 5, 5], [2, 2, 2, 3, 3, 5], [2, 2, 2, 3, 3], [2, 2, 2, 3, 4, 4, 4, 5, 5, 5], [2, 2, 2, 3, 4, 4, 4, 5, 5], [2, 2, 2, 3, 4, 4, 4, 5], [2, 2, 2, 3, 4, 4, 4], [2, 2, 2, 3, 4, 4, 5, 5, 5], [2, 2, 2, 3, 4, 4, 5, 5], [2, 2, 2, 3, 4, 4, 5], [2, 2, 2, 3, 4, 4], [2, 2, 2, 3, 4, 5, 5, 5], [2, 2, 2, 3, 4, 5, 5], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 4], [2, 2, 2, 3, 5, 5, 5], [2, 2, 2, 3, 5, 5], [2, 2, 2, 3, 5], [2, 2, 2, 3], [2, 2, 2, 4, 4, 4, 5, 5, 5], [2, 2, 2, 4, 4, 4, 5, 5], [2, 2, 2, 4, 4, 4, 5], [2, 2, 2, 4, 4, 4], [2, 2, 2, 4, 4, 5, 5, 5], [2, 2, 2, 4, 4, 5, 5], [2, 2, 2, 4, 4, 5], [2, 2, 2, 4, 4], [2, 2, 2, 4, 5, 5, 5], [2, 2, 2, 4, 5, 5], [2, 2, 2, 4, 5], [2, 2, 2, 4], [2, 2, 2, 5, 5, 5], [2, 2, 2, 5, 5], [2, 2, 2, 5], [2, 2, 2], [2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 5, 5], [2, 2, 3, 3, 3, 4, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 3, 4, 4, 5], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4, 5, 5, 5], [2, 2, 3, 3, 3, 4, 5, 5], [2, 2, 3, 3, 3, 4, 5], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3, 5, 5, 5], [2, 2, 3, 3, 3, 5, 5], [2, 2, 3, 3, 3, 5], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 4, 5, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 4, 5], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4, 5, 5, 5], [2, 2, 3, 3, 4, 4, 5, 5], [2, 2, 3, 3, 4, 4, 5], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4, 5, 5, 5], [2, 2, 3, 3, 4, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5, 5, 5], [2, 2, 3, 3, 5, 5], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 4, 5, 5], [2, 2, 3, 4, 4, 4, 5], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4, 5, 5, 5], [2, 2, 3, 4, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 4, 5, 5, 5], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5, 5, 5], [2, 2, 3, 5, 5], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 4, 4, 5, 5, 5], [2, 2, 4, 4, 4, 5, 5], [2, 2, 4, 4, 4, 5], [2, 2, 4, 4, 4], [2, 2, 4, 4, 5, 5, 5], [2, 2, 4, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 4, 5, 5, 5], [2, 2, 4, 5, 5], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5, 5, 5], [2, 2, 5, 5], [2, 2, 5], [2, 2], [2, 3, 3, 3, 4, 4, 4, 5, 5, 5], [2, 3, 3, 3, 4, 4, 4, 5, 5], [2, 3, 3, 3, 4, 4, 4, 5], [2, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4, 5, 5, 5], [2, 3, 3, 3, 4, 4, 5, 5], [2, 3, 3, 3, 4, 4, 5], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4, 5, 5, 5], [2, 3, 3, 3, 4, 5, 5], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 5, 5, 5], [2, 3, 3, 3, 5, 5], [2, 3, 3, 3, 5], [2, 3, 3, 3], [2, 3, 3, 4, 4, 4, 5, 5, 5], [2, 3, 3, 4, 4, 4, 5, 5], [2, 3, 3, 4, 4, 4, 5], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4, 5, 5, 5], [2, 3, 3, 4, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 4, 5, 5, 5], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5, 5, 5], [2, 3, 3, 5, 5], [2, 3, 3, 5], [2, 3, 3], [2, 3, 4, 4, 4, 5, 5, 5], [2, 3, 4, 4, 4, 5, 5], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4], [2, 3, 4, 4, 5, 5, 5], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 4, 5, 5, 5], [2, 3, 4, 5, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5, 5, 5], [2, 3, 5, 5], [2, 3, 5], [2, 3], [2, 4, 4, 4, 5, 5, 5], [2, 4, 4, 4, 5, 5], [2, 4, 4, 4, 5], [2, 4, 4, 4], [2, 4, 4, 5, 5, 5], [2, 4, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 4, 5, 5, 5], [2, 4, 5, 5], [2, 4, 5], [2, 4], [2, 5, 5, 5], [2, 5, 5], [2, 5], [3, 3, 3, 4, 4, 4, 5, 5, 5], [3, 3, 3, 4, 4, 4, 5, 5], [3, 3, 3, 4, 4, 4, 5], [3, 3, 3, 4, 4, 4], [3, 3, 3, 4, 4, 5, 5, 5], [3, 3, 3, 4, 4, 5, 5], [3, 3, 3, 4, 4, 5], [3, 3, 3, 4, 4], [3, 3, 3, 4, 5, 5, 5], [3, 3, 3, 4, 5, 5], [3, 3, 3, 4, 5], [3, 3, 3, 4], [3, 3, 3, 5, 5, 5], [3, 3, 3, 5, 5], [3, 3, 3, 5], [3, 3, 3], [3, 3, 4, 4, 4, 5, 5, 5], [3, 3, 4, 4, 4, 5, 5], [3, 3, 4, 4, 4, 5], [3, 3, 4, 4, 4], [3, 3, 4, 4, 5, 5, 5], [3, 3, 4, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 4, 5, 5, 5], [3, 3, 4, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5, 5, 5], [3, 3, 5, 5], [3, 3, 5], [3, 3], [3, 4, 4, 4, 5, 5, 5], [3, 4, 4, 4, 5, 5], [3, 4, 4, 4, 5], [3, 4, 4, 4], [3, 4, 4, 5, 5, 5], [3, 4, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 4, 5, 5, 5], [3, 4, 5, 5], [3, 4, 5], [3, 4], [3, 5, 5, 5], [3, 5, 5], [3, 5], [4, 4, 4, 5, 5, 5], [4, 4, 4, 5, 5], [4, 4, 4, 5], [4, 4, 4], [4, 4, 5, 5, 5], [4, 4, 5, 5], [4, 4, 5], [4, 4], [4, 5, 5, 5], [4, 5, 5], [4, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[1, 2, 3, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1]), [[1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 3], [1, 2, 3, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 2, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 2, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 2], [1, 3, 3, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 3, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 3], [1, 3, 4, 5], [1, 3, 4, 4], [1, 3, 3, 5], [1, 3, 3, 4], [1, 3, 3, 3], [1, 2, 4, 5], [1, 2, 4, 4], [1, 2, 3, 5], [1, 2, 3, 4], [1, 2, 3, 3], [1, 2, 2, 5], [1, 2, 2, 4], [1, 2, 2, 3], [1, 2, 2, 2], [1, 1, 4, 5], [1, 1, 4, 4], [1, 1, 3, 5], [1, 1, 3, 4], [1, 1, 3, 3], [1, 1, 2, 5], [1, 1, 2, 4], [1, 1, 2, 3], [1, 1, 2, 2], [1, 1, 1, 5], [1, 1, 1, 4], [1, 1, 1, 3], [1, 1, 1, 2], [1, 1, 1, 1], [2, 3, 3, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 3, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 3], [2, 3, 4, 5], [2, 3, 4, 4], [2, 3, 3, 5], [2, 3, 3, 4], [2, 3, 3, 3], [2, 2, 4, 5], [2, 2, 4, 4], [2, 2, 3, 5], [2, 2, 3, 4], [2, 2, 3, 3], [2, 2, 2, 5], [2, 2, 2, 4], [2, 2, 2, 3], [2, 2, 2, 2], [3, 3, 4, 5], [3, 3, 4, 4], [3, 3, 3, 5], [3, 3, 3, 4], [3, 3, 3, 3], [3, 4, 5], [3, 4, 4], [3, 3, 5], [3, 3, 4], [3, 3, 3], [2, 4, 5], [2, 4, 4], [2, 3, 5], [2, 3, 4], [2, 3, 3], [2, 2, 5], [2, 2, 4], [2, 2, 3], [2, 2, 2], [1, 4, 5], [1, 4, 4], [1, 3, 5], [1, 3, 4], [1, 3, 3], [1, 2, 5], [1, 2, 4], [1, 2, 3], [1, 2, 2], [1, 1, 5], [1, 1, 4], [1, 1, 3], [1, 1, 2], [1, 1, 1], [4, 5], [4, 4], [3, 5], [3, 4], [3, 3], [2, 5], [2, 4], [2, 3], [2, 2], [1, 5], [1, 4], [1, 3], [1, 2], [1, 1]])\n assert answers_match(candidate(nums=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]), [])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5, 5, 5], [1, 2, 3, 4, 4, 5, 5], [1, 2, 3, 4, 4, 4, 5], [1, 2, 3, 4, 4, 4], [1, 2, 3, 5, 5, 5], [1, 2, 3, 3, 4, 5, 5], [1, 2, 3, 3, 4, 4, 5], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 5, 5], [1, 2, 3, 3, 3, 4, 5], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3, 5], [1, 2, 3, 3, 3], [1, 2, 4, 5, 5, 5], [1, 2, 4, 4, 5, 5], [1, 2, 4, 4, 4, 5], [1, 2, 4, 4, 4], [1, 2, 5, 5, 5], [1, 2, 2, 3, 4, 5, 5], [1, 2, 2, 3, 4, 4, 5], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 5, 5], [1, 2, 2, 3, 3, 4, 5], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3, 5], [1, 2, 2, 3, 3], [1, 2, 2, 4, 5, 5], [1, 2, 2, 4, 4, 5], [1, 2, 2, 4, 4], [1, 2, 2, 5, 5], [1, 2, 2, 2, 3, 4, 5], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3, 5], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 5], [1, 2, 2, 2, 4], [1, 2, 2, 2, 5], [1, 2, 2, 2], [1, 3, 4, 5, 5, 5], [1, 3, 4, 4, 5, 5], [1, 3, 4, 4, 4, 5], [1, 3, 4, 4, 4], [1, 3, 5, 5, 5], [1, 3, 3, 4, 5, 5], [1, 3, 3, 4, 4, 5], [1, 3, 3, 4, 4], [1, 3, 3, 5, 5], [1, 3, 3, 3, 4, 5], [1, 3, 3, 3, 4], [1, 3, 3, 3, 5], [1, 3, 3, 3], [1, 4, 5, 5, 5], [1, 4, 4, 5, 5], [1, 4, 4, 4, 5], [1, 4, 4, 4], [1, 5, 5, 5], [1, 1, 2, 3, 4, 5, 5], [1, 1, 2, 3, 4, 4, 5], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 5, 5], [1, 1, 2, 3, 3, 4, 5], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3, 5], [1, 1, 2, 3, 3], [1, 1, 2, 4, 5, 5], [1, 1, 2, 4, 4, 5], [1, 1, 2, 4, 4], [1, 1, 2, 5, 5], [1, 1, 2, 2, 3, 4, 5], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3, 5], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 5], [1, 1, 2, 2, 4], [1, 1, 2, 2, 5], [1, 1, 2, 2], [1, 1, 3, 4, 5, 5], [1, 1, 3, 4, 4, 5], [1, 1, 3, 4, 4], [1, 1, 3, 5, 5], [1, 1, 3, 3, 4, 5], [1, 1, 3, 3, 4], [1, 1, 3, 3, 5], [1, 1, 3, 3], [1, 1, 4, 5, 5], [1, 1, 4, 4, 5], [1, 1, 4, 4], [1, 1, 5, 5], [1, 1, 1, 2, 3, 4, 5], [1, 1, 1, 2, 3, 4], [1, 1, 1, 2, 3, 5], [1, 1, 1, 2, 3], [1, 1, 1, 2, 4, 5], [1, 1, 1, 2, 4], [1, 1, 1, 2, 5], [1, 1, 1, 2], [1, 1, 1, 3, 4, 5], [1, 1, 1, 3, 4], [1, 1, 1, 3, 5], [1, 1, 1, 3], [1, 1, 1, 4, 5], [1, 1, 1, 4], [1, 1, 1, 5], [1, 1, 1], [2, 3, 4, 5, 5, 5], [2, 3, 4, 4, 5, 5], [2, 3, 4, 4, 4, 5], [2, 3, 4, 4, 4], [2, 3, 5, 5, 5], [2, 3, 3, 4, 5, 5], [2, 3, 3, 4, 4, 5], [2, 3, 3, 4, 4], [2, 3, 3, 5, 5], [2, 3, 3, 3, 4, 5], [2, 3, 3, 3, 4], [2, 3, 3, 3, 5], [2, 3, 3, 3], [2, 4, 5, 5, 5], [2, 4, 4, 5, 5], [2, 4, 4, 4, 5], [2, 4, 4, 4], [2, 5, 5, 5], [2, 2, 3, 4, 5, 5], [2, 2, 3, 4, 4, 5], [2, 2, 3, 4, 4], [2, 2, 3, 5, 5], [2, 2, 3, 3, 4, 5], [2, 2, 3, 3, 4], [2, 2, 3, 3, 5], [2, 2, 3, 3], [2, 2, 4, 5, 5], [2, 2, 4, 4, 5], [2, 2, 4, 4], [2, 2, 5, 5], [2, 2, 2, 3, 4, 5], [2, 2, 2, 3, 4], [2, 2, 2, 3, 5], [2, 2, 2, 3], [2, 2, 2, 4, 5], [2, 2, 2, 4], [2, 2, 2, 5], [2, 2, 2], [3, 4, 5, 5, 5], [3, 4, 4, 5, 5], [3, 4, 4, 4, 5], [3, 4, 4, 4], [3, 5, 5, 5], [3, 3, 4, 5, 5], [3, 3, 4, 4, 5], [3, 3, 4, 4], [3, 3, 5, 5], [3, 3, 3, 4, 5], [3, 3, 3, 4], [3, 3, 3, 5], [3, 3, 3], [4, 5, 5, 5], [4, 4, 5, 5], [4, 4, 4, 5], [4, 4, 4], [5, 5, 5], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5, 5], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 4, 5, 5], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 5, 5], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5], [1, 2, 2], [1, 3, 4, 5, 5], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 5, 5], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5], [1, 3, 3], [1, 4, 5, 5], [1, 4, 4, 5], [1, 4, 4], [1, 5, 5], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5], [1, 1], [2, 3, 4, 5, 5], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 5, 5], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5], [2, 3, 3], [2, 4, 5, 5], [2, 4, 4, 5], [2, 4, 4], [2, 5, 5], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [3, 4, 5, 5], [3, 4, 4, 5], [3, 4, 4], [3, 5, 5], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5], [3, 3], [4, 5, 5], [4, 4, 5], [4, 4], [5, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [3, 4, 5], [3, 4], [3, 5], [4, 5]])\n assert answers_match(candidate(nums=[10, 5, 10, 5, 10, 5, 10, 5, 10, 5]), [[10, 10, 10, 10, 10], [5, 10, 10, 10, 10], [5, 5, 10, 10, 10], [5, 5, 5, 10, 10], [5, 5, 5, 5, 10], [5, 5, 5, 5, 5], [10, 10, 10, 10], [5, 10, 10, 10], [5, 5, 10, 10], [5, 5, 5, 10], [5, 5, 5, 5], [10, 10, 10], [5, 10, 10], [5, 5, 10], [5, 5, 5], [10, 10], [5, 10], [5, 5]])\n assert answers_match(candidate(nums=[-10, 10, -20, 20, -30, 30, -40, 40, -50, 50, 0, 0, 0, 0, 0]), [[-10, 10, 20, 30, 40, 50], [-10, 10, 20, 30, 40], [-10, 10, 20, 30, 50], [-10, 10, 20, 30], [-10, 10, 20, 40, 50], [-10, 10, 20, 40], [-10, 10, 20, 50], [-10, 10, 20], [-10, 10, 30, 40, 50], [-10, 10, 30, 40], [-10, 10, 30, 50], [-10, 10, 30], [-10, 10, 40, 50], [-10, 10, 40], [-10, 10, 50], [-10, 10], [-10, 20, 30, 40, 50], [-10, 20, 30, 40], [-10, 20, 30, 50], [-10, 20, 30], [-10, 20, 40, 50], [-10, 20, 40], [-10, 20, 50], [-10, 20], [-10, 30, 40, 50], [-10, 30, 40], [-10, 30, 50], [-10, 30], [-10, 40, 50], [-10, 40], [-10, 50], [-10, 0, 0, 0, 0, 0], [-10, 0, 0, 0, 0], [-10, 0, 0, 0], [-10, 0, 0], [-10, 0], [10, 20, 30, 40, 50], [10, 20, 30, 40], [10, 20, 30, 50], [10, 20, 30], [10, 20, 40, 50], [10, 20, 40], [10, 20, 50], [10, 20], [10, 30, 40, 50], [10, 30, 40], [10, 30, 50], [10, 30], [10, 40, 50], [10, 40], [10, 50], [-20, 20, 30, 40, 50], [-20, 20, 30, 40], [-20, 20, 30, 50], [-20, 20, 30], [-20, 20, 40, 50], [-20, 20, 40], [-20, 20, 50], [-20, 20], [-20, 30, 40, 50], [-20, 30, 40], [-20, 30, 50], [-20, 30], [-20, 40, 50], [-20, 40], [-20, 50], [-20, 0, 0, 0, 0, 0], [-20, 0, 0, 0, 0], [-20, 0, 0, 0], [-20, 0, 0], [-20, 0], [20, 30, 40, 50], [20, 30, 40], [20, 30, 50], [20, 30], [20, 40, 50], [20, 40], [20, 50], [-30, 30, 40, 50], [-30, 30, 40], [-30, 30, 50], [-30, 30], [-30, 40, 50], [-30, 40], [-30, 50], [-30, 0, 0, 0, 0, 0], [-30, 0, 0, 0, 0], [-30, 0, 0, 0], [-30, 0, 0], [-30, 0], [30, 40, 50], [30, 40], [30, 50], [-40, 40, 50], [-40, 40], [-40, 50], [-40, 0, 0, 0, 0, 0], [-40, 0, 0, 0, 0], [-40, 0, 0, 0], [-40, 0, 0], [-40, 0], [40, 50], [-50, 50], [-50, 0, 0, 0, 0, 0], [-50, 0, 0, 0, 0], [-50, 0, 0, 0], [-50, 0, 0], [-50, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0]])\n assert answers_match(candidate(nums=[1, 2, 1, 1, 2, 1, 2, 1]), [[1, 2, 2, 2], [1, 1, 1, 2, 2], [1, 1, 1, 1, 2], [1, 1, 1, 1, 1], [2, 2, 2], [1, 1, 2, 2], [1, 1, 1, 2], [1, 1, 1, 1], [1, 2, 2], [1, 1, 2], [1, 1, 1], [2, 2], [1, 2], [1, 1]])\n assert answers_match(candidate(nums=[100, -100, 50, -50, 25, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0]), [[-100, 50], [-100, -50, 25], [-100, -50, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0, 0, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0, 0], [-100, -50, -25, 0, 0, 0], [-100, -50, -25, 0, 0], [-100, -50, -25, 0], [-100, -50, -25], [-100, -50, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-100, -50, 0, 0, 0, 0, 0, 0, 0, 0], [-100, -50, 0, 0, 0, 0, 0, 0, 0], [-100, -50, 0, 0, 0, 0, 0, 0], [-100, -50, 0, 0, 0, 0, 0], [-100, -50, 0, 0, 0, 0], [-100, -50, 0, 0, 0], [-100, -50, 0, 0], [-100, -50, 0], [-100, -50], [-100, 25], [-100, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-100, -25, 0, 0, 0, 0, 0, 0, 0, 0], [-100, -25, 0, 0, 0, 0, 0, 0, 0], [-100, -25, 0, 0, 0, 0, 0, 0], [-100, -25, 0, 0, 0, 0, 0], [-100, -25, 0, 0, 0, 0], [-100, -25, 0, 0, 0], [-100, -25, 0, 0], [-100, -25, 0], [-100, -25], [-100, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-100, 0, 0, 0, 0, 0, 0, 0, 0], [-100, 0, 0, 0, 0, 0, 0, 0], [-100, 0, 0, 0, 0, 0, 0], [-100, 0, 0, 0, 0, 0], [-100, 0, 0, 0, 0], [-100, 0, 0, 0], [-100, 0, 0], [-100, 0], [-50, 25], [-50, -25, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-50, -25, 0, 0, 0, 0, 0, 0, 0, 0], [-50, -25, 0, 0, 0, 0, 0, 0, 0], [-50, -25, 0, 0, 0, 0, 0, 0], [-50, -25, 0, 0, 0, 0, 0], [-50, -25, 0, 0, 0, 0], [-50, -25, 0, 0, 0], [-50, -25, 0, 0], [-50, -25, 0], [-50, -25], [-50, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-50, 0, 0, 0, 0, 0, 0, 0, 0], [-50, 0, 0, 0, 0, 0, 0, 0], [-50, 0, 0, 0, 0, 0, 0], [-50, 0, 0, 0, 0, 0], [-50, 0, 0, 0, 0], [-50, 0, 0, 0], [-50, 0, 0], [-50, 0], [-25, 0, 0, 0, 0, 0, 0, 0, 0, 0], [-25, 0, 0, 0, 0, 0, 0, 0, 0], [-25, 0, 0, 0, 0, 0, 0, 0], [-25, 0, 0, 0, 0, 0, 0], [-25, 0, 0, 0, 0, 0], [-25, 0, 0, 0, 0], [-25, 0, 0, 0], [-25, 0, 0], [-25, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0], [0, 0]])\n assert answers_match(candidate(nums=[0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]), [[0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 3], [0, 0, 0, 1, 1, 1, 2, 2, 2, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2, 4], [0, 0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 3], [0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3, 4], [0, 0, 0, 1, 1, 1, 2, 2, 3], [0, 0, 0, 1, 1, 1, 2, 2, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 4, 4], [0, 0, 0, 1, 1, 1, 2, 2, 4], [0, 0, 0, 1, 1, 1, 2, 2], [0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 3, 3, 3, 4], [0, 0, 0, 1, 1, 1, 2, 3, 3, 3], [0, 0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 3, 3, 4], [0, 0, 0, 1, 1, 1, 2, 3, 3], [0, 0, 0, 1, 1, 1, 2, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 3, 4, 4], [0, 0, 0, 1, 1, 1, 2, 3, 4], [0, 0, 0, 1, 1, 1, 2, 3], [0, 0, 0, 1, 1, 1, 2, 4, 4, 4], [0, 0, 0, 1, 1, 1, 2, 4, 4], [0, 0, 0, 1, 1, 1, 2, 4], [0, 0, 0, 1, 1, 1, 2], [0, 0, 0, 1, 1, 1, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 3, 3, 3, 4], [0, 0, 0, 1, 1, 1, 3, 3, 3], [0, 0, 0, 1, 1, 1, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 3, 3, 4, 4], [0, 0, 0, 1, 1, 1, 3, 3, 4], [0, 0, 0, 1, 1, 1, 3, 3], [0, 0, 0, 1, 1, 1, 3, 4, 4, 4], [0, 0, 0, 1, 1, 1, 3, 4, 4], [0, 0, 0, 1, 1, 1, 3, 4], [0, 0, 0, 1, 1, 1, 3], [0, 0, 0, 1, 1, 1, 4, 4, 4], [0, 0, 0, 1, 1, 1, 4, 4], [0, 0, 0, 1, 1, 1, 4], [0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 3], [0, 0, 0, 1, 1, 2, 2, 2, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3, 4], [0, 0, 0, 1, 1, 2, 2, 2, 3], [0, 0, 0, 1, 1, 2, 2, 2, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 4, 4], [0, 0, 0, 1, 1, 2, 2, 2, 4], [0, 0, 0, 1, 1, 2, 2, 2], [0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 4], [0, 0, 0, 1, 1, 2, 2, 3, 3, 3], [0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4], [0, 0, 0, 1, 1, 2, 2, 3, 3, 4], [0, 0, 0, 1, 1, 2, 2, 3, 3], [0, 0, 0, 1, 1, 2, 2, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 3, 4, 4], [0, 0, 0, 1, 1, 2, 2, 3, 4], [0, 0, 0, 1, 1, 2, 2, 3], [0, 0, 0, 1, 1, 2, 2, 4, 4, 4], [0, 0, 0, 1, 1, 2, 2, 4, 4], [0, 0, 0, 1, 1, 2, 2, 4], [0, 0, 0, 1, 1, 2, 2], [0, 0, 0, 1, 1, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 2, 3, 3, 3, 4], [0, 0, 0, 1, 1, 2, 3, 3, 3], [0, 0, 0, 1, 1, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 3, 3, 4, 4], [0, 0, 0, 1, 1, 2, 3, 3, 4], [0, 0, 0, 1, 1, 2, 3, 3], [0, 0, 0, 1, 1, 2, 3, 4, 4, 4], [0, 0, 0, 1, 1, 2, 3, 4, 4], [0, 0, 0, 1, 1, 2, 3, 4], [0, 0, 0, 1, 1, 2, 3], [0, 0, 0, 1, 1, 2, 4, 4, 4], [0, 0, 0, 1, 1, 2, 4, 4], [0, 0, 0, 1, 1, 2, 4], [0, 0, 0, 1, 1, 2], [0, 0, 0, 1, 1, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 3, 3, 3, 4, 4], [0, 0, 0, 1, 1, 3, 3, 3, 4], [0, 0, 0, 1, 1, 3, 3, 3], [0, 0, 0, 1, 1, 3, 3, 4, 4, 4], [0, 0, 0, 1, 1, 3, 3, 4, 4], [0, 0, 0, 1, 1, 3, 3, 4], [0, 0, 0, 1, 1, 3, 3], [0, 0, 0, 1, 1, 3, 4, 4, 4], [0, 0, 0, 1, 1, 3, 4, 4], [0, 0, 0, 1, 1, 3, 4], [0, 0, 0, 1, 1, 3], [0, 0, 0, 1, 1, 4, 4, 4], [0, 0, 0, 1, 1, 4, 4], [0, 0, 0, 1, 1, 4], [0, 0, 0, 1, 1], [0, 0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 2, 2, 2, 3, 3, 3, 4], [0, 0, 0, 1, 2, 2, 2, 3, 3, 3], [0, 0, 0, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 2, 2, 2, 3, 3, 4, 4], [0, 0, 0, 1, 2, 2, 2, 3, 3, 4], [0, 0, 0, 1, 2, 2, 2, 3, 3], [0, 0, 0, 1, 2, 2, 2, 3, 4, 4, 4], [0, 0, 0, 1, 2, 2, 2, 3, 4, 4], [0, 0, 0, 1, 2, 2, 2, 3, 4], [0, 0, 0, 1, 2, 2, 2, 3], [0, 0, 0, 1, 2, 2, 2, 4, 4, 4], [0, 0, 0, 1, 2, 2, 2, 4, 4], [0, 0, 0, 1, 2, 2, 2, 4], [0, 0, 0, 1, 2, 2, 2], [0, 0, 0, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 2, 2, 3, 3, 3, 4], [0, 0, 0, 1, 2, 2, 3, 3, 3], [0, 0, 0, 1, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 2, 2, 3, 3, 4, 4], [0, 0, 0, 1, 2, 2, 3, 3, 4], [0, 0, 0, 1, 2, 2, 3, 3], [0, 0, 0, 1, 2, 2, 3, 4, 4, 4], [0, 0, 0, 1, 2, 2, 3, 4, 4], [0, 0, 0, 1, 2, 2, 3, 4], [0, 0, 0, 1, 2, 2, 3], [0, 0, 0, 1, 2, 2, 4, 4, 4], [0, 0, 0, 1, 2, 2, 4, 4], [0, 0, 0, 1, 2, 2, 4], [0, 0, 0, 1, 2, 2], [0, 0, 0, 1, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 2, 3, 3, 3, 4, 4], [0, 0, 0, 1, 2, 3, 3, 3, 4], [0, 0, 0, 1, 2, 3, 3, 3], [0, 0, 0, 1, 2, 3, 3, 4, 4, 4], [0, 0, 0, 1, 2, 3, 3, 4, 4], [0, 0, 0, 1, 2, 3, 3, 4], [0, 0, 0, 1, 2, 3, 3], [0, 0, 0, 1, 2, 3, 4, 4, 4], [0, 0, 0, 1, 2, 3, 4, 4], [0, 0, 0, 1, 2, 3, 4], [0, 0, 0, 1, 2, 3], [0, 0, 0, 1, 2, 4, 4, 4], [0, 0, 0, 1, 2, 4, 4], [0, 0, 0, 1, 2, 4], [0, 0, 0, 1, 2], [0, 0, 0, 1, 3, 3, 3, 4, 4, 4], [0, 0, 0, 1, 3, 3, 3, 4, 4], [0, 0, 0, 1, 3, 3, 3, 4], [0, 0, 0, 1, 3, 3, 3], [0, 0, 0, 1, 3, 3, 4, 4, 4], [0, 0, 0, 1, 3, 3, 4, 4], [0, 0, 0, 1, 3, 3, 4], [0, 0, 0, 1, 3, 3], [0, 0, 0, 1, 3, 4, 4, 4], [0, 0, 0, 1, 3, 4, 4], [0, 0, 0, 1, 3, 4], [0, 0, 0, 1, 3], [0, 0, 0, 1, 4, 4, 4], [0, 0, 0, 1, 4, 4], [0, 0, 0, 1, 4], [0, 0, 0, 1], [0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 2, 2, 2, 3, 3, 3, 4], [0, 0, 0, 2, 2, 2, 3, 3, 3], [0, 0, 0, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 2, 2, 2, 3, 3, 4, 4], [0, 0, 0, 2, 2, 2, 3, 3, 4], [0, 0, 0, 2, 2, 2, 3, 3], [0, 0, 0, 2, 2, 2, 3, 4, 4, 4], [0, 0, 0, 2, 2, 2, 3, 4, 4], [0, 0, 0, 2, 2, 2, 3, 4], [0, 0, 0, 2, 2, 2, 3], [0, 0, 0, 2, 2, 2, 4, 4, 4], [0, 0, 0, 2, 2, 2, 4, 4], [0, 0, 0, 2, 2, 2, 4], [0, 0, 0, 2, 2, 2], [0, 0, 0, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 2, 2, 3, 3, 3, 4, 4], [0, 0, 0, 2, 2, 3, 3, 3, 4], [0, 0, 0, 2, 2, 3, 3, 3], [0, 0, 0, 2, 2, 3, 3, 4, 4, 4], [0, 0, 0, 2, 2, 3, 3, 4, 4], [0, 0, 0, 2, 2, 3, 3, 4], [0, 0, 0, 2, 2, 3, 3], [0, 0, 0, 2, 2, 3, 4, 4, 4], [0, 0, 0, 2, 2, 3, 4, 4], [0, 0, 0, 2, 2, 3, 4], [0, 0, 0, 2, 2, 3], [0, 0, 0, 2, 2, 4, 4, 4], [0, 0, 0, 2, 2, 4, 4], [0, 0, 0, 2, 2, 4], [0, 0, 0, 2, 2], [0, 0, 0, 2, 3, 3, 3, 4, 4, 4], [0, 0, 0, 2, 3, 3, 3, 4, 4], [0, 0, 0, 2, 3, 3, 3, 4], [0, 0, 0, 2, 3, 3, 3], [0, 0, 0, 2, 3, 3, 4, 4, 4], [0, 0, 0, 2, 3, 3, 4, 4], [0, 0, 0, 2, 3, 3, 4], [0, 0, 0, 2, 3, 3], [0, 0, 0, 2, 3, 4, 4, 4], [0, 0, 0, 2, 3, 4, 4], [0, 0, 0, 2, 3, 4], [0, 0, 0, 2, 3], [0, 0, 0, 2, 4, 4, 4], [0, 0, 0, 2, 4, 4], [0, 0, 0, 2, 4], [0, 0, 0, 2], [0, 0, 0, 3, 3, 3, 4, 4, 4], [0, 0, 0, 3, 3, 3, 4, 4], [0, 0, 0, 3, 3, 3, 4], [0, 0, 0, 3, 3, 3], [0, 0, 0, 3, 3, 4, 4, 4], [0, 0, 0, 3, 3, 4, 4], [0, 0, 0, 3, 3, 4], [0, 0, 0, 3, 3], [0, 0, 0, 3, 4, 4, 4], [0, 0, 0, 3, 4, 4], [0, 0, 0, 3, 4], [0, 0, 0, 3], [0, 0, 0, 4, 4, 4], [0, 0, 0, 4, 4], [0, 0, 0, 4], [0, 0, 0], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 3], [0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3, 4], [0, 0, 1, 1, 1, 2, 2, 2, 3], [0, 0, 1, 1, 1, 2, 2, 2, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 4, 4], [0, 0, 1, 1, 1, 2, 2, 2, 4], [0, 0, 1, 1, 1, 2, 2, 2], [0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4], [0, 0, 1, 1, 1, 2, 2, 3, 3, 3, 4], [0, 0, 1, 1, 1, 2, 2, 3, 3, 3], [0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4], [0, 0, 1, 1, 1, 2, 2, 3, 3, 4], [0, 0, 1, 1, 1, 2, 2, 3, 3], [0, 0, 1, 1, 1, 2, 2, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 3, 4, 4], [0, 0, 1, 1, 1, 2, 2, 3, 4], [0, 0, 1, 1, 1, 2, 2, 3], [0, 0, 1, 1, 1, 2, 2, 4, 4, 4], [0, 0, 1, 1, 1, 2, 2, 4, 4], [0, 0, 1, 1, 1, 2, 2, 4], [0, 0, 1, 1, 1, 2, 2], [0, 0, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 3, 3, 3, 4, 4], [0, 0, 1, 1, 1, 2, 3, 3, 3, 4], [0, 0, 1, 1, 1, 2, 3, 3, 3], [0, 0, 1, 1, 1, 2, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 3, 3, 4, 4], [0, 0, 1, 1, 1, 2, 3, 3, 4], [0, 0, 1, 1, 1, 2, 3, 3], [0, 0, 1, 1, 1, 2, 3, 4, 4, 4], [0, 0, 1, 1, 1, 2, 3, 4, 4], [0, 0, 1, 1, 1, 2, 3, 4], [0, 0, 1, 1, 1, 2, 3], [0, 0, 1, 1, 1, 2, 4, 4, 4], [0, 0, 1, 1, 1, 2, 4, 4], [0, 0, 1, 1, 1, 2, 4], [0, 0, 1, 1, 1, 2], [0, 0, 1, 1, 1, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 3, 3, 3, 4, 4], [0, 0, 1, 1, 1, 3, 3, 3, 4], [0, 0, 1, 1, 1, 3, 3, 3], [0, 0, 1, 1, 1, 3, 3, 4, 4, 4], [0, 0, 1, 1, 1, 3, 3, 4, 4], [0, 0, 1, 1, 1, 3, 3, 4], [0, 0, 1, 1, 1, 3, 3], [0, 0, 1, 1, 1, 3, 4, 4, 4], [0, 0, 1, 1, 1, 3, 4, 4], [0, 0, 1, 1, 1, 3, 4], [0, 0, 1, 1, 1, 3], [0, 0, 1, 1, 1, 4, 4, 4], [0, 0, 1, 1, 1, 4, 4], [0, 0, 1, 1, 1, 4], [0, 0, 1, 1, 1], [0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 1, 1, 2, 2, 2, 3, 3, 3, 4], [0, 0, 1, 1, 2, 2, 2, 3, 3, 3], [0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 1, 1, 2, 2, 2, 3, 3, 4, 4], [0, 0, 1, 1, 2, 2, 2, 3, 3, 4], [0, 0, 1, 1, 2, 2, 2, 3, 3], [0, 0, 1, 1, 2, 2, 2, 3, 4, 4, 4], [0, 0, 1, 1, 2, 2, 2, 3, 4, 4], [0, 0, 1, 1, 2, 2, 2, 3, 4], [0, 0, 1, 1, 2, 2, 2, 3], [0, 0, 1, 1, 2, 2, 2, 4, 4, 4], [0, 0, 1, 1, 2, 2, 2, 4, 4], [0, 0, 1, 1, 2, 2, 2, 4], [0, 0, 1, 1, 2, 2, 2], [0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4], [0, 0, 1, 1, 2, 2, 3, 3, 3, 4], [0, 0, 1, 1, 2, 2, 3, 3, 3], [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4], [0, 0, 1, 1, 2, 2, 3, 3, 4, 4], [0, 0, 1, 1, 2, 2, 3, 3, 4], [0, 0, 1, 1, 2, 2, 3, 3], [0, 0, 1, 1, 2, 2, 3, 4, 4, 4], [0, 0, 1, 1, 2, 2, 3, 4, 4], [0, 0, 1, 1, 2, 2, 3, 4], [0, 0, 1, 1, 2, 2, 3], [0, 0, 1, 1, 2, 2, 4, 4, 4], [0, 0, 1, 1, 2, 2, 4, 4], [0, 0, 1, 1, 2, 2, 4], [0, 0, 1, 1, 2, 2], [0, 0, 1, 1, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 2, 3, 3, 3, 4, 4], [0, 0, 1, 1, 2, 3, 3, 3, 4], [0, 0, 1, 1, 2, 3, 3, 3], [0, 0, 1, 1, 2, 3, 3, 4, 4, 4], [0, 0, 1, 1, 2, 3, 3, 4, 4], [0, 0, 1, 1, 2, 3, 3, 4], [0, 0, 1, 1, 2, 3, 3], [0, 0, 1, 1, 2, 3, 4, 4, 4], [0, 0, 1, 1, 2, 3, 4, 4], [0, 0, 1, 1, 2, 3, 4], [0, 0, 1, 1, 2, 3], [0, 0, 1, 1, 2, 4, 4, 4], [0, 0, 1, 1, 2, 4, 4], [0, 0, 1, 1, 2, 4], [0, 0, 1, 1, 2], [0, 0, 1, 1, 3, 3, 3, 4, 4, 4], [0, 0, 1, 1, 3, 3, 3, 4, 4], [0, 0, 1, 1, 3, 3, 3, 4], [0, 0, 1, 1, 3, 3, 3], [0, 0, 1, 1, 3, 3, 4, 4, 4], [0, 0, 1, 1, 3, 3, 4, 4], [0, 0, 1, 1, 3, 3, 4], [0, 0, 1, 1, 3, 3], [0, 0, 1, 1, 3, 4, 4, 4], [0, 0, 1, 1, 3, 4, 4], [0, 0, 1, 1, 3, 4], [0, 0, 1, 1, 3], [0, 0, 1, 1, 4, 4, 4], [0, 0, 1, 1, 4, 4], [0, 0, 1, 1, 4], [0, 0, 1, 1], [0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 1, 2, 2, 2, 3, 3, 3, 4], [0, 0, 1, 2, 2, 2, 3, 3, 3], [0, 0, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 1, 2, 2, 2, 3, 3, 4, 4], [0, 0, 1, 2, 2, 2, 3, 3, 4], [0, 0, 1, 2, 2, 2, 3, 3], [0, 0, 1, 2, 2, 2, 3, 4, 4, 4], [0, 0, 1, 2, 2, 2, 3, 4, 4], [0, 0, 1, 2, 2, 2, 3, 4], [0, 0, 1, 2, 2, 2, 3], [0, 0, 1, 2, 2, 2, 4, 4, 4], [0, 0, 1, 2, 2, 2, 4, 4], [0, 0, 1, 2, 2, 2, 4], [0, 0, 1, 2, 2, 2], [0, 0, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 2, 2, 3, 3, 3, 4, 4], [0, 0, 1, 2, 2, 3, 3, 3, 4], [0, 0, 1, 2, 2, 3, 3, 3], [0, 0, 1, 2, 2, 3, 3, 4, 4, 4], [0, 0, 1, 2, 2, 3, 3, 4, 4], [0, 0, 1, 2, 2, 3, 3, 4], [0, 0, 1, 2, 2, 3, 3], [0, 0, 1, 2, 2, 3, 4, 4, 4], [0, 0, 1, 2, 2, 3, 4, 4], [0, 0, 1, 2, 2, 3, 4], [0, 0, 1, 2, 2, 3], [0, 0, 1, 2, 2, 4, 4, 4], [0, 0, 1, 2, 2, 4, 4], [0, 0, 1, 2, 2, 4], [0, 0, 1, 2, 2], [0, 0, 1, 2, 3, 3, 3, 4, 4, 4], [0, 0, 1, 2, 3, 3, 3, 4, 4], [0, 0, 1, 2, 3, 3, 3, 4], [0, 0, 1, 2, 3, 3, 3], [0, 0, 1, 2, 3, 3, 4, 4, 4], [0, 0, 1, 2, 3, 3, 4, 4], [0, 0, 1, 2, 3, 3, 4], [0, 0, 1, 2, 3, 3], [0, 0, 1, 2, 3, 4, 4, 4], [0, 0, 1, 2, 3, 4, 4], [0, 0, 1, 2, 3, 4], [0, 0, 1, 2, 3], [0, 0, 1, 2, 4, 4, 4], [0, 0, 1, 2, 4, 4], [0, 0, 1, 2, 4], [0, 0, 1, 2], [0, 0, 1, 3, 3, 3, 4, 4, 4], [0, 0, 1, 3, 3, 3, 4, 4], [0, 0, 1, 3, 3, 3, 4], [0, 0, 1, 3, 3, 3], [0, 0, 1, 3, 3, 4, 4, 4], [0, 0, 1, 3, 3, 4, 4], [0, 0, 1, 3, 3, 4], [0, 0, 1, 3, 3], [0, 0, 1, 3, 4, 4, 4], [0, 0, 1, 3, 4, 4], [0, 0, 1, 3, 4], [0, 0, 1, 3], [0, 0, 1, 4, 4, 4], [0, 0, 1, 4, 4], [0, 0, 1, 4], [0, 0, 1], [0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 2, 2, 2, 3, 3, 3, 4, 4], [0, 0, 2, 2, 2, 3, 3, 3, 4], [0, 0, 2, 2, 2, 3, 3, 3], [0, 0, 2, 2, 2, 3, 3, 4, 4, 4], [0, 0, 2, 2, 2, 3, 3, 4, 4], [0, 0, 2, 2, 2, 3, 3, 4], [0, 0, 2, 2, 2, 3, 3], [0, 0, 2, 2, 2, 3, 4, 4, 4], [0, 0, 2, 2, 2, 3, 4, 4], [0, 0, 2, 2, 2, 3, 4], [0, 0, 2, 2, 2, 3], [0, 0, 2, 2, 2, 4, 4, 4], [0, 0, 2, 2, 2, 4, 4], [0, 0, 2, 2, 2, 4], [0, 0, 2, 2, 2], [0, 0, 2, 2, 3, 3, 3, 4, 4, 4], [0, 0, 2, 2, 3, 3, 3, 4, 4], [0, 0, 2, 2, 3, 3, 3, 4], [0, 0, 2, 2, 3, 3, 3], [0, 0, 2, 2, 3, 3, 4, 4, 4], [0, 0, 2, 2, 3, 3, 4, 4], [0, 0, 2, 2, 3, 3, 4], [0, 0, 2, 2, 3, 3], [0, 0, 2, 2, 3, 4, 4, 4], [0, 0, 2, 2, 3, 4, 4], [0, 0, 2, 2, 3, 4], [0, 0, 2, 2, 3], [0, 0, 2, 2, 4, 4, 4], [0, 0, 2, 2, 4, 4], [0, 0, 2, 2, 4], [0, 0, 2, 2], [0, 0, 2, 3, 3, 3, 4, 4, 4], [0, 0, 2, 3, 3, 3, 4, 4], [0, 0, 2, 3, 3, 3, 4], [0, 0, 2, 3, 3, 3], [0, 0, 2, 3, 3, 4, 4, 4], [0, 0, 2, 3, 3, 4, 4], [0, 0, 2, 3, 3, 4], [0, 0, 2, 3, 3], [0, 0, 2, 3, 4, 4, 4], [0, 0, 2, 3, 4, 4], [0, 0, 2, 3, 4], [0, 0, 2, 3], [0, 0, 2, 4, 4, 4], [0, 0, 2, 4, 4], [0, 0, 2, 4], [0, 0, 2], [0, 0, 3, 3, 3, 4, 4, 4], [0, 0, 3, 3, 3, 4, 4], [0, 0, 3, 3, 3, 4], [0, 0, 3, 3, 3], [0, 0, 3, 3, 4, 4, 4], [0, 0, 3, 3, 4, 4], [0, 0, 3, 3, 4], [0, 0, 3, 3], [0, 0, 3, 4, 4, 4], [0, 0, 3, 4, 4], [0, 0, 3, 4], [0, 0, 3], [0, 0, 4, 4, 4], [0, 0, 4, 4], [0, 0, 4], [0, 0], [0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4], [0, 1, 1, 1, 2, 2, 2, 3, 3, 3], [0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 4], [0, 1, 1, 1, 2, 2, 2, 3, 3, 4], [0, 1, 1, 1, 2, 2, 2, 3, 3], [0, 1, 1, 1, 2, 2, 2, 3, 4, 4, 4], [0, 1, 1, 1, 2, 2, 2, 3, 4, 4], [0, 1, 1, 1, 2, 2, 2, 3, 4], [0, 1, 1, 1, 2, 2, 2, 3], [0, 1, 1, 1, 2, 2, 2, 4, 4, 4], [0, 1, 1, 1, 2, 2, 2, 4, 4], [0, 1, 1, 1, 2, 2, 2, 4], [0, 1, 1, 1, 2, 2, 2], [0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4], [0, 1, 1, 1, 2, 2, 3, 3, 3, 4], [0, 1, 1, 1, 2, 2, 3, 3, 3], [0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4], [0, 1, 1, 1, 2, 2, 3, 3, 4, 4], [0, 1, 1, 1, 2, 2, 3, 3, 4], [0, 1, 1, 1, 2, 2, 3, 3], [0, 1, 1, 1, 2, 2, 3, 4, 4, 4], [0, 1, 1, 1, 2, 2, 3, 4, 4], [0, 1, 1, 1, 2, 2, 3, 4], [0, 1, 1, 1, 2, 2, 3], [0, 1, 1, 1, 2, 2, 4, 4, 4], [0, 1, 1, 1, 2, 2, 4, 4], [0, 1, 1, 1, 2, 2, 4], [0, 1, 1, 1, 2, 2], [0, 1, 1, 1, 2, 3, 3, 3, 4, 4, 4], [0, 1, 1, 1, 2, 3, 3, 3, 4, 4], [0, 1, 1, 1, 2, 3, 3, 3, 4], [0, 1, 1, 1, 2, 3, 3, 3], [0, 1, 1, 1, 2, 3, 3, 4, 4, 4], [0, 1, 1, 1, 2, 3, 3, 4, 4], [0, 1, 1, 1, 2, 3, 3, 4], [0, 1, 1, 1, 2, 3, 3], [0, 1, 1, 1, 2, 3, 4, 4, 4], [0, 1, 1, 1, 2, 3, 4, 4], [0, 1, 1, 1, 2, 3, 4], [0, 1, 1, 1, 2, 3], [0, 1, 1, 1, 2, 4, 4, 4], [0, 1, 1, 1, 2, 4, 4], [0, 1, 1, 1, 2, 4], [0, 1, 1, 1, 2], [0, 1, 1, 1, 3, 3, 3, 4, 4, 4], [0, 1, 1, 1, 3, 3, 3, 4, 4], [0, 1, 1, 1, 3, 3, 3, 4], [0, 1, 1, 1, 3, 3, 3], [0, 1, 1, 1, 3, 3, 4, 4, 4], [0, 1, 1, 1, 3, 3, 4, 4], [0, 1, 1, 1, 3, 3, 4], [0, 1, 1, 1, 3, 3], [0, 1, 1, 1, 3, 4, 4, 4], [0, 1, 1, 1, 3, 4, 4], [0, 1, 1, 1, 3, 4], [0, 1, 1, 1, 3], [0, 1, 1, 1, 4, 4, 4], [0, 1, 1, 1, 4, 4], [0, 1, 1, 1, 4], [0, 1, 1, 1], [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 1, 1, 2, 2, 2, 3, 3, 3, 4], [0, 1, 1, 2, 2, 2, 3, 3, 3], [0, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 1, 1, 2, 2, 2, 3, 3, 4, 4], [0, 1, 1, 2, 2, 2, 3, 3, 4], [0, 1, 1, 2, 2, 2, 3, 3], [0, 1, 1, 2, 2, 2, 3, 4, 4, 4], [0, 1, 1, 2, 2, 2, 3, 4, 4], [0, 1, 1, 2, 2, 2, 3, 4], [0, 1, 1, 2, 2, 2, 3], [0, 1, 1, 2, 2, 2, 4, 4, 4], [0, 1, 1, 2, 2, 2, 4, 4], [0, 1, 1, 2, 2, 2, 4], [0, 1, 1, 2, 2, 2], [0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 1, 1, 2, 2, 3, 3, 3, 4, 4], [0, 1, 1, 2, 2, 3, 3, 3, 4], [0, 1, 1, 2, 2, 3, 3, 3], [0, 1, 1, 2, 2, 3, 3, 4, 4, 4], [0, 1, 1, 2, 2, 3, 3, 4, 4], [0, 1, 1, 2, 2, 3, 3, 4], [0, 1, 1, 2, 2, 3, 3], [0, 1, 1, 2, 2, 3, 4, 4, 4], [0, 1, 1, 2, 2, 3, 4, 4], [0, 1, 1, 2, 2, 3, 4], [0, 1, 1, 2, 2, 3], [0, 1, 1, 2, 2, 4, 4, 4], [0, 1, 1, 2, 2, 4, 4], [0, 1, 1, 2, 2, 4], [0, 1, 1, 2, 2], [0, 1, 1, 2, 3, 3, 3, 4, 4, 4], [0, 1, 1, 2, 3, 3, 3, 4, 4], [0, 1, 1, 2, 3, 3, 3, 4], [0, 1, 1, 2, 3, 3, 3], [0, 1, 1, 2, 3, 3, 4, 4, 4], [0, 1, 1, 2, 3, 3, 4, 4], [0, 1, 1, 2, 3, 3, 4], [0, 1, 1, 2, 3, 3], [0, 1, 1, 2, 3, 4, 4, 4], [0, 1, 1, 2, 3, 4, 4], [0, 1, 1, 2, 3, 4], [0, 1, 1, 2, 3], [0, 1, 1, 2, 4, 4, 4], [0, 1, 1, 2, 4, 4], [0, 1, 1, 2, 4], [0, 1, 1, 2], [0, 1, 1, 3, 3, 3, 4, 4, 4], [0, 1, 1, 3, 3, 3, 4, 4], [0, 1, 1, 3, 3, 3, 4], [0, 1, 1, 3, 3, 3], [0, 1, 1, 3, 3, 4, 4, 4], [0, 1, 1, 3, 3, 4, 4], [0, 1, 1, 3, 3, 4], [0, 1, 1, 3, 3], [0, 1, 1, 3, 4, 4, 4], [0, 1, 1, 3, 4, 4], [0, 1, 1, 3, 4], [0, 1, 1, 3], [0, 1, 1, 4, 4, 4], [0, 1, 1, 4, 4], [0, 1, 1, 4], [0, 1, 1], [0, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 1, 2, 2, 2, 3, 3, 3, 4, 4], [0, 1, 2, 2, 2, 3, 3, 3, 4], [0, 1, 2, 2, 2, 3, 3, 3], [0, 1, 2, 2, 2, 3, 3, 4, 4, 4], [0, 1, 2, 2, 2, 3, 3, 4, 4], [0, 1, 2, 2, 2, 3, 3, 4], [0, 1, 2, 2, 2, 3, 3], [0, 1, 2, 2, 2, 3, 4, 4, 4], [0, 1, 2, 2, 2, 3, 4, 4], [0, 1, 2, 2, 2, 3, 4], [0, 1, 2, 2, 2, 3], [0, 1, 2, 2, 2, 4, 4, 4], [0, 1, 2, 2, 2, 4, 4], [0, 1, 2, 2, 2, 4], [0, 1, 2, 2, 2], [0, 1, 2, 2, 3, 3, 3, 4, 4, 4], [0, 1, 2, 2, 3, 3, 3, 4, 4], [0, 1, 2, 2, 3, 3, 3, 4], [0, 1, 2, 2, 3, 3, 3], [0, 1, 2, 2, 3, 3, 4, 4, 4], [0, 1, 2, 2, 3, 3, 4, 4], [0, 1, 2, 2, 3, 3, 4], [0, 1, 2, 2, 3, 3], [0, 1, 2, 2, 3, 4, 4, 4], [0, 1, 2, 2, 3, 4, 4], [0, 1, 2, 2, 3, 4], [0, 1, 2, 2, 3], [0, 1, 2, 2, 4, 4, 4], [0, 1, 2, 2, 4, 4], [0, 1, 2, 2, 4], [0, 1, 2, 2], [0, 1, 2, 3, 3, 3, 4, 4, 4], [0, 1, 2, 3, 3, 3, 4, 4], [0, 1, 2, 3, 3, 3, 4], [0, 1, 2, 3, 3, 3], [0, 1, 2, 3, 3, 4, 4, 4], [0, 1, 2, 3, 3, 4, 4], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 3], [0, 1, 2, 3, 4, 4, 4], [0, 1, 2, 3, 4, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3], [0, 1, 2, 4, 4, 4], [0, 1, 2, 4, 4], [0, 1, 2, 4], [0, 1, 2], [0, 1, 3, 3, 3, 4, 4, 4], [0, 1, 3, 3, 3, 4, 4], [0, 1, 3, 3, 3, 4], [0, 1, 3, 3, 3], [0, 1, 3, 3, 4, 4, 4], [0, 1, 3, 3, 4, 4], [0, 1, 3, 3, 4], [0, 1, 3, 3], [0, 1, 3, 4, 4, 4], [0, 1, 3, 4, 4], [0, 1, 3, 4], [0, 1, 3], [0, 1, 4, 4, 4], [0, 1, 4, 4], [0, 1, 4], [0, 1], [0, 2, 2, 2, 3, 3, 3, 4, 4, 4], [0, 2, 2, 2, 3, 3, 3, 4, 4], [0, 2, 2, 2, 3, 3, 3, 4], [0, 2, 2, 2, 3, 3, 3], [0, 2, 2, 2, 3, 3, 4, 4, 4], [0, 2, 2, 2, 3, 3, 4, 4], [0, 2, 2, 2, 3, 3, 4], [0, 2, 2, 2, 3, 3], [0, 2, 2, 2, 3, 4, 4, 4], [0, 2, 2, 2, 3, 4, 4], [0, 2, 2, 2, 3, 4], [0, 2, 2, 2, 3], [0, 2, 2, 2, 4, 4, 4], [0, 2, 2, 2, 4, 4], [0, 2, 2, 2, 4], [0, 2, 2, 2], [0, 2, 2, 3, 3, 3, 4, 4, 4], [0, 2, 2, 3, 3, 3, 4, 4], [0, 2, 2, 3, 3, 3, 4], [0, 2, 2, 3, 3, 3], [0, 2, 2, 3, 3, 4, 4, 4], [0, 2, 2, 3, 3, 4, 4], [0, 2, 2, 3, 3, 4], [0, 2, 2, 3, 3], [0, 2, 2, 3, 4, 4, 4], [0, 2, 2, 3, 4, 4], [0, 2, 2, 3, 4], [0, 2, 2, 3], [0, 2, 2, 4, 4, 4], [0, 2, 2, 4, 4], [0, 2, 2, 4], [0, 2, 2], [0, 2, 3, 3, 3, 4, 4, 4], [0, 2, 3, 3, 3, 4, 4], [0, 2, 3, 3, 3, 4], [0, 2, 3, 3, 3], [0, 2, 3, 3, 4, 4, 4], [0, 2, 3, 3, 4, 4], [0, 2, 3, 3, 4], [0, 2, 3, 3], [0, 2, 3, 4, 4, 4], [0, 2, 3, 4, 4], [0, 2, 3, 4], [0, 2, 3], [0, 2, 4, 4, 4], [0, 2, 4, 4], [0, 2, 4], [0, 2], [0, 3, 3, 3, 4, 4, 4], [0, 3, 3, 3, 4, 4], [0, 3, 3, 3, 4], [0, 3, 3, 3], [0, 3, 3, 4, 4, 4], [0, 3, 3, 4, 4], [0, 3, 3, 4], [0, 3, 3], [0, 3, 4, 4, 4], [0, 3, 4, 4], [0, 3, 4], [0, 3], [0, 4, 4, 4], [0, 4, 4], [0, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3, 4], [1, 1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 1, 2, 2, 2, 3, 3], [1, 1, 1, 2, 2, 2, 3, 4, 4, 4], [1, 1, 1, 2, 2, 2, 3, 4, 4], [1, 1, 1, 2, 2, 2, 3, 4], [1, 1, 1, 2, 2, 2, 3], [1, 1, 1, 2, 2, 2, 4, 4, 4], [1, 1, 1, 2, 2, 2, 4, 4], [1, 1, 1, 2, 2, 2, 4], [1, 1, 1, 2, 2, 2], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 3, 3, 3, 4, 4], [1, 1, 1, 2, 2, 3, 3, 3, 4], [1, 1, 1, 2, 2, 3, 3, 3], [1, 1, 1, 2, 2, 3, 3, 4, 4, 4], [1, 1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 1, 2, 2, 3, 3, 4], [1, 1, 1, 2, 2, 3, 3], [1, 1, 1, 2, 2, 3, 4, 4, 4], [1, 1, 1, 2, 2, 3, 4, 4], [1, 1, 1, 2, 2, 3, 4], [1, 1, 1, 2, 2, 3], [1, 1, 1, 2, 2, 4, 4, 4], [1, 1, 1, 2, 2, 4, 4], [1, 1, 1, 2, 2, 4], [1, 1, 1, 2, 2], [1, 1, 1, 2, 3, 3, 3, 4, 4, 4], [1, 1, 1, 2, 3, 3, 3, 4, 4], [1, 1, 1, 2, 3, 3, 3, 4], [1, 1, 1, 2, 3, 3, 3], [1, 1, 1, 2, 3, 3, 4, 4, 4], [1, 1, 1, 2, 3, 3, 4, 4], [1, 1, 1, 2, 3, 3, 4], [1, 1, 1, 2, 3, 3], [1, 1, 1, 2, 3, 4, 4, 4], [1, 1, 1, 2, 3, 4, 4], [1, 1, 1, 2, 3, 4], [1, 1, 1, 2, 3], [1, 1, 1, 2, 4, 4, 4], [1, 1, 1, 2, 4, 4], [1, 1, 1, 2, 4], [1, 1, 1, 2], [1, 1, 1, 3, 3, 3, 4, 4, 4], [1, 1, 1, 3, 3, 3, 4, 4], [1, 1, 1, 3, 3, 3, 4], [1, 1, 1, 3, 3, 3], [1, 1, 1, 3, 3, 4, 4, 4], [1, 1, 1, 3, 3, 4, 4], [1, 1, 1, 3, 3, 4], [1, 1, 1, 3, 3], [1, 1, 1, 3, 4, 4, 4], [1, 1, 1, 3, 4, 4], [1, 1, 1, 3, 4], [1, 1, 1, 3], [1, 1, 1, 4, 4, 4], [1, 1, 1, 4, 4], [1, 1, 1, 4], [1, 1, 1], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 2, 2, 2, 3, 3, 3, 4, 4], [1, 1, 2, 2, 2, 3, 3, 3, 4], [1, 1, 2, 2, 2, 3, 3, 3], [1, 1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 1, 2, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 2, 3, 3, 4], [1, 1, 2, 2, 2, 3, 3], [1, 1, 2, 2, 2, 3, 4, 4, 4], [1, 1, 2, 2, 2, 3, 4, 4], [1, 1, 2, 2, 2, 3, 4], [1, 1, 2, 2, 2, 3], [1, 1, 2, 2, 2, 4, 4, 4], [1, 1, 2, 2, 2, 4, 4], [1, 1, 2, 2, 2, 4], [1, 1, 2, 2, 2], [1, 1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 1, 2, 2, 3, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 3, 4], [1, 1, 2, 2, 3, 3, 3], [1, 1, 2, 2, 3, 3, 4, 4, 4], [1, 1, 2, 2, 3, 3, 4, 4], [1, 1, 2, 2, 3, 3, 4], [1, 1, 2, 2, 3, 3], [1, 1, 2, 2, 3, 4, 4, 4], [1, 1, 2, 2, 3, 4, 4], [1, 1, 2, 2, 3, 4], [1, 1, 2, 2, 3], [1, 1, 2, 2, 4, 4, 4], [1, 1, 2, 2, 4, 4], [1, 1, 2, 2, 4], [1, 1, 2, 2], [1, 1, 2, 3, 3, 3, 4, 4, 4], [1, 1, 2, 3, 3, 3, 4, 4], [1, 1, 2, 3, 3, 3, 4], [1, 1, 2, 3, 3, 3], [1, 1, 2, 3, 3, 4, 4, 4], [1, 1, 2, 3, 3, 4, 4], [1, 1, 2, 3, 3, 4], [1, 1, 2, 3, 3], [1, 1, 2, 3, 4, 4, 4], [1, 1, 2, 3, 4, 4], [1, 1, 2, 3, 4], [1, 1, 2, 3], [1, 1, 2, 4, 4, 4], [1, 1, 2, 4, 4], [1, 1, 2, 4], [1, 1, 2], [1, 1, 3, 3, 3, 4, 4, 4], [1, 1, 3, 3, 3, 4, 4], [1, 1, 3, 3, 3, 4], [1, 1, 3, 3, 3], [1, 1, 3, 3, 4, 4, 4], [1, 1, 3, 3, 4, 4], [1, 1, 3, 3, 4], [1, 1, 3, 3], [1, 1, 3, 4, 4, 4], [1, 1, 3, 4, 4], [1, 1, 3, 4], [1, 1, 3], [1, 1, 4, 4, 4], [1, 1, 4, 4], [1, 1, 4], [1, 1], [1, 2, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 3, 4], [1, 2, 2, 2, 3, 3, 3], [1, 2, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 2, 3, 3, 4, 4], [1, 2, 2, 2, 3, 3, 4], [1, 2, 2, 2, 3, 3], [1, 2, 2, 2, 3, 4, 4, 4], [1, 2, 2, 2, 3, 4, 4], [1, 2, 2, 2, 3, 4], [1, 2, 2, 2, 3], [1, 2, 2, 2, 4, 4, 4], [1, 2, 2, 2, 4, 4], [1, 2, 2, 2, 4], [1, 2, 2, 2], [1, 2, 2, 3, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 3, 4, 4], [1, 2, 2, 3, 3, 3, 4], [1, 2, 2, 3, 3, 3], [1, 2, 2, 3, 3, 4, 4, 4], [1, 2, 2, 3, 3, 4, 4], [1, 2, 2, 3, 3, 4], [1, 2, 2, 3, 3], [1, 2, 2, 3, 4, 4, 4], [1, 2, 2, 3, 4, 4], [1, 2, 2, 3, 4], [1, 2, 2, 3], [1, 2, 2, 4, 4, 4], [1, 2, 2, 4, 4], [1, 2, 2, 4], [1, 2, 2], [1, 2, 3, 3, 3, 4, 4, 4], [1, 2, 3, 3, 3, 4, 4], [1, 2, 3, 3, 3, 4], [1, 2, 3, 3, 3], [1, 2, 3, 3, 4, 4, 4], [1, 2, 3, 3, 4, 4], [1, 2, 3, 3, 4], [1, 2, 3, 3], [1, 2, 3, 4, 4, 4], [1, 2, 3, 4, 4], [1, 2, 3, 4], [1, 2, 3], [1, 2, 4, 4, 4], [1, 2, 4, 4], [1, 2, 4], [1, 2], [1, 3, 3, 3, 4, 4, 4], [1, 3, 3, 3, 4, 4], [1, 3, 3, 3, 4], [1, 3, 3, 3], [1, 3, 3, 4, 4, 4], [1, 3, 3, 4, 4], [1, 3, 3, 4], [1, 3, 3], [1, 3, 4, 4, 4], [1, 3, 4, 4], [1, 3, 4], [1, 3], [1, 4, 4, 4], [1, 4, 4], [1, 4], [2, 2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 2, 3, 3, 3, 4, 4], [2, 2, 2, 3, 3, 3, 4], [2, 2, 2, 3, 3, 3], [2, 2, 2, 3, 3, 4, 4, 4], [2, 2, 2, 3, 3, 4, 4], [2, 2, 2, 3, 3, 4], [2, 2, 2, 3, 3], [2, 2, 2, 3, 4, 4, 4], [2, 2, 2, 3, 4, 4], [2, 2, 2, 3, 4], [2, 2, 2, 3], [2, 2, 2, 4, 4, 4], [2, 2, 2, 4, 4], [2, 2, 2, 4], [2, 2, 2], [2, 2, 3, 3, 3, 4, 4, 4], [2, 2, 3, 3, 3, 4, 4], [2, 2, 3, 3, 3, 4], [2, 2, 3, 3, 3], [2, 2, 3, 3, 4, 4, 4], [2, 2, 3, 3, 4, 4], [2, 2, 3, 3, 4], [2, 2, 3, 3], [2, 2, 3, 4, 4, 4], [2, 2, 3, 4, 4], [2, 2, 3, 4], [2, 2, 3], [2, 2, 4, 4, 4], [2, 2, 4, 4], [2, 2, 4], [2, 2], [2, 3, 3, 3, 4, 4, 4], [2, 3, 3, 3, 4, 4], [2, 3, 3, 3, 4], [2, 3, 3, 3], [2, 3, 3, 4, 4, 4], [2, 3, 3, 4, 4], [2, 3, 3, 4], [2, 3, 3], [2, 3, 4, 4, 4], [2, 3, 4, 4], [2, 3, 4], [2, 3], [2, 4, 4, 4], [2, 4, 4], [2, 4], [3, 3, 3, 4, 4, 4], [3, 3, 3, 4, 4], [3, 3, 3, 4], [3, 3, 3], [3, 3, 4, 4, 4], [3, 3, 4, 4], [3, 3, 4], [3, 3], [3, 4, 4, 4], [3, 4, 4], [3, 4], [4, 4, 4], [4, 4]])\n assert answers_match(candidate(nums=[100, -100, 100, -100, 100]), [[100, 100, 100], [-100, 100, 100], [-100, -100, 100], [-100, -100], [100, 100], [-100, 100]])\n assert answers_match(candidate(nums=[-10, -5, -3, -1, 0, 1, 3, 5, 7, 9]), [[-10, -5, -3, -1, 0, 1, 3, 5, 7, 9], [-10, -5, -3, -1, 0, 1, 3, 5, 7], [-10, -5, -3, -1, 0, 1, 3, 5, 9], [-10, -5, -3, -1, 0, 1, 3, 5], [-10, -5, -3, -1, 0, 1, 3, 7, 9], [-10, -5, -3, -1, 0, 1, 3, 7], [-10, -5, -3, -1, 0, 1, 3, 9], [-10, -5, -3, -1, 0, 1, 3], [-10, -5, -3, -1, 0, 1, 5, 7, 9], [-10, -5, -3, -1, 0, 1, 5, 7], [-10, -5, -3, -1, 0, 1, 5, 9], [-10, -5, -3, -1, 0, 1, 5], [-10, -5, -3, -1, 0, 1, 7, 9], [-10, -5, -3, -1, 0, 1, 7], [-10, -5, -3, -1, 0, 1, 9], [-10, -5, -3, -1, 0, 1], [-10, -5, -3, -1, 0, 3, 5, 7, 9], [-10, -5, -3, -1, 0, 3, 5, 7], [-10, -5, -3, -1, 0, 3, 5, 9], [-10, -5, -3, -1, 0, 3, 5], [-10, -5, -3, -1, 0, 3, 7, 9], [-10, -5, -3, -1, 0, 3, 7], [-10, -5, -3, -1, 0, 3, 9], [-10, -5, -3, -1, 0, 3], [-10, -5, -3, -1, 0, 5, 7, 9], [-10, -5, -3, -1, 0, 5, 7], [-10, -5, -3, -1, 0, 5, 9], [-10, -5, -3, -1, 0, 5], [-10, -5, -3, -1, 0, 7, 9], [-10, -5, -3, -1, 0, 7], [-10, -5, -3, -1, 0, 9], [-10, -5, -3, -1, 0], [-10, -5, -3, -1, 1, 3, 5, 7, 9], [-10, -5, -3, -1, 1, 3, 5, 7], [-10, -5, -3, -1, 1, 3, 5, 9], [-10, -5, -3, -1, 1, 3, 5], [-10, -5, -3, -1, 1, 3, 7, 9], [-10, -5, -3, -1, 1, 3, 7], [-10, -5, -3, -1, 1, 3, 9], [-10, -5, -3, -1, 1, 3], [-10, -5, -3, -1, 1, 5, 7, 9], [-10, -5, -3, -1, 1, 5, 7], [-10, -5, -3, -1, 1, 5, 9], [-10, -5, -3, -1, 1, 5], [-10, -5, -3, -1, 1, 7, 9], [-10, -5, -3, -1, 1, 7], [-10, -5, -3, -1, 1, 9], [-10, -5, -3, -1, 1], [-10, -5, -3, -1, 3, 5, 7, 9], [-10, -5, -3, -1, 3, 5, 7], [-10, -5, -3, -1, 3, 5, 9], [-10, -5, -3, -1, 3, 5], [-10, -5, -3, -1, 3, 7, 9], [-10, -5, -3, -1, 3, 7], [-10, -5, -3, -1, 3, 9], [-10, -5, -3, -1, 3], [-10, -5, -3, -1, 5, 7, 9], [-10, -5, -3, -1, 5, 7], [-10, -5, -3, -1, 5, 9], [-10, -5, -3, -1, 5], [-10, -5, -3, -1, 7, 9], [-10, -5, -3, -1, 7], [-10, -5, -3, -1, 9], [-10, -5, -3, -1], [-10, -5, -3, 0, 1, 3, 5, 7, 9], [-10, -5, -3, 0, 1, 3, 5, 7], [-10, -5, -3, 0, 1, 3, 5, 9], [-10, -5, -3, 0, 1, 3, 5], [-10, -5, -3, 0, 1, 3, 7, 9], [-10, -5, -3, 0, 1, 3, 7], [-10, -5, -3, 0, 1, 3, 9], [-10, -5, -3, 0, 1, 3], [-10, -5, -3, 0, 1, 5, 7, 9], [-10, -5, -3, 0, 1, 5, 7], [-10, -5, -3, 0, 1, 5, 9], [-10, -5, -3, 0, 1, 5], [-10, -5, -3, 0, 1, 7, 9], [-10, -5, -3, 0, 1, 7], [-10, -5, -3, 0, 1, 9], [-10, -5, -3, 0, 1], [-10, -5, -3, 0, 3, 5, 7, 9], [-10, -5, -3, 0, 3, 5, 7], [-10, -5, -3, 0, 3, 5, 9], [-10, -5, -3, 0, 3, 5], [-10, -5, -3, 0, 3, 7, 9], [-10, -5, -3, 0, 3, 7], [-10, -5, -3, 0, 3, 9], [-10, -5, -3, 0, 3], [-10, -5, -3, 0, 5, 7, 9], [-10, -5, -3, 0, 5, 7], [-10, -5, -3, 0, 5, 9], [-10, -5, -3, 0, 5], [-10, -5, -3, 0, 7, 9], [-10, -5, -3, 0, 7], [-10, -5, -3, 0, 9], [-10, -5, -3, 0], [-10, -5, -3, 1, 3, 5, 7, 9], [-10, -5, -3, 1, 3, 5, 7], [-10, -5, -3, 1, 3, 5, 9], [-10, -5, -3, 1, 3, 5], [-10, -5, -3, 1, 3, 7, 9], [-10, -5, -3, 1, 3, 7], [-10, -5, -3, 1, 3, 9], [-10, -5, -3, 1, 3], [-10, -5, -3, 1, 5, 7, 9], [-10, -5, -3, 1, 5, 7], [-10, -5, -3, 1, 5, 9], [-10, -5, -3, 1, 5], [-10, -5, -3, 1, 7, 9], [-10, -5, -3, 1, 7], [-10, -5, -3, 1, 9], [-10, -5, -3, 1], [-10, -5, -3, 3, 5, 7, 9], [-10, -5, -3, 3, 5, 7], [-10, -5, -3, 3, 5, 9], [-10, -5, -3, 3, 5], [-10, -5, -3, 3, 7, 9], [-10, -5, -3, 3, 7], [-10, -5, -3, 3, 9], [-10, -5, -3, 3], [-10, -5, -3, 5, 7, 9], [-10, -5, -3, 5, 7], [-10, -5, -3, 5, 9], [-10, -5, -3, 5], [-10, -5, -3, 7, 9], [-10, -5, -3, 7], [-10, -5, -3, 9], [-10, -5, -3], [-10, -5, -1, 0, 1, 3, 5, 7, 9], [-10, -5, -1, 0, 1, 3, 5, 7], [-10, -5, -1, 0, 1, 3, 5, 9], [-10, -5, -1, 0, 1, 3, 5], [-10, -5, -1, 0, 1, 3, 7, 9], [-10, -5, -1, 0, 1, 3, 7], [-10, -5, -1, 0, 1, 3, 9], [-10, -5, -1, 0, 1, 3], [-10, -5, -1, 0, 1, 5, 7, 9], [-10, -5, -1, 0, 1, 5, 7], [-10, -5, -1, 0, 1, 5, 9], [-10, -5, -1, 0, 1, 5], [-10, -5, -1, 0, 1, 7, 9], [-10, -5, -1, 0, 1, 7], [-10, -5, -1, 0, 1, 9], [-10, -5, -1, 0, 1], [-10, -5, -1, 0, 3, 5, 7, 9], [-10, -5, -1, 0, 3, 5, 7], [-10, -5, -1, 0, 3, 5, 9], [-10, -5, -1, 0, 3, 5], [-10, -5, -1, 0, 3, 7, 9], [-10, -5, -1, 0, 3, 7], [-10, -5, -1, 0, 3, 9], [-10, -5, -1, 0, 3], [-10, -5, -1, 0, 5, 7, 9], [-10, -5, -1, 0, 5, 7], [-10, -5, -1, 0, 5, 9], [-10, -5, -1, 0, 5], [-10, -5, -1, 0, 7, 9], [-10, -5, -1, 0, 7], [-10, -5, -1, 0, 9], [-10, -5, -1, 0], [-10, -5, -1, 1, 3, 5, 7, 9], [-10, -5, -1, 1, 3, 5, 7], [-10, -5, -1, 1, 3, 5, 9], [-10, -5, -1, 1, 3, 5], [-10, -5, -1, 1, 3, 7, 9], [-10, -5, -1, 1, 3, 7], [-10, -5, -1, 1, 3, 9], [-10, -5, -1, 1, 3], [-10, -5, -1, 1, 5, 7, 9], [-10, -5, -1, 1, 5, 7], [-10, -5, -1, 1, 5, 9], [-10, -5, -1, 1, 5], [-10, -5, -1, 1, 7, 9], [-10, -5, -1, 1, 7], [-10, -5, -1, 1, 9], [-10, -5, -1, 1], [-10, -5, -1, 3, 5, 7, 9], [-10, -5, -1, 3, 5, 7], [-10, -5, -1, 3, 5, 9], [-10, -5, -1, 3, 5], [-10, -5, -1, 3, 7, 9], [-10, -5, -1, 3, 7], [-10, -5, -1, 3, 9], [-10, -5, -1, 3], [-10, -5, -1, 5, 7, 9], [-10, -5, -1, 5, 7], [-10, -5, -1, 5, 9], [-10, -5, -1, 5], [-10, -5, -1, 7, 9], [-10, -5, -1, 7], [-10, -5, -1, 9], [-10, -5, -1], [-10, -5, 0, 1, 3, 5, 7, 9], [-10, -5, 0, 1, 3, 5, 7], [-10, -5, 0, 1, 3, 5, 9], [-10, -5, 0, 1, 3, 5], [-10, -5, 0, 1, 3, 7, 9], [-10, -5, 0, 1, 3, 7], [-10, -5, 0, 1, 3, 9], [-10, -5, 0, 1, 3], [-10, -5, 0, 1, 5, 7, 9], [-10, -5, 0, 1, 5, 7], [-10, -5, 0, 1, 5, 9], [-10, -5, 0, 1, 5], [-10, -5, 0, 1, 7, 9], [-10, -5, 0, 1, 7], [-10, -5, 0, 1, 9], [-10, -5, 0, 1], [-10, -5, 0, 3, 5, 7, 9], [-10, -5, 0, 3, 5, 7], [-10, -5, 0, 3, 5, 9], [-10, -5, 0, 3, 5], [-10, -5, 0, 3, 7, 9], [-10, -5, 0, 3, 7], [-10, -5, 0, 3, 9], [-10, -5, 0, 3], [-10, -5, 0, 5, 7, 9], [-10, -5, 0, 5, 7], [-10, -5, 0, 5, 9], [-10, -5, 0, 5], [-10, -5, 0, 7, 9], [-10, -5, 0, 7], [-10, -5, 0, 9], [-10, -5, 0], [-10, -5, 1, 3, 5, 7, 9], [-10, -5, 1, 3, 5, 7], [-10, -5, 1, 3, 5, 9], [-10, -5, 1, 3, 5], [-10, -5, 1, 3, 7, 9], [-10, -5, 1, 3, 7], [-10, -5, 1, 3, 9], [-10, -5, 1, 3], [-10, -5, 1, 5, 7, 9], [-10, -5, 1, 5, 7], [-10, -5, 1, 5, 9], [-10, -5, 1, 5], [-10, -5, 1, 7, 9], [-10, -5, 1, 7], [-10, -5, 1, 9], [-10, -5, 1], [-10, -5, 3, 5, 7, 9], [-10, -5, 3, 5, 7], [-10, -5, 3, 5, 9], [-10, -5, 3, 5], [-10, -5, 3, 7, 9], [-10, -5, 3, 7], [-10, -5, 3, 9], [-10, -5, 3], [-10, -5, 5, 7, 9], [-10, -5, 5, 7], [-10, -5, 5, 9], [-10, -5, 5], [-10, -5, 7, 9], [-10, -5, 7], [-10, -5, 9], [-10, -5], [-10, -3, -1, 0, 1, 3, 5, 7, 9], [-10, -3, -1, 0, 1, 3, 5, 7], [-10, -3, -1, 0, 1, 3, 5, 9], [-10, -3, -1, 0, 1, 3, 5], [-10, -3, -1, 0, 1, 3, 7, 9], [-10, -3, -1, 0, 1, 3, 7], [-10, -3, -1, 0, 1, 3, 9], [-10, -3, -1, 0, 1, 3], [-10, -3, -1, 0, 1, 5, 7, 9], [-10, -3, -1, 0, 1, 5, 7], [-10, -3, -1, 0, 1, 5, 9], [-10, -3, -1, 0, 1, 5], [-10, -3, -1, 0, 1, 7, 9], [-10, -3, -1, 0, 1, 7], [-10, -3, -1, 0, 1, 9], [-10, -3, -1, 0, 1], [-10, -3, -1, 0, 3, 5, 7, 9], [-10, -3, -1, 0, 3, 5, 7], [-10, -3, -1, 0, 3, 5, 9], [-10, -3, -1, 0, 3, 5], [-10, -3, -1, 0, 3, 7, 9], [-10, -3, -1, 0, 3, 7], [-10, -3, -1, 0, 3, 9], [-10, -3, -1, 0, 3], [-10, -3, -1, 0, 5, 7, 9], [-10, -3, -1, 0, 5, 7], [-10, -3, -1, 0, 5, 9], [-10, -3, -1, 0, 5], [-10, -3, -1, 0, 7, 9], [-10, -3, -1, 0, 7], [-10, -3, -1, 0, 9], [-10, -3, -1, 0], [-10, -3, -1, 1, 3, 5, 7, 9], [-10, -3, -1, 1, 3, 5, 7], [-10, -3, -1, 1, 3, 5, 9], [-10, -3, -1, 1, 3, 5], [-10, -3, -1, 1, 3, 7, 9], [-10, -3, -1, 1, 3, 7], [-10, -3, -1, 1, 3, 9], [-10, -3, -1, 1, 3], [-10, -3, -1, 1, 5, 7, 9], [-10, -3, -1, 1, 5, 7], [-10, -3, -1, 1, 5, 9], [-10, -3, -1, 1, 5], [-10, -3, -1, 1, 7, 9], [-10, -3, -1, 1, 7], [-10, -3, -1, 1, 9], [-10, -3, -1, 1], [-10, -3, -1, 3, 5, 7, 9], [-10, -3, -1, 3, 5, 7], [-10, -3, -1, 3, 5, 9], [-10, -3, -1, 3, 5], [-10, -3, -1, 3, 7, 9], [-10, -3, -1, 3, 7], [-10, -3, -1, 3, 9], [-10, -3, -1, 3], [-10, -3, -1, 5, 7, 9], [-10, -3, -1, 5, 7], [-10, -3, -1, 5, 9], [-10, -3, -1, 5], [-10, -3, -1, 7, 9], [-10, -3, -1, 7], [-10, -3, -1, 9], [-10, -3, -1], [-10, -3, 0, 1, 3, 5, 7, 9], [-10, -3, 0, 1, 3, 5, 7], [-10, -3, 0, 1, 3, 5, 9], [-10, -3, 0, 1, 3, 5], [-10, -3, 0, 1, 3, 7, 9], [-10, -3, 0, 1, 3, 7], [-10, -3, 0, 1, 3, 9], [-10, -3, 0, 1, 3], [-10, -3, 0, 1, 5, 7, 9], [-10, -3, 0, 1, 5, 7], [-10, -3, 0, 1, 5, 9], [-10, -3, 0, 1, 5], [-10, -3, 0, 1, 7, 9], [-10, -3, 0, 1, 7], [-10, -3, 0, 1, 9], [-10, -3, 0, 1], [-10, -3, 0, 3, 5, 7, 9], [-10, -3, 0, 3, 5, 7], [-10, -3, 0, 3, 5, 9], [-10, -3, 0, 3, 5], [-10, -3, 0, 3, 7, 9], [-10, -3, 0, 3, 7], [-10, -3, 0, 3, 9], [-10, -3, 0, 3], [-10, -3, 0, 5, 7, 9], [-10, -3, 0, 5, 7], [-10, -3, 0, 5, 9], [-10, -3, 0, 5], [-10, -3, 0, 7, 9], [-10, -3, 0, 7], [-10, -3, 0, 9], [-10, -3, 0], [-10, -3, 1, 3, 5, 7, 9], [-10, -3, 1, 3, 5, 7], [-10, -3, 1, 3, 5, 9], [-10, -3, 1, 3, 5], [-10, -3, 1, 3, 7, 9], [-10, -3, 1, 3, 7], [-10, -3, 1, 3, 9], [-10, -3, 1, 3], [-10, -3, 1, 5, 7, 9], [-10, -3, 1, 5, 7], [-10, -3, 1, 5, 9], [-10, -3, 1, 5], [-10, -3, 1, 7, 9], [-10, -3, 1, 7], [-10, -3, 1, 9], [-10, -3, 1], [-10, -3, 3, 5, 7, 9], [-10, -3, 3, 5, 7], [-10, -3, 3, 5, 9], [-10, -3, 3, 5], [-10, -3, 3, 7, 9], [-10, -3, 3, 7], [-10, -3, 3, 9], [-10, -3, 3], [-10, -3, 5, 7, 9], [-10, -3, 5, 7], [-10, -3, 5, 9], [-10, -3, 5], [-10, -3, 7, 9], [-10, -3, 7], [-10, -3, 9], [-10, -3], [-10, -1, 0, 1, 3, 5, 7, 9], [-10, -1, 0, 1, 3, 5, 7], [-10, -1, 0, 1, 3, 5, 9], [-10, -1, 0, 1, 3, 5], [-10, -1, 0, 1, 3, 7, 9], [-10, -1, 0, 1, 3, 7], [-10, -1, 0, 1, 3, 9], [-10, -1, 0, 1, 3], [-10, -1, 0, 1, 5, 7, 9], [-10, -1, 0, 1, 5, 7], [-10, -1, 0, 1, 5, 9], [-10, -1, 0, 1, 5], [-10, -1, 0, 1, 7, 9], [-10, -1, 0, 1, 7], [-10, -1, 0, 1, 9], [-10, -1, 0, 1], [-10, -1, 0, 3, 5, 7, 9], [-10, -1, 0, 3, 5, 7], [-10, -1, 0, 3, 5, 9], [-10, -1, 0, 3, 5], [-10, -1, 0, 3, 7, 9], [-10, -1, 0, 3, 7], [-10, -1, 0, 3, 9], [-10, -1, 0, 3], [-10, -1, 0, 5, 7, 9], [-10, -1, 0, 5, 7], [-10, -1, 0, 5, 9], [-10, -1, 0, 5], [-10, -1, 0, 7, 9], [-10, -1, 0, 7], [-10, -1, 0, 9], [-10, -1, 0], [-10, -1, 1, 3, 5, 7, 9], [-10, -1, 1, 3, 5, 7], [-10, -1, 1, 3, 5, 9], [-10, -1, 1, 3, 5], [-10, -1, 1, 3, 7, 9], [-10, -1, 1, 3, 7], [-10, -1, 1, 3, 9], [-10, -1, 1, 3], [-10, -1, 1, 5, 7, 9], [-10, -1, 1, 5, 7], [-10, -1, 1, 5, 9], [-10, -1, 1, 5], [-10, -1, 1, 7, 9], [-10, -1, 1, 7], [-10, -1, 1, 9], [-10, -1, 1], [-10, -1, 3, 5, 7, 9], [-10, -1, 3, 5, 7], [-10, -1, 3, 5, 9], [-10, -1, 3, 5], [-10, -1, 3, 7, 9], [-10, -1, 3, 7], [-10, -1, 3, 9], [-10, -1, 3], [-10, -1, 5, 7, 9], [-10, -1, 5, 7], [-10, -1, 5, 9], [-10, -1, 5], [-10, -1, 7, 9], [-10, -1, 7], [-10, -1, 9], [-10, -1], [-10, 0, 1, 3, 5, 7, 9], [-10, 0, 1, 3, 5, 7], [-10, 0, 1, 3, 5, 9], [-10, 0, 1, 3, 5], [-10, 0, 1, 3, 7, 9], [-10, 0, 1, 3, 7], [-10, 0, 1, 3, 9], [-10, 0, 1, 3], [-10, 0, 1, 5, 7, 9], [-10, 0, 1, 5, 7], [-10, 0, 1, 5, 9], [-10, 0, 1, 5], [-10, 0, 1, 7, 9], [-10, 0, 1, 7], [-10, 0, 1, 9], [-10, 0, 1], [-10, 0, 3, 5, 7, 9], [-10, 0, 3, 5, 7], [-10, 0, 3, 5, 9], [-10, 0, 3, 5], [-10, 0, 3, 7, 9], [-10, 0, 3, 7], [-10, 0, 3, 9], [-10, 0, 3], [-10, 0, 5, 7, 9], [-10, 0, 5, 7], [-10, 0, 5, 9], [-10, 0, 5], [-10, 0, 7, 9], [-10, 0, 7], [-10, 0, 9], [-10, 0], [-10, 1, 3, 5, 7, 9], [-10, 1, 3, 5, 7], [-10, 1, 3, 5, 9], [-10, 1, 3, 5], [-10, 1, 3, 7, 9], [-10, 1, 3, 7], [-10, 1, 3, 9], [-10, 1, 3], [-10, 1, 5, 7, 9], [-10, 1, 5, 7], [-10, 1, 5, 9], [-10, 1, 5], [-10, 1, 7, 9], [-10, 1, 7], [-10, 1, 9], [-10, 1], [-10, 3, 5, 7, 9], [-10, 3, 5, 7], [-10, 3, 5, 9], [-10, 3, 5], [-10, 3, 7, 9], [-10, 3, 7], [-10, 3, 9], [-10, 3], [-10, 5, 7, 9], [-10, 5, 7], [-10, 5, 9], [-10, 5], [-10, 7, 9], [-10, 7], [-10, 9], [-5, -3, -1, 0, 1, 3, 5, 7, 9], [-5, -3, -1, 0, 1, 3, 5, 7], [-5, -3, -1, 0, 1, 3, 5, 9], [-5, -3, -1, 0, 1, 3, 5], [-5, -3, -1, 0, 1, 3, 7, 9], [-5, -3, -1, 0, 1, 3, 7], [-5, -3, -1, 0, 1, 3, 9], [-5, -3, -1, 0, 1, 3], [-5, -3, -1, 0, 1, 5, 7, 9], [-5, -3, -1, 0, 1, 5, 7], [-5, -3, -1, 0, 1, 5, 9], [-5, -3, -1, 0, 1, 5], [-5, -3, -1, 0, 1, 7, 9], [-5, -3, -1, 0, 1, 7], [-5, -3, -1, 0, 1, 9], [-5, -3, -1, 0, 1], [-5, -3, -1, 0, 3, 5, 7, 9], [-5, -3, -1, 0, 3, 5, 7], [-5, -3, -1, 0, 3, 5, 9], [-5, -3, -1, 0, 3, 5], [-5, -3, -1, 0, 3, 7, 9], [-5, -3, -1, 0, 3, 7], [-5, -3, -1, 0, 3, 9], [-5, -3, -1, 0, 3], [-5, -3, -1, 0, 5, 7, 9], [-5, -3, -1, 0, 5, 7], [-5, -3, -1, 0, 5, 9], [-5, -3, -1, 0, 5], [-5, -3, -1, 0, 7, 9], [-5, -3, -1, 0, 7], [-5, -3, -1, 0, 9], [-5, -3, -1, 0], [-5, -3, -1, 1, 3, 5, 7, 9], [-5, -3, -1, 1, 3, 5, 7], [-5, -3, -1, 1, 3, 5, 9], [-5, -3, -1, 1, 3, 5], [-5, -3, -1, 1, 3, 7, 9], [-5, -3, -1, 1, 3, 7], [-5, -3, -1, 1, 3, 9], [-5, -3, -1, 1, 3], [-5, -3, -1, 1, 5, 7, 9], [-5, -3, -1, 1, 5, 7], [-5, -3, -1, 1, 5, 9], [-5, -3, -1, 1, 5], [-5, -3, -1, 1, 7, 9], [-5, -3, -1, 1, 7], [-5, -3, -1, 1, 9], [-5, -3, -1, 1], [-5, -3, -1, 3, 5, 7, 9], [-5, -3, -1, 3, 5, 7], [-5, -3, -1, 3, 5, 9], [-5, -3, -1, 3, 5], [-5, -3, -1, 3, 7, 9], [-5, -3, -1, 3, 7], [-5, -3, -1, 3, 9], [-5, -3, -1, 3], [-5, -3, -1, 5, 7, 9], [-5, -3, -1, 5, 7], [-5, -3, -1, 5, 9], [-5, -3, -1, 5], [-5, -3, -1, 7, 9], [-5, -3, -1, 7], [-5, -3, -1, 9], [-5, -3, -1], [-5, -3, 0, 1, 3, 5, 7, 9], [-5, -3, 0, 1, 3, 5, 7], [-5, -3, 0, 1, 3, 5, 9], [-5, -3, 0, 1, 3, 5], [-5, -3, 0, 1, 3, 7, 9], [-5, -3, 0, 1, 3, 7], [-5, -3, 0, 1, 3, 9], [-5, -3, 0, 1, 3], [-5, -3, 0, 1, 5, 7, 9], [-5, -3, 0, 1, 5, 7], [-5, -3, 0, 1, 5, 9], [-5, -3, 0, 1, 5], [-5, -3, 0, 1, 7, 9], [-5, -3, 0, 1, 7], [-5, -3, 0, 1, 9], [-5, -3, 0, 1], [-5, -3, 0, 3, 5, 7, 9], [-5, -3, 0, 3, 5, 7], [-5, -3, 0, 3, 5, 9], [-5, -3, 0, 3, 5], [-5, -3, 0, 3, 7, 9], [-5, -3, 0, 3, 7], [-5, -3, 0, 3, 9], [-5, -3, 0, 3], [-5, -3, 0, 5, 7, 9], [-5, -3, 0, 5, 7], [-5, -3, 0, 5, 9], [-5, -3, 0, 5], [-5, -3, 0, 7, 9], [-5, -3, 0, 7], [-5, -3, 0, 9], [-5, -3, 0], [-5, -3, 1, 3, 5, 7, 9], [-5, -3, 1, 3, 5, 7], [-5, -3, 1, 3, 5, 9], [-5, -3, 1, 3, 5], [-5, -3, 1, 3, 7, 9], [-5, -3, 1, 3, 7], [-5, -3, 1, 3, 9], [-5, -3, 1, 3], [-5, -3, 1, 5, 7, 9], [-5, -3, 1, 5, 7], [-5, -3, 1, 5, 9], [-5, -3, 1, 5], [-5, -3, 1, 7, 9], [-5, -3, 1, 7], [-5, -3, 1, 9], [-5, -3, 1], [-5, -3, 3, 5, 7, 9], [-5, -3, 3, 5, 7], [-5, -3, 3, 5, 9], [-5, -3, 3, 5], [-5, -3, 3, 7, 9], [-5, -3, 3, 7], [-5, -3, 3, 9], [-5, -3, 3], [-5, -3, 5, 7, 9], [-5, -3, 5, 7], [-5, -3, 5, 9], [-5, -3, 5], [-5, -3, 7, 9], [-5, -3, 7], [-5, -3, 9], [-5, -3], [-5, -1, 0, 1, 3, 5, 7, 9], [-5, -1, 0, 1, 3, 5, 7], [-5, -1, 0, 1, 3, 5, 9], [-5, -1, 0, 1, 3, 5], [-5, -1, 0, 1, 3, 7, 9], [-5, -1, 0, 1, 3, 7], [-5, -1, 0, 1, 3, 9], [-5, -1, 0, 1, 3], [-5, -1, 0, 1, 5, 7, 9], [-5, -1, 0, 1, 5, 7], [-5, -1, 0, 1, 5, 9], [-5, -1, 0, 1, 5], [-5, -1, 0, 1, 7, 9], [-5, -1, 0, 1, 7], [-5, -1, 0, 1, 9], [-5, -1, 0, 1], [-5, -1, 0, 3, 5, 7, 9], [-5, -1, 0, 3, 5, 7], [-5, -1, 0, 3, 5, 9], [-5, -1, 0, 3, 5], [-5, -1, 0, 3, 7, 9], [-5, -1, 0, 3, 7], [-5, -1, 0, 3, 9], [-5, -1, 0, 3], [-5, -1, 0, 5, 7, 9], [-5, -1, 0, 5, 7], [-5, -1, 0, 5, 9], [-5, -1, 0, 5], [-5, -1, 0, 7, 9], [-5, -1, 0, 7], [-5, -1, 0, 9], [-5, -1, 0], [-5, -1, 1, 3, 5, 7, 9], [-5, -1, 1, 3, 5, 7], [-5, -1, 1, 3, 5, 9], [-5, -1, 1, 3, 5], [-5, -1, 1, 3, 7, 9], [-5, -1, 1, 3, 7], [-5, -1, 1, 3, 9], [-5, -1, 1, 3], [-5, -1, 1, 5, 7, 9], [-5, -1, 1, 5, 7], [-5, -1, 1, 5, 9], [-5, -1, 1, 5], [-5, -1, 1, 7, 9], [-5, -1, 1, 7], [-5, -1, 1, 9], [-5, -1, 1], [-5, -1, 3, 5, 7, 9], [-5, -1, 3, 5, 7], [-5, -1, 3, 5, 9], [-5, -1, 3, 5], [-5, -1, 3, 7, 9], [-5, -1, 3, 7], [-5, -1, 3, 9], [-5, -1, 3], [-5, -1, 5, 7, 9], [-5, -1, 5, 7], [-5, -1, 5, 9], [-5, -1, 5], [-5, -1, 7, 9], [-5, -1, 7], [-5, -1, 9], [-5, -1], [-5, 0, 1, 3, 5, 7, 9], [-5, 0, 1, 3, 5, 7], [-5, 0, 1, 3, 5, 9], [-5, 0, 1, 3, 5], [-5, 0, 1, 3, 7, 9], [-5, 0, 1, 3, 7], [-5, 0, 1, 3, 9], [-5, 0, 1, 3], [-5, 0, 1, 5, 7, 9], [-5, 0, 1, 5, 7], [-5, 0, 1, 5, 9], [-5, 0, 1, 5], [-5, 0, 1, 7, 9], [-5, 0, 1, 7], [-5, 0, 1, 9], [-5, 0, 1], [-5, 0, 3, 5, 7, 9], [-5, 0, 3, 5, 7], [-5, 0, 3, 5, 9], [-5, 0, 3, 5], [-5, 0, 3, 7, 9], [-5, 0, 3, 7], [-5, 0, 3, 9], [-5, 0, 3], [-5, 0, 5, 7, 9], [-5, 0, 5, 7], [-5, 0, 5, 9], [-5, 0, 5], [-5, 0, 7, 9], [-5, 0, 7], [-5, 0, 9], [-5, 0], [-5, 1, 3, 5, 7, 9], [-5, 1, 3, 5, 7], [-5, 1, 3, 5, 9], [-5, 1, 3, 5], [-5, 1, 3, 7, 9], [-5, 1, 3, 7], [-5, 1, 3, 9], [-5, 1, 3], [-5, 1, 5, 7, 9], [-5, 1, 5, 7], [-5, 1, 5, 9], [-5, 1, 5], [-5, 1, 7, 9], [-5, 1, 7], [-5, 1, 9], [-5, 1], [-5, 3, 5, 7, 9], [-5, 3, 5, 7], [-5, 3, 5, 9], [-5, 3, 5], [-5, 3, 7, 9], [-5, 3, 7], [-5, 3, 9], [-5, 3], [-5, 5, 7, 9], [-5, 5, 7], [-5, 5, 9], [-5, 5], [-5, 7, 9], [-5, 7], [-5, 9], [-3, -1, 0, 1, 3, 5, 7, 9], [-3, -1, 0, 1, 3, 5, 7], [-3, -1, 0, 1, 3, 5, 9], [-3, -1, 0, 1, 3, 5], [-3, -1, 0, 1, 3, 7, 9], [-3, -1, 0, 1, 3, 7], [-3, -1, 0, 1, 3, 9], [-3, -1, 0, 1, 3], [-3, -1, 0, 1, 5, 7, 9], [-3, -1, 0, 1, 5, 7], [-3, -1, 0, 1, 5, 9], [-3, -1, 0, 1, 5], [-3, -1, 0, 1, 7, 9], [-3, -1, 0, 1, 7], [-3, -1, 0, 1, 9], [-3, -1, 0, 1], [-3, -1, 0, 3, 5, 7, 9], [-3, -1, 0, 3, 5, 7], [-3, -1, 0, 3, 5, 9], [-3, -1, 0, 3, 5], [-3, -1, 0, 3, 7, 9], [-3, -1, 0, 3, 7], [-3, -1, 0, 3, 9], [-3, -1, 0, 3], [-3, -1, 0, 5, 7, 9], [-3, -1, 0, 5, 7], [-3, -1, 0, 5, 9], [-3, -1, 0, 5], [-3, -1, 0, 7, 9], [-3, -1, 0, 7], [-3, -1, 0, 9], [-3, -1, 0], [-3, -1, 1, 3, 5, 7, 9], [-3, -1, 1, 3, 5, 7], [-3, -1, 1, 3, 5, 9], [-3, -1, 1, 3, 5], [-3, -1, 1, 3, 7, 9], [-3, -1, 1, 3, 7], [-3, -1, 1, 3, 9], [-3, -1, 1, 3], [-3, -1, 1, 5, 7, 9], [-3, -1, 1, 5, 7], [-3, -1, 1, 5, 9], [-3, -1, 1, 5], [-3, -1, 1, 7, 9], [-3, -1, 1, 7], [-3, -1, 1, 9], [-3, -1, 1], [-3, -1, 3, 5, 7, 9], [-3, -1, 3, 5, 7], [-3, -1, 3, 5, 9], [-3, -1, 3, 5], [-3, -1, 3, 7, 9], [-3, -1, 3, 7], [-3, -1, 3, 9], [-3, -1, 3], [-3, -1, 5, 7, 9], [-3, -1, 5, 7], [-3, -1, 5, 9], [-3, -1, 5], [-3, -1, 7, 9], [-3, -1, 7], [-3, -1, 9], [-3, -1], [-3, 0, 1, 3, 5, 7, 9], [-3, 0, 1, 3, 5, 7], [-3, 0, 1, 3, 5, 9], [-3, 0, 1, 3, 5], [-3, 0, 1, 3, 7, 9], [-3, 0, 1, 3, 7], [-3, 0, 1, 3, 9], [-3, 0, 1, 3], [-3, 0, 1, 5, 7, 9], [-3, 0, 1, 5, 7], [-3, 0, 1, 5, 9], [-3, 0, 1, 5], [-3, 0, 1, 7, 9], [-3, 0, 1, 7], [-3, 0, 1, 9], [-3, 0, 1], [-3, 0, 3, 5, 7, 9], [-3, 0, 3, 5, 7], [-3, 0, 3, 5, 9], [-3, 0, 3, 5], [-3, 0, 3, 7, 9], [-3, 0, 3, 7], [-3, 0, 3, 9], [-3, 0, 3], [-3, 0, 5, 7, 9], [-3, 0, 5, 7], [-3, 0, 5, 9], [-3, 0, 5], [-3, 0, 7, 9], [-3, 0, 7], [-3, 0, 9], [-3, 0], [-3, 1, 3, 5, 7, 9], [-3, 1, 3, 5, 7], [-3, 1, 3, 5, 9], [-3, 1, 3, 5], [-3, 1, 3, 7, 9], [-3, 1, 3, 7], [-3, 1, 3, 9], [-3, 1, 3], [-3, 1, 5, 7, 9], [-3, 1, 5, 7], [-3, 1, 5, 9], [-3, 1, 5], [-3, 1, 7, 9], [-3, 1, 7], [-3, 1, 9], [-3, 1], [-3, 3, 5, 7, 9], [-3, 3, 5, 7], [-3, 3, 5, 9], [-3, 3, 5], [-3, 3, 7, 9], [-3, 3, 7], [-3, 3, 9], [-3, 3], [-3, 5, 7, 9], [-3, 5, 7], [-3, 5, 9], [-3, 5], [-3, 7, 9], [-3, 7], [-3, 9], [-1, 0, 1, 3, 5, 7, 9], [-1, 0, 1, 3, 5, 7], [-1, 0, 1, 3, 5, 9], [-1, 0, 1, 3, 5], [-1, 0, 1, 3, 7, 9], [-1, 0, 1, 3, 7], [-1, 0, 1, 3, 9], [-1, 0, 1, 3], [-1, 0, 1, 5, 7, 9], [-1, 0, 1, 5, 7], [-1, 0, 1, 5, 9], [-1, 0, 1, 5], [-1, 0, 1, 7, 9], [-1, 0, 1, 7], [-1, 0, 1, 9], [-1, 0, 1], [-1, 0, 3, 5, 7, 9], [-1, 0, 3, 5, 7], [-1, 0, 3, 5, 9], [-1, 0, 3, 5], [-1, 0, 3, 7, 9], [-1, 0, 3, 7], [-1, 0, 3, 9], [-1, 0, 3], [-1, 0, 5, 7, 9], [-1, 0, 5, 7], [-1, 0, 5, 9], [-1, 0, 5], [-1, 0, 7, 9], [-1, 0, 7], [-1, 0, 9], [-1, 0], [-1, 1, 3, 5, 7, 9], [-1, 1, 3, 5, 7], [-1, 1, 3, 5, 9], [-1, 1, 3, 5], [-1, 1, 3, 7, 9], [-1, 1, 3, 7], [-1, 1, 3, 9], [-1, 1, 3], [-1, 1, 5, 7, 9], [-1, 1, 5, 7], [-1, 1, 5, 9], [-1, 1, 5], [-1, 1, 7, 9], [-1, 1, 7], [-1, 1, 9], [-1, 1], [-1, 3, 5, 7, 9], [-1, 3, 5, 7], [-1, 3, 5, 9], [-1, 3, 5], [-1, 3, 7, 9], [-1, 3, 7], [-1, 3, 9], [-1, 3], [-1, 5, 7, 9], [-1, 5, 7], [-1, 5, 9], [-1, 5], [-1, 7, 9], [-1, 7], [-1, 9], [0, 1, 3, 5, 7, 9], [0, 1, 3, 5, 7], [0, 1, 3, 5, 9], [0, 1, 3, 5], [0, 1, 3, 7, 9], [0, 1, 3, 7], [0, 1, 3, 9], [0, 1, 3], [0, 1, 5, 7, 9], [0, 1, 5, 7], [0, 1, 5, 9], [0, 1, 5], [0, 1, 7, 9], [0, 1, 7], [0, 1, 9], [0, 1], [0, 3, 5, 7, 9], [0, 3, 5, 7], [0, 3, 5, 9], [0, 3, 5], [0, 3, 7, 9], [0, 3, 7], [0, 3, 9], [0, 3], [0, 5, 7, 9], [0, 5, 7], [0, 5, 9], [0, 5], [0, 7, 9], [0, 7], [0, 9], [1, 3, 5, 7, 9], [1, 3, 5, 7], [1, 3, 5, 9], [1, 3, 5], [1, 3, 7, 9], [1, 3, 7], [1, 3, 9], [1, 3], [1, 5, 7, 9], [1, 5, 7], [1, 5, 9], [1, 5], [1, 7, 9], [1, 7], [1, 9], [3, 5, 7, 9], [3, 5, 7], [3, 5, 9], [3, 5], [3, 7, 9], [3, 7], [3, 9], [5, 7, 9], [5, 7], [5, 9], [7, 9]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[-1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]), [[-1, 0, 1, 1, 1, 1, 1], [-1, 0, 0, 1, 1, 1, 1], [-1, 0, 0, 0, 1, 1, 1], [-1, 0, 0, 0, 0, 1, 1], [-1, 0, 0, 0, 0, 0, 1], [-1, 0, 0, 0, 0, 0], [-1, 1, 1, 1, 1, 1], [-1, -1, 0, 1, 1, 1, 1], [-1, -1, 0, 0, 1, 1, 1], [-1, -1, 0, 0, 0, 1, 1], [-1, -1, 0, 0, 0, 0, 1], [-1, -1, 0, 0, 0, 0], [-1, -1, 1, 1, 1, 1], [-1, -1, -1, 0, 1, 1, 1], [-1, -1, -1, 0, 0, 1, 1], [-1, -1, -1, 0, 0, 0, 1], [-1, -1, -1, 0, 0, 0], [-1, -1, -1, 1, 1, 1], [-1, -1, -1, -1, 0, 1, 1], [-1, -1, -1, -1, 0, 0, 1], [-1, -1, -1, -1, 0, 0], [-1, -1, -1, -1, 1, 1], [-1, -1, -1, -1, -1, 0, 1], [-1, -1, -1, -1, -1, 0], [-1, -1, -1, -1, -1, 1], [-1, -1, -1, -1, -1], [0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [1, 1, 1, 1, 1], [-1, 0, 1, 1, 1, 1], [-1, 0, 0, 1, 1, 1], [-1, 0, 0, 0, 1, 1], [-1, 0, 0, 0, 0, 1], [-1, 0, 0, 0, 0], [-1, 1, 1, 1, 1], [-1, -1, 0, 1, 1, 1], [-1, -1, 0, 0, 1, 1], [-1, -1, 0, 0, 0, 1], [-1, -1, 0, 0, 0], [-1, -1, 1, 1, 1], [-1, -1, -1, 0, 1, 1], [-1, -1, -1, 0, 0, 1], [-1, -1, -1, 0, 0], [-1, -1, -1, 1, 1], [-1, -1, -1, -1, 0, 1], [-1, -1, -1, -1, 0], [-1, -1, -1, -1, 1], [-1, -1, -1, -1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1], [0, 0, 0, 1, 1], [0, 0, 0, 0, 1], [0, 0, 0, 0], [1, 1, 1, 1], [-1, 0, 1, 1, 1], [-1, 0, 0, 1, 1], [-1, 0, 0, 0, 1], [-1, 0, 0, 0], [-1, 1, 1, 1], [-1, -1, 0, 1, 1], [-1, -1, 0, 0, 1], [-1, -1, 0, 0], [-1, -1, 1, 1], [-1, -1, -1, 0, 1], [-1, -1, -1, 0], [-1, -1, -1, 1], [-1, -1, -1], [0, 1, 1, 1], [0, 0, 1, 1], [0, 0, 0, 1], [0, 0, 0], [1, 1, 1], [-1, 0, 1, 1], [-1, 0, 0, 1], [-1, 0, 0], [-1, 1, 1], [-1, -1, 0, 1], [-1, -1, 0], [-1, -1, 1], [-1, -1], [0, 1, 1], [0, 0, 1], [0, 0], [1, 1], [-1, 0, 1], [-1, 0], [-1, 1], [0, 1]])\n assert answers_match(candidate(nums=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]), [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [1, 2, 3, 4, 5, 6, 7, 8, 10], [1, 2, 3, 4, 5, 6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 9, 10], [1, 2, 3, 4, 5, 6, 7, 9], [1, 2, 3, 4, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 8, 9, 10], [1, 2, 3, 4, 5, 6, 8, 9], [1, 2, 3, 4, 5, 6, 8, 10], [1, 2, 3, 4, 5, 6, 8], [1, 2, 3, 4, 5, 6, 9, 10], [1, 2, 3, 4, 5, 6, 9], [1, 2, 3, 4, 5, 6, 10], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7, 8, 9, 10], [1, 2, 3, 4, 5, 7, 8, 9], [1, 2, 3, 4, 5, 7, 8, 10], [1, 2, 3, 4, 5, 7, 8], [1, 2, 3, 4, 5, 7, 9, 10], [1, 2, 3, 4, 5, 7, 9], [1, 2, 3, 4, 5, 7, 10], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5, 8, 9, 10], [1, 2, 3, 4, 5, 8, 9], [1, 2, 3, 4, 5, 8, 10], [1, 2, 3, 4, 5, 8], [1, 2, 3, 4, 5, 9, 10], [1, 2, 3, 4, 5, 9], [1, 2, 3, 4, 5, 10], [1, 2, 3, 4, 5, 5], [1, 2, 3, 4, 6, 7, 8, 9, 10], [1, 2, 3, 4, 6, 7, 8, 9], [1, 2, 3, 4, 6, 7, 8, 10], [1, 2, 3, 4, 6, 7, 8], [1, 2, 3, 4, 6, 7, 9, 10], [1, 2, 3, 4, 6, 7, 9], [1, 2, 3, 4, 6, 7, 10], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6, 8, 9, 10], [1, 2, 3, 4, 6, 8, 9], [1, 2, 3, 4, 6, 8, 10], [1, 2, 3, 4, 6, 8], [1, 2, 3, 4, 6, 9, 10], [1, 2, 3, 4, 6, 9], [1, 2, 3, 4, 6, 10], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7, 8, 9, 10], [1, 2, 3, 4, 7, 8, 9], [1, 2, 3, 4, 7, 8, 10], [1, 2, 3, 4, 7, 8], [1, 2, 3, 4, 7, 9, 10], [1, 2, 3, 4, 7, 9], [1, 2, 3, 4, 7, 10], [1, 2, 3, 4, 7], [1, 2, 3, 4, 8, 9, 10], [1, 2, 3, 4, 8, 9], [1, 2, 3, 4, 8, 10], [1, 2, 3, 4, 8], [1, 2, 3, 4, 9, 10], [1, 2, 3, 4, 9], [1, 2, 3, 4, 10], [1, 2, 3, 4, 4, 5], [1, 2, 3, 4, 4], [1, 2, 3, 5, 6, 7, 8, 9, 10], [1, 2, 3, 5, 6, 7, 8, 9], [1, 2, 3, 5, 6, 7, 8, 10], [1, 2, 3, 5, 6, 7, 8], [1, 2, 3, 5, 6, 7, 9, 10], [1, 2, 3, 5, 6, 7, 9], [1, 2, 3, 5, 6, 7, 10], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6, 8, 9, 10], [1, 2, 3, 5, 6, 8, 9], [1, 2, 3, 5, 6, 8, 10], [1, 2, 3, 5, 6, 8], [1, 2, 3, 5, 6, 9, 10], [1, 2, 3, 5, 6, 9], [1, 2, 3, 5, 6, 10], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7, 8, 9, 10], [1, 2, 3, 5, 7, 8, 9], [1, 2, 3, 5, 7, 8, 10], [1, 2, 3, 5, 7, 8], [1, 2, 3, 5, 7, 9, 10], [1, 2, 3, 5, 7, 9], [1, 2, 3, 5, 7, 10], [1, 2, 3, 5, 7], [1, 2, 3, 5, 8, 9, 10], [1, 2, 3, 5, 8, 9], [1, 2, 3, 5, 8, 10], [1, 2, 3, 5, 8], [1, 2, 3, 5, 9, 10], [1, 2, 3, 5, 9], [1, 2, 3, 5, 10], [1, 2, 3, 5, 5], [1, 2, 3, 6, 7, 8, 9, 10], [1, 2, 3, 6, 7, 8, 9], [1, 2, 3, 6, 7, 8, 10], [1, 2, 3, 6, 7, 8], [1, 2, 3, 6, 7, 9, 10], [1, 2, 3, 6, 7, 9], [1, 2, 3, 6, 7, 10], [1, 2, 3, 6, 7], [1, 2, 3, 6, 8, 9, 10], [1, 2, 3, 6, 8, 9], [1, 2, 3, 6, 8, 10], [1, 2, 3, 6, 8], [1, 2, 3, 6, 9, 10], [1, 2, 3, 6, 9], [1, 2, 3, 6, 10], [1, 2, 3, 6], [1, 2, 3, 7, 8, 9, 10], [1, 2, 3, 7, 8, 9], [1, 2, 3, 7, 8, 10], [1, 2, 3, 7, 8], [1, 2, 3, 7, 9, 10], [1, 2, 3, 7, 9], [1, 2, 3, 7, 10], [1, 2, 3, 7], [1, 2, 3, 8, 9, 10], [1, 2, 3, 8, 9], [1, 2, 3, 8, 10], [1, 2, 3, 8], [1, 2, 3, 9, 10], [1, 2, 3, 9], [1, 2, 3, 10], [1, 2, 3, 3, 4, 5], [1, 2, 3, 3, 4], [1, 2, 3, 3, 5], [1, 2, 3, 3], [1, 2, 4, 5, 6, 7, 8, 9, 10], [1, 2, 4, 5, 6, 7, 8, 9], [1, 2, 4, 5, 6, 7, 8, 10], [1, 2, 4, 5, 6, 7, 8], [1, 2, 4, 5, 6, 7, 9, 10], [1, 2, 4, 5, 6, 7, 9], [1, 2, 4, 5, 6, 7, 10], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6, 8, 9, 10], [1, 2, 4, 5, 6, 8, 9], [1, 2, 4, 5, 6, 8, 10], [1, 2, 4, 5, 6, 8], [1, 2, 4, 5, 6, 9, 10], [1, 2, 4, 5, 6, 9], [1, 2, 4, 5, 6, 10], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7, 8, 9, 10], [1, 2, 4, 5, 7, 8, 9], [1, 2, 4, 5, 7, 8, 10], [1, 2, 4, 5, 7, 8], [1, 2, 4, 5, 7, 9, 10], [1, 2, 4, 5, 7, 9], [1, 2, 4, 5, 7, 10], [1, 2, 4, 5, 7], [1, 2, 4, 5, 8, 9, 10], [1, 2, 4, 5, 8, 9], [1, 2, 4, 5, 8, 10], [1, 2, 4, 5, 8], [1, 2, 4, 5, 9, 10], [1, 2, 4, 5, 9], [1, 2, 4, 5, 10], [1, 2, 4, 5, 5], [1, 2, 4, 6, 7, 8, 9, 10], [1, 2, 4, 6, 7, 8, 9], [1, 2, 4, 6, 7, 8, 10], [1, 2, 4, 6, 7, 8], [1, 2, 4, 6, 7, 9, 10], [1, 2, 4, 6, 7, 9], [1, 2, 4, 6, 7, 10], [1, 2, 4, 6, 7], [1, 2, 4, 6, 8, 9, 10], [1, 2, 4, 6, 8, 9], [1, 2, 4, 6, 8, 10], [1, 2, 4, 6, 8], [1, 2, 4, 6, 9, 10], [1, 2, 4, 6, 9], [1, 2, 4, 6, 10], [1, 2, 4, 6], [1, 2, 4, 7, 8, 9, 10], [1, 2, 4, 7, 8, 9], [1, 2, 4, 7, 8, 10], [1, 2, 4, 7, 8], [1, 2, 4, 7, 9, 10], [1, 2, 4, 7, 9], [1, 2, 4, 7, 10], [1, 2, 4, 7], [1, 2, 4, 8, 9, 10], [1, 2, 4, 8, 9], [1, 2, 4, 8, 10], [1, 2, 4, 8], [1, 2, 4, 9, 10], [1, 2, 4, 9], [1, 2, 4, 10], [1, 2, 4, 4, 5], [1, 2, 4, 4], [1, 2, 5, 6, 7, 8, 9, 10], [1, 2, 5, 6, 7, 8, 9], [1, 2, 5, 6, 7, 8, 10], [1, 2, 5, 6, 7, 8], [1, 2, 5, 6, 7, 9, 10], [1, 2, 5, 6, 7, 9], [1, 2, 5, 6, 7, 10], [1, 2, 5, 6, 7], [1, 2, 5, 6, 8, 9, 10], [1, 2, 5, 6, 8, 9], [1, 2, 5, 6, 8, 10], [1, 2, 5, 6, 8], [1, 2, 5, 6, 9, 10], [1, 2, 5, 6, 9], [1, 2, 5, 6, 10], [1, 2, 5, 6], [1, 2, 5, 7, 8, 9, 10], [1, 2, 5, 7, 8, 9], [1, 2, 5, 7, 8, 10], [1, 2, 5, 7, 8], [1, 2, 5, 7, 9, 10], [1, 2, 5, 7, 9], [1, 2, 5, 7, 10], [1, 2, 5, 7], [1, 2, 5, 8, 9, 10], [1, 2, 5, 8, 9], [1, 2, 5, 8, 10], [1, 2, 5, 8], [1, 2, 5, 9, 10], [1, 2, 5, 9], [1, 2, 5, 10], [1, 2, 5, 5], [1, 2, 6, 7, 8, 9, 10], [1, 2, 6, 7, 8, 9], [1, 2, 6, 7, 8, 10], [1, 2, 6, 7, 8], [1, 2, 6, 7, 9, 10], [1, 2, 6, 7, 9], [1, 2, 6, 7, 10], [1, 2, 6, 7], [1, 2, 6, 8, 9, 10], [1, 2, 6, 8, 9], [1, 2, 6, 8, 10], [1, 2, 6, 8], [1, 2, 6, 9, 10], [1, 2, 6, 9], [1, 2, 6, 10], [1, 2, 6], [1, 2, 7, 8, 9, 10], [1, 2, 7, 8, 9], [1, 2, 7, 8, 10], [1, 2, 7, 8], [1, 2, 7, 9, 10], [1, 2, 7, 9], [1, 2, 7, 10], [1, 2, 7], [1, 2, 8, 9, 10], [1, 2, 8, 9], [1, 2, 8, 10], [1, 2, 8], [1, 2, 9, 10], [1, 2, 9], [1, 2, 10], [1, 2, 2, 3, 4, 5], [1, 2, 2, 3, 4], [1, 2, 2, 3, 5], [1, 2, 2, 3], [1, 2, 2, 4, 5], [1, 2, 2, 4], [1, 2, 2, 5], [1, 2, 2], [1, 3, 4, 5, 6, 7, 8, 9, 10], [1, 3, 4, 5, 6, 7, 8, 9], [1, 3, 4, 5, 6, 7, 8, 10], [1, 3, 4, 5, 6, 7, 8], [1, 3, 4, 5, 6, 7, 9, 10], [1, 3, 4, 5, 6, 7, 9], [1, 3, 4, 5, 6, 7, 10], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6, 8, 9, 10], [1, 3, 4, 5, 6, 8, 9], [1, 3, 4, 5, 6, 8, 10], [1, 3, 4, 5, 6, 8], [1, 3, 4, 5, 6, 9, 10], [1, 3, 4, 5, 6, 9], [1, 3, 4, 5, 6, 10], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7, 8, 9, 10], [1, 3, 4, 5, 7, 8, 9], [1, 3, 4, 5, 7, 8, 10], [1, 3, 4, 5, 7, 8], [1, 3, 4, 5, 7, 9, 10], [1, 3, 4, 5, 7, 9], [1, 3, 4, 5, 7, 10], [1, 3, 4, 5, 7], [1, 3, 4, 5, 8, 9, 10], [1, 3, 4, 5, 8, 9], [1, 3, 4, 5, 8, 10], [1, 3, 4, 5, 8], [1, 3, 4, 5, 9, 10], [1, 3, 4, 5, 9], [1, 3, 4, 5, 10], [1, 3, 4, 5, 5], [1, 3, 4, 6, 7, 8, 9, 10], [1, 3, 4, 6, 7, 8, 9], [1, 3, 4, 6, 7, 8, 10], [1, 3, 4, 6, 7, 8], [1, 3, 4, 6, 7, 9, 10], [1, 3, 4, 6, 7, 9], [1, 3, 4, 6, 7, 10], [1, 3, 4, 6, 7], [1, 3, 4, 6, 8, 9, 10], [1, 3, 4, 6, 8, 9], [1, 3, 4, 6, 8, 10], [1, 3, 4, 6, 8], [1, 3, 4, 6, 9, 10], [1, 3, 4, 6, 9], [1, 3, 4, 6, 10], [1, 3, 4, 6], [1, 3, 4, 7, 8, 9, 10], [1, 3, 4, 7, 8, 9], [1, 3, 4, 7, 8, 10], [1, 3, 4, 7, 8], [1, 3, 4, 7, 9, 10], [1, 3, 4, 7, 9], [1, 3, 4, 7, 10], [1, 3, 4, 7], [1, 3, 4, 8, 9, 10], [1, 3, 4, 8, 9], [1, 3, 4, 8, 10], [1, 3, 4, 8], [1, 3, 4, 9, 10], [1, 3, 4, 9], [1, 3, 4, 10], [1, 3, 4, 4, 5], [1, 3, 4, 4], [1, 3, 5, 6, 7, 8, 9, 10], [1, 3, 5, 6, 7, 8, 9], [1, 3, 5, 6, 7, 8, 10], [1, 3, 5, 6, 7, 8], [1, 3, 5, 6, 7, 9, 10], [1, 3, 5, 6, 7, 9], [1, 3, 5, 6, 7, 10], [1, 3, 5, 6, 7], [1, 3, 5, 6, 8, 9, 10], [1, 3, 5, 6, 8, 9], [1, 3, 5, 6, 8, 10], [1, 3, 5, 6, 8], [1, 3, 5, 6, 9, 10], [1, 3, 5, 6, 9], [1, 3, 5, 6, 10], [1, 3, 5, 6], [1, 3, 5, 7, 8, 9, 10], [1, 3, 5, 7, 8, 9], [1, 3, 5, 7, 8, 10], [1, 3, 5, 7, 8], [1, 3, 5, 7, 9, 10], [1, 3, 5, 7, 9], [1, 3, 5, 7, 10], [1, 3, 5, 7], [1, 3, 5, 8, 9, 10], [1, 3, 5, 8, 9], [1, 3, 5, 8, 10], [1, 3, 5, 8], [1, 3, 5, 9, 10], [1, 3, 5, 9], [1, 3, 5, 10], [1, 3, 5, 5], [1, 3, 6, 7, 8, 9, 10], [1, 3, 6, 7, 8, 9], [1, 3, 6, 7, 8, 10], [1, 3, 6, 7, 8], [1, 3, 6, 7, 9, 10], [1, 3, 6, 7, 9], [1, 3, 6, 7, 10], [1, 3, 6, 7], [1, 3, 6, 8, 9, 10], [1, 3, 6, 8, 9], [1, 3, 6, 8, 10], [1, 3, 6, 8], [1, 3, 6, 9, 10], [1, 3, 6, 9], [1, 3, 6, 10], [1, 3, 6], [1, 3, 7, 8, 9, 10], [1, 3, 7, 8, 9], [1, 3, 7, 8, 10], [1, 3, 7, 8], [1, 3, 7, 9, 10], [1, 3, 7, 9], [1, 3, 7, 10], [1, 3, 7], [1, 3, 8, 9, 10], [1, 3, 8, 9], [1, 3, 8, 10], [1, 3, 8], [1, 3, 9, 10], [1, 3, 9], [1, 3, 10], [1, 3, 3, 4, 5], [1, 3, 3, 4], [1, 3, 3, 5], [1, 3, 3], [1, 4, 5, 6, 7, 8, 9, 10], [1, 4, 5, 6, 7, 8, 9], [1, 4, 5, 6, 7, 8, 10], [1, 4, 5, 6, 7, 8], [1, 4, 5, 6, 7, 9, 10], [1, 4, 5, 6, 7, 9], [1, 4, 5, 6, 7, 10], [1, 4, 5, 6, 7], [1, 4, 5, 6, 8, 9, 10], [1, 4, 5, 6, 8, 9], [1, 4, 5, 6, 8, 10], [1, 4, 5, 6, 8], [1, 4, 5, 6, 9, 10], [1, 4, 5, 6, 9], [1, 4, 5, 6, 10], [1, 4, 5, 6], [1, 4, 5, 7, 8, 9, 10], [1, 4, 5, 7, 8, 9], [1, 4, 5, 7, 8, 10], [1, 4, 5, 7, 8], [1, 4, 5, 7, 9, 10], [1, 4, 5, 7, 9], [1, 4, 5, 7, 10], [1, 4, 5, 7], [1, 4, 5, 8, 9, 10], [1, 4, 5, 8, 9], [1, 4, 5, 8, 10], [1, 4, 5, 8], [1, 4, 5, 9, 10], [1, 4, 5, 9], [1, 4, 5, 10], [1, 4, 5, 5], [1, 4, 6, 7, 8, 9, 10], [1, 4, 6, 7, 8, 9], [1, 4, 6, 7, 8, 10], [1, 4, 6, 7, 8], [1, 4, 6, 7, 9, 10], [1, 4, 6, 7, 9], [1, 4, 6, 7, 10], [1, 4, 6, 7], [1, 4, 6, 8, 9, 10], [1, 4, 6, 8, 9], [1, 4, 6, 8, 10], [1, 4, 6, 8], [1, 4, 6, 9, 10], [1, 4, 6, 9], [1, 4, 6, 10], [1, 4, 6], [1, 4, 7, 8, 9, 10], [1, 4, 7, 8, 9], [1, 4, 7, 8, 10], [1, 4, 7, 8], [1, 4, 7, 9, 10], [1, 4, 7, 9], [1, 4, 7, 10], [1, 4, 7], [1, 4, 8, 9, 10], [1, 4, 8, 9], [1, 4, 8, 10], [1, 4, 8], [1, 4, 9, 10], [1, 4, 9], [1, 4, 10], [1, 4, 4, 5], [1, 4, 4], [1, 5, 6, 7, 8, 9, 10], [1, 5, 6, 7, 8, 9], [1, 5, 6, 7, 8, 10], [1, 5, 6, 7, 8], [1, 5, 6, 7, 9, 10], [1, 5, 6, 7, 9], [1, 5, 6, 7, 10], [1, 5, 6, 7], [1, 5, 6, 8, 9, 10], [1, 5, 6, 8, 9], [1, 5, 6, 8, 10], [1, 5, 6, 8], [1, 5, 6, 9, 10], [1, 5, 6, 9], [1, 5, 6, 10], [1, 5, 6], [1, 5, 7, 8, 9, 10], [1, 5, 7, 8, 9], [1, 5, 7, 8, 10], [1, 5, 7, 8], [1, 5, 7, 9, 10], [1, 5, 7, 9], [1, 5, 7, 10], [1, 5, 7], [1, 5, 8, 9, 10], [1, 5, 8, 9], [1, 5, 8, 10], [1, 5, 8], [1, 5, 9, 10], [1, 5, 9], [1, 5, 10], [1, 5, 5], [1, 6, 7, 8, 9, 10], [1, 6, 7, 8, 9], [1, 6, 7, 8, 10], [1, 6, 7, 8], [1, 6, 7, 9, 10], [1, 6, 7, 9], [1, 6, 7, 10], [1, 6, 7], [1, 6, 8, 9, 10], [1, 6, 8, 9], [1, 6, 8, 10], [1, 6, 8], [1, 6, 9, 10], [1, 6, 9], [1, 6, 10], [1, 6], [1, 7, 8, 9, 10], [1, 7, 8, 9], [1, 7, 8, 10], [1, 7, 8], [1, 7, 9, 10], [1, 7, 9], [1, 7, 10], [1, 7], [1, 8, 9, 10], [1, 8, 9], [1, 8, 10], [1, 8], [1, 9, 10], [1, 9], [1, 10], [1, 1, 2, 3, 4, 5], [1, 1, 2, 3, 4], [1, 1, 2, 3, 5], [1, 1, 2, 3], [1, 1, 2, 4, 5], [1, 1, 2, 4], [1, 1, 2, 5], [1, 1, 2], [1, 1, 3, 4, 5], [1, 1, 3, 4], [1, 1, 3, 5], [1, 1, 3], [1, 1, 4, 5], [1, 1, 4], [1, 1, 5], [1, 1], [2, 3, 4, 5, 6, 7, 8, 9, 10], [2, 3, 4, 5, 6, 7, 8, 9], [2, 3, 4, 5, 6, 7, 8, 10], [2, 3, 4, 5, 6, 7, 8], [2, 3, 4, 5, 6, 7, 9, 10], [2, 3, 4, 5, 6, 7, 9], [2, 3, 4, 5, 6, 7, 10], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6, 8, 9, 10], [2, 3, 4, 5, 6, 8, 9], [2, 3, 4, 5, 6, 8, 10], [2, 3, 4, 5, 6, 8], [2, 3, 4, 5, 6, 9, 10], [2, 3, 4, 5, 6, 9], [2, 3, 4, 5, 6, 10], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7, 8, 9, 10], [2, 3, 4, 5, 7, 8, 9], [2, 3, 4, 5, 7, 8, 10], [2, 3, 4, 5, 7, 8], [2, 3, 4, 5, 7, 9, 10], [2, 3, 4, 5, 7, 9], [2, 3, 4, 5, 7, 10], [2, 3, 4, 5, 7], [2, 3, 4, 5, 8, 9, 10], [2, 3, 4, 5, 8, 9], [2, 3, 4, 5, 8, 10], [2, 3, 4, 5, 8], [2, 3, 4, 5, 9, 10], [2, 3, 4, 5, 9], [2, 3, 4, 5, 10], [2, 3, 4, 5, 5], [2, 3, 4, 6, 7, 8, 9, 10], [2, 3, 4, 6, 7, 8, 9], [2, 3, 4, 6, 7, 8, 10], [2, 3, 4, 6, 7, 8], [2, 3, 4, 6, 7, 9, 10], [2, 3, 4, 6, 7, 9], [2, 3, 4, 6, 7, 10], [2, 3, 4, 6, 7], [2, 3, 4, 6, 8, 9, 10], [2, 3, 4, 6, 8, 9], [2, 3, 4, 6, 8, 10], [2, 3, 4, 6, 8], [2, 3, 4, 6, 9, 10], [2, 3, 4, 6, 9], [2, 3, 4, 6, 10], [2, 3, 4, 6], [2, 3, 4, 7, 8, 9, 10], [2, 3, 4, 7, 8, 9], [2, 3, 4, 7, 8, 10], [2, 3, 4, 7, 8], [2, 3, 4, 7, 9, 10], [2, 3, 4, 7, 9], [2, 3, 4, 7, 10], [2, 3, 4, 7], [2, 3, 4, 8, 9, 10], [2, 3, 4, 8, 9], [2, 3, 4, 8, 10], [2, 3, 4, 8], [2, 3, 4, 9, 10], [2, 3, 4, 9], [2, 3, 4, 10], [2, 3, 4, 4, 5], [2, 3, 4, 4], [2, 3, 5, 6, 7, 8, 9, 10], [2, 3, 5, 6, 7, 8, 9], [2, 3, 5, 6, 7, 8, 10], [2, 3, 5, 6, 7, 8], [2, 3, 5, 6, 7, 9, 10], [2, 3, 5, 6, 7, 9], [2, 3, 5, 6, 7, 10], [2, 3, 5, 6, 7], [2, 3, 5, 6, 8, 9, 10], [2, 3, 5, 6, 8, 9], [2, 3, 5, 6, 8, 10], [2, 3, 5, 6, 8], [2, 3, 5, 6, 9, 10], [2, 3, 5, 6, 9], [2, 3, 5, 6, 10], [2, 3, 5, 6], [2, 3, 5, 7, 8, 9, 10], [2, 3, 5, 7, 8, 9], [2, 3, 5, 7, 8, 10], [2, 3, 5, 7, 8], [2, 3, 5, 7, 9, 10], [2, 3, 5, 7, 9], [2, 3, 5, 7, 10], [2, 3, 5, 7], [2, 3, 5, 8, 9, 10], [2, 3, 5, 8, 9], [2, 3, 5, 8, 10], [2, 3, 5, 8], [2, 3, 5, 9, 10], [2, 3, 5, 9], [2, 3, 5, 10], [2, 3, 5, 5], [2, 3, 6, 7, 8, 9, 10], [2, 3, 6, 7, 8, 9], [2, 3, 6, 7, 8, 10], [2, 3, 6, 7, 8], [2, 3, 6, 7, 9, 10], [2, 3, 6, 7, 9], [2, 3, 6, 7, 10], [2, 3, 6, 7], [2, 3, 6, 8, 9, 10], [2, 3, 6, 8, 9], [2, 3, 6, 8, 10], [2, 3, 6, 8], [2, 3, 6, 9, 10], [2, 3, 6, 9], [2, 3, 6, 10], [2, 3, 6], [2, 3, 7, 8, 9, 10], [2, 3, 7, 8, 9], [2, 3, 7, 8, 10], [2, 3, 7, 8], [2, 3, 7, 9, 10], [2, 3, 7, 9], [2, 3, 7, 10], [2, 3, 7], [2, 3, 8, 9, 10], [2, 3, 8, 9], [2, 3, 8, 10], [2, 3, 8], [2, 3, 9, 10], [2, 3, 9], [2, 3, 10], [2, 3, 3, 4, 5], [2, 3, 3, 4], [2, 3, 3, 5], [2, 3, 3], [2, 4, 5, 6, 7, 8, 9, 10], [2, 4, 5, 6, 7, 8, 9], [2, 4, 5, 6, 7, 8, 10], [2, 4, 5, 6, 7, 8], [2, 4, 5, 6, 7, 9, 10], [2, 4, 5, 6, 7, 9], [2, 4, 5, 6, 7, 10], [2, 4, 5, 6, 7], [2, 4, 5, 6, 8, 9, 10], [2, 4, 5, 6, 8, 9], [2, 4, 5, 6, 8, 10], [2, 4, 5, 6, 8], [2, 4, 5, 6, 9, 10], [2, 4, 5, 6, 9], [2, 4, 5, 6, 10], [2, 4, 5, 6], [2, 4, 5, 7, 8, 9, 10], [2, 4, 5, 7, 8, 9], [2, 4, 5, 7, 8, 10], [2, 4, 5, 7, 8], [2, 4, 5, 7, 9, 10], [2, 4, 5, 7, 9], [2, 4, 5, 7, 10], [2, 4, 5, 7], [2, 4, 5, 8, 9, 10], [2, 4, 5, 8, 9], [2, 4, 5, 8, 10], [2, 4, 5, 8], [2, 4, 5, 9, 10], [2, 4, 5, 9], [2, 4, 5, 10], [2, 4, 5, 5], [2, 4, 6, 7, 8, 9, 10], [2, 4, 6, 7, 8, 9], [2, 4, 6, 7, 8, 10], [2, 4, 6, 7, 8], [2, 4, 6, 7, 9, 10], [2, 4, 6, 7, 9], [2, 4, 6, 7, 10], [2, 4, 6, 7], [2, 4, 6, 8, 9, 10], [2, 4, 6, 8, 9], [2, 4, 6, 8, 10], [2, 4, 6, 8], [2, 4, 6, 9, 10], [2, 4, 6, 9], [2, 4, 6, 10], [2, 4, 6], [2, 4, 7, 8, 9, 10], [2, 4, 7, 8, 9], [2, 4, 7, 8, 10], [2, 4, 7, 8], [2, 4, 7, 9, 10], [2, 4, 7, 9], [2, 4, 7, 10], [2, 4, 7], [2, 4, 8, 9, 10], [2, 4, 8, 9], [2, 4, 8, 10], [2, 4, 8], [2, 4, 9, 10], [2, 4, 9], [2, 4, 10], [2, 4, 4, 5], [2, 4, 4], [2, 5, 6, 7, 8, 9, 10], [2, 5, 6, 7, 8, 9], [2, 5, 6, 7, 8, 10], [2, 5, 6, 7, 8], [2, 5, 6, 7, 9, 10], [2, 5, 6, 7, 9], [2, 5, 6, 7, 10], [2, 5, 6, 7], [2, 5, 6, 8, 9, 10], [2, 5, 6, 8, 9], [2, 5, 6, 8, 10], [2, 5, 6, 8], [2, 5, 6, 9, 10], [2, 5, 6, 9], [2, 5, 6, 10], [2, 5, 6], [2, 5, 7, 8, 9, 10], [2, 5, 7, 8, 9], [2, 5, 7, 8, 10], [2, 5, 7, 8], [2, 5, 7, 9, 10], [2, 5, 7, 9], [2, 5, 7, 10], [2, 5, 7], [2, 5, 8, 9, 10], [2, 5, 8, 9], [2, 5, 8, 10], [2, 5, 8], [2, 5, 9, 10], [2, 5, 9], [2, 5, 10], [2, 5, 5], [2, 6, 7, 8, 9, 10], [2, 6, 7, 8, 9], [2, 6, 7, 8, 10], [2, 6, 7, 8], [2, 6, 7, 9, 10], [2, 6, 7, 9], [2, 6, 7, 10], [2, 6, 7], [2, 6, 8, 9, 10], [2, 6, 8, 9], [2, 6, 8, 10], [2, 6, 8], [2, 6, 9, 10], [2, 6, 9], [2, 6, 10], [2, 6], [2, 7, 8, 9, 10], [2, 7, 8, 9], [2, 7, 8, 10], [2, 7, 8], [2, 7, 9, 10], [2, 7, 9], [2, 7, 10], [2, 7], [2, 8, 9, 10], [2, 8, 9], [2, 8, 10], [2, 8], [2, 9, 10], [2, 9], [2, 10], [2, 2, 3, 4, 5], [2, 2, 3, 4], [2, 2, 3, 5], [2, 2, 3], [2, 2, 4, 5], [2, 2, 4], [2, 2, 5], [2, 2], [3, 4, 5, 6, 7, 8, 9, 10], [3, 4, 5, 6, 7, 8, 9], [3, 4, 5, 6, 7, 8, 10], [3, 4, 5, 6, 7, 8], [3, 4, 5, 6, 7, 9, 10], [3, 4, 5, 6, 7, 9], [3, 4, 5, 6, 7, 10], [3, 4, 5, 6, 7], [3, 4, 5, 6, 8, 9, 10], [3, 4, 5, 6, 8, 9], [3, 4, 5, 6, 8, 10], [3, 4, 5, 6, 8], [3, 4, 5, 6, 9, 10], [3, 4, 5, 6, 9], [3, 4, 5, 6, 10], [3, 4, 5, 6], [3, 4, 5, 7, 8, 9, 10], [3, 4, 5, 7, 8, 9], [3, 4, 5, 7, 8, 10], [3, 4, 5, 7, 8], [3, 4, 5, 7, 9, 10], [3, 4, 5, 7, 9], [3, 4, 5, 7, 10], [3, 4, 5, 7], [3, 4, 5, 8, 9, 10], [3, 4, 5, 8, 9], [3, 4, 5, 8, 10], [3, 4, 5, 8], [3, 4, 5, 9, 10], [3, 4, 5, 9], [3, 4, 5, 10], [3, 4, 5, 5], [3, 4, 6, 7, 8, 9, 10], [3, 4, 6, 7, 8, 9], [3, 4, 6, 7, 8, 10], [3, 4, 6, 7, 8], [3, 4, 6, 7, 9, 10], [3, 4, 6, 7, 9], [3, 4, 6, 7, 10], [3, 4, 6, 7], [3, 4, 6, 8, 9, 10], [3, 4, 6, 8, 9], [3, 4, 6, 8, 10], [3, 4, 6, 8], [3, 4, 6, 9, 10], [3, 4, 6, 9], [3, 4, 6, 10], [3, 4, 6], [3, 4, 7, 8, 9, 10], [3, 4, 7, 8, 9], [3, 4, 7, 8, 10], [3, 4, 7, 8], [3, 4, 7, 9, 10], [3, 4, 7, 9], [3, 4, 7, 10], [3, 4, 7], [3, 4, 8, 9, 10], [3, 4, 8, 9], [3, 4, 8, 10], [3, 4, 8], [3, 4, 9, 10], [3, 4, 9], [3, 4, 10], [3, 4, 4, 5], [3, 4, 4], [3, 5, 6, 7, 8, 9, 10], [3, 5, 6, 7, 8, 9], [3, 5, 6, 7, 8, 10], [3, 5, 6, 7, 8], [3, 5, 6, 7, 9, 10], [3, 5, 6, 7, 9], [3, 5, 6, 7, 10], [3, 5, 6, 7], [3, 5, 6, 8, 9, 10], [3, 5, 6, 8, 9], [3, 5, 6, 8, 10], [3, 5, 6, 8], [3, 5, 6, 9, 10], [3, 5, 6, 9], [3, 5, 6, 10], [3, 5, 6], [3, 5, 7, 8, 9, 10], [3, 5, 7, 8, 9], [3, 5, 7, 8, 10], [3, 5, 7, 8], [3, 5, 7, 9, 10], [3, 5, 7, 9], [3, 5, 7, 10], [3, 5, 7], [3, 5, 8, 9, 10], [3, 5, 8, 9], [3, 5, 8, 10], [3, 5, 8], [3, 5, 9, 10], [3, 5, 9], [3, 5, 10], [3, 5, 5], [3, 6, 7, 8, 9, 10], [3, 6, 7, 8, 9], [3, 6, 7, 8, 10], [3, 6, 7, 8], [3, 6, 7, 9, 10], [3, 6, 7, 9], [3, 6, 7, 10], [3, 6, 7], [3, 6, 8, 9, 10], [3, 6, 8, 9], [3, 6, 8, 10], [3, 6, 8], [3, 6, 9, 10], [3, 6, 9], [3, 6, 10], [3, 6], [3, 7, 8, 9, 10], [3, 7, 8, 9], [3, 7, 8, 10], [3, 7, 8], [3, 7, 9, 10], [3, 7, 9], [3, 7, 10], [3, 7], [3, 8, 9, 10], [3, 8, 9], [3, 8, 10], [3, 8], [3, 9, 10], [3, 9], [3, 10], [3, 3, 4, 5], [3, 3, 4], [3, 3, 5], [3, 3], [4, 5, 6, 7, 8, 9, 10], [4, 5, 6, 7, 8, 9], [4, 5, 6, 7, 8, 10], [4, 5, 6, 7, 8], [4, 5, 6, 7, 9, 10], [4, 5, 6, 7, 9], [4, 5, 6, 7, 10], [4, 5, 6, 7], [4, 5, 6, 8, 9, 10], [4, 5, 6, 8, 9], [4, 5, 6, 8, 10], [4, 5, 6, 8], [4, 5, 6, 9, 10], [4, 5, 6, 9], [4, 5, 6, 10], [4, 5, 6], [4, 5, 7, 8, 9, 10], [4, 5, 7, 8, 9], [4, 5, 7, 8, 10], [4, 5, 7, 8], [4, 5, 7, 9, 10], [4, 5, 7, 9], [4, 5, 7, 10], [4, 5, 7], [4, 5, 8, 9, 10], [4, 5, 8, 9], [4, 5, 8, 10], [4, 5, 8], [4, 5, 9, 10], [4, 5, 9], [4, 5, 10], [4, 5, 5], [4, 6, 7, 8, 9, 10], [4, 6, 7, 8, 9], [4, 6, 7, 8, 10], [4, 6, 7, 8], [4, 6, 7, 9, 10], [4, 6, 7, 9], [4, 6, 7, 10], [4, 6, 7], [4, 6, 8, 9, 10], [4, 6, 8, 9], [4, 6, 8, 10], [4, 6, 8], [4, 6, 9, 10], [4, 6, 9], [4, 6, 10], [4, 6], [4, 7, 8, 9, 10], [4, 7, 8, 9], [4, 7, 8, 10], [4, 7, 8], [4, 7, 9, 10], [4, 7, 9], [4, 7, 10], [4, 7], [4, 8, 9, 10], [4, 8, 9], [4, 8, 10], [4, 8], [4, 9, 10], [4, 9], [4, 10], [4, 4, 5], [4, 4], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9], [5, 6, 7, 8, 10], [5, 6, 7, 8], [5, 6, 7, 9, 10], [5, 6, 7, 9], [5, 6, 7, 10], [5, 6, 7], [5, 6, 8, 9, 10], [5, 6, 8, 9], [5, 6, 8, 10], [5, 6, 8], [5, 6, 9, 10], [5, 6, 9], [5, 6, 10], [5, 6], [5, 7, 8, 9, 10], [5, 7, 8, 9], [5, 7, 8, 10], [5, 7, 8], [5, 7, 9, 10], [5, 7, 9], [5, 7, 10], [5, 7], [5, 8, 9, 10], [5, 8, 9], [5, 8, 10], [5, 8], [5, 9, 10], [5, 9], [5, 10], [5, 5], [6, 7, 8, 9, 10], [6, 7, 8, 9], [6, 7, 8, 10], [6, 7, 8], [6, 7, 9, 10], [6, 7, 9], [6, 7, 10], [6, 7], [6, 8, 9, 10], [6, 8, 9], [6, 8, 10], [6, 8], [6, 9, 10], [6, 9], [6, 10], [7, 8, 9, 10], [7, 8, 9], [7, 8, 10], [7, 8], [7, 9, 10], [7, 9], [7, 10], [8, 9, 10], [8, 9], [8, 10], [9, 10], [1, 2, 3, 4, 5], [1, 2, 3, 4], [1, 2, 3, 5], [1, 2, 3], [1, 2, 4, 5], [1, 2, 4], [1, 2, 5], [1, 2], [1, 3, 4, 5], [1, 3, 4], [1, 3, 5], [1, 3], [1, 4, 5], [1, 4], [1, 5], [2, 3, 4, 5], [2, 3, 4], [2, 3, 5], [2, 3], [2, 4, 5], [2, 4], [2, 5], [3, 4, 5], [3, 4], [3, 5], [4, 5]])\n assert answers_match(candidate(nums=[3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3]), [[3, 3, 3, 3, 3, 3, 3, 3], [2, 3, 3, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2, 2, 2], [3, 3, 3, 3, 3, 3, 3], [2, 3, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3, 3], [2, 2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2, 2], [3, 3, 3, 3, 3, 3], [2, 3, 3, 3, 3, 3], [2, 2, 3, 3, 3, 3], [2, 2, 2, 3, 3, 3], [2, 2, 2, 2, 3, 3], [2, 2, 2, 2, 2, 3], [2, 2, 2, 2, 2], [3, 3, 3, 3, 3], [2, 3, 3, 3, 3], [2, 2, 3, 3, 3], [2, 2, 2, 3, 3], [2, 2, 2, 2, 3], [2, 2, 2, 2], [3, 3, 3, 3], [2, 3, 3, 3], [2, 2, 3, 3], [2, 2, 2, 3], [2, 2, 2], [3, 3, 3], [2, 3, 3], [2, 2, 3], [2, 2], [3, 3], [2, 3]])\n assert answers_match(candidate(nums=[0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0]), [[0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6], [0, 1, 2, 3, 4, 5, 7], [0, 1, 2, 3, 4, 5], [0, 1, 2, 3, 4, 6, 7], [0, 1, 2, 3, 4, 6], [0, 1, 2, 3, 4, 7], [0, 1, 2, 3, 4], [0, 1, 2, 3, 5, 6, 7], [0, 1, 2, 3, 5, 6], [0, 1, 2, 3, 5, 7], [0, 1, 2, 3, 5], [0, 1, 2, 3, 6, 7], [0, 1, 2, 3, 6], [0, 1, 2, 3, 7], [0, 1, 2, 3], [0, 1, 2, 4, 5, 6, 7], [0, 1, 2, 4, 5, 6], [0, 1, 2, 4, 5, 7], [0, 1, 2, 4, 5], [0, 1, 2, 4, 6, 7], [0, 1, 2, 4, 6], [0, 1, 2, 4, 7], [0, 1, 2, 4], [0, 1, 2, 5, 6, 7], [0, 1, 2, 5, 6], [0, 1, 2, 5, 7], [0, 1, 2, 5], [0, 1, 2, 6, 7], [0, 1, 2, 6], [0, 1, 2, 7], [0, 1, 2], [0, 1, 3, 4, 5, 6, 7], [0, 1, 3, 4, 5, 6], [0, 1, 3, 4, 5, 7], [0, 1, 3, 4, 5], [0, 1, 3, 4, 6, 7], [0, 1, 3, 4, 6], [0, 1, 3, 4, 7], [0, 1, 3, 4], [0, 1, 3, 5, 6, 7], [0, 1, 3, 5, 6], [0, 1, 3, 5, 7], [0, 1, 3, 5], [0, 1, 3, 6, 7], [0, 1, 3, 6], [0, 1, 3, 7], [0, 1, 3], [0, 1, 4, 5, 6, 7], [0, 1, 4, 5, 6], [0, 1, 4, 5, 7], [0, 1, 4, 5], [0, 1, 4, 6, 7], [0, 1, 4, 6], [0, 1, 4, 7], [0, 1, 4], [0, 1, 5, 6, 7], [0, 1, 5, 6], [0, 1, 5, 7], [0, 1, 5], [0, 1, 6, 7], [0, 1, 6], [0, 1, 7], [0, 1], [0, 0, 2, 3, 4, 5, 6, 7], [0, 0, 2, 3, 4, 5, 6], [0, 0, 2, 3, 4, 5, 7], [0, 0, 2, 3, 4, 5], [0, 0, 2, 3, 4, 6, 7], [0, 0, 2, 3, 4, 6], [0, 0, 2, 3, 4, 7], [0, 0, 2, 3, 4], [0, 0, 2, 3, 5, 6, 7], [0, 0, 2, 3, 5, 6], [0, 0, 2, 3, 5, 7], [0, 0, 2, 3, 5], [0, 0, 2, 3, 6, 7], [0, 0, 2, 3, 6], [0, 0, 2, 3, 7], [0, 0, 2, 3], [0, 0, 2, 4, 5, 6, 7], [0, 0, 2, 4, 5, 6], [0, 0, 2, 4, 5, 7], [0, 0, 2, 4, 5], [0, 0, 2, 4, 6, 7], [0, 0, 2, 4, 6], [0, 0, 2, 4, 7], [0, 0, 2, 4], [0, 0, 2, 5, 6, 7], [0, 0, 2, 5, 6], [0, 0, 2, 5, 7], [0, 0, 2, 5], [0, 0, 2, 6, 7], [0, 0, 2, 6], [0, 0, 2, 7], [0, 0, 2], [0, 0, 0, 3, 4, 5, 6, 7], [0, 0, 0, 3, 4, 5, 6], [0, 0, 0, 3, 4, 5, 7], [0, 0, 0, 3, 4, 5], [0, 0, 0, 3, 4, 6, 7], [0, 0, 0, 3, 4, 6], [0, 0, 0, 3, 4, 7], [0, 0, 0, 3, 4], [0, 0, 0, 3, 5, 6, 7], [0, 0, 0, 3, 5, 6], [0, 0, 0, 3, 5, 7], [0, 0, 0, 3, 5], [0, 0, 0, 3, 6, 7], [0, 0, 0, 3, 6], [0, 0, 0, 3, 7], [0, 0, 0, 3], [0, 0, 0, 0, 4, 5, 6, 7], [0, 0, 0, 0, 4, 5, 6], [0, 0, 0, 0, 4, 5, 7], [0, 0, 0, 0, 4, 5], [0, 0, 0, 0, 4, 6, 7], [0, 0, 0, 0, 4, 6], [0, 0, 0, 0, 4, 7], [0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 5, 6, 7], [0, 0, 0, 0, 0, 5, 6], [0, 0, 0, 0, 0, 5, 7], [0, 0, 0, 0, 0, 5], [0, 0, 0, 0, 0, 0, 6, 7], [0, 0, 0, 0, 0, 0, 6], [0, 0, 0, 0, 0, 0, 0, 7], [0, 0, 0, 0, 0, 0, 0, 0], [1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6], [1, 2, 3, 4, 5, 7], [1, 2, 3, 4, 5], [1, 2, 3, 4, 6, 7], [1, 2, 3, 4, 6], [1, 2, 3, 4, 7], [1, 2, 3, 4], [1, 2, 3, 5, 6, 7], [1, 2, 3, 5, 6], [1, 2, 3, 5, 7], [1, 2, 3, 5], [1, 2, 3, 6, 7], [1, 2, 3, 6], [1, 2, 3, 7], [1, 2, 3], [1, 2, 4, 5, 6, 7], [1, 2, 4, 5, 6], [1, 2, 4, 5, 7], [1, 2, 4, 5], [1, 2, 4, 6, 7], [1, 2, 4, 6], [1, 2, 4, 7], [1, 2, 4], [1, 2, 5, 6, 7], [1, 2, 5, 6], [1, 2, 5, 7], [1, 2, 5], [1, 2, 6, 7], [1, 2, 6], [1, 2, 7], [1, 2], [1, 3, 4, 5, 6, 7], [1, 3, 4, 5, 6], [1, 3, 4, 5, 7], [1, 3, 4, 5], [1, 3, 4, 6, 7], [1, 3, 4, 6], [1, 3, 4, 7], [1, 3, 4], [1, 3, 5, 6, 7], [1, 3, 5, 6], [1, 3, 5, 7], [1, 3, 5], [1, 3, 6, 7], [1, 3, 6], [1, 3, 7], [1, 3], [1, 4, 5, 6, 7], [1, 4, 5, 6], [1, 4, 5, 7], [1, 4, 5], [1, 4, 6, 7], [1, 4, 6], [1, 4, 7], [1, 4], [1, 5, 6, 7], [1, 5, 6], [1, 5, 7], [1, 5], [1, 6, 7], [1, 6], [1, 7], [0, 2, 3, 4, 5, 6, 7], [0, 2, 3, 4, 5, 6], [0, 2, 3, 4, 5, 7], [0, 2, 3, 4, 5], [0, 2, 3, 4, 6, 7], [0, 2, 3, 4, 6], [0, 2, 3, 4, 7], [0, 2, 3, 4], [0, 2, 3, 5, 6, 7], [0, 2, 3, 5, 6], [0, 2, 3, 5, 7], [0, 2, 3, 5], [0, 2, 3, 6, 7], [0, 2, 3, 6], [0, 2, 3, 7], [0, 2, 3], [0, 2, 4, 5, 6, 7], [0, 2, 4, 5, 6], [0, 2, 4, 5, 7], [0, 2, 4, 5], [0, 2, 4, 6, 7], [0, 2, 4, 6], [0, 2, 4, 7], [0, 2, 4], [0, 2, 5, 6, 7], [0, 2, 5, 6], [0, 2, 5, 7], [0, 2, 5], [0, 2, 6, 7], [0, 2, 6], [0, 2, 7], [0, 2], [0, 0, 3, 4, 5, 6, 7], [0, 0, 3, 4, 5, 6], [0, 0, 3, 4, 5, 7], [0, 0, 3, 4, 5], [0, 0, 3, 4, 6, 7], [0, 0, 3, 4, 6], [0, 0, 3, 4, 7], [0, 0, 3, 4], [0, 0, 3, 5, 6, 7], [0, 0, 3, 5, 6], [0, 0, 3, 5, 7], [0, 0, 3, 5], [0, 0, 3, 6, 7], [0, 0, 3, 6], [0, 0, 3, 7], [0, 0, 3], [0, 0, 0, 4, 5, 6, 7], [0, 0, 0, 4, 5, 6], [0, 0, 0, 4, 5, 7], [0, 0, 0, 4, 5], [0, 0, 0, 4, 6, 7], [0, 0, 0, 4, 6], [0, 0, 0, 4, 7], [0, 0, 0, 4], [0, 0, 0, 0, 5, 6, 7], [0, 0, 0, 0, 5, 6], [0, 0, 0, 0, 5, 7], [0, 0, 0, 0, 5], [0, 0, 0, 0, 0, 6, 7], [0, 0, 0, 0, 0, 6], [0, 0, 0, 0, 0, 0, 7], [0, 0, 0, 0, 0, 0, 0], [2, 3, 4, 5, 6, 7], [2, 3, 4, 5, 6], [2, 3, 4, 5, 7], [2, 3, 4, 5], [2, 3, 4, 6, 7], [2, 3, 4, 6], [2, 3, 4, 7], [2, 3, 4], [2, 3, 5, 6, 7], [2, 3, 5, 6], [2, 3, 5, 7], [2, 3, 5], [2, 3, 6, 7], [2, 3, 6], [2, 3, 7], [2, 3], [2, 4, 5, 6, 7], [2, 4, 5, 6], [2, 4, 5, 7], [2, 4, 5], [2, 4, 6, 7], [2, 4, 6], [2, 4, 7], [2, 4], [2, 5, 6, 7], [2, 5, 6], [2, 5, 7], [2, 5], [2, 6, 7], [2, 6], [2, 7], [0, 3, 4, 5, 6, 7], [0, 3, 4, 5, 6], [0, 3, 4, 5, 7], [0, 3, 4, 5], [0, 3, 4, 6, 7], [0, 3, 4, 6], [0, 3, 4, 7], [0, 3, 4], [0, 3, 5, 6, 7], [0, 3, 5, 6], [0, 3, 5, 7], [0, 3, 5], [0, 3, 6, 7], [0, 3, 6], [0, 3, 7], [0, 3], [0, 0, 4, 5, 6, 7], [0, 0, 4, 5, 6], [0, 0, 4, 5, 7], [0, 0, 4, 5], [0, 0, 4, 6, 7], [0, 0, 4, 6], [0, 0, 4, 7], [0, 0, 4], [0, 0, 0, 5, 6, 7], [0, 0, 0, 5, 6], [0, 0, 0, 5, 7], [0, 0, 0, 5], [0, 0, 0, 0, 6, 7], [0, 0, 0, 0, 6], [0, 0, 0, 0, 0, 7], [0, 0, 0, 0, 0, 0], [3, 4, 5, 6, 7], [3, 4, 5, 6], [3, 4, 5, 7], [3, 4, 5], [3, 4, 6, 7], [3, 4, 6], [3, 4, 7], [3, 4], [3, 5, 6, 7], [3, 5, 6], [3, 5, 7], [3, 5], [3, 6, 7], [3, 6], [3, 7], [0, 4, 5, 6, 7], [0, 4, 5, 6], [0, 4, 5, 7], [0, 4, 5], [0, 4, 6, 7], [0, 4, 6], [0, 4, 7], [0, 4], [0, 0, 5, 6, 7], [0, 0, 5, 6], [0, 0, 5, 7], [0, 0, 5], [0, 0, 0, 6, 7], [0, 0, 0, 6], [0, 0, 0, 0, 7], [0, 0, 0, 0, 0], [4, 5, 6, 7], [4, 5, 6], [4, 5, 7], [4, 5], [4, 6, 7], [4, 6], [4, 7], [0, 5, 6, 7], [0, 5, 6], [0, 5, 7], [0, 5], [0, 0, 6, 7], [0, 0, 6], [0, 0, 0, 7], [0, 0, 0, 0], [5, 6, 7], [5, 6], [5, 7], [0, 6, 7], [0, 6], [0, 0, 7], [0, 0, 0], [6, 7], [0, 7], [0, 0]])\n assert answers_match(candidate(nums=[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]), [[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5], [5, 5, 5], [5, 5]])\n assert answers_match(candidate(nums=[3, 3, 3, 2, 2, 2, 1, 1, 1, 0, 0, 0, -1, -1, -1]), [[3, 3, 3], [3, 3], [2, 2, 2], [2, 2], [1, 1, 1], [1, 1], [0, 0, 0], [0, 0], [-1, -1, -1], [-1, -1]])\n assert answers_match(candidate(nums=[7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]), [[7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7, 7], [7, 7, 7, 7, 7], [7, 7, 7, 7], [7, 7, 7], [7, 7]])\n", "comparison": "unordered"}, "public_tests": ["[4,6,7,7]", "[4,4,3,2,1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findSubsequences", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:03+00:00", "tests_total": 103, "tests_dropped": 5, "flags": ["any_order"], "topic_tags": ["array", "hash-table", "backtracking", "bit-manipulation"]}, "language": "ruby", "interface": {"raw_signature": "def find_subsequences(nums)", "container": null, "callable": "find_subsequences", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 492, "task_id": "construct-the-rectangle", "difficulty": "Easy", "problem_description": "A web developer needs to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L and width W satisfy the following requirements:\n\n1. The area of the rectangular web page you designed must equal to the given target area.\n2. The width W should not be larger than the length L, which means L >= W.\n3. The difference between length L and width W should be as small as possible.\n\nReturn an array [L, W] where L and W are the length and width of the web page you designed in sequence.\n\nExample 1:\n\nInput: area = 4\nOutput: [2,2]\nExplanation: The target area is 4, and all the possible ways to construct it are [1,4], [2,2], [4,1].\nBut according to requirement 2, [1,4] is illegal; according to requirement 3, [4,1] is not optimal compared to [2,2]. So the length L is 2, and the width W is 2.\n\nExample 2:\n\nInput: area = 37\nOutput: [37,1]\n\nExample 3:\n\nInput: area = 122122\nOutput: [427,286]\n\nConstraints:\n\n- 1 <= area <= 10^7\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(area = 81) == [9, 9]\n assert candidate(area = 122122) == [427, 286]\n assert candidate(area = 37) == [37, 1]\n assert candidate(area = 10000000) == [3200, 3125]\n assert candidate(area = 1) == [1, 1]\n assert candidate(area = 4) == [2, 2]\n assert candidate(area = 50) == [10, 5]\n assert candidate(area = 10000) == [100, 100]\n assert candidate(area = 999999) == [1001, 999]\n assert candidate(area = 60) == [10, 6]\n assert candidate(area = 314159) == [314159, 1]\n assert candidate(area = 9876543) == [14503, 681]\n assert candidate(area = 7920) == [90, 88]\n assert candidate(area = 131072) == [512, 256]\n assert candidate(area = 841) == [29, 29]\n assert candidate(area = 98765) == [19753, 5]\n assert candidate(area = 625) == [25, 25]\n assert candidate(area = 1024) == [32, 32]\n assert candidate(area = 8281) == [91, 91]\n assert candidate(area = 86400) == [300, 288]\n assert candidate(area = 12345) == [823, 15]\n assert candidate(area = 1000000) == [1000, 1000]\n assert candidate(area = 8192) == [128, 64]\n assert candidate(area = 432432) == [693, 624]\n assert candidate(area = 121) == [11, 11]\n assert candidate(area = 333333) == [693, 481]\n assert candidate(area = 1048576) == [1024, 1024]\n assert candidate(area = 54321) == [953, 57]\n assert candidate(area = 250000) == [500, 500]\n assert candidate(area = 9801) == [99, 99]\n assert candidate(area = 2345678) == [50993, 46]\n assert candidate(area = 1111111) == [4649, 239]\n assert candidate(area = 9999999) == [4649, 2151]\n assert candidate(area = 987654) == [1697, 582]\n assert candidate(area = 84100) == [290, 290]\n assert candidate(area = 9999997) == [1428571, 7]\n assert candidate(area = 500500) == [715, 700]\n assert candidate(area = 9999991) == [9999991, 1]\n assert candidate(area = 102400) == [320, 320]\n assert candidate(area = 49) == [7, 7]\n assert candidate(area = 7654321) == [402859, 19]\n assert candidate(area = 1413721) == [1189, 1189]\n assert candidate(area = 5000000) == [2500, 2000]\n assert candidate(area = 123456) == [643, 192]\n assert candidate(area = 9765625) == [3125, 3125]\n assert candidate(area = 100) == [10, 10]\n assert candidate(area = 555555) == [777, 715]\n assert candidate(area = 169) == [13, 13]\n assert candidate(area = 720) == [30, 24]\n assert candidate(area = 2000000) == [1600, 1250]\n assert candidate(area = 67600) == [260, 260]\n assert candidate(area = 676) == [26, 26]\n assert candidate(area = 1234567) == [9721, 127]\n assert candidate(area = 3199128) == [7841, 408]\n assert candidate(area = 111111) == [407, 273]\n assert candidate(area = 2048) == [64, 32]\n assert candidate(area = 65536) == [256, 256]\n assert candidate(area = 73456) == [4591, 16]\n assert candidate(area = 1000001) == [9901, 101]\n", "comparison": "exact"}, "public_tests": ["4", "37", "122122"], "hints": ["The W is always less than or equal to the square root of the area, so we start searching at sqrt(area) till we find the result."], "metadata": {"canonical_parameter_names": ["area"], "leetcode_dataset_entry_point": "Solution().constructRectangle", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:05+00:00", "tests_total": 74, "tests_dropped": 15, "flags": [], "topic_tags": ["math"]}, "language": "ruby", "interface": {"raw_signature": "def construct_rectangle(area)", "container": null, "callable": "construct_rectangle", "parameters": [{"name": "area", "type": "Integer"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 493, "task_id": "reverse-pairs", "difficulty": "Hard", "problem_description": "Given an integer array nums, return the number of reverse pairs in the array.\n\nA reverse pair is a pair (i, j) where:\n\n- 0 <= i < j < nums.length and\n- nums[i] > 2 * nums[j].\n\nExample 1:\n\nInput: nums = [1,3,2,3,1]\nOutput: 2\nExplanation: The reverse pairs are:\n(1, 4) --> nums[1] = 3, nums[4] = 1, 3 > 2 * 1\n(3, 4) --> nums[3] = 3, nums[4] = 1, 3 > 2 * 1\n\nExample 2:\n\nInput: nums = [2,4,3,5,1]\nOutput: 3\nExplanation: The reverse pairs are:\n(1, 4) --> nums[1] = 4, nums[4] = 1, 4 > 2 * 1\n(2, 4) --> nums[2] = 3, nums[4] = 1, 3 > 2 * 1\n(3, 4) --> nums[3] = 5, nums[4] = 1, 5 > 2 * 1\n\nConstraints:\n\n- 1 <= nums.length <= 5 * 10^4\n- -2^31 <= nums[i] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [8, 6, 4, 2, 1, 3, 5, 7, 9]) == 6\n assert candidate(nums = [2147483647, -2147483648, 0, 1, -1]) == 6\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 20\n assert candidate(nums = [1, 5, 3, 4, 2]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(nums = [1, 3, 2, 3, 1]) == 2\n assert candidate(nums = [1, 2, 3, 0, -1, -2, -3]) == 18\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 90\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 0\n assert candidate(nums = [-1, -2, -3, -4, -5]) == 10\n assert candidate(nums = [10, 20, 30, 40, 50]) == 0\n assert candidate(nums = [-1, -2, -3, -4, -5]) == 10\n assert candidate(nums = [-5, -4, -3, -2, -1]) == 4\n assert candidate(nums = [0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5]) == 0\n assert candidate(nums = [2147483647, -2147483648, 2147483647, -2147483648]) == 4\n assert candidate(nums = [5, 2, 6, 1]) == 3\n assert candidate(nums = [0]) == 0\n assert candidate(nums = [1000000000, -1000000000, 2000000000, -2000000000]) == 4\n assert candidate(nums = [5, 4, 3, 2, 1]) == 4\n assert candidate(nums = [2, 4, 3, 5, 1]) == 3\n assert candidate(nums = [-5, -4, -3, -2, -1]) == 4\n assert candidate(nums = [1, 5, 3, 7, 9, 2, 4, 6, 8]) == 4\n assert candidate(nums = [2, 2, 2, 2, 2]) == 0\n assert candidate(nums = [50, 40, 30, 20, 10]) == 4\n assert candidate(nums = [5, -5, 15, -15, 25, -25, 35, -35]) == 16\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288]) == 0\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 500000000, 500000000, 500000000, 500000000, 500000000]) == 0\n assert candidate(nums = [0, -1, 1, -2, 2, -3, 3, -4, 4, -5, 5]) == 25\n assert candidate(nums = [-1000000000, -1000000001, -1000000002, -1000000003, -1000000004, -1000000005]) == 15\n assert candidate(nums = [1, 4, 2, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15, 18, 17, 20, 19]) == 0\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 90\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10, 11, 13, 15, 12, 14, 16, 18, 17, 19, 20]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]) == 13\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 0\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 49\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 0\n assert candidate(nums = [5, 2, 6, 1, 4, 3, 8, 7]) == 3\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 49\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == 0\n assert candidate(nums = [3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 9, 7, 9, 3, 2, 3, 8, 4, 6]) == 25\n assert candidate(nums = [1000000000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 19\n assert candidate(nums = [2147483647, -2147483648, 2147483646, -2147483647, 2147483645]) == 4\n assert candidate(nums = [10, 20, 30, 40, 50, 1, 2, 3, 4, 5]) == 24\n assert candidate(nums = [1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1]) == 12\n assert candidate(nums = [5, 3, 10, 20, 1, 8, 15, 6, 11]) == 7\n assert candidate(nums = [-5, -3, -1, 1, 3, 5, -4, -2, 0, 2, 4, 6, -3, -1, 1, 3, 5, 7]) == 40\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 5, 15, 25, 35, 45]) == 6\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == 4\n assert candidate(nums = [2147483647, -2147483648, 1073741823, -1073741824, 536870911, -536870912]) == 9\n assert candidate(nums = [5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 2, 2, 1]) == 22\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -2, -3, -4, -5]) == 60\n assert candidate(nums = [-2147483648, 2147483647, -2147483648, 2147483647, -2147483648, 2147483647, -2147483648, 2147483647, -2147483648, 2147483647]) == 20\n assert candidate(nums = [-2147483648, -2147483647, -2147483646, -2147483645, -2147483644, -2147483643, -2147483642, -2147483641]) == 28\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19]) == 190\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) == 0\n assert candidate(nums = [1, 9, 2, 8, 3, 7, 4, 6, 5, 0]) == 13\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125]) == 36\n assert candidate(nums = [3, 1, 2, 2, 2, 3, 1, 2, 3, 1]) == 6\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 185\n assert candidate(nums = [1, 4, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 0\n assert candidate(nums = [-1000000000, -500000000, -250000000, -125000000, -62500000, -31250000, -15625000, -7812500, -3906250, -1953125]) == 0\n assert candidate(nums = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38]) == 0\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125]) == 36\n assert candidate(nums = [2147483647, 2147483646, 2147483645, 2147483644, 2147483643, 2147483642, 2147483641, 2147483640]) == 0\n assert candidate(nums = [-1, 1, -1, 1, -1, 1]) == 6\n assert candidate(nums = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 11, 20, 19, 18, 17, 16, 15, 14, 13, 12]) == 5\n assert candidate(nums = [1, 5, 2, 6, 3, 7, 4, 8, 5, 9]) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 0\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 49\n assert candidate(nums = [1, 5, 3, 4, 2, 8, 6, 7]) == 1\n assert candidate(nums = [1, 10, 2, 9, 3, 8, 4, 7, 5, 6, 11, 20, 12, 19, 13, 18, 14, 17, 15, 16]) == 5\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 20\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10]) == 100\n assert candidate(nums = [9, 4, 2, 10, 7, 3, 8, 1, 5, 6]) == 11\n assert candidate(nums = [0, -1, -2, -3, -4, 0, 1, 2, 3, 4]) == 10\n assert candidate(nums = [38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0]) == 100\n assert candidate(nums = [512, 256, 128, 64, 32, 16, 8, 4, 2, 1]) == 36\n assert candidate(nums = [1, 2, 3, 4, 5, 10, 20, 30, 40, 50, 100, 200, 300, 400, 500]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 10]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(nums = [4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647]) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [3, 1, 2, 4, 5, 10, 9, 8, 7, 6]) == 1\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 0\n assert candidate(nums = [1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0]) == 55\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990]) == 0\n assert candidate(nums = [3, 3, 3, 2, 2, 1, 1, 5, 5, 4, 4]) == 6\n assert candidate(nums = [1000000000, 1000000001, 1000000002, 1000000003, 1000000004, 1000000005]) == 0\n assert candidate(nums = [-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10]) == 90\n assert candidate(nums = [30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16]) == 0\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 49\n assert candidate(nums = [-1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1, -1, 0, 1]) == 40\n assert candidate(nums = [100, 200, 300, 400, 500, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 50\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39]) == 0\n assert candidate(nums = [5, 2, 6, 1, 8, 7, 3, 4, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == 20\n assert candidate(nums = [1000000000, 500000000, 250000000, 125000000, 62500000, 31250000, 15625000, 7812500, 3906250, 1953125, 976562, 488281, 244140, 122070, 61035, 30517, 15258, 7629, 3814, 1907]) == 176\n assert candidate(nums = [9, 18, 27, 36, 45, 4, 8, 12, 16, 20]) == 15\n assert candidate(nums = [2, 4, 6, 8, 10, 1, 3, 5, 7, 9]) == 6\n assert candidate(nums = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]) == 0\n assert candidate(nums = [-2147483648, 2147483647, -2147483647, 2147483646, -2147483646, 2147483645, -2147483645, 2147483644, -2147483644, 2147483643]) == 20\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == 25\n assert candidate(nums = [5, 2, 6, 1, 9, 4, 3, 7]) == 5\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95]) == 25\n assert candidate(nums = [1, 3, 2, 3, 1, 4, 5, 6, 7, 8]) == 2\n assert candidate(nums = [1, 3, 2, 3, 1, 4, 2, 3, 1, 4, 2, 3, 1, 4, 2]) == 12\n assert candidate(nums = [5, 2, 6, 1, 3, 4]) == 3\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 25\n assert candidate(nums = [2147483647, 1073741823, 536870911, 268435455, 134217727, 67108863, 33554431, 16777215, 8388607, 4194303, 2097151, 1048575, 524287, 262143, 131071, 65535, 32767, 16383, 8191, 4095]) == 190\n assert candidate(nums = [1, 3, 2, 3, 1, 4, 2, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]) == 2\n assert candidate(nums = [1, 2, 3, 2, 1, 4, 5, 4, 3, 2, 1]) == 7\n assert candidate(nums = [45, 40, 35, 30, 25, 20, 15, 10, 5, 0]) == 25\n", "comparison": "exact"}, "public_tests": ["[1,3,2,3,1]", "[2,4,3,5,1]"], "hints": ["Use the merge-sort technique.", "Divide the array into two parts and sort them.", "For each integer in the first part, count the number of integers that satisfy the condition from the second part. Use the pointer to help you in the counting process."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().reversePairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:08+00:00", "tests_total": 126, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "binary-search", "divide-and-conquer", "binary-indexed-tree", "segment-tree", "merge-sort", "ordered-set", "treap"]}, "language": "ruby", "interface": {"raw_signature": "def reverse_pairs(nums)", "container": null, "callable": "reverse_pairs", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 494, "task_id": "target-sum", "difficulty": "Medium", "problem_description": "You are given an integer array nums and an integer target.\n\nYou want to build an expression out of nums by adding one of the symbols '+' and '-' before each integer in nums and then concatenate all the integers.\n\n- For example, if nums = [2, 1], you can add a '+' before 2 and a '-' before 1 and concatenate them to build the expression \"+2-1\".\n\nReturn the number of different expressions that you can build, which evaluates to target.\n\nExample 1:\n\nInput: nums = [1,1,1,1,1], target = 3\nOutput: 5\nExplanation: There are 5 ways to assign symbols to make the sum of nums be target 3.\n-1 + 1 + 1 + 1 + 1 = 3\n+1 - 1 + 1 + 1 + 1 = 3\n+1 + 1 - 1 + 1 + 1 = 3\n+1 + 1 + 1 - 1 + 1 = 3\n+1 + 1 + 1 + 1 - 1 = 3\n\nExample 2:\n\nInput: nums = [1], target = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= nums.length <= 20\n- 0 <= nums[i] <= 1000\n- 0 <= sum(nums[i]) <= 1000\n- -1000 <= target <= 1000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [10, 20, 30],target = 60) == 1\n assert candidate(nums = [1, 2, 3, 4, 5],target = 3) == 3\n assert candidate(nums = [0, 0, 0, 0, 0],target = 0) == 32\n assert candidate(nums = [1000],target = 1000) == 1\n assert candidate(nums = [1],target = 1) == 1\n assert candidate(nums = [1, 2, 3, 4, 5],target = 10) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],target = 0) == 1024\n assert candidate(nums = [10, 20, 30, 40, 50],target = 100) == 0\n assert candidate(nums = [1, 2, 3, 4, 5],target = 3) == 3\n assert candidate(nums = [5, 5, 5, 5, 5],target = 15) == 5\n assert candidate(nums = [10, 20, 30, 40, 50],target = 15) == 0\n assert candidate(nums = [1, 1, 1, 1, 1],target = 3) == 5\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 5) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],target = 1000) == 10\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = -250) == 20\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50],target = 250) == 0\n assert candidate(nums = [100, 200, 300, 400, 500],target = 500) == 3\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 300) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],target = 1) == 524288\n assert candidate(nums = [33, 49, 84, 43, 22, 14, 15, 57, 31, 30, 83, 84, 29, 3, 23, 76, 69, 38, 83, 12],target = 21) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 2) == 167960\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 0) == 184756\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 1) == 0\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19],target = 20) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 100) == 2865\n assert candidate(nums = [100, 50, 25, 12, 6, 3, 1],target = 100) == 0\n assert candidate(nums = [1, 1, 2, 3, 5],target = 3) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 1000) == 2865\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 5) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 0) == 0\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],target = 0) == 76\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105],target = 525) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = -5) == 39\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 10) == 15504\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 250) == 20\n assert candidate(nums = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500],target = 1000) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 10) == 15504\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 250) == 20\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],target = 100) == 5126\n assert candidate(nums = [500, 500, 500, 500, 500],target = 1000) == 0\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],target = 550) == 1969\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],target = 0) == 29504\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 0) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 10) == 15029\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],target = 5) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 1) == 40\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70],target = 100) == 6\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = -500) == 10206\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 500) == 10206\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],target = 20) == 0\n assert candidate(nums = [999, 1000, 999, 1000, 999, 1000],target = 0) == 0\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],target = 2) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 1000) == 2865\n assert candidate(nums = [9, 7, 5, 3, 1],target = 3) == 1\n assert candidate(nums = [25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25],target = 250) == 15504\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],target = 50) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 30) == 0\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100],target = 500) == 2865\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 20) == 0\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5],target = 15) == 1062\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],target = 5) == 0\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],target = 45) == 0\n assert candidate(nums = [2, 10, 3, 5, 6, 9, 8],target = 20) == 0\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 15) == 0\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],target = 15) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],target = 0) == 184756\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],target = 0) == 252\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 50) == 10206\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 25) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],target = 5) == 39\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 20) == 14326\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],target = 550) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],target = 0) == 15272\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],target = 15) == 34\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],target = 10) == 21\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],target = 0) == 15272\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],target = 200) == 2865\n assert candidate(nums = [5, 10, 15, 20, 25, 30],target = 50) == 0\n", "comparison": "exact"}, "public_tests": ["[1,1,1,1,1]\n3", "[1]\n1"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "target"], "leetcode_dataset_entry_point": "Solution().findTargetSumWays", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:10+00:00", "tests_total": 85, "tests_dropped": 7, "flags": [], "topic_tags": ["array", "dynamic-programming", "backtracking", "knapsack-problem", "0-1-knapsack"]}, "language": "ruby", "interface": {"raw_signature": "def find_target_sum_ways(nums, target)", "container": null, "callable": "find_target_sum_ways", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "target", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 495, "task_id": "teemo-attacking", "difficulty": "Easy", "problem_description": "Our hero Teemo is attacking an enemy Ashe with poison attacks! When Teemo attacks Ashe, Ashe gets poisoned for a exactly duration seconds. More formally, an attack at second t will mean Ashe is poisoned during the inclusive time interval [t, t + duration - 1]. If Teemo attacks again before the poison effect ends, the timer for it is reset, and the poison effect will end duration seconds after the new attack.\n\nYou are given a non-decreasing integer array timeSeries, where timeSeries[i] denotes that Teemo attacks Ashe at second timeSeries[i], and an integer duration.\n\nReturn the total number of seconds that Ashe is poisoned.\n\nExample 1:\n\nInput: timeSeries = [1,4], duration = 2\nOutput: 4\nExplanation: Teemo's attacks on Ashe go as follows:\n- At second 1, Teemo attacks, and Ashe is poisoned for seconds 1 and 2.\n- At second 4, Teemo attacks, and Ashe is poisoned for seconds 4 and 5.\nAshe is poisoned for seconds 1, 2, 4, and 5, which is 4 seconds in total.\n\nExample 2:\n\nInput: timeSeries = [1,2], duration = 2\nOutput: 3\nExplanation: Teemo's attacks on Ashe go as follows:\n- At second 1, Teemo attacks, and Ashe is poisoned for seconds 1 and 2.\n- At second 2 however, Teemo attacks again and resets the poison timer. Ashe is poisoned for seconds 2 and 3.\nAshe is poisoned for seconds 1, 2, and 3, which is 3 seconds in total.\n\nConstraints:\n\n- 1 <= timeSeries.length <= 10^4\n- 0 <= timeSeries[i], duration <= 10^7\n- timeSeries is sorted in non-decreasing order.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(timeSeries = [0, 1, 2, 3, 4, 5],duration = 1) == 6\n assert candidate(timeSeries = [1, 5, 9],duration = 4) == 12\n assert candidate(timeSeries = [1],duration = 5) == 5\n assert candidate(timeSeries = [10, 14, 15],duration = 5) == 10\n assert candidate(timeSeries = [0, 1, 2, 3, 4],duration = 1) == 5\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],duration = 1) == 10\n assert candidate(timeSeries = [1, 2, 3, 4, 5],duration = 1) == 5\n assert candidate(timeSeries = [0, 5, 10, 15],duration = 5) == 20\n assert candidate(timeSeries = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],duration = 1) == 10\n assert candidate(timeSeries = [10, 14, 15],duration = 4) == 9\n assert candidate(timeSeries = [1, 1, 1, 1],duration = 2) == 2\n assert candidate(timeSeries = [1, 2],duration = 2) == 3\n assert candidate(timeSeries = [1, 4],duration = 2) == 4\n assert candidate(timeSeries = [10, 20, 30, 40, 50],duration = 10) == 50\n assert candidate(timeSeries = [1, 10, 15, 20, 25],duration = 5) == 25\n assert candidate(timeSeries = [5, 7, 8, 10],duration = 3) == 8\n assert candidate(timeSeries = [1, 100, 200, 300, 400, 500],duration = 10) == 60\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],duration = 8) == 53\n assert candidate(timeSeries = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],duration = 100) == 427\n assert candidate(timeSeries = [1, 3, 5, 6, 10, 12, 15],duration = 3) == 16\n assert candidate(timeSeries = [1, 3, 6, 10],duration = 3) == 11\n assert candidate(timeSeries = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],duration = 1) == 1\n assert candidate(timeSeries = [1, 2, 3, 5, 8, 13, 21, 34, 55],duration = 5) == 32\n assert candidate(timeSeries = [0, 2, 4, 6, 8, 10],duration = 2) == 12\n assert candidate(timeSeries = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],duration = 10) == 19\n assert candidate(timeSeries = [5, 10, 15, 20, 25],duration = 3) == 15\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90],duration = 8) == 80\n assert candidate(timeSeries = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28],duration = 3) == 30\n assert candidate(timeSeries = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109],duration = 1) == 10\n assert candidate(timeSeries = [1, 2, 4, 5, 7, 8, 10, 11, 13, 14],duration = 2) == 15\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],duration = 1) == 10\n assert candidate(timeSeries = [1, 2, 5, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],duration = 50) == 249\n assert candidate(timeSeries = [1, 2, 3, 5, 8, 13, 21, 34, 55, 89],duration = 7) == 47\n assert candidate(timeSeries = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],duration = 2) == 30\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],duration = 7) == 52\n assert candidate(timeSeries = [0, 1, 3, 6, 10, 15, 21, 28, 36, 45],duration = 8) == 52\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30],duration = 7) == 32\n assert candidate(timeSeries = [1, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40],duration = 5) == 44\n assert candidate(timeSeries = [2, 3, 5, 6, 8, 9, 11],duration = 2) == 11\n assert candidate(timeSeries = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],duration = 2) == 30\n assert candidate(timeSeries = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],duration = 1) == 11\n assert candidate(timeSeries = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],duration = 5) == 23\n assert candidate(timeSeries = [0, 2, 5, 10, 15, 20, 25],duration = 5) == 30\n assert candidate(timeSeries = [0, 5, 10, 15, 20, 25, 30, 35, 40],duration = 5) == 45\n assert candidate(timeSeries = [1, 4, 7, 10, 13, 16],duration = 3) == 18\n assert candidate(timeSeries = [0, 2, 5, 9, 12, 15, 18, 21, 24, 27],duration = 5) == 32\n assert candidate(timeSeries = [100, 200, 300, 400, 500],duration = 150) == 550\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30],duration = 7) == 32\n assert candidate(timeSeries = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31],duration = 3) == 33\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],duration = 4) == 18\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],duration = 10) == 109\n assert candidate(timeSeries = [10, 12, 15, 17, 18, 20, 25, 30],duration = 4) == 22\n assert candidate(timeSeries = [1, 3, 5, 7, 9],duration = 3) == 11\n assert candidate(timeSeries = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],duration = 2) == 16\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],duration = 2) == 16\n assert candidate(timeSeries = [100, 101, 102, 103, 104, 105],duration = 5) == 10\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],duration = 1) == 20\n assert candidate(timeSeries = [2, 5, 10, 15, 20],duration = 6) == 24\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30],duration = 3) == 18\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],duration = 15) == 60\n assert candidate(timeSeries = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60],duration = 10) == 60\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90],duration = 10) == 99\n assert candidate(timeSeries = [1, 2, 2, 3, 4, 5, 5, 6, 7, 8, 8, 9],duration = 3) == 11\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],duration = 10) == 39\n assert candidate(timeSeries = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],duration = 2) == 40\n assert candidate(timeSeries = [1, 2, 3, 5, 7, 9, 12, 15, 20, 25],duration = 2) == 18\n assert candidate(timeSeries = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300],duration = 15) == 305\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90],duration = 15) == 104\n assert candidate(timeSeries = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],duration = 2) == 20\n assert candidate(timeSeries = [0, 2, 5, 10, 15, 20, 25, 30],duration = 10) == 40\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],duration = 3) == 12\n assert candidate(timeSeries = [1, 2, 3, 5, 7, 9, 12, 15, 18, 22, 26],duration = 4) == 29\n assert candidate(timeSeries = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95],duration = 10) == 100\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],duration = 1) == 20\n assert candidate(timeSeries = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],duration = 10) == 100\n assert candidate(timeSeries = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28],duration = 2) == 20\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15],duration = 3) == 15\n assert candidate(timeSeries = [100, 102, 105, 110, 115, 121, 128, 136, 145, 155],duration = 15) == 70\n assert candidate(timeSeries = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],duration = 1) == 1\n assert candidate(timeSeries = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],duration = 2) == 20\n assert candidate(timeSeries = [5, 10, 15, 20, 25],duration = 5) == 25\n assert candidate(timeSeries = [0, 0, 0, 0, 0],duration = 10000) == 10000\n assert candidate(timeSeries = [0, 2, 4, 6, 8, 10, 12, 14],duration = 2) == 16\n assert candidate(timeSeries = [1000, 1005, 1010, 1015, 1020, 1025],duration = 5) == 30\n assert candidate(timeSeries = [100, 150, 200, 250, 300, 350, 400, 450, 500, 550],duration = 50) == 500\n assert candidate(timeSeries = [2, 2, 2, 2, 2],duration = 5) == 5\n assert candidate(timeSeries = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],duration = 5) == 5\n assert candidate(timeSeries = [2, 4, 8, 12, 16, 20, 24, 28],duration = 6) == 32\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30],duration = 5) == 30\n assert candidate(timeSeries = [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],duration = 50) == 263\n assert candidate(timeSeries = [1, 3, 6, 10, 15],duration = 3) == 14\n assert candidate(timeSeries = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],duration = 5) == 25\n assert candidate(timeSeries = [1, 3, 5, 6, 8, 10, 12, 15],duration = 4) == 18\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],duration = 2) == 11\n assert candidate(timeSeries = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],duration = 3) == 33\n assert candidate(timeSeries = [1, 3, 6, 10, 15, 21, 28, 36, 45],duration = 7) == 48\n assert candidate(timeSeries = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],duration = 10) == 100\n assert candidate(timeSeries = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],duration = 3) == 13\n assert candidate(timeSeries = [5, 15, 25, 35, 45, 55],duration = 10) == 60\n assert candidate(timeSeries = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],duration = 10) == 110\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140],duration = 10) == 149\n assert candidate(timeSeries = [1, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],duration = 100) == 1099\n assert candidate(timeSeries = [1, 4, 10, 20, 30, 40, 50, 60, 70, 80, 90],duration = 5) == 53\n assert candidate(timeSeries = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],duration = 3) == 23\n assert candidate(timeSeries = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],duration = 5) == 14\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75],duration = 8) == 78\n assert candidate(timeSeries = [1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43],duration = 3) == 45\n assert candidate(timeSeries = [1, 10, 19, 28, 37, 46, 55, 64, 73, 82],duration = 9) == 90\n assert candidate(timeSeries = [5, 10, 15, 20, 25, 30, 35, 40],duration = 10) == 45\n assert candidate(timeSeries = [1, 4, 8, 12, 16],duration = 3) == 15\n assert candidate(timeSeries = [100, 200, 300, 400, 500],duration = 150) == 550\n assert candidate(timeSeries = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],duration = 50) == 500\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],duration = 50) == 249\n assert candidate(timeSeries = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],duration = 100) == 100\n assert candidate(timeSeries = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],duration = 15) == 105\n assert candidate(timeSeries = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70],duration = 7) == 77\n assert candidate(timeSeries = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],duration = 10) == 10\n assert candidate(timeSeries = [1, 2, 3, 10, 15, 20],duration = 5) == 22\n assert candidate(timeSeries = [1, 10, 20, 30, 40, 50, 60, 70, 80, 90],duration = 9) == 90\n assert candidate(timeSeries = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],duration = 2) == 27\n", "comparison": "exact"}, "public_tests": ["[1,4]\n2", "[1,2]\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["timeSeries", "duration"], "leetcode_dataset_entry_point": "Solution().findPoisonedDuration", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:12+00:00", "tests_total": 120, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def find_poisoned_duration(time_series, duration)", "container": null, "callable": "find_poisoned_duration", "parameters": [{"name": "time_series", "type": "Integer[]"}, {"name": "duration", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 496, "task_id": "next-greater-element-i", "difficulty": "Easy", "problem_description": "The next greater element of some element x in an array is the first greater element that is to the right of x in the same array.\n\nYou are given two distinct 0-indexed integer arrays nums1 and nums2, where nums1 is a subset of nums2.\n\nFor each 0 <= i < nums1.length, find the index j such that nums1[i] == nums2[j] and determine the next greater element of nums2[j] in nums2. If there is no next greater element, then the answer for this query is -1.\n\nReturn an array ans of length nums1.length such that ans[i] is the next greater element as described above.\n\nExample 1:\n\nInput: nums1 = [4,1,2], nums2 = [1,3,4,2]\nOutput: [-1,3,-1]\nExplanation: The next greater element for each value of nums1 is as follows:\n- 4 is underlined in nums2 = [1,3,4,2]. There is no next greater element, so the answer is -1.\n- 1 is underlined in nums2 = [1,3,4,2]. The next greater element is 3.\n- 2 is underlined in nums2 = [1,3,4,2]. There is no next greater element, so the answer is -1.\n\nExample 2:\n\nInput: nums1 = [2,4], nums2 = [1,2,3,4]\nOutput: [3,-1]\nExplanation: The next greater element for each value of nums1 is as follows:\n- 2 is underlined in nums2 = [1,2,3,4]. The next greater element is 3.\n- 4 is underlined in nums2 = [1,2,3,4]. There is no next greater element, so the answer is -1.\n\nConstraints:\n\n- 1 <= nums1.length <= nums2.length <= 1000\n- 0 <= nums1[i], nums2[i] <= 10^4\n- All integers in nums1 and nums2 are unique.\n- All the integers of nums1 also appear in nums2.\n\nFollow up: Could you find an O(nums1.length + nums2.length) solution?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums1 = [2, 3, 5, 6],nums2 = [5, 6, 2, 3, 8, 9]) == [3, 8, 6, 8]\n assert candidate(nums1 = [1, 2],nums2 = [2, 1]) == [-1, -1]\n assert candidate(nums1 = [1, 2, 3, 4],nums2 = [4, 3, 2, 1]) == [-1, -1, -1, -1]\n assert candidate(nums1 = [5],nums2 = [5]) == [-1]\n assert candidate(nums1 = [1, 6, 4, 8],nums2 = [4, 5, 1, 8, 6, 7, 9]) == [8, 7, 5, 9]\n assert candidate(nums1 = [5, 2, 6],nums2 = [4, 1, 5, 2, 3, 6]) == [6, 3, -1]\n assert candidate(nums1 = [2, 4],nums2 = [1, 2, 3, 4]) == [3, -1]\n assert candidate(nums1 = [4, 1, 2],nums2 = [1, 3, 4, 2]) == [-1, 3, -1]\n assert candidate(nums1 = [10, 5, 6],nums2 = [3, 4, 2, 1, 5, 7, 8, 9, 10, 6]) == [-1, 7, -1]\n assert candidate(nums1 = [2],nums2 = [1, 2]) == [-1]\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [1, 2, 3, 4, 5, 6, 7, 8]) == [2, 4, 6, 8]\n assert candidate(nums1 = [3, 5, 8],nums2 = [2, 3, 4, 5, 7, 8, 10]) == [4, 7, 10]\n assert candidate(nums1 = [1],nums2 = [3, 2, 1]) == [-1]\n assert candidate(nums1 = [9, 8, 7],nums2 = [8, 9, 7, 6, 5, 4, 3, 2, 1]) == [-1, 9, -1]\n assert candidate(nums1 = [3, 5, 8],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [4, 6, 9]\n assert candidate(nums1 = [9, 10, 7],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [10, -1, 8]\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [7, 5, 3, 1, 9, 11, 13]) == [9, 9, 9, 9]\n assert candidate(nums1 = [1],nums2 = [1]) == [-1]\n assert candidate(nums1 = [1, 3],nums2 = [2, 1, 3, 4]) == [3, 4]\n assert candidate(nums1 = [10, 8, 6],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == [11, 9, 7]\n assert candidate(nums1 = [9, 7, 3],nums2 = [3, 6, 9, 12, 15, 7]) == [12, -1, 6]\n assert candidate(nums1 = [10, 9, 8],nums2 = [8, 9, 10, 5, 7]) == [-1, 10, 9]\n assert candidate(nums1 = [100, 90, 80, 70],nums2 = [70, 80, 90, 100, 110, 120, 130, 140, 150]) == [110, 100, 90, 80]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [2, 4, 6, 8, 10, 1, 3, 5, 7, 9]) == [3, 5, 7, 9, -1]\n assert candidate(nums1 = [33, 22, 11],nums2 = [11, 22, 33, 44, 55, 66, 77, 88, 99]) == [44, 33, 22]\n assert candidate(nums1 = [100, 99, 98, 97],nums2 = [98, 100, 97, 99, 96, 95, 94, 93, 92]) == [-1, -1, 100, 99]\n assert candidate(nums1 = [3, 5, 2, 1],nums2 = [1, 2, 3, 5, 4]) == [5, -1, 3, 2]\n assert candidate(nums1 = [3, 5, 2, 4, 9],nums2 = [8, 5, 3, 9, 2, 4, 7, 6]) == [9, 9, 4, 7, -1]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1]) == [-1, -1, -1, -1, -1]\n assert candidate(nums1 = [7, 8, 9],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [8, 9, -1]\n assert candidate(nums1 = [3, 8, 9],nums2 = [10, 11, 7, 8, 6, 5, 3, 4, 9, 2, 1]) == [4, 9, -1]\n assert candidate(nums1 = [5, 7, 3, 9, 1],nums2 = [11, 14, 8, 15, 13, 2, 11, 5, 12, 7, 9, 3, 6, 10, 4, 1]) == [12, 9, 6, 10, -1]\n assert candidate(nums1 = [6, 2, 8, 9],nums2 = [6, 5, 4, 3, 2, 1, 10, 11, 8, 9, 7]) == [10, 10, 9, -1]\n assert candidate(nums1 = [11, 13, 15, 17],nums2 = [17, 15, 13, 11, 19, 21, 23]) == [19, 19, 19, 19]\n assert candidate(nums1 = [9, 8, 7, 6, 5],nums2 = [5, 6, 7, 8, 9]) == [-1, 9, 8, 7, 6]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 6, 7]) == [6, 6, 6, 6, 6]\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [7, 5, 3, 1, 2, 4, 6, 8, 10]) == [2, 4, 6, 8]\n assert candidate(nums1 = [3, 6, 9, 12, 15],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [4, 7, 10, 13, -1]\n assert candidate(nums1 = [3, 5, 7, 9],nums2 = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10]) == [4, 6, 8, 10]\n assert candidate(nums1 = [15, 25, 35],nums2 = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60]) == [20, 30, 40]\n assert candidate(nums1 = [6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [7, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [100, 90, 80, 70],nums2 = [70, 80, 90, 100, 110]) == [110, 100, 90, 80]\n assert candidate(nums1 = [10, 20, 30, 40],nums2 = [40, 10, 20, 30, 50, 60, 70]) == [20, 30, 50, 50]\n assert candidate(nums1 = [6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6]) == [-1, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [3, 2, 1],nums2 = [5, 3, 2, 1, 6, 4]) == [6, 6, 6]\n assert candidate(nums1 = [23, 56, 78, 90],nums2 = [90, 78, 56, 23, 12, 34, 45, 67, 89, 100]) == [34, 67, 89, 100]\n assert candidate(nums1 = [42, 55, 66, 77],nums2 = [42, 77, 55, 88, 66, 99, 100]) == [77, 88, 99, 88]\n assert candidate(nums1 = [8, 6, 4, 2],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [9, 7, 5, 3]\n assert candidate(nums1 = [100, 90, 80],nums2 = [70, 80, 90, 100, 60, 50, 40, 30, 20, 10]) == [-1, 100, 90]\n assert candidate(nums1 = [10, 20, 30],nums2 = [10, 20, 30, 25, 15, 5, 40, 35, 33, 31]) == [20, 30, 40]\n assert candidate(nums1 = [6, 7, 8, 9, 10],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [7, 8, 9, 10, -1]\n assert candidate(nums1 = [7, 3, 2],nums2 = [5, 7, 3, 2, 1, 8]) == [8, 8, 8]\n assert candidate(nums1 = [12, 14, 13, 11, 15],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [13, 15, 14, 12, -1]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11]) == [11, 11, 11, 11, 11, 11, 11, 11, 11, 11]\n assert candidate(nums1 = [8, 10, 4, 3],nums2 = [1, 11, 10, 4, 8, 3, 7]) == [-1, -1, 8, 7]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, -1, -1, -1, -1]\n assert candidate(nums1 = [7, 6, 5, 4, 3, 2, 1],nums2 = [2, 1, 3, 6, 5, 4, 7]) == [-1, 7, 7, 7, 6, 3, 3]\n assert candidate(nums1 = [2, 6, 4, 5, 3],nums2 = [3, 1, 2, 5, 4, 7, 6]) == [5, -1, 7, 7, 5]\n assert candidate(nums1 = [8, 9, 10, 11],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [9, 10, 11, 12]\n assert candidate(nums1 = [3, 6, 9],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == [4, 7, 10]\n assert candidate(nums1 = [3, 5, 7, 9],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [4, 6, 8, -1]\n assert candidate(nums1 = [7, 5, 3, 1],nums2 = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10]) == [8, 6, 4, 2]\n assert candidate(nums1 = [100, 90, 80, 70],nums2 = [70, 80, 90, 100, 110, 120, 130]) == [110, 100, 90, 80]\n assert candidate(nums1 = [1, 3, 5, 7, 9],nums2 = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10]) == [2, 4, 6, 8, 10]\n assert candidate(nums1 = [3, 5, 2, 4, 9],nums2 = [9, 1, 2, 5, 3, 7, 8, 4, 6]) == [7, 7, 5, 6, -1]\n assert candidate(nums1 = [42, 23, 14, 5, 1],nums2 = [1, 5, 14, 23, 42, 3, 7, 11, 13, 19, 21, 27]) == [-1, 42, 23, 14, 5]\n assert candidate(nums1 = [1, 3, 5, 7, 9, 11, 13, 15, 17],nums2 = [15, 13, 11, 9, 7, 5, 3, 1, 17, 19]) == [17, 17, 17, 17, 17, 17, 17, 17, 19]\n assert candidate(nums1 = [5, 10, 15, 20],nums2 = [20, 15, 10, 5, 25, 30, 35, 40]) == [25, 25, 25, 25]\n assert candidate(nums1 = [7, 3, 9, 1],nums2 = [1, 3, 5, 7, 9]) == [9, 5, -1, 3]\n assert candidate(nums1 = [15, 10, 5],nums2 = [1, 2, 3, 4, 5, 10, 15, 20, 25]) == [20, 15, 10]\n assert candidate(nums1 = [10, 11, 12, 13],nums2 = [13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, -1, -1, -1]\n assert candidate(nums1 = [7, 6, 5, 4, 3, 2, 1],nums2 = [1, 2, 3, 4, 5, 6, 7]) == [-1, 7, 6, 5, 4, 3, 2]\n assert candidate(nums1 = [6, 7, 8],nums2 = [1, 2, 3, 6, 7, 8, 5, 4]) == [7, 8, -1]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [5, 4, 3, 2, 1, 6]) == [6, 6, 6, 6, 6]\n assert candidate(nums1 = [7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, -1, -1]\n assert candidate(nums1 = [1, 10, 100, 1000],nums2 = [100, 1, 1000, 10, 200, 300, 400, 500]) == [1000, 200, 1000, -1]\n assert candidate(nums1 = [3, 6, 1, 4],nums2 = [9, 3, 8, 1, 7, 6, 5, 4, 2]) == [8, -1, 7, -1]\n assert candidate(nums1 = [15, 12, 11, 13],nums2 = [15, 12, 11, 14, 10, 9, 8, 13, 16]) == [16, 14, 14, 16]\n assert candidate(nums1 = [100, 99, 98, 97, 96],nums2 = [96, 97, 98, 99, 100, 101, 102, 103]) == [101, 100, 99, 98, 97]\n assert candidate(nums1 = [9, 7, 5, 3, 1],nums2 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == [11, 9, 7, 5, 3]\n assert candidate(nums1 = [1, 7, 4, 2, 10],nums2 = [2, 1, 10, 7, 4, 5, 3]) == [10, -1, 5, 10, -1]\n assert candidate(nums1 = [11, 13, 7, 5, 3, 1],nums2 = [1, 3, 5, 7, 9, 11, 13, 15]) == [13, 15, 9, 7, 5, 3]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],nums2 = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 12, 13, 14, 15]) == [11, 11, 11, 11, 11, 11, 11, 11, 11, 11]\n assert candidate(nums1 = [10, 20, 30],nums2 = [30, 20, 10, 40, 50, 60]) == [40, 40, 40]\n assert candidate(nums1 = [9, 8, 7, 6, 5, 4, 3, 2, 1],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(nums1 = [10, 20, 30],nums2 = [10, 15, 20, 25, 30]) == [15, 25, -1]\n assert candidate(nums1 = [6, 4, 1],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [7, 5, 2]\n assert candidate(nums1 = [7, 5, 9],nums2 = [9, 4, 7, 3, 5, 1, 8, 6, 2]) == [8, 8, -1]\n assert candidate(nums1 = [7, 6, 5],nums2 = [5, 1, 2, 3, 4, 6, 7]) == [-1, 7, 6]\n assert candidate(nums1 = [3, 11, 17, 19],nums2 = [3, 19, 23, 11, 17, 29, 21, 25]) == [19, 17, 29, 23]\n assert candidate(nums1 = [1, 7, 3, 4, 5, 6],nums2 = [3, 4, 1, 6, 8, 9, 5, 2, 7]) == [6, -1, 4, 6, 7, 8]\n assert candidate(nums1 = [2, 5, 10, 15, 20],nums2 = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2]) == [-1, 7, -1, 17, -1]\n assert candidate(nums1 = [15, 10, 18, 23, 5],nums2 = [18, 10, 15, 5, 23, 2, 11, 17, 3, 12]) == [23, 15, 23, -1, 23]\n assert candidate(nums1 = [11, 12, 13],nums2 = [5, 11, 9, 12, 13, 8, 7, 6, 10]) == [12, 13, -1]\n assert candidate(nums1 = [50, 60, 70, 80, 90],nums2 = [90, 80, 70, 60, 50, 40, 30, 20, 10]) == [-1, -1, -1, -1, -1]\n assert candidate(nums1 = [100, 200, 300, 400],nums2 = [400, 300, 200, 100, 50, 150, 250, 350, 450]) == [150, 250, 350, 450]\n assert candidate(nums1 = [1, 6, 11, 13],nums2 = [1, 3, 5, 7, 9, 11, 13, 2, 4, 6, 8, 10, 12, 14]) == [3, 8, 13, 14]\n assert candidate(nums1 = [15, 25, 35],nums2 = [10, 20, 30, 40, 50, 60, 70, 80, 90, 15, 25, 35]) == [25, 35, -1]\n assert candidate(nums1 = [7, 5, 3, 1],nums2 = [1, 3, 5, 7, 9]) == [9, 7, 5, 3]\n assert candidate(nums1 = [5, 8, 12, 15],nums2 = [15, 12, 5, 8, 20, 25, 30, 35]) == [8, 20, 20, 20]\n assert candidate(nums1 = [5, 1, 4],nums2 = [2, 6, 4, 5, 1, 9]) == [9, 9, 5]\n assert candidate(nums1 = [9, 10, 11],nums2 = [3, 4, 5, 1, 6, 9, 7, 8, 11, 10, 2]) == [11, -1, -1]\n assert candidate(nums1 = [9, 8, 7, 6],nums2 = [1, 2, 3, 4, 5, 6, 7, 8, 9]) == [-1, 9, 8, 7]\n assert candidate(nums1 = [4, 3, 2, 1],nums2 = [1, 2, 3, 4]) == [-1, 4, 3, 2]\n assert candidate(nums1 = [4, 3, 2, 1, 0],nums2 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [5, 4, 3, 2, 1]\n assert candidate(nums1 = [8, 6, 4, 2],nums2 = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30]) == [10, 8, 6, 4]\n assert candidate(nums1 = [2, 6, 4, 5, 7, 3],nums2 = [3, 5, 4, 6, 2, 1, 7, 9, 8]) == [7, 7, 6, 6, 9, 5]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 10]) == [10, 10, 10, 10, 10, 10, 10, 10, 10]\n assert candidate(nums1 = [1, 3, 5, 7],nums2 = [2, 4, 6, 8, 1, 3, 5, 7]) == [3, 5, 7, -1]\n assert candidate(nums1 = [11, 22, 33],nums2 = [33, 22, 11, 44, 55, 66, 77]) == [44, 44, 44]\n assert candidate(nums1 = [10, 20, 30, 40, 50],nums2 = [50, 40, 30, 20, 10, 60, 70, 80, 90]) == [60, 60, 60, 60, 60]\n assert candidate(nums1 = [4, 1, 3, 7, 6, 2, 5],nums2 = [7, 8, 2, 3, 4, 1, 6, 5, 9]) == [6, 6, 4, 8, 9, 3, 9]\n assert candidate(nums1 = [1, 2, 3, 4, 5, 6, 7, 8, 9],nums2 = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 12]) == [11, 11, 11, 11, 11, 11, 11, 11, 11]\n assert candidate(nums1 = [1, 2, 3, 4, 5],nums2 = [3, 4, 5, 1, 2]) == [2, -1, 4, 5, -1]\n assert candidate(nums1 = [1, 10, 5, 3],nums2 = [3, 1, 10, 5, 9, 7, 4, 6, 8]) == [10, -1, 9, 10]\n assert candidate(nums1 = [5, 10, 20],nums2 = [20, 10, 5, 25, 15, 30]) == [25, 25, 25]\n assert candidate(nums1 = [7, 5, 3, 2],nums2 = [3, 2, 7, 5, 4]) == [-1, -1, 7, 7]\n assert candidate(nums1 = [1, 7, 4, 3],nums2 = [3, 4, 1, 5, 7, 8, 9]) == [5, 8, 5, 4]\n", "comparison": "exact"}, "public_tests": ["[4,1,2]\n[1,3,4,2]", "[2,4]\n[1,2,3,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums1", "nums2"], "leetcode_dataset_entry_point": "Solution().nextGreaterElement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:15+00:00", "tests_total": 118, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "stack", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def next_greater_element(nums1, nums2)", "container": null, "callable": "next_greater_element", "parameters": [{"name": "nums1", "type": "Integer[]"}, {"name": "nums2", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 498, "task_id": "diagonal-traverse", "difficulty": "Medium", "problem_description": "Given an m x n matrix mat, return an array of all the elements of the array in a diagonal order.\n\nExample 1:\n\nInput: mat = [[1,2,3],[4,5,6],[7,8,9]]\nOutput: [1,2,4,7,5,3,6,8,9]\n\nExample 2:\n\nInput: mat = [[1,2],[3,4]]\nOutput: [1,2,3,4]\n\nConstraints:\n\n- m == mat.length\n- n == mat[i].length\n- 1 <= m, n <= 10^4\n- 1 <= m * n <= 10^4\n- -10^5 <= mat[i][j] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(mat = [[1, 2], [3, 4]]) == [1, 2, 3, 4]\n assert candidate(mat = [[1]]) == [1]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]) == [1, 2, 5, 9, 6, 3, 4, 7, 10, 11, 8, 12]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]) == [1, 2, 4, 7, 5, 3, 6, 8, 9]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]) == [1, 2, 6, 11, 7, 3, 4, 8, 12, 16, 17, 13, 9, 5, 10, 14, 18, 19, 15, 20]\n assert candidate(mat = [[1, 3, 5, 7], [10, 11, 16, 20], [23, 30, 34, 60]]) == [1, 3, 10, 23, 11, 5, 7, 16, 30, 34, 20, 60]\n assert candidate(mat = [[10000, 9999, 9998], [9997, 9996, 9995], [9994, 9993, 9992], [9991, 9990, 9989]]) == [10000, 9999, 9997, 9994, 9996, 9998, 9995, 9993, 9991, 9990, 9992, 9989]\n assert candidate(mat = [[1000, 2000, 3000], [4000, 5000, 6000], [7000, 8000, 9000], [10000, 11000, 12000]]) == [1000, 2000, 4000, 7000, 5000, 3000, 6000, 8000, 10000, 11000, 9000, 12000]\n assert candidate(mat = [[-10, 20, -30, 40], [-50, 60, -70, 80], [-90, 100, -110, 120]]) == [-10, 20, -50, -90, 60, -30, 40, -70, 100, -110, 80, 120]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28], [29, 30, 31, 32, 33, 34, 35]]) == [1, 2, 8, 15, 9, 3, 4, 10, 16, 22, 29, 23, 17, 11, 5, 6, 12, 18, 24, 30, 31, 25, 19, 13, 7, 14, 20, 26, 32, 33, 27, 21, 28, 34, 35]\n assert candidate(mat = [[100, 200, 300, 400, 500], [600, 700, 800, 900, 1000], [1100, 1200, 1300, 1400, 1500]]) == [100, 200, 600, 1100, 700, 300, 400, 800, 1200, 1300, 900, 500, 1000, 1400, 1500]\n assert candidate(mat = [[10, 20, 30, 40, 50, 60, 70], [80, 90, 100, 110, 120, 130, 140], [150, 160, 170, 180, 190, 200, 210], [220, 230, 240, 250, 260, 270, 280]]) == [10, 20, 80, 150, 90, 30, 40, 100, 160, 220, 230, 170, 110, 50, 60, 120, 180, 240, 250, 190, 130, 70, 140, 200, 260, 270, 210, 280]\n assert candidate(mat = [[-10, -9, -8, -7, -6], [-5, -4, -3, -2, -1], [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) == [-10, -9, -5, 0, -4, -8, -7, -3, 1, 5, 10, 6, 2, -2, -6, -1, 3, 7, 11, 12, 8, 4, 9, 13, 14]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18], [19, 20, 21], [22, 23, 24]]) == [1, 2, 4, 7, 5, 3, 6, 8, 10, 13, 11, 9, 12, 14, 16, 19, 17, 15, 18, 20, 22, 23, 21, 24]\n assert candidate(mat = [[-1, -2, -3, -4, -5], [-6, -7, -8, -9, -10], [-11, -12, -13, -14, -15], [-16, -17, -18, -19, -20]]) == [-1, -2, -6, -11, -7, -3, -4, -8, -12, -16, -17, -13, -9, -5, -10, -14, -18, -19, -15, -20]\n assert candidate(mat = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20], [21, 22], [23, 24], [25, 26], [27, 28], [29, 30]]) == [1, 2, 3, 5, 4, 6, 7, 9, 8, 10, 11, 13, 12, 14, 15, 17, 16, 18, 19, 21, 20, 22, 23, 25, 24, 26, 27, 29, 28, 30]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(mat = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50], [51, 52, 53, 54, 55, 56, 57, 58, 59, 60]]) == [1, 2, 11, 21, 12, 3, 4, 13, 22, 31, 41, 32, 23, 14, 5, 6, 15, 24, 33, 42, 51, 52, 43, 34, 25, 16, 7, 8, 17, 26, 35, 44, 53, 54, 45, 36, 27, 18, 9, 10, 19, 28, 37, 46, 55, 56, 47, 38, 29, 20, 30, 39, 48, 57, 58, 49, 40, 50, 59, 60]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54]]) == [1, 2, 10, 19, 11, 3, 4, 12, 20, 28, 37, 29, 21, 13, 5, 6, 14, 22, 30, 38, 46, 47, 39, 31, 23, 15, 7, 8, 16, 24, 32, 40, 48, 49, 41, 33, 25, 17, 9, 18, 26, 34, 42, 50, 51, 43, 35, 27, 36, 44, 52, 53, 45, 54]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25], [26, 27, 28, 29, 30], [31, 32, 33, 34, 35], [36, 37, 38, 39, 40], [41, 42, 43, 44, 45]]) == [1, 2, 6, 11, 7, 3, 4, 8, 12, 16, 21, 17, 13, 9, 5, 10, 14, 18, 22, 26, 31, 27, 23, 19, 15, 20, 24, 28, 32, 36, 41, 37, 33, 29, 25, 30, 34, 38, 42, 43, 39, 35, 40, 44, 45]\n assert candidate(mat = [[-1, -2, -3, -4], [-5, -6, -7, -8], [-9, -10, -11, -12], [-13, -14, -15, -16]]) == [-1, -2, -5, -9, -6, -3, -4, -7, -10, -13, -14, -11, -8, -12, -15, -16]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28]]) == [1, 2, 8, 15, 9, 3, 4, 10, 16, 22, 23, 17, 11, 5, 6, 12, 18, 24, 25, 19, 13, 7, 14, 20, 26, 27, 21, 28]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32]]) == [1, 2, 9, 17, 10, 3, 4, 11, 18, 25, 26, 19, 12, 5, 6, 13, 20, 27, 28, 21, 14, 7, 8, 15, 22, 29, 30, 23, 16, 24, 31, 32]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]) == [1, 2, 3, 5, 4, 6, 7, 9, 8, 10]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48, 49, 50]]) == [1, 2, 11, 21, 12, 3, 4, 13, 22, 31, 41, 32, 23, 14, 5, 6, 15, 24, 33, 42, 43, 34, 25, 16, 7, 8, 17, 26, 35, 44, 45, 36, 27, 18, 9, 10, 19, 28, 37, 46, 47, 38, 29, 20, 30, 39, 48, 49, 40, 50]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45]]) == [1, 2, 10, 19, 11, 3, 4, 12, 20, 28, 37, 29, 21, 13, 5, 6, 14, 22, 30, 38, 39, 31, 23, 15, 7, 8, 16, 24, 32, 40, 41, 33, 25, 17, 9, 18, 26, 34, 42, 43, 35, 27, 36, 44, 45]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30]]) == [1, 2, 7, 13, 8, 3, 4, 9, 14, 19, 25, 20, 15, 10, 5, 6, 11, 16, 21, 26, 27, 22, 17, 12, 18, 23, 28, 29, 24, 30]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54], [55, 56, 57, 58, 59, 60, 61, 62, 63]]) == [1, 2, 10, 19, 11, 3, 4, 12, 20, 28, 37, 29, 21, 13, 5, 6, 14, 22, 30, 38, 46, 55, 47, 39, 31, 23, 15, 7, 8, 16, 24, 32, 40, 48, 56, 57, 49, 41, 33, 25, 17, 9, 18, 26, 34, 42, 50, 58, 59, 51, 43, 35, 27, 36, 44, 52, 60, 61, 53, 45, 54, 62, 63]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [21, 22, 23, 24, 25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36, 37, 38, 39, 40]]) == [1, 2, 11, 21, 12, 3, 4, 13, 22, 31, 32, 23, 14, 5, 6, 15, 24, 33, 34, 25, 16, 7, 8, 17, 26, 35, 36, 27, 18, 9, 10, 19, 28, 37, 38, 29, 20, 30, 39, 40]\n assert candidate(mat = [[5, 10, 15, 20, 25], [30, 35, 40, 45, 50], [55, 60, 65, 70, 75], [80, 85, 90, 95, 100], [105, 110, 115, 120, 125], [130, 135, 140, 145, 150]]) == [5, 10, 30, 55, 35, 15, 20, 40, 60, 80, 105, 85, 65, 45, 25, 50, 70, 90, 110, 130, 135, 115, 95, 75, 100, 120, 140, 145, 125, 150]\n assert candidate(mat = [[-10, -20, -30, -40], [-50, -60, -70, -80], [-90, -100, -110, -120], [-130, -140, -150, -160]]) == [-10, -20, -50, -90, -60, -30, -40, -70, -100, -130, -140, -110, -80, -120, -150, -160]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18]]) == [1, 2, 4, 7, 5, 3, 6, 8, 10, 13, 11, 9, 12, 14, 16, 17, 15, 18]\n assert candidate(mat = [[-10, -20, -30, -40], [-50, -60, -70, -80], [-90, -100, -110, -120], [-130, -140, -150, -160], [-170, -180, -190, -200], [-210, -220, -230, -240], [-250, -260, -270, -280], [-290, -300, -310, -320]]) == [-10, -20, -50, -90, -60, -30, -40, -70, -100, -130, -170, -140, -110, -80, -120, -150, -180, -210, -250, -220, -190, -160, -200, -230, -260, -290, -300, -270, -240, -280, -310, -320]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25], [26, 27, 28, 29, 30], [31, 32, 33, 34, 35]]) == [1, 2, 6, 11, 7, 3, 4, 8, 12, 16, 21, 17, 13, 9, 5, 10, 14, 18, 22, 26, 31, 27, 23, 19, 15, 20, 24, 28, 32, 33, 29, 25, 30, 34, 35]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42], [43, 44, 45, 46, 47, 48], [49, 50, 51, 52, 53, 54], [55, 56, 57, 58, 59, 60]]) == [1, 2, 7, 13, 8, 3, 4, 9, 14, 19, 25, 20, 15, 10, 5, 6, 11, 16, 21, 26, 31, 37, 32, 27, 22, 17, 12, 18, 23, 28, 33, 38, 43, 49, 44, 39, 34, 29, 24, 30, 35, 40, 45, 50, 55, 56, 51, 46, 41, 36, 42, 47, 52, 57, 58, 53, 48, 54, 59, 60]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]) == [1, 2, 3, 5, 4, 6, 7, 9, 8, 10, 11, 13, 12, 14, 15, 16]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30], [31, 32, 33, 34, 35, 36]]) == [1, 2, 7, 13, 8, 3, 4, 9, 14, 19, 25, 20, 15, 10, 5, 6, 11, 16, 21, 26, 31, 32, 27, 22, 17, 12, 18, 23, 28, 33, 34, 29, 24, 30, 35, 36]\n assert candidate(mat = [[-10, -9, -8, -7], [-6, -5, -4, -3], [-2, -1, 0, 1], [2, 3, 4, 5], [6, 7, 8, 9], [10, 11, 12, 13]]) == [-10, -9, -6, -2, -5, -8, -7, -4, -1, 2, 6, 3, 0, -3, 1, 4, 7, 10, 11, 8, 5, 9, 12, 13]\n assert candidate(mat = [[1, 0, -1, 2, 3, 4], [0, 1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6], [2, 3, 4, 5, 6, 7], [3, 4, 5, 6, 7, 8]]) == [1, 0, 0, 1, 1, -1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 8]\n assert candidate(mat = [[-10, -9, -8, -7, -6, -5], [-4, -3, -2, -1, 0, 1], [2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13], [14, 15, 16, 17, 18, 19], [20, 21, 22, 23, 24, 25]]) == [-10, -9, -4, 2, -3, -8, -7, -2, 3, 8, 14, 9, 4, -1, -6, -5, 0, 5, 10, 15, 20, 21, 16, 11, 6, 1, 7, 12, 17, 22, 23, 18, 13, 19, 24, 25]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36]]) == [1, 2, 10, 19, 11, 3, 4, 12, 20, 28, 29, 21, 13, 5, 6, 14, 22, 30, 31, 23, 15, 7, 8, 16, 24, 32, 33, 25, 17, 9, 18, 26, 34, 35, 27, 36]\n assert candidate(mat = [[0, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 2, 0, 0], [0, 0, 0, 3, 0], [0, 0, 0, 0, 4]]) == [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 4]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32], [33, 34, 35, 36, 37, 38, 39, 40], [41, 42, 43, 44, 45, 46, 47, 48], [49, 50, 51, 52, 53, 54, 55, 56], [57, 58, 59, 60, 61, 62, 63, 64]]) == [1, 2, 9, 17, 10, 3, 4, 11, 18, 25, 33, 26, 19, 12, 5, 6, 13, 20, 27, 34, 41, 49, 42, 35, 28, 21, 14, 7, 8, 15, 22, 29, 36, 43, 50, 57, 58, 51, 44, 37, 30, 23, 16, 24, 31, 38, 45, 52, 59, 60, 53, 46, 39, 32, 40, 47, 54, 61, 62, 55, 48, 56, 63, 64]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18], [19, 20]]) == [1, 2, 3, 5, 4, 6, 7, 9, 8, 10, 11, 13, 12, 14, 15, 17, 16, 18, 19, 20]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28], [29, 30, 31, 32, 33, 34, 35], [36, 37, 38, 39, 40, 41, 42]]) == [1, 2, 8, 15, 9, 3, 4, 10, 16, 22, 29, 23, 17, 11, 5, 6, 12, 18, 24, 30, 36, 37, 31, 25, 19, 13, 7, 14, 20, 26, 32, 38, 39, 33, 27, 21, 28, 34, 40, 41, 35, 42]\n assert candidate(mat = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18], [19, 20, 21]]) == [1, 2, 4, 7, 5, 3, 6, 8, 10, 13, 11, 9, 12, 14, 16, 19, 17, 15, 18, 20, 21]\n assert candidate(mat = [[-5, 3, -10, 1], [-7, -1, -2, -4], [-9, -4, -5, -8]]) == [-5, 3, -7, -9, -1, -10, 1, -2, -4, -5, -4, -8]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18], [19, 20, 21, 22, 23, 24, 25, 26, 27], [28, 29, 30, 31, 32, 33, 34, 35, 36], [37, 38, 39, 40, 41, 42, 43, 44, 45], [46, 47, 48, 49, 50, 51, 52, 53, 54], [55, 56, 57, 58, 59, 60, 61, 62, 63], [64, 65, 66, 67, 68, 69, 70, 71, 72], [73, 74, 75, 76, 77, 78, 79, 80, 81]]) == [1, 2, 10, 19, 11, 3, 4, 12, 20, 28, 37, 29, 21, 13, 5, 6, 14, 22, 30, 38, 46, 55, 47, 39, 31, 23, 15, 7, 8, 16, 24, 32, 40, 48, 56, 64, 73, 65, 57, 49, 41, 33, 25, 17, 9, 18, 26, 34, 42, 50, 58, 66, 74, 75, 67, 59, 51, 43, 35, 27, 36, 44, 52, 60, 68, 76, 77, 69, 61, 53, 45, 54, 62, 70, 78, 79, 71, 63, 72, 80, 81]\n assert candidate(mat = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9], [-10, -11, -12]]) == [-1, -2, -4, -7, -5, -3, -6, -8, -10, -11, -9, -12]\n assert candidate(mat = [[1, 4, 7, 10, 13], [2, 5, 8, 11, 14], [3, 6, 9, 12, 15], [16, 19, 22, 25, 28], [17, 20, 23, 26, 29], [18, 21, 24, 27, 30]]) == [1, 4, 2, 3, 5, 7, 10, 8, 6, 16, 17, 19, 9, 11, 13, 14, 12, 22, 20, 18, 21, 23, 25, 15, 28, 26, 24, 27, 29, 30]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]\n assert candidate(mat = [[10, -5, 23, 45, 67], [-10, 20, 5, -6, 78], [2, 4, 6, 8, -100], [9, 3, 7, -4, -88], [12, 14, 16, 18, 20]]) == [10, -5, -10, 2, 20, 23, 45, 5, 4, 9, 12, 3, 6, -6, 67, 78, 8, 7, 14, 16, -4, -100, -88, 18, 20]\n assert candidate(mat = [[5, 10, 15, 20, 25, 30], [35, 40, 45, 50, 55, 60], [65, 70, 75, 80, 85, 90], [95, 100, 105, 110, 115, 120]]) == [5, 10, 35, 65, 40, 15, 20, 45, 70, 95, 100, 75, 50, 25, 30, 55, 80, 105, 110, 85, 60, 90, 115, 120]\n assert candidate(mat = [[100, 200, 300], [400, 500, 600], [700, 800, 900], [1000, 1100, 1200], [1300, 1400, 1500]]) == [100, 200, 400, 700, 500, 300, 600, 800, 1000, 1300, 1100, 900, 1200, 1400, 1500]\n assert candidate(mat = [[1, 4, 7, 11, 15], [2, 5, 8, 12, 19], [3, 6, 9, 16, 22], [10, 13, 14, 17, 24], [18, 21, 23, 26, 29]]) == [1, 4, 2, 3, 5, 7, 11, 8, 6, 10, 18, 13, 9, 12, 15, 19, 16, 14, 21, 23, 17, 22, 24, 26, 29]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7], [8, 9, 10, 11, 12, 13, 14], [15, 16, 17, 18, 19, 20, 21], [22, 23, 24, 25, 26, 27, 28], [29, 30, 31, 32, 33, 34, 35], [36, 37, 38, 39, 40, 41, 42], [43, 44, 45, 46, 47, 48, 49]]) == [1, 2, 8, 15, 9, 3, 4, 10, 16, 22, 29, 23, 17, 11, 5, 6, 12, 18, 24, 30, 36, 43, 37, 31, 25, 19, 13, 7, 14, 20, 26, 32, 38, 44, 45, 39, 33, 27, 21, 28, 34, 40, 46, 47, 41, 35, 42, 48, 49]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16], [17, 18, 19, 20, 21, 22, 23, 24], [25, 26, 27, 28, 29, 30, 31, 32], [33, 34, 35, 36, 37, 38, 39, 40]]) == [1, 2, 9, 17, 10, 3, 4, 11, 18, 25, 33, 26, 19, 12, 5, 6, 13, 20, 27, 34, 35, 28, 21, 14, 7, 8, 15, 22, 29, 36, 37, 30, 23, 16, 24, 31, 38, 39, 32, 40]\n", "comparison": "exact"}, "public_tests": ["[[1,2,3],[4,5,6],[7,8,9]]", "[[1,2],[3,4]]"], "hints": [], "metadata": {"canonical_parameter_names": ["mat"], "leetcode_dataset_entry_point": "Solution().findDiagonalOrder", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:17+00:00", "tests_total": 62, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "matrix", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def find_diagonal_order(mat)", "container": null, "callable": "find_diagonal_order", "parameters": [{"name": "mat", "type": "Integer[][]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 500, "task_id": "keyboard-row", "difficulty": "Easy", "problem_description": "Given an array of strings words, return the words that can be typed using letters of the alphabet on only one row of American keyboard like the image below.\n\nNote that the strings are case-insensitive, both lowercased and uppercased of the same letter are treated as if they are at the same row.\n\nIn the American keyboard:\n\n- the first row consists of the characters \"qwertyuiop\",\n- the second row consists of the characters \"asdfghjkl\", and\n- the third row consists of the characters \"zxcvbnm\".\n\nExample 1:\n\nInput: words = [\"Hello\",\"Alaska\",\"Dad\",\"Peace\"]\nOutput: [\"Alaska\",\"Dad\"]\nExplanation:\nBoth \"a\" and \"A\" are in the 2nd row of the American keyboard due to case insensitivity.\n\nExample 2:\n\nInput: words = [\"omk\"]\nOutput: []\n\nExample 3:\n\nInput: words = [\"adsdf\",\"sfd\"]\nOutput: [\"adsdf\",\"sfd\"]\n\nConstraints:\n\n- 1 <= words.length <= 20\n- 1 <= words[i].length <= 100\n- words[i] consists of English letters (both lowercase and uppercase).\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(words = ['Hello', 'Alaska', 'Dad', 'Peace']) == ['Alaska', 'Dad']\n assert candidate(words = ['qwerty', 'ASDFGH', 'zxcvbN']) == ['qwerty', 'ASDFGH', 'zxcvbN']\n assert candidate(words = ['QwErTy', 'aSdF', 'zXcV']) == ['QwErTy', 'aSdF', 'zXcV']\n assert candidate(words = ['AAAAA', 'eeeee', 'QQQqq', 'zzzzz']) == ['AAAAA', 'eeeee', 'QQQqq', 'zzzzz']\n assert candidate(words = ['QwErTy', 'AsDfGh', 'ZxCvBn']) == ['QwErTy', 'AsDfGh', 'ZxCvBn']\n assert candidate(words = ['omk']) == []\n assert candidate(words = ['adsdf', 'sfd']) == ['adsdf', 'sfd']\n assert candidate(words = ['Flask', 'kite', 'BAT']) == ['Flask']\n assert candidate(words = ['Unbelievable', 'Incomprehensible', 'Supernatural', 'Phenomenal', 'Transcendent', 'Metaphysical', 'Ethereal', 'Mystical', 'Enigmatic', 'Paradoxical']) == []\n assert candidate(words = ['MixedCASE', 'Keyboard', 'TESTING', 'qwerty', 'ASDF', 'ZXCV', 'QwErTy', 'AsDf', 'ZxCv']) == ['qwerty', 'ASDF', 'ZXCV', 'QwErTy', 'AsDf', 'ZxCv']\n assert candidate(words = ['Programming', 'Python', 'Keyboard', 'Typing', 'Challenge']) == []\n assert candidate(words = ['quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dogs', 'cat', 'bat', 'rat', 'mat', 'hat', 'sat', 'van', 'pan', 'tan', 'man', 'can', 'fan', 'fan']) == []\n assert candidate(words = ['helloWorld', 'pythonProgramming', 'dataScience', 'machineLearning', 'artificialIntelligence']) == []\n assert candidate(words = ['The', 'Quick', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dog', 'Zoology']) == []\n assert candidate(words = ['qwerty', 'ASDFGH', 'ZXCVBNM', 'QwErTy', 'AsDfGh', 'ZxCvBnM']) == ['qwerty', 'ASDFGH', 'ZXCVBNM', 'QwErTy', 'AsDfGh', 'ZxCvBnM']\n assert candidate(words = ['developer', 'programming', 'software', 'engineer', 'algorithm', 'datastructure']) == []\n assert candidate(words = ['qwertyuiopq', 'asdfghjklasdf', 'zxcvbnmzxcvbnm', 'qwertyuiopqwertyuiop', 'asdfghjklasdfghjkl', 'zxcvbnmzxcvbnmzxcvbnm']) == ['qwertyuiopq', 'asdfghjklasdf', 'zxcvbnmzxcvbnm', 'qwertyuiopqwertyuiop', 'asdfghjklasdfghjkl', 'zxcvbnmzxcvbnmzxcvbnm']\n assert candidate(words = ['neurotransmitter', 'photosynthesis', 'biochemistry', 'mitochondria', 'cytoplasm', 'hypothalamus', 'glucose', 'enzymes', 'photosynthetic', 'photosynthesis']) == []\n assert candidate(words = ['MixedCaseWords', 'CamelCase', 'PascalCase', 'SnakeCase', 'KebabCase']) == []\n assert candidate(words = ['Programming', 'Python', 'Keyboard', 'Layout', 'Challenges']) == []\n assert candidate(words = ['supercalifragilisticexpialidocious', 'antidisestablishmentarianism', 'honorificabilitudinitatibus', 'floccinaucinihilipilification', 'pneumonoultramicroscopicsilicovolcanoconiosis', 'supercalifragilisticexpialidocious', 'antidisestablishmentarianism']) == []\n assert candidate(words = ['HELLOworld', 'aLpHa', 'KEYbOArD', 'OnEtwOthReE', 'QuICkBrOWnFoXJUMPsOvErLAZYdOG', 'PYtHoNcOdInG']) == []\n assert candidate(words = ['Mississippi', 'Delaware', 'Washington', 'California', 'Texas', 'Alabama', 'Georgia', 'Virginia', 'Florida']) == []\n assert candidate(words = ['Typewriter', 'Keyboard', 'Mouse', 'Monitor', 'Motherboard']) == ['Typewriter']\n assert candidate(words = ['Quickly', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dog']) == []\n assert candidate(words = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM', 'qazwsxedcrfvtgbyhnujmikolp', 'poiuytrewqlkjhgfdsamnbvcxz', 'mnbvcxzlkjhgfdsapoiuytrewq', 'abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz', 'zzzyyxxwwvvuuttrrssqqppoonnmmllkkjjiihhggffeeddccbbaa']) == ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM']\n assert candidate(words = ['International', 'Pineapple', 'Keyboard', 'Queen', 'Zebra', 'Alphabet', 'Quick', 'Brown', 'Fox', 'Lazy']) == []\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'ZYXWVUTSRQPONMLKJIHGFEDCBA', 'QwErTyUiOpAsDfGhJkLzXcVbNm']) == []\n assert candidate(words = ['Mississippi', 'Alabama', 'Hawaii', 'Delaware', 'Alaska', 'Florida']) == ['Alaska']\n assert candidate(words = ['OneRow', 'TwoRows', 'ThreeRows', 'FourRows', 'FiveRows']) == []\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'ZYXWVUTSRQPONMLKJIHGFEDCBA', 'QwErTyUiOpAsDfGhJkLzXcVbNm', 'mnbvcxzlkjhgfdsapoiuytrewq']) == []\n assert candidate(words = ['Supercalifragilisticexpialidocious', 'Pneumonoultramicroscopicsilicovolcanoconiosis', 'Honorificabilitudinitatibus', 'Antidisestablishmentarianism', 'Floccinaucinihilipilification']) == []\n assert candidate(words = ['qwerty', 'asdfgh', 'zxcvbnm', 'QWERTY', 'ASDFGH', 'ZXCVBNM']) == ['qwerty', 'asdfgh', 'zxcvbnm', 'QWERTY', 'ASDFGH', 'ZXCVBNM']\n assert candidate(words = ['Quick', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dog']) == []\n assert candidate(words = ['helloWorld', 'OpenAI', 'Python', 'Java', 'CSharp', 'JavaScript', 'TypeScript']) == []\n assert candidate(words = ['Python', 'Keyboard', 'Alphabet', 'Row', 'Line']) == ['Row']\n assert candidate(words = ['aaaaabbbbcccccdddddeeeeefffffggggghhhhhiiiiiijjjjjkkkkklllllmnnnnnooooo', 'pppppqqqqqrrrrrssssstttttuuuuuvvvvvwwwwwxxxxyyyyyzzzzz']) == []\n assert candidate(words = ['asdfghjklASDFGHJKL', 'zxcvbnmZXCVBNM', 'qwertyuiopQWERTYUIOP']) == ['asdfghjklASDFGHJKL', 'zxcvbnmZXCVBNM', 'qwertyuiopQWERTYUIOP']\n assert candidate(words = ['RowOne', 'RowTwo', 'RowThree', 'roWONe', 'roWTWo', 'roWTHrEE', 'ONE', 'TWO', 'THREE', 'one', 'two', 'three']) == ['RowTwo', 'roWTWo', 'TWO', 'two']\n assert candidate(words = ['Alphabet', 'Zebra', 'Python', 'Java', 'CSharp', 'Ruby']) == []\n assert candidate(words = ['racecar', 'madam', 'refer', 'deed', 'level', 'noon', 'rotor']) == ['rotor']\n assert candidate(words = ['single', 'double', 'triple', 'quadruple', 'quintuple', 'sextuple', 'septuple', 'octuple', 'nonuple', 'decuple']) == []\n assert candidate(words = ['unique', 'characters', 'strings', 'keyboard', 'input', 'typing', 'fast']) == []\n assert candidate(words = ['supercalifragilisticexpialidocious', 'antidisestablishmentarianism', 'honorificabilitudinitatibus', 'floccinaucinihilipilification']) == []\n assert candidate(words = ['Supercalifragilisticexpialidocious', 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']) == []\n assert candidate(words = ['gaming', 'console', 'controller', 'joystick', 'keyboard', 'monitor']) == []\n assert candidate(words = ['Alaska', 'AlaskaAlaska', 'DadDadDad', 'PeacePeacePeace']) == ['Alaska', 'AlaskaAlaska', 'DadDadDad']\n assert candidate(words = ['Consistency', 'Maintainability', 'Scalability', 'Performance', 'Efficiency', 'Optimization', 'Debugging', 'Testing', 'Deployment', 'Maintenance']) == []\n assert candidate(words = ['aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ']) == []\n assert candidate(words = ['Quick', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dogs']) == []\n assert candidate(words = ['supercalifragilisticexpialidocious', 'antidisestablishmentarianism', 'floccinaucinihilipilification', 'pneumonoultramicroscopicsilicovolcanoconiosis', 'thyroparathyroidectomized']) == []\n assert candidate(words = ['aBcDeFgHiJ', 'klMnOpQrSt', 'uVwXyZ', 'AeIoU', 'bcd', 'fgh', 'jkl', 'mno', 'pqr', 'stv', 'wxy', 'z']) == ['fgh', 'jkl', 'pqr', 'z']\n assert candidate(words = ['Super', 'Califragilisticexpialidocious', 'ExpiAlIdoCious', 'Antidisestablishmentarianism', 'Pneumonoultramicroscopicsilicovolcanoconiosis']) == []\n assert candidate(words = ['MIXED', 'CaSe', 'sEnSiTiViTy', 'UpPeR', 'LoWeR']) == ['UpPeR']\n assert candidate(words = ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM']) == ['qwertyuiop', 'asdfghjkl', 'zxcvbnm', 'QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM']\n assert candidate(words = ['ASDFG', 'ZXCVBNM', 'QWERTYUIOP', 'alabama', 'kentucky', 'delaware']) == ['ASDFG', 'ZXCVBNM', 'QWERTYUIOP']\n assert candidate(words = ['qwertyuiop', 'Qwertyuiop', 'asdfghjkl', 'Asdfghjkl', 'zxcvbnm', 'Zxcvbnm', 'QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM', 'qQwWeErRtTyYuUiIoOpP', 'aAsSdDfFgGhHjJkKlL', 'zZxXcCvVbBnNmM']) == ['qwertyuiop', 'Qwertyuiop', 'asdfghjkl', 'Asdfghjkl', 'zxcvbnm', 'Zxcvbnm', 'QWERTYUIOP', 'ASDFGHJKL', 'ZXCVBNM', 'qQwWeErRtTyYuUiIoOpP', 'aAsSdDfFgGhHjJkKlL', 'zZxXcCvVbBnNmM']\n assert candidate(words = ['Quick', 'Brown', 'Fox', 'Jumps', 'Over', 'Lazy', 'Dog']) == []\n assert candidate(words = ['qwertyuiopasdfghjklzxcvbnmqwertyuiop', 'asdfghjklzxcvbnmqwertyuiopasdfghjkl', 'zxcvbnmqwertyuiopasdfghjklzxcvbnm']) == []\n assert candidate(words = ['abcdefghij', 'klmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'mnopqrstu', 'vwxyz', 'qazwsxedcrfvtgbyhnujmiklop', 'lkjhgfdsapoiuytrewq', 'poiuytrewqazxcvbnm', 'mnbvcxzlkjhgfdsapoiuytrewq']) == []\n assert candidate(words = ['Quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dogs']) == []\n assert candidate(words = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'qwertyuiopasdfghjklzxcvbnm', 'mnbvcxzlkjhgfdsapoiuytrewq']) == []\n assert candidate(words = ['RowOne', 'RowTWO', 'ROWthree', 'rOWFOUR', 'RoWFIVe', 'ROWsiX', 'ROWseVE', 'ROWeiGHT', 'ROWniNE', 'ROWten']) == ['RowTWO']\n assert candidate(words = ['qwerty', 'asdfghjkl', 'zxcvbnm', 'QWERTY', 'ASDFGHJKL', 'ZXCVBNM', 'QwErTyUiOp', 'AsDfGhJkL', 'ZxCvBnM']) == ['qwerty', 'asdfghjkl', 'zxcvbnm', 'QWERTY', 'ASDFGHJKL', 'ZXCVBNM', 'QwErTyUiOp', 'AsDfGhJkL', 'ZxCvBnM']\n assert candidate(words = ['Programming', 'Language', 'Python', 'Java', 'CSharp', 'Ruby']) == []\n assert candidate(words = ['abcdefghij', 'klmnopqrstu', 'vwxyz', 'ABCDEFGHIJ', 'KLMNOPQRSTU', 'VWXYZ']) == []\n assert candidate(words = ['Typewriter', 'Keyboard', 'Mouse', 'Monitor', 'qwerty', 'zxcvbnm']) == ['Typewriter', 'qwerty', 'zxcvbnm']\n", "comparison": "exact"}, "public_tests": ["[\"Hello\",\"Alaska\",\"Dad\",\"Peace\"]", "[\"omk\"]", "[\"adsdf\",\"sfd\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["words"], "leetcode_dataset_entry_point": "Solution().findWords", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:22+00:00", "tests_total": 81, "tests_dropped": 14, "flags": ["figure_reference", "has_images"], "topic_tags": ["array", "hash-table", "string"]}, "language": "ruby", "interface": {"raw_signature": "def find_words(words)", "container": null, "callable": "find_words", "parameters": [{"name": "words", "type": "String[]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 502, "task_id": "ipo", "difficulty": "Hard", "problem_description": "Suppose LeetCode will start its IPO soon. In order to sell a good price of its shares to Venture Capital, LeetCode would like to work on some projects to increase its capital before the IPO. Since it has limited resources, it can only finish at most k distinct projects before the IPO. Help LeetCode design the best way to maximize its total capital after finishing at most k distinct projects.\n\nYou are given n projects where the i^th project has a pure profit profits[i] and a minimum capital of capital[i] is needed to start it.\n\nInitially, you have w capital. When you finish a project, you will obtain its pure profit and the profit will be added to your total capital.\n\nPick a list of at most k distinct projects from given projects to maximize your final capital, and return the final maximized capital.\n\nThe answer is guaranteed to fit in a 32-bit signed integer.\n\nExample 1:\n\nInput: k = 2, w = 0, profits = [1,2,3], capital = [0,1,1]\nOutput: 4\nExplanation: Since your initial capital is 0, you can only start the project indexed 0.\nAfter finishing it you will obtain profit 1 and your capital becomes 1.\nWith capital 1, you can either start the project indexed 1 or the project indexed 2.\nSince you can choose at most 2 projects, you need to finish the project indexed 2 to get the maximum capital.\nTherefore, output the final maximized capital, which is 0 + 1 + 3 = 4.\n\nExample 2:\n\nInput: k = 3, w = 0, profits = [1,2,3], capital = [0,1,2]\nOutput: 6\n\nConstraints:\n\n- 1 <= k <= 10^5\n- 0 <= w <= 10^9\n- n == profits.length\n- n == capital.length\n- 1 <= n <= 10^5\n- 0 <= profits[i] <= 10^4\n- 0 <= capital[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(k = 1,w = 10,profits = [5, 6],capital = [4, 0]) == 16\n assert candidate(k = 5,w = 10,profits = [5, 4, 3, 2, 1],capital = [1, 2, 3, 4, 5]) == 25\n assert candidate(k = 2,w = 3,profits = [8, 10, 6],capital = [2, 5, 0]) == 21\n assert candidate(k = 4,w = 0,profits = [1, 1, 1, 1],capital = [0, 0, 0, 0]) == 4\n assert candidate(k = 5,w = 0,profits = [1, 2, 3, 4, 5],capital = [0, 1, 2, 3, 4]) == 15\n assert candidate(k = 5,w = 0,profits = [10, 20, 30, 40, 50],capital = [0, 0, 0, 0, 0]) == 150\n assert candidate(k = 1,w = 10,profits = [1, 2, 3],capital = [5, 5, 5]) == 13\n assert candidate(k = 1,w = 5,profits = [1, 2, 3],capital = [3, 4, 5]) == 8\n assert candidate(k = 3,w = 0,profits = [1, 2, 3],capital = [0, 1, 2]) == 6\n assert candidate(k = 3,w = 0,profits = [10, 20, 30],capital = [0, 0, 0]) == 60\n assert candidate(k = 2,w = 1,profits = [1, 2, 3],capital = [1, 1, 2]) == 6\n assert candidate(k = 1,w = 100,profits = [1000, 2000, 3000],capital = [1000, 2000, 3000]) == 100\n assert candidate(k = 3,w = 3,profits = [1, 2, 3, 4, 5],capital = [0, 1, 2, 3, 4]) == 15\n assert candidate(k = 2,w = 0,profits = [1, 2, 3],capital = [0, 1, 1]) == 4\n assert candidate(k = 10,w = 1,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 11\n assert candidate(k = 2,w = 3,profits = [5, 6, 4, 3, 2],capital = [2, 3, 4, 5, 6]) == 14\n assert candidate(k = 3,w = 2,profits = [5, 4, 3, 2, 1],capital = [5, 4, 3, 2, 1]) == 13\n assert candidate(k = 2,w = 5,profits = [100, 200, 300, 400, 500],capital = [0, 0, 0, 0, 0]) == 905\n assert candidate(k = 5,w = 20,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],capital = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 3720\n assert candidate(k = 6,w = 1,profits = [1, 2, 3, 4, 5, 6, 7],capital = [0, 1, 2, 3, 4, 5, 6]) == 28\n assert candidate(k = 3,w = 0,profits = [10, 10, 10, 10, 10],capital = [0, 0, 0, 0, 0]) == 30\n assert candidate(k = 5,w = 100,profits = [10, 20, 30, 40, 50],capital = [10, 20, 30, 40, 50]) == 250\n assert candidate(k = 4,w = 0,profits = [100, 200, 300, 400, 500],capital = [0, 1, 2, 3, 4]) == 1300\n assert candidate(k = 1,w = 1,profits = [100, 200, 300, 400, 500],capital = [0, 0, 0, 0, 0]) == 501\n assert candidate(k = 10,w = 10000,profits = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000],capital = [0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000]) == 65000\n assert candidate(k = 4,w = 0,profits = [10, 20, 30, 40],capital = [0, 10, 20, 30]) == 100\n assert candidate(k = 20,w = 1000,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000],capital = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == 22000\n assert candidate(k = 3,w = 1,profits = [10, 20, 30, 40, 50],capital = [1, 2, 3, 4, 5]) == 101\n assert candidate(k = 5,w = 0,profits = [1, 10, 100, 1000, 10000],capital = [0, 0, 0, 0, 0]) == 11111\n assert candidate(k = 4,w = 10,profits = [100, 200, 300, 400],capital = [50, 50, 50, 50]) == 10\n assert candidate(k = 3,w = 50,profits = [100, 200, 300, 400, 500],capital = [50, 50, 50, 50, 50]) == 1250\n assert candidate(k = 5,w = 0,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],capital = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 4000\n assert candidate(k = 7,w = 50,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 540\n assert candidate(k = 7,w = 5,profits = [5, 10, 15, 20, 25, 30, 35, 40],capital = [0, 1, 2, 3, 4, 5, 6, 7]) == 180\n assert candidate(k = 3,w = 3,profits = [1, 1, 1, 1, 1],capital = [0, 1, 2, 3, 4]) == 6\n assert candidate(k = 10,w = 5,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 15\n assert candidate(k = 5,w = 5,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 405\n assert candidate(k = 1,w = 0,profits = [10000, 9000, 8000, 7000, 6000],capital = [0, 1000, 2000, 3000, 4000]) == 10000\n assert candidate(k = 4,w = 1500,profits = [500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500],capital = [1000, 1200, 1400, 1600, 1800, 2000, 2200, 2400, 2600]) == 15000\n assert candidate(k = 10,w = 1,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],capital = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 5501\n assert candidate(k = 5,w = 1,profits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],capital = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 1\n assert candidate(k = 5,w = 1,profits = [1, 2, 3, 4, 5],capital = [0, 1, 2, 3, 4]) == 16\n assert candidate(k = 10,w = 0,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 10\n assert candidate(k = 10,w = 100,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],capital = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 5600\n assert candidate(k = 7,w = 5,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 495\n assert candidate(k = 10,w = 5,profits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],capital = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 60\n assert candidate(k = 3,w = 10,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 280\n assert candidate(k = 3,w = 15,profits = [5, 10, 15, 20, 25],capital = [5, 10, 15, 20, 25]) == 75\n assert candidate(k = 3,w = 20,profits = [10, 10, 10, 10, 10],capital = [15, 15, 15, 15, 15]) == 50\n assert candidate(k = 5,w = 1000,profits = [5000, 1000, 2000, 1500, 3000, 4000, 6000, 7000, 8000, 9000],capital = [0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500]) == 36000\n assert candidate(k = 15,w = 10,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],capital = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75]) == 1210\n assert candidate(k = 5,w = 0,profits = [500, 400, 300, 200, 100],capital = [100, 200, 300, 400, 500]) == 0\n assert candidate(k = 4,w = 10,profits = [5, 2, 10, 8, 1],capital = [3, 4, 1, 10, 5]) == 35\n assert candidate(k = 3,w = 1,profits = [5, 4, 3, 2, 1],capital = [0, 1, 2, 3, 4]) == 13\n assert candidate(k = 4,w = 2,profits = [1, 2, 3, 4, 5, 6, 7, 8],capital = [0, 1, 2, 3, 4, 5, 6, 7]) == 26\n assert candidate(k = 5,w = 10,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 15\n assert candidate(k = 7,w = 0,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],capital = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 0\n assert candidate(k = 3,w = 1000,profits = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],capital = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]) == 1100\n assert candidate(k = 3,w = 0,profits = [10, 20, 30, 40, 50],capital = [0, 0, 0, 0, 0]) == 120\n assert candidate(k = 3,w = 5,profits = [10, 15, 20, 25, 30],capital = [0, 0, 0, 0, 0]) == 80\n assert candidate(k = 3,w = 100,profits = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500],capital = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50]) == 1450\n assert candidate(k = 5,w = 1000,profits = [500, 750, 1000, 1250, 1500],capital = [250, 500, 750, 1000, 1250]) == 6000\n assert candidate(k = 4,w = 10,profits = [5, 5, 5, 5, 5, 5],capital = [0, 0, 0, 0, 0, 0]) == 30\n assert candidate(k = 3,w = 20,profits = [100, 200, 300, 400, 500],capital = [10, 20, 30, 40, 50]) == 1120\n assert candidate(k = 10,w = 100,profits = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],capital = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90]) == 375\n assert candidate(k = 10,w = 10,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 560\n assert candidate(k = 4,w = 10,profits = [5, 8, 7, 10, 9, 12],capital = [0, 5, 4, 9, 8, 10]) == 49\n assert candidate(k = 3,w = 10,profits = [50, 40, 30, 20, 10],capital = [5, 10, 15, 20, 25]) == 130\n assert candidate(k = 5,w = 20,profits = [100, 200, 300, 400, 500, 600],capital = [150, 250, 350, 450, 550, 650]) == 20\n assert candidate(k = 2,w = 0,profits = [5, 5, 5, 5, 5, 5],capital = [1, 2, 3, 4, 5, 6]) == 0\n assert candidate(k = 3,w = 5,profits = [1, 3, 2, 5, 4],capital = [0, 2, 3, 6, 4]) == 17\n assert candidate(k = 3,w = 10,profits = [5, 4, 3, 2, 1],capital = [10, 20, 30, 40, 50]) == 15\n assert candidate(k = 6,w = 5,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 11\n assert candidate(k = 7,w = 5,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]) == 475\n assert candidate(k = 3,w = 5,profits = [6, 7, 8, 9, 10, 11],capital = [0, 1, 2, 3, 4, 5]) == 35\n assert candidate(k = 10,w = 0,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(k = 2,w = 100,profits = [50, 75, 25, 100, 125],capital = [0, 100, 50, 200, 150]) == 300\n assert candidate(k = 5,w = 5,profits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],capital = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 5\n assert candidate(k = 2,w = 3,profits = [1, 2, 3, 4, 5],capital = [2, 3, 4, 5, 6]) == 9\n assert candidate(k = 5,w = 100,profits = [10, 20, 30, 40, 50],capital = [50, 50, 50, 50, 50]) == 250\n assert candidate(k = 3,w = 50,profits = [100, 200, 300, 400, 500],capital = [50, 100, 150, 200, 250]) == 950\n assert candidate(k = 3,w = 0,profits = [100, 200, 300, 400, 500],capital = [50, 100, 150, 200, 250]) == 0\n assert candidate(k = 3,w = 10,profits = [100, 200, 300, 400, 500],capital = [0, 0, 0, 0, 0]) == 1210\n assert candidate(k = 2,w = 500,profits = [150, 250, 350, 450, 550],capital = [50, 150, 250, 350, 450]) == 1500\n assert candidate(k = 5,w = 10,profits = [5, 6, 7, 8, 9],capital = [2, 3, 4, 5, 6]) == 45\n assert candidate(k = 7,w = 2,profits = [1, 2, 3, 4, 5, 6, 7, 8],capital = [0, 1, 2, 3, 4, 5, 6, 7]) == 37\n assert candidate(k = 5,w = 0,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 5\n assert candidate(k = 6,w = 3,profits = [1, 2, 3, 4, 5, 6, 7],capital = [1, 2, 3, 4, 5, 6, 7]) == 30\n assert candidate(k = 3,w = 10,profits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],capital = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 37\n assert candidate(k = 5,w = 5,profits = [3, 4, 5, 1, 2],capital = [1, 2, 3, 4, 5]) == 20\n assert candidate(k = 3,w = 5,profits = [10, 20, 30, 40, 50],capital = [0, 1, 2, 3, 4]) == 125\n assert candidate(k = 5,w = 100,profits = [200, 300, 400, 500, 600],capital = [50, 100, 150, 200, 250]) == 2100\n assert candidate(k = 100,w = 0,profits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],capital = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 55\n assert candidate(k = 3,w = 20,profits = [10, 20, 30, 40, 50],capital = [5, 10, 15, 20, 25]) == 140\n assert candidate(k = 3,w = 1,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 4\n assert candidate(k = 1,w = 1000000000,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]) == 1000000001\n assert candidate(k = 1,w = 100,profits = [1, 2, 3, 4, 5],capital = [0, 0, 0, 0, 0]) == 105\n assert candidate(k = 3,w = 5,profits = [2, 3, 5, 6, 8],capital = [1, 2, 3, 5, 6]) == 24\n assert candidate(k = 5,w = 0,profits = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50],capital = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 0\n assert candidate(k = 5,w = 10,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 15\n assert candidate(k = 2,w = 100,profits = [100, 200, 300, 400, 500],capital = [0, 0, 0, 0, 0]) == 1000\n assert candidate(k = 4,w = 2,profits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],capital = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == 12\n assert candidate(k = 3,w = 500,profits = [100, 200, 300, 400, 500, 600, 700, 800],capital = [0, 100, 200, 300, 400, 500, 600, 700]) == 2600\n assert candidate(k = 5,w = 10,profits = [100, 200, 300, 400, 500],capital = [1, 2, 3, 4, 5]) == 1510\n assert candidate(k = 2,w = 5,profits = [10, 15, 20, 25, 30],capital = [0, 5, 10, 15, 20]) == 50\n assert candidate(k = 5,w = 0,profits = [10, 20, 30, 40, 50],capital = [100, 50, 200, 300, 400]) == 0\n assert candidate(k = 2,w = 5,profits = [10, 10, 10, 10, 10],capital = [0, 0, 0, 0, 0]) == 25\n assert candidate(k = 5,w = 0,profits = [1, 2, 3, 4, 5, 6],capital = [0, 1, 1, 2, 2, 3]) == 19\n assert candidate(k = 5,w = 500,profits = [100, 200, 300, 400, 500],capital = [0, 0, 0, 0, 0]) == 2000\n assert candidate(k = 6,w = 10,profits = [1, 2, 3, 4, 5, 6],capital = [0, 2, 4, 6, 8, 10]) == 31\n assert candidate(k = 5,w = 3,profits = [10, 2, 11, 1, 4],capital = [3, 1, 5, 0, 2]) == 31\n assert candidate(k = 4,w = 0,profits = [100, 200, 300, 400],capital = [50, 150, 250, 350]) == 0\n assert candidate(k = 5,w = 50,profits = [10, 20, 30, 40, 50],capital = [10, 20, 30, 40, 50]) == 200\n assert candidate(k = 5,w = 50,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],capital = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == 450\n assert candidate(k = 4,w = 5,profits = [6, 7, 8, 9, 10],capital = [0, 5, 10, 15, 20]) == 39\n assert candidate(k = 5,w = 10,profits = [1, 3, 5, 7, 9],capital = [0, 2, 3, 5, 8]) == 35\n assert candidate(k = 3,w = 5,profits = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],capital = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 5\n assert candidate(k = 4,w = 10,profits = [10, 20, 30, 40, 50],capital = [0, 10, 20, 30, 40]) == 150\n assert candidate(k = 3,w = 10,profits = [15, 25, 35, 45, 55, 65, 75, 85, 95],capital = [0, 0, 0, 0, 0, 0, 0, 0, 0]) == 265\n assert candidate(k = 2,w = 1000,profits = [1000, 1000, 1000, 1000, 1000],capital = [0, 100, 200, 300, 400]) == 3000\n assert candidate(k = 4,w = 1,profits = [4, 5, 6, 7, 8, 9],capital = [2, 3, 4, 5, 6, 7]) == 1\n assert candidate(k = 4,w = 10,profits = [1, 5, 7, 10, 12],capital = [3, 7, 10, 14, 17]) == 44\n assert candidate(k = 5,w = 100,profits = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150],capital = [50, 40, 30, 20, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 750\n assert candidate(k = 3,w = 1000,profits = [300, 500, 700, 100, 200, 400, 600, 800],capital = [0, 500, 1000, 1500, 2000, 2500, 3000, 3500]) == 2500\n assert candidate(k = 4,w = 1000,profits = [900, 800, 700, 600, 500],capital = [500, 600, 700, 800, 900]) == 4000\n assert candidate(k = 3,w = 0,profits = [10, 20, 30, 40, 50],capital = [1, 2, 3, 4, 5]) == 0\n assert candidate(k = 15,w = 500,profits = [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750],capital = [200, 150, 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 6500\n assert candidate(k = 2,w = 5,profits = [10, 20, 30, 40, 50],capital = [1, 2, 3, 4, 5]) == 95\n assert candidate(k = 5,w = 10,profits = [10, 20, 30, 40, 50],capital = [5, 15, 25, 35, 45]) == 160\n", "comparison": "exact"}, "public_tests": ["2\n0\n[1,2,3]\n[0,1,1]", "3\n0\n[1,2,3]\n[0,1,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["k", "w", "profits", "capital"], "leetcode_dataset_entry_point": "Solution().findMaximizedCapital", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:27+00:00", "tests_total": 131, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "greedy", "sorting", "heap-priority-queue"]}, "language": "ruby", "interface": {"raw_signature": "def find_maximized_capital(k, w, profits, capital)", "container": null, "callable": "find_maximized_capital", "parameters": [{"name": "k", "type": "Integer"}, {"name": "w", "type": "Integer"}, {"name": "profits", "type": "Integer[]"}, {"name": "capital", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 503, "task_id": "next-greater-element-ii", "difficulty": "Medium", "problem_description": "Given a circular integer array nums (i.e., the next element of nums[nums.length - 1] is nums[0]), return the next greater number for every element in nums.\n\nThe next greater number of a number x is the first greater number to its traversing-order next in the array, which means you could search circularly to find its next greater number. If it doesn't exist, return -1 for this number.\n\nExample 1:\n\nInput: nums = [1,2,1]\nOutput: [2,-1,2]\nExplanation: The first 1's next greater number is 2;\nThe number 2 can't find next greater number.\nThe second 1's next greater number needs to search circularly, which is also 2.\n\nExample 2:\n\nInput: nums = [1,2,3,4,3]\nOutput: [2,3,4,-1,4]\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -10^9 <= nums[i] <= 10^9\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 4, 3, 2, 1]) == [-1, 5, 5, 5, 5]\n assert candidate(nums = [1]) == [-1]\n assert candidate(nums = [3, 10, 4, 3, 2, 1, 5]) == [10, -1, 5, 5, 5, 5, 10]\n assert candidate(nums = [10, 5, 7, 3, 6, 2]) == [-1, 7, 10, 6, 10, 10]\n assert candidate(nums = [1, 5, 4, 3, 2, 6]) == [5, 6, 6, 6, 6, -1]\n assert candidate(nums = [7, 8, 9, 10, 1, 2, 3, 4, 5, 6]) == [8, 9, 10, -1, 2, 3, 4, 5, 6, 7]\n assert candidate(nums = [1, 1, 1, 1, 1]) == [-1, -1, -1, -1, -1]\n assert candidate(nums = [3, 8, 4, 1, 2]) == [8, -1, 8, 2, 3]\n assert candidate(nums = [10, 5, 15, 20, 25, 5, 10]) == [15, 15, 20, 25, -1, 10, 15]\n assert candidate(nums = [1, 2, 3, 4, 5]) == [2, 3, 4, 5, -1]\n assert candidate(nums = [5, 1, 2, 3, 4]) == [-1, 2, 3, 4, 5]\n assert candidate(nums = [3, 1, 2]) == [-1, 2, 3]\n assert candidate(nums = [1, 2, 1]) == [2, -1, 2]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, 10, 10, 10, 10, 10, 10, 10, 10, 10]\n assert candidate(nums = [1, 5, 4, 3, 2]) == [5, -1, 5, 5, 5]\n assert candidate(nums = [1, 2, 3, 4, 3]) == [2, 3, 4, -1, 4]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, -1]\n assert candidate(nums = [1, 10, 100, 1000, 10000, 1, 10, 100, 1000, 10000, 1, 10, 100, 1000, 10000]) == [10, 100, 1000, 10000, -1, 10, 100, 1000, 10000, -1, 10, 100, 1000, 10000, -1]\n assert candidate(nums = [5, 4, 3, 2, 1, 10]) == [10, 10, 10, 10, 10, -1]\n assert candidate(nums = [5, 1, 4, 3, 2, 8, 6, 7, 10, 9, 11, 12]) == [8, 4, 8, 8, 8, 10, 7, 10, 11, 11, 12, -1]\n assert candidate(nums = [3, 8, 4, 12, 5, 10, 6, 7, 1, 2]) == [8, 12, 12, -1, 10, 12, 7, 8, 2, 3]\n assert candidate(nums = [1, 2, 3, 2, 1, 1, 2, 3, 2, 1]) == [2, 3, -1, 3, 2, 2, 3, -1, 3, 2]\n assert candidate(nums = [5, 4, 3, 2, 1, 6, 7, 8, 9, 10, 1]) == [6, 6, 6, 6, 6, 7, 8, 9, 10, -1, 5]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 2]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1]\n assert candidate(nums = [3, 3, 3, 3, 3, 1, 2, 1, 2, 1, 2]) == [-1, -1, -1, -1, -1, 2, 3, 2, 3, 2, 3]\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(nums = [3, 8, 4, 12, 5, 10, 6, 7]) == [8, 12, 12, -1, 10, 12, 7, 8]\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [-1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15]\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1]) == [-1, 7, 6, 5, 4, 3, 2, 2, 3, 4, 5, 6, 7, -1, -1, 7, 7, 7, 7, 7, 7]\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1]) == [2, 3, 4, 5, -1, 2, 3, 4, 5, -1, 2, 3, 4, 5, -1, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == [2, 3, 4, 5, -1, 2, 3, 4, 5, -1]\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 9, 0]) == [9, 9, 9, 9, 9, 9, 9, 9, -1, 8]\n assert candidate(nums = [5, 7, 1, 2, 6, 4, 5, 9, 1, 2]) == [7, 9, 2, 6, 9, 5, 9, -1, 2, 5]\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 110]) == [110, 110, 110, 110, 110, 110, 110, 110, 110, 110, -1]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 20]) == [-1, 20, 20, 20, 20, 20, 20, 20, 20, 20, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [2, 3, 4, 5, 9, 9, 9, 9, 9, 9, -1, 9, 9, 9, 9, 5, 4, 3, 2, 1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 10, 9, 8, 7, 6, 5, 4, 3, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, -1, 2]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 10]) == [-1, 10, 10, 10, 10, 10, 10, 10, 10, 10, -1]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 1]) == [3, 5, 7, 9, 11, 13, 15, 17, 19, -1, 3]\n assert candidate(nums = [2, 3, 1, 5, 4, 8, 7, 6, 9, 10, 11, 12, 13, 14, 1]) == [3, 5, 5, 8, 8, 9, 9, 9, 10, 11, 12, 13, 14, -1, 2]\n assert candidate(nums = [73, 74, 75, 71, 69, 72, 76, 73]) == [74, 75, 76, 72, 72, 76, -1, 74]\n assert candidate(nums = [10, 5, 2, 6, 10, 3, 4, 8, 1, 9]) == [-1, 6, 6, 10, -1, 4, 8, 9, 9, 10]\n assert candidate(nums = [1, 3, 2, 4, 3, 5, 4, 6, 5, 7]) == [3, 4, 4, 5, 5, 6, 6, 7, 7, -1]\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, 8, 8, 8, 8, 8, 8, 8, -1, 8, 8, 8, 8, 8, 8, 8, -1, 8, 8, 8, 8, 8, 8, 8, -1, 8, 8, 8, 8, 8, 8, 8]\n assert candidate(nums = [4, 2, 5, 1, 2, 3, 6, 4, 7]) == [5, 5, 6, 2, 3, 6, 7, 7, -1]\n assert candidate(nums = [3, 3, 2, 2, 1, 6, 5, 4, 3, 2, 1, 6]) == [6, 6, 6, 6, 6, -1, 6, 6, 6, 6, 6, -1]\n assert candidate(nums = [1, 1, 2, 3, 3, 2, 2, 3, 1, 1]) == [2, 2, 3, -1, -1, 3, 3, -1, 2, 2]\n assert candidate(nums = [1, 2, 3, 4, 5, 5, 5, 5, 5, 1, 2, 3, 4, 5]) == [2, 3, 4, 5, -1, -1, -1, -1, -1, 2, 3, 4, 5, -1]\n assert candidate(nums = [1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000, 1000000000, -1000000000]) == [-1, 1000000000, -1, 1000000000, -1, 1000000000, -1, 1000000000, -1, 1000000000]\n assert candidate(nums = [1, 2, 1, 3, 4, 3, 2, 4, 5, 6, 5, 4, 6, 5, 7, 8, 9, 0]) == [2, 3, 3, 4, 5, 4, 4, 5, 6, 7, 6, 6, 7, 7, 8, 9, -1, 1]\n assert candidate(nums = [5, 3, 2, 1, 4, 5, 6, 7, 8, 9]) == [6, 4, 4, 4, 5, 6, 7, 8, 9, -1]\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == [2, 3, 4, -1, 4, 3, 2, 3, 4, -1, 4, 3, 2, 3, 4, -1, 4, 3, 2]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == [2, 2, 3, 3, 4, 4, 5, 5, -1, -1]\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == [-1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums = [1, 10, 11, 1, 10, 11, 1]) == [10, 11, -1, 10, 11, -1, 10]\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, -1, -1]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]) == [3, 5, 7, 9, 11, 13, 15, 17, 19, -1]\n assert candidate(nums = [5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == [-1, -1, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums = [5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5]) == [-1, 5, 4, 3, 2, 1, 2, 3, 4, 5, -1, 5, 4, 3, 2, 1, 2, 3, 4, 5, -1]\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 2]) == [3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, 3]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 10]) == [10, 10, 10, 10, 10, 10, 10, 10, 10, -1]\n assert candidate(nums = [3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4]) == [4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1]\n assert candidate(nums = [1, 3, 2, 4, 6, 5, 7, 9, 8, 10, 12, 11, 13, 15, 14, 16, 18, 17, 19, 21, 20, 22, 24, 23, 25, 27, 26, 28, 30, 29, 31, 33, 32, 34, 36, 35, 37, 39, 38, 40, 42, 41, 43, 45, 44, 46, 48, 47, 49, 50]) == [3, 4, 4, 6, 7, 7, 9, 10, 10, 12, 13, 13, 15, 16, 16, 18, 19, 19, 21, 22, 22, 24, 25, 25, 27, 28, 28, 30, 31, 31, 33, 34, 34, 36, 37, 37, 39, 40, 40, 42, 43, 43, 45, 46, 46, 48, 49, 49, 50, -1]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(nums = [9, 0, 1, 2, 3, 4, 5, 6, 7, 8]) == [-1, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 12, 13]) == [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 3, 4, 5, 6, 7, 8, 9, 10, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1]\n assert candidate(nums = [7, 1, 5, 2, 6, 3, 4, 8, 9, 0]) == [8, 5, 6, 6, 8, 4, 8, 9, -1, 7]\n assert candidate(nums = [3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 2, 1]) == [4, 2, 4, 5, 6, 7, 8, 9, 10, -1, 3, 3]\n assert candidate(nums = [5, 5, 5, 5, 5, 1, 2, 3, 4, 5, 5, 5, 5, 5]) == [-1, -1, -1, -1, -1, 2, 3, 4, 5, -1, -1, -1, -1, -1]\n assert candidate(nums = [5, 4, 3, 2, 1, 6, 7, 8, 9, 10]) == [6, 6, 6, 6, 6, 7, 8, 9, 10, -1]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [-1, 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, 9, 9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums = [5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == [-1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 9]) == [10, 9, 8, 7, 6, 5, 4, 3, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, -1, 10]\n assert candidate(nums = [1, 3, 2, 1, 3, 2, 1, 3, 2, 1]) == [3, -1, 3, 3, -1, 3, 3, -1, 3, 3]\n assert candidate(nums = [3, 1, 2, 4, 3, 1, 2, 4, 3, 1]) == [4, 2, 4, -1, 4, 2, 4, -1, 4, 3]\n assert candidate(nums = [3, 3, 3, 3, 1, 1, 1, 1, 2, 2, 2, 2]) == [-1, -1, -1, -1, 2, 2, 2, 2, 3, 3, 3, 3]\n assert candidate(nums = [3, 8, 4, 1, 2, 7, 5, 6, 10, 9]) == [8, 10, 7, 2, 7, 10, 6, 10, -1, 10]\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [-1, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100]\n assert candidate(nums = [1, 3, 2, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6]) == [3, 4, 4, 5, 6, 5, 4, 3, 2, 2, 3, 4, 5, 6, -1]\n assert candidate(nums = [10, 5, 10, 5, 10, 5, 10, 5, 10, 5, 10, 5, 10, 5]) == [-1, 10, -1, 10, -1, 10, -1, 10, -1, 10, -1, 10, -1, 10]\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == [20, 30, 40, 50, 60, 70, 80, 90, 100, -1]\n assert candidate(nums = [0, 1, 0, 2, 0, 3, 0, 4, 0, 5]) == [1, 2, 2, 3, 3, 4, 4, 5, 5, -1]\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 100]) == [-1, 100, 100, 100, 100, 100, 100, 100, 100, 100, -1]\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1]\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 21]) == [21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, -1]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == [-1, 9, 9, 9, 9, 9, 9, 9, 9, 9]\n assert candidate(nums = [1, 3, 2, 4, 6, 5, 7, 9, 8, 10]) == [3, 4, 4, 6, 7, 7, 9, 10, 10, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -1]\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11]) == [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -1]\n assert candidate(nums = [3, 8, 4, 12, 5, 10, 6, 7, 9, 2, 1, 11]) == [8, 12, 12, -1, 10, 11, 7, 9, 11, 11, 11, 12]\n assert candidate(nums = [7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8]) == [8, 9, 10, -1, 2, 3, 4, 5, 6, 7, 8, 9]\n assert candidate(nums = [1, 2, 2, 1, 2, 1, 2, 1, 2, 1]) == [2, -1, -1, 2, -1, 2, -1, 2, -1, 2]\n assert candidate(nums = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3]) == [2, 3, -1, 3, 2, 3, -1, 3, 2, 3, -1, 3, 2, 3, -1]\n assert candidate(nums = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10]) == [10, 8, 6, 4, 2, 4, 6, 8, 10, -1]\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == [-1, 100, 100, 100, 100, 100, 100, 100, 100, 100]\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(nums = [1, 3, 2, 4, 5, 1, 3, 2, 4, 5]) == [3, 4, 4, 5, -1, 3, 4, 4, 5, -1]\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 9]) == [-1, 9, 9, 9, 9, 9, 9, 9, 9, -1]\n assert candidate(nums = [3, 8, 4, 1, 2, 7, 6, 5, 1, 4, 9]) == [8, 9, 7, 2, 7, 9, 9, 9, 4, 9, -1]\n assert candidate(nums = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == [2, 3, 4, -1, 4, 3, 2, 3, 4, -1, 4, 3, 2]\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == [3, 5, 7, 9, 11, 13, 15, 17, 19, -1, 19, 17, 15, 13, 11, 9, 7, 5, 3]\n assert candidate(nums = [1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == [3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1]\n assert candidate(nums = [3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4, 3, 1, 2, 4]) == [4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1, 4, 2, 4, -1]\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]\n assert candidate(nums = [1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5]) == [2, 3, 4, 5, -1, 5, 4, 3, 2, 2, 3, 4, 5, -1]\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5]) == [-1, 5, 4, 3, 2, 3, 4, 5, -1]\n assert candidate(nums = [3, 1, 2, 4, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15]) == [4, 2, 4, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, -1, 16]\n assert candidate(nums = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]) == [-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, -1]\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == [2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1]\n assert candidate(nums = [5, 4, 3, 2, 1, 10, 9, 8, 7, 6]) == [10, 10, 10, 10, 10, -1, 10, 10, 10, 10]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, -1, 2, 3, 4, 5, 6]\n assert candidate(nums = [19, 17, 15, 13, 11, 9, 7, 5, 3, 1]) == [-1, 19, 19, 19, 19, 19, 19, 19, 19, 19]\n assert candidate(nums = [10, 20, 30, 40, 50, 15, 25, 35, 45, 55, 5, 1, 6, 11, 16, 21, 26, 31, 36, 41, 46]) == [20, 30, 40, 50, 55, 25, 35, 45, 55, -1, 6, 6, 11, 16, 21, 26, 31, 36, 41, 46, 50]\n assert candidate(nums = [5, 5, 5, 5, 5, 1, 2, 3, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 1, 2, 3, 4, 5]) == [6, 6, 6, 6, 6, 2, 3, 4, 5, 6, 6, 6, 6, 6, -1, -1, -1, -1, -1, 2, 3, 4, 5, 6]\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, 2]\n assert candidate(nums = [1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1]) == [2, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2, -1, 2]\n", "comparison": "exact"}, "public_tests": ["[1,2,1]", "[1,2,3,4,3]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().nextGreaterElements", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:29+00:00", "tests_total": 122, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "stack", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def next_greater_elements(nums)", "container": null, "callable": "next_greater_elements", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 504, "task_id": "base-7", "difficulty": "Easy", "problem_description": "Given an integer num, return a string of its base 7 representation.\n\nExample 1:\n\nInput: num = 100\nOutput: \"202\"\n\nExample 2:\n\nInput: num = -7\nOutput: \"-10\"\n\nConstraints:\n\n- -10^7 <= num <= 10^7\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = -1000000) == \"-11333311\"\n assert candidate(num = 49) == \"100\"\n assert candidate(num = 165) == \"324\"\n assert candidate(num = -10000000) == \"-150666343\"\n assert candidate(num = 0) == \"0\"\n assert candidate(num = 10000000) == \"150666343\"\n assert candidate(num = 16807) == \"100000\"\n assert candidate(num = 100) == \"202\"\n assert candidate(num = -7) == \"-10\"\n assert candidate(num = 16) == \"22\"\n assert candidate(num = 500000) == \"4151504\"\n assert candidate(num = 1234567) == \"13331215\"\n assert candidate(num = -9999999) == \"-150666342\"\n assert candidate(num = -4826464) == \"-56011216\"\n assert candidate(num = -9876543) == \"-146643405\"\n assert candidate(num = 823543) == \"10000000\"\n assert candidate(num = -5764801) == \"-100000000\"\n assert candidate(num = -987654) == \"-11252313\"\n assert candidate(num = -500000) == \"-4151504\"\n assert candidate(num = -1) == \"-1\"\n assert candidate(num = 117649) == \"1000000\"\n assert candidate(num = -2401) == \"-10000\"\n assert candidate(num = 5764801) == \"100000000\"\n assert candidate(num = -117649) == \"-1000000\"\n assert candidate(num = -16807) == \"-100000\"\n assert candidate(num = -1234567) == \"-13331215\"\n assert candidate(num = -343) == \"-1000\"\n assert candidate(num = 2401) == \"10000\"\n assert candidate(num = 1049600) == \"11631026\"\n assert candidate(num = 7) == \"10\"\n assert candidate(num = -823543) == \"-10000000\"\n assert candidate(num = 9999999) == \"150666342\"\n assert candidate(num = 1) == \"1\"\n assert candidate(num = 6827346) == \"112013541\"\n assert candidate(num = 343) == \"1000\"\n assert candidate(num = 9876543) == \"146643405\"\n assert candidate(num = -49) == \"-100\"\n assert candidate(num = 1000000) == \"11333311\"\n assert candidate(num = 4826464) == \"56011216\"\n assert candidate(num = -64) == \"-121\"\n assert candidate(num = 64) == \"121\"\n assert candidate(num = 117648) == \"666666\"\n assert candidate(num = -6827346) == \"-112013541\"\n", "comparison": "exact"}, "public_tests": ["100", "-7"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().convertToBase7", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:31+00:00", "tests_total": 47, "tests_dropped": 4, "flags": [], "topic_tags": ["math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def convert_to_base7(num)", "container": null, "callable": "convert_to_base7", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 506, "task_id": "relative-ranks", "difficulty": "Easy", "problem_description": "You are given an integer array score of size n, where score[i] is the score of the i^th athlete in a competition. All the scores are guaranteed to be unique.\n\nThe athletes are placed based on their scores, where the 1^st place athlete has the highest score, the 2^nd place athlete has the 2^nd highest score, and so on. The placement of each athlete determines their rank:\n\n- The 1^st place athlete's rank is \"Gold Medal\".\n- The 2^nd place athlete's rank is \"Silver Medal\".\n- The 3^rd place athlete's rank is \"Bronze Medal\".\n- For the 4^th place to the n^th place athlete, their rank is their placement number (i.e., the x^th place athlete's rank is \"x\").\n\nReturn an array answer of size n where answer[i] is the rank of the i^th athlete.\n\nExample 1:\n\nInput: score = [5,4,3,2,1]\nOutput: [\"Gold Medal\",\"Silver Medal\",\"Bronze Medal\",\"4\",\"5\"]\nExplanation: The placements are [1^st, 2^nd, 3^rd, 4^th, 5^th].\n\nExample 2:\n\nInput: score = [10,3,8,9,4]\nOutput: [\"Gold Medal\",\"5\",\"Bronze Medal\",\"Silver Medal\",\"4\"]\nExplanation: The placements are [1^st, 5^th, 3^rd, 2^nd, 4^th].\n\nConstraints:\n\n- n == score.length\n- 1 <= n <= 10^4\n- 0 <= score[i] <= 10^6\n- All the values in score are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(score = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10']\n assert candidate(score = [5, 4, 3, 2, 1]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5']\n assert candidate(score = [0, 1000000]) == ['Silver Medal', 'Gold Medal']\n assert candidate(score = [100, 90, 95, 80, 75]) == ['Gold Medal', 'Bronze Medal', 'Silver Medal', '4', '5']\n assert candidate(score = [10, 3, 8, 9, 4]) == ['Gold Medal', '5', 'Bronze Medal', 'Silver Medal', '4']\n assert candidate(score = [100]) == ['Gold Medal']\n assert candidate(score = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == ['10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [40, 10, 30, 20]) == ['Gold Medal', '4', 'Silver Medal', 'Bronze Medal']\n assert candidate(score = [42]) == ['Gold Medal']\n assert candidate(score = [20, 10, 30, 50, 40]) == ['4', '5', 'Bronze Medal', 'Gold Medal', 'Silver Medal']\n assert candidate(score = [40, 10, 20, 30]) == ['Gold Medal', '4', 'Bronze Medal', 'Silver Medal']\n assert candidate(score = [1000000, 0, 500000, 250000, 750000]) == ['Gold Medal', '5', 'Bronze Medal', '4', 'Silver Medal']\n assert candidate(score = [33, 27, 22, 15, 6]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5']\n assert candidate(score = [1]) == ['Gold Medal']\n assert candidate(score = [1, 2, 3, 4, 5]) == ['5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [5, 20, 15, 10, 25]) == ['5', 'Silver Medal', 'Bronze Medal', '4', 'Gold Medal']\n assert candidate(score = [3, 1, 2]) == ['Gold Medal', 'Bronze Medal', 'Silver Medal']\n assert candidate(score = [3, 1, 2, 5, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == ['13', '15', '14', '11', '12', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [34, 7, 23, 32, 5, 62]) == ['Silver Medal', '5', '4', 'Bronze Medal', '6', 'Gold Medal']\n assert candidate(score = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '89', '90', '91', '92', '93', '94', '95', '96', '97', '98', '99', '100']\n assert candidate(score = [123, 456, 789, 101112, 131415, 161718, 192021, 222324, 252627, 282930]) == ['10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [50, 20, 30, 10, 40, 60]) == ['Silver Medal', '5', '4', '6', 'Bronze Medal', 'Gold Medal']\n assert candidate(score = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22']\n assert candidate(score = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29]) == ['15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1000000, 999999, 999998, 999997, 999996]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5']\n assert candidate(score = [789, 654, 321, 987, 456, 123, 890, 567, 234]) == ['Bronze Medal', '4', '7', 'Gold Medal', '6', '9', 'Silver Medal', '5', '8']\n assert candidate(score = [12345, 12346, 12347, 12348, 12349, 12350, 12351, 12352, 12353, 12354]) == ['10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105]) == ['15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [100, 90, 95, 85, 70, 60, 50, 40, 30, 20, 10]) == ['Gold Medal', 'Bronze Medal', 'Silver Medal', '4', '5', '6', '7', '8', '9', '10', '11']\n assert candidate(score = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000]) == ['20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [23, 34, 12, 45, 56, 78, 89, 90, 101, 112, 134, 145, 156, 167, 178]) == ['14', '13', '15', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [8, 6, 7, 5, 3, 0, 9, 10, 12, 14, 13, 11, 15, 17, 16, 18, 20, 19, 21, 23, 22, 24, 26, 25, 27, 29, 28, 30]) == ['23', '25', '24', '26', '27', '28', '22', '21', '19', '17', '18', '20', '16', '14', '15', '13', '11', '12', '10', '8', '9', '7', '5', '6', '4', 'Silver Medal', 'Bronze Medal', 'Gold Medal']\n assert candidate(score = [33, 11, 44, 22, 55, 66, 77, 88, 99, 100]) == ['8', '10', '7', '9', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100]) == ['100', '99', '98', '97', '96', '95', '94', '93', '92', '91', '90', '89', '88', '87', '86', '85', '84', '83', '82', '81', '80', '79', '78', '77', '76', '75', '74', '73', '72', '71', '70', '69', '68', '67', '66', '65', '64', '63', '62', '61', '60', '59', '58', '57', '56', '55', '54', '53', '52', '51', '50', '49', '48', '47', '46', '45', '44', '43', '42', '41', '40', '39', '38', '37', '36', '35', '34', '33', '32', '31', '30', '29', '28', '27', '26', '25', '24', '23', '22', '21', '20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [3456, 1234, 7890, 4567, 8901, 2345, 5678]) == ['5', '7', 'Silver Medal', '4', 'Gold Medal', '6', 'Bronze Medal']\n assert candidate(score = [54321, 65432, 76543, 87654, 98765, 43210, 32109, 21098, 10987, 9876, 8765, 7654, 6543, 5432, 4321, 3210, 2109, 1098, 987, 876, 765, 654, 543, 432, 321, 210, 109, 98, 87, 76, 65, 54, 43, 32, 21, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == ['5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45']\n assert candidate(score = [9999, 8888, 7777, 6666, 5555, 4444, 3333, 2222, 1111, 0]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10']\n assert candidate(score = [1, 10, 100, 1000, 10000, 100000, 1000000, 999999, 99999, 9999, 999, 99, 9]) == ['13', '11', '9', '7', '5', 'Bronze Medal', 'Gold Medal', 'Silver Medal', '4', '6', '8', '10', '12']\n assert candidate(score = [100000, 1, 10000, 1000, 100, 10, 0]) == ['Gold Medal', '6', 'Silver Medal', 'Bronze Medal', '4', '5', '7']\n assert candidate(score = [5, 20, 15, 10, 25, 30, 35, 40, 45, 50]) == ['10', '7', '8', '9', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300]) == ['30', '29', '28', '27', '26', '25', '24', '23', '22', '21', '20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1000000, 999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10']\n assert candidate(score = [5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 125, 135, 145]) == ['15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [42, 84, 126, 168, 210, 252, 294, 336, 378, 420, 462, 504, 546, 588, 630]) == ['15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17']\n assert candidate(score = [1000000, 0, 500000, 250000, 750000, 125000]) == ['Gold Medal', '6', 'Bronze Medal', '4', 'Silver Medal', '5']\n assert candidate(score = [23, 15, 45, 67, 89, 12, 34]) == ['5', '6', 'Bronze Medal', 'Silver Medal', 'Gold Medal', '7', '4']\n assert candidate(score = [999, 1111, 2222, 3333, 4444, 5555, 6666, 7777, 8888, 9999, 11111, 22222, 33333, 44444, 55555, 66666, 77777, 88888, 99999, 100000, 100001, 100002, 100003, 100004, 100005, 100006, 100007, 100008, 100009, 100010]) == ['30', '29', '28', '27', '26', '25', '24', '23', '22', '21', '20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [99, 34, 23, 44, 55, 12, 67, 89, 100]) == ['Silver Medal', '7', '8', '6', '5', '9', '4', 'Bronze Medal', 'Gold Medal']\n assert candidate(score = [300, 290, 280, 270, 260, 250, 240, 230, 220, 210, 200, 190, 180, 170, 160, 150, 140, 130, 120, 110, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30']\n assert candidate(score = [5, 999, 1000, 9999, 10000, 99999, 100000, 999999, 1000000]) == ['9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == ['20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1, 1000, 10, 100, 10000]) == ['5', 'Silver Medal', '4', 'Bronze Medal', 'Gold Medal']\n assert candidate(score = [88, 77, 66, 55, 44, 33, 22, 11]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8']\n assert candidate(score = [30, 40, 20, 10, 50, 60, 70, 80, 90, 100]) == ['8', '7', '9', '10', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [5]) == ['Gold Medal']\n assert candidate(score = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000]) == ['20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [123, 456, 789, 101, 202, 303, 404, 505, 606, 707, 808, 909]) == ['11', '7', 'Bronze Medal', '12', '10', '9', '8', '6', '5', '4', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150]) == ['15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [85, 67, 92, 78, 99, 56, 88, 77, 100, 95]) == ['6', '9', '4', '7', 'Silver Medal', '10', '5', '8', 'Gold Medal', 'Bronze Medal']\n assert candidate(score = [1, 3, 6, 9, 12, 15, 18, 21, 24, 27]) == ['10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1000000, 0, 500000, 250000, 750000]) == ['Gold Medal', '5', 'Bronze Medal', '4', 'Silver Medal']\n assert candidate(score = [88, 1, 56, 91, 67, 29, 42, 74, 35, 81, 100, 23, 64, 50, 79, 38, 95, 47, 61, 85]) == ['4', '20', '12', 'Bronze Medal', '9', '18', '15', '8', '17', '6', 'Gold Medal', '19', '10', '13', '7', '16', 'Silver Medal', '14', '11', '5']\n assert candidate(score = [100000, 50000, 25000, 12500, 6250, 3125, 1562, 781, 390, 195]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10']\n assert candidate(score = [1, 1000000, 500000, 250000, 750000, 100000, 600000, 300000, 800000, 400000, 900000]) == ['11', 'Gold Medal', '6', '9', '4', '10', '5', '8', 'Bronze Medal', '7', 'Silver Medal']\n assert candidate(score = [1, 10000, 1000, 100, 10, 100000, 1000000]) == ['7', 'Bronze Medal', '4', '5', '6', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10']\n assert candidate(score = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == ['20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [1, 100, 1000, 10000, 100000]) == ['5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [8, 1, 3, 7, 4, 6, 5, 2]) == ['Gold Medal', '8', '6', 'Silver Medal', '5', 'Bronze Medal', '4', '7']\n assert candidate(score = [78, 56, 34, 12, 90, 67, 45, 23, 89, 10]) == ['Bronze Medal', '5', '7', '9', 'Gold Medal', '4', '6', '8', 'Silver Medal', '10']\n assert candidate(score = [9, 3, 15, 12, 6, 24, 18, 30, 27, 21]) == ['8', '10', '6', '7', '9', 'Bronze Medal', '5', 'Gold Medal', 'Silver Medal', '4']\n assert candidate(score = [7, 6, 5, 4, 3, 2, 1, 0]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8']\n assert candidate(score = [87, 68, 94, 78, 85, 91, 89, 76, 82, 93]) == ['5', '10', 'Gold Medal', '8', '6', 'Bronze Medal', '4', '9', '7', 'Silver Medal']\n assert candidate(score = [100, 200, 150, 300, 250, 400, 350, 500, 450, 600, 550, 700, 650, 800, 750, 900, 850, 1000, 950, 1100, 1050]) == ['21', '19', '20', '17', '18', '15', '16', '13', '14', '11', '12', '9', '10', '7', '8', '5', '6', 'Bronze Medal', '4', 'Gold Medal', 'Silver Medal']\n assert candidate(score = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210]) == ['20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [100000, 90000, 80000, 70000, 60000, 50000, 40000, 30000, 20000, 10000]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10']\n assert candidate(score = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == ['Gold Medal', 'Silver Medal', 'Bronze Medal', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20']\n assert candidate(score = [999999, 0, 500000, 250000, 750000, 100000]) == ['Gold Medal', '6', 'Bronze Medal', '4', 'Silver Medal', '5']\n assert candidate(score = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == ['10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [987, 654, 321, 123, 456, 789, 111, 222, 333, 444, 555, 666, 777, 888, 999]) == ['Silver Medal', '7', '12', '14', '9', '4', '15', '13', '11', '10', '8', '6', '5', 'Bronze Medal', 'Gold Medal']\n assert candidate(score = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000, 21000, 22000, 23000, 24000, 25000, 26000, 27000, 28000, 29000, 30000, 31000, 32000, 33000, 34000, 35000, 36000, 37000, 38000, 39000, 40000, 41000, 42000, 43000, 44000, 45000, 46000, 47000, 48000, 49000, 50000]) == ['50', '49', '48', '47', '46', '45', '44', '43', '42', '41', '40', '39', '38', '37', '36', '35', '34', '33', '32', '31', '30', '29', '28', '27', '26', '25', '24', '23', '22', '21', '20', '19', '18', '17', '16', '15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [50, 20, 30, 10, 40]) == ['Gold Medal', '4', 'Bronze Medal', '5', 'Silver Medal']\n assert candidate(score = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500]) == ['15', '14', '13', '12', '11', '10', '9', '8', '7', '6', '5', '4', 'Bronze Medal', 'Silver Medal', 'Gold Medal']\n assert candidate(score = [42, 24, 66, 100, 35, 90, 28, 72, 55, 88]) == ['7', '10', '5', 'Gold Medal', '8', 'Silver Medal', '9', '4', '6', 'Bronze Medal']\n", "comparison": "exact"}, "public_tests": ["[5,4,3,2,1]", "[10,3,8,9,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["score"], "leetcode_dataset_entry_point": "Solution().findRelativeRanks", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:36+00:00", "tests_total": 89, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "sorting", "heap-priority-queue"]}, "language": "ruby", "interface": {"raw_signature": "def find_relative_ranks(score)", "container": null, "callable": "find_relative_ranks", "parameters": [{"name": "score", "type": "Integer[]"}], "return_type": "String[]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 507, "task_id": "perfect-number", "difficulty": "Easy", "problem_description": "A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. A divisor of an integer x is an integer that can divide x evenly.\n\nGiven an integer n, return true if n is a perfect number, otherwise return false.\n\nExample 1:\n\nInput: num = 28\nOutput: true\nExplanation: 28 = 1 + 2 + 4 + 7 + 14\n1, 2, 4, 7, and 14 are all divisors of 28.\n\nExample 2:\n\nInput: num = 7\nOutput: false\n\nConstraints:\n\n- 1 <= num <= 10^8\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num = 8128) == True\n assert candidate(num = 10) == False\n assert candidate(num = 100000000) == False\n assert candidate(num = 28) == True\n assert candidate(num = 12) == False\n assert candidate(num = 7) == False\n assert candidate(num = 6) == True\n assert candidate(num = 33550336) == True\n assert candidate(num = 27) == False\n assert candidate(num = 1) == False\n assert candidate(num = 100) == False\n assert candidate(num = 496) == True\n assert candidate(num = 99999999) == False\n assert candidate(num = 1046527) == False\n assert candidate(num = 1234567) == False\n assert candidate(num = 99999998) == False\n assert candidate(num = 10000000) == False\n assert candidate(num = 56949850) == False\n assert candidate(num = 81284288) == False\n assert candidate(num = 37) == False\n assert candidate(num = 82589933) == False\n assert candidate(num = 2096128) == False\n assert candidate(num = 67891011) == False\n assert candidate(num = 32766) == False\n assert candidate(num = 496000) == False\n assert candidate(num = 96141120) == False\n assert candidate(num = 11111111) == False\n assert candidate(num = 497) == False\n assert candidate(num = 33550337) == False\n assert candidate(num = 1048576) == False\n assert candidate(num = 2) == False\n assert candidate(num = 495) == False\n assert candidate(num = 4690) == False\n assert candidate(num = 8128000) == False\n assert candidate(num = 100000) == False\n assert candidate(num = 672) == False\n assert candidate(num = 50000000) == False\n assert candidate(num = 67229820) == False\n assert candidate(num = 56456456) == False\n assert candidate(num = 98304) == False\n assert candidate(num = 98765432) == False\n assert candidate(num = 10000) == False\n", "comparison": "exact"}, "public_tests": ["28", "7"], "hints": [], "metadata": {"canonical_parameter_names": ["num"], "leetcode_dataset_entry_point": "Solution().checkPerfectNumber", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:38+00:00", "tests_total": 49, "tests_dropped": 7, "flags": [], "topic_tags": ["math"]}, "language": "ruby", "interface": {"raw_signature": "def check_perfect_number(num)", "container": null, "callable": "check_perfect_number", "parameters": [{"name": "num", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 509, "task_id": "fibonacci-number", "difficulty": "Easy", "problem_description": "The Fibonacci numbers, commonly denoted F(n) form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1. That is,\n\nF(0) = 0, F(1) = 1\nF(n) = F(n - 1) + F(n - 2), for n > 1.\n\nGiven n, calculate F(n).\n\nExample 1:\n\nInput: n = 2\nOutput: 1\nExplanation: F(2) = F(1) + F(0) = 1 + 0 = 1.\n\nExample 2:\n\nInput: n = 3\nOutput: 2\nExplanation: F(3) = F(2) + F(1) = 1 + 1 = 2.\n\nExample 3:\n\nInput: n = 4\nOutput: 3\nExplanation: F(4) = F(3) + F(2) = 2 + 1 = 3.\n\nConstraints:\n\n- 0 <= n <= 30\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 0) == 0\n assert candidate(n = 3) == 2\n assert candidate(n = 30) == 832040\n assert candidate(n = 4) == 3\n assert candidate(n = 2) == 1\n assert candidate(n = 20) == 6765\n assert candidate(n = 1) == 1\n assert candidate(n = 10) == 55\n assert candidate(n = 5) == 5\n assert candidate(n = 8) == 21\n assert candidate(n = 29) == 514229\n assert candidate(n = 15) == 610\n assert candidate(n = 12) == 144\n assert candidate(n = 18) == 2584\n assert candidate(n = 6) == 8\n assert candidate(n = 25) == 75025\n assert candidate(n = 28) == 317811\n", "comparison": "exact"}, "public_tests": ["2", "3", "4"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().fib", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:43+00:00", "tests_total": 17, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "dynamic-programming", "recursion", "memoization"]}, "language": "ruby", "interface": {"raw_signature": "def fib(n)", "container": null, "callable": "fib", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 514, "task_id": "freedom-trail", "difficulty": "Hard", "problem_description": "In the video game Fallout 4, the quest \"Road to Freedom\" requires players to reach a metal dial called the \"Freedom Trail Ring\" and use the dial to spell a specific keyword to open the door.\n\nGiven a string ring that represents the code engraved on the outer ring and another string key that represents the keyword that needs to be spelled, return the minimum number of steps to spell all the characters in the keyword.\n\nInitially, the first character of the ring is aligned at the \"12:00\" direction. You should spell all the characters in key one by one by rotating ring clockwise or anticlockwise to make each character of the string key aligned at the \"12:00\" direction and then by pressing the center button.\n\nAt the stage of rotating the ring to spell the key character key[i]:\n\n1. You can rotate the ring clockwise or anticlockwise by one place, which counts as one step. The final purpose of the rotation is to align one of ring's characters at the \"12:00\" direction, where this character must equal key[i].\n2. If the character key[i] has been aligned at the \"12:00\" direction, press the center button to spell, which also counts as one step. After the pressing, you could begin to spell the next character in the key (next stage). Otherwise, you have finished all the spelling.\n\nExample 1:\n\nInput: ring = \"godding\", key = \"gd\"\nOutput: 4\nExplanation:\nFor the first key character 'g', since it is already in place, we just need 1 step to spell this character.\nFor the second key character 'd', we need to rotate the ring \"godding\" anticlockwise by two steps to make it become \"ddinggo\".\nAlso, we need 1 more step for spelling.\nSo the final output is 4.\n\nExample 2:\n\nInput: ring = \"godding\", key = \"godding\"\nOutput: 13\n\nConstraints:\n\n- 1 <= ring.length, key.length <= 100\n- ring and key consist of only lower case English letters.\n- It is guaranteed that key could always be spelled by rotating ring.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(ring = \"caotmcaataijjxi\",key = \"oatjiioijjjxxxcx\") == 42\n assert candidate(ring = \"godding\",key = \"gd\") == 4\n assert candidate(ring = \"pqwcx\",key = \"cpqwx\") == 13\n assert candidate(ring = \"edcba\",key = \"abc\") == 6\n assert candidate(ring = \"ababcabc\",key = \"abc\") == 6\n assert candidate(ring = \"iotfo\",key = \"fio\") == 8\n assert candidate(ring = \"abcdefghijklmnopqrstuvwxyz\",key = \"zyxwvutsrqponmlkjihgfedcba\") == 52\n assert candidate(ring = \"iaadddfef\",key = \"dd\") == 5\n assert candidate(ring = \"abcdefghijklmnopqrstuvwxyz\",key = \"cba\") == 7\n assert candidate(ring = \"abcdefg\",key = \"fa\") == 6\n assert candidate(ring = \"iaejfhfihjdghfihdddddddhddcfjghjgddf\",key = \"did\") == 9\n assert candidate(ring = \"xyxzyzyxy\",key = \"xzyxz\") == 12\n assert candidate(ring = \"godding\",key = \"godding\") == 13\n assert candidate(ring = \"caotmcaataijjxi\",key = \"oatjiioijia\") == 35\n assert candidate(ring = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",key = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 66\n assert candidate(ring = \"mississippi\",key = \"ppiiisssmm\") == 18\n assert candidate(ring = \"uniquecharacters\",key = \"unique\") == 11\n assert candidate(ring = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",key = \"zyxwvutsrqponmlkjihgfedcba\") == 77\n assert candidate(ring = \"mississippi\",key = \"missis\") == 10\n assert candidate(ring = \"noonnoonnoonnoonnoonnoon\",key = \"noonnoon\") == 12\n assert candidate(ring = \"abacabadabacabadabacabadabacabad\",key = \"badabadabacaba\") == 28\n assert candidate(ring = \"thistimeitsshouldbeaveryunusualring\",key = \"unusualring\") == 30\n assert candidate(ring = \"thisisaverylongringwithmanysamecharacters\",key = \"thisisaverylongring\") == 37\n assert candidate(ring = \"encyclopedia\",key = \"pediaencyclopedia\") == 38\n assert candidate(ring = \"abcabcabcabcabcabcabcabcabcabcabcabcabcabcabc\",key = \"ac\") == 3\n assert candidate(ring = \"rotor\",key = \"rotorrotor\") == 18\n assert candidate(ring = \"abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg\",key = \"gfedcba\") == 14\n assert candidate(ring = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",key = \"zzzaa\") == 7\n assert candidate(ring = \"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz\",key = \"zyxwvutsrqponmlkjihgfedcba\") == 52\n assert candidate(ring = \"abababababababababab\",key = \"bababa\") == 12\n assert candidate(ring = \"abacabadabacaba\",key = \"abcabcabc\") == 20\n assert candidate(ring = \"rhythms\",key = \"rhythmrhythmsrhythmrhythms\") == 53\n assert candidate(ring = \"abcdefghijklmnopqrstuvwxyzaabcdefghijklmnopqrstuvwxyza\",key = \"abcdefghijklmnopqrstuvwxyz\") == 51\n assert candidate(ring = \"floccinaucinihilipilification\",key = \"floccinaucinihilipilification\") == 57\n assert candidate(ring = \"abcdefghijabcdefghijabcdefghij\",key = \"jjiihhggffeeddccba\") == 28\n assert candidate(ring = \"bcaacbcaacbcaac\",key = \"abcabc\") == 15\n assert candidate(ring = \"qwertyuiopasdfghjklzxcvbnm\",key = \"lkjhgfdsa\") == 25\n assert candidate(ring = \"abcabcabcabcabcabcabcabc\",key = \"abcabcabc\") == 17\n assert candidate(ring = \"ringwithrepeatedcharactersrrrr\",key = \"ringwithrepeatedcharacters\") == 51\n assert candidate(ring = \"repetition\",key = \"rep\") == 5\n assert candidate(ring = \"abcdefgabcdefgabcdefgabcdefgabcdefg\",key = \"abcdefgabcdefgabcdefgabcdefg\") == 55\n assert candidate(ring = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",key = \"zzzyyxxwvuttsrqponmlkjihgfedcba\") == 82\n assert candidate(ring = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",key = \"zzyyxxwvuttsrqponmlkjihgfedcba\") == 81\n assert candidate(ring = \"abracadabra\",key = \"abcabcabc\") == 25\n assert candidate(ring = \"qwertyuiopasdfghjklzxcvbnmqwertyuiop\",key = \"programming\") == 87\n assert candidate(ring = \"thisisaverylongstringthatweneedtocheckanditsrepeatedthisisaverylongstringthatweneedtocheck\",key = \"check\") == 12\n assert candidate(ring = \"thisisaverylongstringthatweneedtocheck\",key = \"string\") == 26\n assert candidate(ring = \"rhythm\",key = \"myrhth\") == 16\n assert candidate(ring = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",key = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 52\n assert candidate(ring = \"pqrsyzxcvbnmlkjhgfedwatpoiuy\",key = \"python\") == 42\n assert candidate(ring = \"mnbvcxzlkjhgfdsapoiuytrewq\",key = \"qwertyuiop\") == 20\n assert candidate(ring = \"mississippi\",key = \"mississippimississippi\") == 41\n assert candidate(ring = \"qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm\",key = \"mnbvcxzlkjhgfdsapoiuytrewq\") == 52\n assert candidate(ring = \"abcdefgabcdefgabcdefgabcdefg\",key = \"aceg\") == 10\n assert candidate(ring = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",key = \"zzz\") == 3\n assert candidate(ring = \"repeatedrepeatedrepeated\",key = \"repeat\") == 11\n assert candidate(ring = \"aaabbbcccdddeeefffggghhhiii\",key = \"abcdefghi\") == 33\n assert candidate(ring = \"aaaaabbbbbcccccdddddeeeeefffffggggghhhhhiiiii\",key = \"abcdefghi\") == 49\n assert candidate(ring = \"rotorrotorrotor\",key = \"rotor\") == 9\n assert candidate(ring = \"qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnm\",key = \"qzam\") == 31\n assert candidate(ring = \"abcdefghijklmnopqrstuvwxyz\",key = \"abcdefghijklmnopqrstuvwxyz\") == 51\n assert candidate(ring = \"aaabbbbccccddddeeeeffffgggg\",key = \"abcdefg\") == 30\n assert candidate(ring = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",key = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == 60\n assert candidate(ring = \"abcdefabcdefabcdefabcdefabcdefabcdefabcdef\",key = \"abcdefabcdefabcdefabcdefabcdefabcdefabcdef\") == 83\n assert candidate(ring = \"abacabadabacabadabacabad\",key = \"abad\") == 7\n assert candidate(ring = \"lmnopqrstuvwxyzabcdefghijkl\",key = \"key\") == 17\n assert candidate(ring = \"xylophone\",key = \"oxylphoen\") == 24\n assert candidate(ring = \"mississippi\",key = \"issi\") == 7\n", "comparison": "exact"}, "public_tests": ["\"godding\"\n\"gd\"", "\"godding\"\n\"godding\""], "hints": [], "metadata": {"canonical_parameter_names": ["ring", "key"], "leetcode_dataset_entry_point": "Solution().findRotateSteps", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:48+00:00", "tests_total": 70, "tests_dropped": 2, "flags": ["has_images"], "topic_tags": ["string", "dynamic-programming", "depth-first-search", "breadth-first-search"]}, "language": "ruby", "interface": {"raw_signature": "def find_rotate_steps(ring, key)", "container": null, "callable": "find_rotate_steps", "parameters": [{"name": "ring", "type": "String"}, {"name": "key", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 516, "task_id": "longest-palindromic-subsequence", "difficulty": "Medium", "problem_description": "Given a string s, find the longest palindromic subsequence's length in s.\n\nA subsequence is a sequence that can be derived from another sequence by deleting some or no elements without changing the order of the remaining elements.\n\nExample 1:\n\nInput: s = \"bbbab\"\nOutput: 4\nExplanation: One possible longest palindromic subsequence is \"bbbb\".\n\nExample 2:\n\nInput: s = \"cbbd\"\nOutput: 2\nExplanation: One possible longest palindromic subsequence is \"bb\".\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- s consists only of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcba\") == 5\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == 1\n assert candidate(s = \"abcdcba\") == 7\n assert candidate(s = \"abcdedcba\") == 9\n assert candidate(s = \"noonhighnoon\") == 11\n assert candidate(s = \"a\") == 1\n assert candidate(s = \"cbbd\") == 2\n assert candidate(s = \"ab\") == 1\n assert candidate(s = \"aabaa\") == 5\n assert candidate(s = \"abcde\") == 1\n assert candidate(s = \"racecar\") == 7\n assert candidate(s = \"abcb\") == 3\n assert candidate(s = \"bcbab\") == 3\n assert candidate(s = \"noon\") == 4\n assert candidate(s = \"banana\") == 5\n assert candidate(s = \"deeee\") == 4\n assert candidate(s = \"agbdba\") == 5\n assert candidate(s = \"abccba\") == 6\n assert candidate(s = \"aaaa\") == 4\n assert candidate(s = \"character\") == 5\n assert candidate(s = \"level\") == 5\n assert candidate(s = \"bbbab\") == 4\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\") == 1\n assert candidate(s = \"abcdefg\") == 1\n assert candidate(s = \"aabcdefggfedcbagfedcba\") == 16\n assert candidate(s = \"noonappa\") == 4\n assert candidate(s = \"aacaagttaccagtcacaagttaacaagttaccagtcacaagttaac\") == 33\n assert candidate(s = \"abbdbba\") == 7\n assert candidate(s = \"abracadabra\") == 7\n assert candidate(s = \"abcabcabcabc\") == 7\n assert candidate(s = \"levelmadam\") == 5\n assert candidate(s = \"abbaababa\") == 8\n assert candidate(s = \"abcdaedcba\") == 9\n assert candidate(s = \"babbbabbbbabbb\") == 12\n assert candidate(s = \"tattarrattat\") == 12\n assert candidate(s = \"aaaabaaaa\") == 9\n assert candidate(s = \"noonnoon\") == 8\n assert candidate(s = \"abccbaabccba\") == 12\n assert candidate(s = \"aabbccddeeaabbccddeeff\") == 6\n assert candidate(s = \"madamracecar\") == 7\n assert candidate(s = \"nogood\") == 3\n assert candidate(s = \"abcdcbazxyzyxcba\") == 11\n assert candidate(s = \"epelppel\") == 5\n assert candidate(s = \"aabaaabbabaaabbbaabaa\") == 19\n assert candidate(s = \"abcdaabcd\") == 4\n assert candidate(s = \"zazalxlkjlkjlkjljlkjljlkjlkjljlkjljlkjljlkjljlkjljlkjljlkjljlkjlkjljlkjljlkjljlkjljlkjljlkjlkjljlkjljlkjljlkjl\") == 81\n assert candidate(s = \"xyzabcba\") == 5\n assert candidate(s = \"aabacbebebe\") == 5\n assert candidate(s = \"kayak\") == 5\n assert candidate(s = \"rotorotor\") == 9\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcba\") == 52\n assert candidate(s = \"zyxzyxzyxzyxzyx\") == 9\n assert candidate(s = \"elkfaodfnofowefwaefewfafwefawfawfawfawfawfawfawfawfawfawfaw\") == 35\n assert candidate(s = \"abcdefggfedcba\") == 14\n assert candidate(s = \"attacking\") == 4\n assert candidate(s = \"nursesrun\") == 9\n assert candidate(s = \"aabbccddeeaabbccddeeaabbccddeeaabbccddeeaabbccddeeaabbccddeeaabbccdd\") == 26\n assert candidate(s = \"aibohphobia\") == 11\n assert candidate(s = \"abcaebcabcbcabcbc\") == 11\n assert candidate(s = \"deeeeved\") == 7\n assert candidate(s = \"madam\") == 5\n assert candidate(s = \"ababababababa\") == 13\n assert candidate(s = \"radar\") == 5\n assert candidate(s = \"pwwkew\") == 3\n assert candidate(s = \"aabbccddeeeffggghhhhiiii\") == 4\n assert candidate(s = \"bcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbcbc\") == 109\n assert candidate(s = \"abcdefghikjlmnopqrstuvwxyz\") == 1\n assert candidate(s = \"xyzabcdedcbazyx\") == 15\n assert candidate(s = \"aabcbab\") == 5\n assert candidate(s = \"abcadacaabc\") == 7\n assert candidate(s = \"aabaaa\") == 5\n assert candidate(s = \"anana\") == 5\n assert candidate(s = \"aabbabbaaabbabbaaabbabbaaabbabba\") == 31\n assert candidate(s = \"aabbccddeeffgg\") == 2\n assert candidate(s = \"xyzyxzyxzyxzyxzyx\") == 13\n assert candidate(s = \"aabaaaabaaabaaaba\") == 15\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == 2\n assert candidate(s = \"longestpalindromicsubsequence\") == 9\n assert candidate(s = \"zxcvbnnbvxcz\") == 10\n assert candidate(s = \"racecarannakayak\") == 8\n assert candidate(s = \"abcdefghgfedcba\") == 15\n assert candidate(s = \"abcdefghiijkmlkjihgfedcba\") == 23\n assert candidate(s = \"mimimum\") == 5\n assert candidate(s = \"aannnaaaa\") == 7\n assert candidate(s = \"repaper\") == 7\n assert candidate(s = \"mamadmim\") == 5\n assert candidate(s = \"mamad\") == 3\n assert candidate(s = \"abacdfgdcaba\") == 11\n assert candidate(s = \"abcddcba\") == 8\n assert candidate(s = \"civic\") == 5\n assert candidate(s = \"rotor\") == 5\n assert candidate(s = \"abcdefghihgfedcba\") == 17\n assert candidate(s = \"intersubjective\") == 7\n assert candidate(s = \"lrfipxxl\") == 4\n assert candidate(s = \"mississippi\") == 7\n assert candidate(s = \"madaminnadamsandnoon\") == 10\n assert candidate(s = \"forgeeksskeegfor\") == 12\n assert candidate(s = \"aaaaabbbbbccccc\") == 5\n assert candidate(s = \"refer\") == 5\n", "comparison": "exact"}, "public_tests": ["\"bbbab\"", "\"cbbd\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().longestPalindromeSubseq", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:52+00:00", "tests_total": 100, "tests_dropped": 1, "flags": [], "topic_tags": ["string", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def longest_palindrome_subseq(s)", "container": null, "callable": "longest_palindrome_subseq", "parameters": [{"name": "s", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 517, "task_id": "super-washing-machines", "difficulty": "Hard", "problem_description": "You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty.\n\nFor each move, you could choose any m (1 <= m <= n) washing machines, and pass one dress of each washing machine to one of its adjacent washing machines at the same time.\n\nGiven an integer array machines representing the number of dresses in each washing machine from left to right on the line, return the minimum number of moves to make all the washing machines have the same number of dresses. If it is not possible to do it, return -1.\n\nExample 1:\n\nInput: machines = [1,0,5]\nOutput: 3\nExplanation:\n1st move: 1 0 <-- 5 => 1 1 4\n2nd move: 1 <-- 1 <-- 4 => 2 1 3\n3rd move: 2 1 <-- 3 => 2 2 2\n\nExample 2:\n\nInput: machines = [0,3,0]\nOutput: 2\nExplanation:\n1st move: 0 <-- 3 0 => 1 2 0\n2nd move: 1 2 --> 0 => 1 1 1\n\nExample 3:\n\nInput: machines = [0,2,0]\nOutput: -1\nExplanation:\nIt's impossible to make all three washing machines have the same number of dresses.\n\nConstraints:\n\n- n == machines.length\n- 1 <= n <= 10^4\n- 0 <= machines[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(machines = [0, 2, 0]) == -1\n assert candidate(machines = [9, 1, 8, 8, 9]) == 4\n assert candidate(machines = [0, 0, 18]) == 12\n assert candidate(machines = [1, 0, 0, 3, 0, 2, 0]) == -1\n assert candidate(machines = [100000]) == 0\n assert candidate(machines = [0, 0, 0, 0, 0]) == 0\n assert candidate(machines = [4, 0, 0, 4]) == 2\n assert candidate(machines = [5, 5, 5, 5, 5]) == 0\n assert candidate(machines = [1]) == 0\n assert candidate(machines = [1, 1, 1, 1]) == 0\n assert candidate(machines = [1, 0, 5]) == 3\n assert candidate(machines = [0, 3, 0]) == 2\n assert candidate(machines = [10, 10, 10, 10]) == 0\n assert candidate(machines = [1, 2, 3, 4, 5]) == 3\n assert candidate(machines = [1, 0, 0, 3, 0, 0, 2, 0]) == -1\n assert candidate(machines = [0, 0, 11, 5]) == 8\n assert candidate(machines = [1, 0, 5, 4, 0, 0, 2, 3]) == -1\n assert candidate(machines = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 0\n assert candidate(machines = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == -1\n assert candidate(machines = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == -1\n assert candidate(machines = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == -1\n assert candidate(machines = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]) == 12500\n assert candidate(machines = [100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 95\n assert candidate(machines = [2, 2, 2, 2, 1, 2, 2, 2, 2]) == -1\n assert candidate(machines = [0, 0, 0, 0, 0, 0, 0, 0, 0, 10]) == 9\n assert candidate(machines = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(machines = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == -1\n assert candidate(machines = [10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000]) == 12500\n assert candidate(machines = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50]) == -1\n assert candidate(machines = [1, 0, 0, 0, 0, 5]) == 4\n assert candidate(machines = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100]) == -1\n assert candidate(machines = [20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 19\n assert candidate(machines = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 0\n assert candidate(machines = [4, 5, 6, 7, 8]) == 3\n assert candidate(machines = [10, 15, 10, 15, 10, 15, 10]) == -1\n assert candidate(machines = [0, 0, 0, 0, 0, 0, 21, 0]) == -1\n assert candidate(machines = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100]) == 95\n assert candidate(machines = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == -1\n assert candidate(machines = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 28\n assert candidate(machines = [10, 1, 1, 1, 10]) == -1\n assert candidate(machines = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 0\n assert candidate(machines = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 28\n assert candidate(machines = [1, 0, 0, 0, 0, 10, 0, 0, 0, 0, 1]) == -1\n assert candidate(machines = [0, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100]) == -1\n assert candidate(machines = [5, 5, 5, 5, 5, 5, 5, 5]) == 0\n assert candidate(machines = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(machines = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(machines = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(machines = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 0\n assert candidate(machines = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(machines = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100]) == 95\n assert candidate(machines = [50, 45, 40, 35, 30, 25, 20, 15, 10, 5]) == -1\n assert candidate(machines = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == -1\n", "comparison": "exact"}, "public_tests": ["[1,0,5]", "[0,3,0]", "[0,2,0]"], "hints": [], "metadata": {"canonical_parameter_names": ["machines"], "leetcode_dataset_entry_point": "Solution().findMinMoves", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:54+00:00", "tests_total": 53, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "greedy"]}, "language": "ruby", "interface": {"raw_signature": "def find_min_moves(machines)", "container": null, "callable": "find_min_moves", "parameters": [{"name": "machines", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 518, "task_id": "coin-change-ii", "difficulty": "Medium", "problem_description": "You are given an integer array coins representing coins of different denominations and an integer amount representing a total amount of money.\n\nReturn the number of combinations that make up that amount. If that amount of money cannot be made up by any combination of the coins, return 0.\n\nYou may assume that you have an infinite number of each kind of coin.\n\nThe final answer is guaranteed to fit into a signed 32-bit integer.\n\nExample 1:\n\nInput: amount = 5, coins = [1,2,5]\nOutput: 4\nExplanation: there are four ways to make up the amount:\n5=5\n5=2+2+1\n5=2+1+1+1\n5=1+1+1+1+1\n\nExample 2:\n\nInput: amount = 3, coins = [2]\nOutput: 0\nExplanation: the amount of 3 cannot be made up just with coins of 2.\n\nExample 3:\n\nInput: amount = 10, coins = [10]\nOutput: 1\n\nConstraints:\n\n- 1 <= coins.length <= 300\n- 1 <= coins[i] <= 5000\n- All the values of coins are unique.\n- 0 <= amount <= 5000\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(amount = 20,coins = [1, 5, 10]) == 9\n assert candidate(amount = 1,coins = [1]) == 1\n assert candidate(amount = 0,coins = [1, 2, 5]) == 1\n assert candidate(amount = 5000,coins = [1, 5, 10, 25, 50]) == 432699251\n assert candidate(amount = 100,coins = [3, 7, 40, 9]) == 48\n assert candidate(amount = 15,coins = [1, 3, 5, 7]) == 19\n assert candidate(amount = 10,coins = [1, 3, 4, 5]) == 12\n assert candidate(amount = 10,coins = [10]) == 1\n assert candidate(amount = 50,coins = [1, 18, 27, 34, 50]) == 7\n assert candidate(amount = 100,coins = [3, 6, 9]) == 0\n assert candidate(amount = 3,coins = [2]) == 0\n assert candidate(amount = 25,coins = [1, 2, 5]) == 42\n assert candidate(amount = 5,coins = [1, 2, 5]) == 4\n assert candidate(amount = 100,coins = [1, 2, 5, 10, 20, 50]) == 4562\n assert candidate(amount = 1000,coins = [3, 5, 7, 8, 9, 10, 11]) == 1952879228\n assert candidate(amount = 3000,coins = [4, 12, 23, 34, 51]) == 1913606\n assert candidate(amount = 3500,coins = [50, 100, 150, 200, 250, 300, 350]) == 94425\n assert candidate(amount = 2500,coins = [11, 22, 33, 44, 55, 66, 77, 88, 99]) == 0\n assert candidate(amount = 2500,coins = [13, 17, 19, 23, 29, 31]) == 10673219\n assert candidate(amount = 4500,coins = [23, 47, 61, 83, 97, 101]) == 358270\n assert candidate(amount = 4200,coins = [11, 22, 33, 44, 55, 66, 77, 88, 99]) == 0\n assert candidate(amount = 4000,coins = [3, 9, 18, 36, 72, 144]) == 0\n assert candidate(amount = 1200,coins = [2, 5, 10, 25, 50, 100]) == 2459925\n assert candidate(amount = 4500,coins = [11, 22, 33, 44, 55]) == 0\n assert candidate(amount = 2000,coins = [11, 17, 29, 31]) == 8465\n assert candidate(amount = 3000,coins = [4, 9, 15, 25, 30, 50, 75]) == 816870821\n assert candidate(amount = 3750,coins = [125, 250, 500, 1000, 2000]) == 166\n assert candidate(amount = 4500,coins = [5, 10, 20, 50, 100, 200]) == 94862488\n assert candidate(amount = 700,coins = [3, 7, 11, 13, 17, 19, 23, 29]) == 45005473\n assert candidate(amount = 500,coins = [3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) == 0\n assert candidate(amount = 500,coins = [11, 22, 33, 44, 55]) == 0\n assert candidate(amount = 3500,coins = [17, 23, 29, 31, 37]) == 519429\n assert candidate(amount = 1500,coins = [50, 200, 500, 1000]) == 22\n assert candidate(amount = 500,coins = [11, 19, 29, 37, 47, 59, 71, 83]) == 3292\n assert candidate(amount = 2000,coins = [1, 3, 7, 11]) == 5867703\n assert candidate(amount = 3000,coins = [15, 25, 35, 45, 55]) == 582580\n assert candidate(amount = 2500,coins = [7, 17, 27, 37, 47, 57, 67, 77]) == 115681732\n assert candidate(amount = 2000,coins = [1, 3, 4, 12, 24, 48]) == 1799991438\n assert candidate(amount = 3000,coins = [2, 5, 10, 20, 50, 100]) == 238303231\n assert candidate(amount = 5000,coins = [20, 25, 50, 100, 200, 500]) == 831886\n assert candidate(amount = 3000,coins = [33, 66, 99, 132, 165, 198, 231, 264, 297]) == 0\n assert candidate(amount = 200,coins = [1, 3, 5, 7, 9]) == 89740\n assert candidate(amount = 4567,coins = [2, 5, 10, 20, 50]) == 188174063\n assert candidate(amount = 800,coins = [10, 20, 50, 100, 200, 500]) == 2064\n assert candidate(amount = 2000,coins = [10, 25, 50, 100, 200, 500]) == 29674\n assert candidate(amount = 1500,coins = [5, 11, 17, 23, 29]) == 378081\n assert candidate(amount = 3000,coins = [1, 10, 25, 50, 100, 200]) == 11051256\n assert candidate(amount = 1200,coins = [4, 8, 15, 16, 23, 42]) == 3481694\n assert candidate(amount = 999,coins = [1, 4, 9, 16, 25, 36, 49, 64, 81]) == 528165615\n assert candidate(amount = 1111,coins = [1, 4, 9, 16, 25, 36, 49, 64, 81]) == 1122054398\n assert candidate(amount = 1234,coins = [13, 21, 34, 55, 89, 144, 233, 377, 610, 987]) == 10948\n assert candidate(amount = 1200,coins = [5, 15, 25, 50, 100, 200]) == 115862\n assert candidate(amount = 3000,coins = [2, 5, 11, 23, 47]) == 30080239\n assert candidate(amount = 800,coins = [5, 10, 20, 50, 100, 200]) == 38835\n assert candidate(amount = 1234,coins = [1, 2, 5, 10, 20, 50, 100]) == 754797589\n assert candidate(amount = 4000,coins = [11, 22, 33, 44, 55]) == 0\n assert candidate(amount = 2000,coins = [7, 11, 13, 17, 19, 23]) == 40067247\n assert candidate(amount = 1500,coins = [2, 5, 11, 25, 40, 60]) == 12079534\n assert candidate(amount = 1800,coins = [2, 6, 12, 18, 24, 30]) == 192387751\n assert candidate(amount = 1500,coins = [7, 11, 13, 17, 19]) == 712518\n assert candidate(amount = 1234,coins = [3, 5, 7, 11, 13, 17, 19]) == 1209189166\n assert candidate(amount = 750,coins = [7, 14, 21, 28, 35, 42]) == 0\n assert candidate(amount = 4000,coins = [5, 10, 25, 50, 100]) == 9370181\n assert candidate(amount = 1800,coins = [15, 25, 35, 45, 55, 65, 75, 85, 95, 105]) == 79077323\n assert candidate(amount = 4000,coins = [7, 14, 21, 28, 35]) == 0\n assert candidate(amount = 2000,coins = [101, 103, 107, 109]) == 0\n assert candidate(amount = 500,coins = [1, 2, 5, 10, 20, 50, 100]) == 5824071\n assert candidate(amount = 4500,coins = [7, 13, 19, 23, 37, 41]) == 275308289\n assert candidate(amount = 1500,coins = [7, 14, 21, 28, 35, 42, 49, 56, 63, 70]) == 0\n assert candidate(amount = 1999,coins = [111, 222, 333, 444, 555, 666, 777, 888]) == 0\n assert candidate(amount = 999,coins = [1, 2, 4, 8, 16, 32, 64]) == 944362512\n", "comparison": "exact"}, "public_tests": ["5\n[1,2,5]", "3\n[2]", "10\n[10]"], "hints": [], "metadata": {"canonical_parameter_names": ["amount", "coins"], "leetcode_dataset_entry_point": "Solution().change", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:57+00:00", "tests_total": 124, "tests_dropped": 53, "flags": [], "topic_tags": ["array", "dynamic-programming", "knapsack-problem", "complete-knapsack"]}, "language": "ruby", "interface": {"raw_signature": "def change(amount, coins)", "container": null, "callable": "change", "parameters": [{"name": "amount", "type": "Integer"}, {"name": "coins", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 520, "task_id": "detect-capital", "difficulty": "Easy", "problem_description": "We define the usage of capitals in a word to be right when one of the following cases holds:\n\n- All letters in this word are capitals, like \"USA\".\n- All letters in this word are not capitals, like \"leetcode\".\n- Only the first letter in this word is capital, like \"Google\".\n\nGiven a string word, return true if the usage of capitals in it is right.\n\nExample 1:\n\nInput: word = \"USA\"\nOutput: true\n\nExample 2:\n\nInput: word = \"FlaG\"\nOutput: false\n\nConstraints:\n\n- 1 <= word.length <= 100\n- word consists of lowercase and uppercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(word = \"AB\") == True\n assert candidate(word = \"Python\") == True\n assert candidate(word = \"python\") == True\n assert candidate(word = \"USA\") == True\n assert candidate(word = \"ab\") == True\n assert candidate(word = \"hello\") == True\n assert candidate(word = \"gOOgle\") == False\n assert candidate(word = \"Leetcode\") == True\n assert candidate(word = \"ABcD\") == False\n assert candidate(word = \"Google\") == True\n assert candidate(word = \"AbcD\") == False\n assert candidate(word = \"a\") == True\n assert candidate(word = \"A\") == True\n assert candidate(word = \"leetcode\") == True\n assert candidate(word = \"HELLO\") == True\n assert candidate(word = \"HelloWorld\") == False\n assert candidate(word = \"FlaG\") == False\n assert candidate(word = \"HELloworld\") == False\n assert candidate(word = \"INSTAGRAMSERVICES\") == True\n assert candidate(word = \"mNoPqR\") == False\n assert candidate(word = \"FACEBOOK\") == True\n assert candidate(word = \"cYbErSeCUrIty\") == False\n assert candidate(word = \"RoaDmAP\") == False\n assert candidate(word = \"AmaZoN\") == False\n assert candidate(word = \"Aaaaaaaaa\") == True\n assert candidate(word = \"QwErTyUiOp\") == False\n assert candidate(word = \"abcdefghij\") == True\n assert candidate(word = \"INTERNET\") == True\n assert candidate(word = \"M\") == True\n assert candidate(word = \"pRoGrAmMiNg\") == False\n assert candidate(word = \"rANDOMIZE\") == False\n assert candidate(word = \"aMAzOaN\") == False\n assert candidate(word = \"aNIMaTiOn\") == False\n assert candidate(word = \"dEveLopMeNt\") == False\n assert candidate(word = \"SNAPCHATWEB\") == True\n assert candidate(word = \"SiMpLe\") == False\n assert candidate(word = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\") == False\n assert candidate(word = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\") == False\n assert candidate(word = \"aBCdEfGhI\") == False\n assert candidate(word = \"AbCdEfGh\") == False\n assert candidate(word = \"wEb\") == False\n assert candidate(word = \"sWift\") == False\n assert candidate(word = \"TeChNiCaL\") == False\n assert candidate(word = \"bUG\") == False\n assert candidate(word = \"sUpErCaLiFrAgIlIsTiCcExPiAlIdOiCiOuS\") == False\n assert candidate(word = \"GoogleIsAmazing\") == False\n assert candidate(word = \"AlibabaCloud\") == False\n assert candidate(word = \"AbCdEfGhIj\") == False\n assert candidate(word = \"flag\") == True\n assert candidate(word = \"SNAPCHAT\") == True\n assert candidate(word = \"alibaba\") == True\n assert candidate(word = \"lower\") == True\n assert candidate(word = \"internationalization\") == True\n assert candidate(word = \"ABCDEFGHijklmnopqrstuvwxyz\") == False\n assert candidate(word = \"cLoudCOmPUTInG\") == False\n assert candidate(word = \"world\") == True\n assert candidate(word = \"AbcDefGhIjKlMnopQrstUvWxyZ\") == False\n assert candidate(word = \"TitleCase\") == False\n assert candidate(word = \"FLICKRWEB\") == True\n assert candidate(word = \"HaRdWaRE\") == False\n assert candidate(word = \"fAceBoOk\") == False\n assert candidate(word = \"JupyTeR\") == False\n assert candidate(word = \"PYTHON\") == True\n assert candidate(word = \"CdEf\") == False\n assert candidate(word = \"SuperCalifragilisticexpialidocious\") == False\n assert candidate(word = \"MachiNeLEARNING\") == False\n assert candidate(word = \"Internationalization\") == True\n assert candidate(word = \"APPLECOMPUTER\") == True\n assert candidate(word = \"eNd\") == False\n assert candidate(word = \"machinelearning\") == True\n assert candidate(word = \"AuDiO\") == False\n assert candidate(word = \"aAaAaA\") == False\n assert candidate(word = \"AbCdEfGhIjKlMnOpQrStUvWxYzA\") == False\n assert candidate(word = \"iNTERNATIONALIZATION\") == False\n assert candidate(word = \"pRoJeCt\") == False\n assert candidate(word = \"FLICKR\") == True\n assert candidate(word = \"qwen\") == True\n assert candidate(word = \"lAnGuAgE\") == False\n assert candidate(word = \"physICs\") == False\n assert candidate(word = \"cSHaRp\") == False\n assert candidate(word = \"EDiToR\") == False\n assert candidate(word = \"FaCeBoOk\") == False\n assert candidate(word = \"aB\") == False\n assert candidate(word = \"oNE\") == False\n assert candidate(word = \"aNATOMy\") == False\n assert candidate(word = \"QwErTyUiOpAsDfGhJkLzXcVbNm\") == False\n assert candidate(word = \"FACEBOOKINSTAGRAM\") == True\n assert candidate(word = \"aBcDeFgHiJkLmNoPqRsTuVwXyZ\") == False\n assert candidate(word = \"MaChInE\") == False\n assert candidate(word = \"ABc\") == False\n assert candidate(word = \"java\") == True\n assert candidate(word = \"CoMpLiCATED\") == False\n assert candidate(word = \"gOOGLE\") == False\n assert candidate(word = \"AMAZONWEB\") == True\n assert candidate(word = \"Alibaba\") == True\n assert candidate(word = \"pROGRaMMiNG\") == False\n assert candidate(word = \"xMl\") == False\n assert candidate(word = \"RaDIo\") == False\n assert candidate(word = \"INternationalization\") == False\n assert candidate(word = \"iNtErNaTioNaL\") == False\n assert candidate(word = \"uSeR\") == False\n assert candidate(word = \"INSTAGRAM\") == True\n assert candidate(word = \"AbCdEfGhIjKlMnOpQrSt\") == False\n assert candidate(word = \"ABCDEFGHIjklmnopqr\") == False\n assert candidate(word = \"Zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\") == True\n assert candidate(word = \"lowercase\") == True\n assert candidate(word = \"MuSiC\") == False\n assert candidate(word = \"fAcEboOk\") == False\n assert candidate(word = \"YOUTUBESERVICES\") == True\n assert candidate(word = \"aPpLiCaTiOn\") == False\n assert candidate(word = \"Ba\") == True\n assert candidate(word = \"s\") == True\n assert candidate(word = \"AbCdEfGhIjKlMnOp\") == False\n assert candidate(word = \"yOuTuBe\") == False\n assert candidate(word = \"fRoM\") == False\n assert candidate(word = \"gRaphIcS\") == False\n assert candidate(word = \"cGraPhIcs\") == False\n assert candidate(word = \"eCONoMiCS\") == False\n assert candidate(word = \"SiNgEr\") == False\n assert candidate(word = \"abcdefgh\") == True\n assert candidate(word = \"PRoDUCeR\") == False\n assert candidate(word = \"vIdEoGaMe\") == False\n assert candidate(word = \"GOOGLESERVICES\") == True\n assert candidate(word = \"Z\") == True\n assert candidate(word = \"z\") == True\n assert candidate(word = \"BuSINESSiNTelligence\") == False\n assert candidate(word = \"EBAY\") == True\n assert candidate(word = \"rEddIt\") == False\n assert candidate(word = \"CAPITALIZATION\") == True\n assert candidate(word = \"wOrLd\") == False\n assert candidate(word = \"abcdefghijKlmnopqrSTUVWXyz\") == False\n assert candidate(word = \"InValid\") == False\n assert candidate(word = \"data\") == True\n assert candidate(word = \"TWo\") == False\n assert candidate(word = \"wEbDeVeLopMeNt\") == False\n assert candidate(word = \"cDEF\") == False\n assert candidate(word = \"RUsT\") == False\n assert candidate(word = \"MICROSOFTAZURE\") == True\n assert candidate(word = \"MiCROsOfT\") == False\n assert candidate(word = \"UPPERlower\") == False\n assert candidate(word = \"MICROSOFTCLOUD\") == True\n assert candidate(word = \"openAI\") == False\n assert candidate(word = \"ViDIoGraPhEr\") == False\n assert candidate(word = \"YouTube\") == False\n assert candidate(word = \"hACK\") == False\n assert candidate(word = \"Ab\") == True\n assert candidate(word = \"jSoN\") == False\n assert candidate(word = \"DiReCtOr\") == False\n assert candidate(word = \"aPPlE\") == False\n assert candidate(word = \"ZyxWvuTsRqPoNmLkJiHgFeDcBa\") == False\n assert candidate(word = \"FACEBOOKWEB\") == True\n assert candidate(word = \"AbcDefGhIjKlMnopQrstUvWxyz\") == False\n assert candidate(word = \"WRiTeR\") == False\n assert candidate(word = \"tELEviSiOn\") == False\n assert candidate(word = \"FLICKRSERVICES\") == True\n assert candidate(word = \"YOUTUBE\") == True\n assert candidate(word = \"ai\") == True\n assert candidate(word = \"TUMBLRSERVICES\") == True\n assert candidate(word = \"artificialintelligence\") == True\n assert candidate(word = \"bUiLd\") == False\n assert candidate(word = \"gAmEs\") == False\n assert candidate(word = \"GOOGLEWEB\") == True\n assert candidate(word = \"PHp\") == False\n assert candidate(word = \"applecomputer\") == True\n assert candidate(word = \"openai\") == True\n assert candidate(word = \"LoWeRuPPeR\") == False\n assert candidate(word = \"ArtificialIntelligence\") == False\n assert candidate(word = \"qwenai\") == True\n assert candidate(word = \"TyPeScRiPT\") == False\n assert candidate(word = \"wEbSiTe\") == False\n assert candidate(word = \"pRoGrAmMaR\") == False\n assert candidate(word = \"AMericA\") == False\n assert candidate(word = \"AbCdEfGhIjKl\") == False\n assert candidate(word = \"cOdInG\") == False\n assert candidate(word = \"SPSS\") == True\n assert candidate(word = \"JAVA\") == True\n assert candidate(word = \"hELLO\") == False\n assert candidate(word = \"PsYCHOLOgY\") == False\n assert candidate(word = \"aBcDeFgHiJ\") == False\n assert candidate(word = \"allUPPER\") == False\n assert candidate(word = \"Defg\") == True\n assert candidate(word = \"tHISISATEST\") == False\n assert candidate(word = \"TUMBLR\") == True\n assert candidate(word = \"OpenAI\") == False\n assert candidate(word = \"wHiTtEr\") == False\n assert candidate(word = \"PyThOnPrOgRaM\") == False\n assert candidate(word = \"LeArNiNg\") == False\n assert candidate(word = \"AMAZONWEBSERVICES\") == True\n assert candidate(word = \"iOS\") == False\n assert candidate(word = \"FLaG\") == False\n assert candidate(word = \"QWENAI\") == True\n assert candidate(word = \"bAcK\") == False\n assert candidate(word = \"ALLUPPERCASE\") == True\n assert candidate(word = \"SAP\") == True\n assert candidate(word = \"UPPERCASE\") == True\n assert candidate(word = \"STATA\") == True\n assert candidate(word = \"FlAG\") == False\n assert candidate(word = \"SlAcK\") == False\n assert candidate(word = \"NeWs\") == False\n assert candidate(word = \"vIsUAlsTuDiOs\") == False\n assert candidate(word = \"tWItTeR\") == False\n assert candidate(word = \"LINKEDINSERVICES\") == True\n assert candidate(word = \"RuBuY\") == False\n assert candidate(word = \"THISISATEST\") == True\n assert candidate(word = \"ThIsIsAtEsT\") == False\n assert candidate(word = \"AAAAAAAAA\") == True\n assert candidate(word = \"AlLcaPslOcK\") == False\n assert candidate(word = \"gOOgLE\") == False\n assert candidate(word = \"PyThOn\") == False\n assert candidate(word = \"HELLOworld\") == False\n assert candidate(word = \"MaThS\") == False\n assert candidate(word = \"AbCdEfGhIjKlMnOpQrStUvWx\") == False\n assert candidate(word = \"tHIsSHOULDBEFalse\") == False\n assert candidate(word = \"Qwen\") == True\n assert candidate(word = \"INTERNationalIZATION\") == False\n assert candidate(word = \"PhYSIOlOGy\") == False\n assert candidate(word = \"dEfInE\") == False\n assert candidate(word = \"SNAPCHATSERVICES\") == True\n assert candidate(word = \"AbCDeFgHiJkLmNoPqRsTuVwXyZ\") == False\n assert candidate(word = \"GOOGLE\") == True\n assert candidate(word = \"WRiTEr\") == False\n assert candidate(word = \"AcTReSS\") == False\n assert candidate(word = \"gOOD\") == False\n assert candidate(word = \"AbCdEfGhIjKlMnOpQrStUvWxYz\") == False\n assert candidate(word = \"ArTIFICiALiNTelligence\") == False\n assert candidate(word = \"AbCd\") == False\n assert candidate(word = \"ValidCapital\") == False\n assert candidate(word = \"microsoft\") == True\n assert candidate(word = \"LINKEDIN\") == True\n assert candidate(word = \"EBAYSERVICES\") == True\n assert candidate(word = \"AMAZON\") == True\n assert candidate(word = \"AbCdEf\") == False\n assert candidate(word = \"ORAcLe\") == False\n assert candidate(word = \"AMaZiNg\") == False\n assert candidate(word = \"NeURALnETWORKS\") == False\n assert candidate(word = \"mNopQr\") == False\n assert candidate(word = \"ALIBABA\") == True\n assert candidate(word = \"america\") == True\n assert candidate(word = \"cOdE\") == False\n assert candidate(word = \"HTmL\") == False\n assert candidate(word = \"GoogleSearch\") == False\n assert candidate(word = \"ThisIsATest\") == False\n assert candidate(word = \"DROPBOXWEB\") == True\n assert candidate(word = \"MACHINELEARNING\") == True\n assert candidate(word = \"Go\") == True\n assert candidate(word = \"tEsT\") == False\n assert candidate(word = \"gRaPhiCs\") == False\n assert candidate(word = \"OPENAI\") == True\n assert candidate(word = \"DataSCIENCE\") == False\n assert candidate(word = \"hISToRY\") == False\n assert candidate(word = \"oneTWOthreeFOUR\") == False\n assert candidate(word = \"TUMBLRWEB\") == True\n assert candidate(word = \"MaNaGeR\") == False\n assert candidate(word = \"mAkE\") == False\n assert candidate(word = \"mEsSeNger\") == False\n assert candidate(word = \"RoBOtIcs\") == False\n assert candidate(word = \"sUPERCALIFRAGILISTICEXPIALIDOCIOUS\") == False\n assert candidate(word = \"AbCdEfGhIjKlMnOpQr\") == False\n assert candidate(word = \"m\") == True\n assert candidate(word = \"sOFTwaRE\") == False\n assert candidate(word = \"AbCdEfGhIjKlMn\") == False\n assert candidate(word = \"AI\") == True\n assert candidate(word = \"RaCT\") == False\n assert candidate(word = \"BingSearchEngine\") == False\n assert candidate(word = \"ARTIFICIALINTELLIGENCE\") == True\n assert candidate(word = \"oPeN\") == False\n assert candidate(word = \"mOVie\") == False\n assert candidate(word = \"AA\") == True\n assert candidate(word = \"mnopqr\") == True\n assert candidate(word = \"Aa\") == True\n assert candidate(word = \"abc\") == True\n assert candidate(word = \"TWITTER\") == True\n assert candidate(word = \"aLGoRiTHMs\") == False\n assert candidate(word = \"tO\") == False\n assert candidate(word = \"ZzZ\") == False\n assert candidate(word = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") == True\n assert candidate(word = \"MACHINE\") == True\n assert candidate(word = \"GoOgLe\") == False\n assert candidate(word = \"INFORMATIONtechnology\") == False\n assert candidate(word = \"JSAvAsCrIpT\") == False\n assert candidate(word = \"kOTlIN\") == False\n assert candidate(word = \"MuSiCiAn\") == False\n assert candidate(word = \"machine\") == True\n assert candidate(word = \"tIKtOk\") == False\n assert candidate(word = \"mnopQR\") == False\n assert candidate(word = \"yAmL\") == False\n assert candidate(word = \"abCdEfGhIjKlMnOpQrStUvWxYz\") == False\n assert candidate(word = \"singleLETTER\") == False\n assert candidate(word = \"youtube\") == True\n assert candidate(word = \"sNAPcHaT\") == False\n assert candidate(word = \"apple\") == True\n assert candidate(word = \"AbCdEfGhIjKlMnOpQrStUv\") == False\n assert candidate(word = \"cODe\") == False\n assert candidate(word = \"cINeMa\") == False\n assert candidate(word = \"MICROSOFTWEB\") == True\n assert candidate(word = \"alllower\") == True\n assert candidate(word = \"THISisAteSt\") == False\n assert candidate(word = \"FLAG\") == True\n assert candidate(word = \"Data\") == True\n assert candidate(word = \"OnEtwOthReEfOuR\") == False\n assert candidate(word = \"pRoGrEsS\") == False\n assert candidate(word = \"ABCDEFGH\") == True\n assert candidate(word = \"TWITTERWEB\") == True\n assert candidate(word = \"leetCODe\") == False\n assert candidate(word = \"fLAG\") == False\n assert candidate(word = \"bA\") == False\n assert candidate(word = \"abcdefghijKLMNOPQR\") == False\n assert candidate(word = \"DISCoRd\") == False\n assert candidate(word = \"MakE\") == False\n assert candidate(word = \"bing\") == True\n assert candidate(word = \"gOOGLe\") == False\n assert candidate(word = \"vErSiOn\") == False\n assert candidate(word = \"eXpEriEnCe\") == False\n assert candidate(word = \"ThrEE\") == False\n assert candidate(word = \"wItH\") == False\n assert candidate(word = \"mICROSOFT\") == False\n assert candidate(word = \"MaCHiNeViSiOn\") == False\n assert candidate(word = \"qUaNtuMCoMpUtInG\") == False\n assert candidate(word = \"APPLEpie\") == False\n assert candidate(word = \"AaAaAa\") == False\n assert candidate(word = \"SAS\") == True\n assert candidate(word = \"MicroSoft\") == False\n assert candidate(word = \"DaTaANaLYsIS\") == False\n assert candidate(word = \"EBAYWEB\") == True\n assert candidate(word = \"MiXeDLoWeRuPpEr\") == False\n assert candidate(word = \"MATLAB\") == True\n assert candidate(word = \"CamelCase\") == False\n assert candidate(word = \"micro\") == True\n assert candidate(word = \"onELETTER\") == False\n assert candidate(word = \"MiCroSoFt\") == False\n assert candidate(word = \"fACeBoOk\") == False\n assert candidate(word = \"DATA\") == True\n assert candidate(word = \"TWITTERSERVICES\") == True\n assert candidate(word = \"sOuRcE\") == False\n assert candidate(word = \"DEFG\") == True\n assert candidate(word = \"CAPITAL\") == True\n assert candidate(word = \"JAVa\") == False\n assert candidate(word = \"dEsIgN\") == False\n assert candidate(word = \"FLAGship\") == False\n assert candidate(word = \"BING\") == True\n assert candidate(word = \"QwertyUiopAsDfGhJkLzXcVbNm\") == False\n assert candidate(word = \"GOOGLECLOUD\") == True\n assert candidate(word = \"alibabacloud\") == True\n assert candidate(word = \"DeBuGgInG\") == False\n assert candidate(word = \"MIXEDcase\") == False\n assert candidate(word = \"ApPlE\") == False\n assert candidate(word = \"TwItTeR\") == False\n assert candidate(word = \"ONE\") == True\n assert candidate(word = \"cOMPUTERsCIENCE\") == False\n assert candidate(word = \"PythonProgram\") == False\n assert candidate(word = \"zXcVbNmKlJ\") == False\n assert candidate(word = \"QwenAI\") == False\n assert candidate(word = \"NeTwORkS\") == False\n assert candidate(word = \"ZePpElIn\") == False\n assert candidate(word = \"AcTOr\") == False\n assert candidate(word = \"zYxWVuTsRqPoNmLkJiHgFeDcBa\") == False\n assert candidate(word = \"vIsIoN\") == False\n assert candidate(word = \"Three\") == True\n assert candidate(word = \"INSTaGram\") == False\n assert candidate(word = \"two\") == True\n assert candidate(word = \"AMERICA\") == True\n assert candidate(word = \"MixedCASE\") == False\n assert candidate(word = \"jOuRnaLiSm\") == False\n assert candidate(word = \"lInKeDin\") == False\n assert candidate(word = \"AlGoRiThMs\") == False\n assert candidate(word = \"JaVaScRiPt\") == False\n assert candidate(word = \"INSTAGRAMFACEBOOK\") == True\n assert candidate(word = \"DeEPLEaRNING\") == False\n assert candidate(word = \"APPLE\") == True\n assert candidate(word = \"aNdRoId\") == False\n assert candidate(word = \"LeetCode\") == False\n assert candidate(word = \"DROPBOX\") == True\n assert candidate(word = \"Valid\") == True\n assert candidate(word = \"LINKEDINWEB\") == True\n assert candidate(word = \"INSTAGRAMWEB\") == True\n assert candidate(word = \"abcdefghijklmnopqrstuvwxyz\") == True\n assert candidate(word = \"MachineLearning\") == False\n assert candidate(word = \"ALIBABACLOUD\") == True\n assert candidate(word = \"DataScience\") == False\n assert candidate(word = \"CAPITALS\") == True\n assert candidate(word = \"oneTWOthree\") == False\n assert candidate(word = \"YOUTUBEWEB\") == True\n assert candidate(word = \"LEETCODE\") == True\n assert candidate(word = \"tWiTtEr\") == False\n assert candidate(word = \"thisisatest\") == True\n assert candidate(word = \"sCALA\") == False\n assert candidate(word = \"bLoGgInG\") == False\n assert candidate(word = \"alllowercase\") == True\n assert candidate(word = \"TeStCaSe\") == False\n assert candidate(word = \"QWEN\") == True\n assert candidate(word = \"cSs\") == False\n assert candidate(word = \"aAaAaAaAaA\") == False\n assert candidate(word = \"Supercalifragilisticexpialidocious\") == True\n assert candidate(word = \"ABCDEFGHIJ\") == True\n assert candidate(word = \"INfOrMaTiOnSYsTEMS\") == False\n assert candidate(word = \"pInTeReSt\") == False\n assert candidate(word = \"DROPBOXSERVICES\") == True\n assert candidate(word = \"nOcaPslOcK\") == False\n assert candidate(word = \"PERL\") == True\n assert candidate(word = \"CoMpUtEr\") == False\n", "comparison": "exact"}, "public_tests": ["\"USA\"", "\"FlaG\""], "hints": [], "metadata": {"canonical_parameter_names": ["word"], "leetcode_dataset_entry_point": "Solution().detectCapitalUse", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:51:59+00:00", "tests_total": 401, "tests_dropped": 1, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def detect_capital_use(word)", "container": null, "callable": "detect_capital_use", "parameters": [{"name": "word", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 521, "task_id": "longest-uncommon-subsequence-i", "difficulty": "Easy", "problem_description": "Given two strings a and b, return the length of the longest uncommon subsequence between a and b. If no such uncommon subsequence exists, return -1.\n\nAn uncommon subsequence between two strings is a string that is a subsequence of exactly one of them.\n\nExample 1:\n\nInput: a = \"aba\", b = \"cdc\"\nOutput: 3\nExplanation: One longest uncommon subsequence is \"aba\" because \"aba\" is a subsequence of \"aba\" but not \"cdc\".\nNote that \"cdc\" is also a longest uncommon subsequence.\n\nExample 2:\n\nInput: a = \"aaa\", b = \"bbb\"\nOutput: 3\nExplanation: The longest uncommon subsequences are \"aaa\" and \"bbb\".\n\nExample 3:\n\nInput: a = \"aaa\", b = \"aaa\"\nOutput: -1\nExplanation: Every subsequence of string a is also a subsequence of string b. Similarly, every subsequence of string b is also a subsequence of string a. So the answer would be -1.\n\nConstraints:\n\n- 1 <= a.length, b.length <= 100\n- a and b consist of lower-case English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(a = \"aaa\",b = \"bbb\") == 3\n assert candidate(a = \"same\",b = \"same\") == -1\n assert candidate(a = \"test\",b = \"testing\") == 7\n assert candidate(a = \"a\",b = \"b\") == 1\n assert candidate(a = \"abcde\",b = \"fghij\") == 5\n assert candidate(a = \"abc\",b = \"abcde\") == 5\n assert candidate(a = \"a\",b = \"a\") == -1\n assert candidate(a = \"abab\",b = \"baba\") == 4\n assert candidate(a = \"abcabc\",b = \"abc\") == 6\n assert candidate(a = \"abcd\",b = \"ab\") == 4\n assert candidate(a = \"aaa\",b = \"aaa\") == -1\n assert candidate(a = \"aba\",b = \"cdc\") == 3\n assert candidate(a = \"aaaa\",b = \"aa\") == 4\n assert candidate(a = \"abcd\",b = \"dcba\") == 4\n assert candidate(a = \"xyz\",b = \"zyx\") == 3\n assert candidate(a = \"hello\",b = \"world\") == 5\n assert candidate(a = \"abc\",b = \"def\") == 3\n assert candidate(a = \"samecharacters\",b = \"samecharacters\") == -1\n assert candidate(a = \"aabbccddeeffgghhii\",b = \"abcabcabcabcabcabcabcabcabcabc\") == 30\n assert candidate(a = \"sameple\",b = \"sample\") == 7\n assert candidate(a = \"aaaaabbbb\",b = \"bbbbbaaaa\") == 9\n assert candidate(a = \"pqrstuvwxyz\",b = \"mnopqrstuvwxyz\") == 14\n assert candidate(a = \"mississippi\",b = \"mississippiiss\") == 14\n assert candidate(a = \"xylophone\",b = \"polymorph\") == 9\n assert candidate(a = \"aabbcc\",b = \"bbccaa\") == 6\n assert candidate(a = \"pqr\",b = \"pqrstu\") == 6\n assert candidate(a = \"abcdabcdabcd\",b = \"dcba\") == 12\n assert candidate(a = \"abcdefgh\",b = \"abcd\") == 8\n assert candidate(a = \"thisisatest\",b = \"thisisatesting\") == 14\n assert candidate(a = \"uniquecharacters\",b = \"differentcharacters\") == 19\n assert candidate(a = \"abc\",b = \"defg\") == 4\n assert candidate(a = \"aaaaabbbb\",b = \"bbbbbcccc\") == 9\n assert candidate(a = \"abracadabra\",b = \"avadakedavra\") == 12\n assert candidate(a = \"mississippi\",b = \"ississippi\") == 11\n assert candidate(a = \"patternmatching\",b = \"ternmpahcinoat\") == 15\n assert candidate(a = \"aaaaaaaab\",b = \"bbbbbbbba\") == 9\n assert candidate(a = \"uniquecharacters\",b = \"distinctcharacters\") == 18\n assert candidate(a = \"abcabcabcabc\",b = \"defdefdefdef\") == 12\n assert candidate(a = \"aaaaaaa\",b = \"aaaaaaaa\") == 8\n assert candidate(a = \"aabbccddeeff\",b = \"ffeeddccbaa\") == 12\n assert candidate(a = \"abacabadabacaba\",b = \"abcabcabcabc\") == 15\n assert candidate(a = \"aabbccddeeffgghhii\",b = \"jklmnopqrstuvwxyzz\") == 18\n assert candidate(a = \"abcdefghijk\",b = \"mnopqrstuvw\") == 11\n assert candidate(a = \"abacabadabacaba\",b = \"abacabadabacab\") == 15\n assert candidate(a = \"abcabcabc\",b = \"bcabcabca\") == 9\n assert candidate(a = \"aabbccddeeffgg\",b = \"ffggeeccddbbbaaa\") == 16\n assert candidate(a = \"aaaaaaaaaa\",b = \"bbbbbbbbbb\") == 10\n assert candidate(a = \"abcabcabc\",b = \"abcabc\") == 9\n assert candidate(a = \"aabbccddeeffgghhii\",b = \"aabbccddeeffgghhii\") == -1\n assert candidate(a = \"abcabcabcabc\",b = \"abcabcabc\") == 12\n assert candidate(a = \"abcabcabcabcabcabcabcabcabcabc\",b = \"defdefdefdefdefdefdefdefdefdef\") == 30\n assert candidate(a = \"abababab\",b = \"babababa\") == 8\n assert candidate(a = \"xyzabc\",b = \"xyzdef\") == 6\n assert candidate(a = \"abcabcabc\",b = \"defdefdef\") == 9\n assert candidate(a = \"repeatedrepeated\",b = \"repeatedrepeatt\") == 16\n assert candidate(a = \"abcabcabc\",b = \"abc\") == 9\n assert candidate(a = \"xyxyxyxyxy\",b = \"yxyxyxyxyx\") == 10\n assert candidate(a = \"longestuncommonsubsequence\",b = \"short\") == 26\n assert candidate(a = \"abcdefghijklmnopqrstuvwxyz\",b = \"zyxwvutsrqponmlkjihgfedcba\") == 26\n assert candidate(a = \"mississippi\",b = \"mississipp\") == 11\n assert candidate(a = \"abacax\",b = \"bacxab\") == 6\n assert candidate(a = \"abracadabra\",b = \"cabracadabr\") == 11\n assert candidate(a = \"pneumonoultramicroscopicsilicovolcanoconiosis\",b = \"antidisestablishmentarianism\") == 45\n assert candidate(a = \"thisisatest\",b = \"isatestthis\") == 11\n assert candidate(a = \"aabbccddeeff\",b = \"aabbccddeeffgghh\") == 16\n assert candidate(a = \"xyzxyz\",b = \"zyxzyx\") == 6\n assert candidate(a = \"abcdexyz\",b = \"abcdexyz\") == -1\n assert candidate(a = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",b = \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\") == 52\n assert candidate(a = \"differentstrings\",b = \"different\") == 16\n assert candidate(a = \"abacabadabacaba\",b = \"bacabadabacabaa\") == 15\n assert candidate(a = \"repeatedrepeated\",b = \"repeated\") == 16\n assert candidate(a = \"aaaaaaabbbbcccc\",b = \"ccccbbbbaaaaaa\") == 15\n assert candidate(a = \"abcabcabcabc\",b = \"abcabc\") == 12\n assert candidate(a = \"differentstring\",b = \"differentstringxyz\") == 18\n assert candidate(a = \"abcd\",b = \"abcdabcd\") == 8\n assert candidate(a = \"abracadabra\",b = \"abracadabrac\") == 12\n assert candidate(a = \"aaaaa\",b = \"baaaa\") == 5\n assert candidate(a = \"repeatedsubstringrepeatedsubstring\",b = \"substring\") == 34\n assert candidate(a = \"aaabbbcccdddeee\",b = \"eeeedddcccbbbbaaa\") == 17\n assert candidate(a = \"abcdefghijabcdefghij\",b = \"jihgfedcbajihgfedcba\") == 20\n assert candidate(a = \"abcdefg\",b = \"ghijklm\") == 7\n assert candidate(a = \"aaaabbbbcccc\",b = \"ccccbbbbaaaa\") == 12\n assert candidate(a = \"abcdeabcdeabcde\",b = \"deabcdeabcdeabc\") == 15\n assert candidate(a = \"aaaaaa\",b = \"aaaaa\") == 6\n assert candidate(a = \"abcdabcdabcd\",b = \"dcbaabdc\") == 12\n assert candidate(a = \"aaaaaaab\",b = \"aaaaaaac\") == 8\n assert candidate(a = \"samestring\",b = \"samestring\") == -1\n assert candidate(a = \"abcde\",b = \"edcba\") == 5\n assert candidate(a = \"aaaabaaa\",b = \"aaabaaaa\") == 8\n assert candidate(a = \"abcdef\",b = \"ghijkl\") == 6\n assert candidate(a = \"abacabadabacaba\",b = \"babacabadabacab\") == 15\n assert candidate(a = \"unique\",b = \"distinct\") == 8\n assert candidate(a = \"abababababababab\",b = \"babababababababa\") == 16\n assert candidate(a = \"aabbccddeeff\",b = \"ffeeddccbbaa\") == 12\n assert candidate(a = \"aaaaaabbbbbbbbbbcccccc\",b = \"ccccccdddddeeeeeeffffff\") == 23\n assert candidate(a = \"aaaaaaaab\",b = \"aaaaaaaac\") == 9\n assert candidate(a = \"longestuncommonsubsequence\",b = \"subsequencelongestuncom\") == 26\n assert candidate(a = \"banana\",b = \"bananab\") == 7\n assert candidate(a = \"aabbccddeeffgghhiijj\",b = \"bbccddeeffgghhiijjkk\") == 20\n assert candidate(a = \"aabbcc\",b = \"ccbbaa\") == 6\n assert candidate(a = \"aaaaabaaaaabaaaaab\",b = \"baaaaabaaaaabaaaaa\") == 18\n assert candidate(a = \"aaaaaabbbbb\",b = \"bbbbbaaaaaa\") == 11\n assert candidate(a = \"longestuncommonsubsequence\",b = \"longestcommonsubsequence\") == 26\n assert candidate(a = \"longerstringexample\",b = \"short\") == 19\n assert candidate(a = \"thisisatest\",b = \"testthisis\") == 11\n assert candidate(a = \"abcdabcdabcd\",b = \"dcbaabcdabcd\") == 12\n assert candidate(a = \"uniqueuncommonstring\",b = \"stringuncommonunique\") == 20\n assert candidate(a = \"aaaaabbbbb\",b = \"bbbbbccccc\") == 10\n assert candidate(a = \"overlappingcharactersoverlap\",b = \"overlapoverlappingcharacters\") == 28\n assert candidate(a = \"abcabcabcabc\",b = \"abcabcabcabcabcabc\") == 18\n assert candidate(a = \"aabbccddeeffgghhii\",b = \"aabbccddeeffgg\") == 18\n assert candidate(a = \"aabbcc\",b = \"abbccc\") == 6\n assert candidate(a = \"aaaaaaa\",b = \"aaaaaab\") == 7\n assert candidate(a = \"abcdabcd\",b = \"dcba\") == 8\n assert candidate(a = \"identicalstrings\",b = \"identicalstrings\") == -1\n assert candidate(a = \"abcdabcdabcd\",b = \"cdabcdabcdab\") == 12\n assert candidate(a = \"aaaaa\",b = \"bbbbb\") == 5\n assert candidate(a = \"aabbccddeeffgg\",b = \"ggffeeeeddccbaaabb\") == 18\n assert candidate(a = \"longerstring\",b = \"longerstringabc\") == 15\n assert candidate(a = \"xyzabc\",b = \"abcxyz\") == 6\n assert candidate(a = \"aabbccddeeffgghhii\",b = \"zzzzzzzzzzzzzzzzzzzzzzzz\") == 24\n", "comparison": "exact"}, "public_tests": ["\"aba\"\n\"cdc\"", "\"aaa\"\n\"bbb\"", "\"aaa\"\n\"aaa\""], "hints": ["Think very simple.", "If a == b, the answer is -1.", "Otherwise, the answer is the string a or the string b."], "metadata": {"canonical_parameter_names": ["a", "b"], "leetcode_dataset_entry_point": "Solution().findLUSlength", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:01+00:00", "tests_total": 125, "tests_dropped": 4, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def find_lu_slength(a, b)", "container": null, "callable": "find_lu_slength", "parameters": [{"name": "a", "type": "String"}, {"name": "b", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 522, "task_id": "longest-uncommon-subsequence-ii", "difficulty": "Medium", "problem_description": "Given an array of strings strs, return the length of the longest uncommon subsequence between them. If the longest uncommon subsequence does not exist, return -1.\n\nAn uncommon subsequence between an array of strings is a string that is a subsequence of one string but not the others.\n\nA subsequence of a string s is a string that can be obtained after deleting any number of characters from s.\n\n- For example, \"abc\" is a subsequence of \"aebdc\" because you can delete the underlined characters in \"aebdc\" to get \"abc\". Other subsequences of \"aebdc\" include \"aebdc\", \"aeb\", and \"\" (empty string).\n\nExample 1:\n\nInput: strs = [\"aba\",\"cdc\",\"eae\"]\nOutput: 3\n\nExample 2:\n\nInput: strs = [\"aaa\",\"aaa\",\"aa\"]\nOutput: -1\n\nConstraints:\n\n- 2 <= strs.length <= 50\n- 1 <= strs[i].length <= 10\n- strs[i] consists of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(strs = ['aaa', 'aaa', 'aa']) == -1\n assert candidate(strs = ['a', 'b', 'c', 'd', 'e']) == 1\n assert candidate(strs = ['a', 'a', 'a', 'a']) == -1\n assert candidate(strs = ['xyz', 'xy', 'xz', 'yzz']) == 3\n assert candidate(strs = ['aabbcc', 'abc', 'aabbc', 'aabc']) == 6\n assert candidate(strs = ['abcd', 'abcde', 'ab', 'abc']) == 5\n assert candidate(strs = ['abcd', 'ab', 'bc', 'cd']) == 4\n assert candidate(strs = ['abc', 'abc', 'abcd']) == 4\n assert candidate(strs = ['aabbcc', 'abc', 'abbc', 'aabbc']) == 6\n assert candidate(strs = ['abc', 'def', 'ghi']) == 3\n assert candidate(strs = ['abcde', 'abc', 'de', 'a']) == 5\n assert candidate(strs = ['aba', 'cdc', 'eae']) == 3\n assert candidate(strs = ['a', 'b', 'c']) == 1\n assert candidate(strs = ['xyz', 'zyx', 'yxz', 'xzy', 'yzx', 'zxy', 'xyz', 'zyx']) == 3\n assert candidate(strs = ['aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee', 'ffffff']) == 6\n assert candidate(strs = ['abcd', 'dcba', 'abcd', 'dcba', 'abcd', 'dcba', 'abcd', 'dcba']) == -1\n assert candidate(strs = ['abcd', 'abdc', 'acbd', 'dacb', 'cadb', 'bacd']) == 4\n assert candidate(strs = ['apple', 'apples', 'applesauce', 'appl', 'applf', 'applfs', 'applfsa', 'applfsau', 'applfsauc']) == 10\n assert candidate(strs = ['abcde', 'abxde', 'axcde', 'abxde', 'abcde', 'abcde']) == 5\n assert candidate(strs = ['abac', 'bca', 'cab', 'aaa', 'bbb', 'ccc']) == 4\n assert candidate(strs = ['banana', 'bananb', 'bananc', 'bandan', 'bandna', 'bandan', 'bandnaa', 'bandnaab', 'bandnaabc']) == 9\n assert candidate(strs = ['abcd', 'abdc', 'aebc', 'aecb', 'acbe']) == 4\n assert candidate(strs = ['abcd', 'abc', 'ab', 'a', 'aaaa', 'aaa', 'aa', 'a']) == 4\n assert candidate(strs = ['mnopqr', 'nopqrm', 'opqrmn', 'pqrmno', 'qrmnop', 'rmnopq']) == 6\n assert candidate(strs = ['abc', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij']) == 10\n assert candidate(strs = ['pqr', 'pqrs', 'pqs', 'prs', 'qs', 'qrs', 'qr', 'rs', 'r', 's']) == 4\n assert candidate(strs = ['hello', 'world', 'hold', 'hero']) == 5\n assert candidate(strs = ['abcde', 'edcba', 'abdec', 'cabde', 'deabc', 'eabcd']) == 5\n assert candidate(strs = ['aabbcc', 'aabbbc', 'aabbcccc', 'aabbccdd', 'aabbccdde', 'aabbccddee']) == 10\n assert candidate(strs = ['aabbcc', 'abcabc', 'aabcbc', 'abacbc', 'aabbcc', 'aacbbc', 'aabbbc']) == 6\n assert candidate(strs = ['xxyy', 'xyxy', 'yxyx', 'xyyx', 'yxxxy', 'xyxxy', 'xxyxy', 'xyxyx']) == 5\n assert candidate(strs = ['abcabc', 'bcabca', 'cababc', 'abacbc', 'bcbcab', 'acbcab']) == 6\n assert candidate(strs = ['hello', 'hallo', 'hxllo', 'hell', 'helo', 'helo', 'heo', 'he', 'h', 'o']) == 5\n assert candidate(strs = ['abacax', 'bacaxa', 'caxaba', 'axabac', 'xacaba', 'cabaxa']) == 6\n assert candidate(strs = ['pqrst', 'pqrstu', 'pqrstu', 'pqrstu', 'pqr', 'pq', 'p']) == -1\n assert candidate(strs = ['unique', 'uniqe', 'unque', 'uniqu', 'uqnie', 'unieq', 'unqiue']) == 6\n assert candidate(strs = ['aab', 'aac', 'baa', 'bca', 'caa', 'cab', 'abc', 'acb']) == 3\n assert candidate(strs = ['x', 'xy', 'xyz', 'xyzz', 'xyzzz', 'xyzzzz', 'xyzzzzz', 'xyzzzzzz']) == 8\n assert candidate(strs = ['abcd', 'abcde', 'abcdef', 'ab', 'abcd']) == 6\n assert candidate(strs = ['aabbcc', 'bbaacc', 'ccabba', 'aaccbb', 'cabbba', 'bccaba']) == 6\n assert candidate(strs = ['aaaaa', 'aaaba', 'aabaa', 'abaab', 'abbaa']) == 5\n assert candidate(strs = ['abcdefg', 'bcdefga', 'cdefgab', 'defgabc', 'efgabcd', 'fgabcde']) == 7\n assert candidate(strs = ['abcde', 'edcba', 'bcdea', 'cdeab', 'decba']) == 5\n assert candidate(strs = ['hello', 'hallo', 'hxllo', 'hexlo', 'helxo']) == 5\n assert candidate(strs = ['abab', 'baba', 'abba', 'baab', 'abba']) == 4\n assert candidate(strs = ['abcdabcd', 'abcdeabc', 'abdcabdc', 'dacbdacb', 'dabcdbac', 'bacdabcd', 'abcdabdc']) == 8\n assert candidate(strs = ['aabbcc', 'aabcbc', 'abacbc', 'abcabc', 'abcbac', 'abccba']) == 6\n assert candidate(strs = ['banana', 'anana', 'nana', 'ana', 'na', 'a']) == 6\n assert candidate(strs = ['aaaaa', 'aaaba', 'aabaa', 'abaaa', 'baaaa']) == 5\n assert candidate(strs = ['abcde', 'abc', 'ab', 'a']) == 5\n assert candidate(strs = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba', 'abcd', 'abdc', 'acbd', 'acdb', 'adbc', 'adcb', 'bacd', 'badc', 'bcad', 'bcda', 'bdac', 'bdca', 'cabd', 'cadb', 'cbad', 'cbda', 'cdab', 'cdba', 'dabc', 'dacb', 'dbac', 'dbca', 'dcab', 'dcba', 'abcd']) == 4\n assert candidate(strs = ['banana', 'anana', 'nana', 'ana', 'na', 'a', 'b']) == 6\n assert candidate(strs = ['abcdef', 'abcfed', 'bacdef', 'badcfe', 'bcadef', 'bcdafe']) == 6\n assert candidate(strs = ['aaaa', 'aaab', 'aaba', 'abaa', 'abab', 'abba', 'bbaa', 'baab', 'baba', 'bbaa']) == 4\n assert candidate(strs = ['abcabc', 'bcabc', 'cabc', 'abc', 'ab', 'a', 'b', 'c']) == 6\n assert candidate(strs = ['aaaaa', 'aaab', 'aab', 'aba', 'baa', 'aaa']) == 5\n assert candidate(strs = ['abcdefg', 'bcdefga', 'cdefgab', 'defgabc', 'efgabcd', 'fgabcde', 'gabcdef']) == 7\n assert candidate(strs = ['hello', 'hallo', 'hullo', 'hellu', 'hullo', 'helou']) == 5\n assert candidate(strs = ['aabbcc', 'abbccc', 'aabccc', 'aaabcc', 'aabbcc', 'aabbbc', 'aabbbc', 'aabccc', 'abbccc', 'abaccc']) == 6\n assert candidate(strs = ['abcd', 'abac', 'abca', 'acba', 'acab', 'aabc', 'abbc', 'aabb', 'abbb', 'bbbb']) == 4\n assert candidate(strs = ['ab', 'abc', 'abcd', 'abcde', 'abcdef', 'abcdefg']) == 7\n assert candidate(strs = ['abcd', 'abdc', 'acbd', 'dabc', 'dacb']) == 4\n assert candidate(strs = ['abcabc', 'ababc', 'abc', 'abcd', 'abcde']) == 6\n assert candidate(strs = ['abcd', 'abdc', 'acbd', 'acdb', 'adbc', 'adcb', 'bacd', 'badc', 'bcad', 'bcda', 'bdac', 'bdca', 'cabd', 'cadb', 'cbad', 'cbda', 'cdab', 'cdba', 'dabc', 'dacb', 'dbac', 'dbca', 'dcab', 'dcba']) == 4\n assert candidate(strs = ['abcdef', 'abdefc', 'acdefb', 'adefbc', 'aebcdf', 'afedcb']) == 6\n assert candidate(strs = ['hello', 'world', 'hold', 'wolf', 'hold', 'hold']) == 5\n assert candidate(strs = ['abcdefgh', 'bghcdefa', 'cdefghba', 'defghbac', 'efghbacd', 'fghbacde']) == 8\n assert candidate(strs = ['abcde', 'abced', 'acbed', 'acbde', 'adbec', 'adebc']) == 5\n assert candidate(strs = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba']) == 3\n assert candidate(strs = ['abcde', 'edcba', 'cbade', 'badce', 'aecdb', 'bcdea', 'abced']) == 5\n assert candidate(strs = ['abcdefgh', 'bcdefgh', 'cdefgh', 'defgh', 'efgh', 'fgh', 'gh', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']) == 8\n assert candidate(strs = ['aaaa', 'aaab', 'aaba', 'abaa', 'baaa']) == 4\n assert candidate(strs = ['abcd', 'abdc', 'acbd', 'dacb', 'cabd']) == 4\n assert candidate(strs = ['aaaa', 'aaab', 'aabb', 'abbb', 'bbbb']) == 4\n assert candidate(strs = ['abcd', 'abcde', 'ab', 'abc', 'a', 'abcd', 'abcde', 'ab', 'abc', 'a']) == -1\n assert candidate(strs = ['aab', 'abc', 'abcd', 'abcde', 'abcdef']) == 6\n assert candidate(strs = ['abcd', 'abdc', 'acbd', 'adcb', 'bacd']) == 4\n assert candidate(strs = ['xyzz', 'zyxz', 'xzyz', 'zxzy', 'xzzy', 'zzxy']) == 4\n assert candidate(strs = ['banana', 'bandana', 'bandanna', 'band', 'anana']) == 8\n assert candidate(strs = ['aabbcc', 'aabbc', 'aabc', 'abc', 'aab', 'ab', 'ac', 'a', 'b', 'c', 'd']) == 6\n assert candidate(strs = ['abc', 'abc', 'abc', 'abcd']) == 4\n assert candidate(strs = ['apple', 'ale', 'app', 'appl', 'ample']) == 5\n assert candidate(strs = ['zzzzzzzzzz', 'zzzzzzzzz', 'zzzzzzzz', 'zzzzzzz', 'zzzzzz', 'zzzzz', 'zzzz', 'zzz', 'zz', 'z']) == 10\n assert candidate(strs = ['unique', 'distinct', 'different', 'separate', 'unequal', 'unique', 'distinct', 'different', 'separate', 'unequal']) == -1\n assert candidate(strs = ['aaaaa', 'aaaab', 'aaaba', 'aabaa', 'abaaa', 'baaaa', 'aabba', 'aabra', 'abaab', 'baaab', 'ababa', 'babaa', 'abaab', 'baaba', 'abaaa', 'baaaa', 'aabaa', 'abaaa', 'baaba', 'abaab']) == 5\n assert candidate(strs = ['zzzz', 'zzzzz', 'zzzzzz', 'zzzzzzz', 'zzzzzzzz', 'zzzzzzzzz', 'zzzzzzzzzz']) == 10\n assert candidate(strs = ['abcd', 'abdc', 'acbd', 'dacb', 'cdab', 'cabd']) == 4\n assert candidate(strs = ['xyz', 'xyx', 'xyy', 'xzy', 'yzy', 'yzz', 'zzy', 'zzyz', 'zzzy', 'zzzz']) == 4\n assert candidate(strs = ['apple', 'aple', 'appl', 'pple', 'aplp']) == 5\n assert candidate(strs = ['hello', 'hallo', 'hxllo', 'hexlo', 'hxllo', 'hxllo']) == 5\n assert candidate(strs = ['aaaabbbb', 'aaabbb', 'aabbb', 'abbb', 'bbb', 'bb', 'b']) == 8\n assert candidate(strs = ['pqr', 'qrp', 'rpq', 'prq', 'rqp', 'qpr', 'ppp', 'qqq', 'rrr']) == 3\n assert candidate(strs = ['qwerty', 'qwertyuiop', 'qwertyuio', 'qwertyui', 'qwer']) == 10\n assert candidate(strs = ['aaabbb', 'aabbbb', 'abbbbb', 'aaabbbb', 'aabbbbbb', 'abbbbbbb']) == 8\n assert candidate(strs = ['abcabcabc', 'abc', 'bc', 'c', 'bca', 'cab', 'bac', 'acb', 'cba', 'abcabc']) == 9\n assert candidate(strs = ['pqr', 'pqrs', 'pqrst', 'pqrstu', 'pqrstuv', 'pqrstuvw', 'pqrstuvwx', 'pqrstuvwxy']) == 10\n assert candidate(strs = ['xyz', 'xy', 'xz', 'yz', 'x', 'y', 'z', 'xyx', 'yzy', 'zxz']) == 3\n assert candidate(strs = ['xyz', 'xyx', 'xzy', 'yxz', 'yzy', 'zyx', 'zyz']) == 3\n assert candidate(strs = ['abcdefghij', 'abcdefghi', 'abcdefgh', 'abcdefg', 'abcdef', 'abcde', 'abcd', 'abc', 'ab', 'a']) == 10\n", "comparison": "exact"}, "public_tests": ["[\"aba\",\"cdc\",\"eae\"]", "[\"aaa\",\"aaa\",\"aa\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["strs"], "leetcode_dataset_entry_point": "Solution().findLUSlength", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:04+00:00", "tests_total": 106, "tests_dropped": 7, "flags": [], "topic_tags": ["array", "hash-table", "two-pointers", "string", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_lu_slength(strs)", "container": null, "callable": "find_lu_slength", "parameters": [{"name": "strs", "type": "String[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 523, "task_id": "continuous-subarray-sum", "difficulty": "Medium", "problem_description": "Given an integer array nums and an integer k, return true if nums has a good subarray or false otherwise.\n\nA good subarray is a subarray where:\n\n- its length is at least two, and\n- the sum of the elements of the subarray is a multiple of k.\n\nNote that:\n\n- A subarray is a contiguous part of the array.\n- An integer x is a multiple of k if there exists an integer n such that x = n * k. 0 is always a multiple of k.\n\nExample 1:\n\nInput: nums = [23,2,4,6,7], k = 6\nOutput: true\nExplanation: [2, 4] is a continuous subarray of size 2 whose elements sum up to 6.\n\nExample 2:\n\nInput: nums = [23,2,6,4,7], k = 6\nOutput: true\nExplanation: [23, 2, 6, 4, 7] is an continuous subarray of size 5 whose elements sum up to 42.\n42 is a multiple of 6 because 42 = 7 * 6 and 7 is an integer.\n\nExample 3:\n\nInput: nums = [23,2,6,4,7], k = 13\nOutput: false\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- 0 <= nums[i] <= 10^9\n- 0 <= sum(nums[i]) <= 2^31 - 1\n- 1 <= k <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [2, 5, 31, 4, 5, 1],k = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5],k = 9) == True\n assert candidate(nums = [23, 2, 6, 4, 7],k = 6) == True\n assert candidate(nums = [2, 5, 4, 5, 10],k = 3) == True\n assert candidate(nums = [1, 0, 1, 0, 1],k = 2) == True\n assert candidate(nums = [23, 2, 4, 6, 7],k = 6) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6],k = 10) == True\n assert candidate(nums = [23, 2, 6, 4, 7],k = 13) == False\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == True\n assert candidate(nums = [5, 0, 0, 0],k = 3) == True\n assert candidate(nums = [23, 2, 4, 6, 6],k = 7) == True\n assert candidate(nums = [1, 2, 1, 2, 1, 2],k = 6) == True\n assert candidate(nums = [0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [2, 2, 2, 2, 2, 2],k = 10) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 11],k = 5) == True\n assert candidate(nums = [23, 2, 4, 6, 7],k = 1) == True\n assert candidate(nums = [1, 2, 12],k = 6) == False\n assert candidate(nums = [0, 0],k = 1) == True\n assert candidate(nums = [0, 1, 0],k = 1) == True\n assert candidate(nums = [1, 2, 3, 4, 5],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5],k = 15) == True\n assert candidate(nums = [28, 29, 49, 0, 48, 50, 52, 51, 52, 53, 54, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 25) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30],k = 11) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000],k = 1) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 20) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [21, 2, 19, 2, 20, 3],k = 6) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 11) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7],k = 21) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == True\n assert candidate(nums = [2, 5, 10, 15, 20, 25, 30],k = 25) == True\n assert candidate(nums = [23, 2, 6, 8, 1, 4, 7],k = 10) == True\n assert candidate(nums = [10, 5, 2, 7, 1, 9, 2, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5],k = 15) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 19) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 10, 11, 12],k = 13) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 2) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7],k = 5) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 10) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 10) == True\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47],k = 17) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 25) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000],k = 500000000) == True\n assert candidate(nums = [23, 2, 6, 4, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 55) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 1, 2, 4, 6, 7],k = 10) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 23, 2, 4, 6, 7, 23, 2, 4, 6, 7, 23, 2, 4, 6, 7],k = 14) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 10, 11, 12],k = 6) == True\n assert candidate(nums = [9, 10, 7, 3, 9, 6, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 6) == True\n assert candidate(nums = [21, 26, 29, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100],k = 11) == True\n assert candidate(nums = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 4) == True\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],k = 2) == True\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 55) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1],k = 2) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 5, 3, 9, 10],k = 12) == True\n assert candidate(nums = [29, 23, 17, 13, 11, 7, 5, 3, 2, 1, 1, 2, 3, 5, 7, 11, 13, 17, 23, 29],k = 20) == True\n assert candidate(nums = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9],k = 18) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],k = 24) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 22) == True\n assert candidate(nums = [10, 20, 30, 40, 50],k = 15) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 20) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 8, 10, 11, 12],k = 6) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 10) == True\n assert candidate(nums = [0, 1, 0, 3, 0, 4, 0, 5, 0, 6],k = 2) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [10, 5, 0, 0, 3, 1, 0, 0, 8, 0, 0, 6],k = 10) == True\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0],k = 2) == True\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13],k = 10) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 29) == True\n assert candidate(nums = [10, 5, 0, 0, 0, 10, 5],k = 5) == True\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0],k = 2) == True\n assert candidate(nums = [5, 8, 9, 12, 16, 1, 3, 1, 4, 6, 7, 8, 9, 10, 11, 12],k = 27) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 33) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000],k = 2000000000) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 15) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 19) == True\n assert candidate(nums = [0, 1, 0, 1, 0],k = 1) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 36) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 8, 10],k = 6) == True\n assert candidate(nums = [2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 13) == True\n assert candidate(nums = [1, 1000000000, 1, 1000000000, 1, 1000000000],k = 2000000000) == False\n assert candidate(nums = [23, 2, 4, 6, 7, 8, 10, 12],k = 9) == True\n assert candidate(nums = [1, 0, 1, 0, 1, 0],k = 2) == True\n assert candidate(nums = [0, 1, 0, 3, 0, 4, 0, 5, 0, 6],k = 3) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 21) == True\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0],k = 1) == True\n assert candidate(nums = [28, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22],k = 21) == True\n assert candidate(nums = [1, 3, 5, 0, 2, 4, 6],k = 5) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 8, 10],k = 13) == True\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29],k = 100) == True\n assert candidate(nums = [23, 2, 4, 6, 6, 7],k = 6) == True\n assert candidate(nums = [23, 2, 6, 4, 7, 2, 4, 6, 7],k = 13) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000],k = 1000000000) == True\n assert candidate(nums = [1, 10, 100, 1000, 10000, 100000],k = 111111) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 25) == True\n assert candidate(nums = [1000000000, 1000000000, 1000000000, 1000000000],k = 2000000000) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7, 1, 2, 4, 6, 7],k = 1) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 2) == True\n assert candidate(nums = [29, 7, 21, 20, 12, 28, 8, 5, 4, 1, 20, 4, 11, 15, 7, 12, 9, 7, 4, 15, 1, 3, 15, 11, 7, 12, 3, 7, 15, 11, 12, 9, 10, 7, 6, 6, 3, 14, 12, 4, 14, 16, 7, 10, 2, 9, 14, 9, 7, 15, 14, 1, 15, 13, 8, 6, 2, 14, 8, 2, 13, 1, 10, 6, 15, 9, 11, 16, 8, 15, 10, 7, 9, 20, 14, 14, 16, 4, 10, 9, 7, 8, 9, 13, 14, 14, 10, 6, 2, 3, 8, 15, 2, 9, 7, 10, 15, 11, 12, 9, 10, 7, 6, 6, 3, 14, 12, 4, 14, 16, 7, 10, 2, 9, 14, 9, 7, 15, 14, 1, 15, 13, 8, 6, 2, 14, 8, 2, 13],k = 59) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 1, 2, 4],k = 6) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],k = 13) == True\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 5) == True\n assert candidate(nums = [29, 23, 17, 3, 19, 11, 25, 2, 9, 28, 15, 18, 11, 22, 24, 24, 20, 11, 10, 22, 5, 26, 8, 6, 19, 25, 28, 15, 27, 18],k = 29) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == True\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 10, 11, 12],k = 1) == True\n assert candidate(nums = [2, 3, 1, 2, 4, 3, 5, 4, 5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 5, 3, 9, 10, 15, 20, 25, 30, 35, 40],k = 17) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 1, 3, 5, 8, 10],k = 12) == True\n assert candidate(nums = [23, 2, 6, 4, 7, 23, 2, 6, 4, 7],k = 6) == True\n assert candidate(nums = [3, 1, 7, 5, 6, 9],k = 10) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 5, 3, 1, 2, 4, 5, 6],k = 15) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 60) == True\n assert candidate(nums = [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26],k = 13) == True\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 100) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 5, 3, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115],k = 13) == True\n assert candidate(nums = [9, 7, 5, 3, 1, 2, 4, 6, 8, 10],k = 12) == True\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 150) == True\n assert candidate(nums = [23, 2, 4, 6, 7, 0, 0, 0, 0, 0],k = 6) == True\n", "comparison": "exact"}, "public_tests": ["[23,2,4,6,7]\n6", "[23,2,6,4,7]\n6", "[23,2,6,4,7]\n13"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().checkSubarraySum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:06+00:00", "tests_total": 121, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "math", "prefix-sum", "pigeonhole-principle"]}, "language": "ruby", "interface": {"raw_signature": "def check_subarray_sum(nums, k)", "container": null, "callable": "check_subarray_sum", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 524, "task_id": "longest-word-in-dictionary-through-deleting", "difficulty": "Medium", "problem_description": "Given a string s and a string array dictionary, return the longest string in the dictionary that can be formed by deleting some of the given string characters. If there is more than one possible result, return the longest word with the smallest lexicographical order. If there is no possible result, return the empty string.\n\nExample 1:\n\nInput: s = \"abpcplea\", dictionary = [\"ale\",\"apple\",\"monkey\",\"plea\"]\nOutput: \"apple\"\n\nExample 2:\n\nInput: s = \"abpcplea\", dictionary = [\"a\",\"b\",\"c\"]\nOutput: \"a\"\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- 1 <= dictionary.length <= 1000\n- 1 <= dictionary[i].length <= 1000\n- s and dictionary[i] consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"a\",dictionary = ['b', 'c', 'd']) == \"\"\n assert candidate(s = \"zcfzdb\",dictionary = ['a', 'b', 'c']) == \"b\"\n assert candidate(s = \"aaaaaaa\",dictionary = ['aaa', 'aaaa']) == \"aaaa\"\n assert candidate(s = \"xyz\",dictionary = ['x', 'y', 'z', 'xy', 'xyz']) == \"xyz\"\n assert candidate(s = \"apple\",dictionary = ['app', 'appl', 'applep']) == \"appl\"\n assert candidate(s = \"aaaa\",dictionary = ['aa', 'aaa', 'aaaa']) == \"aaaa\"\n assert candidate(s = \"abpcplea\",dictionary = ['a', 'b', 'c']) == \"a\"\n assert candidate(s = \"abcd\",dictionary = ['db', 'abc', 'ab', 'b']) == \"abc\"\n assert candidate(s = \"aaa\",dictionary = ['a', 'aa', 'aaa']) == \"aaa\"\n assert candidate(s = \"xyz\",dictionary = ['x', 'y', 'z', 'xy', 'yz', 'xyz']) == \"xyz\"\n assert candidate(s = \"aewfafwafjlwajflwajflwafj\",dictionary = ['apple', 'ewaf', 'awefawfwaf', 'awef', 'awefe', 'ewafeffewafewf']) == \"ewaf\"\n assert candidate(s = \"abpcplea\",dictionary = ['ale', 'apple', 'monkey', 'plea']) == \"apple\"\n assert candidate(s = \"abcd\",dictionary = ['db', 'dc', 'bd', 'ac', 'cad']) == \"ac\"\n assert candidate(s = \"aewfafwafjlwajflwajflwafjlwafjl\",dictionary = ['apple', 'ewaf', 'awefawfwaf', 'awef', 'awefe', 'ewafeffewafewf']) == \"ewaf\"\n assert candidate(s = \"xyz\",dictionary = ['xyzz', 'zxy', 'zyx']) == \"\"\n assert candidate(s = \"abcdabcdabcd\",dictionary = ['abcd', 'abc', 'ab', 'a', 'bc', 'bcd', 'abcdabcd', 'abcdabcdabcd', 'abcdabcda', 'bcdabcdabcd', 'abcabcabc']) == \"abcdabcdabcd\"\n assert candidate(s = \"abracadabra\",dictionary = ['ab', 'abc', 'abrac', 'abraca', 'abracadabra', 'cadabra', 'rac']) == \"abracadabra\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['zyxwvutsrqponmlkjihgfedcba', 'abcdefghijklmnopqrstuvwxyz', 'mnopqrstuv']) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"banana\",dictionary = ['an', 'banana', 'anana', 'nana', 'ba', 'ana', 'aaa', 'aa', 'a', 'b']) == \"banana\"\n assert candidate(s = \"thequickbrownfoxjumpsoverthelazydog\",dictionary = ['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'lazy', 'dog', 'hello', 'world', 'python']) == \"brown\"\n assert candidate(s = \"mississippi\",dictionary = ['issi', 'ppis', 'miss', 'ssip', 'isip', 'mississippi', 'mis', 'sip', 'iss', 'piss']) == \"mississippi\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'ab', 'cd']) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"vvvvvvvvvv\",dictionary = ['v', 'vv', 'vvv', 'vvvv', 'vvvvv', 'vvvvvv', 'vvvvvvv', 'vvvvvvvv', 'vvvvvvvvv', 'vvvvvvvvvv']) == \"vvvvvvvvvv\"\n assert candidate(s = \"mississippi\",dictionary = ['issi', 'miss', 'pissi', 'ppi', 'issipi', 'ississi', 'mississi', 'issippi']) == \"mississi\"\n assert candidate(s = \"abracadabra\",dictionary = ['abc', 'abcd', 'abrac', 'cadabra', 'abra']) == \"cadabra\"\n assert candidate(s = \"abcabcabc\",dictionary = ['abc', 'abca', 'abcb', 'abcc', 'aabbcc', 'abcabc', 'abcabca', 'abcaabc']) == \"abcaabc\"\n assert candidate(s = \"mississippi\",dictionary = ['issi', 'miss', 'mississ', 'issippi', 'issippis']) == \"issippi\"\n assert candidate(s = \"abracadabra\",dictionary = ['abc', 'abcd', 'abracadabra', 'racad', 'abraca', 'cadabra', 'dabra', 'bra']) == \"abracadabra\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",dictionary = ['zyx', 'wvu', 'tsr', 'pon', 'mlk', 'jih', 'gfed', 'cba', 'zyxwvut', 'srqponmlkjihgfedcba']) == \"srqponmlkjihgfedcba\"\n assert candidate(s = \"babgbagagbagagbagagbag\",dictionary = ['bag', 'bags', 'bagga', 'baggage', 'bagag', 'bagagag', 'bagagaga', 'bagagagag', 'bagagagaga']) == \"bagagagaga\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['abc', 'def', 'ghijk', 'lmnop', 'qrstuv', 'wxyz']) == \"qrstuv\"\n assert candidate(s = \"abcdeffedcba\",dictionary = ['abcd', 'abce', 'abcf', 'abde', 'abdf', 'acde', 'acdf', 'adef', 'bcde', 'bcdf', 'bcef', 'bdef', 'cdef']) == \"abcd\"\n assert candidate(s = \"aabbbccddeeff\",dictionary = ['abc', 'abcd', 'abde', 'acde', 'aabbccddeeff', 'abcde']) == \"aabbccddeeff\"\n assert candidate(s = \"bananaanananannanana\",dictionary = ['ana', 'anan', 'anana', 'ananas', 'banana', 'bananana', 'ananan', 'nananan']) == \"bananana\"\n assert candidate(s = \"aaaabaaaabaaaaabaaaabaaaab\",dictionary = ['ab', 'aba', 'abab', 'ababa', 'ababab', 'abababa', 'abababab']) == \"abababab\"\n assert candidate(s = \"mississippi\",dictionary = ['is', 'ppi', 'missi', 'missis', 'mississi', 'mississipp']) == \"mississipp\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",dictionary = ['abcdefghij', 'klmnopqrstu', 'vwxyz', 'mnop', 'abcd', 'mnopqr', 'ghijkl', 'efgh', 'mnopqrstuv', 'vwxyzabc']) == \"klmnopqrstu\"\n assert candidate(s = \"abcdeabcdeabcde\",dictionary = ['abcde', 'abcdee', 'abcd', 'abcdeeabcde', 'abcdeabcdeabcde']) == \"abcdeabcdeabcde\"\n assert candidate(s = \"abcdefghijklmno\",dictionary = ['abc', 'abcd', 'abcde', 'abcdef', 'abcdefg', 'abcdefgh', 'abcdefghi', 'abcdefghij', 'abcdefghijk', 'abcdefghijkl', 'abcdefghijklm', 'abcdefghijklmn', 'abcdefghijklmno']) == \"abcdefghijklmno\"\n assert candidate(s = \"longwordwithmanycharacters\",dictionary = ['long', 'word', 'with', 'many', 'characters', 'longword', 'longwordwith', 'withmany', 'manycharacters', 'longwordwithmany', 'wordwithmany', 'wordwithmanycharacters']) == \"wordwithmanycharacters\"\n assert candidate(s = \"leetcode\",dictionary = ['leet', 'leetc', 'lee', 'code', 'leetcod', 'cod', 'ode', 'leetode', 'leetcoded', 'teecode']) == \"leetcod\"\n assert candidate(s = \"abcxyz\",dictionary = ['abc', 'bca', 'cab', 'xyz', 'zyx']) == \"abc\"\n assert candidate(s = \"thisisaverylongstringthatwilltestourfunction\",dictionary = ['this', 'is', 'a', 'very', 'long', 'string', 'that', 'will', 'test', 'our', 'function', 'thisisaverylongstringthatwilltestourfunction']) == \"thisisaverylongstringthatwilltestourfunction\"\n assert candidate(s = \"abacaxbabax\",dictionary = ['aba', 'abacax', 'bacab', 'cab', 'bacabc', 'abcabc']) == \"abacax\"\n assert candidate(s = \"mississippi\",dictionary = ['mis', 'issi', 'issip', 'ippi', 'ppi', 'pip', 'pis', 'is', 'i']) == \"issip\"\n assert candidate(s = \"mississippi\",dictionary = ['issi', 'miss', 'pippi', 'mippi', 'mississippi']) == \"mississippi\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",dictionary = ['zyx', 'zyxwv', 'zyxwvutsrqponmlkjihgfedcba', 'zyxwvutsrqponmlkjihgfedcb', 'zyxwvutsrqponmlkjihgfedc', 'zyxwvutsrqponmlkjihgfed', 'zyxwvutsrqponmlkjihgfe', 'zyxwvutsrqponmlkjihgf', 'zyxwvutsrqponmlkjihg', 'zyxwvutsrqponmlkjih', 'zyxwvutsrqponmlkji', 'zyxwvutsrqponmlkj', 'zyxwvutsrqponmlk', 'zyxwvutsrqponml', 'zyxwvutsrqponm', 'zyxwvutsrqpon', 'zyxwvutsrqpo', 'zyxwvutsrqp', 'zyxwvutsrq', 'zyxwvutsr', 'zyxwvuts', 'zyxwvut', 'zyxwvu', 'zyxwv', 'zyxw', 'zyx', 'zy', 'z']) == \"zyxwvutsrqponmlkjihgfedcba\"\n assert candidate(s = \"aaaaabbbbcccc\",dictionary = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba', 'aaa', 'bbb', 'ccc', 'aabb', 'abcc', 'bbcc', 'aabbcc', 'ab', 'bc', 'ca', 'bb', 'cc', 'aa']) == \"aabbcc\"\n assert candidate(s = \"programmingisfun\",dictionary = ['pro', 'gram', 'ming', 'is', 'fun', 'program', 'programming', 'programmin', 'programmingi', 'programmingis', 'programmingisf', 'programmingisfu', 'programmingisfun', 'programmingisfunn', 'programmingisfuns']) == \"programmingisfun\"\n assert candidate(s = \"mississippi\",dictionary = ['miss', 'piss', 'misp', 'issi', 'issipp']) == \"issipp\"\n assert candidate(s = \"zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\",dictionary = ['zzzzzzzzzz', 'zzzzzzzz', 'zzzzzzz', 'zzzzzz', 'zzzzz', 'zzzz', 'zzz', 'zz', 'z']) == \"zzzzzzzzzz\"\n assert candidate(s = \"babgbag\",dictionary = ['bag', 'bgb', 'ggb', 'bbag', 'baggb']) == \"bbag\"\n assert candidate(s = \"bananaaa\",dictionary = ['baaa', 'ban', 'anana', 'nana', 'banan', 'anan', 'na', 'n', 'a', 'b', 'ba', 'ban', 'bana', 'banan', 'banana', 'bananaa']) == \"bananaa\"\n assert candidate(s = \"mississippi\",dictionary = ['issi', 'missi', 'issipi', 'mississippi', 'mis', 'pi']) == \"mississippi\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['zyxwvutsrqponmlkjihgfedcba', 'abcdefghijklmnopqrstuvwxyz', 'abcdefghijklmnopqrstuvwxy']) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['zyx', 'yxz', 'xyz', 'abcdefghijklmnopqrstuvwxyzz', 'abcdefghijklmnopqrstuvwxyz']) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"abracadabra\",dictionary = ['bra', 'abr', 'cad', 'acad', 'a', 'abracadabra']) == \"abracadabra\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",dictionary = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqr', 'stu', 'vwx', 'yz', 'zzyx']) == \"abc\"\n assert candidate(s = \"abcdefghij\",dictionary = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'abcdefghij', 'abcdefghijk', 'abcdefghi', 'abcdefgh', 'abcdefg', 'abcdef', 'abcde', 'abcd', 'abc', 'ab', 'a']) == \"abcdefghij\"\n assert candidate(s = \"xxyyzz\",dictionary = ['xyz', 'xyzz', 'xzyz', 'xzy', 'yzx', 'zyx', 'zx', 'yx', 'xz', 'zy']) == \"xyzz\"\n assert candidate(s = \"babbbbaabbaaaaabbaabbbabbbaaabbbbbabababbbababbbbbbbbbaabbaaaabbabbbaababbaabbbaaaabbbbbbaaaabbabbbaaaabbaaabbaabba\",dictionary = ['babbbbaabbaaaaaaba', 'babbbaaabbbaabbbba', 'bbbaabbbaaaaaababb', 'bbbabbbbaabbaaaaaabb', 'abababbaabbbaababa', 'bbbbbabbaabbaaaaaa', 'babbbbaaaabbaaaaaa', 'abbbbabbaaaabbaabaa', 'baabaaaabaaabaaaab']) == \"bbbabbbbaabbaaaaaabb\"\n assert candidate(s = \"kfkfkfkfkfkfkfkfkfkfkfkfkfkfkfkf\",dictionary = ['kfk', 'fkf', 'kfkf', 'fkfk', 'kfkfkf', 'fkfkfk']) == \"fkfkfk\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",dictionary = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba', 'abcdefghijklmnopqrstuvwxy', 'qrstuvwxy', 'wxyz', 'uvw', 'vw', 'w']) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",dictionary = ['aabbcc', 'ddeeff', 'gghhiijj', 'kkllmm', 'nnoopp', 'qqrrst', 'tuuvvw', 'xxyyzz', 'zzzyyx']) == \"gghhiijj\"\n assert candidate(s = \"a\",dictionary = ['b', 'c', 'd', 'e', 'f', 'g']) == \"\"\n assert candidate(s = \"leetcodeisgreat\",dictionary = ['leet', 'code', 'is', 'great', 'leetcode', 'leetcodes', 'leetcodeis', 'leetcodeisgreat', 'etcodeisgreat']) == \"leetcodeisgreat\"\n assert candidate(s = \"aabbaabbaabbaabbaabbaabbaabbaabbaabbaabb\",dictionary = ['aabba', 'aabbaabb', 'aabbaabbaabb', 'aabbaabbaabbaabb', 'aabbaabbaabbaabbaabb', 'aabbaabbaabbaabbaabbaabb']) == \"aabbaabbaabbaabbaabbaabb\"\n assert candidate(s = \"longestwordinadictionary\",dictionary = ['longestword', 'word', 'dictionary', 'in', 'a', 'longest', 'long']) == \"longestword\"\n assert candidate(s = \"llllllllllllllllllllllllllllllllllllllllll\",dictionary = ['l', 'll', 'lll', 'llll', 'lllll', 'llllll', 'lllllll', 'llllllll', 'lllllllll', 'llllllllll', 'lllllllllll', 'llllllllllll', 'lllllllllllll', 'llllllllllllll', 'lllllllllllllll', 'llllllllllllllll', 'lllllllllllllllll', 'llllllllllllllllll']) == \"llllllllllllllllll\"\n assert candidate(s = \"aaabbcccddd\",dictionary = ['aabbbcccddd', 'aabbbccc', 'aabbcc', 'aabc', 'abc', 'a', 'b', 'c']) == \"aabbcc\"\n assert candidate(s = \"ababcababc\",dictionary = ['ab', 'abc', 'ababc', 'aabbcc', 'aabbc', 'abab', 'abba', 'ababab', 'babab', 'abcabcabc']) == \"ababab\"\n assert candidate(s = \"ababcabcabc\",dictionary = ['abc', 'abca', 'abcab', 'abcabc', 'abcabcd']) == \"abcabc\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['zyxwvutsrqponmlkjihgfedcba', 'nopqrstuvwxy', 'mnopqrstuvwx', 'lmnopqrstu', 'klmnopqr', 'jklmnop', 'ijklmno', 'ijklm', 'ijkl', 'ijk', 'ij', 'i']) == \"mnopqrstuvwx\"\n assert candidate(s = \"aaaaaaa\",dictionary = ['aaaa', 'aa', 'a', 'aaa', 'aaaaa', 'aaaaaa']) == \"aaaaaa\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",dictionary = ['zyx', 'wvut', 'srqpo', 'nmlkj', 'ihgfedcba', 'mnopqrstu', 'zyxwvutsrqponmlkjihgfedcba']) == \"zyxwvutsrqponmlkjihgfedcba\"\n assert candidate(s = \"longestword\",dictionary = ['long', 'longer', 'longest', 'longestw', 'longestwo', 'longestwor', 'longestword', 'longestworde']) == \"longestword\"\n assert candidate(s = \"qwertyuiopasdfghjklzxcvbnm\",dictionary = ['qwerty', 'asdfgh', 'zxcvbn', 'mnbvcxz', 'lkjhgfdsa', 'poiuytrewq', 'uytrewqpo', 'uytres', 'yuiop', 'poiuyt', 'poiuy', 'poiu', 'po', 'p', 'zxcvbn', 'qwerty', 'asdfghjklzxcvbnm', 'qwertyuiopasdfghjklzxcvbnm', 'qwertyuiopasdfghjklzzzzzzzz', 'zxcvbnmlkjhgfdsapoiuytrewq']) == \"qwertyuiopasdfghjklzxcvbnm\"\n assert candidate(s = \"aaaaaaaaaabbbbbbbbbbccccccccccdddddddddd\",dictionary = ['aaaabbbbccccddd', 'bbbccccddd', 'ccccddd', 'ddd', 'ccc', 'bbb', 'aaa', 'aaabbb', 'bbcccc', 'ccccdd', 'ddd']) == \"aaaabbbbccccddd\"\n assert candidate(s = \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\",dictionary = ['abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd', 'abcdabcdabcdabcdabcdabcdabcdabcdabcdabc', 'abcdabcdabcdabcdabcdabcdabcdabcdabcdab', 'abcdabcdabcdabcdabcdabcdabcdabcdabcd', 'abcdabcdabcdabcdabcdabcdabcdabcdabc', 'abcdabcdabcdabcdabcdabcdabcdabcdab', 'abcdabcdabcdabcdabcdabcdabcdabcd']) == \"abcdabcdabcdabcdabcdabcdabcdabcdabcdabcd\"\n assert candidate(s = \"lletscodeleet\",dictionary = ['code', 'let', 'lets', 'leetc', 'leet', 'leetcode', 'ccode', 'lcode']) == \"lcode\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",dictionary = ['zz', 'yy', 'xx', 'ww', 'vv', 'uu', 'tt', 'ss', 'rr', 'qq', 'pp', 'oo', 'nn', 'mm', 'll', 'kk', 'jj', 'ii', 'hh', 'gg', 'ff', 'ee', 'dd', 'cc', 'bb', 'aa']) == \"aa\"\n assert candidate(s = \"mississippi\",dictionary = ['miss', 'missi', 'missis', 'mississ', 'mississi', 'mississip', 'mississipp', 'mississippi']) == \"mississippi\"\n assert candidate(s = \"aaaabbbbcccc\",dictionary = ['abc', 'aab', 'bbcc', 'aabbcc', 'aaabbbccc', 'ccccbbbbaaa', 'aaaabbbbcccc']) == \"aaaabbbbcccc\"\n assert candidate(s = \"abcdefghij\",dictionary = ['abc', 'def', 'ghi', 'j', 'abcdefghij', 'abcd', 'efgh', 'ijkl', 'ghij']) == \"abcdefghij\"\n assert candidate(s = \"supercalifragilisticexpialidocious\",dictionary = ['super', 'cali', 'fragilistic', 'expialidocious', 'docious', 'ocious', 'cious', 'ious', 'ous', 'us', 's', 'ex', 'pi', 'li', 'tic', 'exp', 'cal', 'sup', 'era', 'istic']) == \"expialidocious\"\n assert candidate(s = \"pppqqqrrrsssttt\",dictionary = ['ppqrs', 'pqr', 'pppp', 'qqqq', 'rrrr', 'ssss', 'tttt', 'pqqqrrrsttt', 'pppqqqrrrssttt']) == \"pppqqqrrrssttt\"\n assert candidate(s = \"abcdabcdabcd\",dictionary = ['abcd', 'abc', 'ab', 'a', 'abcdabcdabcd', 'abcdabcd', 'bcd', 'cd', 'd', 'abcdabcda', 'bcdabcd', 'cdabcd', 'dabcd']) == \"abcdabcdabcd\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",dictionary = ['abcdefghijklmnopqrstuvwxyz', 'zyxwvutsrqponmlkjihgfedcba']) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"banana\",dictionary = ['ban', 'banana', 'banan', 'bananas', 'anana', 'ana', 'nana', 'na', 'a']) == \"banana\"\n assert candidate(s = \"banana\",dictionary = ['ban', 'anana', 'nana', 'banan', 'anan', 'na', 'n', 'a', 'b', 'ba', 'ban', 'bana', 'banan', 'banana']) == \"banana\"\n", "comparison": "exact"}, "public_tests": ["\"abpcplea\"\n[\"ale\",\"apple\",\"monkey\",\"plea\"]", "\"abpcplea\"\n[\"a\",\"b\",\"c\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "dictionary"], "leetcode_dataset_entry_point": "Solution().findLongestWord", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:08+00:00", "tests_total": 94, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "two-pointers", "string", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_longest_word(s, dictionary)", "container": null, "callable": "find_longest_word", "parameters": [{"name": "s", "type": "String"}, {"name": "dictionary", "type": "String[]"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 525, "task_id": "contiguous-array", "difficulty": "Medium", "problem_description": "Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1.\n\nExample 1:\n\nInput: nums = [0,1]\nOutput: 2\nExplanation: [0, 1] is the longest contiguous subarray with an equal number of 0 and 1.\n\nExample 2:\n\nInput: nums = [0,1,0]\nOutput: 2\nExplanation: [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.\n\nExample 3:\n\nInput: nums = [0,1,1,1,1,1,0,0,0]\nOutput: 6\nExplanation: [1,1,1,0,0,0] is the longest contiguous subarray with equal number of 0 and 1.\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- nums[i] is either 0 or 1.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [0, 1, 1, 0, 1, 1, 0, 0]) == 8\n assert candidate(nums = [1, 0, 0, 1, 0, 1, 1]) == 6\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0]) == 8\n assert candidate(nums = [0, 1, 1, 1, 1, 1, 0, 0, 0]) == 6\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 0, 0, 0, 0]) == 8\n assert candidate(nums = [1, 1, 0, 1, 0, 1, 0, 0, 1, 1]) == 8\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0]) == 8\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1]) == 8\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 12\n assert candidate(nums = [1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0]) == 12\n assert candidate(nums = [0, 1]) == 2\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 10\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 0, 0, 0, 0]) == 10\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 12\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1, 0, 0]) == 8\n assert candidate(nums = [0, 1, 1, 0, 1, 1, 1, 0, 0, 1]) == 6\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 10\n assert candidate(nums = [1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1]) == 12\n assert candidate(nums = [0, 0, 1, 1, 0, 0, 1, 1]) == 8\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) == 8\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 0, 0]) == 8\n assert candidate(nums = [0, 1, 0]) == 2\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1]) == 8\n assert candidate(nums = [1, 0, 0, 1, 0, 0, 1, 1]) == 8\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 8\n assert candidate(nums = [0, 0, 1, 0, 0, 0, 1, 1, 1, 1]) == 10\n assert candidate(nums = [0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0]) == 10\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1]) == 6\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 26\n assert candidate(nums = [1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0]) == 28\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 22\n assert candidate(nums = [0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0]) == 20\n assert candidate(nums = [0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 14\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]) == 40\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 44\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 22\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 20\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]) == 24\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0]) == 18\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 38\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]) == 40\n assert candidate(nums = [0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0]) == 24\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) == 30\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 38\n assert candidate(nums = [1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0]) == 42\n assert candidate(nums = [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]) == 54\n assert candidate(nums = [0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0]) == 16\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 46\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 44\n assert candidate(nums = [0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1]) == 20\n assert candidate(nums = [0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 34\n assert candidate(nums = [1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0]) == 30\n assert candidate(nums = [1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1]) == 14\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 20\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 34\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 32\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 28\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]) == 24\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 46\n assert candidate(nums = [1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]) == 18\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 20\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 48\n assert candidate(nums = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0]) == 4\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]) == 30\n assert candidate(nums = [0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0]) == 22\n assert candidate(nums = [1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]) == 30\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]) == 48\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0]) == 24\n assert candidate(nums = [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 48\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 26\n assert candidate(nums = [0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1]) == 30\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 20\n assert candidate(nums = [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 44\n assert candidate(nums = [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]) == 26\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 40\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 24\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 68\n assert candidate(nums = [0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 16\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 22\n assert candidate(nums = [1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 22\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 62\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1]) == 26\n assert candidate(nums = [0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 22\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 26\n assert candidate(nums = [0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1]) == 30\n assert candidate(nums = [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0]) == 4\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1]) == 16\n assert candidate(nums = [1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]) == 26\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0]) == 20\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1]) == 20\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 28\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 40\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 26\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 44\n assert candidate(nums = [0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0]) == 14\n assert candidate(nums = [0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 14\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 38\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 40\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1]) == 24\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0]) == 16\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0]) == 30\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]) == 20\n assert candidate(nums = [1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1]) == 20\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 22\n assert candidate(nums = [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 24\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 28\n assert candidate(nums = [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]) == 20\n assert candidate(nums = [1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1]) == 16\n assert candidate(nums = [1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1]) == 24\n assert candidate(nums = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0]) == 24\n assert candidate(nums = [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1]) == 30\n", "comparison": "exact"}, "public_tests": ["[0,1]", "[0,1,0]", "[0,1,1,1,1,1,0,0,0]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findMaxLength", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:10+00:00", "tests_total": 111, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "hash-table", "prefix-sum"]}, "language": "ruby", "interface": {"raw_signature": "def find_max_length(nums)", "container": null, "callable": "find_max_length", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 526, "task_id": "beautiful-arrangement", "difficulty": "Medium", "problem_description": "Suppose you have n integers labeled 1 through n. A permutation of those n integers perm (1-indexed) is considered a beautiful arrangement if for every i (1 <= i <= n), either of the following is true:\n\n- perm[i] is divisible by i.\n- i is divisible by perm[i].\n\nGiven an integer n, return the number of the beautiful arrangements that you can construct.\n\nExample 1:\n\nInput: n = 2\nOutput: 2\nExplanation:\nThe first beautiful arrangement is [1,2]:\n - perm[1] = 1 is divisible by i = 1\n - perm[2] = 2 is divisible by i = 2\nThe second beautiful arrangement is [2,1]:\n - perm[1] = 2 is divisible by i = 1\n - i = 2 is divisible by perm[2] = 1\n\nExample 2:\n\nInput: n = 1\nOutput: 1\n\nConstraints:\n\n- 1 <= n <= 15\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 8) == 132\n assert candidate(n = 3) == 3\n assert candidate(n = 11) == 750\n assert candidate(n = 15) == 24679\n assert candidate(n = 4) == 8\n assert candidate(n = 12) == 4010\n assert candidate(n = 14) == 10680\n assert candidate(n = 9) == 250\n assert candidate(n = 13) == 4237\n assert candidate(n = 6) == 36\n assert candidate(n = 2) == 2\n assert candidate(n = 1) == 1\n assert candidate(n = 7) == 41\n assert candidate(n = 10) == 700\n assert candidate(n = 5) == 10\n", "comparison": "exact"}, "public_tests": ["2", "1"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().countArrangement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:13+00:00", "tests_total": 15, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming", "backtracking", "bit-manipulation", "bitmask"]}, "language": "ruby", "interface": {"raw_signature": "def count_arrangement(n)", "container": null, "callable": "count_arrangement", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 529, "task_id": "minesweeper", "difficulty": "Medium", "problem_description": "Let's play the minesweeper game (Wikipedia, online game)!\n\nYou are given an m x n char matrix board representing the game board where:\n\n- 'M' represents an unrevealed mine,\n- 'E' represents an unrevealed empty square,\n- 'B' represents a revealed blank square that has no adjacent mines (i.e., above, below, left, right, and all 4 diagonals),\n- digit ('1' to '8') represents how many mines are adjacent to this revealed square, and\n- 'X' represents a revealed mine.\n\nYou are also given an integer array click where click = [click_r, click_c] represents the next click position among all the unrevealed squares ('M' or 'E').\n\nReturn the board after revealing this position according to the following rules:\n\n1. If a mine 'M' is revealed, then the game is over. You should change it to 'X'.\n2. If an empty square 'E' with no adjacent mines is revealed, then change it to a revealed blank 'B' and all of its adjacent unrevealed squares should be revealed recursively.\n3. If an empty square 'E' with at least one adjacent mine is revealed, then change it to a digit ('1' to '8') representing the number of adjacent mines.\n4. Return the board when no more squares will be revealed.\n\nExample 1:\n\nInput: board = [[\"E\",\"E\",\"E\",\"E\",\"E\"],[\"E\",\"E\",\"M\",\"E\",\"E\"],[\"E\",\"E\",\"E\",\"E\",\"E\"],[\"E\",\"E\",\"E\",\"E\",\"E\"]], click = [3,0]\nOutput: [[\"B\",\"1\",\"E\",\"1\",\"B\"],[\"B\",\"1\",\"M\",\"1\",\"B\"],[\"B\",\"1\",\"1\",\"1\",\"B\"],[\"B\",\"B\",\"B\",\"B\",\"B\"]]\n\nExample 2:\n\nInput: board = [[\"B\",\"1\",\"E\",\"1\",\"B\"],[\"B\",\"1\",\"M\",\"1\",\"B\"],[\"B\",\"1\",\"1\",\"1\",\"B\"],[\"B\",\"B\",\"B\",\"B\",\"B\"]], click = [1,2]\nOutput: [[\"B\",\"1\",\"E\",\"1\",\"B\"],[\"B\",\"1\",\"X\",\"1\",\"B\"],[\"B\",\"1\",\"1\",\"1\",\"B\"],[\"B\",\"B\",\"B\",\"B\",\"B\"]]\n\nConstraints:\n\n- m == board.length\n- n == board[i].length\n- 1 <= m, n <= 50\n- board[i][j] is either 'M', 'E', 'B', or a digit from '1' to '8'.\n- click.length == 2\n- 0 <= click_r < m\n- 0 <= click_c < n\n- board[click_r][click_c] is either 'M' or 'E'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [3, 0]) == [['B', '1', 'E', '1', 'B'], ['B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', '1', '1', '1'], ['B', 'B', '1', 'M', 'E']]\n assert candidate(board = [['B', '1', 'E', '1', 'B'], ['B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']],click = [1, 2]) == [['B', '1', 'E', '1', 'B'], ['B', '1', 'X', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E'], ['E', 'E', 'E'], ['E', 'M', 'E']],click = [1, 1]) == [['E', 'E', 'E'], ['E', '1', 'E'], ['E', 'M', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E']],click = [2, 1]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', '1', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E']]\n assert candidate(board = [['E']],click = [0, 0]) == [['B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [3, 0]) == [['B', '1', 'E', '1', 'B'], ['B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 1]) == [['E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'E']],click = [1, 2]) == [['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'X', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'E']]\n assert candidate(board = [['M']],click = [0, 0]) == [['X']]\n assert candidate(board = [['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'M', 'E', 'E'], ['E', '2', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B'], ['B', '1', '1', '1'], ['B', '1', 'M', 'E']]\n assert candidate(board = [['M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['X', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['X', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['B', '1', 'E', '1', 'B'], ['B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']],click = [1, 2]) == [['B', '1', 'E', '1', 'B'], ['B', '1', 'X', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', '2', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 1]) == [['E', '1', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'M', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [1, 3]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', '2', 'E'], ['E', 'E', 'E', 'M', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', '1', '2', '3', '2', '1', 'B', 'B'], ['B', 'B', '1', 'M', 'M', 'M', '1', 'B', 'B'], ['B', 'B', '1', '2', '3', '2', '1', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', '1', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', '1', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', '1', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [4, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E'], ['E', 'E', 'E', 'E']],click = [2, 1]) == [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'X', 'M', 'E'], ['E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'E', 'E', 'E']],click = [7, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'M', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 1]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', '1', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [6, 6]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', '1', '2', '3', '2', '1', 'B', 'B', 'B'], ['B', 'B', '1', 'M', 'M', 'M', '1', 'B', 'B', 'B'], ['B', 'B', '1', '2', '3', '2', '1', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M'], ['E', 'E', 'E', 'E'], ['M', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M'], ['E', 'E', '1', 'E'], ['M', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'M', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', '1', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 4]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', '1', '1', '1', 'B', 'B', '1', '1', '1', 'B'], ['B', '1', 'M', '1', 'B', 'B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B', 'B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E']],click = [4, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [4, 5]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', '2', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [1, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [4, 4]) == [['B', 'B', 'B', 'B', 'B'], ['B', '1', '1', '1', 'B'], ['B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', '2', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', '1', 'M', 'E'], ['B', 'B', '1', '1', '1'], ['1', '1', 'B', 'B', 'B'], ['M', '1', 'B', 'B', 'B'], ['E', '1', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 6]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', '1', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', '1', 'E', 'E', 'E'], ['B', '1', 'M', 'M', 'E'], ['B', '1', '2', '2', '1'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B', 'B'], ['B', '1', '1', '1', 'B', 'B'], ['B', '1', 'M', '1', 'B', 'B'], ['B', '1', '1', '2', '1', '1'], ['B', 'B', 'B', '1', 'M', 'E'], ['B', 'B', 'B', '1', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', '1', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['M', 'M', 'M', 'M', 'M'], ['E', 'E', 'E', 'E', 'E']],click = [4, 0]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['M', 'M', 'M', 'M', 'M'], ['2', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M']],click = [2, 1]) == [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', '1', 'M', '1', 'B', 'B', 'B', 'B'], ['B', '1', '1', '2', '1', '1', '1', '1', '1', 'B'], ['B', '1', 'M', '1', 'B', 'B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B', 'B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', '1', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', '1', '2', '2', '1'], ['B', '1', 'M', 'M', 'E'], ['B', '1', '2', '2', '1'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', '1', '1', '1', 'B', 'B'], ['B', 'B', 'B', '1', 'M', '1', 'B', 'B'], ['B', 'B', 'B', '1', '1', '1', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'M'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'M', 'M'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E']],click = [2, 1]) == [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E'], ['E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'M', 'E', 'M', 'E', 'E'], ['E', 'E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'M', '8', 'M', 'E', 'E'], ['E', 'E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['M', 'E', 'E', 'E', 'M'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['1', '1', 'B', '1', '1'], ['M', '1', 'B', '1', 'M'], ['E', '1', 'B', '1', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['1', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E']],click = [7, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['1', '2', '2', '1', 'B'], ['E', 'M', 'M', '1', 'B'], ['E', 'E', 'E', '1', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [4, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 8]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', '1', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E']],click = [1, 2]) == [['E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E'], ['E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['1', '1', '2', '1', '1'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E']],click = [4, 4]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', '1']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [1, 3]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', '1', 'E', 'E'], ['E', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M']],click = [2, 2]) == [['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E'], ['M', 'E', 'X', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [3, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E', 'M', 'E', 'M']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['1', '1', '2', '1', '2', '1', '2', '1'], ['E', 'M', 'E', 'M', 'E', 'M', 'E', 'M']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', '1', 'M', '1', 'B'], ['B', 'B', 'B', 'B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [5, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['M', 'M', 'M', 'M', 'M', 'M', 'M'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', '3', 'E', 'E', 'E', 'E'], ['M', 'M', 'M', 'M', 'M', 'M', 'M'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E'], ['E', 'E', '3', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'E', 'E', 'E'], ['E', '1', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'M', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['M', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['X', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [5, 1]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'X', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', '1', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [5, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [4, 4]) == [['B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [0, 8]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', '1', '2', '3', '2', '1', 'B', 'B'], ['B', 'B', '1', 'M', 'M', 'M', '1', 'B', 'B'], ['B', 'B', '1', '2', '3', '2', '1', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'X', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 1]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'X', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['M', 'E', 'E', 'E', 'E', 'E', 'E', 'M']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['1', '1', 'B', 'B', 'B', 'B', '1', '1'], ['M', '1', 'B', 'B', 'B', 'B', '1', 'M']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'M']],click = [4, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'M', 'M']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['M', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E']],click = [2, 2]) == [['B', 'B', 'B', 'B', 'B', 'B'], ['1', '1', 'B', '1', '1', '1'], ['M', '1', 'B', '1', 'M', 'E'], ['E', '2', '1', '2', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'M', 'M', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'M', 'M', 'M', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [4, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'M', 'M', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'M', 'M', 'M', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', '1', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'M', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'M', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', '2', 'E', 'E'], ['E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', '1', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'M']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['B', 'B', 'B', 'B', 'B'], ['1', '1', '1', '1', '1'], ['E', 'M', 'E', 'E', 'M']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 7]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', '1', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'M'], ['E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'M'], ['E', 'E', 'M', 'E'], ['E', 'E', '2', 'E'], ['E', 'M', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['B', 'B', 'B', 'B', 'B'], ['B', 'B', '1', '1', '1'], ['B', 'B', '1', 'M', 'E'], ['B', 'B', '1', '1', '1'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [4, 4]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [1, 2]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['M', 'E', 'E', 'E', 'M'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['B', 'B', 'B', 'B', 'B'], ['1', '1', 'B', '1', '1'], ['M', '1', 'B', '1', 'M'], ['1', '1', 'B', '1', '1'], ['B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['M', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [0, 0]) == [['X', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'X', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E', 'E'], ['E', 'M', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E'], ['E', 'E', 'M', 'M', 'E'], ['E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E'], ['E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E']],click = [1, 1]) == [['E', 'E', 'E', 'E'], ['E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [3, 3]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'M', 'E', 'E'], ['E', 'E', 'E', '2', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [2, 2]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', '2', 'E', 'E', 'E'], ['E', 'M', 'M', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']],click = [2, 3]) == [['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'X', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E']],click = [4, 3]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', '1', '1', '1', 'B', 'B', '1', '1', '1', 'B'], ['B', '1', 'M', '1', 'B', 'B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', 'B', 'B', '1', '1', '1', 'B'], ['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B']]\n assert candidate(board = [['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'M', 'E', 'E', 'E', 'E', 'M', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E', 'E'], ['E', 'E', 'E', 'E', 'E', 'M', 'E', 'E', 'E', 'E']],click = [0, 8]) == [['B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B', 'B'], ['B', '1', '1', '1', 'B', 'B', '1', '1', '1', 'B'], ['B', '1', 'M', '1', 'B', 'B', '1', 'M', '1', 'B'], ['B', '1', '1', '1', '1', '1', '2', '1', '1', 'B'], ['B', 'B', 'B', 'B', '1', 'M', '1', 'B', 'B', 'B']]\n", "comparison": "exact"}, "public_tests": ["[[\"E\",\"E\",\"E\",\"E\",\"E\"],[\"E\",\"E\",\"M\",\"E\",\"E\"],[\"E\",\"E\",\"E\",\"E\",\"E\"],[\"E\",\"E\",\"E\",\"E\",\"E\"]]\n[3,0]", "[[\"B\",\"1\",\"E\",\"1\",\"B\"],[\"B\",\"1\",\"M\",\"1\",\"B\"],[\"B\",\"1\",\"1\",\"1\",\"B\"],[\"B\",\"B\",\"B\",\"B\",\"B\"]]\n[1,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["board", "click"], "leetcode_dataset_entry_point": "Solution().updateBoard", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:17+00:00", "tests_total": 119, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "depth-first-search", "breadth-first-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def update_board(board, click)", "container": null, "callable": "update_board", "parameters": [{"name": "board", "type": "Character[][]"}, {"name": "click", "type": "Integer[]"}], "return_type": "Character[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 532, "task_id": "k-diff-pairs-in-an-array", "difficulty": "Medium", "problem_description": "Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array.\n\nA k-diff pair is an integer pair (nums[i], nums[j]), where the following are true:\n\n- 0 <= i, j < nums.length\n- i != j\n- |nums[i] - nums[j]| == k\n\nNotice that |val| denotes the absolute value of val.\n\nExample 1:\n\nInput: nums = [3,1,4,1,5], k = 2\nOutput: 2\nExplanation: There are two 2-diff pairs in the array, (1, 3) and (3, 5).\nAlthough we have two 1s in the input, we should only return the number of unique pairs.\n\nExample 2:\n\nInput: nums = [1,2,3,4,5], k = 1\nOutput: 4\nExplanation: There are four 1-diff pairs in the array, (1, 2), (2, 3), (3, 4) and (4, 5).\n\nExample 3:\n\nInput: nums = [1,3,1,5,4], k = 0\nOutput: 1\nExplanation: There is one 0-diff pair in the array, (1, 1).\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -10^7 <= nums[i] <= 10^7\n- 0 <= k <= 10^7\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 2, 3, 4, 5],k = 3) == 2\n assert candidate(nums = [6, 3, 5, 7, 2, 3, 3, 8, 2, 4],k = 2) == 5\n assert candidate(nums = [10, 20, 30, 40, 50],k = 10) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == 5\n assert candidate(nums = [1, 3, 1, 5, 4],k = 0) == 1\n assert candidate(nums = [1, 1, 1, 1, 1],k = 0) == 1\n assert candidate(nums = [-1, -1, -1, 2, 2, 2],k = 3) == 1\n assert candidate(nums = [-1, -2, -3, -4, -5],k = 1) == 4\n assert candidate(nums = [1, 1, 2, 2, 3, 3],k = 1) == 2\n assert candidate(nums = [3, 1, 4, 1, 5],k = 2) == 2\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4],k = 2) == 2\n assert candidate(nums = [1, 3, 5, 7, 9],k = 2) == 4\n assert candidate(nums = [0, 0, 0, 0, 0],k = 0) == 1\n assert candidate(nums = [1, 2, 3, 4, 5],k = 1) == 4\n assert candidate(nums = [-10000000, -9999999, -9999998, -9999997, -9999996, -9999995, -9999994, -9999993, -9999992, -9999991],k = 1) == 9\n assert candidate(nums = [-1, -2, -3, -1, -2, -3, -4, -5, -6, -7, -8, -9],k = 1) == 8\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3],k = 1) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 19) == 1\n assert candidate(nums = [100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110],k = 1) == 10\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 0) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 0) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == 7\n assert candidate(nums = [10000000, 9999999, 9999998, 9999997, 9999996, 9999995, 9999994, 9999993, 9999992, 9999991],k = 1) == 9\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],k = 2) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 11) == 0\n assert candidate(nums = [-5, -5, -5, -5, 5, 5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15],k = 10) == 2\n assert candidate(nums = [1, 5, 3, 4, 2],k = 3) == 2\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 0) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 0) == 0\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 4) == 18\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59],k = 10) == 25\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],k = 1) == 9\n assert candidate(nums = [10, 2, 2, 10, 10, 3, 3, 3, 4, 4, 5, 5, 5, 5],k = 3) == 1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 10) == 9\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 2) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 3) == 12\n assert candidate(nums = [1, 3, 1, 3, 5, 7, 5, 9, 7, 9, 11, 13, 11],k = 2) == 6\n assert candidate(nums = [5, 5, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 10, 10, 10],k = 1) == 5\n assert candidate(nums = [9, 2, 9, 8, 3, 3, 6, 9, 1, 7, 4, 10, 6, 3, 7, 8, 4, 3, 9, 6],k = 2) == 6\n assert candidate(nums = [10, 20, 30, 40, 50, 10, 20, 30, 40, 50],k = 10) == 4\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14],k = 1) == 13\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 2) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5],k = 0) == 5\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],k = 30) == 7\n assert candidate(nums = [-10, -10, -10, -10, -10, -10, -10, -10, -10, -10],k = 0) == 1\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 50, 150, 250, 350, 450, 550, 650, 750, 850, 950],k = 100) == 18\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 10) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5],k = 0) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 3) == 17\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19],k = 0) == 0\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 1) == 19\n assert candidate(nums = [-1, -2, -2, -3, -3, -3, -4, -4, -4, -4, -5, -5, -5, -5, -5],k = 1) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 1) == 14\n assert candidate(nums = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],k = 1) == 2\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 1) == 0\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 2) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5],k = 2) == 8\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 1) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 5) == 15\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],k = 2) == 19\n assert candidate(nums = [5, 3, 1, 5, 7, 9, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],k = 4) == 13\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 150) == 0\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3],k = 1) == 2\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 1) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 9) == 11\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10],k = 10) == 9\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 2) == 8\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],k = 1) == 9\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 0) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],k = 0) == 10\n assert candidate(nums = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5],k = 1) == 4\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 3) == 7\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20],k = 1) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 19) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 1) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 0) == 1\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 2) == 17\n assert candidate(nums = [1, 2, 2, 2, 3, 3, 4, 5, 6, 6, 7, 8, 8, 9, 10],k = 1) == 9\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500],k = 100) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],k = 5) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 2) == 18\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2],k = 1) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14],k = 0) == 14\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 1\n assert candidate(nums = [10000000, 9999999, 9999998, 9999997, 9999996, 9999995, 9999994, 9999993, 9999992, 9999991],k = 1) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 5) == 15\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],k = 5) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 5) == 5\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],k = 10) == 9\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10],k = 0) == 10\n assert candidate(nums = [-1, -2, -3, -1, -4, -2, -5, -6, -7, -8],k = 1) == 7\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = 1) == 9\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 1\n assert candidate(nums = [1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15],k = 2) == 13\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29],k = 4) == 13\n assert candidate(nums = [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5],k = 2) == 9\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 0) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 3) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10) == 10\n assert candidate(nums = [100, 200, 300, 200, 100, 400, 500, 600, 700, 800],k = 100) == 7\n assert candidate(nums = [10000000, 9999999, 9999998, 9999997, 9999996],k = 1) == 4\n assert candidate(nums = [1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20],k = 1) == 19\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10],k = 1) == 9\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 5) == 16\n assert candidate(nums = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 2) == 20\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 0) == 1\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39],k = 2) == 19\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 0) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 10) == 10\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59],k = 3) == 0\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200],k = 10) == 19\n assert candidate(nums = [-1000, -2000, -3000, -4000, -5000, -6000, -7000, -8000, -9000, -10000],k = 1000) == 9\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 15) == 0\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5],k = 1) == 4\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20],k = 10) == 1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 20) == 8\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000],k = 1000) == 19\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40],k = 4) == 18\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9],k = 1) == 9\n", "comparison": "exact"}, "public_tests": ["[3,1,4,1,5]\n2", "[1,2,3,4,5]\n1", "[1,3,1,5,4]\n0"], "hints": [], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().findPairs", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:24+00:00", "tests_total": 126, "tests_dropped": 4, "flags": [], "topic_tags": ["array", "hash-table", "two-pointers", "binary-search", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_pairs(nums, k)", "container": null, "callable": "find_pairs", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 537, "task_id": "complex-number-multiplication", "difficulty": "Medium", "problem_description": "A complex number can be represented as a string on the form \"real+imaginaryi\" where:\n\n- real is the real part and is an integer in the range [-100, 100].\n- imaginary is the imaginary part and is an integer in the range [-100, 100].\n- i^2 == -1.\n\nGiven two complex numbers num1 and num2 as strings, return a string of the complex number that represents their multiplications.\n\nExample 1:\n\nInput: num1 = \"1+1i\", num2 = \"1+1i\"\nOutput: \"0+2i\"\nExplanation: (1 + i) * (1 + i) = 1 + i2 + 2 * i = 2i, and you need convert it to the form of 0+2i.\n\nExample 2:\n\nInput: num1 = \"1+-1i\", num2 = \"1+-1i\"\nOutput: \"0+-2i\"\nExplanation: (1 - i) * (1 - i) = 1 + i2 - 2 * i = -2i, and you need convert it to the form of 0+-2i.\n\nConstraints:\n\n- num1 and num2 are valid complex numbers.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(num1 = \"100+0i\",num2 = \"0+100i\") == \"0+10000i\"\n assert candidate(num1 = \"7+-8i\",num2 = \"-9+2i\") == \"-47+86i\"\n assert candidate(num1 = \"-50+-50i\",num2 = \"50+50i\") == \"0+-5000i\"\n assert candidate(num1 = \"1+-1i\",num2 = \"1+-1i\") == \"0+-2i\"\n assert candidate(num1 = \"1+1i\",num2 = \"1+1i\") == \"0+2i\"\n assert candidate(num1 = \"2+3i\",num2 = \"3+4i\") == \"-6+17i\"\n assert candidate(num1 = \"-100+-100i\",num2 = \"100+100i\") == \"0+-20000i\"\n assert candidate(num1 = \"50+50i\",num2 = \"50+50i\") == \"0+5000i\"\n assert candidate(num1 = \"33+-50i\",num2 = \"-20+77i\") == \"3190+3541i\"\n assert candidate(num1 = \"0+0i\",num2 = \"0+0i\") == \"0+0i\"\n assert candidate(num1 = \"0+0i\",num2 = \"5+6i\") == \"0+0i\"\n assert candidate(num1 = \"3+4i\",num2 = \"-4+3i\") == \"-24+-7i\"\n assert candidate(num1 = \"-1+2i\",num2 = \"3+-4i\") == \"5+10i\"\n assert candidate(num1 = \"2+3i\",num2 = \"3+2i\") == \"0+13i\"\n assert candidate(num1 = \"10+-10i\",num2 = \"-10+10i\") == \"0+200i\"\n assert candidate(num1 = \"100+100i\",num2 = \"-100+-100i\") == \"0+-20000i\"\n assert candidate(num1 = \"-1+1i\",num2 = \"1+1i\") == \"-2+0i\"\n assert candidate(num1 = \"-1+-1i\",num2 = \"-1+-1i\") == \"0+2i\"\n assert candidate(num1 = \"12+34i\",num2 = \"56+78i\") == \"-1980+2840i\"\n assert candidate(num1 = \"25+75i\",num2 = \"-75+25i\") == \"-3750+-5000i\"\n assert candidate(num1 = \"-50+50i\",num2 = \"50+50i\") == \"-5000+0i\"\n assert candidate(num1 = \"1+0i\",num2 = \"1+0i\") == \"1+0i\"\n assert candidate(num1 = \"0+0i\",num2 = \"100+100i\") == \"0+0i\"\n assert candidate(num1 = \"100+0i\",num2 = \"-100+0i\") == \"-10000+0i\"\n assert candidate(num1 = \"-25+25i\",num2 = \"25+25i\") == \"-1250+0i\"\n assert candidate(num1 = \"42+0i\",num2 = \"0+42i\") == \"0+1764i\"\n assert candidate(num1 = \"0+1i\",num2 = \"1+0i\") == \"0+1i\"\n assert candidate(num1 = \"0+50i\",num2 = \"50+0i\") == \"0+2500i\"\n assert candidate(num1 = \"-50+0i\",num2 = \"0+-50i\") == \"0+2500i\"\n assert candidate(num1 = \"50+0i\",num2 = \"-50+0i\") == \"-2500+0i\"\n assert candidate(num1 = \"88+11i\",num2 = \"-44+22i\") == \"-4114+1452i\"\n assert candidate(num1 = \"50+30i\",num2 = \"-20+40i\") == \"-2200+1400i\"\n assert candidate(num1 = \"-99+99i\",num2 = \"99+99i\") == \"-19602+0i\"\n assert candidate(num1 = \"75+25i\",num2 = \"-25+75i\") == \"-3750+5000i\"\n assert candidate(num1 = \"-99+-99i\",num2 = \"99+99i\") == \"0+-19602i\"\n assert candidate(num1 = \"-1011+789i\",num2 = \"456+123i\") == \"-558063+235431i\"\n assert candidate(num1 = \"88+88i\",num2 = \"11+11i\") == \"0+1936i\"\n assert candidate(num1 = \"-100+0i\",num2 = \"-100+0i\") == \"10000+0i\"\n assert candidate(num1 = \"123+-456i\",num2 = \"-789+101i\") == \"-50991+372207i\"\n assert candidate(num1 = \"-1+0i\",num2 = \"-1+0i\") == \"1+0i\"\n assert candidate(num1 = \"50+0i\",num2 = \"0+50i\") == \"0+2500i\"\n assert candidate(num1 = \"-89+34i\",num2 = \"56+-23i\") == \"-4202+3951i\"\n assert candidate(num1 = \"0+-50i\",num2 = \"-50+0i\") == \"0+2500i\"\n assert candidate(num1 = \"-100+0i\",num2 = \"0+100i\") == \"0+-10000i\"\n assert candidate(num1 = \"66+88i\",num2 = \"88+66i\") == \"0+12100i\"\n assert candidate(num1 = \"99+99i\",num2 = \"1+1i\") == \"0+198i\"\n assert candidate(num1 = \"-1+1i\",num2 = \"-1+1i\") == \"0+-2i\"\n assert candidate(num1 = \"34+56i\",num2 = \"-78+90i\") == \"-7692+-1308i\"\n assert candidate(num1 = \"-100+0i\",num2 = \"0+-100i\") == \"0+10000i\"\n assert candidate(num1 = \"0+0i\",num2 = \"-100+-100i\") == \"0+0i\"\n assert candidate(num1 = \"50+-50i\",num2 = \"-50+50i\") == \"0+5000i\"\n assert candidate(num1 = \"99+99i\",num2 = \"-99+99i\") == \"-19602+0i\"\n assert candidate(num1 = \"0+100i\",num2 = \"0+100i\") == \"-10000+0i\"\n assert candidate(num1 = \"-10+-20i\",num2 = \"10+20i\") == \"300+-400i\"\n assert candidate(num1 = \"0+-100i\",num2 = \"0+-100i\") == \"-10000+0i\"\n assert candidate(num1 = \"100+0i\",num2 = \"100+0i\") == \"10000+0i\"\n assert candidate(num1 = \"-20+-30i\",num2 = \"20+30i\") == \"500+-1200i\"\n assert candidate(num1 = \"1+0i\",num2 = \"-1+0i\") == \"-1+0i\"\n assert candidate(num1 = \"1+0i\",num2 = \"0+1i\") == \"0+1i\"\n assert candidate(num1 = \"99+1i\",num2 = \"1+99i\") == \"0+9802i\"\n assert candidate(num1 = \"0+100i\",num2 = \"100+0i\") == \"0+10000i\"\n assert candidate(num1 = \"1+-1i\",num2 = \"-100+100i\") == \"0+200i\"\n", "comparison": "exact"}, "public_tests": ["\"1+1i\"\n\"1+1i\"", "\"1+-1i\"\n\"1+-1i\""], "hints": [], "metadata": {"canonical_parameter_names": ["num1", "num2"], "leetcode_dataset_entry_point": "Solution().complexNumberMultiply", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:31+00:00", "tests_total": 62, "tests_dropped": 0, "flags": [], "topic_tags": ["math", "string", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def complex_number_multiply(num1, num2)", "container": null, "callable": "complex_number_multiply", "parameters": [{"name": "num1", "type": "String"}, {"name": "num2", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 539, "task_id": "minimum-time-difference", "difficulty": "Medium", "problem_description": "Given a list of 24-hour clock time points in \"HH:MM\" format, return the minimum minutes difference between any two time-points in the list.\n\nExample 1:\n\nInput: timePoints = [\"23:59\",\"00:00\"]\nOutput: 1\n\nExample 2:\n\nInput: timePoints = [\"00:00\",\"23:59\",\"00:00\"]\nOutput: 0\n\nConstraints:\n\n- 2 <= timePoints.length <= 2 * 10^4\n- timePoints[i] is in the format \"HH:MM\".\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(timePoints = ['01:01', '02:02', '03:03', '23:23']) == 61\n assert candidate(timePoints = ['12:34', '12:34', '12:34']) == 0\n assert candidate(timePoints = ['14:59', '15:00', '15:01', '15:02', '15:03']) == 1\n assert candidate(timePoints = ['23:59', '00:00']) == 1\n assert candidate(timePoints = ['14:50', '14:52', '15:50', '15:51', '16:00', '16:05', '16:10']) == 1\n assert candidate(timePoints = ['01:01', '02:02', '03:03', '04:04', '05:05', '06:06', '07:07', '08:08', '09:09', '10:10', '11:11', '12:12', '13:13', '14:14', '15:15', '16:16', '17:17', '18:18', '19:19', '20:20', '21:21', '22:22', '23:23', '00:00']) == 37\n assert candidate(timePoints = ['23:58', '23:59', '00:00', '00:01']) == 1\n assert candidate(timePoints = ['11:11', '11:12', '11:13', '11:14', '11:15']) == 1\n assert candidate(timePoints = ['00:00', '00:01', '00:02', '00:03']) == 1\n assert candidate(timePoints = ['12:34', '23:45', '01:02', '12:34']) == 0\n assert candidate(timePoints = ['00:00', '23:59', '00:00']) == 0\n assert candidate(timePoints = ['12:00', '00:00', '12:00']) == 0\n assert candidate(timePoints = ['12:34', '23:45', '00:12', '01:23']) == 27\n assert candidate(timePoints = ['14:50', '14:51', '00:00', '23:59']) == 1\n assert candidate(timePoints = ['00:01', '00:02', '00:03']) == 1\n assert candidate(timePoints = ['00:01', '00:02', '00:03', '00:04']) == 1\n assert candidate(timePoints = ['01:01', '02:02', '03:03', '23:59', '00:00']) == 1\n assert candidate(timePoints = ['01:01', '01:01', '01:01', '01:01', '01:02', '01:02', '01:03', '01:04']) == 0\n assert candidate(timePoints = ['00:00', '00:01', '00:02', '00:03', '00:04', '00:05', '00:06', '00:07', '00:08', '00:09', '00:10', '00:11', '00:12', '00:13', '00:14', '00:15', '00:16', '00:17', '00:18', '00:19', '00:20', '00:21', '00:22', '00:23', '00:24', '00:25', '00:26', '00:27', '00:28', '00:29', '00:30', '00:31', '00:32', '00:33', '00:34', '00:35', '00:36', '00:37', '00:38', '00:39', '00:40', '00:41', '00:42', '00:43', '00:44', '00:45', '00:46', '00:47', '00:48', '00:49', '00:50', '00:51', '00:52', '00:53', '00:54', '00:55', '00:56', '00:57', '00:58', '00:59']) == 1\n assert candidate(timePoints = ['00:01', '23:59', '12:34', '12:35', '00:00']) == 1\n assert candidate(timePoints = ['11:11', '11:12', '11:13', '11:14', '11:15', '11:16', '11:17', '11:18', '11:19', '11:20', '11:21', '11:22', '11:23', '11:24', '11:25', '11:26', '11:27', '11:28', '11:29', '11:30']) == 1\n assert candidate(timePoints = ['00:00', '06:30', '12:00', '18:00', '23:59']) == 1\n assert candidate(timePoints = ['00:00', '01:15', '02:30', '03:45', '05:00', '06:15', '07:30', '08:45', '10:00', '11:15', '12:30', '13:45', '15:00', '16:15', '17:30', '18:45', '19:00', '20:15', '21:30', '22:45', '23:59']) == 1\n assert candidate(timePoints = ['01:23', '02:45', '03:56', '05:17', '06:38', '07:59', '09:20', '10:41', '12:02', '13:23', '14:45', '16:06', '17:27', '18:48', '20:09', '21:30', '22:51', '24:12']) == 71\n assert candidate(timePoints = ['15:30', '15:30', '15:30', '15:30', '15:30']) == 0\n assert candidate(timePoints = ['12:34', '12:35', '12:36', '12:37', '12:38', '12:39']) == 1\n assert candidate(timePoints = ['14:30', '22:45', '09:15', '00:01', '08:59', '12:00']) == 16\n assert candidate(timePoints = ['00:01', '00:02', '00:03', '00:04', '00:05']) == 1\n assert candidate(timePoints = ['23:55', '23:56', '23:57', '23:58', '23:59', '00:00', '00:01', '00:02', '00:03', '00:04']) == 1\n assert candidate(timePoints = ['12:34', '12:35', '12:36', '12:37', '12:38', '12:39', '12:40', '12:41', '12:42', '12:43', '12:44', '12:45', '12:46', '12:47', '12:48', '12:49', '12:50', '12:51', '12:52', '12:53', '12:54', '12:55', '12:56', '12:57', '12:58', '12:59']) == 1\n assert candidate(timePoints = ['00:01', '00:02', '00:03', '23:58', '23:59']) == 1\n assert candidate(timePoints = ['08:00', '08:10', '08:20', '08:30', '08:40', '08:50', '09:00']) == 10\n assert candidate(timePoints = ['11:11', '11:12', '11:13', '11:14', '11:15', '11:16', '11:17', '11:18', '11:19', '11:20']) == 1\n assert candidate(timePoints = ['01:01', '02:02', '03:03', '04:04', '05:05', '23:23']) == 61\n assert candidate(timePoints = ['23:58', '00:02', '12:34', '12:35', '12:36']) == 1\n assert candidate(timePoints = ['00:00', '12:00', '23:59', '11:59', '12:01', '00:01']) == 1\n assert candidate(timePoints = ['11:59', '23:58', '23:57', '00:01', '00:02', '00:03', '00:04', '00:05']) == 1\n assert candidate(timePoints = ['11:59', '23:58', '23:59', '00:00', '00:01']) == 1\n assert candidate(timePoints = ['00:00', '04:30', '09:00', '13:30', '18:00', '22:30']) == 90\n assert candidate(timePoints = ['13:30', '14:30', '15:30', '16:30', '17:30', '18:30', '19:30', '20:30', '21:30', '22:30', '23:30', '00:30']) == 60\n assert candidate(timePoints = ['01:10', '01:10', '02:20', '03:30', '04:40']) == 0\n assert candidate(timePoints = ['00:00', '00:01', '00:02', '00:03', '23:59']) == 1\n assert candidate(timePoints = ['12:00', '12:01', '12:02', '12:03', '12:04', '12:05', '12:06', '12:07', '12:08', '12:09', '12:10', '12:11', '12:12', '12:13', '12:14', '12:15', '12:16', '12:17', '12:18', '12:19']) == 1\n assert candidate(timePoints = ['07:07', '07:07', '07:07', '07:08', '07:09', '07:10', '07:11', '07:12']) == 0\n assert candidate(timePoints = ['09:45', '09:46', '09:47', '09:48', '09:49', '09:50', '09:51', '09:52', '09:53', '09:54']) == 1\n assert candidate(timePoints = ['05:30', '05:31', '05:32', '05:33', '05:34']) == 1\n assert candidate(timePoints = ['06:06', '06:07', '06:08', '06:09', '06:10', '06:11', '06:12', '06:13', '06:14', '06:15']) == 1\n assert candidate(timePoints = ['11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22', '11:11', '22:22']) == 0\n assert candidate(timePoints = ['00:00', '00:01', '23:58', '23:59', '12:00']) == 1\n assert candidate(timePoints = ['23:59', '00:01', '00:02', '00:03', '00:04', '00:05', '00:06', '00:07', '00:08', '00:09']) == 1\n assert candidate(timePoints = ['01:23', '02:45', '03:30', '04:15', '05:00', '23:50']) == 45\n assert candidate(timePoints = ['11:59', '12:00', '12:01', '12:02', '12:03', '12:04']) == 1\n assert candidate(timePoints = ['10:10', '10:10', '10:11', '10:11', '10:12', '10:12', '10:13', '10:13', '10:14', '10:14']) == 0\n assert candidate(timePoints = ['00:00', '00:01', '00:02', '00:03', '00:04', '00:05', '00:06', '00:07', '00:08', '00:09', '00:10', '00:11', '00:12', '00:13', '00:14', '00:15', '00:16', '00:17', '00:18', '00:19', '00:20', '00:21', '00:22', '00:23', '00:24', '00:25', '00:26', '00:27', '00:28', '00:29', '00:30', '00:31', '00:32', '00:33', '00:34', '00:35', '00:36', '00:37', '00:38', '00:39', '00:40', '00:41', '00:42', '00:43', '00:44', '00:45', '00:46', '00:47', '00:48', '00:49', '00:50', '00:51', '00:52', '00:53', '00:54', '00:55', '00:56', '00:57', '00:58', '00:59', '23:00', '23:01', '23:02', '23:03', '23:04', '23:05', '23:06', '23:07', '23:08', '23:09', '23:10', '23:11', '23:12', '23:13', '23:14', '23:15', '23:16', '23:17', '23:18', '23:19', '23:20', '23:21', '23:22', '23:23', '23:24', '23:25', '23:26', '23:27', '23:28', '23:29', '23:30', '23:31', '23:32', '23:33', '23:34', '23:35', '23:36', '23:37', '23:38', '23:39', '23:40', '23:41', '23:42', '23:43', '23:44', '23:45', '23:46', '23:47', '23:48', '23:49', '23:50', '23:51', '23:52', '23:53', '23:54', '23:55', '23:56', '23:57', '23:58', '23:59']) == 1\n assert candidate(timePoints = ['00:00', '00:01', '23:59', '23:58', '00:02', '23:57']) == 1\n assert candidate(timePoints = ['14:30', '14:31', '14:32', '14:33', '14:34', '14:35', '14:36', '14:37', '14:38', '14:39']) == 1\n assert candidate(timePoints = ['14:00', '14:01', '14:02', '14:03', '14:04', '14:05', '14:06', '14:07', '14:08', '14:09', '14:10']) == 1\n assert candidate(timePoints = ['01:01', '01:02', '01:03', '01:04', '01:05']) == 1\n assert candidate(timePoints = ['00:00', '23:59', '12:34', '12:35', '12:36', '12:37', '12:38', '12:39', '12:40', '12:41']) == 1\n assert candidate(timePoints = ['23:59', '23:58', '23:57', '23:56', '23:55', '23:54', '23:53', '23:52', '23:51', '23:50', '23:49', '23:48', '23:47', '23:46', '23:45', '23:44', '23:43', '23:42', '23:41', '23:40', '23:39', '23:38', '23:37', '23:36', '23:35', '23:34', '23:33', '23:32', '23:31', '23:30', '23:29', '23:28', '23:27', '23:26', '23:25', '23:24', '23:23', '23:22', '23:21', '23:20', '23:19', '23:18', '23:17', '23:16', '23:15', '23:14', '23:13', '23:12', '23:11', '23:10', '23:09', '23:08', '23:07', '23:06', '23:05', '23:04', '23:03', '23:02', '23:01', '00:00']) == 1\n assert candidate(timePoints = ['05:45', '05:46', '10:10', '10:09', '23:59', '00:00']) == 1\n assert candidate(timePoints = ['23:58', '23:59', '00:00', '00:01', '00:02', '00:03', '00:04', '00:05']) == 1\n assert candidate(timePoints = ['00:00', '00:10', '00:20', '00:30', '00:40', '00:50']) == 10\n assert candidate(timePoints = ['23:58', '23:59', '00:00', '00:01', '00:02']) == 1\n assert candidate(timePoints = ['00:00', '00:10', '00:20', '00:30', '00:40', '00:50', '01:00', '01:10', '01:20', '01:30', '01:40', '01:50', '02:00', '02:10', '02:20', '02:30', '02:40', '02:50', '03:00']) == 10\n assert candidate(timePoints = ['09:09', '18:18', '09:09', '18:18', '09:09', '18:18']) == 0\n assert candidate(timePoints = ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '23:59']) == 1\n assert candidate(timePoints = ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']) == 60\n assert candidate(timePoints = ['00:01', '23:59', '12:34', '01:02', '12:34']) == 0\n assert candidate(timePoints = ['00:01', '00:02', '00:03', '23:59', '00:04']) == 1\n assert candidate(timePoints = ['12:30', '13:30', '14:30', '15:30', '16:30']) == 60\n assert candidate(timePoints = ['00:15', '01:15', '02:15', '03:15', '04:15', '05:15', '06:15', '07:15', '08:15', '09:15', '10:15', '11:15', '12:15', '13:15', '14:15', '15:15', '16:15', '17:15', '18:15', '19:15', '20:15', '21:15', '22:15', '23:15']) == 60\n assert candidate(timePoints = ['09:09', '10:10', '11:11', '12:12', '13:13', '14:14', '15:15', '16:16', '17:17', '18:18', '19:19', '20:20', '21:21', '22:22', '23:23', '00:00']) == 37\n assert candidate(timePoints = ['12:00', '12:01', '12:02', '12:03', '12:04', '12:05', '12:06', '12:07', '12:08', '12:09', '12:10', '12:11', '12:12', '12:13', '12:14', '12:15', '12:16', '12:17', '12:18', '12:19', '12:20', '12:21', '12:22', '12:23', '12:24', '12:25', '12:26', '12:27', '12:28', '12:29', '12:30', '12:31', '12:32', '12:33', '12:34', '12:35', '12:36', '12:37', '12:38', '12:39', '12:40', '12:41', '12:42', '12:43', '12:44', '12:45', '12:46', '12:47', '12:48', '12:49', '12:50', '12:51', '12:52', '12:53', '12:54', '12:55', '12:56', '12:57', '12:58', '12:59']) == 1\n assert candidate(timePoints = ['00:00', '00:05', '00:10', '00:15', '00:20', '00:25', '00:30', '00:35', '00:40', '00:45', '00:50', '00:55', '01:00']) == 5\n assert candidate(timePoints = ['01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00']) == 60\n assert candidate(timePoints = ['12:00', '12:10', '12:20', '12:30', '12:40', '12:50']) == 10\n assert candidate(timePoints = ['23:00', '00:01', '00:02', '00:03', '22:58', '22:59']) == 1\n assert candidate(timePoints = ['01:30', '02:30', '03:30', '04:30', '05:30', '06:30', '07:30', '08:30', '09:30', '10:30', '11:30', '12:30', '13:30', '14:30', '15:30', '16:30', '17:30', '18:30', '19:30', '20:30', '21:30', '22:30', '23:30']) == 60\n assert candidate(timePoints = ['15:22', '15:22', '15:23', '15:23', '15:24', '15:24', '15:25', '15:25', '15:26', '15:26', '15:27', '15:27', '15:28', '15:28', '15:29', '15:29', '15:30', '15:30', '15:31', '15:31']) == 0\n assert candidate(timePoints = ['13:40', '13:41', '13:42', '13:43', '13:44', '13:45']) == 1\n assert candidate(timePoints = ['11:59', '12:00', '12:01', '12:02', '12:03', '12:04', '12:05', '12:06', '12:07', '12:08', '12:09', '12:10']) == 1\n assert candidate(timePoints = ['00:01', '00:02', '00:03', '00:04', '00:05', '00:06', '00:07', '00:08', '00:09', '00:10']) == 1\n assert candidate(timePoints = ['13:45', '02:50', '06:12', '19:34', '08:43', '21:01', '15:23', '03:30', '17:56', '10:14', '04:26', '18:38', '09:51', '20:49', '14:07', '07:19', '16:32', '11:25', '05:37', '12:48', '01:06', '00:52', '13:45']) == 0\n", "comparison": "exact"}, "public_tests": ["[\"23:59\",\"00:00\"]", "[\"00:00\",\"23:59\",\"00:00\"]"], "hints": [], "metadata": {"canonical_parameter_names": ["timePoints"], "leetcode_dataset_entry_point": "Solution().findMinDifference", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:36+00:00", "tests_total": 84, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "math", "string", "sorting"]}, "language": "ruby", "interface": {"raw_signature": "def find_min_difference(time_points)", "container": null, "callable": "find_min_difference", "parameters": [{"name": "time_points", "type": "String[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 540, "task_id": "single-element-in-a-sorted-array", "difficulty": "Medium", "problem_description": "You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once.\n\nReturn the single element that appears only once.\n\nYour solution must run in O(log n) time and O(1) space.\n\nExample 1:\n\nInput: nums = [1,1,2,3,3,4,4,8,8]\nOutput: 2\n\nExample 2:\n\nInput: nums = [3,3,7,7,10,11,11]\nOutput: 10\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- 0 <= nums[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [5, 5, 6, 6, 7, 8, 8]) == 7\n assert candidate(nums = [0, 0, 1, 1, 2]) == 2\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 6, 6]) == 5\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50]) == 50\n assert candidate(nums = [1, 1, 2, 2, 3]) == 3\n assert candidate(nums = [10, 10, 11, 11, 12, 13, 13, 14, 14]) == 12\n assert candidate(nums = [1]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 4, 4]) == 3\n assert candidate(nums = [1, 2, 2]) == 1\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3]) == 3\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 8, 8]) == 2\n assert candidate(nums = [1, 1, 2]) == 2\n assert candidate(nums = [3, 3, 7, 7, 10, 11, 11]) == 10\n assert candidate(nums = [10, 10, 22, 22, 44, 55, 55, 66, 66, 77, 77]) == 44\n assert candidate(nums = [0, 0, 1, 1, 2, 3, 3]) == 2\n assert candidate(nums = [1, 1, 10, 10, 6, 7, 7, 8, 8]) == 6\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 5, 5]) == 4\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5]) == 1\n assert candidate(nums = [5]) == 5\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5]) == 5\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 4, 4]) == 3\n assert candidate(nums = [1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == 10\n assert candidate(nums = [100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 900, 1000]) == 1000\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16]) == 1\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16]) == 16\n assert candidate(nums = [10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15]) == 11\n assert candidate(nums = [0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 18, 18, 20, 20, 22, 22, 24, 24]) == 16\n assert candidate(nums = [3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25]) == 25\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14]) == 1\n assert candidate(nums = [1000, 1000, 2000, 2000, 3000, 3000, 4000, 4000, 5000, 5000, 6000, 6000, 7000, 7000, 8000, 8000, 9000, 9000, 10000, 10000, 11000, 11000, 12000, 12000, 13000, 13000, 14000, 14000, 15000, 15000, 16000, 16000, 17000, 17000, 18000, 18000, 19000, 19000, 20000, 20000, 21000, 21000, 22000, 22000, 23000, 23000, 24000, 24000, 25000]) == 25000\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19]) == 19\n assert candidate(nums = [100, 100, 102, 102, 104, 104, 106, 106, 108, 108, 110, 110, 112, 112, 114, 116, 116, 118, 118, 120, 120]) == 114\n assert candidate(nums = [1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 12, 12, 14, 14, 16, 16]) == 11\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32]) == 32\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25]) == 25\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20]) == 9\n assert candidate(nums = [10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20]) == 20\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28]) == 28\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 11, 11, 13, 13, 15, 15]) == 10\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90]) == 90\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 28, 30, 30, 32, 32, 34]) == 34\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19]) == 19\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31]) == 31\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]) == 4\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25]) == 18\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26]) == 26\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33]) == 33\n assert candidate(nums = [1000, 1000, 1002, 1002, 1004, 1004, 1006, 1006, 1008, 1008, 1010, 1010, 1012, 1012, 1014, 1014, 1016, 1016, 1018, 1018, 1020, 1020, 1022, 1022, 1024, 1024, 1025]) == 1025\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9]) == 8\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12]) == 11\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9]) == 7\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 11\n assert candidate(nums = [3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20]) == 20\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 19, 19]) == 18\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17]) == 1\n assert candidate(nums = [0, 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7]) == 1\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15]) == 14\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11]) == 9\n assert candidate(nums = [1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 25, 25, 26, 26, 27]) == 27\n assert candidate(nums = [25, 25, 30, 30, 35, 35, 40, 40, 45, 45, 50, 50, 55, 55, 60, 60, 65, 66, 66, 70, 70, 75, 75, 80, 80, 85, 85, 90, 90]) == 65\n assert candidate(nums = [0, 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8]) == 1\n assert candidate(nums = [0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, 11]) == 8\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18]) == 18\n assert candidate(nums = [1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 16, 16, 18, 18, 20, 20]) == 15\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 12, 12]) == 11\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29]) == 29\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90, 90, 100, 100, 110, 110, 120, 120, 130, 130, 140, 141, 141]) == 140\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8]) == 6\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 21]) == 21\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 19, 19]) == 18\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 16, 16]) == 15\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 1\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 1\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 11\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13]) == 2\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 26, 28, 29, 29]) == 28\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20]) == 20\n assert candidate(nums = [50000, 50000, 50001, 50001, 50002, 50002, 50003, 50003, 50004, 50004, 50005, 50005, 50006, 50006, 50007, 50007, 50008, 50008, 50009, 50009, 50010, 50010, 50011, 50011, 50012, 50012, 50013, 50013, 50014, 50014, 50015, 50015, 50016, 50016, 50017, 50017, 50018, 50018, 50019, 50019, 50020]) == 50020\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27]) == 27\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30]) == 30\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21]) == 21\n assert candidate(nums = [100, 100, 200, 200, 300, 300, 400, 400, 500, 500, 600, 600, 700, 700, 800, 800, 900, 901, 901]) == 900\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10]) == 9\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 8, 9, 9, 10, 10]) == 7\n assert candidate(nums = [1, 1, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9]) == 9\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14]) == 9\n assert candidate(nums = [1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43, 43, 45, 45, 47, 47, 49, 49, 51, 51, 53]) == 53\n assert candidate(nums = [1, 1, 2, 2, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 10, 10, 11, 11, 12, 12, 13]) == 13\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9]) == 9\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24]) == 24\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 5\n assert candidate(nums = [1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21]) == 21\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 17, 17]) == 1\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 6\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 5\n assert candidate(nums = [3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31]) == 31\n assert candidate(nums = [1, 1, 2, 2, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10]) == 3\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9]) == 9\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22]) == 22\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17]) == 2\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10]) == 8\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 51, 51, 60, 60, 70, 70, 80, 80, 90, 90]) == 50\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15]) == 15\n assert candidate(nums = [0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8]) == 5\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 51, 51, 60, 60, 70, 70, 80, 80]) == 50\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 18, 18]) == 17\n assert candidate(nums = [2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18]) == 18\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 4\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 13, 13]) == 12\n assert candidate(nums = [1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 19, 21, 21, 23, 23, 25, 25, 27, 27, 29, 29, 31, 31, 33, 33, 35, 35, 37, 37, 39, 39, 41, 41, 43]) == 43\n assert candidate(nums = [10, 10, 11, 11, 12, 12, 13, 13, 14, 15, 15, 16, 16, 17, 17]) == 14\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11]) == 6\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23]) == 23\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 5\n assert candidate(nums = [10, 10, 20, 20, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90, 90, 100, 100, 110]) == 30\n assert candidate(nums = [1, 1, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10]) == 2\n assert candidate(nums = [3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 13, 13, 15, 15, 17, 17, 19, 21, 21]) == 19\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17]) == 17\n assert candidate(nums = [100, 100, 101, 101, 102, 102, 103, 103, 104, 104, 105, 105, 106, 106, 107, 108, 108, 109, 109, 110, 110]) == 107\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 10, 10, 11, 11, 12, 12]) == 9\n assert candidate(nums = [10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 22, 24, 24, 26, 27, 28, 28, 30, 30]) == 26\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12]) == 12\n assert candidate(nums = [3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13]) == 13\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14]) == 14\n assert candidate(nums = [2, 2, 4, 4, 6, 6, 8, 8, 10, 11, 11, 12, 12, 14, 14, 16, 16, 18, 18]) == 10\n assert candidate(nums = [100, 100, 101, 102, 102, 103, 103, 104, 104, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117]) == 101\n", "comparison": "exact"}, "public_tests": ["[1,1,2,3,3,4,4,8,8]", "[3,3,7,7,10,11,11]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().singleNonDuplicate", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:38+00:00", "tests_total": 133, "tests_dropped": 1, "flags": [], "topic_tags": ["array", "binary-search"]}, "language": "ruby", "interface": {"raw_signature": "def single_non_duplicate(nums)", "container": null, "callable": "single_non_duplicate", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 541, "task_id": "reverse-string-ii", "difficulty": "Easy", "problem_description": "Given a string s and an integer k, reverse the first k characters for every 2k characters counting from the start of the string.\n\nIf there are fewer than k characters left, reverse all of them. If there are less than 2k but greater than or equal to k characters, then reverse the first k characters and leave the other as original.\n\nExample 1:\n\nInput: s = \"abcdefg\", k = 2\nOutput: \"bacdfeg\"\n\nExample 2:\n\nInput: s = \"abcd\", k = 2\nOutput: \"bacd\"\n\nConstraints:\n\n- 1 <= s.length <= 10^4\n- s consists of only lowercase English letters.\n- 1 <= k <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"abcdefgh\",k = 3) == \"cbadefhg\"\n assert candidate(s = \"abcdefg\",k = 1) == \"abcdefg\"\n assert candidate(s = \"abcdef\",k = 6) == \"fedcba\"\n assert candidate(s = \"a\",k = 1) == \"a\"\n assert candidate(s = \"abcdefghijk\",k = 4) == \"dcbaefghkji\"\n assert candidate(s = \"abcd\",k = 2) == \"bacd\"\n assert candidate(s = \"abcdefg\",k = 2) == \"bacdfeg\"\n assert candidate(s = \"abcdefg\",k = 10) == \"gfedcba\"\n assert candidate(s = \"ab\",k = 10) == \"ba\"\n assert candidate(s = \"mississippiississippiississippi\",k = 6) == \"sissimsippiiississppiissppissii\"\n assert candidate(s = \"abcdefghijklmnopqrs\",k = 1) == \"abcdefghijklmnopqrs\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",k = 5) == \"vwxyzutsrqlmnopkjihgbcdefa\"\n assert candidate(s = \"mississippi\",k = 4) == \"ssimissiipp\"\n assert candidate(s = \"abcdefghij\",k = 7) == \"gfedcbahij\"\n assert candidate(s = \"reverseeverysinglekcharachters\",k = 8) == \"eesreververysingarahckelchters\"\n assert candidate(s = \"abcdefghijklmnopqrstu\",k = 1) == \"abcdefghijklmnopqrstu\"\n assert candidate(s = \"thisisaverylongstringforchecking\",k = 6) == \"sisihtaverylrtsgnoingforikcehcng\"\n assert candidate(s = \"abcd\",k = 1) == \"abcd\"\n assert candidate(s = \"zxcvbnmlkjhgfdsapoiuytrewq\",k = 9) == \"klmnbvcxzjhgfdsapoqwertyui\"\n assert candidate(s = \"abcdefghijklmn\",k = 1) == \"abcdefghijklmn\"\n assert candidate(s = \"abcdefghijklmnopq\",k = 1) == \"abcdefghijklmnopq\"\n assert candidate(s = \"reversemeplease\",k = 7) == \"esrevermeplease\"\n assert candidate(s = \"abcdefghij\",k = 2) == \"bacdfeghji\"\n assert candidate(s = \"thisisaverylongstringthatweneedtoreversesomeparts\",k = 5) == \"isihtsavergnolystrintahtgweneeerotdversepemosarts\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxy\",k = 1) == \"abcdefghijklmnopqrstuvwxy\"\n assert candidate(s = \"abcdefghij\",k = 8) == \"hgfedcbaij\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",k = 1) == \"zyxwvutsrqponmlkjihgfedcba\"\n assert candidate(s = \"abcdefghij\",k = 10) == \"jihgfedcba\"\n assert candidate(s = \"onetwothreefourfivesixseveneightnine\",k = 10) == \"erhtowtenoefourfivesgienevesxihtnine\"\n assert candidate(s = \"almostthere\",k = 10) == \"rehttsomlae\"\n assert candidate(s = \"abcdefghijabcdefghij\",k = 11) == \"ajihgfedcbabcdefghij\"\n assert candidate(s = \"reverseme\",k = 5) == \"reverseme\"\n assert candidate(s = \"pythonprogramming\",k = 2) == \"ypthnoprgoramming\"\n assert candidate(s = \"oddnumberofchar\",k = 4) == \"nddoumbecforhar\"\n assert candidate(s = \"abcdefghijklmnop\",k = 1) == \"abcdefghijklmnop\"\n assert candidate(s = \"abcdefghij\",k = 4) == \"dcbaefghji\"\n assert candidate(s = \"abcdefghij\",k = 9) == \"ihgfedcbaj\"\n assert candidate(s = \"abc\",k = 1) == \"abc\"\n assert candidate(s = \"abcdefghij\",k = 11) == \"jihgfedcba\"\n assert candidate(s = \"abcdefgh\",k = 9) == \"hgfedcba\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 5) == \"cbbaacddeehggffhiijjmllkkmnnoorqqpprssttwvvuuwxxyyzz\"\n assert candidate(s = \"abcdef\",k = 5) == \"edcbaf\"\n assert candidate(s = \"abcdefghijklnopqrstuvwxyz\",k = 26) == \"zyxwvutsrqponlkjihgfedcba\"\n assert candidate(s = \"pythonprogramminglanguage\",k = 8) == \"rpnohtypogrammingaugnalge\"\n assert candidate(s = \"reverseeveryotherchunk\",k = 3) == \"verersveeeryhtoercnuhk\"\n assert candidate(s = \"abcdefghijklmnopqrst\",k = 1) == \"abcdefghijklmnopqrst\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 7) == \"dccbbaadeeffggkjjiihhkllmmnnrqqppoorssttuuyxxwwvvyzz\"\n assert candidate(s = \"abcdefgh\",k = 1) == \"abcdefgh\"\n assert candidate(s = \"abcde\",k = 10) == \"edcba\"\n assert candidate(s = \"aabbccddeeffgghhiijj\",k = 1) == \"aabbccddeeffgghhiijj\"\n assert candidate(s = \"reversemeplease\",k = 1) == \"reversemeplease\"\n assert candidate(s = \"abcdefghijklmnopqr\",k = 1) == \"abcdefghijklmnopqr\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",k = 5) == \"edcbafghijonmlkpqrstyxwvuz\"\n assert candidate(s = \"abcdef\",k = 7) == \"fedcba\"\n assert candidate(s = \"abcdefghij\",k = 5) == \"edcbafghij\"\n assert candidate(s = \"abcdefghijklnopqrstuvwxyz\",k = 13) == \"nlkjihgfedcbaopqrstuvwxyz\"\n assert candidate(s = \"abcdefghijklmnopqrstuv\",k = 1) == \"abcdefghijklmnopqrstuv\"\n assert candidate(s = \"abcdefghijkl\",k = 1) == \"abcdefghijkl\"\n assert candidate(s = \"abcdefghijklnmopqrstuvwxyz\",k = 5) == \"edcbafghijomnlkpqrstyxwvuz\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 8) == \"ddccbbaaeeffgghhllkkjjiimmnnooppttssrrqquuvvwwxxzzyy\"\n assert candidate(s = \"thisisaverylongstringtotestthealgorithm\",k = 6) == \"sisihtaverylrtsgnoingtotehttsealgorimht\"\n assert candidate(s = \"abcdefghij\",k = 3) == \"cbadefihgj\"\n assert candidate(s = \"onemoretest\",k = 15) == \"tseteromeno\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",k = 3) == \"cbadefihgjklonmpqrutsvwxzy\"\n assert candidate(s = \"quickbrownfoxjumpsoverthelazydog\",k = 8) == \"orbkciuqwnfoxjumhtrevospelazydog\"\n assert candidate(s = \"reverseeverytwochars\",k = 2) == \"ervesreeevrywtocahrs\"\n assert candidate(s = \"thisisaverylongstringthatweneedtoreversethosegmentscorrectly\",k = 8) == \"vasisihterylongsahtgnirttweneedtesreverothosegmeerrocstnctly\"\n assert candidate(s = \"abcde\",k = 1) == \"abcde\"\n assert candidate(s = \"aaaaaabbbbbbcccccc\",k = 6) == \"aaaaaabbbbbbcccccc\"\n assert candidate(s = \"abcdefghij\",k = 20) == \"jihgfedcba\"\n assert candidate(s = \"partialreverse\",k = 7) == \"laitrapreverse\"\n assert candidate(s = \"abcdef\",k = 1) == \"abcdef\"\n assert candidate(s = \"abcdefghij\",k = 1) == \"abcdefghij\"\n assert candidate(s = \"abcdefgh\",k = 8) == \"hgfedcba\"\n assert candidate(s = \"a\",k = 10) == \"a\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",k = 4) == \"wxyzvutsopqrnmlkghijfedcab\"\n assert candidate(s = \"abcdefghij\",k = 6) == \"fedcbaghij\"\n assert candidate(s = \"thisisaverylongstringthatwilltestthefunctiontoseehowitbehaves\",k = 15) == \"gnolyrevasisihtstringthatwillttnoitcnufehttseoseehowitbehaves\"\n assert candidate(s = \"shortstring\",k = 15) == \"gnirtstrohs\"\n assert candidate(s = \"thisisaverylongstringthatweneedtotest\",k = 7) == \"asisihtverylongnirtsgthatwenetotdeest\"\n assert candidate(s = \"aaaaabbbbbaaaaabbbbb\",k = 5) == \"aaaaabbbbbaaaaabbbbb\"\n assert candidate(s = \"ababababababababababababab\",k = 2) == \"baabbaabbaabbaabbaabbaabba\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\",k = 1) == \"abcdefghijklmnopqrstuvwxyz\"\n assert candidate(s = \"abcdefghijabcdefghij\",k = 7) == \"gfedcbahijabcdjihgfe\"\n assert candidate(s = \"abcdefghijk\",k = 1) == \"abcdefghijk\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\",k = 3) == \"baabcceddeffhgghiikjjkllnmmnooqppqrrtsstuuwvvwxxzyyz\"\n assert candidate(s = \"onetwothreefourfive\",k = 1) == \"onetwothreefourfive\"\n assert candidate(s = \"ab\",k = 2) == \"ba\"\n assert candidate(s = \"pythonprogramminglanguage\",k = 1) == \"pythonprogramminglanguage\"\n assert candidate(s = \"one\",k = 10) == \"eno\"\n assert candidate(s = \"abcdabcdabcd\",k = 2) == \"bacdbacdbacd\"\n assert candidate(s = \"thisisaverylongstringtocheckthebehaviorofthefunction\",k = 8) == \"vasisihterylongscotgnirthecktheboroivahefthefuncnoit\"\n assert candidate(s = \"letsreverseeveryothersegment\",k = 6) == \"erstelverseetoyrevhersegtnem\"\n assert candidate(s = \"abababababababab\",k = 2) == \"baabbaabbaabbaab\"\n assert candidate(s = \"abcdefghijabcdefghijabcdefghij\",k = 12) == \"bajihgfedcbacdefghijabcdjihgfe\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwx\",k = 1) == \"abcdefghijklmnopqrstuvwx\"\n assert candidate(s = \"ab\",k = 1) == \"ab\"\n assert candidate(s = \"abcdefghijklm\",k = 1) == \"abcdefghijklm\"\n assert candidate(s = \"twowords\",k = 2) == \"wtowrods\"\n assert candidate(s = \"abcdefghijklmnopqrstuvw\",k = 1) == \"abcdefghijklmnopqrstuvw\"\n assert candidate(s = \"reverseeveryotherblock\",k = 7) == \"esrevereveryotcolbrehk\"\n assert candidate(s = \"zyxwvutsrqponmlkjihgfedcba\",k = 26) == \"abcdefghijklmnopqrstuvwxyz\"\n", "comparison": "exact"}, "public_tests": ["\"abcdefg\"\n2", "\"abcd\"\n2"], "hints": [], "metadata": {"canonical_parameter_names": ["s", "k"], "leetcode_dataset_entry_point": "Solution().reverseStr", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:41+00:00", "tests_total": 104, "tests_dropped": 2, "flags": [], "topic_tags": ["two-pointers", "string"]}, "language": "ruby", "interface": {"raw_signature": "def reverse_str(s, k)", "container": null, "callable": "reverse_str", "parameters": [{"name": "s", "type": "String"}, {"name": "k", "type": "Integer"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 542, "task_id": "01-matrix", "difficulty": "Medium", "problem_description": "Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell.\n\nThe distance between two cells sharing a common edge is 1.\n\nExample 1:\n\nInput: mat = [[0,0,0],[0,1,0],[0,0,0]]\nOutput: [[0,0,0],[0,1,0],[0,0,0]]\n\nExample 2:\n\nInput: mat = [[0,0,0],[0,1,0],[1,1,1]]\nOutput: [[0,0,0],[0,1,0],[1,2,1]]\n\nConstraints:\n\n- m == mat.length\n- n == mat[i].length\n- 1 <= m, n <= 10^4\n- 1 <= m * n <= 10^4\n- mat[i][j] is either 0 or 1.\n- There is at least one 0 in mat.\n\nNote: This question is the same as 1765: https://leetcode.com/problems/map-of-highest-peak/\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(mat = [[1, 0, 1, 1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1, 0, 0, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1, 0], [1, 1, 1, 1, 0, 1, 0, 0, 1, 1]]) == [[1, 0, 1, 1, 0, 0, 1, 0, 0, 1], [0, 1, 1, 0, 1, 0, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 2, 1, 0, 1, 0], [1, 0, 1, 1, 0, 1, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1, 0, 0, 1, 2], [1, 0, 0, 0, 1, 2, 1, 1, 0, 1], [2, 1, 1, 1, 1, 2, 1, 0, 1, 0], [3, 2, 2, 1, 0, 1, 0, 0, 1, 1]]\n assert candidate(mat = [[0, 1, 0], [0, 1, 0], [0, 1, 0]]) == [[0, 1, 0], [0, 1, 0], [0, 1, 0]]\n assert candidate(mat = [[1, 1, 1], [1, 1, 1], [1, 0, 1]]) == [[3, 2, 3], [2, 1, 2], [1, 0, 1]]\n assert candidate(mat = [[0, 1, 0, 1, 1], [1, 1, 0, 0, 1], [0, 0, 0, 1, 0], [1, 0, 1, 1, 1], [1, 1, 1, 0, 0]]) == [[0, 1, 0, 1, 2], [1, 1, 0, 0, 1], [0, 0, 0, 1, 0], [1, 0, 1, 1, 1], [2, 1, 1, 0, 0]]\n assert candidate(mat = [[0, 0, 0], [0, 1, 0], [0, 0, 0]]) == [[0, 0, 0], [0, 1, 0], [0, 0, 0]]\n assert candidate(mat = [[0, 0, 0], [0, 1, 0], [1, 1, 1]]) == [[0, 0, 0], [0, 1, 0], [1, 2, 1]]\n assert candidate(mat = [[0, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 0, 0, 1, 0]]) == [[0, 1, 0, 1, 2], [1, 1, 0, 1, 2], [2, 1, 1, 2, 1], [1, 0, 0, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 0]]) == [[0, 1, 2, 3], [1, 2, 3, 2], [2, 3, 2, 1], [3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1], [1, 1, 1], [1, 1, 0]]) == [[4, 3, 2], [3, 2, 1], [2, 1, 0]]\n assert candidate(mat = [[1, 0, 1], [1, 1, 0], [1, 1, 1]]) == [[1, 0, 1], [2, 1, 0], [3, 2, 1]]\n assert candidate(mat = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) == [[0, 0, 0], [0, 0, 0], [0, 0, 0]]\n assert candidate(mat = [[0, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]]) == [[0, 1, 0, 1, 2], [1, 1, 0, 1, 2], [2, 2, 1, 2, 1], [3, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0]]) == [[2, 1, 2, 3, 4, 5, 6], [1, 0, 1, 2, 3, 4, 5], [2, 1, 2, 1, 2, 3, 4], [3, 2, 1, 0, 1, 2, 3], [4, 3, 2, 1, 2, 3, 2], [5, 4, 3, 2, 3, 2, 1], [6, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]]) == [[4, 3, 2, 3, 4], [3, 2, 1, 2, 3], [2, 1, 0, 1, 2], [3, 2, 1, 2, 3], [4, 3, 2, 3, 4]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1]]) == [[6, 5, 4, 3, 3, 4, 5, 6], [5, 4, 3, 2, 2, 3, 4, 5], [4, 3, 2, 1, 1, 2, 3, 4], [3, 2, 1, 0, 0, 1, 2, 3], [3, 2, 1, 0, 0, 1, 2, 3], [4, 3, 2, 1, 1, 2, 3, 4], [5, 4, 3, 2, 2, 3, 4, 5], [6, 5, 4, 3, 3, 4, 5, 6]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 5, 6, 7, 7], [1, 2, 3, 4, 3, 4, 5, 6, 6], [2, 3, 4, 3, 2, 3, 4, 5, 5], [3, 4, 3, 2, 1, 2, 3, 4, 4], [4, 3, 2, 1, 0, 1, 2, 3, 3], [5, 4, 3, 2, 1, 2, 3, 3, 2], [6, 5, 4, 3, 2, 3, 3, 2, 1], [7, 6, 5, 4, 3, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1]]) == [[2, 1, 1, 2, 2, 1, 2], [1, 0, 0, 1, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1], [1, 0, 1, 2, 1, 0, 1], [1, 0, 0, 1, 1, 0, 1], [2, 1, 1, 2, 2, 1, 2]]\n assert candidate(mat = [[0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 0, 0]]) == [[0, 0, 0, 0, 1, 2, 3], [0, 0, 0, 1, 2, 3, 4], [0, 0, 1, 2, 3, 4, 3], [0, 1, 2, 3, 4, 3, 2], [1, 2, 3, 4, 3, 2, 1], [2, 3, 4, 3, 2, 1, 0], [3, 4, 3, 2, 1, 0, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 5, 6, 7, 7], [1, 2, 3, 4, 5, 6, 7, 7, 6], [2, 3, 4, 5, 6, 7, 7, 6, 5], [3, 4, 5, 6, 7, 7, 6, 5, 4], [4, 5, 6, 7, 7, 6, 5, 4, 3], [5, 6, 7, 7, 6, 5, 4, 3, 2], [6, 7, 7, 6, 5, 4, 3, 2, 1], [7, 7, 6, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 5, 6, 7], [1, 2, 3, 4, 5, 6, 7, 6], [2, 3, 4, 5, 6, 7, 6, 5], [3, 4, 5, 6, 7, 6, 5, 4], [4, 5, 6, 7, 6, 5, 4, 3], [5, 6, 7, 6, 5, 4, 3, 2], [6, 7, 6, 5, 4, 3, 2, 1], [7, 6, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 4, 3, 2, 1, 0], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [2, 3, 4, 5, 6, 6, 5, 4, 3, 2], [3, 4, 5, 6, 7, 7, 6, 5, 4, 3], [3, 4, 5, 6, 7, 7, 6, 5, 4, 3], [2, 3, 4, 5, 6, 6, 5, 4, 3, 2], [1, 2, 3, 4, 5, 5, 4, 3, 2, 1], [0, 1, 2, 3, 4, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 5, 6], [1, 2, 3, 2, 3, 4, 5], [2, 3, 2, 1, 2, 3, 4], [3, 2, 1, 0, 1, 2, 3], [4, 3, 2, 1, 2, 3, 2], [5, 4, 3, 2, 3, 2, 1], [6, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 0]]) == [[4, 5, 5, 4, 3, 2, 1, 0], [3, 4, 5, 5, 4, 3, 2, 1], [2, 3, 4, 5, 5, 4, 3, 2], [1, 2, 3, 4, 4, 3, 2, 1], [0, 1, 2, 3, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1]]) == [[1, 0, 1, 2, 3, 4], [2, 1, 1, 2, 3, 4], [2, 1, 0, 1, 2, 3], [3, 2, 1, 2, 1, 2], [4, 3, 2, 1, 0, 1]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]) == [[2, 1, 1, 1, 1, 1, 2], [1, 0, 0, 0, 0, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 1, 0, 1, 0, 1], [1, 0, 1, 1, 1, 0, 1], [1, 0, 0, 0, 0, 0, 1], [2, 1, 1, 1, 1, 1, 2]]\n assert candidate(mat = [[0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0]]) == [[0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0], [1, 0, 1, 0, 1], [0, 1, 0, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0]]) == [[2, 1, 2, 3, 4, 5, 6, 7], [1, 0, 1, 2, 3, 4, 5, 6], [2, 1, 2, 3, 2, 3, 4, 5], [3, 2, 3, 2, 1, 2, 3, 4], [4, 3, 2, 1, 0, 1, 2, 3], [5, 4, 3, 2, 1, 2, 3, 2], [6, 5, 4, 3, 2, 3, 2, 1], [7, 6, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 0, 0], [1, 1, 1, 1, 1, 0, 0, 0]]) == [[0, 1, 2, 3, 4, 5, 6, 5], [1, 2, 3, 4, 5, 6, 5, 4], [2, 3, 4, 5, 6, 5, 4, 3], [3, 4, 5, 6, 5, 4, 3, 2], [4, 5, 6, 5, 4, 3, 2, 1], [5, 6, 5, 4, 3, 2, 1, 0], [6, 5, 4, 3, 2, 1, 0, 0], [5, 4, 3, 2, 1, 0, 0, 0]]\n assert candidate(mat = [[1, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 0]]) == [[2, 1, 2, 3], [1, 0, 1, 2], [2, 1, 0, 1], [3, 2, 1, 0]]\n assert candidate(mat = [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 0, 1, 0], [0, 1, 1, 1, 0]]) == [[0, 0, 0, 0, 0], [0, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 0, 1, 0], [0, 1, 1, 1, 0]]\n assert candidate(mat = [[0, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0]]) == [[0, 0, 0, 1, 2, 3], [0, 0, 1, 2, 3, 3], [0, 1, 2, 3, 3, 2], [1, 2, 3, 3, 2, 1], [2, 3, 3, 2, 1, 0], [3, 3, 2, 1, 0, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0, 1]]) == [[2, 1, 2, 3, 4, 5, 6, 7, 8], [1, 0, 1, 2, 3, 4, 5, 6, 7], [2, 1, 2, 3, 2, 3, 4, 5, 6], [3, 2, 3, 2, 1, 2, 3, 4, 5], [4, 3, 2, 1, 0, 1, 2, 3, 4], [5, 4, 3, 2, 1, 2, 3, 2, 3], [6, 5, 4, 3, 2, 3, 2, 1, 2], [7, 6, 5, 4, 3, 2, 1, 0, 1]]\n assert candidate(mat = [[0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4], [1, 2, 3, 4, 3], [2, 3, 4, 3, 2], [3, 4, 3, 2, 1], [4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 5, 4], [1, 2, 3, 4, 5, 4, 3], [2, 3, 4, 5, 4, 3, 2], [3, 4, 5, 4, 3, 2, 1], [4, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 1, 0, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 0, 1]]) == [[2, 1, 1, 2, 2, 1, 2], [1, 0, 0, 1, 1, 0, 1], [1, 0, 1, 1, 0, 1, 2], [2, 1, 2, 2, 1, 2, 1], [1, 0, 1, 1, 0, 1, 0], [2, 1, 1, 2, 1, 1, 1], [2, 1, 0, 1, 1, 0, 1]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 1]]) == [[2, 1, 2, 1, 2, 1, 2], [1, 0, 1, 0, 1, 0, 1], [2, 1, 2, 1, 2, 1, 2], [1, 0, 1, 0, 1, 0, 1], [2, 1, 2, 1, 2, 1, 2]]\n assert candidate(mat = [[0, 1, 1, 0], [1, 1, 1, 1], [1, 1, 1, 1], [1, 0, 1, 0]]) == [[0, 1, 1, 0], [1, 2, 2, 1], [2, 1, 2, 1], [1, 0, 1, 0]]\n assert candidate(mat = [[0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0]]) == [[0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0]]\n assert candidate(mat = [[0, 0, 1, 0, 1], [0, 1, 1, 0, 1], [1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [1, 1, 1, 0, 0]]) == [[0, 0, 1, 0, 1], [0, 1, 1, 0, 1], [1, 1, 2, 1, 2], [1, 0, 1, 0, 1], [2, 1, 1, 0, 0]]\n assert candidate(mat = [[1, 1, 0, 1, 1], [1, 1, 0, 1, 1], [1, 0, 0, 0, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1]]) == [[2, 1, 0, 1, 2], [2, 1, 0, 1, 2], [1, 0, 0, 0, 1], [2, 1, 0, 1, 2], [3, 2, 1, 2, 3]]\n assert candidate(mat = [[0, 0, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 0, 0]]) == [[0, 0, 1, 2, 3], [0, 1, 2, 3, 2], [1, 2, 3, 2, 1], [2, 3, 2, 1, 0], [3, 2, 1, 0, 0]]\n assert candidate(mat = [[0, 0, 0, 1, 1, 1], [0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0], [1, 1, 1, 0, 0, 0]]) == [[0, 0, 0, 1, 2, 3], [0, 0, 1, 2, 3, 2], [0, 1, 2, 3, 2, 1], [1, 2, 3, 2, 1, 0], [2, 3, 2, 1, 0, 0], [3, 2, 1, 0, 0, 0]]\n assert candidate(mat = [[0, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == [[0, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 2], [0, 1, 2, 2, 2, 3], [0, 1, 2, 3, 3, 4], [0, 1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6]]\n assert candidate(mat = [[0, 0, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 0, 0]]) == [[0, 0, 1, 2, 3, 4], [0, 1, 2, 3, 4, 3], [1, 2, 3, 4, 3, 2], [2, 3, 4, 3, 2, 1], [3, 4, 3, 2, 1, 0], [4, 3, 2, 1, 0, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 0]]) == [[6, 5, 4, 3, 4, 5, 6, 6], [5, 4, 3, 2, 3, 4, 5, 5], [4, 3, 2, 1, 2, 3, 4, 4], [3, 2, 1, 0, 1, 2, 3, 3], [4, 3, 2, 1, 2, 3, 3, 2], [5, 4, 3, 2, 3, 3, 2, 1], [6, 5, 4, 3, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1], [0, 1, 0, 1, 0, 1]]) == [[0, 1, 0, 1, 0, 1], [1, 2, 1, 2, 1, 2], [0, 1, 0, 1, 0, 1], [1, 2, 1, 2, 1, 2], [0, 1, 0, 1, 0, 1]]\n assert candidate(mat = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]]) == [[4, 3, 2, 3, 4], [3, 2, 1, 2, 3], [2, 1, 0, 1, 2], [3, 2, 1, 2, 1], [4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 2, 1, 0], [1, 2, 3, 4, 3, 2, 1], [2, 3, 4, 5, 4, 3, 2], [1, 2, 3, 4, 3, 2, 1], [0, 1, 2, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 0, 1, 1, 0, 0, 1], [0, 1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 1], [1, 1, 1, 1, 1, 1, 0]]) == [[1, 0, 1, 1, 0, 0, 1], [0, 1, 2, 1, 0, 1, 2], [1, 2, 1, 2, 1, 2, 3], [2, 1, 0, 1, 2, 1, 2], [1, 0, 1, 0, 1, 0, 1], [2, 1, 2, 1, 2, 1, 0]]\n assert candidate(mat = [[0, 0, 1, 1, 1], [0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]]) == [[0, 0, 1, 2, 3], [0, 1, 2, 3, 3], [1, 2, 3, 3, 2], [2, 3, 3, 2, 1], [3, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0], [1, 1, 1, 1, 1], [0, 1, 0, 1, 0]]) == [[0, 1, 0, 1, 0], [1, 2, 1, 2, 1], [0, 1, 0, 1, 0], [1, 2, 1, 2, 1], [0, 1, 0, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [1, 1, 1, 1, 1]]) == [[2, 1, 2, 1, 2], [1, 0, 1, 0, 1], [2, 1, 2, 1, 2], [1, 0, 1, 0, 1], [2, 1, 2, 1, 2]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == [[5, 4, 3, 2, 1, 0], [6, 5, 4, 3, 2, 1], [7, 6, 5, 4, 3, 2], [8, 7, 6, 5, 4, 3], [9, 8, 7, 6, 5, 4]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 0, 0, 0, 0, 0, 0]]) == [[11, 10, 9, 8, 7, 7, 7, 7, 7, 7], [10, 9, 8, 7, 6, 6, 6, 6, 6, 6], [9, 8, 7, 6, 5, 5, 5, 5, 5, 5], [8, 7, 6, 5, 4, 4, 4, 4, 4, 4], [7, 6, 5, 4, 3, 3, 3, 3, 3, 3], [6, 5, 4, 3, 2, 2, 2, 2, 2, 2], [5, 4, 3, 2, 1, 1, 1, 1, 1, 1], [4, 3, 2, 1, 0, 0, 0, 0, 0, 0], [4, 3, 2, 1, 0, 0, 0, 0, 0, 0], [4, 3, 2, 1, 0, 0, 0, 0, 0, 0]]\n assert candidate(mat = [[0, 0, 0, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0]]) == [[0, 0, 0, 1, 2], [1, 1, 1, 2, 3], [2, 2, 2, 3, 2], [3, 3, 3, 2, 1], [4, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1], [1, 0, 0, 0, 1], [1, 0, 1, 0, 1], [1, 0, 0, 0, 1], [1, 1, 1, 1, 1]]) == [[2, 1, 1, 1, 2], [1, 0, 0, 0, 1], [1, 0, 1, 0, 1], [1, 0, 0, 0, 1], [2, 1, 1, 1, 2]]\n assert candidate(mat = [[0, 0, 0, 1, 1, 0, 1, 1, 1, 1], [0, 1, 0, 1, 1, 0, 1, 1, 1, 1], [1, 0, 0, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 0, 0, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == [[0, 0, 0, 1, 1, 0, 1, 2, 3, 4], [0, 1, 0, 1, 1, 0, 1, 2, 3, 4], [1, 0, 0, 1, 1, 0, 1, 2, 2, 3], [2, 1, 1, 0, 0, 0, 1, 1, 1, 2], [3, 2, 2, 1, 1, 1, 0, 0, 0, 1], [4, 3, 3, 2, 2, 1, 0, 0, 1, 2], [5, 4, 4, 3, 3, 2, 1, 1, 2, 3], [6, 5, 5, 4, 4, 3, 2, 2, 3, 4]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0]]) == [[6, 5, 4, 3, 4, 5, 6], [5, 4, 3, 2, 3, 4, 5], [4, 3, 2, 1, 2, 3, 4], [3, 2, 1, 0, 1, 2, 3], [4, 3, 2, 1, 2, 3, 2], [5, 4, 3, 2, 3, 2, 1], [6, 5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0]]) == [[5, 4, 3, 2, 3, 4], [4, 3, 2, 1, 2, 3], [3, 2, 1, 0, 1, 2], [4, 3, 2, 1, 2, 2], [5, 4, 3, 2, 2, 1], [5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0]]) == [[13, 12, 11, 10, 9, 8, 7, 7], [12, 11, 10, 9, 8, 7, 6, 6], [11, 10, 9, 8, 7, 6, 5, 5], [10, 9, 8, 7, 6, 5, 4, 4], [9, 8, 7, 6, 5, 4, 3, 3], [8, 7, 6, 5, 4, 3, 2, 2], [7, 6, 5, 4, 3, 2, 1, 1], [6, 5, 4, 3, 2, 1, 0, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 0], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [0, 1, 1, 1, 0]]) == [[4, 3, 2, 1, 0], [3, 4, 3, 2, 1], [2, 3, 4, 3, 2], [1, 2, 3, 2, 1], [0, 1, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 4], [2, 3, 4, 5, 4, 3], [3, 4, 5, 4, 3, 2], [4, 5, 4, 3, 2, 1], [5, 4, 3, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1, 0], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 0]]) == [[0, 1, 2, 2, 1, 0], [1, 2, 3, 3, 2, 1], [2, 3, 4, 4, 3, 2], [1, 2, 3, 3, 2, 1], [0, 1, 2, 2, 1, 0]]\n assert candidate(mat = [[0, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 0], [1, 1, 1, 0, 1]]) == [[0, 1, 2, 3, 3], [1, 2, 3, 3, 2], [2, 3, 3, 2, 1], [3, 3, 2, 1, 0], [3, 2, 1, 0, 1]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 0, 0, 1, 1], [1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]) == [[7, 6, 5, 4, 4, 4, 5, 6, 7], [6, 5, 4, 3, 3, 3, 4, 5, 6], [5, 4, 3, 2, 2, 2, 3, 4, 5], [4, 3, 2, 1, 1, 1, 2, 3, 4], [3, 2, 1, 0, 0, 0, 1, 2, 3], [2, 1, 0, 0, 0, 0, 0, 1, 2], [1, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0]]\n assert candidate(mat = [[0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 0, 0]]) == [[0, 0, 0, 0, 1, 2, 3, 4], [0, 0, 0, 1, 2, 3, 4, 5], [0, 0, 1, 2, 3, 4, 5, 5], [0, 1, 2, 3, 4, 5, 4, 4], [1, 2, 3, 4, 5, 4, 3, 3], [2, 3, 4, 5, 4, 3, 2, 2], [3, 4, 5, 4, 3, 2, 1, 1], [4, 5, 4, 3, 2, 1, 0, 0]]\n assert candidate(mat = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 0, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 0]]) == [[4, 3, 2, 3, 4, 5], [3, 2, 1, 2, 3, 4], [2, 1, 0, 1, 2, 3], [3, 2, 1, 2, 3, 2], [4, 3, 2, 3, 2, 1], [5, 4, 3, 2, 1, 0]]\n", "comparison": "exact"}, "public_tests": ["[[0,0,0],[0,1,0],[0,0,0]]", "[[0,0,0],[0,1,0],[1,1,1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["mat"], "leetcode_dataset_entry_point": "Solution().updateMatrix", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:43+00:00", "tests_total": 67, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "dynamic-programming", "breadth-first-search", "matrix"]}, "language": "ruby", "interface": {"raw_signature": "def update_matrix(mat)", "container": null, "callable": "update_matrix", "parameters": [{"name": "mat", "type": "Integer[][]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 546, "task_id": "remove-boxes", "difficulty": "Hard", "problem_description": "You are given several boxes with different colors represented by different positive numbers.\n\nYou may experience several rounds to remove boxes until there is no box left. Each time you can choose some continuous boxes with the same color (i.e., composed of k boxes, k >= 1), remove them and get k * k points.\n\nReturn the maximum points you can get.\n\nExample 1:\n\nInput: boxes = [1,3,2,2,2,3,4,3,1]\nOutput: 23\nExplanation:\n[1, 3, 2, 2, 2, 3, 4, 3, 1]\n----> [1, 3, 3, 4, 3, 1] (3*3=9 points)\n----> [1, 3, 3, 3, 1] (1*1=1 points)\n----> [1, 1] (3*3=9 points)\n----> [] (2*2=4 points)\n\nExample 2:\n\nInput: boxes = [1,1,1]\nOutput: 9\n\nExample 3:\n\nInput: boxes = [1]\nOutput: 1\n\nConstraints:\n\n- 1 <= boxes.length <= 100\n- 1 <= boxes[i] <= 100\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(boxes = [1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 54\n assert candidate(boxes = [1, 1, 2, 2, 1, 1]) == 20\n assert candidate(boxes = [1, 2, 2, 1, 3, 3, 3, 4, 4, 4, 4, 5]) == 34\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]) == 36\n assert candidate(boxes = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 30\n assert candidate(boxes = [1, 2, 3, 2, 1, 2, 3, 2, 1]) == 23\n assert candidate(boxes = [1, 2, 3, 4, 5]) == 5\n assert candidate(boxes = [1, 1, 2, 3, 2, 2, 3, 3, 3]) == 25\n assert candidate(boxes = [1, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == 20\n assert candidate(boxes = [2, 1, 2, 1, 2]) == 11\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 30\n assert candidate(boxes = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 100\n assert candidate(boxes = [1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 42\n assert candidate(boxes = [1, 1, 1]) == 9\n assert candidate(boxes = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 20\n assert candidate(boxes = [5, 5, 5, 5, 1, 1, 1, 2, 2, 3, 3, 3, 3]) == 45\n assert candidate(boxes = [5, 5, 5, 5, 5]) == 25\n assert candidate(boxes = [100, 100, 100, 99, 99, 98, 98, 98, 98]) == 29\n assert candidate(boxes = [1, 2, 2, 1, 2, 2, 1]) == 21\n assert candidate(boxes = [1]) == 1\n assert candidate(boxes = [2, 2, 2, 3, 3, 3, 4, 4, 4]) == 27\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(boxes = [10, 10, 10, 1, 1, 1, 10, 10, 10]) == 45\n assert candidate(boxes = [1, 3, 2, 2, 2, 3, 4, 3, 1]) == 23\n assert candidate(boxes = [10, 20, 30, 40, 50, 40, 30, 20, 10]) == 17\n assert candidate(boxes = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]) == 100\n assert candidate(boxes = [9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7]) == 43\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 2, 2, 2, 3, 3, 3]) == 80\n assert candidate(boxes = [5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 2, 2, 1, 1, 1]) == 74\n assert candidate(boxes = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 32\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 1, 1, 1, 2, 2, 2, 3, 3]) == 76\n assert candidate(boxes = [1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8]) == 168\n assert candidate(boxes = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2]) == 62\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 40\n assert candidate(boxes = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]) == 64\n assert candidate(boxes = [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]) == 40\n assert candidate(boxes = [27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 30, 30, 30, 30, 30, 31, 31, 31, 31, 31, 31]) == 95\n assert candidate(boxes = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1]) == 39\n assert candidate(boxes = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 3249\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 51\n assert candidate(boxes = [9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12]) == 106\n assert candidate(boxes = [1, 2, 2, 1, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8]) == 64\n assert candidate(boxes = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 400\n assert candidate(boxes = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 256\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 63\n assert candidate(boxes = [5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8]) == 135\n assert candidate(boxes = [1, 2, 3, 2, 1, 4, 5, 4, 3, 2, 1, 6, 7, 6, 5, 4, 3, 2, 1, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 76\n assert candidate(boxes = [1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3]) == 110\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 43\n assert candidate(boxes = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 40\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 1, 4, 4, 4, 4]) == 57\n assert candidate(boxes = [1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1, 1, 2, 3, 1]) == 131\n assert candidate(boxes = [1, 2, 3, 2, 1, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1]) == 66\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 36\n assert candidate(boxes = [10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1]) == 40\n assert candidate(boxes = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 37\n assert candidate(boxes = [1, 2, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1]) == 49\n assert candidate(boxes = [1, 2, 3, 4, 5, 5, 5, 4, 3, 2, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]) == 78\n assert candidate(boxes = [2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8]) == 77\n assert candidate(boxes = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9]) == 144\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 1, 2, 2, 3, 3, 3, 4, 4, 4, 4]) == 92\n assert candidate(boxes = [9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1]) == 57\n assert candidate(boxes = [9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15]) == 92\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6]) == 125\n assert candidate(boxes = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 324\n assert candidate(boxes = [1, 2, 2, 1, 3, 3, 3, 2, 2, 1, 4, 4, 4, 4, 1, 5, 5, 5, 5, 5, 1, 6, 6, 6, 6, 6, 6, 1]) == 130\n assert candidate(boxes = [13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17]) == 90\n assert candidate(boxes = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5]) == 83\n assert candidate(boxes = [5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2]) == 75\n assert candidate(boxes = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 625\n assert candidate(boxes = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9]) == 36\n assert candidate(boxes = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 1, 1]) == 48\n assert candidate(boxes = [18, 19, 20, 21, 22, 22, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 25, 26, 26]) == 62\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 37\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4]) == 99\n assert candidate(boxes = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6]) == 96\n assert candidate(boxes = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2]) == 110\n assert candidate(boxes = [1, 2, 1, 3, 2, 1, 4, 3, 2, 1, 5, 4, 3, 2, 1, 6, 5, 4, 3, 2]) == 40\n assert candidate(boxes = [16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19]) == 142\n assert candidate(boxes = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 85\n assert candidate(boxes = [1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4]) == 87\n assert candidate(boxes = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 110\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 2, 2]) == 51\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3]) == 27\n assert candidate(boxes = [1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1, 2, 3, 2, 1]) == 275\n assert candidate(boxes = [9, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 9, 9]) == 57\n assert candidate(boxes = [1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1]) == 45\n assert candidate(boxes = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10]) == 250\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 84\n assert candidate(boxes = [4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1]) == 59\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 20\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5]) == 55\n assert candidate(boxes = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 1024\n assert candidate(boxes = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 400\n assert candidate(boxes = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 48\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2]) == 44\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 200\n assert candidate(boxes = [20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23]) == 151\n assert candidate(boxes = [9, 9, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 5, 5, 5]) == 63\n assert candidate(boxes = [24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26]) == 243\n assert candidate(boxes = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 40\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8]) == 142\n assert candidate(boxes = [1, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, 1, 3, 2]) == 62\n assert candidate(boxes = [1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4]) == 74\n assert candidate(boxes = [1, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3]) == 104\n assert candidate(boxes = [1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 2, 2, 3, 3, 4, 4, 1, 1, 2, 2]) == 64\n assert candidate(boxes = [1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 2, 3]) == 156\n assert candidate(boxes = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9]) == 189\n assert candidate(boxes = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 20\n assert candidate(boxes = [1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5]) == 54\n assert candidate(boxes = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 80\n assert candidate(boxes = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1]) == 41\n assert candidate(boxes = [1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1]) == 155\n assert candidate(boxes = [1, 2, 2, 1, 2, 3, 3, 2, 3, 4, 4, 3, 4, 5, 5, 4, 5]) == 45\n assert candidate(boxes = [1, 2, 2, 2, 3, 3, 3, 2, 2, 1, 1, 1, 1]) == 59\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(boxes = [1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1, 2, 3, 4, 3, 2, 1]) == 57\n assert candidate(boxes = [5, 5, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1]) == 61\n assert candidate(boxes = [1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4]) == 84\n assert candidate(boxes = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9]) == 324\n assert candidate(boxes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 22\n assert candidate(boxes = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 37\n", "comparison": "exact"}, "public_tests": ["[1,3,2,2,2,3,4,3,1]", "[1,1,1]", "[1]"], "hints": [], "metadata": {"canonical_parameter_names": ["boxes"], "leetcode_dataset_entry_point": "Solution().removeBoxes", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:52+00:00", "tests_total": 122, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "dynamic-programming", "memoization"]}, "language": "ruby", "interface": {"raw_signature": "def remove_boxes(boxes)", "container": null, "callable": "remove_boxes", "parameters": [{"name": "boxes", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 547, "task_id": "number-of-provinces", "difficulty": "Medium", "problem_description": "There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city c, then city a is connected indirectly with city c.\n\nA province is a group of directly or indirectly connected cities and no other cities outside of the group.\n\nYou are given an n x n matrix isConnected where isConnected[i][j] = 1 if the i^th city and the j^th city are directly connected, and isConnected[i][j] = 0 otherwise.\n\nReturn the total number of provinces.\n\nExample 1:\n\nInput: isConnected = [[1,1,0],[1,1,0],[0,0,1]]\nOutput: 2\n\nExample 2:\n\nInput: isConnected = [[1,0,0],[0,1,0],[0,0,1]]\nOutput: 3\n\nConstraints:\n\n- 1 <= n <= 200\n- n == isConnected.length\n- n == isConnected[i].length\n- isConnected[i][j] is 1 or 0.\n- isConnected[i][i] == 1\n- isConnected[i][j] == isConnected[j][i]\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(isConnected = [[1, 0, 0, 1], [0, 1, 1, 0], [0, 1, 1, 1], [1, 0, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) == 4\n assert candidate(isConnected = [[1, 1, 1], [1, 1, 1], [1, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 1, 0], [0, 1, 0, 0], [1, 0, 1, 0], [0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0], [1, 0, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 1, 0, 0], [0, 1, 1, 0, 0], [1, 1, 1, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 1, 0, 0, 0], [1, 1, 0, 1, 0, 0], [1, 0, 1, 1, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 1, 0, 0], [1, 1, 0, 0, 0], [1, 0, 1, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1]]) == 3\n assert candidate(isConnected = [[1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0], [0, 1, 0, 1, 1, 0, 0], [1, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0], [1, 1, 0, 1, 0, 0], [0, 0, 1, 1, 1, 0], [0, 1, 1, 1, 1, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 1, 0], [0, 1, 1, 0, 1], [0, 1, 1, 0, 0], [1, 0, 0, 1, 0], [0, 1, 0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1]]) == 4\n assert candidate(isConnected = [[1, 0, 0, 0, 0], [0, 1, 0, 1, 1], [0, 0, 1, 0, 0], [0, 1, 0, 1, 0], [0, 1, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]]) == 5\n assert candidate(isConnected = [[1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 1, 0], [0, 0, 1, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1], [1, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 1], [1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0], [0, 0, 1, 0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1]]) == 4\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 0, 0, 0, 0, 0, 0], [1, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0, 0, 0], [1, 0, 0, 0, 1, 0, 0, 0], [1, 0, 0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 0, 1]]) == 1\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 1], [0, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 0, 0], [1, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 1, 1, 0], [0, 0, 0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1]]) == 4\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1]]) == 6\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1]]) == 3\n assert candidate(isConnected = [[1, 0, 0, 1, 0, 0], [0, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [1, 0, 0, 1, 1, 0], [0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 0, 0], [1, 1, 1, 0, 0], [0, 1, 1, 1, 0], [0, 0, 1, 1, 1], [0, 0, 0, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0], [0, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1]]) == 4\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1]]) == 4\n assert candidate(isConnected = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 1, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 0, 0], [1, 1, 1, 0, 0], [0, 1, 1, 0, 0], [0, 0, 0, 1, 1], [0, 0, 0, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0], [0, 1, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1, 0, 1], [0, 0, 0, 0, 1, 0, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 1, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 0, 1, 0, 0, 0], [1, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 1, 0], [1, 1, 0, 0, 1], [0, 0, 1, 1, 0], [1, 0, 1, 1, 0], [0, 1, 0, 0, 1]]) == 1\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 1], [1, 1, 0, 0], [0, 0, 1, 1], [1, 0, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 1, 1, 0, 0], [1, 1, 0, 0, 0], [1, 0, 1, 1, 0], [0, 0, 1, 1, 0], [0, 0, 0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 1, 1, 0, 0], [1, 1, 0, 1, 0], [1, 0, 1, 0, 0], [0, 1, 0, 1, 1], [0, 0, 0, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 1, 0, 0, 1], [1, 1, 0, 0, 0], [0, 0, 1, 1, 0], [0, 0, 1, 1, 0], [1, 0, 0, 0, 1]]) == 2\n assert candidate(isConnected = [[1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 1, 0, 0], [0, 0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 0, 1, 1], [0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0], [0, 0, 1, 1, 1, 0], [0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1]]) == 3\n assert candidate(isConnected = [[1, 1, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0], [0, 1, 1, 1, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 1, 1, 1, 0], [0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1]]) == 1\n assert candidate(isConnected = [[1, 1, 0, 0, 1, 0, 0], [1, 1, 0, 0, 1, 0, 0], [0, 0, 1, 1, 0, 1, 0], [0, 0, 1, 1, 0, 1, 0], [1, 1, 0, 0, 1, 0, 0], [0, 0, 1, 1, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1]]) == 3\n", "comparison": "exact"}, "public_tests": ["[[1,1,0],[1,1,0],[0,0,1]]", "[[1,0,0],[0,1,0],[0,0,1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["isConnected"], "leetcode_dataset_entry_point": "Solution().findCircleNum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:52:54+00:00", "tests_total": 57, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["depth-first-search", "breadth-first-search", "union-find", "graph"]}, "language": "ruby", "interface": {"raw_signature": "def find_circle_num(is_connected)", "container": null, "callable": "find_circle_num", "parameters": [{"name": "is_connected", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 551, "task_id": "student-attendance-record-i", "difficulty": "Easy", "problem_description": "You are given a string s representing an attendance record for a student where each character signifies whether the student was absent, late, or present on that day. The record only contains the following three characters:\n\n- 'A': Absent.\n- 'L': Late.\n- 'P': Present.\n\nThe student is eligible for an attendance award if they meet both of the following criteria:\n\n- The student was absent ('A') for strictly fewer than 2 days total.\n- The student was never late ('L') for 3 or more consecutive days.\n\nReturn true if the student is eligible for an attendance award, or false otherwise.\n\nExample 1:\n\nInput: s = \"PPALLP\"\nOutput: true\nExplanation: The student has fewer than 2 absences and was never late 3 or more consecutive days.\n\nExample 2:\n\nInput: s = \"PPALLL\"\nOutput: false\nExplanation: The student was late 3 consecutive days in the last 3 days, so is not eligible for the award.\n\nConstraints:\n\n- 1 <= s.length <= 1000\n- s[i] is either 'A', 'L', or 'P'.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"AALL\") == False\n assert candidate(s = \"LLA\") == True\n assert candidate(s = \"PPALLPLL\") == True\n assert candidate(s = \"PLPLPL\") == True\n assert candidate(s = \"PA\") == True\n assert candidate(s = \"LLLLL\") == False\n assert candidate(s = \"LPPALLP\") == True\n assert candidate(s = \"PPALLP\") == True\n assert candidate(s = \"PPALLL\") == False\n assert candidate(s = \"ALPALP\") == False\n assert candidate(s = \"LLLP\") == False\n assert candidate(s = \"ALP\") == True\n assert candidate(s = \"AA\") == False\n assert candidate(s = \"PLLPLL\") == True\n assert candidate(s = \"PPPLLL\") == False\n assert candidate(s = \"LLL\") == False\n assert candidate(s = \"ALLL\") == False\n assert candidate(s = \"AAA\") == False\n assert candidate(s = \"A\") == True\n assert candidate(s = \"PPPPPPP\") == True\n assert candidate(s = \"LL\") == True\n assert candidate(s = \"ALPLL\") == True\n assert candidate(s = \"PPPPPP\") == True\n assert candidate(s = \"AALLPPP\") == False\n assert candidate(s = \"AALPLL\") == False\n assert candidate(s = \"PL\") == True\n assert candidate(s = \"PLLPLP\") == True\n assert candidate(s = \"PPALLAP\") == False\n assert candidate(s = \"ALLAPL\") == False\n assert candidate(s = \"PPALLAPA\") == False\n assert candidate(s = \"PPA\") == True\n assert candidate(s = \"AAAA\") == False\n assert candidate(s = \"AP\") == True\n assert candidate(s = \"APLLAA\") == False\n assert candidate(s = \"L\") == True\n assert candidate(s = \"PPLLP\") == True\n assert candidate(s = \"PPAALP\") == False\n assert candidate(s = \"P\") == True\n assert candidate(s = \"PPPP\") == True\n assert candidate(s = \"APLPALPPAL\") == False\n assert candidate(s = \"PPALLAPLPP\") == False\n assert candidate(s = \"AAPAAPA\") == False\n assert candidate(s = \"PPPPLLLPPP\") == False\n assert candidate(s = \"APLLPPPPPPPLL\") == True\n assert candidate(s = \"ALLPPAAPLPLP\") == False\n assert candidate(s = \"PLLLPLPLLPLLPPP\") == False\n assert candidate(s = \"APLPLPALPLPALPPPP\") == False\n assert candidate(s = \"AALLPPAPLALLPP\") == False\n assert candidate(s = \"APLLLLP\") == False\n assert candidate(s = \"APLPLPALPLPALPP\") == False\n assert candidate(s = \"LLLLPPPAPPLPPP\") == False\n assert candidate(s = \"ALALALAL\") == False\n assert candidate(s = \"APALLPAPL\") == False\n assert candidate(s = \"PPPPPPPPPPPP\") == True\n assert candidate(s = \"AAPALLPPALL\") == False\n assert candidate(s = \"PPPLLLLPP\") == False\n assert candidate(s = \"ALPPALP\") == False\n assert candidate(s = \"PPLPPPLLPPA\") == True\n assert candidate(s = \"PLLPLLPLLPLLPLLPLLPLL\") == True\n assert candidate(s = \"ALPLLPLLPLLPLLPLLPLLPLLPLL\") == True\n assert candidate(s = \"LPLPLPLPLPLPLP\") == True\n assert candidate(s = \"PPLPPPLPPLLPPP\") == True\n assert candidate(s = \"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLP\") == False\n assert candidate(s = \"AALPLPLLPLL\") == False\n assert candidate(s = \"PLPPPLPPPL\") == True\n assert candidate(s = \"PPLPPLPLL\") == True\n assert candidate(s = \"PPPPPPLPPPP\") == True\n assert candidate(s = \"PPALLPALPPALLP\") == False\n assert candidate(s = \"LPLLPLLPLLPLLPLLPLLPLLPLL\") == True\n assert candidate(s = \"PPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPPLPPP\") == True\n assert candidate(s = \"PLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLLPLP\") == True\n assert candidate(s = \"PPALPPALPP\") == False\n assert candidate(s = \"PLPLPLPLPLPL\") == True\n assert candidate(s = \"PLAPLLPLPAL\") == False\n assert candidate(s = \"LLPALPALPALP\") == False\n assert candidate(s = \"LLLLLPLPPPPP\") == False\n assert candidate(s = \"AAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPAPA\") == False\n assert candidate(s = \"APLALPALPALP\") == False\n assert candidate(s = \"PLLPPLPLLPLLPPP\") == True\n assert candidate(s = \"ALLPPAPL\") == False\n assert candidate(s = \"PPLPPPLPPLLPPPPP\") == True\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\") == True\n assert candidate(s = \"APLPLPLLAPA\") == False\n assert candidate(s = \"PLLPLLPLLPLL\") == True\n assert candidate(s = \"AAPLAPPLAPLPPP\") == False\n assert candidate(s = \"PLPLPLPLPLLPPPLP\") == True\n assert candidate(s = \"LPLLPLLPLL\") == True\n assert candidate(s = \"PPPPPPPPLLLPPPPP\") == False\n assert candidate(s = \"APALPPALPPAL\") == False\n assert candidate(s = \"PLLAPLLP\") == True\n assert candidate(s = \"ALALALALALALAL\") == False\n assert candidate(s = \"ALALALALALAL\") == False\n assert candidate(s = \"APLPLPALPLPA\") == False\n assert candidate(s = \"PLLPPLLPLPLL\") == True\n assert candidate(s = \"LLAALLLLPLLPPP\") == False\n assert candidate(s = \"LLPPPPPPPPPPPPPPPPPPPPPPPPPPPPLLPPPPPP\") == True\n assert candidate(s = \"PPALLPA\") == False\n assert candidate(s = \"PPPPPPPPPPPPLL\") == True\n assert candidate(s = \"PLPLPLPLPLLPPPA\") == True\n assert candidate(s = \"PLLALPPLPLL\") == True\n assert candidate(s = \"APAPAPAPAP\") == False\n assert candidate(s = \"PPALLLPPALLP\") == False\n assert candidate(s = \"LLPLLLP\") == False\n assert candidate(s = \"LLPPPPPPPPPP\") == True\n assert candidate(s = \"PPAPAPAP\") == False\n assert candidate(s = \"PPALLPLPA\") == False\n assert candidate(s = \"PLPLPLPLPL\") == True\n assert candidate(s = \"PPALLPLLALLPP\") == False\n assert candidate(s = \"PPLPPPPPLP\") == True\n assert candidate(s = \"AAPPPPPPPPPPPPPPPPPPPPPPPPPPPPPLLPPPPPP\") == False\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPP\") == True\n assert candidate(s = \"PLPLLPLLPLLAP\") == True\n assert candidate(s = \"AAAAAAAA\") == False\n assert candidate(s = \"LLAALLAALLAALLAALLAALLAALLAALLAALLAALLAALLAALLAALLAALLAALL\") == False\n assert candidate(s = \"PALPALPALP\") == False\n assert candidate(s = \"ALLPLALPA\") == False\n assert candidate(s = \"PPPPPLPPPPLL\") == True\n assert candidate(s = \"PAPAPAPAPA\") == False\n assert candidate(s = \"PPPLAPLLPA\") == False\n assert candidate(s = \"PLPPPPLPPPLPPP\") == True\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPLLL\") == False\n assert candidate(s = \"PALLPLLP\") == True\n assert candidate(s = \"LLPPLLPLP\") == True\n assert candidate(s = \"LLPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\") == True\n assert candidate(s = \"PPALLPLLPLPPP\") == True\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPAL\") == True\n assert candidate(s = \"PLALLAPLLP\") == False\n assert candidate(s = \"LLAAPLLAALLP\") == False\n assert candidate(s = \"ALPLPALPALLP\") == False\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPPPPPPPP\") == True\n assert candidate(s = \"PPALPLPLPLPA\") == False\n assert candidate(s = \"PLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLL\") == True\n assert candidate(s = \"PPPLLPPPLLPPPLL\") == True\n assert candidate(s = \"AAAAAAAAAAPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\") == False\n assert candidate(s = \"AAAAA\") == False\n assert candidate(s = \"PPPLAALLPPPL\") == False\n assert candidate(s = \"LPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLLPLP\") == True\n assert candidate(s = \"PALPALPALPAL\") == False\n assert candidate(s = \"PAALPAALPPA\") == False\n assert candidate(s = \"ALALALALAL\") == False\n assert candidate(s = \"LLALALALALL\") == False\n assert candidate(s = \"PLLPPPLLPPPPPPLL\") == True\n assert candidate(s = \"LLLL\") == False\n assert candidate(s = \"PLPLLPLLPLLPLLPLLPL\") == True\n assert candidate(s = \"PPPPPLPPPPLP\") == True\n assert candidate(s = \"LLLPLLPPP\") == False\n assert candidate(s = \"PLLPLLPLL\") == True\n assert candidate(s = \"PPALLPLLPA\") == False\n assert candidate(s = \"PPPPPPPPPPPPPPLL\") == True\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPLL\") == True\n assert candidate(s = \"PLPPPPLPPPPPP\") == True\n assert candidate(s = \"AAPAAPAAPAAPAP\") == False\n assert candidate(s = \"APAPAPAPAPAP\") == False\n assert candidate(s = \"AAPPLL\") == False\n assert candidate(s = \"PPAALLL\") == False\n assert candidate(s = \"PPAPLPLAPL\") == False\n assert candidate(s = \"LLLLPPLP\") == False\n assert candidate(s = \"PPALLPLLAP\") == False\n assert candidate(s = \"PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP\") == True\n assert candidate(s = \"PPPLLLPPPLLPP\") == False\n assert candidate(s = \"ALLPPLLAPL\") == False\n assert candidate(s = \"PPALLPLLALLL\") == False\n assert candidate(s = \"PLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLPLP\") == True\n assert candidate(s = \"PPPPPPPPPPLL\") == True\n assert candidate(s = \"PPLPALPALPAL\") == False\n assert candidate(s = \"PPALLLL\") == False\n assert candidate(s = \"LLPLLLPLL\") == False\n assert candidate(s = \"PPAALPPALLP\") == False\n assert candidate(s = \"PLAPLLPLPAPL\") == False\n assert candidate(s = \"LLPPLLPLPLLPLL\") == True\n assert candidate(s = \"PLLAPPPALPLL\") == False\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALLL\") == False\n assert candidate(s = \"PAPAPAPAPAPAPAPAPAPA\") == False\n assert candidate(s = \"LLPPALLPLL\") == True\n assert candidate(s = \"LLLLPPL\") == False\n assert candidate(s = \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\") == False\n assert candidate(s = \"PPPLPPPPLLPPPLL\") == True\n assert candidate(s = \"PPALLALPLAL\") == False\n assert candidate(s = \"PPALLPLLALLP\") == False\n assert candidate(s = \"LLPPLLPLL\") == True\n assert candidate(s = \"LLPLLPALL\") == True\n", "comparison": "exact"}, "public_tests": ["\"PPALLP\"", "\"PPALLL\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().checkRecord", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:01+00:00", "tests_total": 181, "tests_dropped": 0, "flags": [], "topic_tags": ["string"]}, "language": "ruby", "interface": {"raw_signature": "def check_record(s)", "container": null, "callable": "check_record", "parameters": [{"name": "s", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 552, "task_id": "student-attendance-record-ii", "difficulty": "Hard", "problem_description": "An attendance record for a student can be represented as a string where each character signifies whether the student was absent, late, or present on that day. The record only contains the following three characters:\n\n- 'A': Absent.\n- 'L': Late.\n- 'P': Present.\n\nAny student is eligible for an attendance award if they meet both of the following criteria:\n\n- The student was absent ('A') for strictly fewer than 2 days total.\n- The student was never late ('L') for 3 or more consecutive days.\n\nGiven an integer n, return the number of possible attendance records of length n that make a student eligible for an attendance award. The answer may be very large, so return it modulo 10^9 + 7.\n\nExample 1:\n\nInput: n = 2\nOutput: 8\nExplanation: There are 8 records with length 2 that are eligible for an award:\n\"PP\", \"AP\", \"PA\", \"LP\", \"PL\", \"AL\", \"LA\", \"LL\"\nOnly \"AA\" is not eligible because there are 2 absences (there need to be fewer than 2).\n\nExample 2:\n\nInput: n = 1\nOutput: 3\n\nExample 3:\n\nInput: n = 10101\nOutput: 183236316\n\nConstraints:\n\n- 1 <= n <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 3) == 19\n assert candidate(n = 100) == 985598218\n assert candidate(n = 2) == 8\n assert candidate(n = 1) == 3\n assert candidate(n = 10) == 3536\n assert candidate(n = 5) == 94\n assert candidate(n = 50) == 100469819\n assert candidate(n = 300) == 921822362\n assert candidate(n = 4) == 43\n assert candidate(n = 20) == 2947811\n assert candidate(n = 200) == 110821862\n", "comparison": "exact"}, "public_tests": ["2", "1", "10101"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().checkRecord", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:03+00:00", "tests_total": 11, "tests_dropped": 0, "flags": [], "topic_tags": ["dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def check_record(n)", "container": null, "callable": "check_record", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 553, "task_id": "optimal-division", "difficulty": "Medium", "problem_description": "You are given an integer array nums. The adjacent integers in nums will perform the float division.\n\n- For example, for nums = [2,3,4], we will evaluate the expression \"2/3/4\".\n\nHowever, you can add any number of parenthesis at any position to change the priority of operations. You want to add these parentheses such the value of the expression after the evaluation is maximum.\n\nReturn the corresponding expression that has the maximum value in string format.\n\nNote: your expression should not contain redundant parenthesis.\n\nExample 1:\n\nInput: nums = [1000,100,10,2]\nOutput: \"1000/(100/10/2)\"\nExplanation: 1000/(100/10/2) = 1000/((100/10)/2) = 200\nHowever, the bold parenthesis in \"1000/((100/10)/2)\" are redundant since they do not influence the operation priority.\nSo you should return \"1000/(100/10/2)\".\nOther cases:\n1000/(100/10)/2 = 50\n1000/(100/(10/2)) = 50\n1000/100/10/2 = 0.5\n1000/100/(10/2) = 2\n\nExample 2:\n\nInput: nums = [2,3,4]\nOutput: \"2/(3/4)\"\nExplanation: (2/(3/4)) = 8/3 = 2.667\nIt can be shown that after trying all possibilities, we cannot get an expression with evaluation greater than 2.667\n\nConstraints:\n\n- 1 <= nums.length <= 10\n- 2 <= nums[i] <= 1000\n- There is only one optimal division for the given input.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [10, 20, 30]) == \"10/(20/30)\"\n assert candidate(nums = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == \"2/(2/2/2/2/2/2/2/2/2)\"\n assert candidate(nums = [3, 100, 100, 100, 100, 100, 100, 100, 100, 100]) == \"3/(100/100/100/100/100/100/100/100/100)\"\n assert candidate(nums = [2, 3, 5, 7, 11]) == \"2/(3/5/7/11)\"\n assert candidate(nums = [3, 2]) == \"3/2\"\n assert candidate(nums = [10]) == \"10\"\n assert candidate(nums = [9, 8, 7, 6, 5]) == \"9/(8/7/6/5)\"\n assert candidate(nums = [2, 3]) == \"2/3\"\n assert candidate(nums = [5, 6, 7]) == \"5/(6/7)\"\n assert candidate(nums = [5, 5, 5, 5]) == \"5/(5/5/5)\"\n assert candidate(nums = [5, 6, 7, 8]) == \"5/(6/7/8)\"\n assert candidate(nums = [10, 2]) == \"10/2\"\n assert candidate(nums = [3, 4, 5, 6, 7, 8, 9, 10]) == \"3/(4/5/6/7/8/9/10)\"\n assert candidate(nums = [2, 3, 4]) == \"2/(3/4)\"\n assert candidate(nums = [20, 10, 5, 2]) == \"20/(10/5/2)\"\n assert candidate(nums = [100, 50, 25, 10]) == \"100/(50/25/10)\"\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2]) == \"10/(9/8/7/6/5/4/3/2)\"\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == \"100/(200/300/400/500/600/700/800/900/1000)\"\n assert candidate(nums = [10, 5]) == \"10/5\"\n assert candidate(nums = [1000, 100, 10, 2]) == \"1000/(100/10/2)\"\n assert candidate(nums = [10, 20, 30, 40]) == \"10/(20/30/40)\"\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40]) == \"100/(90/80/70/60/50/40)\"\n assert candidate(nums = [101, 202, 303, 404, 505]) == \"101/(202/303/404/505)\"\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == \"100/(200/300/400/500/600/700/800/900/1000)\"\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == \"3/(3/3/3/3/3/3/3/3/3)\"\n assert candidate(nums = [10, 5, 2, 6, 3]) == \"10/(5/2/6/3)\"\n assert candidate(nums = [10, 20, 30, 40, 50, 60]) == \"10/(20/30/40/50/60)\"\n assert candidate(nums = [8, 16, 32, 64, 128, 256]) == \"8/(16/32/64/128/256)\"\n assert candidate(nums = [3, 1000, 2, 5, 10]) == \"3/(1000/2/5/10)\"\n assert candidate(nums = [99, 98, 97, 96, 95, 94, 93, 92, 91, 90]) == \"99/(98/97/96/95/94/93/92/91/90)\"\n assert candidate(nums = [25, 50, 75, 100, 125]) == \"25/(50/75/100/125)\"\n assert candidate(nums = [11, 22, 33, 44, 55, 66, 77, 88, 99]) == \"11/(22/33/44/55/66/77/88/99)\"\n assert candidate(nums = [12, 15, 18, 21, 24, 27, 30]) == \"12/(15/18/21/24/27/30)\"\n assert candidate(nums = [5, 9, 12, 18, 24, 30, 36]) == \"5/(9/12/18/24/30/36)\"\n assert candidate(nums = [1000, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == \"1000/(2/3/4/5/6/7/8/9/10)\"\n assert candidate(nums = [1000, 500, 250, 125, 62, 31]) == \"1000/(500/250/125/62/31)\"\n assert candidate(nums = [2, 5, 10, 20, 50, 100]) == \"2/(5/10/20/50/100)\"\n assert candidate(nums = [500, 250, 125, 62, 31, 15, 7]) == \"500/(250/125/62/31/15/7)\"\n assert candidate(nums = [7, 11, 13, 17, 19, 23, 29, 31, 37, 41]) == \"7/(11/13/17/19/23/29/31/37/41)\"\n assert candidate(nums = [11, 13, 17, 19, 23, 29]) == \"11/(13/17/19/23/29)\"\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49]) == \"7/(14/21/28/35/42/49)\"\n assert candidate(nums = [5, 10, 15, 20, 25]) == \"5/(10/15/20/25)\"\n assert candidate(nums = [999, 998, 997, 996, 995]) == \"999/(998/997/996/995)\"\n assert candidate(nums = [15, 25, 35, 45, 55, 65, 75, 85, 95]) == \"15/(25/35/45/55/65/75/85/95)\"\n assert candidate(nums = [10, 5, 2, 8, 3, 7, 4, 6]) == \"10/(5/2/8/3/7/4/6)\"\n assert candidate(nums = [8, 16, 24, 32, 40, 48, 56, 64, 72, 80]) == \"8/(16/24/32/40/48/56/64/72/80)\"\n assert candidate(nums = [12, 15, 20, 25, 30, 35, 40, 45, 50, 55]) == \"12/(15/20/25/30/35/40/45/50/55)\"\n assert candidate(nums = [7, 11, 13, 17, 19, 23, 29, 31]) == \"7/(11/13/17/19/23/29/31)\"\n assert candidate(nums = [8, 6, 4, 2]) == \"8/(6/4/2)\"\n assert candidate(nums = [15, 10, 20, 30, 40, 50]) == \"15/(10/20/30/40/50)\"\n assert candidate(nums = [150, 200, 250, 300, 350, 400, 450]) == \"150/(200/250/300/350/400/450)\"\n assert candidate(nums = [42, 84, 126, 168, 210, 252, 294, 336]) == \"42/(84/126/168/210/252/294/336)\"\n assert candidate(nums = [3, 12, 3, 12, 3, 12]) == \"3/(12/3/12/3/12)\"\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900]) == \"100/(200/300/400/500/600/700/800/900)\"\n assert candidate(nums = [6, 12, 18, 24, 30, 36, 42, 48, 54, 60]) == \"6/(12/18/24/30/36/42/48/54/60)\"\n assert candidate(nums = [10, 20, 30, 40, 50, 60]) == \"10/(20/30/40/50/60)\"\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800]) == \"100/(200/300/400/500/600/700/800)\"\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == \"100/(90/80/70/60/50/40/30/20/10)\"\n assert candidate(nums = [3, 6, 9, 12, 15, 18, 21, 24, 27]) == \"3/(6/9/12/15/18/21/24/27)\"\n assert candidate(nums = [5, 8, 12, 15, 20]) == \"5/(8/12/15/20)\"\n assert candidate(nums = [12, 14, 16, 18, 20, 22, 24, 26, 28]) == \"12/(14/16/18/20/22/24/26/28)\"\n assert candidate(nums = [2, 2, 4, 8, 16, 32, 64, 128, 256, 512]) == \"2/(2/4/8/16/32/64/128/256/512)\"\n assert candidate(nums = [10, 5, 2, 8, 6, 3, 4, 7]) == \"10/(5/2/8/6/3/4/7)\"\n assert candidate(nums = [25, 30, 35, 40, 45, 50, 55, 60, 65, 70]) == \"25/(30/35/40/45/50/55/60/65/70)\"\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == \"10/(20/30/40/50/60/70/80/90/100)\"\n assert candidate(nums = [2, 5, 3, 4, 6, 7, 8, 9, 10]) == \"2/(5/3/4/6/7/8/9/10)\"\n assert candidate(nums = [5, 10, 15, 20, 25, 30]) == \"5/(10/15/20/25/30)\"\n assert candidate(nums = [3, 5, 8, 2, 6, 4]) == \"3/(5/8/2/6/4)\"\n assert candidate(nums = [8, 12, 4, 7, 9, 2]) == \"8/(12/4/7/9/2)\"\n assert candidate(nums = [33, 66, 99, 132, 165, 198]) == \"33/(66/99/132/165/198)\"\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == \"2/(3/5/7/11/13/17/19/23/29)\"\n assert candidate(nums = [3, 5, 7, 11, 13, 17, 19, 23, 29]) == \"3/(5/7/11/13/17/19/23/29)\"\n assert candidate(nums = [3, 9, 3, 9, 3, 9, 3]) == \"3/(9/3/9/3/9/3)\"\n assert candidate(nums = [500, 250, 125, 62, 31]) == \"500/(250/125/62/31)\"\n assert candidate(nums = [100, 50, 20, 10, 5]) == \"100/(50/20/10/5)\"\n assert candidate(nums = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55]) == \"10/(15/20/25/30/35/40/45/50/55)\"\n assert candidate(nums = [97, 89, 83, 79, 73, 71, 67, 61, 59, 53]) == \"97/(89/83/79/73/71/67/61/59/53)\"\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23]) == \"2/(3/5/7/11/13/17/19/23)\"\n assert candidate(nums = [12, 14, 16, 18, 20, 22]) == \"12/(14/16/18/20/22)\"\n assert candidate(nums = [9, 18, 27, 36, 45, 54, 63, 72, 81, 90]) == \"9/(18/27/36/45/54/63/72/81/90)\"\n assert candidate(nums = [999, 998, 997, 996, 995, 994, 993, 992, 991, 990]) == \"999/(998/997/996/995/994/993/992/991/990)\"\n assert candidate(nums = [2, 5, 7, 11, 13, 17, 19]) == \"2/(5/7/11/13/17/19)\"\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2]) == \"9/(8/7/6/5/4/3/2)\"\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == \"10/(20/30/40/50/60/70/80/90/100)\"\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]) == \"2/(4/6/8/10/12/14/16/18/20)\"\n assert candidate(nums = [3, 5, 7, 9, 11, 13, 15, 17]) == \"3/(5/7/9/11/13/15/17)\"\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45]) == \"5/(10/15/20/25/30/35/40/45)\"\n assert candidate(nums = [3, 13, 5, 4, 17, 6, 7, 8]) == \"3/(13/5/4/17/6/7/8)\"\n assert candidate(nums = [3, 11, 19, 27, 35, 43, 51, 59, 67, 75]) == \"3/(11/19/27/35/43/51/59/67/75)\"\n assert candidate(nums = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29]) == \"2/(3/5/7/11/13/17/19/23/29)\"\n assert candidate(nums = [500, 3, 2, 4, 10, 8, 6, 7]) == \"500/(3/2/4/10/8/6/7)\"\n assert candidate(nums = [3, 5, 9, 12, 15, 18]) == \"3/(5/9/12/15/18)\"\n assert candidate(nums = [18, 6, 3, 2]) == \"18/(6/3/2)\"\n assert candidate(nums = [7, 5, 3, 2]) == \"7/(5/3/2)\"\n assert candidate(nums = [7, 14, 21, 28, 35, 42, 49, 56, 63]) == \"7/(14/21/28/35/42/49/56/63)\"\n", "comparison": "exact"}, "public_tests": ["[1000,100,10,2]", "[2,3,4]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().optimalDivision", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:06+00:00", "tests_total": 114, "tests_dropped": 19, "flags": [], "topic_tags": ["array", "math", "dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def optimal_division(nums)", "container": null, "callable": "optimal_division", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 554, "task_id": "brick-wall", "difficulty": "Medium", "problem_description": "There is a rectangular brick wall in front of you with n rows of bricks. The i^th row has some number of bricks each of the same height (i.e., one unit) but they can be of different widths. The total width of each row is the same.\n\nDraw a vertical line from the top to the bottom and cross the least bricks. If your line goes through the edge of a brick, then the brick is not considered as crossed. You cannot draw a line just along one of the two vertical edges of the wall, in which case the line will obviously cross no bricks.\n\nGiven the 2D array wall that contains the information about the wall, return the minimum number of crossed bricks after drawing such a vertical line.\n\nExample 1:\n\nInput: wall = [[1,2,2,1],[3,1,2],[1,3,2],[2,4],[3,1,2],[1,3,1,1]]\nOutput: 2\n\nExample 2:\n\nInput: wall = [[1],[1],[1]]\nOutput: 3\n\nConstraints:\n\n- n == wall.length\n- 1 <= n <= 10^4\n- 1 <= wall[i].length <= 10^4\n- 1 <= sum(wall[i].length) <= 2 * 10^4\n- sum(wall[i]) is the same for each row i.\n- 1 <= wall[i][j] <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(wall = [[2], [2, 2], [2, 2, 2]]) == 1\n assert candidate(wall = [[2, 2, 2, 2], [2, 2, 2, 2], [2, 2, 2, 2]]) == 0\n assert candidate(wall = [[7], [8, 5, 7], [9, 1, 7, 5], [9, 3], [1, 5, 4], [2, 8, 2, 2], [1, 9, 1, 1, 1], [3, 5, 1, 2], [3, 1, 2, 1, 5], [3, 2, 5, 1]]) == 6\n assert candidate(wall = [[3, 5, 1, 1], [2, 3, 1, 4], [3, 1, 2, 1], [1, 3, 3, 1], [2, 4, 1, 1], [3, 1, 3, 1], [1, 2, 3, 4], [1, 1, 2, 4], [1, 1, 1, 6]]) == 4\n assert candidate(wall = [[1], [1], [1]]) == 3\n assert candidate(wall = [[1, 2, 2, 1], [3, 1, 2], [1, 3, 2], [2, 4], [3, 1, 2], [1, 3, 1, 1]]) == 2\n assert candidate(wall = [[3], [3], [3]]) == 3\n assert candidate(wall = [[1, 2, 3], [3, 2, 1], [1, 1, 2, 1]]) == 1\n assert candidate(wall = [[7], [7], [7], [7]]) == 4\n assert candidate(wall = [[1, 2, 2], [2, 2, 1], [2, 1, 2]]) == 1\n assert candidate(wall = [[2, 1, 2], [1, 2, 2], [2, 2, 1]]) == 1\n assert candidate(wall = [[2, 1, 1], [1, 2, 1], [1, 1, 2]]) == 1\n assert candidate(wall = [[1, 2], [2, 1], [3]]) == 2\n assert candidate(wall = [[10, 20, 30], [10, 30, 20], [20, 10, 30], [20, 30, 10], [30, 10, 20]]) == 2\n assert candidate(wall = [[1, 1, 1, 1, 1, 1], [1, 2, 1, 1, 1], [1, 1, 2, 1, 1], [1, 1, 1, 2, 1], [1, 1, 1, 1, 2]]) == 0\n assert candidate(wall = [[10, 20], [20, 10], [10, 20], [20, 10], [10, 20], [20, 10]]) == 3\n assert candidate(wall = [[5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5], [5, 5, 5, 5, 5]]) == 0\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [4, 4, 4, 4, 4, 4], [8, 8, 8, 8], [16, 16], [32]]) == 1\n assert candidate(wall = [[7, 1, 2], [1, 2, 7], [2, 7, 1], [1, 7, 2], [7, 2, 1], [2, 1, 7]]) == 4\n assert candidate(wall = [[50, 50, 50, 50], [50, 100, 100], [100, 50, 100], [100, 100, 50], [50, 100, 50, 50], [50, 50, 50, 50, 50, 50, 50, 50, 50, 50]]) == 1\n assert candidate(wall = [[2, 2, 2, 2, 2, 2, 2], [2, 4, 4, 2], [4, 2, 4, 2], [2, 4, 2, 4], [2, 2, 2, 2, 2, 2, 2]]) == 0\n assert candidate(wall = [[1, 2, 3], [4, 5], [6, 7], [1, 2, 3], [4, 5], [6, 7]]) == 4\n assert candidate(wall = [[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 4], [5]]) == 1\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(wall = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 39], [39, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 2\n assert candidate(wall = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == 0\n assert candidate(wall = [[5, 3, 2, 1, 1], [1, 1, 5, 3, 2], [2, 1, 1, 5, 3], [3, 2, 1, 1, 5], [5, 1, 2, 1, 3]]) == 2\n assert candidate(wall = [[100], [25, 25, 25, 25], [100], [50, 50], [100], [25, 75], [75, 25]]) == 5\n assert candidate(wall = [[3, 1, 1, 1], [1, 3, 1, 1], [1, 1, 3, 1], [1, 1, 1, 3], [3, 1, 1, 1], [1, 3, 1, 1]]) == 1\n assert candidate(wall = [[1, 2, 3, 4, 5, 6, 7, 8, 9], [9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 9, 8, 7, 6, 5, 4, 3, 2], [2, 1, 9, 8, 7, 6, 5, 4, 3], [3, 2, 1, 9, 8, 7, 6, 5, 4], [4, 3, 2, 1, 9, 8, 7, 6, 5], [5, 4, 3, 2, 1, 9, 8, 7, 6], [6, 5, 4, 3, 2, 1, 9, 8, 7], [7, 6, 5, 4, 3, 2, 1, 9, 8], [8, 7, 6, 5, 4, 3, 2, 1, 9]]) == 5\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(wall = [[10, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 10], [10, 10], [10, 10], [10, 10], [10, 10], [10, 10], [10, 10], [10, 10]]) == 0\n assert candidate(wall = [[100], [100], [100], [100], [100]]) == 5\n assert candidate(wall = [[1, 2, 3, 4, 5], [2, 3, 4, 5, 1], [3, 4, 5, 1, 2], [4, 5, 1, 2, 3], [5, 1, 2, 3, 4]]) == 3\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1, 1], [1, 2, 1, 1, 1, 1, 1], [1, 1, 2, 1, 1, 1, 1], [1, 1, 1, 2, 1, 1, 1], [1, 1, 1, 1, 2, 1, 1], [1, 1, 1, 1, 1, 2, 1], [1, 1, 1, 1, 1, 1, 2]]) == 1\n assert candidate(wall = [[2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2], [2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 2, 2, 2, 2, 2]]) == 0\n assert candidate(wall = [[5, 1, 2], [1, 1, 1, 1, 1, 2, 2], [3, 3, 1], [2, 2, 1, 1, 1, 1], [2, 3, 1, 1, 1], [1, 2, 2, 2, 2, 2, 1]]) == 1\n assert candidate(wall = [[3, 2, 1, 2, 3], [1, 1, 3, 2, 3], [2, 3, 1, 3, 1], [1, 2, 3, 2, 1], [3, 1, 2, 1, 2]]) == 1\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1, 1, 1, 1], [3, 1, 1, 1, 1, 1, 1, 1], [4, 1, 1, 1, 1, 1, 1], [5, 1, 1, 1, 1, 1], [6, 1, 1, 1, 1], [7, 1, 1, 1], [8, 1, 1], [9, 1], [10]]) == 1\n assert candidate(wall = [[7, 5], [5, 7], [7, 5], [5, 7], [7, 5], [5, 7]]) == 3\n assert candidate(wall = [[7, 1, 3], [2, 2, 2, 2, 2], [4, 5, 1], [3, 1, 5, 1], [1, 1, 7, 1], [1, 3, 1, 5]]) == 2\n assert candidate(wall = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 3, 5, 7, 9, 2, 4, 6, 8, 10], [10, 8, 6, 4, 2, 9, 7, 5, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 1\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 2, 1, 1], [1, 1, 2, 1, 1, 1, 1, 1, 1], [1, 2, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2, 1, 1, 1, 1], [2, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 2, 1], [1, 1, 1, 2, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 2], [2, 2, 2, 2, 2, 2, 2, 2, 2]]) == 0\n assert candidate(wall = [[10, 10, 10, 10, 10], [10, 10, 10, 20], [10, 20, 10, 10], [20, 10, 10, 10], [10, 10, 20, 10]]) == 1\n assert candidate(wall = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]) == 1\n assert candidate(wall = [[5, 3, 1, 1], [4, 5, 2], [1, 1, 2, 5, 3], [3, 2, 3, 2], [5, 1, 1, 1, 2], [4, 3, 1, 2]]) == 2\n assert candidate(wall = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [1, 3, 2, 4, 5], [5, 2, 4, 3, 1], [1, 4, 5, 2, 3]]) == 2\n assert candidate(wall = [[1, 2, 3, 4], [2, 3, 4, 1], [3, 4, 1, 2], [4, 1, 2, 3]]) == 2\n assert candidate(wall = [[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2], [2, 2, 2], [1, 1, 2, 2, 1], [1, 2, 2, 1, 1], [2, 1, 1, 2, 1]]) == 1\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(wall = [[10], [10], [10], [10], [10], [10]]) == 6\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(wall = [[10, 20, 30], [30, 10, 20], [20, 30, 10], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10]]) == 1\n assert candidate(wall = [[5, 2, 3], [2, 5, 3], [3, 5, 2], [5, 3, 2], [3, 2, 5]]) == 2\n assert candidate(wall = [[1, 2, 3, 4, 5], [5, 4, 3, 2, 1], [2, 3, 4, 5, 1], [1, 5, 4, 3, 2], [3, 1, 2, 5, 4]]) == 2\n assert candidate(wall = [[1000000000], [1000000000], [1000000000]]) == 3\n assert candidate(wall = [[1, 99], [99, 1], [1, 1, 98], [98, 1, 1], [1, 98, 1]]) == 2\n assert candidate(wall = [[2, 3, 2, 3, 2, 3, 2, 3, 2, 3], [3, 2, 3, 2, 3, 2, 3, 2, 3, 2], [2, 2, 3, 3, 2, 2, 3, 3, 2, 2], [3, 3, 2, 2, 3, 3, 2, 2, 3, 3], [2, 3, 3, 2, 3, 3, 2, 3, 3, 2]]) == 0\n assert candidate(wall = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]) == 0\n assert candidate(wall = [[3, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 3], [1, 1, 3, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 3, 1, 1, 1, 1], [3, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 3, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 3, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 3], [1, 1, 1, 1, 1, 1, 1, 3, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 3]]) == 1\n assert candidate(wall = [[7, 1], [1, 7], [2, 2, 3], [3, 2, 2], [1, 2, 2, 2], [2, 2, 1, 2], [2, 1, 2, 2], [1, 2, 2, 2, 2], [2, 2, 2, 1], [1, 1, 2, 2, 1]]) == 5\n assert candidate(wall = [[10], [10], [10], [10], [10], [10], [10], [10], [10], [10]]) == 10\n", "comparison": "exact"}, "public_tests": ["[[1,2,2,1],[3,1,2],[1,3,2],[2,4],[3,1,2],[1,3,1,1]]", "[[1],[1],[1]]"], "hints": [], "metadata": {"canonical_parameter_names": ["wall"], "leetcode_dataset_entry_point": "Solution().leastBricks", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:08+00:00", "tests_total": 63, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "hash-table"]}, "language": "ruby", "interface": {"raw_signature": "def least_bricks(wall)", "container": null, "callable": "least_bricks", "parameters": [{"name": "wall", "type": "Integer[][]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 556, "task_id": "next-greater-element-iii", "difficulty": "Medium", "problem_description": "Given a positive integer n, find the smallest integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive integer exists, return -1.\n\nNote that the returned integer should fit in 32-bit integer, if there is a valid answer but it does not fit in 32-bit integer, return -1.\n\nExample 1:\n\nInput: n = 12\nOutput: 21\n\nExample 2:\n\nInput: n = 21\nOutput: -1\n\nConstraints:\n\n- 1 <= n <= 2^31 - 1\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = 987654321) == -1\n assert candidate(n = 230241) == 230412\n assert candidate(n = 2147483476) == 2147483647\n assert candidate(n = 12) == 21\n assert candidate(n = 21) == -1\n assert candidate(n = 1234) == 1243\n assert candidate(n = 2147483647) == -1\n assert candidate(n = 2147483486) == -1\n assert candidate(n = 534976) == 536479\n assert candidate(n = 111) == -1\n assert candidate(n = 1999999999) == -1\n assert candidate(n = 1) == -1\n assert candidate(n = 4321) == -1\n assert candidate(n = 1010101010) == 1010101100\n assert candidate(n = 43214321) == 43221134\n assert candidate(n = 567898765) == 567956788\n assert candidate(n = 2147483646) == -1\n assert candidate(n = 999999999) == -1\n assert candidate(n = 321321321) == 321322113\n assert candidate(n = 543212345) == 543212354\n assert candidate(n = 999999998) == -1\n assert candidate(n = 531) == -1\n assert candidate(n = 1098765432) == 1203456789\n assert candidate(n = 2147483645) == -1\n assert candidate(n = 2100000000) == -1\n assert candidate(n = 450210) == 451002\n assert candidate(n = 101010101) == 101010110\n assert candidate(n = 2121212121) == 2121212211\n assert candidate(n = 898989898) == 898989988\n assert candidate(n = 536421) == 541236\n assert candidate(n = 12341234) == 12341243\n assert candidate(n = 12344321) == 12412334\n assert candidate(n = 333333333) == -1\n assert candidate(n = 3214321) == 3221134\n assert candidate(n = 1000000000) == -1\n assert candidate(n = 1099999999) == 1909999999\n assert candidate(n = 111111111) == -1\n assert candidate(n = 1234567890) == 1234567908\n assert candidate(n = 43212341) == 43212413\n assert candidate(n = 499999999) == 949999999\n assert candidate(n = 1121121121) == 1121121211\n assert candidate(n = 1221) == 2112\n assert candidate(n = 123454321) == 123512344\n assert candidate(n = 543210) == -1\n assert candidate(n = 98765) == -1\n assert candidate(n = 123456789) == 123456798\n assert candidate(n = 1112111111) == 1121111111\n assert candidate(n = 1111111111) == -1\n assert candidate(n = 54321) == -1\n assert candidate(n = 450340561) == 450340615\n", "comparison": "exact"}, "public_tests": ["12", "21"], "hints": [], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().nextGreaterElement", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:12+00:00", "tests_total": 80, "tests_dropped": 30, "flags": [], "topic_tags": ["math", "two-pointers", "string"]}, "language": "ruby", "interface": {"raw_signature": "def next_greater_element(n)", "container": null, "callable": "next_greater_element", "parameters": [{"name": "n", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 557, "task_id": "reverse-words-in-a-string-iii", "difficulty": "Easy", "problem_description": "Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.\n\nExample 1:\n\nInput: s = \"Let's take LeetCode contest\"\nOutput: \"s'teL ekat edoCteeL tsetnoc\"\n\nExample 2:\n\nInput: s = \"Mr Ding\"\nOutput: \"rM gniD\"\n\nConstraints:\n\n- 1 <= s.length <= 5 * 10^4\n- s contains printable ASCII characters.\n- s does not contain any leading or trailing spaces.\n- There is at least one word in s.\n- All the words in s are separated by a single space.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s = \"Reverse each word\") == \"esreveR hcae drow\"\n assert candidate(s = \"Python Programming\") == \"nohtyP gnimmargorP\"\n assert candidate(s = \"Python is fun\") == \"nohtyP si nuf\"\n assert candidate(s = \"reverse each word\") == \"esrever hcae drow\"\n assert candidate(s = \"Mr Ding\") == \"rM gniD\"\n assert candidate(s = \"Hello World\") == \"olleH dlroW\"\n assert candidate(s = \"Let's take LeetCode contest\") == \"s'teL ekat edoCteeL tsetnoc\"\n assert candidate(s = \"a b c d e\") == \"a b c d e\"\n assert candidate(s = \"a long sentence with multiple words to reverse each one\") == \"a gnol ecnetnes htiw elpitlum sdrow ot esrever hcae eno\"\n assert candidate(s = \"spaces at the end of the sentence \") == \"secaps ta eht dne fo eht ecnetnes\"\n assert candidate(s = \"longwordswithoutspaces\") == \"secapstuohtiwsdrowgnol\"\n assert candidate(s = \"!@#$%^ &*()\") == \"^%$#@! )(*&\"\n assert candidate(s = \"longwordthatdoesnotcontainanywhitespace\") == \"ecapsetihwynaniatnoctonseodtahtdrowgnol\"\n assert candidate(s = \"Able was I ere I saw Elba\") == \"elbA saw I ere I was ablE\"\n assert candidate(s = \"a quick brown fox jumps over the lazy dog\") == \"a kciuq nworb xof spmuj revo eht yzal god\"\n assert candidate(s = \"Qwen AI assistant\") == \"newQ IA tnatsissa\"\n assert candidate(s = \"multiple spaces between words\") == \"elpitlum secaps neewteb sdrow\"\n assert candidate(s = \"123 abc 456 def 789 ghi\") == \"321 cba 654 fed 987 ihg\"\n assert candidate(s = \"Was it a car or a cat I saw\") == \"saW ti a rac ro a tac I was\"\n assert candidate(s = \"Eva can I see bees in a cave\") == \"avE nac I ees seeb ni a evac\"\n assert candidate(s = \"racecar level kayak deed civic\") == \"racecar level kayak deed civic\"\n assert candidate(s = \"A quick brown fox jumps over the lazy dog\") == \"A kciuq nworb xof spmuj revo eht yzal god\"\n assert candidate(s = \"Do geese see God\") == \"oD eseeg ees doG\"\n assert candidate(s = \"singleword\") == \"drowelgnis\"\n assert candidate(s = \"very long string with multiple words to ensure the solution handles large inputs efficiently\") == \"yrev gnol gnirts htiw elpitlum sdrow ot erusne eht noitulos seldnah egral stupni yltneiciffe\"\n assert candidate(s = \"The quick brown fox jumps over the lazy dog\") == \"ehT kciuq nworb xof spmuj revo eht yzal god\"\n assert candidate(s = \"EdgeCase\") == \"esaCegdE\"\n assert candidate(s = \"!@#$% ^&*()\") == \"%$#@! )(*&^\"\n assert candidate(s = \"A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\") == \"A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\"\n assert candidate(s = \"abcdef ghijklm nopqrst uvwxyz\") == \"fedcba mlkjihg tsrqpon zyxwvu\"\n assert candidate(s = \"123 456 789\") == \"321 654 987\"\n assert candidate(s = \"123abc def456 ghi789\") == \"cba321 654fed 987ihg\"\n assert candidate(s = \"SingleWord\") == \"droWelgniS\"\n assert candidate(s = \"12345 67890 111213\") == \"54321 09876 312111\"\n assert candidate(s = \"12345 67890 09876 54321\") == \"54321 09876 67890 12345\"\n assert candidate(s = \"Debugging is twice as hard as writing the code in the first place\") == \"gniggubeD si eciwt sa drah sa gnitirw eht edoc ni eht tsrif ecalp\"\n assert candidate(s = \"Palindrome level deed civic radar rotor kayak\") == \"emordnilaP level deed civic radar rotor kayak\"\n assert candidate(s = \"Special $characters #are &important\") == \"laicepS sretcarahc$ era# tnatropmi&\"\n assert candidate(s = \"a1 b2 c3 d4 e5 f6 g7 h8 i9 j0\") == \"1a 2b 3c 4d 5e 6f 7g 8h 9i 0j\"\n assert candidate(s = \"Programming challenges are great\") == \"gnimmargorP segnellahc era taerg\"\n assert candidate(s = \"No lemon no melon\") == \"oN nomel on nolem\"\n assert candidate(s = \"Python is fun to learn\") == \"nohtyP si nuf ot nrael\"\n assert candidate(s = \"Desperation is the true mark of weakness\") == \"noitarepseD si eht eurt kram fo ssenkaew\"\n assert candidate(s = \"The quick brown fox\") == \"ehT kciuq nworb xof\"\n assert candidate(s = \"Multiple spaces in between\") == \"elpitluM secaps ni neewteb\"\n assert candidate(s = \"special!@# characters $%^&* should be reversed\") == \"#@!laiceps sretcarahc *&^%$ dluohs eb desrever\"\n assert candidate(s = \"123abc def456 ghi789 jkl012\") == \"cba321 654fed 987ihg 210lkj\"\n assert candidate(s = \"special!@# $%^&*() characters\") == \"#@!laiceps )(*&^%$ sretcarahc\"\n assert candidate(s = \"Very long sentence with multiple words to test the implementation correctly\") == \"yreV gnol ecnetnes htiw elpitlum sdrow ot tset eht noitatnemelpmi yltcerroc\"\n assert candidate(s = \"Mixed CASE with UPPER and lower\") == \"dexiM ESAC htiw REPPU dna rewol\"\n assert candidate(s = \"Reverse each word in this sentence\") == \"esreveR hcae drow ni siht ecnetnes\"\n assert candidate(s = \"Alibaba Cloud Services\") == \"ababilA duolC secivreS\"\n assert candidate(s = \"multiple spaces between words\") == \"elpitlum secaps neewteb sdrow\"\n assert candidate(s = \"Step on no pets\") == \"petS no on step\"\n assert candidate(s = \"Special!@# $%^&*() Characters\") == \"#@!laicepS )(*&^%$ sretcarahC\"\n assert candidate(s = \"OpenAI GPT-4\") == \"IAnepO 4-TPG\"\n assert candidate(s = \"Never odd or even\") == \"reveN ddo ro neve\"\n assert candidate(s = \"Keep calm and code on\") == \"peeK mlac dna edoc no\"\n assert candidate(s = \"OneLongWordWithoutSpaces\") == \"secapStuohtiWdroWgnoLenO\"\n assert candidate(s = \"Python is fun and challenging\") == \"nohtyP si nuf dna gnignellahc\"\n assert candidate(s = \"1234567890 0987654321 1122334455 5544332211\") == \"0987654321 1234567890 5544332211 1122334455\"\n assert candidate(s = \"Mickey Mouse\") == \"yekciM esuoM\"\n assert candidate(s = \"Reverse each word but not the sentence order\") == \"esreveR hcae drow tub ton eht ecnetnes redro\"\n assert candidate(s = \"Programming Challenges\") == \"gnimmargorP segnellahC\"\n assert candidate(s = \"aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz\") == \"zzyyxxwwvvuuttssrrqqppoonnmmllkkjjiihhggffeeddccbbaa\"\n assert candidate(s = \"12345 67890 54321 09876\") == \"54321 09876 12345 67890\"\n assert candidate(s = \"verylongwordwithoutspaces\") == \"secapstuohtiwdrowgnolyrev\"\n assert candidate(s = \"CASE SENSITIVE or NOT\") == \"ESAC EVITISNES ro TON\"\n assert candidate(s = \"reverse this sentence please\") == \"esrever siht ecnetnes esaelp\"\n assert candidate(s = \"abcdefghijklmnopqrstuvwxyz\") == \"zyxwvutsrqponmlkjihgfedcba\"\n assert candidate(s = \"1a2b3c4d5e 6f7g8h9i0j\") == \"e5d4c3b2a1 j0i9h8g7f6\"\n assert candidate(s = \"spaces between words\") == \"secaps neewteb sdrow\"\n assert candidate(s = \"reversed words in this sentence should be flipped\") == \"desrever sdrow ni siht ecnetnes dluohs eb deppilf\"\n assert candidate(s = \"Multiple spaces between words\") == \"elpitluM secaps neewteb sdrow\"\n assert candidate(s = \"1234567890\") == \"0987654321\"\n assert candidate(s = \"a\") == \"a\"\n assert candidate(s = \"Try your best and you will succeed\") == \"yrT ruoy tseb dna uoy lliw deeccus\"\n assert candidate(s = \"Data structures and algorithms\") == \"ataD serutcurts dna smhtirogla\"\n assert candidate(s = \"This is a test for the reverseWords function\") == \"sihT si a tset rof eht sdroWesrever noitcnuf\"\n assert candidate(s = \"12345 67890\") == \"54321 09876\"\n assert candidate(s = \"This is a test of the reverseWords function\") == \"sihT si a tset fo eht sdroWesrever noitcnuf\"\n assert candidate(s = \"Python is an awesome programming language\") == \"nohtyP si na emosewa gnimmargorp egaugnal\"\n assert candidate(s = \"MixedCASE Words\") == \"ESACdexiM sdroW\"\n assert candidate(s = \"aBcDeFg HiJkLmNoP QrStUvWxYz\") == \"gFeDcBa PoNmLkJiH zYxWvUtSrQ\"\n assert candidate(s = \"racecar level kayak rotator\") == \"racecar level kayak rotator\"\n assert candidate(s = \"123 456 789 0\") == \"321 654 987 0\"\n assert candidate(s = \"Madam Arora teaches malayalam\") == \"madaM arorA sehcaet malayalam\"\n assert candidate(s = \"Palindrome madam racecar\") == \"emordnilaP madam racecar\"\n assert candidate(s = \"Another EdgeCase!\") == \"rehtonA !esaCegdE\"\n assert candidate(s = \"Multiple spaces between words\") == \"elpitluM secaps neewteb sdrow\"\n assert candidate(s = \"multiple spaces between words should be preserved\") == \"elpitlum secaps neewteb sdrow dluohs eb devreserp\"\n", "comparison": "exact"}, "public_tests": ["\"Let's take LeetCode contest\"", "\"Mr Ding\""], "hints": [], "metadata": {"canonical_parameter_names": ["s"], "leetcode_dataset_entry_point": "Solution().reverseWords", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:15+00:00", "tests_total": 91, "tests_dropped": 0, "flags": [], "topic_tags": ["two-pointers", "string"]}, "language": "ruby", "interface": {"raw_signature": "def reverse_words(s)", "container": null, "callable": "reverse_words", "parameters": [{"name": "s", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 560, "task_id": "subarray-sum-equals-k", "difficulty": "Medium", "problem_description": "Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k.\n\nA subarray is a contiguous non-empty sequence of elements within an array.\n\nExample 1:\n\nInput: nums = [1,1,1], k = 2\nOutput: 2\n\nExample 2:\n\nInput: nums = [1,2,3], k = 3\nOutput: 2\n\nConstraints:\n\n- 1 <= nums.length <= 2 * 10^4\n- -1000 <= nums[i] <= 1000\n- -10^7 <= k <= 10^7\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [2, 2, 2, 2, 2],k = 4) == 4\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 15) == 8\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 55\n assert candidate(nums = [1, 2, 1, 2, 1],k = 3) == 4\n assert candidate(nums = [100, 200, 300, 400, 500],k = 1500) == 1\n assert candidate(nums = [1000, -1000, 1000, -1000, 1000],k = 0) == 6\n assert candidate(nums = [1, 2, 3, 4, 5],k = 9) == 2\n assert candidate(nums = [1],k = 1) == 1\n assert candidate(nums = [1, 1, 1],k = 2) == 2\n assert candidate(nums = [100, -100, 200, -200, 300, -300],k = 0) == 6\n assert candidate(nums = [-1, -1, 1],k = 0) == 1\n assert candidate(nums = [10, 20, 30, 40, 50],k = 100) == 1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 15) == 3\n assert candidate(nums = [1, -1, 5, -2, 3],k = 3) == 3\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4],k = 0) == 10\n assert candidate(nums = [1, 0, -1, 0, -1, 0, 1],k = 0) == 8\n assert candidate(nums = [10, 20, 30, 40, 50],k = 150) == 1\n assert candidate(nums = [3, 4, 7, 2, -3, 1, 4, 2],k = 7) == 4\n assert candidate(nums = [1, -1, 0],k = 0) == 3\n assert candidate(nums = [-1, -2, -3],k = -6) == 1\n assert candidate(nums = [-1, -1, 1, 1, 0],k = 0) == 4\n assert candidate(nums = [1, 2, 3],k = 3) == 2\n assert candidate(nums = [-1, -1, 2],k = 1) == 1\n assert candidate(nums = [1000, -1000, 1000, -1000, 1000],k = 0) == 6\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 25) == 16\n assert candidate(nums = [1, -1, 0, 1, -1, 1, -1],k = 0) == 13\n assert candidate(nums = [50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50],k = 1000) == 1\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1],k = 0) == 16\n assert candidate(nums = [1, 3, -2, 5, 6, -4, 2, 3],k = 5) == 3\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 25) == 6\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 15) == 8\n assert candidate(nums = [10, 20, 30, -10, -20, -30, 40, 50, -40, -50],k = 30) == 5\n assert candidate(nums = [1, -1, 0, 1, -1, 2],k = 0) == 7\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5],k = 10) == 6\n assert candidate(nums = [100, -100, 50, 50, -50, 50, -100, 100],k = 0) == 10\n assert candidate(nums = [-10, 0, 10, -10, 0, 10],k = 0) == 9\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 5000) == 0\n assert candidate(nums = [10, -5, 10, -5, 10],k = 5) == 4\n assert candidate(nums = [1, -1, 1, -1, 1, -1],k = 0) == 9\n assert candidate(nums = [100, 200, 300, 400, 500],k = 1000) == 1\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0],k = 0) == 28\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10],k = -15) == 3\n assert candidate(nums = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10],k = 100) == 1\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 1500) == 3\n assert candidate(nums = [1, -2, 1, 2, -1, 2, 3, 4, -2, 1],k = 3) == 5\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10],k = -3) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 10) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, -5, -4, -3, -2, -1],k = 5) == 3\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == 16\n assert candidate(nums = [1000, 1000, 1000, 1000, 1000, 1000, 1000],k = 3000) == 5\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2],k = 3) == 9\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],k = 0) == 55\n assert candidate(nums = [0, 0, 0, 0, 0],k = 0) == 15\n assert candidate(nums = [-10, -20, -30, -40, -50],k = -70) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == 6\n assert candidate(nums = [1, 3, 4, 5, 7, 8, 10, 11, 12, 13],k = 20) == 2\n assert candidate(nums = [1, -1, 0, 0, 1, -1],k = 0) == 11\n assert candidate(nums = [10, -5, 2, -3, 1, 5, -2],k = 7) == 1\n assert candidate(nums = [1, -1, 0, 0, 1],k = 0) == 7\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000],k = 2500) == 1\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1],k = 5) == 6\n assert candidate(nums = [10, -10, 10, -10, 10, -10, 10, -10, 10, -10],k = 0) == 25\n assert candidate(nums = [-10, 100, -100, 50, -50, 25, -25],k = 0) == 6\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5],k = 0) == 15\n assert candidate(nums = [1, 2, 3, -6, 2, 3, 4, -10, 2, 3, 4, 5],k = 5) == 6\n assert candidate(nums = [-10, -20, 10, 20, 10, -10, -20, 10, 20],k = 0) == 6\n assert candidate(nums = [1000, -1000, 1000, -1000, 1000, -1000, 1000, -1000],k = 0) == 16\n assert candidate(nums = [10, 20, 30, 40, 50],k = 70) == 1\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],k = 150) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9],k = 15) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 15) == 3\n assert candidate(nums = [-100, -200, -300, -400, -500, -600, -700, -800, -900, -1000],k = -5000) == 0\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],k = 0) == 25\n assert candidate(nums = [1, -1, 5, -2, 3],k = 3) == 3\n assert candidate(nums = [1000, -1000, 1000, -1000, 1000, -1000, 1000, -1000, 1000, -1000],k = 0) == 25\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 50) == 2\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1],k = 0) == 12\n assert candidate(nums = [100, 200, 300, 400, 500, 600],k = 1500) == 2\n assert candidate(nums = [5, 5, 5, 5, 5],k = 15) == 3\n assert candidate(nums = [0, 0, 0, 0, 0],k = 0) == 15\n assert candidate(nums = [1, -1, 1, -1, 1, -1, 1, -1, 1, -1],k = 2) == 0\n assert candidate(nums = [1, 2, -1, 2, -1, 1],k = 2) == 5\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9],k = -5) == 3\n assert candidate(nums = [-1, 2, -3, 4, -5, 6, -7, 8, -9, 10],k = 5) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],k = 30) == 2\n assert candidate(nums = [1, 2, 3, 4, 5],k = 9) == 2\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 25) == 6\n assert candidate(nums = [-1000, 1000, -1000, 1000, -1000, 1000],k = 0) == 9\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5],k = 50) == 1\n assert candidate(nums = [1, 2, 1, 2, 1],k = 3) == 4\n assert candidate(nums = [3, 4, 7, 2, -3, 1, 4, 2, 0, 1],k = 7) == 7\n assert candidate(nums = [10, 2, -2, -20, 10],k = -10) == 3\n assert candidate(nums = [0, 0, 0, 0, 0, 0],k = 0) == 21\n assert candidate(nums = [1000, -1000, 1000, -1000, 1000, -1000],k = 0) == 9\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20],k = 30) == 3\n assert candidate(nums = [1, 2, 3, 4, 5],k = 15) == 1\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100],k = -150) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],k = 100) == 1\n assert candidate(nums = [-1, 0, 1, -1, 0, 1],k = 0) == 9\n assert candidate(nums = [5, -5, 5, -5, 5, -5, 5],k = 5) == 10\n", "comparison": "exact"}, "public_tests": ["[1,1,1]\n2", "[1,2,3]\n3"], "hints": ["Will Brute force work here? Try to optimize it.", "Can we optimize it by using some extra space?", "What about storing sum frequencies in a hash table? Will it be useful?", "sum(i,j)=sum(0,j)-sum(0,i), where sum(i,j) represents the sum of all the elements from index i to j-1. Can we use this property to optimize it."], "metadata": {"canonical_parameter_names": ["nums", "k"], "leetcode_dataset_entry_point": "Solution().subarraySum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:17+00:00", "tests_total": 102, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "hash-table", "prefix-sum"]}, "language": "ruby", "interface": {"raw_signature": "def subarray_sum(nums, k)", "container": null, "callable": "subarray_sum", "parameters": [{"name": "nums", "type": "Integer[]"}, {"name": "k", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 561, "task_id": "array-partition", "difficulty": "Easy", "problem_description": "Given an integer array nums of 2n integers, group these integers into n pairs (a_1, b_1), (a_2, b_2), ..., (a_n, b_n) such that the sum of min(a_i, b_i) for all i is maximized. Return the maximized sum.\n\nExample 1:\n\nInput: nums = [1,4,3,2]\nOutput: 4\nExplanation: All possible pairings (ignoring the ordering of elements) are:\n1. (1, 4), (2, 3) -> min(1, 4) + min(2, 3) = 1 + 2 = 3\n2. (1, 3), (2, 4) -> min(1, 3) + min(2, 4) = 1 + 2 = 3\n3. (1, 2), (3, 4) -> min(1, 2) + min(3, 4) = 1 + 3 = 4\nSo the maximum possible sum is 4.\n\nExample 2:\n\nInput: nums = [6,2,6,5,1,2]\nOutput: 9\nExplanation: The optimal pairing is (2, 1), (2, 5), (6, 6). min(2, 1) + min(2, 5) + min(6, 6) = 1 + 2 + 6 = 9.\n\nConstraints:\n\n- 1 <= n <= 10^4\n- nums.length == 2 * n\n- -10^4 <= nums[i] <= 10^4\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15]) == 28\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5]) == 20\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993]) == -39988\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(nums = [1, 4, 3, 2]) == 4\n assert candidate(nums = [-2, -1, 0, 1, 2, 3, 4, 5]) == 4\n assert candidate(nums = [6, 2, 6, 5, 1, 2]) == 9\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]) == 250\n assert candidate(nums = [1, 3, 5, 7, 9, 11]) == 15\n assert candidate(nums = [-2, -1, -3, -4, -5, -6, -7, -8]) == -20\n assert candidate(nums = [2, 2, 2, 2, 2, 2]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6]) == 9\n assert candidate(nums = [10000, -10000, 10000, -10000]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1]) == 4\n assert candidate(nums = [-100, -200, -300, -400, -500, -600]) == -1200\n assert candidate(nums = [0, 0, 0, 0]) == 0\n assert candidate(nums = [100, 200, 300, 400, 500, 600]) == 900\n assert candidate(nums = [-1, 2, 3, -4]) == -2\n assert candidate(nums = [-1, 2, -3, 4, -5, 6]) == -2\n assert candidate(nums = [5, 5, 5, 5, 5, 5]) == 15\n assert candidate(nums = [-1, 4, -3, 2]) == -1\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8]) == 16\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1]) == 16\n assert candidate(nums = [-2, -4, -6, -8, -10, -12]) == -24\n assert candidate(nums = [-10000, 10000, -9999, 9999, -9998, 9998]) == -9999\n assert candidate(nums = [-1, 0, -3, 2, 5, -4]) == -3\n assert candidate(nums = [-1, -2, -3, -4, -5, -6]) == -12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50]) == 625\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31]) == 120\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, -10, -20, -30, -40, -50, -60, -70, -80, -90, -100]) == -50\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 750, -750, 125, -125, 625, -625]) == -500\n assert candidate(nums = [100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200, 100, 200]) == 1200\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -20]) == -110\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000]) == 2500\n assert candidate(nums = [5, 8, 12, 19, 23, 35, 48, 67, 88, 99, 101, 102, 103, 104, 105, 106]) == 485\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3]) == 12\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 100\n assert candidate(nums = [100, -200, 300, -400, 500, -600, 700, -800, 900, -1000]) == -800\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 64\n assert candidate(nums = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 30\n assert candidate(nums = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7]) == 44\n assert candidate(nums = [10000, -10000, 5000, -5000, 2500, -2500, 1250, -1250]) == -6250\n assert candidate(nums = [1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59]) == 435\n assert candidate(nums = [-1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10]) == -5\n assert candidate(nums = [1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, -1000, -2000, -3000, -4000, -5000, -6000, -7000, -8000, -9000, -10000]) == -5000\n assert candidate(nums = [100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81]) == 900\n assert candidate(nums = [10, 10, 20, 20, 30, 30, 40, 40, 50, 50, 60, 60, 70, 70, 80, 80, 90, 90, 100, 100]) == 550\n assert candidate(nums = [-10, 10, -20, 20, -30, 30, -40, 40, -50, 50, -60, 60, -70, 70, -80, 80]) == -40\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [10000, -10000, 9999, -9999, 9998, -9998]) == -9999\n assert candidate(nums = [100, -100, 200, -200, 300, -300, 400, -400, 500, -500]) == -300\n assert candidate(nums = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 12\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == -10\n assert candidate(nums = [-5000, -4000, -3000, -2000, -1000, 0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000]) == 16000\n assert candidate(nums = [1000, -1000, 500, -500, 250, -250, 125, -125, 625, -625, 312, -312, 156, -156, 78, -78]) == -704\n assert candidate(nums = [-1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, -1, 0]) == -1\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100, -110, -120, -130, -140, -150, -160]) == -720\n assert candidate(nums = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10]) == 55\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]) == 256\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16]) == -72\n assert candidate(nums = [1000, 999, 998, 997, 996, 995, 994, 993, 992, 991, 990, 989, 988, 987, 986, 985, 984, 983, 982, 981]) == 9900\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == -275\n assert candidate(nums = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12]) == -42\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]) == 6\n assert candidate(nums = [-5000, -4999, -4998, -4997, -4996, -4995, -4994, -4993, -4992, -4991, -4990, -4989, -4988, -4987, -4986, -4985]) == -39944\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993, -9992, -9991]) == -49980\n assert candidate(nums = [100, 200, 300, 400, 500, 150, 250, 350, 450, 550]) == 1500\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600]) == 6400\n assert candidate(nums = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40]) == 200\n assert candidate(nums = [-10000, -9999, -9998, -9997, -9996, -9995, -9994, -9993]) == -39988\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 100\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010]) == 7525\n assert candidate(nums = [-10, -20, -30, -40, -50, -60, -70, -80, -90, -100, -110, -120, -130, -140, -150, -160]) == -720\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 100\n assert candidate(nums = [100, -100, 200, -200, 300, -300, 400, -400, 500, -500]) == -300\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 225\n assert candidate(nums = [-5000, 5000, -4999, 4999, -4998, 4998, -4997, 4997, -4996, 4996]) == -4998\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]) == 50\n assert candidate(nums = [10000, -10000, 5000, -5000, 7500, -7500, 2500, -2500]) == -5000\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8, 9, -9, 10, -10]) == -5\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5, 6, -6, 7, -7, 8, -8]) == -4\n assert candidate(nums = [1, 10000, 2, 9999, 3, 9998, 4, 9997, 5, 9996]) == 20005\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 1000\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]) == 640\n assert candidate(nums = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 0\n assert candidate(nums = [10000, -10000, 9999, -9999, 9998, -9998, 9997, -9997, 9996, -9996]) == -9998\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 100\n assert candidate(nums = [10000, -10000, 9999, -9999, 9998, -9998, 1, 2, 3, 4]) == -9993\n assert candidate(nums = [500, 400, 300, 200, 100, 0, -100, -200, -300, -400, -500, -600, -700, -800, -900]) == -1600\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5]) == 16\n assert candidate(nums = [9998, 9997, 9996, 9995, 9994, 9993, 9992, 9991, 9990, 9989]) == 49965\n assert candidate(nums = [-10, 10, -20, 20, -30, 30, -40, 40, -50, 50, -60, 60]) == -30\n assert candidate(nums = [10000, -10000, 5000, -5000, 2500, -2500]) == -7500\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160]) == 640\n assert candidate(nums = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000]) == 80000\n assert candidate(nums = [1, -1, 2, -2, 3, -3, 4, -4, 5, -5]) == -3\n assert candidate(nums = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95]) == 500\n assert candidate(nums = [-1000, -900, -800, -700, -600, -500, -400, -300, -200, -100]) == -3000\n assert candidate(nums = [-10000, 10000, -9999, 9999, -9998, 9998, -9997, 9997, -9996, 9996, -9995, 9995, -9994, 9994, -9993, 9993]) == -4\n assert candidate(nums = [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80]) == 320\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10]) == 275\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 20\n assert candidate(nums = [10000, -10000, 5000, -5000, 2500, -2500, 1250, -1250, 625, -625]) == -6875\n assert candidate(nums = [100, 90, 80, 70, 60, 50, 40, 30, 20, 10, -10, -20, -30, -40, -50, -60]) == 130\n assert candidate(nums = [100, 100, 90, 90, 80, 80, 70, 70, 60, 60, 50, 50, 40, 40, 30, 30]) == 520\n assert candidate(nums = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 2525\n assert candidate(nums = [10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000, 10000, -10000]) == 0\n", "comparison": "exact"}, "public_tests": ["[1,4,3,2]", "[6,2,6,5,1,2]"], "hints": ["Obviously, brute force won't help here. Think of something else, take some example like 1,2,3,4.", "How will you make pairs to get the result? There must be some pattern.", "Did you observe that- Minimum element gets add into the result in sacrifice of maximum element.", "Still won't able to find pairs? Sort the array and try to find the pattern."], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().arrayPairSum", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:19+00:00", "tests_total": 112, "tests_dropped": 2, "flags": [], "topic_tags": ["array", "greedy", "sorting", "counting-sort"]}, "language": "ruby", "interface": {"raw_signature": "def array_pair_sum(nums)", "container": null, "callable": "array_pair_sum", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 564, "task_id": "find-the-closest-palindrome", "difficulty": "Hard", "problem_description": "Given a string n representing an integer, return the closest integer (not including itself), which is a palindrome. If there is a tie, return the smaller one.\n\nThe closest is defined as the absolute difference minimized between two integers.\n\nExample 1:\n\nInput: n = \"123\"\nOutput: \"121\"\n\nExample 2:\n\nInput: n = \"1\"\nOutput: \"0\"\nExplanation: 0 and 2 are the closest palindromes but we return the smallest which is 0.\n\nConstraints:\n\n- 1 <= n.length <= 18\n- n consists of only digits.\n- n does not have leading zeros.\n- n is representing an integer in the range [1, 10^18 - 1].\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(n = \"10\") == \"9\"\n assert candidate(n = \"1001\") == \"999\"\n assert candidate(n = \"1234\") == \"1221\"\n assert candidate(n = \"123321\") == \"122221\"\n assert candidate(n = \"999999999\") == \"1000000001\"\n assert candidate(n = \"11\") == \"9\"\n assert candidate(n = \"9999\") == \"10001\"\n assert candidate(n = \"111111111\") == \"111101111\"\n assert candidate(n = \"9\") == \"8\"\n assert candidate(n = \"111111111111111111\") == \"111111110011111111\"\n assert candidate(n = \"10001\") == \"9999\"\n assert candidate(n = \"1000000000\") == \"999999999\"\n assert candidate(n = \"233\") == \"232\"\n assert candidate(n = \"987654321\") == \"987656789\"\n assert candidate(n = \"1221\") == \"1111\"\n assert candidate(n = \"123456789\") == \"123454321\"\n assert candidate(n = \"101\") == \"99\"\n assert candidate(n = \"1\") == \"0\"\n assert candidate(n = \"10000\") == \"9999\"\n assert candidate(n = \"123454321\") == \"123444321\"\n assert candidate(n = \"1000000001\") == \"999999999\"\n assert candidate(n = \"12321\") == \"12221\"\n assert candidate(n = \"99\") == \"101\"\n assert candidate(n = \"999999999999999999\") == \"1000000000000000001\"\n assert candidate(n = \"1000\") == \"999\"\n assert candidate(n = \"1000001\") == \"999999\"\n assert candidate(n = \"123\") == \"121\"\n assert candidate(n = \"1234321\") == \"1233321\"\n assert candidate(n = \"999\") == \"1001\"\n assert candidate(n = \"123456\") == \"123321\"\n assert candidate(n = \"100\") == \"99\"\n assert candidate(n = \"923429\") == \"923329\"\n assert candidate(n = \"1234567887654321\") == \"1234567777654321\"\n assert candidate(n = \"2345678987654321\") == \"2345678998765432\"\n assert candidate(n = \"123456789876543210\") == \"123456789987654321\"\n assert candidate(n = \"9999999999\") == \"10000000001\"\n assert candidate(n = \"10000000000\") == \"9999999999\"\n assert candidate(n = \"2000002\") == \"1999991\"\n assert candidate(n = \"100001\") == \"99999\"\n assert candidate(n = \"101010101010101010\") == \"101010101101010101\"\n assert candidate(n = \"112233445566778899\") == \"112233445544332211\"\n assert candidate(n = \"12345678987654322\") == \"12345678987654321\"\n assert candidate(n = \"888888888\") == \"888878888\"\n assert candidate(n = \"221122\") == \"220022\"\n assert candidate(n = \"222222222222222222\") == \"222222221122222222\"\n assert candidate(n = \"98765432123456789\") == \"98765432023456789\"\n assert candidate(n = \"123456789876543221\") == \"123456789987654321\"\n assert candidate(n = \"5555555555555555\") == \"5555555445555555\"\n assert candidate(n = \"1111111111\") == \"1111001111\"\n assert candidate(n = \"12345678987654321\") == \"12345678887654321\"\n assert candidate(n = \"1111\") == \"1001\"\n assert candidate(n = \"111\") == \"101\"\n assert candidate(n = \"9998\") == \"9999\"\n assert candidate(n = \"100000000001\") == \"99999999999\"\n assert candidate(n = \"8888888888\") == \"8888778888\"\n assert candidate(n = \"11111111111111111\") == \"11111111011111111\"\n assert candidate(n = \"888888888888888888\") == \"888888887788888888\"\n assert candidate(n = \"135797531\") == \"135787531\"\n assert candidate(n = \"11122111\") == \"11111111\"\n assert candidate(n = \"100010001\") == \"100000001\"\n assert candidate(n = \"12344321\") == \"12333321\"\n assert candidate(n = \"2147483647\") == \"2147447412\"\n assert candidate(n = \"1800000000\") == \"1799999971\"\n assert candidate(n = \"100000000000000000\") == \"99999999999999999\"\n assert candidate(n = \"9876543210\") == \"9876556789\"\n assert candidate(n = \"99999\") == \"100001\"\n assert candidate(n = \"112233445544332211\") == \"112233444444332211\"\n assert candidate(n = \"9999999999999999\") == \"10000000000000001\"\n assert candidate(n = \"10000000001\") == \"9999999999\"\n assert candidate(n = \"999999999999999998\") == \"999999999999999999\"\n assert candidate(n = \"1234567898765432\") == \"1234567887654321\"\n assert candidate(n = \"987654321123456789\") == \"987654320023456789\"\n assert candidate(n = \"876543210\") == \"876545678\"\n assert candidate(n = \"1001001001001\") == \"1001000001001\"\n assert candidate(n = \"99999999999999999\") == \"100000000000000001\"\n assert candidate(n = \"111111111111111110\") == \"111111111111111111\"\n assert candidate(n = \"92345678987654322\") == \"92345678987654329\"\n assert candidate(n = \"100000000000000001\") == \"99999999999999999\"\n assert candidate(n = \"10000000000000000\") == \"9999999999999999\"\n assert candidate(n = \"246808642\") == \"246818642\"\n", "comparison": "exact"}, "public_tests": ["\"123\"", "\"1\""], "hints": ["Will brute force work for this problem? Think of something else.", "Take some examples like 1234, 999,1000, etc and check their closest palindromes. How many different cases are possible?", "Do we have to consider only left half or right half of the string or both?", "Try to find the closest palindrome of these numbers- 12932, 99800, 12120. Did you observe something?"], "metadata": {"canonical_parameter_names": ["n"], "leetcode_dataset_entry_point": "Solution().nearestPalindromic", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:26+00:00", "tests_total": 114, "tests_dropped": 34, "flags": [], "topic_tags": ["math", "string"]}, "language": "ruby", "interface": {"raw_signature": "def nearest_palindromic(n)", "container": null, "callable": "nearest_palindromic", "parameters": [{"name": "n", "type": "String"}], "return_type": "String", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 565, "task_id": "array-nesting", "difficulty": "Medium", "problem_description": "You are given an integer array nums of length n where nums is a permutation of the numbers in the range [0, n - 1].\n\nYou should build a set s[k] = {nums[k], nums[nums[k]], nums[nums[nums[k]]], ... } subjected to the following rule:\n\n- The first element in s[k] starts with the selection of the element nums[k] of index = k.\n- The next element in s[k] should be nums[nums[k]], and then nums[nums[nums[k]]], and so on.\n- We stop adding right before a duplicate element occurs in s[k].\n\nReturn the longest length of a set s[k].\n\nExample 1:\n\nInput: nums = [5,4,0,3,1,6,2]\nOutput: 4\nExplanation:\nnums[0] = 5, nums[1] = 4, nums[2] = 0, nums[3] = 3, nums[4] = 1, nums[5] = 6, nums[6] = 2.\nOne of the longest sets s[k]:\ns[0] = {nums[0], nums[5], nums[6], nums[2]} = {5, 6, 2, 0}\n\nExample 2:\n\nInput: nums = [0,1,2]\nOutput: 1\n\nConstraints:\n\n- 1 <= nums.length <= 10^5\n- 0 <= nums[i] < nums.length\n- All the values of nums are unique.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 0, 3, 4, 2]) == 3\n assert candidate(nums = [5, 1, 4, 2, 0, 6, 3]) == 6\n assert candidate(nums = [3, 2, 1, 0]) == 2\n assert candidate(nums = [1, 2, 0, 3]) == 3\n assert candidate(nums = [0, 2, 1]) == 2\n assert candidate(nums = [0, 2, 1, 3]) == 2\n assert candidate(nums = [0, 2, 1, 5, 3, 4]) == 3\n assert candidate(nums = [10, 5, 3, 4, 8, 6, 1, 7, 9, 2, 0]) == 5\n assert candidate(nums = [0, 1, 2]) == 1\n assert candidate(nums = [3, 0, 1, 2]) == 4\n assert candidate(nums = [5, 0, 1, 4, 3, 2]) == 4\n assert candidate(nums = [3, 0, 2, 1]) == 3\n assert candidate(nums = [5, 4, 0, 3, 1, 6, 2]) == 4\n assert candidate(nums = [1, 2, 0]) == 3\n assert candidate(nums = [1, 0]) == 2\n assert candidate(nums = [0, 2, 1, 4, 3, 5, 7, 6]) == 2\n assert candidate(nums = [2, 3, 1, 0, 5, 6, 4]) == 4\n assert candidate(nums = [1, 3, 0, 2]) == 4\n assert candidate(nums = [9, 5, 4, 0, 8, 1, 6, 3, 7, 2]) == 7\n assert candidate(nums = [0, 2, 1, 4, 3, 5, 6, 7, 8, 9]) == 2\n assert candidate(nums = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [7, 6, 5, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [3, 2, 1, 0, 7, 6, 5, 4]) == 2\n assert candidate(nums = [10, 6, 3, 8, 2, 5, 1, 4, 9, 7, 0]) == 6\n assert candidate(nums = [1, 3, 5, 7, 9, 0, 2, 4, 6, 8]) == 10\n assert candidate(nums = [2, 3, 4, 5, 0, 1]) == 3\n assert candidate(nums = [2, 0, 1, 4, 3, 5, 7, 6, 8, 9, 11, 10, 13, 12, 15, 14]) == 3\n assert candidate(nums = [15, 13, 12, 1, 9, 14, 10, 0, 8, 5, 11, 4, 7, 3, 2, 6]) == 12\n assert candidate(nums = [5, 6, 4, 3, 0, 2, 1]) == 4\n assert candidate(nums = [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 2\n assert candidate(nums = [4, 0, 2, 5, 3, 6, 1, 7]) == 6\n assert candidate(nums = [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9]) == 2\n assert candidate(nums = [1, 2, 3, 4, 0, 6, 5]) == 5\n assert candidate(nums = [1, 0, 3, 5, 4, 2]) == 3\n assert candidate(nums = [15, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 14]) == 6\n assert candidate(nums = [8, 2, 3, 1, 5, 6, 7, 0, 4]) == 6\n assert candidate(nums = [9, 7, 5, 3, 1, 8, 6, 4, 2, 0]) == 3\n assert candidate(nums = [4, 0, 2, 6, 7, 3, 1, 5]) == 7\n assert candidate(nums = [1, 6, 3, 7, 8, 0, 5, 4, 2, 9]) == 5\n assert candidate(nums = [4, 5, 6, 7, 8, 9, 3, 0, 1, 2]) == 10\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8]) == 2\n assert candidate(nums = [1, 4, 3, 0, 2]) == 5\n assert candidate(nums = [6, 2, 4, 5, 3, 0, 1]) == 7\n assert candidate(nums = [0, 2, 1, 3, 5, 4, 7, 6, 8, 10, 9]) == 2\n assert candidate(nums = [0, 3, 1, 4, 5, 2, 6, 7, 8, 9]) == 5\n assert candidate(nums = [4, 0, 3, 5, 7, 2, 6, 1, 8, 9, 10, 11, 12, 13, 14]) == 4\n assert candidate(nums = [2, 0, 1, 3, 5, 4, 6, 8, 7, 10, 9, 12, 11, 14, 13]) == 3\n assert candidate(nums = [3, 6, 0, 1, 2, 5, 4, 8, 7]) == 6\n assert candidate(nums = [2, 3, 1, 0]) == 4\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]) == 1\n assert candidate(nums = [14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [2, 0, 1, 4, 5, 3, 7, 6, 9, 8]) == 3\n assert candidate(nums = [12, 0, 9, 6, 1, 10, 11, 13, 8, 7, 5, 2, 4, 3]) == 7\n assert candidate(nums = [7, 5, 4, 1, 0, 6, 2, 3]) == 8\n assert candidate(nums = [0, 3, 1, 6, 2, 5, 4, 7]) == 5\n assert candidate(nums = [0, 4, 3, 1, 2]) == 4\n assert candidate(nums = [7, 0, 1, 2, 3, 4, 5, 6, 13, 8, 9, 10, 11, 12, 14]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]) == 10\n assert candidate(nums = [6, 2, 1, 5, 4, 0, 3, 7, 11, 8, 10, 9]) == 4\n assert candidate(nums = [8, 2, 0, 7, 3, 1, 6, 5, 4]) == 8\n assert candidate(nums = [7, 1, 5, 3, 6, 4, 0, 2]) == 6\n assert candidate(nums = [8, 7, 6, 5, 4, 3, 2, 1, 0, 9]) == 2\n assert candidate(nums = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) == 1\n assert candidate(nums = [8, 2, 4, 6, 0, 3, 5, 7, 1]) == 5\n assert candidate(nums = [7, 0, 1, 3, 6, 2, 8, 5, 4, 9]) == 5\n assert candidate(nums = [1, 5, 0, 4, 2, 3]) == 6\n assert candidate(nums = [7, 5, 6, 4, 1, 0, 2, 3]) == 6\n assert candidate(nums = [8, 2, 3, 1, 4, 5, 7, 6, 0]) == 3\n assert candidate(nums = [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [2, 0, 3, 5, 1, 8, 7, 6, 4]) == 7\n assert candidate(nums = [1, 0, 3, 5, 2, 4, 7, 6, 8]) == 4\n assert candidate(nums = [12, 13, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 4\n assert candidate(nums = [4, 0, 2, 6, 1, 5, 3, 7]) == 3\n assert candidate(nums = [2, 0, 1, 4, 5, 3, 6, 7]) == 3\n assert candidate(nums = [4, 5, 6, 7, 0, 1, 2, 3]) == 2\n assert candidate(nums = [9, 3, 2, 1, 4, 5, 0, 6, 8, 7]) == 4\n assert candidate(nums = [6, 2, 8, 5, 1, 9, 4, 3, 0, 7]) == 6\n assert candidate(nums = [6, 2, 4, 3, 5, 0, 1]) == 6\n assert candidate(nums = [6, 2, 3, 4, 5, 1, 0]) == 5\n assert candidate(nums = [3, 1, 2, 0, 6, 5, 4, 9, 8, 7]) == 2\n assert candidate(nums = [3, 5, 4, 2, 0, 1]) == 4\n assert candidate(nums = [1, 3, 5, 7, 9, 2, 4, 6, 8, 0]) == 7\n assert candidate(nums = [4, 0, 5, 1, 3, 2, 6]) == 4\n assert candidate(nums = [0, 2, 1, 4, 3, 6, 5, 8, 7]) == 2\n assert candidate(nums = [2, 0, 1, 4, 3, 6, 8, 5, 7, 9, 11, 10]) == 4\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10]) == 2\n assert candidate(nums = [8, 2, 4, 1, 3, 6, 7, 0, 5]) == 5\n assert candidate(nums = [0, 2, 1, 4, 5, 3]) == 3\n assert candidate(nums = [1, 0, 3, 2, 5, 4, 7, 6]) == 2\n assert candidate(nums = [4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [0, 1, 3, 2, 6, 5, 4, 7, 9, 8, 11, 10, 13, 12, 15, 14]) == 2\n assert candidate(nums = [0, 3, 2, 1, 6, 5, 4, 9, 8, 7]) == 2\n assert candidate(nums = [2, 0, 1, 4, 3, 5]) == 3\n assert candidate(nums = [6, 3, 5, 1, 4, 0, 2]) == 4\n assert candidate(nums = [19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 2\n assert candidate(nums = [9, 7, 8, 3, 10, 2, 6, 11, 4, 0, 5, 1]) == 5\n", "comparison": "exact"}, "public_tests": ["[5,4,0,3,1,6,2]", "[0,1,2]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().arrayNesting", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:29+00:00", "tests_total": 97, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "depth-first-search"]}, "language": "ruby", "interface": {"raw_signature": "def array_nesting(nums)", "container": null, "callable": "array_nesting", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 566, "task_id": "reshape-the-matrix", "difficulty": "Easy", "problem_description": "In MATLAB, there is a handy function called reshape which can reshape an m x n matrix into a new one with a different size r x c keeping its original data.\n\nYou are given an m x n matrix mat and two integers r and c representing the number of rows and the number of columns of the wanted reshaped matrix.\n\nThe reshaped matrix should be filled with all the elements of the original matrix in the same row-traversing order as they were.\n\nIf the reshape operation with given parameters is possible and legal, output the new reshaped matrix; Otherwise, output the original matrix.\n\nExample 1:\n\nInput: mat = [[1,2],[3,4]], r = 1, c = 4\nOutput: [[1,2,3,4]]\n\nExample 2:\n\nInput: mat = [[1,2],[3,4]], r = 2, c = 4\nOutput: [[1,2],[3,4]]\n\nConstraints:\n\n- m == mat.length\n- n == mat[i].length\n- 1 <= m, n <= 100\n- -1000 <= mat[i][j] <= 1000\n- 1 <= r, c <= 300\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 1,c = 6) == [[1, 2, 3, 4, 5, 6]]\n assert candidate(mat = [[1, 2], [3, 4]],r = 1,c = 4) == [[1, 2, 3, 4]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 3,c = 2) == [[1, 2], [3, 4], [5, 6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 3,c = 1) == [[1, 2, 3], [4, 5, 6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 1,c = 3) == [[1, 2, 3], [4, 5, 6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 3,c = 3) == [[1, 2, 3], [4, 5, 6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 1,c = 1) == [[1, 2, 3], [4, 5, 6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],r = 1,c = 9) == [[1, 2, 3, 4, 5, 6, 7, 8, 9]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8]],r = 1,c = 8) == [[1, 2, 3, 4, 5, 6, 7, 8]]\n assert candidate(mat = [[1, 2], [3, 4]],r = 2,c = 2) == [[1, 2], [3, 4]]\n assert candidate(mat = [[1, 2], [3, 4]],r = 2,c = 4) == [[1, 2], [3, 4]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8]],r = 4,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8]],r = 8,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],r = 9,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8]],r = 2,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 2,c = 2) == [[1, 2, 3], [4, 5, 6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 6,c = 1) == [[1], [2], [3], [4], [5], [6]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],r = 3,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\n assert candidate(mat = [[1, 2], [3, 4]],r = 4,c = 1) == [[1], [2], [3], [4]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6]],r = 2,c = 3) == [[1, 2, 3], [4, 5, 6]]\n assert candidate(mat = [[10, 20, 30], [40, 50, 60], [70, 80, 90], [100, 110, 120]],r = 2,c = 6) == [[10, 20, 30, 40, 50, 60], [70, 80, 90, 100, 110, 120]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]],r = 20,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]]\n assert candidate(mat = [[5, 6, 7], [8, 9, 10]],r = 6,c = 1) == [[5], [6], [7], [8], [9], [10]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],r = 6,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]],r = 3,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 12,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]],r = 20,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 8,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]],r = 12,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]],r = 1,c = 16) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8]],r = 4,c = 1) == [[1, 2, 3, 4], [5, 6, 7, 8]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]],r = 4,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]\n assert candidate(mat = [[10, 20, 30], [40, 50, 60], [70, 80, 90]],r = 9,c = 1) == [[10], [20], [30], [40], [50], [60], [70], [80], [90]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],r = 2,c = 5) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]],r = 18,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]],r = 16,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 2,c = 8) == [[1, 2], [3, 4], [5, 6], [7, 8]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]],r = 4,c = 2) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]\n assert candidate(mat = [[1000, -1000, 500], [-500, 1000, -1000], [0, 0, 0]],r = 3,c = 3) == [[1000, -1000, 500], [-500, 1000, -1000], [0, 0, 0]]\n assert candidate(mat = [[-1, 2, -3], [4, -5, 6], [-7, 8, -9]],r = 3,c = 3) == [[-1, 2, -3], [4, -5, 6], [-7, 8, -9]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]],r = 1,c = 20) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 6,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]\n assert candidate(mat = [[1, 2], [3, 4]],r = 4,c = 1) == [[1], [2], [3], [4]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 1,c = 15) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],r = 3,c = 5) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]]\n assert candidate(mat = [[0, 0, 0], [0, 0, 0], [0, 0, 0]],r = 9,c = 1) == [[0], [0], [0], [0], [0], [0], [0], [0], [0]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]],r = 6,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 1,c = 8) == [[1, 2, 3, 4, 5, 6, 7, 8]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],r = 5,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]],r = 8,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],r = 5,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(mat = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],r = 1,c = 9) == [[-1, -2, -3, -4, -5, -6, -7, -8, -9]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 2,c = 5) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 3,c = 7) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(mat = [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12]],r = 6,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 2,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 8,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 5,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],r = 2,c = 5) == [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 3,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]],r = 9,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], [15, 16], [17, 18]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],r = 1,c = 15) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 2,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 3,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],r = 4,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 4,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]],r = 3,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8]],r = 4,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]],r = 15,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12]],r = 3,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]]\n assert candidate(mat = [[-1, 2, -3, 4], [-5, 6, -7, 8], [-9, 10, -11, 12]],r = 2,c = 6) == [[-1, 2, -3, 4, -5, 6], [-7, 8, -9, 10, -11, 12]]\n assert candidate(mat = [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]],r = 3,c = 3) == [[-1, -2, -3], [-4, -5, -6], [-7, -8, -9]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]],r = 1,c = 18) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]],r = 2,c = 10) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]],r = 1,c = 12) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 5,c = 2) == [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 15,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]],r = 4,c = 5) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6]],r = 3,c = 2) == [[1, 2], [3, 4], [5, 6]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]],r = 4,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]],r = 2,c = 6) == [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 2,c = 6) == [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],r = 10,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]],r = 1,c = 19) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]],r = 5,c = 2) == [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]],r = 4,c = 5) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]],r = 2,c = 8) == [[1, 2, 3, 4, 5, 6, 7, 8], [9, 10, 11, 12, 13, 14, 15, 16]]\n assert candidate(mat = [[1, 2], [3, 4], [5, 6]],r = 1,c = 3) == [[1, 2], [3, 4], [5, 6]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]],r = 2,c = 9) == [[1, 2, 3, 4, 5, 6, 7, 8, 9], [10, 11, 12, 13, 14, 15, 16, 17, 18]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],r = 1,c = 12) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]\n assert candidate(mat = [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]],r = 5,c = 4) == [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16], [17, 18, 19, 20]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]],r = 16,c = 1) == [[1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16]]\n assert candidate(mat = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]],r = 1,c = 16) == [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]],r = 1,c = 3) == [[1, 2, 3], [4, 5, 6], [7, 8, 9]]\n assert candidate(mat = [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]],r = 3,c = 6) == [[1, 2, 3, 4, 5, 6], [7, 8, 9, 10, 11, 12], [13, 14, 15, 16, 17, 18]]\n assert candidate(mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15]],r = 3,c = 5) == [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15]]\n assert candidate(mat = [[10, 20, 30, 40, 50], [60, 70, 80, 90, 100], [110, 120, 130, 140, 150]],r = 5,c = 3) == [[10, 20, 30], [40, 50, 60], [70, 80, 90], [100, 110, 120], [130, 140, 150]]\n", "comparison": "exact"}, "public_tests": ["[[1,2],[3,4]]\n1\n4", "[[1,2],[3,4]]\n2\n4"], "hints": ["Do you know how 2d matrix is stored in 1d memory? Try to map 2-dimensions into one.", "M[i][j]=M[n*i+j] , where n is the number of cols. This is the one way of converting 2-d indices into one 1-d index. Now, how will you convert 1-d index into 2-d indices?", "Try to use division and modulus to convert 1-d index into 2-d indices.", "M[i] => M[i/n][i%n] Will it result in right mapping? Take some example and check this formula."], "metadata": {"canonical_parameter_names": ["mat", "r", "c"], "leetcode_dataset_entry_point": "Solution().matrixReshape", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:31+00:00", "tests_total": 97, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["array", "matrix", "simulation"]}, "language": "ruby", "interface": {"raw_signature": "def matrix_reshape(mat, r, c)", "container": null, "callable": "matrix_reshape", "parameters": [{"name": "mat", "type": "Integer[][]"}, {"name": "r", "type": "Integer"}, {"name": "c", "type": "Integer"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 567, "task_id": "permutation-in-string", "difficulty": "Medium", "problem_description": "Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.\n\nIn other words, return true if one of s1's permutations is the substring of s2.\n\nExample 1:\n\nInput: s1 = \"ab\", s2 = \"eidbaooo\"\nOutput: true\nExplanation: s2 contains one permutation of s1 (\"ba\").\n\nExample 2:\n\nInput: s1 = \"ab\", s2 = \"eidboaoo\"\nOutput: false\n\nConstraints:\n\n- 1 <= s1.length, s2.length <= 10^4\n- s1 and s2 consist of lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(s1 = \"abc\",s2 = \"bbbccca\") == False\n assert candidate(s1 = \"adc\",s2 = \"dcda\") == True\n assert candidate(s1 = \"abc\",s2 = \"bbbccba\") == True\n assert candidate(s1 = \"abcde\",s2 = \"adecb\") == True\n assert candidate(s1 = \"test\",s2 = \"ttewest\") == False\n assert candidate(s1 = \"abc\",s2 = \"cbadef\") == True\n assert candidate(s1 = \"abc\",s2 = \"defabc\") == True\n assert candidate(s1 = \"xyz\",s2 = \"zyxwvut\") == True\n assert candidate(s1 = \"hello\",s2 = \"ooollehed\") == True\n assert candidate(s1 = \"ab\",s2 = \"eidboaoo\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"abcabc\") == True\n assert candidate(s1 = \"hello\",s2 = \"ooolleoooleh\") == False\n assert candidate(s1 = \"xyz\",s2 = \"ayzxbcd\") == True\n assert candidate(s1 = \"hello\",s2 = \"ooollehdl\") == True\n assert candidate(s1 = \"a\",s2 = \"ab\") == True\n assert candidate(s1 = \"z\",s2 = \"abcz\") == True\n assert candidate(s1 = \"a\",s2 = \"b\") == False\n assert candidate(s1 = \"abcd\",s2 = \"dcba\") == True\n assert candidate(s1 = \"ab\",s2 = \"eidbaooo\") == True\n assert candidate(s1 = \"abcd\",s2 = \"dcbaefg\") == True\n assert candidate(s1 = \"abc\",s2 = \"cccccbabb\") == True\n assert candidate(s1 = \"aaaa\",s2 = \"aaabaaaa\") == True\n assert candidate(s1 = \"abcd\",s2 = \"abcdxzyw\") == True\n assert candidate(s1 = \"a\",s2 = \"a\") == True\n assert candidate(s1 = \"abracadabra\",s2 = \"cadabraabra\") == True\n assert candidate(s1 = \"unique\",s2 = \"enquci\") == False\n assert candidate(s1 = \"complexity\",s2 = \"itpelxcmoytz\") == True\n assert candidate(s1 = \"python\",s2 = \"nothpy\") == True\n assert candidate(s1 = \"permutation\",s2 = \"aeronpmutitno\") == True\n assert candidate(s1 = \"pqrstuvw\",s2 = \"stuvwpqrxyz\") == True\n assert candidate(s1 = \"zzzzz\",s2 = \"zzzzzzzzzzzzzzzzzzzzzz\") == True\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"bbccddeeffaabb\") == True\n assert candidate(s1 = \"xyz\",s2 = \"zyxabcdef\") == True\n assert candidate(s1 = \"permutation\",s2 = \"terumtnipxo\") == False\n assert candidate(s1 = \"characters\",s2 = \"trchaesrhc\") == False\n assert candidate(s1 = \"aabbcc\",s2 = \"baccabdefg\") == True\n assert candidate(s1 = \"algorithm\",s2 = \"logarithma\") == True\n assert candidate(s1 = \"abcdef\",s2 = \"fedcba\") == True\n assert candidate(s1 = \"substring\",s2 = \"tstringsub\") == True\n assert candidate(s1 = \"mnopqr\",s2 = \"qrstuvwxyzmnopqr\") == True\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"fedcbazyxwvutsrqponmlkjihgfedcba\") == False\n assert candidate(s1 = \"unique\",s2 = \"eniquu\") == True\n assert candidate(s1 = \"abcdefghij\",s2 = \"abcdefghijabcdefghij\") == True\n assert candidate(s1 = \"xyz\",s2 = \"axbyczd\") == False\n assert candidate(s1 = \"abcdefghij\",s2 = \"jihgfedcbaefghijkl\") == True\n assert candidate(s1 = \"hello\",s2 = \"ohellonow\") == True\n assert candidate(s1 = \"abcdefghijklmnopqrstuvwxyz\",s2 = \"zyxwvutsrqponmlkjihgfedcbaabcde\") == True\n assert candidate(s1 = \"substring\",s2 = \"stringgnusbs\") == False\n assert candidate(s1 = \"permutation\",s2 = \"tnuatipremot\") == True\n assert candidate(s1 = \"testcase\",s2 = \"stceatcases\") == False\n assert candidate(s1 = \"unique\",s2 = \"euqnieabcd\") == False\n assert candidate(s1 = \"longstring\",s2 = \"gnirtsolongstring\") == True\n assert candidate(s1 = \"abcdabcd\",s2 = \"dcbaabcd\") == True\n assert candidate(s1 = \"mississippi\",s2 = \"isppiimsss\") == False\n assert candidate(s1 = \"abcdef\",s2 = \"ghfedcbijklm\") == False\n assert candidate(s1 = \"substringpermutation\",s2 = \"permutationsubstring\") == True\n assert candidate(s1 = \"variation\",s2 = \"atinoriva\") == True\n assert candidate(s1 = \"abcdefghijk\",s2 = \"jihgfedcbaklmnopqrs\") == True\n assert candidate(s1 = \"abcd\",s2 = \"dcbaefghijklmnopqrstuvwxyz\") == True\n assert candidate(s1 = \"permutation\",s2 = \"tporemutani\") == True\n assert candidate(s1 = \"complexity\",s2 = \"xxlpeicmtostiy\") == False\n assert candidate(s1 = \"unique\",s2 = \"ueiqnunc\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"cbacbacbacbacbacbacbacbacb\") == True\n assert candidate(s1 = \"abcdefg\",s2 = \"ghijklmnopabcdefg\") == True\n assert candidate(s1 = \"abcdefghiklmnopqrstuvwxyz\",s2 = \"zyxwvutsrqponmlkjihgfedcbaabcdefghijklmnopqrstuvwxyz\") == False\n assert candidate(s1 = \"aabbccddeeff\",s2 = \"fedcbafedcbafedcba\") == True\n assert candidate(s1 = \"challenge\",s2 = \"hgelangecllon\") == False\n assert candidate(s1 = \"abcdefg\",s2 = \"gfedcbahijklmnopqrstuvwxyz\") == True\n assert candidate(s1 = \"permutation\",s2 = \"tpremnoiuat\") == True\n assert candidate(s1 = \"hello\",s2 = \"oellhworld\") == True\n assert candidate(s1 = \"test\",s2 = \"tsetabcd\") == True\n assert candidate(s1 = \"abcdefghijk\",s2 = \"kljihgfedcbazyxwvutsrqponml\") == False\n assert candidate(s1 = \"abcdef\",s2 = \"fedcbaxyzabcdef\") == True\n assert candidate(s1 = \"example\",s2 = \"melpaxe\") == True\n assert candidate(s1 = \"interview\",s2 = \"wterevinirt\") == True\n assert candidate(s1 = \"zyxw\",s2 = \"wxyzabcd\") == True\n assert candidate(s1 = \"permutation\",s2 = \"ttnremuapoi\") == True\n assert candidate(s1 = \"xyzz\",s2 = \"zzzyxzzzzzyx\") == True\n assert candidate(s1 = \"hello\",s2 = \"ohellworld\") == True\n assert candidate(s1 = \"longstring\",s2 = \"tgnirlongs\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"bbccaaabcdef\") == True\n assert candidate(s1 = \"aaaaabbbbb\",s2 = \"ababababab\") == True\n assert candidate(s1 = \"complexpermutation\",s2 = \"xmplxcmpotrenuati\") == False\n assert candidate(s1 = \"xyz\",s2 = \"zyxzyxzyxzyxzyx\") == True\n assert candidate(s1 = \"mississippi\",s2 = \"ssippiimis\") == False\n assert candidate(s1 = \"aabbbccc\",s2 = \"cccbbbaaabbbcccaabb\") == True\n assert candidate(s1 = \"xyz\",s2 = \"zyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s1 = \"abcdefg\",s2 = \"zyxwvutsrqponmlkjihgfedcba\") == True\n assert candidate(s1 = \"permutationexample\",s2 = \"xamplepermutation\") == False\n assert candidate(s1 = \"substring\",s2 = \"ggnirtsabcd\") == False\n assert candidate(s1 = \"abcdefgh\",s2 = \"hgfedcbaijkl\") == True\n assert candidate(s1 = \"abacabadabacaba\",s2 = \"badacababacabadaba\") == True\n assert candidate(s1 = \"characters\",s2 = \"tcsrhaec\") == False\n assert candidate(s1 = \"longerstring\",s2 = \"stringlongeron\") == True\n assert candidate(s1 = \"aabbcc\",s2 = \"baccab\") == True\n", "comparison": "exact"}, "public_tests": ["\"ab\"\n\"eidbaooo\"", "\"ab\"\n\"eidboaoo\""], "hints": ["Obviously, brute force will result in TLE. Think of something else.", "How will you check whether one string is a permutation of another string?", "One way is to sort the string and then compare. But, Is there a better way?", "If one string is a permutation of another string then they must have one common metric. What is that?", "Both strings must have same character frequencies, if one is permutation of another. Which data structure should be used to store frequencies?", "What about hash table? An array of size 26?"], "metadata": {"canonical_parameter_names": ["s1", "s2"], "leetcode_dataset_entry_point": "Solution().checkInclusion", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:33+00:00", "tests_total": 95, "tests_dropped": 0, "flags": [], "topic_tags": ["hash-table", "two-pointers", "string", "sliding-window"]}, "language": "ruby", "interface": {"raw_signature": "def check_inclusion(s1, s2)", "container": null, "callable": "check_inclusion", "parameters": [{"name": "s1", "type": "String"}, {"name": "s2", "type": "String"}], "return_type": "Boolean", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 575, "task_id": "distribute-candies", "difficulty": "Easy", "problem_description": "Alice has n candies, where the i^th candy is of type candyType[i]. Alice noticed that she started to gain weight, so she visited a doctor.\n\nThe doctor advised Alice to only eat n / 2 of the candies she has (n is always even). Alice likes her candies very much, and she wants to eat the maximum number of different types of candies while still following the doctor's advice.\n\nGiven the integer array candyType of length n, return the maximum number of different types of candies she can eat if she only eats n / 2 of them.\n\nExample 1:\n\nInput: candyType = [1,1,2,2,3,3]\nOutput: 3\nExplanation: Alice can only eat 6 / 2 = 3 candies. Since there are only 3 types, she can eat one of each type.\n\nExample 2:\n\nInput: candyType = [1,1,2,3]\nOutput: 2\nExplanation: Alice can only eat 4 / 2 = 2 candies. Whether she eats types [1,2], [1,3], or [2,3], she still can only eat 2 different types.\n\nExample 3:\n\nInput: candyType = [6,6,6,6]\nOutput: 1\nExplanation: Alice can only eat 4 / 2 = 2 candies. Even though she can eat 2 candies, she only has 1 type.\n\nConstraints:\n\n- n == candyType.length\n- 2 <= n <= 10^4\n- n is even.\n- -10^5 <= candyType[i] <= 10^5\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(candyType = [1, 2, 1, 3, 1, 2, 1, 3, 1, 2]) == 3\n assert candidate(candyType = [1, 1, 2, 3]) == 2\n assert candidate(candyType = [1, 1, 1, 2, 2, 2]) == 2\n assert candidate(candyType = [0, 0, 0, 0, 0, 0]) == 1\n assert candidate(candyType = [100000, 100000, -100000, -100000, 50000, 50000]) == 3\n assert candidate(candyType = [-1, -2, -3, -1, -2, -3]) == 3\n assert candidate(candyType = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1]) == 3\n assert candidate(candyType = [1, 2, 3, 1, 2, 3]) == 3\n assert candidate(candyType = [-1, -1, 0, 0, 1, 1]) == 3\n assert candidate(candyType = [100000, -100000, 100000, -100000, 100000, -100000]) == 2\n assert candidate(candyType = [1, 2, 3, 4]) == 2\n assert candidate(candyType = [1, 2, 3, 4, 5, 6]) == 3\n assert candidate(candyType = [1, 2, 1, 2, 1, 2]) == 2\n assert candidate(candyType = [-1, -2, -3, -4, -5, -6]) == 3\n assert candidate(candyType = [1, 1, 2, 2, 3, 3]) == 3\n assert candidate(candyType = [100000, -100000, 100000, -100000, 0, 0]) == 3\n assert candidate(candyType = [6, 6, 6, 6]) == 1\n assert candidate(candyType = [1, 1, 1, 1, 2, 2, 2, 2]) == 2\n assert candidate(candyType = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4]) == 4\n assert candidate(candyType = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11]) == 11\n assert candidate(candyType = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 25\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 1, 1, 1, 2, 2, 2]) == 20\n assert candidate(candyType = [-1, -2, -2, -3, -3, -4, -4, -4, -5, -5, -5, -5, -6, -6, -7, -7, -7, -7, -8, -8]) == 8\n assert candidate(candyType = [-100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 2\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20]) == 20\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 15\n assert candidate(candyType = [-50000, 50000, -49999, 49999, -49998, 49998, -49997, 49997, -49996, 49996, -49995, 49995, -49994, 49994, -49993, 49993, -49992, 49992, -49991, 49991]) == 10\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4]) == 4\n assert candidate(candyType = [-50000, -49999, -49998, -49997, -49996, -49995, -49994, -49993, -49992, -49991, 50000, 49999, 49998, 49997, 49996, 49995, 49994, 49993, 49992, 49991]) == 10\n assert candidate(candyType = [-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]) == 10\n assert candidate(candyType = [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18]) == 18\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [-50000, 50000, -40000, 40000, -30000, 30000, -20000, 20000, -10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 10\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 15\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]) == 12\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11]) == 11\n assert candidate(candyType = [10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000]) == 2\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19]) == 19\n assert candidate(candyType = [-50000, -49999, -49998, -49997, 49998, 49999, 50000, 50001, 50002, 50003]) == 5\n assert candidate(candyType = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200]) == 15\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 30, 30, 30, 30, 30, 30, 40, 40, 40, 40, 40, 40, 50, 50, 50, 50, 50, 50]) == 5\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2]) == 10\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19]) == 19\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4]) == 4\n assert candidate(candyType = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8]) == 8\n assert candidate(candyType = [100000, 99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 25\n assert candidate(candyType = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2]) == 2\n assert candidate(candyType = [100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]) == 2\n assert candidate(candyType = [10000, 20000, 30000, 40000, 50000, 10000, 20000, 30000, 40000, 50000, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 15\n assert candidate(candyType = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40]) == 4\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16]) == 16\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10]) == 20\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 10\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30]) == 30\n assert candidate(candyType = [50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50001, 50001, 50001, 50001, 50001, 50001, 50001, 50001, 50001, 50001]) == 2\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8]) == 4\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32]) == 16\n assert candidate(candyType = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6]) == 7\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]) == 4\n assert candidate(candyType = [-1, -1, -2, -2, -3, -3, -4, -4, -5, -5, -6, -6, -7, -7, -8, -8, -9, -9, -10, -10, -11, -11, -12, -12, -13, -13, -14, -15]) == 14\n assert candidate(candyType = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]) == 15\n assert candidate(candyType = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5]) == 5\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 15\n assert candidate(candyType = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8]) == 8\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 20\n assert candidate(candyType = [100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, 100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -100000, -1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 12\n assert candidate(candyType = [-100000, -99999, -99998, -99997, -99996, -99995, -99994, -99993, -99992, -99991, -99990, -99989, -99988, -99987, -99986, -99985, -99984, -99983, -99982, -99981, -99980, -99979, -99978, -99977, -99976, -99975, -99974, -99973, -99972, -99971, -99970, -99969, -99968, -99967, -99966, -99965]) == 18\n assert candidate(candyType = [1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8]) == 8\n assert candidate(candyType = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10]) == 10\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 15]) == 14\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 10\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(candyType = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6]) == 6\n assert candidate(candyType = [99999, 99998, 99997, 99996, 99995, 99994, 99993, 99992, 99991, 99990, 99989, 99988, 99987, 99986, 99985, 99984, 99983, 99982, 99981, 99980, 99979, 99978, 99977, 99976, 99975, 99974, 99973, 99972, 99971, 99970]) == 15\n assert candidate(candyType = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8]) == 8\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 10\n assert candidate(candyType = [1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15]) == 15\n assert candidate(candyType = [-50000, -50000, -50000, -50000, -50000, -50000, -50000, -50000, -50000, -50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000, 50000]) == 2\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]) == 20\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 15\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2]) == 2\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 20\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 3\n assert candidate(candyType = [10, 10, 10, 10, 20, 20, 20, 20, 30, 30, 30, 30, 40, 40, 40, 40, 50, 50, 50, 50, 60, 60, 60, 60, 70, 70, 70, 70, 80, 80, 80, 80, 90, 90, 90, 90]) == 9\n assert candidate(candyType = [1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14]) == 14\n assert candidate(candyType = [10000, 10000, 9999, 9999, 8888, 8888, 7777, 7777, 6666, 6666, 5555, 5555, 4444, 4444, 3333, 3333, 2222, 2222, 1111, 1111]) == 10\n assert candidate(candyType = [1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9]) == 9\n assert candidate(candyType = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5]) == 5\n assert candidate(candyType = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 15\n assert candidate(candyType = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 3\n", "comparison": "exact"}, "public_tests": ["[1,1,2,2,3,3]", "[1,1,2,3]", "[6,6,6,6]"], "hints": ["To maximize the number of kinds of candies, we should try to distribute candies such that Alice will gain all kinds.", "What is the upper limit of the number of kinds of candies Alice will gain? Remember candies are to distributed equally.", "Which data structure is the most suitable for finding the number of kinds of candies?", "Will hashset solves the problem? Inserting all candies kind in the hashset and then checking its size with upper limit."], "metadata": {"canonical_parameter_names": ["candyType"], "leetcode_dataset_entry_point": "Solution().distributeCandies", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:42+00:00", "tests_total": 106, "tests_dropped": 9, "flags": [], "topic_tags": ["array", "hash-table"]}, "language": "ruby", "interface": {"raw_signature": "def distribute_candies(candy_type)", "container": null, "callable": "distribute_candies", "parameters": [{"name": "candy_type", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 576, "task_id": "out-of-boundary-paths", "difficulty": "Medium", "problem_description": "There is an m x n grid with a ball. The ball is initially at the position [startRow, startColumn]. You are allowed to move the ball to one of the four adjacent cells in the grid (possibly out of the grid crossing the grid boundary). You can apply at most maxMove moves to the ball.\n\nGiven the five integers m, n, maxMove, startRow, startColumn, return the number of paths to move the ball out of the grid boundary. Since the answer can be very large, return it modulo 10^9 + 7.\n\nExample 1:\n\nInput: m = 2, n = 2, maxMove = 2, startRow = 0, startColumn = 0\nOutput: 6\n\nExample 2:\n\nInput: m = 1, n = 3, maxMove = 3, startRow = 0, startColumn = 1\nOutput: 12\n\nConstraints:\n\n- 1 <= m, n <= 50\n- 0 <= maxMove <= 50\n- 0 <= startRow < m\n- 0 <= startColumn < n\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(m = 3,n = 3,maxMove = 1,startRow = 1,startColumn = 1) == 0\n assert candidate(m = 5,n = 5,maxMove = 50,startRow = 0,startColumn = 0) == 101070018\n assert candidate(m = 2,n = 2,maxMove = 2,startRow = 0,startColumn = 0) == 6\n assert candidate(m = 3,n = 3,maxMove = 0,startRow = 1,startColumn = 1) == 0\n assert candidate(m = 4,n = 4,maxMove = 0,startRow = 2,startColumn = 2) == 0\n assert candidate(m = 50,n = 50,maxMove = 0,startRow = 25,startColumn = 25) == 0\n assert candidate(m = 5,n = 5,maxMove = 0,startRow = 2,startColumn = 2) == 0\n assert candidate(m = 5,n = 5,maxMove = 10,startRow = 3,startColumn = 3) == 60322\n assert candidate(m = 50,n = 50,maxMove = 50,startRow = 25,startColumn = 25) == 276775132\n assert candidate(m = 5,n = 5,maxMove = 10,startRow = 2,startColumn = 2) == 79840\n assert candidate(m = 4,n = 4,maxMove = 1,startRow = 3,startColumn = 3) == 2\n assert candidate(m = 50,n = 50,maxMove = 50,startRow = 0,startColumn = 0) == 678188903\n assert candidate(m = 1,n = 3,maxMove = 3,startRow = 0,startColumn = 1) == 12\n assert candidate(m = 35,n = 35,maxMove = 35,startRow = 0,startColumn = 0) == 358207093\n assert candidate(m = 1,n = 1,maxMove = 50,startRow = 0,startColumn = 0) == 4\n assert candidate(m = 50,n = 50,maxMove = 20,startRow = 49,startColumn = 49) == 333389522\n assert candidate(m = 50,n = 50,maxMove = 1,startRow = 0,startColumn = 49) == 2\n assert candidate(m = 20,n = 20,maxMove = 10,startRow = 19,startColumn = 19) == 15604\n assert candidate(m = 25,n = 15,maxMove = 20,startRow = 12,startColumn = 7) == 799973369\n assert candidate(m = 25,n = 25,maxMove = 0,startRow = 12,startColumn = 12) == 0\n assert candidate(m = 30,n = 25,maxMove = 40,startRow = 5,startColumn = 10) == 292121032\n assert candidate(m = 10,n = 10,maxMove = 50,startRow = 9,startColumn = 9) == 788744843\n assert candidate(m = 50,n = 50,maxMove = 1,startRow = 49,startColumn = 0) == 2\n assert candidate(m = 40,n = 35,maxMove = 40,startRow = 20,startColumn = 17) == 678045061\n assert candidate(m = 30,n = 30,maxMove = 30,startRow = 15,startColumn = 15) == 358636530\n assert candidate(m = 35,n = 40,maxMove = 35,startRow = 17,startColumn = 20) == 82874982\n assert candidate(m = 40,n = 40,maxMove = 40,startRow = 35,startColumn = 35) == 925966983\n assert candidate(m = 50,n = 50,maxMove = 50,startRow = 48,startColumn = 48) == 33289482\n assert candidate(m = 30,n = 30,maxMove = 25,startRow = 15,startColumn = 15) == 620611776\n assert candidate(m = 20,n = 20,maxMove = 30,startRow = 0,startColumn = 0) == 698347833\n assert candidate(m = 25,n = 15,maxMove = 35,startRow = 12,startColumn = 7) == 700136042\n assert candidate(m = 45,n = 50,maxMove = 35,startRow = 20,startColumn = 25) == 165784279\n assert candidate(m = 30,n = 30,maxMove = 40,startRow = 10,startColumn = 10) == 10338089\n assert candidate(m = 25,n = 25,maxMove = 50,startRow = 10,startColumn = 10) == 763033703\n assert candidate(m = 1,n = 10,maxMove = 20,startRow = 0,startColumn = 5) == 1298133\n assert candidate(m = 10,n = 10,maxMove = 30,startRow = 9,startColumn = 0) == 362344847\n assert candidate(m = 35,n = 25,maxMove = 50,startRow = 17,startColumn = 12) == 801609655\n assert candidate(m = 10,n = 10,maxMove = 1,startRow = 9,startColumn = 0) == 2\n assert candidate(m = 49,n = 49,maxMove = 49,startRow = 24,startColumn = 24) == 205299836\n assert candidate(m = 40,n = 40,maxMove = 15,startRow = 39,startColumn = 39) == 7622962\n assert candidate(m = 30,n = 30,maxMove = 25,startRow = 10,startColumn = 15) == 789398028\n assert candidate(m = 10,n = 10,maxMove = 50,startRow = 0,startColumn = 0) == 788744843\n assert candidate(m = 40,n = 30,maxMove = 45,startRow = 15,startColumn = 10) == 919089617\n assert candidate(m = 45,n = 45,maxMove = 45,startRow = 22,startColumn = 22) == 988297120\n assert candidate(m = 30,n = 30,maxMove = 30,startRow = 0,startColumn = 29) == 30862686\n assert candidate(m = 40,n = 40,maxMove = 30,startRow = 0,startColumn = 0) == 30862684\n assert candidate(m = 20,n = 20,maxMove = 49,startRow = 19,startColumn = 19) == 935890565\n assert candidate(m = 20,n = 20,maxMove = 30,startRow = 5,startColumn = 10) == 952018589\n assert candidate(m = 25,n = 25,maxMove = 25,startRow = 0,startColumn = 12) == 973636948\n assert candidate(m = 45,n = 45,maxMove = 20,startRow = 0,startColumn = 0) == 333389522\n assert candidate(m = 10,n = 10,maxMove = 50,startRow = 5,startColumn = 5) == 910802827\n assert candidate(m = 35,n = 45,maxMove = 20,startRow = 15,startColumn = 20) == 80810\n assert candidate(m = 50,n = 50,maxMove = 2,startRow = 48,startColumn = 48) == 2\n assert candidate(m = 50,n = 1,maxMove = 25,startRow = 25,startColumn = 0) == 67108863\n assert candidate(m = 45,n = 45,maxMove = 20,startRow = 35,startColumn = 35) == 60375025\n assert candidate(m = 30,n = 30,maxMove = 30,startRow = 5,startColumn = 5) == 571485704\n assert candidate(m = 20,n = 40,maxMove = 40,startRow = 5,startColumn = 20) == 992621451\n assert candidate(m = 50,n = 50,maxMove = 50,startRow = 1,startColumn = 1) == 33289482\n assert candidate(m = 50,n = 45,maxMove = 40,startRow = 25,startColumn = 20) == 461095502\n assert candidate(m = 40,n = 40,maxMove = 40,startRow = 10,startColumn = 10) == 119337015\n assert candidate(m = 20,n = 20,maxMove = 10,startRow = 0,startColumn = 0) == 15604\n assert candidate(m = 10,n = 10,maxMove = 45,startRow = 0,startColumn = 5) == 633319298\n assert candidate(m = 35,n = 35,maxMove = 20,startRow = 17,startColumn = 17) == 2956\n assert candidate(m = 20,n = 10,maxMove = 30,startRow = 10,startColumn = 5) == 233153742\n assert candidate(m = 15,n = 15,maxMove = 20,startRow = 0,startColumn = 14) == 333735544\n assert candidate(m = 20,n = 20,maxMove = 1,startRow = 10,startColumn = 10) == 0\n assert candidate(m = 30,n = 30,maxMove = 40,startRow = 5,startColumn = 5) == 232430931\n assert candidate(m = 20,n = 20,maxMove = 15,startRow = 10,startColumn = 10) == 269698\n assert candidate(m = 50,n = 50,maxMove = 0,startRow = 0,startColumn = 0) == 0\n assert candidate(m = 25,n = 20,maxMove = 40,startRow = 12,startColumn = 8) == 753298275\n assert candidate(m = 10,n = 10,maxMove = 0,startRow = 5,startColumn = 5) == 0\n assert candidate(m = 25,n = 25,maxMove = 50,startRow = 24,startColumn = 24) == 310332047\n assert candidate(m = 25,n = 25,maxMove = 25,startRow = 12,startColumn = 12) == 708832804\n assert candidate(m = 40,n = 40,maxMove = 30,startRow = 20,startColumn = 20) == 405303029\n assert candidate(m = 40,n = 50,maxMove = 20,startRow = 20,startColumn = 30) == 2\n assert candidate(m = 10,n = 10,maxMove = 1,startRow = 0,startColumn = 0) == 2\n assert candidate(m = 15,n = 25,maxMove = 20,startRow = 7,startColumn = 12) == 799973369\n assert candidate(m = 50,n = 50,maxMove = 1,startRow = 0,startColumn = 0) == 2\n assert candidate(m = 50,n = 50,maxMove = 1,startRow = 25,startColumn = 25) == 0\n assert candidate(m = 30,n = 30,maxMove = 15,startRow = 15,startColumn = 15) == 2\n assert candidate(m = 10,n = 10,maxMove = 45,startRow = 0,startColumn = 0) == 200206745\n assert candidate(m = 20,n = 20,maxMove = 10,startRow = 0,startColumn = 19) == 15604\n assert candidate(m = 15,n = 20,maxMove = 25,startRow = 7,startColumn = 10) == 525013044\n assert candidate(m = 50,n = 1,maxMove = 50,startRow = 25,startColumn = 0) == 163591967\n assert candidate(m = 25,n = 25,maxMove = 50,startRow = 12,startColumn = 12) == 15238035\n assert candidate(m = 35,n = 40,maxMove = 30,startRow = 0,startColumn = 0) == 30862684\n assert candidate(m = 10,n = 1,maxMove = 20,startRow = 5,startColumn = 0) == 1298133\n assert candidate(m = 10,n = 20,maxMove = 25,startRow = 5,startColumn = 10) == 642758144\n assert candidate(m = 20,n = 20,maxMove = 50,startRow = 10,startColumn = 10) == 46531996\n assert candidate(m = 50,n = 50,maxMove = 50,startRow = 49,startColumn = 49) == 678188903\n assert candidate(m = 40,n = 40,maxMove = 40,startRow = 15,startColumn = 15) == 199335553\n assert candidate(m = 40,n = 40,maxMove = 50,startRow = 0,startColumn = 0) == 945208311\n assert candidate(m = 45,n = 45,maxMove = 30,startRow = 20,startColumn = 20) == 875006271\n assert candidate(m = 40,n = 15,maxMove = 40,startRow = 39,startColumn = 7) == 407032675\n assert candidate(m = 15,n = 25,maxMove = 35,startRow = 7,startColumn = 17) == 582434371\n assert candidate(m = 20,n = 20,maxMove = 10,startRow = 19,startColumn = 0) == 15604\n assert candidate(m = 10,n = 10,maxMove = 1,startRow = 0,startColumn = 9) == 2\n assert candidate(m = 1,n = 50,maxMove = 50,startRow = 0,startColumn = 25) == 163591967\n assert candidate(m = 2,n = 2,maxMove = 5,startRow = 1,startColumn = 1) == 62\n assert candidate(m = 45,n = 45,maxMove = 45,startRow = 0,startColumn = 0) == 731907496\n assert candidate(m = 30,n = 30,maxMove = 30,startRow = 10,startColumn = 10) == 131872750\n assert candidate(m = 25,n = 30,maxMove = 35,startRow = 12,startColumn = 15) == 262708332\n assert candidate(m = 30,n = 30,maxMove = 1,startRow = 15,startColumn = 15) == 0\n assert candidate(m = 40,n = 40,maxMove = 40,startRow = 19,startColumn = 19) == 751858492\n assert candidate(m = 45,n = 45,maxMove = 25,startRow = 22,startColumn = 22) == 4696\n assert candidate(m = 45,n = 35,maxMove = 20,startRow = 20,startColumn = 15) == 80810\n assert candidate(m = 40,n = 20,maxMove = 45,startRow = 10,startColumn = 10) == 157535529\n assert candidate(m = 50,n = 50,maxMove = 40,startRow = 25,startColumn = 25) == 783748412\n assert candidate(m = 50,n = 50,maxMove = 20,startRow = 45,startColumn = 45) == 888027161\n assert candidate(m = 40,n = 40,maxMove = 50,startRow = 39,startColumn = 39) == 945208311\n assert candidate(m = 1,n = 50,maxMove = 25,startRow = 0,startColumn = 25) == 67108863\n assert candidate(m = 10,n = 10,maxMove = 1,startRow = 9,startColumn = 9) == 2\n assert candidate(m = 10,n = 10,maxMove = 20,startRow = 5,startColumn = 5) == 277211170\n assert candidate(m = 50,n = 50,maxMove = 1,startRow = 49,startColumn = 49) == 2\n assert candidate(m = 45,n = 45,maxMove = 10,startRow = 22,startColumn = 22) == 0\n assert candidate(m = 45,n = 45,maxMove = 45,startRow = 44,startColumn = 44) == 731907496\n assert candidate(m = 35,n = 35,maxMove = 50,startRow = 17,startColumn = 17) == 350241059\n", "comparison": "exact"}, "public_tests": ["2\n2\n2\n0\n0", "1\n3\n3\n0\n1"], "hints": ["Is traversing every path feasible? There are many possible paths for a small matrix. Try to optimize it.", "Can we use some space to store the number of paths and update them after every move?", "One obvious thing: the ball will go out of the boundary only by crossing it. Also, there is only one possible way the ball can go out of the boundary from the boundary cell except for corner cells. From the corner cell, the ball can go out in two different ways. Can you use this thing to solve the problem?"], "metadata": {"canonical_parameter_names": ["m", "n", "maxMove", "startRow", "startColumn"], "leetcode_dataset_entry_point": "Solution().findPaths", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:45+00:00", "tests_total": 117, "tests_dropped": 0, "flags": ["has_images"], "topic_tags": ["dynamic-programming"]}, "language": "ruby", "interface": {"raw_signature": "def find_paths(m, n, max_move, start_row, start_column)", "container": null, "callable": "find_paths", "parameters": [{"name": "m", "type": "Integer"}, {"name": "n", "type": "Integer"}, {"name": "max_move", "type": "Integer"}, {"name": "start_row", "type": "Integer"}, {"name": "start_column", "type": "Integer"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 581, "task_id": "shortest-unsorted-continuous-subarray", "difficulty": "Medium", "problem_description": "Given an integer array nums, you need to find one continuous subarray such that if you only sort this subarray in non-decreasing order, then the whole array will be sorted in non-decreasing order.\n\nReturn the shortest such subarray and output its length.\n\nExample 1:\n\nInput: nums = [2,6,4,8,10,9,15]\nOutput: 5\nExplanation: You need to sort [6, 4, 8, 10, 9] in ascending order to make the whole array sorted in ascending order.\n\nExample 2:\n\nInput: nums = [1,2,3,4]\nOutput: 0\n\nExample 3:\n\nInput: nums = [1]\nOutput: 0\n\nConstraints:\n\n- 1 <= nums.length <= 10^4\n- -10^5 <= nums[i] <= 10^5\n\nFollow up: Can you solve it in O(n) time complexity?\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(nums = [1, 3, 2, 4, 5]) == 2\n assert candidate(nums = [1, 2, 3, 5, 4]) == 2\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(nums = [1]) == 0\n assert candidate(nums = [1, 2, 3, 4, 3, 5, 6, 7, 8, 9, 10]) == 2\n assert candidate(nums = [1, 2, 3, 4]) == 0\n assert candidate(nums = [1, 3, 5, 2, 4, 6, 7]) == 4\n assert candidate(nums = [1, 2, 5, 4, 3]) == 3\n assert candidate(nums = [1, 2, 4, 3, 5]) == 2\n assert candidate(nums = [1, 3, 2, 2, 2]) == 4\n assert candidate(nums = [1, 3, 5, 4, 2, 6]) == 4\n assert candidate(nums = [1, 3, 2, 0, 5]) == 4\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) == 11\n assert candidate(nums = [10, 9, 8, 7, 6]) == 5\n assert candidate(nums = [2, 6, 4, 8, 10, 9, 15]) == 5\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1]) == 13\n assert candidate(nums = [5, 6, 3, 4, 8]) == 4\n assert candidate(nums = [2, 3, 3, 2, 4]) == 3\n assert candidate(nums = [2, 1, 3, 4, 5, 6, 7, 8, 9, 10]) == 2\n assert candidate(nums = [1, 3, 5, 4, 2]) == 4\n assert candidate(nums = [3, 2, 1]) == 3\n assert candidate(nums = [1, 3, 2, 3, 3]) == 2\n assert candidate(nums = [5, 4, 3, 2, 1]) == 5\n assert candidate(nums = [1, 2, 4, 3, 5, 6, 7]) == 2\n assert candidate(nums = [1, 3, 5, 2, 4]) == 4\n assert candidate(nums = [1, 2, 3, 3, 3]) == 0\n assert candidate(nums = [1, 2, 0, 4, 5]) == 3\n assert candidate(nums = [1, 2, 4, 5, 3]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 16\n assert candidate(nums = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 17]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 1]) == 11\n assert candidate(nums = [1, 2, 3, 10, 5, 6, 7, 8, 9, 4]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 2, 3, 4]) == 19\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 1]) == 23\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 2, 7, 6, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 21, 22]) == 20\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 2, 6, 7, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 18\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 9, 8, 10]) == 2\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 20\n assert candidate(nums = [1, 9, 10, 3, 4, 2, 6, 5, 7, 8]) == 9\n assert candidate(nums = [1, 3, 5, 4, 2, 6, 7, 8, 9, 10, 11, 12]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 3\n assert candidate(nums = [1, 2, 10, 9, 8, 7, 6, 5, 4, 3, 2]) == 9\n assert candidate(nums = [1, 3, 5, 2, 4, 6, 8, 7, 10, 9, 11]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 3]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 10, 9, 8, 7, 11]) == 4\n assert candidate(nums = [100, 200, 300, 400, 10, 50, 60, 70, 80, 90]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 1]) == 28\n assert candidate(nums = [1, 3, 2, 5, 4, 6, 8, 7, 9, 11, 10]) == 10\n assert candidate(nums = [1, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [1, 9, 10, 3, 5, 4, 6, 7, 2, 9]) == 9\n assert candidate(nums = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 18\n assert candidate(nums = [1, 9, 10, 7, 6, 5, 4, 3, 2, 9]) == 9\n assert candidate(nums = [1, 10, 9, 8, 7, 6, 5, 4, 3, 2]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 1]) == 27\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 29\n assert candidate(nums = [1, 9, 2, 8, 3, 7, 4, 6, 5, 10]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 25\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 2, 1]) == 12\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 7, 6, 2, 9]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 10, 8, 9]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 2]) == 9\n assert candidate(nums = [1, 9, 10, 5, 4, 3, 6, 7, 2, 9]) == 9\n assert candidate(nums = [1, 2, 3, 10, 9, 8, 7, 6, 5, 4, 11, 12]) == 7\n assert candidate(nums = [1, 9, 10, 3, 4, 6, 5, 7, 2, 9]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 1]) == 24\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 19]) == 2\n assert candidate(nums = [3, 2, 3, 2, 1]) == 5\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 6, 2, 8, 7]) == 9\n assert candidate(nums = [1, 10, 9, 2, 3, 4, 5, 6, 7, 8]) == 9\n assert candidate(nums = [1, 5, 4, 3, 2, 6, 7, 8, 9, 10, 11]) == 4\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 10, 11, 10, 12]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1]) == 10\n assert candidate(nums = [1, 5, 3, 4, 2, 6, 7, 8, 9, 10]) == 4\n assert candidate(nums = [1, 9, 10, 2, 3, 5, 4, 6, 7, 8]) == 9\n assert candidate(nums = [5, 6, 3, 2, 4, 7, 8, 9, 10, 11, 12, 13]) == 5\n assert candidate(nums = [1, 9, 10, 2, 3, 4, 5, 6, 8, 7]) == 9\n assert candidate(nums = [2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 1]) == 26\n assert candidate(nums = [1, 9, 10, 6, 5, 4, 3, 7, 2, 9]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11]) == 10\n assert candidate(nums = [1, 9, 10, 3, 2, 4, 5, 6, 7, 8]) == 9\n assert candidate(nums = [5, 4, 3, 2, 1, 0]) == 6\n assert candidate(nums = [1, 9, 10, 4, 3, 5, 6, 8, 2, 9]) == 9\n assert candidate(nums = [1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 27\n assert candidate(nums = [10, 1, 2, 3, 4, 5, 6, 7, 8, 9]) == 10\n assert candidate(nums = [1, 2, 3, 4, 10, 9, 8, 7, 6, 5, 4]) == 7\n assert candidate(nums = [5, 6, 3, 7, 8, 2, 9, 10, 11, 12]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 16]) == 15\n assert candidate(nums = [1, 2, 3, 4, 9, 10, 5, 6, 7, 8]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 29\n assert candidate(nums = [3, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 3\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 6, 7, 2, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 9, 10, 6, 7, 8]) == 5\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 10, 9, 8, 7, 6, 5]) == 6\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 1]) == 21\n assert candidate(nums = [3, 2, 1, 4, 5, 6, 7, 8, 9, 10]) == 3\n assert candidate(nums = [1, 3, 5, 4, 2, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 4\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 10, 9]) == 2\n assert candidate(nums = [1, 2, 9, 10, 3, 4, 5, 6, 7, 8]) == 8\n assert candidate(nums = [5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18, 20]) == 2\n assert candidate(nums = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == 10\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 16, 18, 19, 20]) == 2\n assert candidate(nums = [20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 21]) == 20\n assert candidate(nums = [1, 2, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10]) == 0\n assert candidate(nums = [1, 9, 10, 4, 3, 5, 6, 7, 2, 9]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14, 16, 17, 18, 19, 20]) == 2\n assert candidate(nums = [1, 3, 2, 2, 2, 5, 4, 4, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 11, 14, 13, 16, 15]) == 6\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 2, 8, 7, 6]) == 9\n assert candidate(nums = [1, 2, 3, 5, 4, 6, 7, 8, 9, 10, 11, 12]) == 2\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 6, 7, 2, 9]) == 9\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 6, 2, 7, 8]) == 9\n assert candidate(nums = [2, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 10\n assert candidate(nums = [1, 9, 10, 2, 3, 4, 5, 7, 6, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1, 2, 3]) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 16\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 1]) == 22\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15, 16]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) == 0\n assert candidate(nums = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]) == 0\n assert candidate(nums = [1, 9, 10, 2, 4, 3, 5, 6, 7, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3]) == 12\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) == 28\n assert candidate(nums = [1, 2, 3, 9, 10, 4, 5, 6, 7, 8]) == 7\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 15, 17, 18, 19, 20]) == 2\n assert candidate(nums = [1, 2, 3, 4, 5, 10, 9, 8, 7, 6]) == 5\n assert candidate(nums = [1, 9, 10, 3, 4, 2, 5, 6, 7, 8]) == 9\n assert candidate(nums = [1, 9, 10, 3, 2, 5, 4, 6, 7, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 4, 3, 2, 1]) == 13\n assert candidate(nums = [1, 9, 10, 2, 3, 4, 5, 6, 7, 8]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 10, 9, 8, 7, 4]) == 7\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 17, 20, 21]) == 3\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 4, 3, 2, 1]) == 14\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 1]) == 25\n assert candidate(nums = [1, 9, 10, 3, 4, 5, 6, 8, 2, 9]) == 9\n assert candidate(nums = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]) == 0\n assert candidate(nums = [1, 2, 3, 5, 4, 7, 6, 9, 8, 11, 10]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) == 0\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 1]) == 29\n assert candidate(nums = [5, 6, 3, 4, 3, 8, 9, 10, 1, 12]) == 9\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 17, 20]) == 3\n assert candidate(nums = [1, 2, 3, 10, 9, 8, 7, 6, 5, 4, 3]) == 8\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 1]) == 20\n assert candidate(nums = [1, 2, 3, 4, 5, 6, 9, 10, 8, 7]) == 4\n assert candidate(nums = [1, 9, 10, 2, 3, 4, 6, 5, 7, 8]) == 9\n", "comparison": "exact"}, "public_tests": ["[2,6,4,8,10,9,15]", "[1,2,3,4]", "[1]"], "hints": [], "metadata": {"canonical_parameter_names": ["nums"], "leetcode_dataset_entry_point": "Solution().findUnsortedSubarray", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:47+00:00", "tests_total": 158, "tests_dropped": 0, "flags": [], "topic_tags": ["array", "two-pointers", "stack", "greedy", "sorting", "monotonic-stack"]}, "language": "ruby", "interface": {"raw_signature": "def find_unsorted_subarray(nums)", "container": null, "callable": "find_unsorted_subarray", "parameters": [{"name": "nums", "type": "Integer[]"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 583, "task_id": "delete-operation-for-two-strings", "difficulty": "Medium", "problem_description": "Given two strings word1 and word2, return the minimum number of steps required to make word1 and word2 the same.\n\nIn one step, you can delete exactly one character in either string.\n\nExample 1:\n\nInput: word1 = \"sea\", word2 = \"eat\"\nOutput: 2\nExplanation: You need one step to make \"sea\" to \"ea\" and another step to make \"eat\" to \"ea\".\n\nExample 2:\n\nInput: word1 = \"leetcode\", word2 = \"etco\"\nOutput: 4\n\nConstraints:\n\n- 1 <= word1.length, word2.length <= 500\n- word1 and word2 consist of only lowercase English letters.\n", "canonical_tests": {"language": "python", "source": "def check(candidate):\n assert candidate(word1 = \"abc\",word2 = \"def\") == 6\n assert candidate(word1 = \"abcde\",word2 = \"fghij\") == 10\n assert candidate(word1 = \"abcdefghijklmnopqrstuvwxyz\",word2 = \"zyxwvutsrqponmlkjihgfedcba\") == 50\n assert candidate(word1 = \"sea\",word2 = \"eat\") == 2\n assert candidate(word1 = \"abcd\",word2 = \"dcba\") == 6\n assert candidate(word1 = \"leetcode\",word2 = \"etco\") == 4\n assert candidate(word1 = \"abc\",word2 = \"abc\") == 0\n assert candidate(word1 = \"a\",word2 = \"b\") == 2\n assert candidate(word1 = \"park\",word2 = \"spake\") == 3\n assert candidate(word1 = \"flaw\",word2 = \"lawn\") == 2\n assert candidate(word1 = \"leetcode\",word2 = \"etco\") == 4\n assert candidate(word1 = \"abcde\",word2 = \"ace\") == 2\n assert candidate(word1 = \"pneumonoultramicroscopicsilicovolcanoconiosis\",word2 = \"ultramicroscopicsilicovolcanoconiosis\") == 8\n assert candidate(word1 = \"qwertyuiop\",word2 = \"asdfghjklzxcvbnm\") == 26\n assert candidate(word1 = \"a\",word2 = \"b\") == 2\n assert candidate(word1 = \"abc\",word2 = \"abc\") == 0\n assert candidate(word1 = \"sea\",word2 = \"eat\") == 2\n assert candidate(word1 = \"a\",word2 = \"a\") == 0\n assert candidate(word1 = \"intention\",word2 = \"execution\") == 8\n assert candidate(word1 = \"abcd\",word2 = \"dcba\") == 6\n assert candidate(word1 = \"abc\",word2 = \"def\") == 6\n assert candidate(word1 = \"aabbccdd\",word2 = \"ddccbbaa\") == 12\n assert candidate(word1 = \"algorithm\",word2 = \"alligator\") == 8\n assert candidate(word1 = \"abcdabcdeabc\",word2 = \"abcdeabcdeabcd\") == 2\n assert candidate(word1 = \"mississippi\",word2 = \"pississippi\") == 2\n assert candidate(word1 = \"abcdefgh\",word2 = \"hgfedcba\") == 14\n assert candidate(word1 = \"pneumonoultramicroscopicsilicovolcanoconiosis\",word2 = \"pseudopseudohypoparathyroidism\") == 49\n assert candidate(word1 = \"interstellar\",word2 = \"interplanetary\") == 10\n assert candidate(word1 = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",word2 = \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\") == 808\n assert candidate(word1 = \"thisisalongstring\",word2 = \"thisisanotherrandomstring\") == 12\n assert candidate(word1 = \"dynamic\",word2 = \"programming\") == 12\n assert candidate(word1 = \"karolin\",word2 = \"kathrin\") == 4\n assert candidate(word1 = \"mississippi\",word2 = \"mississipi\") == 1\n assert candidate(word1 = \"abcdabcdefabcde\",word2 = \"abcde\") == 10\n assert candidate(word1 = \"hippopotomonstrosesquippedaliophobia\",word2 = \"supercalifragilisticexpialidocious\") == 50\n assert candidate(word1 = \"algorithm\",word2 = \"rhythm\") == 7\n assert candidate(word1 = \"ababababab\",word2 = \"bababababa\") == 2\n assert candidate(word1 = \"programming\",word2 = \"program\") == 4\n assert candidate(word1 = \"abacaxabayabacaxabay\",word2 = \"abayabacaxabayabacaxab\") == 6\n assert candidate(word1 = \"flibbertigibbet\",word2 = \"fribblegibbet\") == 6\n assert candidate(word1 = \"longest\",word2 = \"substring\") == 12\n assert candidate(word1 = \"flaw\",word2 = \"lawn\") == 2\n assert candidate(word1 = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",word2 = \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\") == 120\n assert candidate(word1 = \"flower\",word2 = \"flow\") == 2\n assert candidate(word1 = \"xyzxyz\",word2 = \"zyxzyx\") == 6\n assert candidate(word1 = \"abracadabra\",word2 = \"abrakadabradabra\") == 7\n assert candidate(word1 = \"aaaaa\",word2 = \"bbbbb\") == 10\n assert candidate(word1 = \"pneumonoultramicroscopicsilicovolcanoconiosis\",word2 = \"pneumonoultramicroscopicsilicovolcanoconiosisxyz\") == 3\n assert candidate(word1 = \"evaporate\",word2 = \"volatile\") == 7\n assert candidate(word1 = \"racecar\",word2 = \"civic\") == 8\n assert candidate(word1 = \"abacabadabacaba\",word2 = \"abacabadabacabax\") == 1\n assert candidate(word1 = \"longest\",word2 = \"shortest\") == 7\n assert candidate(word1 = \"abcd\",word2 = \"abef\") == 4\n assert candidate(word1 = \"algorithm\",word2 = \"altruistic\") == 9\n assert candidate(word1 = \"mississippi\",word2 = \"missisippi\") == 1\n assert candidate(word1 = \"longestcommonsubsequence\",word2 = \"longestcommonsubstring\") == 10\n assert candidate(word1 = \"kittens\",word2 = \"sitting\") == 6\n assert candidate(word1 = \"aaaaaaaaaaaaaa\",word2 = \"bbbbbbbbbbbbbb\") == 28\n assert candidate(word1 = \"abcdefghijklmnopqrstuvwxyz\",word2 = \"zyxwvutsrqponmlkjihgfedcba\") == 50\n assert candidate(word1 = \"thequickbrownfoxjumpsoverthelazydog\",word2 = \"packmyboxwithfivedozenliquorjugs\") == 43\n assert candidate(word1 = \"aaaaaa\",word2 = \"bbbbbb\") == 12\n assert candidate(word1 = \"abracadabra\",word2 = \"abacaxabay\") == 5\n assert candidate(word1 = \"racecar\",word2 = \"racecar\") == 0\n assert candidate(word1 = \"abcdxyz\",word2 = \"xyzabcd\") == 6\n assert candidate(word1 = \"palindrome\",word2 = \"madam\") == 9\n assert candidate(word1 = \"mississippi\",word2 = \"missisipi\") == 2\n assert candidate(word1 = \"programming\",word2 = \"prognosis\") == 10\n assert candidate(word1 = \"sequence\",word2 = \"subsequence\") == 3\n assert candidate(word1 = \"floccinaucinihilipilification\",word2 = \"antidisestablishmentarianism\") == 39\n assert candidate(word1 = \"abracadabra\",word2 = \"avadakedavra\") == 9\n assert candidate(word1 = \"programming\",word2 = \"programmer\") == 5\n assert candidate(word1 = \"mississippi\",word2 = \"misisippi\") == 2\n assert candidate(word1 = \"aaaaaabbbbb\",word2 = \"bbbbbbaaaaa\") == 12\n assert candidate(word1 = \"dissimilar\",word2 = \"similarly\") == 5\n assert candidate(word1 = \"kitten\",word2 = \"sitting\") == 5\n assert candidate(word1 = \"mississippi\",word2 = \"mississsippi\") == 1\n assert candidate(word1 = \"abc\",word2 = \"xyz\") == 6\n assert candidate(word1 = \"gumbo\",word2 = \"gambol\") == 3\n assert candidate(word1 = \"elephant\",word2 = \"relevant\") == 4\n assert candidate(word1 = \"abcde\",word2 = \"fghij\") == 10\n assert candidate(word1 = \"supercalifragilisticexpialidocious\",word2 = \"pneumonoultramicroscopicsilicovolcanoconiosis\") == 45\n assert candidate(word1 = \"palindrome\",word2 = \"emordnilap\") == 18\n assert candidate(word1 = \"dynamicprogramming\",word2 = \"dynamicprogram\") == 4\n assert candidate(word1 = \"abacaxi\",word2 = \"bacana\") == 5\n assert candidate(word1 = \"abcd\",word2 = \"abcde\") == 1\n assert candidate(word1 = \"abracadabra\",word2 = \"abracadabrac\") == 1\n assert candidate(word1 = \"abcdefgh\",word2 = \"efghijkl\") == 8\n assert candidate(word1 = \"abacaxi\",word2 = \"bacaxia\") == 2\n assert candidate(word1 = \"abcdefgh\",word2 = \"fghijklm\") == 10\n assert candidate(word1 = \"abcd\",word2 = \"abcd\") == 0\n assert candidate(word1 = \"qwertyuiopasdfghjklzxcvbnm\",word2 = \"mnbvcxzlkjhgfdsapoiuytrewq\") == 50\n assert candidate(word1 = \"xylophone\",word2 = \"balalaika\") == 16\n assert candidate(word1 = \"abcdefghijk\",word2 = \"kjihgfedcba\") == 20\n assert candidate(word1 = \"transformation\",word2 = \"transfigure\") == 11\n assert candidate(word1 = \"abacaxi\",word2 = \"abacaxi\") == 0\n assert candidate(word1 = \"similarities\",word2 = \"dissimilarities\") == 3\n assert candidate(word1 = \"characters\",word2 = \"chartreuse\") == 6\n assert candidate(word1 = \"floccinaucinihilipilification\",word2 = \"supercalifragilisticexpialidocious\") == 37\n assert candidate(word1 = \"deleting\",word2 = \"leting\") == 2\n assert candidate(word1 = \"abcabcabc\",word2 = \"cbacbacba\") == 8\n assert candidate(word1 = \"pneumonoultramicroscopicsilicovolcanoconiosis\",word2 = \"supercalifragilisticexpialidocious\") == 45\n assert candidate(word1 = \"ababababababababababababababababababababababababab\",word2 = \"bababababababababababababababababababababababababa\") == 2\n assert candidate(word1 = \"dynamic\",word2 = \"algorithm\") == 12\n assert candidate(word1 = \"dabc\",word2 = \"dcba\") == 4\n", "comparison": "exact"}, "public_tests": ["\"sea\"\n\"eat\"", "\"leetcode\"\n\"etco\""], "hints": [], "metadata": {"canonical_parameter_names": ["word1", "word2"], "leetcode_dataset_entry_point": "Solution().minDistance", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:52+00:00", "tests_total": 104, "tests_dropped": 0, "flags": [], "topic_tags": ["string", "dynamic-programming", "longest-common-subsequence"]}, "language": "ruby", "interface": {"raw_signature": "def min_distance(word1, word2)", "container": null, "callable": "min_distance", "parameters": [{"name": "word1", "type": "String"}, {"name": "word2", "type": "String"}], "return_type": "Integer", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 587, "task_id": "erect-the-fence", "difficulty": "Hard", "problem_description": "You are given an array trees where trees[i] = [x_i, y_i] represents the location of a tree in the garden.\n\nFence the entire garden using the minimum length of rope, as it is expensive. The garden is well-fenced only if all the trees are enclosed.\n\nReturn the coordinates of trees that are exactly located on the fence perimeter. You may return the answer in any order.\n\nExample 1:\n\nInput: trees = [[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]]\nOutput: [[1,1],[2,0],[4,2],[3,3],[2,4]]\nExplanation: All the trees will be on the perimeter of the fence except the tree at [2, 2], which will be inside the fence.\n\nExample 2:\n\nInput: trees = [[1,2],[2,2],[4,2]]\nOutput: [[4,2],[2,2],[1,2]]\nExplanation: The fence forms a line that passes through all the trees.\n\nConstraints:\n\n- 1 <= trees.length <= 3000\n- trees[i].length == 2\n- 0 <= x_i, y_i <= 100\n- All the given positions are unique.\n", "canonical_tests": {"language": "python", "source": "def answers_match(result, expected):\n \"\"\"The answer may list its items in any order (only the top-level order is free).\"\"\"\n if isinstance(result, list) and isinstance(expected, list):\n return sorted(result, key=repr) == sorted(expected, key=repr)\n return result == expected\n\n\ndef check(candidate):\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]]), [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [2, 2], [1, 2], [3, 2], [2, 3]]), [[1, 1], [2, 1], [3, 1], [3, 2], [2, 3], [1, 2]])\n assert answers_match(candidate(trees=[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5]]), [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4], [0, 5]])\n assert answers_match(candidate(trees=[[1, 2], [2, 2], [4, 2]]), [[1, 2], [2, 2], [4, 2]])\n assert answers_match(candidate(trees=[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]]), [[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]]), [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9]])\n assert answers_match(candidate(trees=[[8, 2], [5, 2], [9, 4], [6, 2], [9, 2], [4, 4], [7, 3], [8, 4], [6, 1], [8, 3], [3, 3], [9, 0], [1, 0], [4, 2], [3, 4], [5, 3], [6, 3], [1, 2], [4, 0], [3, 0]]), [[1, 0], [3, 0], [4, 0], [9, 0], [9, 2], [9, 4], [8, 4], [4, 4], [3, 4], [1, 2]])\n assert answers_match(candidate(trees=[[3, 0], [4, 0], [5, 0], [6, 1], [7, 2], [7, 3], [7, 4], [6, 5], [5, 5], [4, 5], [3, 5], [2, 5], [1, 4], [1, 3], [1, 2], [2, 1]]), [[1, 2], [2, 1], [3, 0], [4, 0], [5, 0], [6, 1], [7, 2], [7, 3], [7, 4], [6, 5], [5, 5], [4, 5], [3, 5], [2, 5], [1, 4], [1, 3]])\n assert answers_match(candidate(trees=[[0, 0], [0, 1], [0, 2], [1, 2], [2, 2], [3, 2], [4, 2], [4, 1], [4, 0], [3, 0], [2, 0], [1, 0]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [4, 1], [4, 2], [3, 2], [2, 2], [1, 2], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]]), [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 2], [4, 2], [5, 2], [1, 3], [5, 3], [1, 4], [5, 4], [1, 5], [5, 5]]), [[1, 1], [5, 2], [5, 3], [5, 4], [5, 5], [1, 5], [1, 4], [1, 3]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 1], [2, 0]]), [[0, 0], [2, 0], [3, 1], [2, 2], [1, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [1, 2], [2, 2], [3, 2], [1, 3], [2, 3], [3, 3]]), [[1, 1], [2, 1], [3, 1], [3, 2], [3, 3], [2, 3], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 2], [3, 2], [5, 2], [7, 2], [9, 2], [11, 2]]), [[1, 2], [3, 2], [5, 2], [7, 2], [9, 2], [11, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [2, 0], [2, 4], [3, 3], [4, 2]]), [[1, 1], [2, 0], [4, 2], [3, 3], [2, 4]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5]]), [[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [2, 2], [3, 2], [4, 2], [3, 3]]), [[1, 1], [2, 1], [3, 1], [4, 2], [3, 3], [2, 2]])\n assert answers_match(candidate(trees=[[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3], [4, 1], [4, 2], [4, 3], [5, 1], [5, 2], [5, 3], [6, 1], [6, 2], [6, 3]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [6, 2], [6, 3], [5, 3], [4, 3], [3, 3], [2, 3], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [0, 1], [5, 1], [0, 2], [5, 2], [0, 3], [5, 3]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [5, 1], [5, 2], [5, 3], [0, 3], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 2], [5, 1], [4, 5], [3, 5], [2, 5], [1, 5], [3, 1], [5, 3]]), [[1, 1], [3, 1], [5, 1], [5, 3], [4, 5], [3, 5], [2, 5], [1, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 3], [3, 3], [4, 3], [5, 3], [6, 3], [7, 3], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5]]), [[1, 1], [8, 1], [8, 2], [8, 3], [8, 4], [8, 5], [2, 3]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [5, 5], [4, 4], [6, 6], [7, 7], [8, 8]]), [[1, 1], [2, 2], [3, 3], [4, 4], [4, 4], [5, 5], [5, 5], [6, 6], [6, 6], [7, 7], [7, 7], [8, 8], [8, 8], [9, 9], [10, 10]])\n assert answers_match(candidate(trees=[[0, 0], [5, 0], [0, 5], [5, 5], [2, 2], [3, 3], [1, 4], [4, 1], [2, 5], [5, 2], [3, 1], [1, 3]]), [[0, 0], [5, 0], [5, 2], [5, 5], [2, 5], [0, 5]])\n assert answers_match(candidate(trees=[[1, 1], [1, 5], [5, 5], [5, 1], [3, 3], [2, 2], [4, 4], [3, 2], [3, 4], [2, 3], [4, 3]]), [[1, 1], [5, 1], [5, 5], [1, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [5, 2]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [5, 2]])\n assert answers_match(candidate(trees=[[0, 0], [10, 0], [0, 10], [10, 10], [5, 5], [2, 2], [8, 8], [3, 3], [7, 7], [4, 4]]), [[0, 0], [10, 0], [10, 10], [0, 10]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 1], [4, 2], [5, 1], [6, 2], [7, 1], [8, 2], [9, 1]]), [[1, 1], [3, 1], [5, 1], [7, 1], [9, 1], [8, 2], [6, 2], [4, 2], [2, 2]])\n assert answers_match(candidate(trees=[[1, 3], [2, 1], [2, 5], [3, 2], [3, 4], [4, 1], [4, 5], [5, 2], [5, 4], [6, 3]]), [[1, 3], [2, 1], [4, 1], [5, 2], [6, 3], [5, 4], [4, 5], [2, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 5], [3, 2], [4, 4], [5, 1], [6, 5], [7, 3], [8, 2], [9, 4], [10, 1], [11, 5]]), [[1, 1], [5, 1], [10, 1], [11, 5], [6, 5], [2, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 3], [3, 2], [4, 4], [5, 3], [6, 1], [6, 5], [7, 2], [8, 4]]), [[1, 1], [6, 1], [7, 2], [8, 4], [6, 5], [4, 4], [2, 3]])\n assert answers_match(candidate(trees=[[1, 1], [1, 5], [5, 1], [5, 5], [2, 2], [2, 4], [4, 2], [4, 4], [3, 3]]), [[1, 1], [5, 1], [5, 5], [1, 5]])\n assert answers_match(candidate(trees=[[1, 1], [1, 2], [2, 1], [2, 2], [3, 1], [3, 2], [4, 1], [4, 2], [1, 3], [4, 3]]), [[1, 1], [2, 1], [3, 1], [4, 1], [4, 2], [4, 3], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10], [10, 9], [9, 8], [8, 7], [7, 6], [6, 5], [5, 4], [4, 3], [3, 2], [2, 1]]), [[1, 1], [2, 1], [3, 2], [4, 3], [5, 4], [6, 5], [7, 6], [8, 7], [9, 8], [10, 9], [10, 10], [9, 10], [8, 9], [7, 8], [6, 7], [5, 6], [4, 5], [3, 4], [2, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 2], [2, 3], [3, 2], [4, 3], [5, 2], [6, 3], [7, 2], [8, 3], [9, 2], [10, 3]]), [[1, 2], [3, 2], [5, 2], [7, 2], [9, 2], [10, 3], [8, 3], [6, 3], [4, 3], [2, 3]])\n assert answers_match(candidate(trees=[[1, 1], [1, 2], [2, 1], [3, 1], [2, 2], [3, 2], [1, 3], [2, 3], [3, 3], [1, 4], [2, 4], [3, 4], [2, 5]]), [[1, 1], [2, 1], [3, 1], [3, 2], [3, 3], [3, 4], [2, 5], [1, 4], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 5], [3, 3], [5, 3], [5, 5], [3, 1], [3, 2], [3, 4], [5, 4], [4, 4], [4, 5]]), [[1, 1], [3, 1], [5, 3], [5, 4], [5, 5], [4, 5], [2, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [5, 3]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [10, 2], [5, 3], [1, 2]])\n assert answers_match(candidate(trees=[[0, 0], [0, 1], [1, 1], [1, 0], [2, 0], [2, 1], [1, 2], [0, 2], [3, 3], [4, 4], [3, 4], [4, 3]]), [[0, 0], [1, 0], [2, 0], [4, 3], [4, 4], [3, 4], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]]), [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [6, 7], [7, 8], [8, 9], [9, 10]])\n assert answers_match(candidate(trees=[[1, 2], [2, 1], [3, 2], [2, 3], [1, 4], [4, 1], [4, 4], [2, 2], [3, 3], [1, 3], [3, 1]]), [[1, 2], [2, 1], [3, 1], [4, 1], [4, 4], [1, 4], [1, 3]])\n assert answers_match(candidate(trees=[[1, 3], [2, 2], [2, 4], [3, 1], [3, 5], [4, 3], [5, 2], [5, 4], [6, 3]]), [[1, 3], [2, 2], [3, 1], [5, 2], [6, 3], [5, 4], [3, 5], [2, 4]])\n assert answers_match(candidate(trees=[[0, 0], [0, 1], [0, 2], [1, 0], [1, 1], [1, 2], [2, 0], [2, 1], [2, 2], [3, 0], [3, 1], [3, 2]]), [[0, 0], [1, 0], [2, 0], [3, 0], [3, 1], [3, 2], [2, 2], [1, 2], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [1, 3], [3, 1], [3, 3], [2, 2], [2, 4], [4, 2], [4, 4], [3, 2], [2, 3], [3, 4]]), [[1, 1], [3, 1], [4, 2], [4, 4], [3, 4], [2, 4], [1, 3]])\n assert answers_match(candidate(trees=[[1, 0], [1, 1], [1, 2], [1, 3], [1, 4], [2, 0], [2, 1], [2, 2], [2, 3], [2, 4], [3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [4, 0], [4, 1], [4, 2], [4, 3], [4, 4]]), [[1, 0], [2, 0], [3, 0], [4, 0], [4, 1], [4, 2], [4, 3], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2], [1, 1]])\n assert answers_match(candidate(trees=[[1, 1], [1, 5], [2, 2], [2, 4], [3, 3], [3, 1], [3, 5], [4, 2], [4, 4], [5, 1], [5, 5]]), [[1, 1], [3, 1], [5, 1], [5, 5], [3, 5], [1, 5]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [4, 1], [4, 2], [4, 3], [4, 4], [3, 4], [2, 4], [1, 4], [0, 4], [0, 3], [0, 2], [0, 1]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [4, 1], [4, 2], [4, 3], [4, 4], [3, 4], [2, 4], [1, 4], [0, 4], [0, 3], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [1, 2], [3, 2], [2, 3], [4, 3], [3, 4], [4, 4], [1, 5], [2, 5], [4, 5], [5, 5], [3, 6], [4, 7], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [2, 4], [3, 5], [2, 5], [3, 7], [4, 6], [6, 6], [7, 6], [8, 6], [5, 7]]), [[1, 1], [2, 1], [2, 3], [2, 3], [2, 4], [2, 5], [2, 5], [3, 2], [4, 3], [4, 3], [5, 3], [8, 6], [5, 7], [4, 7], [3, 7], [1, 5], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 2], [4, 2], [5, 3], [3, 3], [2, 4], [4, 4], [1, 5], [2, 5], [4, 5], [5, 5], [3, 6], [4, 7]]), [[1, 1], [4, 2], [5, 3], [5, 5], [4, 7], [1, 5]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [2, 0], [3, 0], [3, 3], [4, 1], [4, 3]]), [[0, 0], [2, 0], [3, 0], [4, 1], [4, 3], [3, 3], [2, 2], [1, 1]])\n assert answers_match(candidate(trees=[[1, 10], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1], [9, 0], [8, 1], [7, 2], [6, 3], [5, 4], [4, 5], [3, 6], [2, 7], [1, 8], [2, 9], [3, 8], [4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2]]), [[1, 8], [2, 7], [2, 9], [2, 9], [3, 6], [3, 8], [3, 8], [4, 5], [4, 7], [4, 7], [5, 4], [5, 6], [5, 6], [6, 3], [6, 5], [6, 5], [7, 2], [7, 4], [7, 4], [8, 1], [8, 3], [8, 3], [9, 0], [9, 2], [9, 2], [10, 1], [1, 10]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [5, 1], [5, 3], [5, 2], [4, 3], [3, 4], [2, 3], [1, 2]]), [[1, 1], [5, 1], [5, 2], [5, 3], [5, 5], [3, 4], [2, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [2, 0], [3, 1], [3, 3], [4, 2], [4, 4], [5, 3], [5, 5], [6, 4], [6, 2], [7, 3], [8, 4], [9, 3], [9, 5], [10, 4]]), [[1, 1], [2, 0], [9, 3], [10, 4], [9, 5], [5, 5], [4, 4], [3, 3], [2, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [4, 3], [3, 2], [2, 1], [1, 0]]), [[0, 0], [1, 0], [2, 1], [3, 2], [4, 3], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1]])\n assert answers_match(candidate(trees=[[1, 1], [1, 4], [4, 1], [4, 4], [2, 2], [3, 3], [2, 3], [3, 2]]), [[1, 1], [4, 1], [4, 4], [1, 4]])\n assert answers_match(candidate(trees=[[0, 0], [0, 2], [1, 1], [2, 2], [2, 0], [3, 0], [3, 2], [4, 1]]), [[0, 0], [2, 0], [3, 0], [4, 1], [3, 2], [2, 2], [0, 2]])\n assert answers_match(candidate(trees=[[4, 0], [5, 0], [2, 0], [6, 1], [1, 2], [5, 3], [2, 3], [6, 5], [5, 5], [4, 5], [2, 5], [0, 6], [1, 6], [5, 6], [3, 7]]), [[0, 6], [1, 2], [2, 0], [4, 0], [5, 0], [6, 1], [6, 5], [5, 6], [3, 7]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [10, 1], [5, 10]])\n assert answers_match(candidate(trees=[[10, 0], [0, 0], [0, 10], [10, 10], [5, 5], [2, 5], [5, 2], [8, 5], [5, 8]]), [[0, 0], [10, 0], [10, 10], [0, 10]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [1, 2], [2, 2], [1, 3], [2, 3], [1, 4], [2, 4], [3, 1], [3, 2], [3, 3], [3, 4]]), [[1, 1], [2, 1], [3, 1], [3, 2], [3, 3], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [9, 2], [8, 2], [7, 2], [6, 2], [5, 2], [4, 2], [3, 2], [2, 2], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 5], [3, 4], [4, 3], [5, 2], [6, 1], [7, 3], [8, 5], [9, 4], [10, 2], [11, 3]]), [[1, 1], [6, 1], [10, 2], [11, 3], [8, 5], [2, 5]])\n assert answers_match(candidate(trees=[[3, 3], [1, 1], [2, 2], [4, 4], [5, 5], [3, 5], [5, 3], [3, 1], [1, 3]]), [[1, 1], [3, 1], [5, 3], [5, 5], [3, 5], [1, 3]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 1], [4, 2], [5, 1], [6, 2], [7, 1], [8, 2], [9, 1], [10, 2]]), [[1, 1], [3, 1], [5, 1], [7, 1], [9, 1], [10, 2], [8, 2], [6, 2], [4, 2], [2, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [1, 3], [2, 3], [3, 3], [4, 3], [5, 3], [1, 4], [2, 4], [3, 4], [4, 4], [5, 4]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [5, 2], [5, 3], [5, 4], [4, 4], [3, 4], [2, 4], [1, 4], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0]]), [[1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [10, 10], [9, 9], [8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2], [1, 1]])\n assert answers_match(candidate(trees=[[1, 1], [1, 2], [1, 3], [2, 1], [2, 3], [3, 1], [3, 2], [3, 3], [2, 2]]), [[1, 1], [2, 1], [3, 1], [3, 2], [3, 3], [2, 3], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5]]), [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [1, 1], [0, 1], [2, 0], [2, 1], [2, 2], [1, 2], [0, 2], [3, 0], [3, 1], [3, 2], [3, 3], [2, 3], [1, 3], [0, 3]]), [[0, 0], [1, 0], [2, 0], [3, 0], [3, 1], [3, 2], [3, 3], [2, 3], [1, 3], [0, 3], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [2, 0], [2, 4], [3, 3], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2]]), [[1, 1], [2, 0], [10, 2], [2, 4]])\n assert answers_match(candidate(trees=[[2, 3], [3, 2], [4, 3], [5, 2], [6, 3], [7, 2], [8, 3], [9, 2], [10, 3], [11, 2], [12, 3]]), [[2, 3], [3, 2], [5, 2], [7, 2], [9, 2], [11, 2], [12, 3], [10, 3], [8, 3], [6, 3], [4, 3]])\n assert answers_match(candidate(trees=[[5, 5], [7, 7], [6, 6], [8, 8], [9, 9], [10, 10], [8, 10], [10, 8], [9, 8], [8, 9]]), [[5, 5], [10, 8], [10, 10], [8, 10]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [1, 2], [5, 2], [1, 3], [5, 3], [1, 4], [5, 4], [1, 5], [5, 5], [3, 3]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [1, 5], [1, 4], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[3, 0], [4, 0], [5, 0], [6, 1], [7, 2], [7, 3], [7, 4], [6, 5], [5, 5], [4, 5], [3, 5], [2, 5], [1, 4], [1, 3], [1, 2], [2, 2], [4, 2], [0, 3]]), [[0, 3], [1, 2], [3, 0], [4, 0], [5, 0], [6, 1], [7, 2], [7, 3], [7, 4], [6, 5], [5, 5], [4, 5], [3, 5], [2, 5], [1, 4]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [0, 5], [1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [2, 2], [3, 2], [2, 3], [3, 3], [1, 1], [4, 4], [1, 4], [4, 1]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5], [0, 5]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5], [0, 5], [6, 5], [7, 5], [8, 5], [9, 5]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [9, 5], [8, 5], [7, 5], [6, 5], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5], [0, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [10, 0], [9, 1], [8, 2], [7, 3], [6, 4], [5, 5], [4, 6], [3, 7], [2, 8], [1, 9]]), [[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [5, 5], [6, 4], [7, 3], [8, 2], [9, 1], [10, 0], [10, 10], [1, 9]])\n assert answers_match(candidate(trees=[[5, 0], [5, 5], [0, 5], [5, 10], [10, 5], [0, 0], [1, 1], [4, 4], [6, 6], [9, 9], [2, 2], [8, 8], [3, 3], [7, 7]]), [[0, 0], [5, 0], [10, 5], [9, 9], [5, 10], [0, 5]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [2, 3], [3, 4], [4, 3], [4, 2], [3, 1]]), [[0, 0], [3, 1], [4, 2], [4, 3], [3, 4], [2, 3]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9], [5, 10]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [5, 10]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [5, 1]]), [[1, 1], [5, 1], [10, 10], [9, 9], [8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [2, 4], [1, 2], [2, 0], [3, 2], [4, 0], [5, 1], [5, 2], [5, 3]]), [[0, 0], [2, 0], [4, 0], [5, 1], [5, 2], [5, 3], [2, 4], [1, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [2, 1], [1, 1], [0, 1], [2, 2], [1, 2], [3, 1]]), [[0, 0], [1, 0], [2, 0], [3, 0], [3, 1], [2, 2], [1, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 2], [1, 4], [2, 1], [2, 3], [2, 5], [3, 2], [3, 4], [4, 1], [4, 3], [4, 5], [5, 2], [5, 4]]), [[1, 2], [2, 1], [4, 1], [5, 2], [5, 4], [4, 5], [2, 5], [1, 4]])\n assert answers_match(candidate(trees=[[1, 1], [1, 3], [2, 2], [2, 4], [3, 1], [3, 3], [4, 2], [4, 4]]), [[1, 1], [3, 1], [4, 2], [4, 4], [2, 4], [1, 3]])\n assert answers_match(candidate(trees=[[1, 1], [1, 5], [2, 3], [3, 1], [4, 5], [5, 3], [6, 1], [7, 5], [8, 3], [9, 1]]), [[1, 1], [3, 1], [6, 1], [9, 1], [8, 3], [7, 5], [4, 5], [1, 5]])\n assert answers_match(candidate(trees=[[10, 0], [0, 10], [10, 10], [0, 0], [5, 5], [3, 3], [7, 7], [4, 6], [6, 4]]), [[0, 0], [10, 0], [10, 10], [0, 10]])\n assert answers_match(candidate(trees=[[1, 2], [2, 1], [2, 3], [3, 1], [3, 3], [4, 2], [4, 3], [3, 4], [2, 4]]), [[1, 2], [2, 1], [3, 1], [4, 2], [4, 3], [3, 4], [2, 4]])\n assert answers_match(candidate(trees=[[1, 1], [2, 1], [1, 2], [2, 2], [1, 3], [2, 3], [3, 1], [3, 2], [3, 3]]), [[1, 1], [2, 1], [3, 1], [3, 2], [3, 3], [2, 3], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [5, 1], [5, 3]]), [[1, 2], [5, 1], [10, 2], [5, 3]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [5, 4], [4, 3], [3, 2], [2, 1], [1, 0], [0, 1], [1, 2], [2, 3], [3, 4], [4, 5]]), [[0, 0], [1, 0], [2, 1], [3, 2], [4, 3], [5, 4], [5, 5], [4, 5], [3, 4], [2, 3], [1, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [2, 0], [3, 0], [3, 3], [4, 3], [5, 2], [5, 0]]), [[1, 1], [2, 0], [3, 0], [5, 0], [5, 2], [4, 3], [3, 3], [2, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [0, 1], [1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [7, 1], [8, 1], [9, 1], [0, 2], [1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [9, 1], [9, 2], [8, 2], [7, 2], [6, 2], [5, 2], [4, 2], [3, 2], [2, 2], [1, 2], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[0, 0], [0, 5], [5, 0], [5, 5], [1, 1], [1, 2], [1, 3], [1, 4], [2, 1], [2, 2], [2, 3], [2, 4], [3, 1], [3, 2], [3, 3], [3, 4], [4, 1], [4, 2], [4, 3], [4, 4]]), [[0, 0], [5, 0], [5, 5], [0, 5]])\n assert answers_match(candidate(trees=[[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [6, 2], [7, 2], [8, 2], [9, 2], [10, 2], [2, 1], [8, 1], [5, 3]]), [[1, 2], [2, 1], [8, 1], [10, 2], [5, 3]])\n assert answers_match(candidate(trees=[[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [2, 5], [3, 5], [4, 5], [5, 5], [5, 4], [5, 3], [5, 2], [5, 1], [4, 1], [3, 1], [2, 1]]), [[1, 1], [2, 1], [3, 1], [4, 1], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [4, 5], [3, 5], [2, 5], [1, 5], [1, 4], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [9, 8], [8, 6], [7, 4], [6, 2], [5, 0], [4, 2], [3, 4], [2, 6], [1, 8]]), [[0, 0], [5, 0], [6, 2], [7, 4], [8, 6], [9, 8], [10, 10], [1, 8]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 1], [4, 2], [5, 1], [6, 2], [7, 1], [8, 2]]), [[1, 1], [3, 1], [5, 1], [7, 1], [8, 2], [6, 2], [4, 2], [2, 2]])\n assert answers_match(candidate(trees=[[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]]), [[1, 1], [2, 1], [3, 1], [3, 2], [3, 3], [2, 3], [1, 3], [1, 2]])\n assert answers_match(candidate(trees=[[1, 2], [2, 1], [3, 2], [2, 3], [4, 4], [5, 3], [4, 2], [3, 1], [2, 2], [5, 1], [6, 0], [5, 0], [4, 1], [3, 0]]), [[1, 2], [2, 1], [3, 0], [5, 0], [6, 0], [5, 3], [4, 4], [2, 3]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [3, 10], [2, 10], [1, 10], [0, 10], [0, 9], [0, 8], [0, 7], [0, 6], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [10, 1], [10, 2], [10, 3], [10, 4], [10, 5], [10, 6], [10, 7], [10, 8], [10, 9], [10, 10], [9, 10], [8, 10], [7, 10], [6, 10], [5, 10], [4, 10], [3, 10], [2, 10], [1, 10], [0, 10], [0, 9], [0, 8], [0, 7], [0, 6], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 1], [5, 3], [6, 2], [7, 4], [8, 3], [9, 5], [10, 4], [11, 5]]), [[1, 1], [3, 1], [6, 2], [8, 3], [10, 4], [11, 5], [9, 5], [2, 2]])\n assert answers_match(candidate(trees=[[2, 2], [2, 4], [3, 3], [4, 4], [4, 2], [5, 2], [5, 4], [3, 4]]), [[2, 2], [4, 2], [5, 2], [5, 4], [4, 4], [3, 4], [2, 4]])\n assert answers_match(candidate(trees=[[1, 2], [2, 2], [3, 2], [4, 2], [5, 2], [2, 1], [3, 1], [4, 1], [2, 3], [3, 3], [4, 3]]), [[1, 2], [2, 1], [3, 1], [4, 1], [5, 2], [4, 3], [3, 3], [2, 3]])\n assert answers_match(candidate(trees=[[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [0, 1], [5, 1], [0, 2], [5, 2], [0, 3], [5, 3], [0, 4], [5, 4], [0, 5], [5, 5]]), [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [0, 5], [0, 4], [0, 3], [0, 2], [0, 1]])\n assert answers_match(candidate(trees=[[1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [6, 5]]), [[1, 1], [6, 5], [10, 10], [9, 9], [8, 8], [7, 7], [6, 6], [5, 5], [4, 4], [3, 3], [2, 2]])\n assert answers_match(candidate(trees=[[1, 1], [2, 5], [3, 3], [5, 3], [5, 5], [3, 5], [4, 4]]), [[1, 1], [5, 3], [5, 5], [3, 5], [2, 5]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [4, 4], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 6], [5, 7], [5, 8], [5, 9]]), [[0, 0], [5, 0], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5], [5, 5], [6, 6], [7, 7], [8, 8], [9, 9], [10, 10], [5, 9]])\n assert answers_match(candidate(trees=[[3, 0], [4, 0], [5, 0], [4, 1], [3, 2], [4, 2], [5, 2], [4, 3]]), [[3, 0], [4, 0], [5, 0], [5, 2], [4, 3], [3, 2]])\n assert answers_match(candidate(trees=[[0, 0], [1, 1], [2, 2], [3, 3], [2, 0], [0, 3]]), [[0, 0], [2, 0], [3, 3], [0, 3]])\n assert answers_match(candidate(trees=[[1, 1], [2, 5], [3, 1], [3, 4], [4, 2], [5, 1], [5, 5], [6, 2]]), [[1, 1], [3, 1], [5, 1], [6, 2], [5, 5], [2, 5]])\n assert answers_match(candidate(trees=[[1, 1], [2, 5], [3, 1], [4, 5], [5, 1], [6, 5], [7, 1], [8, 5], [9, 1]]), [[1, 1], [3, 1], [5, 1], [7, 1], [9, 1], [8, 5], [6, 5], [4, 5], [2, 5]])\n", "comparison": "unordered"}, "public_tests": ["[[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]]", "[[1,2],[2,2],[4,2]]"], "hints": [], "metadata": {"canonical_parameter_names": ["trees"], "leetcode_dataset_entry_point": "Solution().outerTrees", "problem_source": "newfacade/LeetCodeDataset", "description_source": "leetcode.com", "interface_source": "leetcode/codeSnippets", "fetched_at": "2026-09-30T19:53:54+00:00", "tests_total": 113, "tests_dropped": 0, "flags": ["any_order", "has_images"], "topic_tags": ["array", "math", "geometry", "convex-hull", "polygons"]}, "language": "ruby", "interface": {"raw_signature": "def outer_trees(trees)", "container": null, "callable": "outer_trees", "parameters": [{"name": "trees", "type": "Integer[][]"}], "return_type": "Integer[][]", "signature_source": "leetcode/codeSnippets", "type_source": "leetcode/codeSnippets"}}
{"question_id": 591, "task_id": "tag-validator", "difficulty": "Hard", "problem_description": "Given a string representing a code snippet, implement a tag validator to parse the code and return whether it is valid.\n\nA code snippet is valid if all the following rules hold:\n\n1. The code must be wrapped in a valid closed tag. Otherwise, the code is invalid.\n2. A closed tag (not necessarily valid) has exactly the following format :
many
]]>\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"\") == True\n assert candidate(code = \"]]>text
\") == True\n assert candidate(code = \"